@arco-design/mobile-react 2.29.6 → 2.30.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 +12 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/_helpers/hooks.d.ts +242 -2
- package/cjs/_helpers/hooks.js +267 -10
- package/cjs/_helpers/index.d.ts +78 -1
- package/cjs/_helpers/index.js +87 -8
- package/cjs/action-sheet/demo/style/css/mobile.css +514 -1
- package/cjs/action-sheet/demo/style/mobile.less +32 -0
- package/cjs/action-sheet/style/css/index.css +597 -2
- package/cjs/action-sheet/style/index.less +62 -0
- package/cjs/avatar/demo/style/css/mobile.css +518 -1
- package/cjs/avatar/demo/style/mobile.less +41 -1
- package/cjs/avatar/style/css/index.css +529 -3
- package/cjs/avatar/style/index.less +54 -1
- package/cjs/badge/demo/style/css/mobile.css +520 -1
- package/cjs/badge/demo/style/mobile.less +40 -0
- package/cjs/badge/style/css/index.css +518 -1
- package/cjs/badge/style/index.less +36 -0
- package/cjs/button/demo/style/css/mobile.css +510 -0
- package/cjs/button/demo/style/mobile.less +25 -0
- package/cjs/button/style/css/index.css +616 -39
- package/cjs/button/style/index.less +135 -25
- package/cjs/carousel/demo/style/css/mobile.css +514 -0
- package/cjs/carousel/demo/style/mobile.less +33 -0
- package/cjs/carousel/style/css/index.css +525 -3
- package/cjs/carousel/style/index.less +55 -0
- package/cjs/cell/demo/style/css/mobile.css +521 -0
- package/cjs/cell/demo/style/mobile.less +46 -0
- package/cjs/cell/style/css/index.css +707 -2
- package/cjs/cell/style/index.less +96 -0
- package/cjs/checkbox/demo/style/css/mobile.css +510 -0
- package/cjs/checkbox/demo/style/mobile.less +25 -0
- package/cjs/checkbox/style/css/index.css +535 -4
- package/cjs/checkbox/style/index.less +61 -0
- package/cjs/circle-progress/demo/style/css/mobile.css +510 -0
- package/cjs/circle-progress/demo/style/mobile.less +25 -0
- package/cjs/circle-progress/style/css/index.css +527 -3
- package/cjs/circle-progress/style/index.less +49 -0
- package/cjs/collapse/demo/style/css/mobile.css +510 -0
- package/cjs/collapse/demo/style/mobile.less +25 -0
- package/cjs/collapse/style/css/index.css +557 -1
- package/cjs/collapse/style/index.less +53 -0
- package/cjs/context-provider/demo/style/css/mobile.css +510 -0
- package/cjs/context-provider/demo/style/mobile.less +25 -0
- package/cjs/context-provider/index.d.ts +10 -3
- package/cjs/context-provider/index.js +40 -7
- package/cjs/count-down/demo/style/css/mobile.css +518 -2
- package/cjs/count-down/demo/style/mobile.less +39 -0
- package/cjs/count-down/style/css/index.css +513 -0
- package/cjs/count-down/style/index.less +30 -0
- package/cjs/date-picker/demo/style/css/mobile.css +510 -0
- package/cjs/date-picker/demo/style/mobile.less +25 -0
- package/cjs/date-picker/style/css/index.css +510 -0
- package/cjs/date-picker/style/index.less +25 -0
- package/cjs/dialog/demo/style/css/mobile.css +520 -1
- package/cjs/dialog/demo/style/mobile.less +44 -0
- package/cjs/dialog/style/css/index.css +645 -4
- package/cjs/dialog/style/index.less +102 -0
- package/cjs/divider/demo/style/css/mobile.css +510 -1
- package/cjs/divider/demo/style/mobile.less +26 -2
- package/cjs/divider/style/css/index.css +516 -0
- package/cjs/divider/style/index.less +44 -9
- package/cjs/dropdown/demo/style/css/mobile.css +510 -0
- package/cjs/dropdown/demo/style/mobile.less +25 -0
- package/cjs/dropdown/style/css/index.css +542 -6
- package/cjs/dropdown/style/index.less +69 -0
- package/cjs/dropdown-menu/demo/style/css/mobile.css +510 -0
- package/cjs/dropdown-menu/demo/style/mobile.less +25 -0
- package/cjs/dropdown-menu/style/css/index.css +566 -3
- package/cjs/dropdown-menu/style/index.less +62 -0
- package/cjs/ellipsis/demo/style/css/mobile.css +519 -1
- package/cjs/ellipsis/demo/style/mobile.less +39 -0
- package/cjs/ellipsis/style/css/index.css +514 -0
- package/cjs/ellipsis/style/index.less +32 -0
- package/cjs/form/style/css/index.css +538 -5
- package/cjs/form/style/index.less +66 -3
- package/cjs/grid/demo/style/css/mobile.css +525 -3
- package/cjs/grid/demo/style/mobile.less +47 -0
- package/cjs/grid/style/css/index.css +519 -0
- package/cjs/grid/style/index.less +48 -0
- package/cjs/image/demo/style/css/mobile.css +510 -0
- package/cjs/image/demo/style/mobile.less +25 -0
- package/cjs/image/style/css/index.css +551 -7
- package/cjs/image/style/index.less +54 -0
- package/cjs/image-picker/demo/style/css/mobile.css +510 -0
- package/cjs/image-picker/demo/style/mobile.less +25 -0
- package/cjs/image-picker/style/css/index.css +529 -4
- package/cjs/image-picker/style/index.less +54 -0
- package/cjs/image-preview/demo/style/css/mobile.css +510 -0
- package/cjs/image-preview/demo/style/mobile.less +25 -0
- package/cjs/image-preview/style/css/index.css +530 -5
- package/cjs/image-preview/style/index.less +37 -0
- package/cjs/index-bar/demo/style/css/mobile.css +510 -0
- package/cjs/index-bar/demo/style/mobile.less +25 -0
- package/cjs/index-bar/style/css/index.css +572 -8
- package/cjs/index-bar/style/index.less +67 -0
- package/cjs/input/demo/style/css/mobile.css +514 -1
- package/cjs/input/demo/style/mobile.less +32 -0
- package/cjs/input/style/css/index.css +589 -2
- package/cjs/input/style/index.less +87 -0
- package/cjs/keyboard/demo/style/css/mobile.css +516 -0
- package/cjs/keyboard/demo/style/mobile.less +35 -1
- package/cjs/keyboard/style/css/index.css +526 -2
- package/cjs/keyboard/style/index.less +51 -0
- package/cjs/load-more/demo/style/css/mobile.css +513 -0
- package/cjs/load-more/demo/style/mobile.less +30 -0
- package/cjs/load-more/style/css/index.css +513 -0
- package/cjs/load-more/style/index.less +30 -0
- package/cjs/loading/demo/style/css/mobile.css +510 -0
- package/cjs/loading/demo/style/mobile.less +25 -0
- package/cjs/loading/style/css/index.css +534 -5
- package/cjs/loading/style/index.less +45 -0
- package/cjs/masking/demo/style/css/mobile.css +514 -1
- package/cjs/masking/demo/style/mobile.less +30 -0
- package/cjs/masking/style/css/index.css +510 -0
- package/cjs/masking/style/index.less +25 -0
- package/cjs/nav-bar/demo/style/css/mobile.css +514 -1
- package/cjs/nav-bar/demo/style/mobile.less +33 -1
- package/cjs/nav-bar/style/css/index.css +550 -1
- package/cjs/nav-bar/style/index.less +38 -0
- package/cjs/notice-bar/style/css/index.css +520 -2
- package/cjs/notice-bar/style/index.less +36 -0
- package/cjs/notify/demo/style/css/mobile.css +510 -0
- package/cjs/notify/demo/style/mobile.less +25 -0
- package/cjs/notify/style/css/index.css +529 -4
- package/cjs/notify/style/index.less +50 -0
- package/cjs/pagination/demo/style/css/index.css +510 -0
- package/cjs/pagination/demo/style/index.less +25 -0
- package/cjs/pagination/style/css/index.css +543 -4
- package/cjs/pagination/style/index.less +72 -0
- package/cjs/picker/demo/style/css/mobile.css +510 -0
- package/cjs/picker/demo/style/mobile.less +25 -0
- package/cjs/picker/style/css/index.css +525 -3
- package/cjs/picker/style/index.less +49 -0
- package/cjs/picker-view/demo/style/css/mobile.css +510 -0
- package/cjs/picker-view/demo/style/mobile.less +25 -0
- package/cjs/picker-view/style/css/index.css +587 -0
- package/cjs/picker-view/style/index.less +50 -0
- package/cjs/popover/demo/style/css/mobile.css +510 -0
- package/cjs/popover/demo/style/mobile.less +25 -0
- package/cjs/popover/style/css/index.css +614 -4
- package/cjs/popover/style/css/menu.css +539 -1
- package/cjs/popover/style/index.less +126 -9
- package/cjs/popover/style/menu.less +69 -0
- package/cjs/popup/demo/style/css/mobile.css +517 -0
- package/cjs/popup/demo/style/mobile.less +38 -0
- package/cjs/popup/style/css/index.css +514 -1
- package/cjs/popup/style/index.less +32 -0
- package/cjs/popup-swiper/demo/style/css/mobile.css +517 -0
- package/cjs/popup-swiper/demo/style/mobile.less +38 -0
- package/cjs/popup-swiper/style/css/index.css +510 -0
- package/cjs/popup-swiper/style/index.less +25 -0
- package/cjs/portal/demo/style/css/mobile.css +515 -1
- package/cjs/portal/demo/style/mobile.less +31 -0
- package/cjs/progress/demo/style/css/mobile.css +510 -0
- package/cjs/progress/demo/style/mobile.less +25 -0
- package/cjs/progress/style/css/index.css +556 -8
- package/cjs/progress/style/index.less +91 -0
- package/cjs/pull-refresh/demo/style/css/mobile.css +514 -2
- package/cjs/pull-refresh/demo/style/mobile.less +35 -2
- package/cjs/pull-refresh/style/css/index.css +536 -3
- package/cjs/pull-refresh/style/index.less +45 -0
- package/cjs/radio/demo/style/css/mobile.css +513 -0
- package/cjs/radio/demo/style/mobile.less +32 -0
- package/cjs/radio/style/css/index.css +535 -4
- package/cjs/radio/style/index.less +61 -0
- package/cjs/rate/demo/style/css/mobile.css +510 -0
- package/cjs/rate/demo/style/mobile.less +25 -0
- package/cjs/rate/style/css/index.css +522 -2
- package/cjs/rate/style/index.less +43 -0
- package/cjs/search-bar/demo/style/css/mobile.css +516 -1
- package/cjs/search-bar/demo/style/mobile.less +39 -5
- package/cjs/search-bar/style/css/index.css +586 -6
- package/cjs/search-bar/style/index.less +84 -0
- package/cjs/show-monitor/demo/style/css/mobile.css +521 -2
- package/cjs/show-monitor/demo/style/mobile.less +43 -1
- package/cjs/skeleton/demo/style/css/mobile.css +510 -0
- package/cjs/skeleton/demo/style/mobile.less +25 -0
- package/cjs/skeleton/style/css/index.css +517 -1
- package/cjs/skeleton/style/index.less +35 -0
- package/cjs/slider/demo/style/css/mobile.css +514 -1
- package/cjs/slider/demo/style/mobile.less +34 -0
- package/cjs/slider/style/css/index.css +542 -5
- package/cjs/slider/style/index.less +74 -0
- package/cjs/stepper/demo/style/css/mobile.css +510 -0
- package/cjs/stepper/demo/style/mobile.less +25 -1
- package/cjs/stepper/style/css/index.css +551 -7
- package/cjs/stepper/style/index.less +84 -3
- package/cjs/steps/demo/style/css/mobile.css +544 -4
- package/cjs/steps/demo/style/mobile.less +41 -3
- package/cjs/steps/style/css/index.css +580 -9
- package/cjs/steps/style/index.less +138 -0
- package/cjs/steps/type.d.ts +1 -1
- package/cjs/sticky/demo/style/css/mobile.css +515 -2
- package/cjs/sticky/demo/style/mobile.less +34 -2
- package/cjs/sticky/style/css/index.css +510 -0
- package/cjs/sticky/style/index.less +25 -0
- package/cjs/swipe-action/demo/style/css/mobile.css +510 -0
- package/cjs/swipe-action/demo/style/mobile.less +25 -0
- package/cjs/swipe-action/style/css/index.css +518 -2
- package/cjs/swipe-action/style/index.less +43 -0
- package/cjs/swipe-load/demo/style/css/mobile.css +539 -5
- package/cjs/swipe-load/demo/style/mobile.less +64 -0
- package/cjs/swipe-load/style/css/index.css +517 -1
- package/cjs/swipe-load/style/index.less +37 -0
- package/cjs/switch/demo/style/css/mobile.css +515 -1
- package/cjs/switch/demo/style/mobile.less +35 -0
- package/cjs/switch/style/css/index.css +532 -4
- package/cjs/switch/style/index.less +59 -0
- package/cjs/tab-bar/demo/style/css/mobile.css +510 -0
- package/cjs/tab-bar/demo/style/mobile.less +25 -0
- package/cjs/tab-bar/style/css/index.css +517 -1
- package/cjs/tab-bar/style/index.less +37 -0
- package/cjs/tabs/demo/style/css/mobile.css +542 -5
- package/cjs/tabs/demo/style/mobile.less +75 -0
- package/cjs/tabs/style/css/index.css +618 -13
- package/cjs/tabs/style/index.less +123 -0
- package/cjs/tabs/tab-cell.js +1 -1
- package/cjs/tag/demo/style/css/mobile.css +510 -0
- package/cjs/tag/demo/style/mobile.less +25 -0
- package/cjs/tag/style/css/index.css +538 -10
- package/cjs/tag/style/index.less +55 -0
- package/cjs/textarea/demo/style/css/mobile.css +514 -1
- package/cjs/textarea/demo/style/mobile.less +32 -1
- package/cjs/textarea/style/css/index.css +527 -2
- package/cjs/textarea/style/index.less +47 -0
- package/cjs/toast/demo/style/css/mobile.css +510 -0
- package/cjs/toast/demo/style/mobile.less +25 -0
- package/cjs/toast/style/css/index.css +530 -5
- package/cjs/toast/style/index.less +37 -0
- package/cjs/transition/demo/style/css/mobile.css +510 -0
- package/cjs/transition/demo/style/mobile.less +25 -0
- package/cjs/transition/style/css/index.css +510 -0
- package/cjs/transition/style/index.less +25 -0
- package/dist/index.js +1073 -29
- package/dist/index.min.js +4 -4
- package/dist/style.css +28002 -211
- package/dist/style.min.css +1 -1
- package/esm/_helpers/hooks.d.ts +242 -2
- package/esm/_helpers/hooks.js +269 -10
- package/esm/_helpers/index.d.ts +78 -1
- package/esm/_helpers/index.js +80 -1
- package/esm/action-sheet/demo/style/css/mobile.css +514 -1
- package/esm/action-sheet/demo/style/mobile.less +32 -0
- package/esm/action-sheet/style/css/index.css +597 -2
- package/esm/action-sheet/style/index.less +62 -0
- package/esm/avatar/demo/style/css/mobile.css +518 -1
- package/esm/avatar/demo/style/mobile.less +41 -1
- package/esm/avatar/style/css/index.css +529 -3
- package/esm/avatar/style/index.less +54 -1
- package/esm/badge/demo/style/css/mobile.css +520 -1
- package/esm/badge/demo/style/mobile.less +40 -0
- package/esm/badge/style/css/index.css +518 -1
- package/esm/badge/style/index.less +36 -0
- package/esm/button/demo/style/css/mobile.css +510 -0
- package/esm/button/demo/style/mobile.less +25 -0
- package/esm/button/style/css/index.css +616 -39
- package/esm/button/style/index.less +135 -25
- package/esm/carousel/demo/style/css/mobile.css +514 -0
- package/esm/carousel/demo/style/mobile.less +33 -0
- package/esm/carousel/style/css/index.css +525 -3
- package/esm/carousel/style/index.less +55 -0
- package/esm/cell/demo/style/css/mobile.css +521 -0
- package/esm/cell/demo/style/mobile.less +46 -0
- package/esm/cell/style/css/index.css +707 -2
- package/esm/cell/style/index.less +96 -0
- package/esm/checkbox/demo/style/css/mobile.css +510 -0
- package/esm/checkbox/demo/style/mobile.less +25 -0
- package/esm/checkbox/style/css/index.css +535 -4
- package/esm/checkbox/style/index.less +61 -0
- package/esm/circle-progress/demo/style/css/mobile.css +510 -0
- package/esm/circle-progress/demo/style/mobile.less +25 -0
- package/esm/circle-progress/style/css/index.css +527 -3
- package/esm/circle-progress/style/index.less +49 -0
- package/esm/collapse/demo/style/css/mobile.css +510 -0
- package/esm/collapse/demo/style/mobile.less +25 -0
- package/esm/collapse/style/css/index.css +557 -1
- package/esm/collapse/style/index.less +53 -0
- package/esm/context-provider/demo/style/css/mobile.css +510 -0
- package/esm/context-provider/demo/style/mobile.less +25 -0
- package/esm/context-provider/index.d.ts +10 -3
- package/esm/context-provider/index.js +41 -8
- package/esm/count-down/demo/style/css/mobile.css +518 -2
- package/esm/count-down/demo/style/mobile.less +39 -0
- package/esm/count-down/style/css/index.css +513 -0
- package/esm/count-down/style/index.less +30 -0
- package/esm/date-picker/demo/style/css/mobile.css +510 -0
- package/esm/date-picker/demo/style/mobile.less +25 -0
- package/esm/date-picker/style/css/index.css +510 -0
- package/esm/date-picker/style/index.less +25 -0
- package/esm/dialog/demo/style/css/mobile.css +520 -1
- package/esm/dialog/demo/style/mobile.less +44 -0
- package/esm/dialog/style/css/index.css +645 -4
- package/esm/dialog/style/index.less +102 -0
- package/esm/divider/demo/style/css/mobile.css +510 -1
- package/esm/divider/demo/style/mobile.less +26 -2
- package/esm/divider/style/css/index.css +516 -0
- package/esm/divider/style/index.less +44 -9
- package/esm/dropdown/demo/style/css/mobile.css +510 -0
- package/esm/dropdown/demo/style/mobile.less +25 -0
- package/esm/dropdown/style/css/index.css +542 -6
- package/esm/dropdown/style/index.less +69 -0
- package/esm/dropdown-menu/demo/style/css/mobile.css +510 -0
- package/esm/dropdown-menu/demo/style/mobile.less +25 -0
- package/esm/dropdown-menu/style/css/index.css +566 -3
- package/esm/dropdown-menu/style/index.less +62 -0
- package/esm/ellipsis/demo/style/css/mobile.css +519 -1
- package/esm/ellipsis/demo/style/mobile.less +39 -0
- package/esm/ellipsis/style/css/index.css +514 -0
- package/esm/ellipsis/style/index.less +32 -0
- package/esm/form/style/css/index.css +538 -5
- package/esm/form/style/index.less +66 -3
- package/esm/grid/demo/style/css/mobile.css +525 -3
- package/esm/grid/demo/style/mobile.less +47 -0
- package/esm/grid/style/css/index.css +519 -0
- package/esm/grid/style/index.less +48 -0
- package/esm/image/demo/style/css/mobile.css +510 -0
- package/esm/image/demo/style/mobile.less +25 -0
- package/esm/image/style/css/index.css +551 -7
- package/esm/image/style/index.less +54 -0
- package/esm/image-picker/demo/style/css/mobile.css +510 -0
- package/esm/image-picker/demo/style/mobile.less +25 -0
- package/esm/image-picker/style/css/index.css +529 -4
- package/esm/image-picker/style/index.less +54 -0
- package/esm/image-preview/demo/style/css/mobile.css +510 -0
- package/esm/image-preview/demo/style/mobile.less +25 -0
- package/esm/image-preview/style/css/index.css +530 -5
- package/esm/image-preview/style/index.less +37 -0
- package/esm/index-bar/demo/style/css/mobile.css +510 -0
- package/esm/index-bar/demo/style/mobile.less +25 -0
- package/esm/index-bar/style/css/index.css +572 -8
- package/esm/index-bar/style/index.less +67 -0
- package/esm/input/demo/style/css/mobile.css +514 -1
- package/esm/input/demo/style/mobile.less +32 -0
- package/esm/input/style/css/index.css +589 -2
- package/esm/input/style/index.less +87 -0
- package/esm/keyboard/demo/style/css/mobile.css +516 -0
- package/esm/keyboard/demo/style/mobile.less +35 -1
- package/esm/keyboard/style/css/index.css +526 -2
- package/esm/keyboard/style/index.less +51 -0
- package/esm/load-more/demo/style/css/mobile.css +513 -0
- package/esm/load-more/demo/style/mobile.less +30 -0
- package/esm/load-more/style/css/index.css +513 -0
- package/esm/load-more/style/index.less +30 -0
- package/esm/loading/demo/style/css/mobile.css +510 -0
- package/esm/loading/demo/style/mobile.less +25 -0
- package/esm/loading/style/css/index.css +534 -5
- package/esm/loading/style/index.less +45 -0
- package/esm/masking/demo/style/css/mobile.css +514 -1
- package/esm/masking/demo/style/mobile.less +30 -0
- package/esm/masking/style/css/index.css +510 -0
- package/esm/masking/style/index.less +25 -0
- package/esm/nav-bar/demo/style/css/mobile.css +514 -1
- package/esm/nav-bar/demo/style/mobile.less +33 -1
- package/esm/nav-bar/style/css/index.css +550 -1
- package/esm/nav-bar/style/index.less +38 -0
- package/esm/notice-bar/style/css/index.css +520 -2
- package/esm/notice-bar/style/index.less +36 -0
- package/esm/notify/demo/style/css/mobile.css +510 -0
- package/esm/notify/demo/style/mobile.less +25 -0
- package/esm/notify/style/css/index.css +529 -4
- package/esm/notify/style/index.less +50 -0
- package/esm/pagination/demo/style/css/index.css +510 -0
- package/esm/pagination/demo/style/index.less +25 -0
- package/esm/pagination/style/css/index.css +543 -4
- package/esm/pagination/style/index.less +72 -0
- package/esm/picker/demo/style/css/mobile.css +510 -0
- package/esm/picker/demo/style/mobile.less +25 -0
- package/esm/picker/style/css/index.css +525 -3
- package/esm/picker/style/index.less +49 -0
- package/esm/picker-view/demo/style/css/mobile.css +510 -0
- package/esm/picker-view/demo/style/mobile.less +25 -0
- package/esm/picker-view/style/css/index.css +587 -0
- package/esm/picker-view/style/index.less +50 -0
- package/esm/popover/demo/style/css/mobile.css +510 -0
- package/esm/popover/demo/style/mobile.less +25 -0
- package/esm/popover/style/css/index.css +614 -4
- package/esm/popover/style/css/menu.css +539 -1
- package/esm/popover/style/index.less +126 -9
- package/esm/popover/style/menu.less +69 -0
- package/esm/popup/demo/style/css/mobile.css +517 -0
- package/esm/popup/demo/style/mobile.less +38 -0
- package/esm/popup/style/css/index.css +514 -1
- package/esm/popup/style/index.less +32 -0
- package/esm/popup-swiper/demo/style/css/mobile.css +517 -0
- package/esm/popup-swiper/demo/style/mobile.less +38 -0
- package/esm/popup-swiper/style/css/index.css +510 -0
- package/esm/popup-swiper/style/index.less +25 -0
- package/esm/portal/demo/style/css/mobile.css +515 -1
- package/esm/portal/demo/style/mobile.less +31 -0
- package/esm/progress/demo/style/css/mobile.css +510 -0
- package/esm/progress/demo/style/mobile.less +25 -0
- package/esm/progress/style/css/index.css +556 -8
- package/esm/progress/style/index.less +91 -0
- package/esm/pull-refresh/demo/style/css/mobile.css +514 -2
- package/esm/pull-refresh/demo/style/mobile.less +35 -2
- package/esm/pull-refresh/style/css/index.css +536 -3
- package/esm/pull-refresh/style/index.less +45 -0
- package/esm/radio/demo/style/css/mobile.css +513 -0
- package/esm/radio/demo/style/mobile.less +32 -0
- package/esm/radio/style/css/index.css +535 -4
- package/esm/radio/style/index.less +61 -0
- package/esm/rate/demo/style/css/mobile.css +510 -0
- package/esm/rate/demo/style/mobile.less +25 -0
- package/esm/rate/style/css/index.css +522 -2
- package/esm/rate/style/index.less +43 -0
- package/esm/search-bar/demo/style/css/mobile.css +516 -1
- package/esm/search-bar/demo/style/mobile.less +39 -5
- package/esm/search-bar/style/css/index.css +586 -6
- package/esm/search-bar/style/index.less +84 -0
- package/esm/show-monitor/demo/style/css/mobile.css +521 -2
- package/esm/show-monitor/demo/style/mobile.less +43 -1
- package/esm/skeleton/demo/style/css/mobile.css +510 -0
- package/esm/skeleton/demo/style/mobile.less +25 -0
- package/esm/skeleton/style/css/index.css +517 -1
- package/esm/skeleton/style/index.less +35 -0
- package/esm/slider/demo/style/css/mobile.css +514 -1
- package/esm/slider/demo/style/mobile.less +34 -0
- package/esm/slider/style/css/index.css +542 -5
- package/esm/slider/style/index.less +74 -0
- package/esm/stepper/demo/style/css/mobile.css +510 -0
- package/esm/stepper/demo/style/mobile.less +25 -1
- package/esm/stepper/style/css/index.css +551 -7
- package/esm/stepper/style/index.less +84 -3
- package/esm/steps/demo/style/css/mobile.css +544 -4
- package/esm/steps/demo/style/mobile.less +41 -3
- package/esm/steps/style/css/index.css +580 -9
- package/esm/steps/style/index.less +138 -0
- package/esm/steps/type.d.ts +1 -1
- package/esm/sticky/demo/style/css/mobile.css +515 -2
- package/esm/sticky/demo/style/mobile.less +34 -2
- package/esm/sticky/style/css/index.css +510 -0
- package/esm/sticky/style/index.less +25 -0
- package/esm/swipe-action/demo/style/css/mobile.css +510 -0
- package/esm/swipe-action/demo/style/mobile.less +25 -0
- package/esm/swipe-action/style/css/index.css +518 -2
- package/esm/swipe-action/style/index.less +43 -0
- package/esm/swipe-load/demo/style/css/mobile.css +539 -5
- package/esm/swipe-load/demo/style/mobile.less +64 -0
- package/esm/swipe-load/style/css/index.css +517 -1
- package/esm/swipe-load/style/index.less +37 -0
- package/esm/switch/demo/style/css/mobile.css +515 -1
- package/esm/switch/demo/style/mobile.less +35 -0
- package/esm/switch/style/css/index.css +532 -4
- package/esm/switch/style/index.less +59 -0
- package/esm/tab-bar/demo/style/css/mobile.css +510 -0
- package/esm/tab-bar/demo/style/mobile.less +25 -0
- package/esm/tab-bar/style/css/index.css +517 -1
- package/esm/tab-bar/style/index.less +37 -0
- package/esm/tabs/demo/style/css/mobile.css +542 -5
- package/esm/tabs/demo/style/mobile.less +75 -0
- package/esm/tabs/style/css/index.css +618 -13
- package/esm/tabs/style/index.less +123 -0
- package/esm/tabs/tab-cell.js +1 -1
- package/esm/tag/demo/style/css/mobile.css +510 -0
- package/esm/tag/demo/style/mobile.less +25 -0
- package/esm/tag/style/css/index.css +538 -10
- package/esm/tag/style/index.less +55 -0
- package/esm/textarea/demo/style/css/mobile.css +514 -1
- package/esm/textarea/demo/style/mobile.less +32 -1
- package/esm/textarea/style/css/index.css +527 -2
- package/esm/textarea/style/index.less +47 -0
- package/esm/toast/demo/style/css/mobile.css +510 -0
- package/esm/toast/demo/style/mobile.less +25 -0
- package/esm/toast/style/css/index.css +530 -5
- package/esm/toast/style/index.less +37 -0
- package/esm/transition/demo/style/css/mobile.css +510 -0
- package/esm/transition/demo/style/mobile.less +25 -0
- package/esm/transition/style/css/index.css +510 -0
- package/esm/transition/style/index.less +25 -0
- package/less-loader.config.js +6 -0
- package/package.json +3 -3
- package/style/css/public.css +510 -0
- package/tokens/app/arcodesign/default/css-variables.less +357 -103
- package/tokens/app/arcodesign/default/index.d.ts +257 -3
- package/tokens/app/arcodesign/default/index.js +357 -103
- package/tokens/app/arcodesign/default/index.json +2574 -526
- package/tokens/app/arcodesign/default/index.less +357 -103
- package/tokens/mixin/index.less +255 -1
- package/umd/_helpers/hooks.d.ts +242 -2
- package/umd/_helpers/hooks.js +267 -10
- package/umd/_helpers/index.d.ts +78 -1
- package/umd/_helpers/index.js +89 -10
- package/umd/action-sheet/demo/style/css/mobile.css +514 -1
- package/umd/action-sheet/demo/style/mobile.less +32 -0
- package/umd/action-sheet/style/css/index.css +597 -2
- package/umd/action-sheet/style/index.less +62 -0
- package/umd/avatar/demo/style/css/mobile.css +518 -1
- package/umd/avatar/demo/style/mobile.less +41 -1
- package/umd/avatar/style/css/index.css +529 -3
- package/umd/avatar/style/index.less +54 -1
- package/umd/badge/demo/style/css/mobile.css +520 -1
- package/umd/badge/demo/style/mobile.less +40 -0
- package/umd/badge/style/css/index.css +518 -1
- package/umd/badge/style/index.less +36 -0
- package/umd/button/demo/style/css/mobile.css +510 -0
- package/umd/button/demo/style/mobile.less +25 -0
- package/umd/button/style/css/index.css +616 -39
- package/umd/button/style/index.less +135 -25
- package/umd/carousel/demo/style/css/mobile.css +514 -0
- package/umd/carousel/demo/style/mobile.less +33 -0
- package/umd/carousel/style/css/index.css +525 -3
- package/umd/carousel/style/index.less +55 -0
- package/umd/cell/demo/style/css/mobile.css +521 -0
- package/umd/cell/demo/style/mobile.less +46 -0
- package/umd/cell/style/css/index.css +707 -2
- package/umd/cell/style/index.less +96 -0
- package/umd/checkbox/demo/style/css/mobile.css +510 -0
- package/umd/checkbox/demo/style/mobile.less +25 -0
- package/umd/checkbox/style/css/index.css +535 -4
- package/umd/checkbox/style/index.less +61 -0
- package/umd/circle-progress/demo/style/css/mobile.css +510 -0
- package/umd/circle-progress/demo/style/mobile.less +25 -0
- package/umd/circle-progress/style/css/index.css +527 -3
- package/umd/circle-progress/style/index.less +49 -0
- package/umd/collapse/demo/style/css/mobile.css +510 -0
- package/umd/collapse/demo/style/mobile.less +25 -0
- package/umd/collapse/style/css/index.css +557 -1
- package/umd/collapse/style/index.less +53 -0
- package/umd/context-provider/demo/style/css/mobile.css +510 -0
- package/umd/context-provider/demo/style/mobile.less +25 -0
- package/umd/context-provider/index.d.ts +10 -3
- package/umd/context-provider/index.js +40 -7
- package/umd/count-down/demo/style/css/mobile.css +518 -2
- package/umd/count-down/demo/style/mobile.less +39 -0
- package/umd/count-down/style/css/index.css +513 -0
- package/umd/count-down/style/index.less +30 -0
- package/umd/date-picker/demo/style/css/mobile.css +510 -0
- package/umd/date-picker/demo/style/mobile.less +25 -0
- package/umd/date-picker/style/css/index.css +510 -0
- package/umd/date-picker/style/index.less +25 -0
- package/umd/dialog/demo/style/css/mobile.css +520 -1
- package/umd/dialog/demo/style/mobile.less +44 -0
- package/umd/dialog/style/css/index.css +645 -4
- package/umd/dialog/style/index.less +102 -0
- package/umd/divider/demo/style/css/mobile.css +510 -1
- package/umd/divider/demo/style/mobile.less +26 -2
- package/umd/divider/style/css/index.css +516 -0
- package/umd/divider/style/index.less +44 -9
- package/umd/dropdown/demo/style/css/mobile.css +510 -0
- package/umd/dropdown/demo/style/mobile.less +25 -0
- package/umd/dropdown/style/css/index.css +542 -6
- package/umd/dropdown/style/index.less +69 -0
- package/umd/dropdown-menu/demo/style/css/mobile.css +510 -0
- package/umd/dropdown-menu/demo/style/mobile.less +25 -0
- package/umd/dropdown-menu/style/css/index.css +566 -3
- package/umd/dropdown-menu/style/index.less +62 -0
- package/umd/ellipsis/demo/style/css/mobile.css +519 -1
- package/umd/ellipsis/demo/style/mobile.less +39 -0
- package/umd/ellipsis/style/css/index.css +514 -0
- package/umd/ellipsis/style/index.less +32 -0
- package/umd/form/style/css/index.css +538 -5
- package/umd/form/style/index.less +66 -3
- package/umd/grid/demo/style/css/mobile.css +525 -3
- package/umd/grid/demo/style/mobile.less +47 -0
- package/umd/grid/style/css/index.css +519 -0
- package/umd/grid/style/index.less +48 -0
- package/umd/image/demo/style/css/mobile.css +510 -0
- package/umd/image/demo/style/mobile.less +25 -0
- package/umd/image/style/css/index.css +551 -7
- package/umd/image/style/index.less +54 -0
- package/umd/image-picker/demo/style/css/mobile.css +510 -0
- package/umd/image-picker/demo/style/mobile.less +25 -0
- package/umd/image-picker/style/css/index.css +529 -4
- package/umd/image-picker/style/index.less +54 -0
- package/umd/image-preview/demo/style/css/mobile.css +510 -0
- package/umd/image-preview/demo/style/mobile.less +25 -0
- package/umd/image-preview/style/css/index.css +530 -5
- package/umd/image-preview/style/index.less +37 -0
- package/umd/index-bar/demo/style/css/mobile.css +510 -0
- package/umd/index-bar/demo/style/mobile.less +25 -0
- package/umd/index-bar/style/css/index.css +572 -8
- package/umd/index-bar/style/index.less +67 -0
- package/umd/input/demo/style/css/mobile.css +514 -1
- package/umd/input/demo/style/mobile.less +32 -0
- package/umd/input/style/css/index.css +589 -2
- package/umd/input/style/index.less +87 -0
- package/umd/keyboard/demo/style/css/mobile.css +516 -0
- package/umd/keyboard/demo/style/mobile.less +35 -1
- package/umd/keyboard/style/css/index.css +526 -2
- package/umd/keyboard/style/index.less +51 -0
- package/umd/load-more/demo/style/css/mobile.css +513 -0
- package/umd/load-more/demo/style/mobile.less +30 -0
- package/umd/load-more/style/css/index.css +513 -0
- package/umd/load-more/style/index.less +30 -0
- package/umd/loading/demo/style/css/mobile.css +510 -0
- package/umd/loading/demo/style/mobile.less +25 -0
- package/umd/loading/style/css/index.css +534 -5
- package/umd/loading/style/index.less +45 -0
- package/umd/masking/demo/style/css/mobile.css +514 -1
- package/umd/masking/demo/style/mobile.less +30 -0
- package/umd/masking/style/css/index.css +510 -0
- package/umd/masking/style/index.less +25 -0
- package/umd/nav-bar/demo/style/css/mobile.css +514 -1
- package/umd/nav-bar/demo/style/mobile.less +33 -1
- package/umd/nav-bar/style/css/index.css +550 -1
- package/umd/nav-bar/style/index.less +38 -0
- package/umd/notice-bar/style/css/index.css +520 -2
- package/umd/notice-bar/style/index.less +36 -0
- package/umd/notify/demo/style/css/mobile.css +510 -0
- package/umd/notify/demo/style/mobile.less +25 -0
- package/umd/notify/style/css/index.css +529 -4
- package/umd/notify/style/index.less +50 -0
- package/umd/pagination/demo/style/css/index.css +510 -0
- package/umd/pagination/demo/style/index.less +25 -0
- package/umd/pagination/style/css/index.css +543 -4
- package/umd/pagination/style/index.less +72 -0
- package/umd/picker/demo/style/css/mobile.css +510 -0
- package/umd/picker/demo/style/mobile.less +25 -0
- package/umd/picker/style/css/index.css +525 -3
- package/umd/picker/style/index.less +49 -0
- package/umd/picker-view/demo/style/css/mobile.css +510 -0
- package/umd/picker-view/demo/style/mobile.less +25 -0
- package/umd/picker-view/style/css/index.css +587 -0
- package/umd/picker-view/style/index.less +50 -0
- package/umd/popover/demo/style/css/mobile.css +510 -0
- package/umd/popover/demo/style/mobile.less +25 -0
- package/umd/popover/style/css/index.css +614 -4
- package/umd/popover/style/css/menu.css +539 -1
- package/umd/popover/style/index.less +126 -9
- package/umd/popover/style/menu.less +69 -0
- package/umd/popup/demo/style/css/mobile.css +517 -0
- package/umd/popup/demo/style/mobile.less +38 -0
- package/umd/popup/style/css/index.css +514 -1
- package/umd/popup/style/index.less +32 -0
- package/umd/popup-swiper/demo/style/css/mobile.css +517 -0
- package/umd/popup-swiper/demo/style/mobile.less +38 -0
- package/umd/popup-swiper/style/css/index.css +510 -0
- package/umd/popup-swiper/style/index.less +25 -0
- package/umd/portal/demo/style/css/mobile.css +515 -1
- package/umd/portal/demo/style/mobile.less +31 -0
- package/umd/progress/demo/style/css/mobile.css +510 -0
- package/umd/progress/demo/style/mobile.less +25 -0
- package/umd/progress/style/css/index.css +556 -8
- package/umd/progress/style/index.less +91 -0
- package/umd/pull-refresh/demo/style/css/mobile.css +514 -2
- package/umd/pull-refresh/demo/style/mobile.less +35 -2
- package/umd/pull-refresh/style/css/index.css +536 -3
- package/umd/pull-refresh/style/index.less +45 -0
- package/umd/radio/demo/style/css/mobile.css +513 -0
- package/umd/radio/demo/style/mobile.less +32 -0
- package/umd/radio/style/css/index.css +535 -4
- package/umd/radio/style/index.less +61 -0
- package/umd/rate/demo/style/css/mobile.css +510 -0
- package/umd/rate/demo/style/mobile.less +25 -0
- package/umd/rate/style/css/index.css +522 -2
- package/umd/rate/style/index.less +43 -0
- package/umd/search-bar/demo/style/css/mobile.css +516 -1
- package/umd/search-bar/demo/style/mobile.less +39 -5
- package/umd/search-bar/style/css/index.css +586 -6
- package/umd/search-bar/style/index.less +84 -0
- package/umd/show-monitor/demo/style/css/mobile.css +521 -2
- package/umd/show-monitor/demo/style/mobile.less +43 -1
- package/umd/skeleton/demo/style/css/mobile.css +510 -0
- package/umd/skeleton/demo/style/mobile.less +25 -0
- package/umd/skeleton/style/css/index.css +517 -1
- package/umd/skeleton/style/index.less +35 -0
- package/umd/slider/demo/style/css/mobile.css +514 -1
- package/umd/slider/demo/style/mobile.less +34 -0
- package/umd/slider/style/css/index.css +542 -5
- package/umd/slider/style/index.less +74 -0
- package/umd/stepper/demo/style/css/mobile.css +510 -0
- package/umd/stepper/demo/style/mobile.less +25 -1
- package/umd/stepper/style/css/index.css +551 -7
- package/umd/stepper/style/index.less +84 -3
- package/umd/steps/demo/style/css/mobile.css +544 -4
- package/umd/steps/demo/style/mobile.less +41 -3
- package/umd/steps/style/css/index.css +580 -9
- package/umd/steps/style/index.less +138 -0
- package/umd/steps/type.d.ts +1 -1
- package/umd/sticky/demo/style/css/mobile.css +515 -2
- package/umd/sticky/demo/style/mobile.less +34 -2
- package/umd/sticky/style/css/index.css +510 -0
- package/umd/sticky/style/index.less +25 -0
- package/umd/swipe-action/demo/style/css/mobile.css +510 -0
- package/umd/swipe-action/demo/style/mobile.less +25 -0
- package/umd/swipe-action/style/css/index.css +518 -2
- package/umd/swipe-action/style/index.less +43 -0
- package/umd/swipe-load/demo/style/css/mobile.css +539 -5
- package/umd/swipe-load/demo/style/mobile.less +64 -0
- package/umd/swipe-load/style/css/index.css +517 -1
- package/umd/swipe-load/style/index.less +37 -0
- package/umd/switch/demo/style/css/mobile.css +515 -1
- package/umd/switch/demo/style/mobile.less +35 -0
- package/umd/switch/style/css/index.css +532 -4
- package/umd/switch/style/index.less +59 -0
- package/umd/tab-bar/demo/style/css/mobile.css +510 -0
- package/umd/tab-bar/demo/style/mobile.less +25 -0
- package/umd/tab-bar/style/css/index.css +517 -1
- package/umd/tab-bar/style/index.less +37 -0
- package/umd/tabs/demo/style/css/mobile.css +542 -5
- package/umd/tabs/demo/style/mobile.less +75 -0
- package/umd/tabs/style/css/index.css +618 -13
- package/umd/tabs/style/index.less +123 -0
- package/umd/tabs/tab-cell.js +1 -1
- package/umd/tag/demo/style/css/mobile.css +510 -0
- package/umd/tag/demo/style/mobile.less +25 -0
- package/umd/tag/style/css/index.css +538 -10
- package/umd/tag/style/index.less +55 -0
- package/umd/textarea/demo/style/css/mobile.css +514 -1
- package/umd/textarea/demo/style/mobile.less +32 -1
- package/umd/textarea/style/css/index.css +527 -2
- package/umd/textarea/style/index.less +47 -0
- package/umd/toast/demo/style/css/mobile.css +510 -0
- package/umd/toast/demo/style/mobile.less +25 -0
- package/umd/toast/style/css/index.css +530 -5
- package/umd/toast/style/index.less +37 -0
- package/umd/transition/demo/style/css/mobile.css +510 -0
- package/umd/transition/demo/style/mobile.less +25 -0
- package/umd/transition/style/css/index.css +510 -0
- package/umd/transition/style/index.less +25 -0
package/tokens/mixin/index.less
CHANGED
@@ -1,7 +1,29 @@
|
|
1
|
+
/**
|
2
|
+
* @type mixin-var
|
3
|
+
* @name GeneralMixinVars
|
4
|
+
* @name_en General Mixin
|
5
|
+
*/
|
1
6
|
@import '~@arco-design/mobile-utils/style/mixin.less';
|
2
7
|
@import './vars-switch.less';
|
3
8
|
@import './pxtorem.less';
|
4
9
|
|
10
|
+
/**
|
11
|
+
* 根据base-font-size,设置单位尺寸为rem
|
12
|
+
* @desc {en} set the unit size to rem based on base-font-size
|
13
|
+
* @param @property css属性名
|
14
|
+
* @param @property {en} css property
|
15
|
+
* @param @values css属性值,如果为复合属性,值可以用逗号分隔开
|
16
|
+
* @param @values {en} css property value, the values can be separated by commas when the style is composite
|
17
|
+
* @example
|
18
|
+
* ```
|
19
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
20
|
+
*
|
21
|
+
* .demo {
|
22
|
+
* .rem(font-size, 14);
|
23
|
+
* .rem(padding, 16, 0);
|
24
|
+
* }
|
25
|
+
* ```
|
26
|
+
*/
|
5
27
|
.rem(@property; @values...) {
|
6
28
|
@{property}: ~`(function () {
|
7
29
|
var baseFontSize=@{base-font-size};
|
@@ -15,6 +37,23 @@
|
|
15
37
|
}())`;
|
16
38
|
}
|
17
39
|
|
40
|
+
/**
|
41
|
+
* 根据base-font-size,设置常规模式和rtl模式下单位尺寸为rem
|
42
|
+
* @desc {en} set the unit size to rem for regular and RTL modes based on the base-font-size
|
43
|
+
* @param @property css属性名
|
44
|
+
* @param @property {en} css property
|
45
|
+
* @param @values css属性值,如果为复合属性,值可以用逗号分隔开
|
46
|
+
* @param @values {en} css property value, the values can be separated by commas when the style is composite
|
47
|
+
* @example
|
48
|
+
* ```
|
49
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
50
|
+
*
|
51
|
+
* .demo {
|
52
|
+
* .rem-with-rtl(font-size, 14);
|
53
|
+
* .rem-with-rtl(padding, 16, 0);
|
54
|
+
* }
|
55
|
+
* ```
|
56
|
+
*/
|
18
57
|
.rem-with-rtl(@property; @values...) {
|
19
58
|
.rem(@property; @values...);
|
20
59
|
[dir="rtl"] & {
|
@@ -24,7 +63,22 @@
|
|
24
63
|
}
|
25
64
|
}
|
26
65
|
|
27
|
-
|
66
|
+
/**
|
67
|
+
* 当less变量use-dark-mode=1时,为原生暗黑模式媒体查询事件prefers-color-scheme:dark绑定对应css规则
|
68
|
+
* @desc {en} bind corresponding CSS rules to the native dark mode media query event prefers-color-scheme: dark when the less variable use-dark-mode=1.
|
69
|
+
* @param @rules 对应的暗黑模式规则
|
70
|
+
* @param @rules {en} Corresponding dark mode rules
|
71
|
+
* @example
|
72
|
+
* ```
|
73
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
74
|
+
*
|
75
|
+
* .demo {
|
76
|
+
* .use-dark-mode-query({
|
77
|
+
* background-color: #000;
|
78
|
+
* });
|
79
|
+
* }
|
80
|
+
* ```
|
81
|
+
*/
|
28
82
|
.use-dark-mode-query(@rules) {
|
29
83
|
& when (@use-dark-mode = 1) {
|
30
84
|
@media (prefers-color-scheme: dark) {
|
@@ -33,6 +87,28 @@
|
|
33
87
|
}
|
34
88
|
}
|
35
89
|
|
90
|
+
/**
|
91
|
+
* 为属性设置arco提供的token变量
|
92
|
+
* @desc {en} set the token variable provided by Arco for the attribute
|
93
|
+
* @param @property css属性名
|
94
|
+
* @param @property {en} css property
|
95
|
+
* @param @variables token变量名
|
96
|
+
* @param @variables {en} token variable name
|
97
|
+
* @param @preValues 复合属性css变量前缀
|
98
|
+
* @param @preValues {en} prefix for Compound Attribute CSS Variables
|
99
|
+
* @param @nextValues 复合属性css变量后缀
|
100
|
+
* @param @nextValues {en} suffix for Compound Attribute CSS Variables
|
101
|
+
* @example
|
102
|
+
* ```
|
103
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
104
|
+
*
|
105
|
+
* .demo {
|
106
|
+
* .use-var(background, primary-color);
|
107
|
+
* .use-var(border, primary-color, 1px solid);
|
108
|
+
* .use-var(border, cell-border-width, '', solid black);
|
109
|
+
* }
|
110
|
+
* ```
|
111
|
+
*/
|
36
112
|
.use-var(@property, @variables, @preValues: '', @nextValues: '') {
|
37
113
|
@{property}: ~"@{preValues}" @@variables ~"@{nextValues}";
|
38
114
|
& when (@use-css-vars = 1) {
|
@@ -40,6 +116,26 @@
|
|
40
116
|
}
|
41
117
|
}
|
42
118
|
|
119
|
+
/**
|
120
|
+
* 在常规模式和rtl模式下为属性设置arco提供的token变量
|
121
|
+
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
122
|
+
* @param @property css属性名
|
123
|
+
* @param @property {en} css property
|
124
|
+
* @param @variables token变量名
|
125
|
+
* @param @variables {en} token variable name
|
126
|
+
* @param @preValues
|
127
|
+
* @param @preValues {en}
|
128
|
+
* @param @nextValues
|
129
|
+
* @param @nextValues {en}
|
130
|
+
* @example
|
131
|
+
* ```
|
132
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
133
|
+
*
|
134
|
+
* .demo {
|
135
|
+
* .use-var-with-rtl(margin-left, button-icon-text-gutter);
|
136
|
+
* }
|
137
|
+
* ```
|
138
|
+
*/
|
43
139
|
.use-var-with-rtl(@property, @variables, @preValues: '', @nextValues: '') {
|
44
140
|
.use-var(@property, @variables, @preValues, @nextValues);
|
45
141
|
[dir="rtl"] & {
|
@@ -49,6 +145,23 @@
|
|
49
145
|
}
|
50
146
|
}
|
51
147
|
|
148
|
+
/**
|
149
|
+
* 0.5px的边框线
|
150
|
+
* @desc {en} a border line of 0.5 pixels
|
151
|
+
* @param @color 使用css变量为线设置颜色
|
152
|
+
* @param @color {en} set border-color by CSS variable
|
153
|
+
* @param @direction 边框方向,默认为全部方向
|
154
|
+
* @param @direction {en} border direction,default to all directions.
|
155
|
+
* @example
|
156
|
+
* ```
|
157
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
158
|
+
*
|
159
|
+
* .demo {
|
160
|
+
* .hairline-var(line-color);
|
161
|
+
* .hairline-var(line-color, top);
|
162
|
+
* }
|
163
|
+
* ```
|
164
|
+
*/
|
52
165
|
.hairline-var(@color, @direction: all) {
|
53
166
|
.hairline(@@color, @direction);
|
54
167
|
& when (@use-css-vars = 1) {
|
@@ -56,6 +169,23 @@
|
|
56
169
|
}
|
57
170
|
}
|
58
171
|
|
172
|
+
/**
|
173
|
+
* 字体加粗
|
174
|
+
* @desc {en} font bold
|
175
|
+
* @param @color 使用css变量设置加粗的字体颜色,默认继承文字当前颜色
|
176
|
+
* @param @color {en} set color by CSS variable
|
177
|
+
* @param @stroke 字体粗细,默认0.3px
|
178
|
+
* @param @stroke {en} font weight, default 0.3 pixel
|
179
|
+
* @example
|
180
|
+
* ```
|
181
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
182
|
+
*
|
183
|
+
* .demo {
|
184
|
+
* .text-medium-var();
|
185
|
+
* .text-medium-var(primary-color, 0.5PX);
|
186
|
+
* }
|
187
|
+
* ```
|
188
|
+
*/
|
59
189
|
.text-medium-var(@color: currentColor, @stroke: 0.3PX) {
|
60
190
|
.text-medium(@@color, @stroke);
|
61
191
|
& when (@use-css-vars = 1) {
|
@@ -63,6 +193,29 @@
|
|
63
193
|
}
|
64
194
|
}
|
65
195
|
|
196
|
+
/**
|
197
|
+
* 1px边框
|
198
|
+
* @desc {en} 1 pixel border
|
199
|
+
* @param @direction 边框方向
|
200
|
+
* @param @direction {en} border direction
|
201
|
+
* @param @borderColor 使用css变量设置边框颜色
|
202
|
+
* @param @borderColor {en} set border-color by CSS variable
|
203
|
+
* @param @borderRadius border-radius,默认为0
|
204
|
+
* @param @borderRadius {en} border-radius, default value is 0
|
205
|
+
* @param @borderWidth border-width,默认为1px
|
206
|
+
* @param @borderWidth {en} border-width, default value is 1 pixel
|
207
|
+
* @param @borderStyle border-style,默认为solid
|
208
|
+
* @param @borderStyle {en} border-style, default value is solid
|
209
|
+
* @example
|
210
|
+
* ```
|
211
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
212
|
+
*
|
213
|
+
* .demo {
|
214
|
+
* .onepx-border-var(top, line-color);
|
215
|
+
* .onepx-border-var(all, line-color, 2, 2px, dashed);
|
216
|
+
* }
|
217
|
+
* ```
|
218
|
+
*/
|
66
219
|
.onepx-border-var(@direction, @borderColor, @borderRadius: 0, @borderWidth: 1PX, @borderStyle: solid) {
|
67
220
|
.onepx-border(@direction, @@borderColor, @borderRadius, @borderWidth, @borderStyle);
|
68
221
|
& when (@use-css-vars = 1) {
|
@@ -70,6 +223,20 @@
|
|
70
223
|
}
|
71
224
|
}
|
72
225
|
|
226
|
+
/**
|
227
|
+
* 元素右下0.5px边框
|
228
|
+
* @desc {en} 0.5px border on bottom right
|
229
|
+
* @param @color 使用css变量设置边框颜色
|
230
|
+
* @param @color {en} set border-color by CSS variable
|
231
|
+
* @example
|
232
|
+
* ```
|
233
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
234
|
+
*
|
235
|
+
* .demo {
|
236
|
+
* .hairline-bottom-right-var(line-color);
|
237
|
+
* }
|
238
|
+
* ```
|
239
|
+
*/
|
73
240
|
.hairline-bottom-right-var(@color) {
|
74
241
|
.hairline-bottom-right(@@color);
|
75
242
|
& when (@use-css-vars = 1) {
|
@@ -77,6 +244,20 @@
|
|
77
244
|
}
|
78
245
|
}
|
79
246
|
|
247
|
+
/**
|
248
|
+
* 元素左上0.5px边框
|
249
|
+
* @desc {en} 0.5px border on top left
|
250
|
+
* @param @color 使用css变量设置边框颜色
|
251
|
+
* @param @color {en} set border-color by CSS variable
|
252
|
+
* @example
|
253
|
+
* ```
|
254
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
255
|
+
*
|
256
|
+
* .demo {
|
257
|
+
* .hairline-top-left-var(line-color);
|
258
|
+
* }
|
259
|
+
* ```
|
260
|
+
*/
|
80
261
|
.hairline-top-left-var(@color) {
|
81
262
|
.hairline-top-left(@@color);
|
82
263
|
& when (@use-css-vars = 1) {
|
@@ -84,6 +265,20 @@
|
|
84
265
|
}
|
85
266
|
}
|
86
267
|
|
268
|
+
/**
|
269
|
+
* 设置Loading组件颜色
|
270
|
+
* @desc {en} set Loading component color
|
271
|
+
* @param @color 使用css变量设置颜色
|
272
|
+
* @param @color {en} set color by CSS variable
|
273
|
+
* @example
|
274
|
+
* ```
|
275
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
276
|
+
*
|
277
|
+
* .demo {
|
278
|
+
* .set-loading-color-var(primary-color);
|
279
|
+
* }
|
280
|
+
* ```
|
281
|
+
*/
|
87
282
|
.set-loading-color-var(@color) {
|
88
283
|
.set-loading-color(@@color);
|
89
284
|
& when (@use-css-vars = 1) {
|
@@ -91,6 +286,23 @@
|
|
91
286
|
}
|
92
287
|
}
|
93
288
|
|
289
|
+
/**
|
290
|
+
* 设置最小字号
|
291
|
+
* @desc {en} set minimum font-size
|
292
|
+
* @param @size 使用css变量设置最小字号
|
293
|
+
* @param @size {en} set minimum font-size by CSS variable
|
294
|
+
* @param @scale 设置最小字号下文字缩放比例,默认为0.9
|
295
|
+
* @param @scale {en} set minimum font-size down text scale,default value is 0.9
|
296
|
+
* @example
|
297
|
+
* ```
|
298
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
299
|
+
*
|
300
|
+
* .demo {
|
301
|
+
* .set-font-size-var(badge-font-size);
|
302
|
+
* .set-font-size-var(badge-font-size, 0.5);
|
303
|
+
* }
|
304
|
+
* ```
|
305
|
+
*/
|
94
306
|
.set-font-size-var(@size, @scale: 0.9) {
|
95
307
|
& when not (@use-css-vars = 1) {
|
96
308
|
.set-font-size(@@size);
|
@@ -106,6 +318,26 @@
|
|
106
318
|
}
|
107
319
|
}
|
108
320
|
|
321
|
+
/**
|
322
|
+
* 设置content-box盒模型下元素宽度
|
323
|
+
* @desc {en} set box width in content-box
|
324
|
+
* @param @property css属性名
|
325
|
+
* @param @property {en} css property
|
326
|
+
* @param @width 元素总宽度,包含内边距
|
327
|
+
* @param @width element width, include padding
|
328
|
+
* @param @padding-left 左侧内边距
|
329
|
+
* @param @padding-left {en} padding-left
|
330
|
+
* @param @padding-right 右侧内边距
|
331
|
+
* @param @padding-right {en} padding-right
|
332
|
+
* @example
|
333
|
+
* ```
|
334
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
335
|
+
*
|
336
|
+
* .demo {
|
337
|
+
* .set-content-box-width-var(min-width, badge-text-width, badge-text-padding-left, badge-text-padding-right);
|
338
|
+
* }
|
339
|
+
* ```
|
340
|
+
*/
|
109
341
|
.set-content-box-width-var(@property, @width, @padding-left, @padding-right) {
|
110
342
|
& when not (@use-css-vars = 1) {
|
111
343
|
.set-content-box-width(@property, @@width, @@padding-left, @@padding-right);
|
@@ -115,3 +347,25 @@
|
|
115
347
|
}
|
116
348
|
}
|
117
349
|
|
350
|
+
/**
|
351
|
+
* 设置Steps组件颜色
|
352
|
+
* @desc {en} set Steps component color
|
353
|
+
* @param @color 使用css变量设置主颜色
|
354
|
+
* @param @color {en} set main step color by CSS variable
|
355
|
+
* @param @finish-color 使用css变量设置已完成步骤的颜色
|
356
|
+
* @param @finish-color {en} set finished step color by CSS variable
|
357
|
+
* @example
|
358
|
+
* ```
|
359
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
360
|
+
*
|
361
|
+
* .demo {
|
362
|
+
* .set-steps-color-var(primary-color, lighter-primary-color);
|
363
|
+
* }
|
364
|
+
* ```
|
365
|
+
*/
|
366
|
+
.set-steps-color-var(@color, @finish-color) {
|
367
|
+
.set-steps-color(@@color, @@finish-color);
|
368
|
+
& when (@use-css-vars = 1) {
|
369
|
+
.set-steps-color(var(~"--@{color}", @@color), var(~"--@{finish-color}", @@finish-color));
|
370
|
+
}
|
371
|
+
}
|
package/umd/_helpers/hooks.d.ts
CHANGED
@@ -1,10 +1,26 @@
|
|
1
1
|
/**
|
2
2
|
* @type hooks
|
3
|
-
* @name
|
3
|
+
* @name GeneralHooks
|
4
4
|
* @name_en General Hooks
|
5
5
|
*/
|
6
6
|
import React from 'react';
|
7
7
|
import { BezierType } from '../progress';
|
8
|
+
/**
|
9
|
+
* 监听页面resize事件的统一封装
|
10
|
+
* @desc {en} Unified encapsulation for monitoring page resize events
|
11
|
+
* @param resizeHandler resize事件回调
|
12
|
+
* @param resizeHandler {en} Resize event callback
|
13
|
+
* @param deps 触发事件绑定更新的依赖
|
14
|
+
* @param deps {en} Dependencies that trigger event binding updates
|
15
|
+
* @param needListen 是否开启事件监听,默认开启
|
16
|
+
* @param needListen {en} Whether to enable event monitoring
|
17
|
+
* @example
|
18
|
+
* ```
|
19
|
+
* import { useListenResize } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
20
|
+
*
|
21
|
+
* useListenResize(setSize, [], listenResize);
|
22
|
+
* ```
|
23
|
+
*/
|
8
24
|
export declare function useListenResize(resizeHandler: () => void, deps?: any[], needListen?: boolean): void;
|
9
25
|
/**
|
10
26
|
* useState自定义封装,统一处理在组件卸载后还使用setState的行为
|
@@ -13,6 +29,7 @@ export declare function useListenResize(resizeHandler: () => void, deps?: any[],
|
|
13
29
|
* @desc {en} Tips: Use in scenarios where asynchronous processing is not completed after unmount. It is not recommended to replace useState without brains
|
14
30
|
* @param initialState 初始状态
|
15
31
|
* @param initialState {en} Initial State
|
32
|
+
* @returns [state, setState],同useState返回值
|
16
33
|
* @example
|
17
34
|
* ```
|
18
35
|
* import { useMountedState } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
@@ -21,13 +38,120 @@ export declare function useListenResize(resizeHandler: () => void, deps?: any[],
|
|
21
38
|
* ```
|
22
39
|
*/
|
23
40
|
export declare function useMountedState<S>(initialState: S | (() => S)): [S, React.Dispatch<React.SetStateAction<S>>];
|
41
|
+
/**
|
42
|
+
* 用useState管理状态,且在状态更新之前同步至ref,并返回ref
|
43
|
+
* @desc {en} Use useState to manage the state, and synchronize to ref before the state is updated, and return ref
|
44
|
+
* @param initialValue 初始状态
|
45
|
+
* @param initialValue {en} Initial State
|
46
|
+
* @returns [state, stateRef, setState]
|
47
|
+
* @example
|
48
|
+
* ```
|
49
|
+
* import { useSameRefState } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
50
|
+
*
|
51
|
+
* const [opened, openedRef, setOpened] = useSameRefState(false);
|
52
|
+
* ```
|
53
|
+
*/
|
24
54
|
export declare function useSameRefState<T>(initialValue: T): [T, React.MutableRefObject<T>, (data: T) => void];
|
55
|
+
/**
|
56
|
+
* 用useState管理状态,且在状态更新后同步至ref,并返回ref
|
57
|
+
* @desc {en} Use useState to manage the state, and synchronize to ref after the state is updated, and return ref
|
58
|
+
* @param initialValue 初始状态
|
59
|
+
* @param initialValue {en} Initial State
|
60
|
+
* @returns [state, stateRef, setState]
|
61
|
+
* @example
|
62
|
+
* ```
|
63
|
+
* import { useRefState } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
64
|
+
*
|
65
|
+
* const [index, indexRef, setIndex] = useRefState(currentIndex);
|
66
|
+
* ```
|
67
|
+
*/
|
25
68
|
export declare function useRefState<T>(initialValue: T | (() => T)): [T, React.MutableRefObject<T>, React.Dispatch<React.SetStateAction<T>>];
|
69
|
+
/**
|
70
|
+
* 用useState管理状态,且在状态更新后同步至ref,并返回ref,统一处理在组件卸载后还使用setState的行为
|
71
|
+
* @desc {en} Use useState to manage the state, and synchronize to ref after the state is updated, and return ref, and uniformly handle the behavior of using setState after the component is uninstalled
|
72
|
+
* @param initialValue 初始状态
|
73
|
+
* @param initialValue {en} Initial State
|
74
|
+
* @returns [state, stateRef, setState]
|
75
|
+
* @example
|
76
|
+
* ```
|
77
|
+
* import { useRefMountedState } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
78
|
+
*
|
79
|
+
* const [active, activeRef, setActive] = useRefMountedState(false);
|
80
|
+
* ```
|
81
|
+
*/
|
26
82
|
export declare function useRefMountedState<T>(initialValue: T | (() => T)): [T, React.MutableRefObject<T>, React.Dispatch<React.SetStateAction<T>>];
|
83
|
+
/**
|
84
|
+
* useEffect特殊封装,仅在非首次依赖更新时触发回调
|
85
|
+
* @desc {en} Special encapsulation of useEffect, which only triggers the callback when the dependency is not updated for the first time
|
86
|
+
* @param effect useEffect回调
|
87
|
+
* @param effect {en} useEffect callback
|
88
|
+
* @param dependencies useEffect依赖
|
89
|
+
* @param dependencies {en} useEffect dependencies
|
90
|
+
* @example
|
91
|
+
* ```
|
92
|
+
* import { useUpdateEffect } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
93
|
+
*
|
94
|
+
* useUpdateEffect(() => {
|
95
|
+
* handleIndexChange(index);
|
96
|
+
* }, [index]);
|
97
|
+
* ```
|
98
|
+
*/
|
27
99
|
export declare function useUpdateEffect(effect: () => void | (() => void), dependencies?: any[]): void;
|
100
|
+
/**
|
101
|
+
* 手动触发一次组件的rerender
|
102
|
+
* @desc {en} Manually trigger the rerender of the component once
|
103
|
+
* @example
|
104
|
+
* ```
|
105
|
+
* import { useForceUpdate } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
106
|
+
*
|
107
|
+
* const update = useForceUpdate();
|
108
|
+
*
|
109
|
+
* function forceUpdate() {
|
110
|
+
* update();
|
111
|
+
* }
|
112
|
+
* ```
|
113
|
+
*/
|
28
114
|
export declare function useForceUpdate(): () => void;
|
115
|
+
/**
|
116
|
+
* 获取任意变量的最新ref值(用于监听属性、方法等非state变量)
|
117
|
+
* @desc {en} Get the latest ref value of any variable (used to monitor non-state variables such as properties and methods)
|
118
|
+
* @param variable 待获取最新值的变量
|
119
|
+
* @param variable {en} Variable to get latest value
|
120
|
+
* @returns variableRef,变量的最新ref值
|
121
|
+
* @example
|
122
|
+
* ```
|
123
|
+
* import { useLatestRef } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
124
|
+
*
|
125
|
+
* const { wrapSize } = props;
|
126
|
+
* const wrapSizeRef = useLatestRef(wrapSize);
|
127
|
+
* ```
|
128
|
+
*/
|
29
129
|
export declare function useLatestRef<T>(variable: T): React.MutableRefObject<T>;
|
130
|
+
/**
|
131
|
+
* 从navigator.userAgent中获取当前操作系统,如果无法获取ua,则从ContextProvider传入的system中获取值
|
132
|
+
* @desc {en} Get the current operating system from navigator.userAgent, if ua cannot be obtained, get the value from the system passed in by ContextProvider
|
133
|
+
* @returns system 操作系统,"" | "pc" | "android" | "ios"
|
134
|
+
* @example
|
135
|
+
* ```
|
136
|
+
* import { useSystem } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
137
|
+
*
|
138
|
+
* const system = useSystem();
|
139
|
+
* ```
|
140
|
+
*/
|
30
141
|
export declare function useSystem(): "" | "android" | "ios" | "pc";
|
142
|
+
/**
|
143
|
+
* 获取页面视口宽高大小,并在页面有resize时更新大小
|
144
|
+
* @desc {en} Get the width and height of the page viewport, and update the size when the page is resized
|
145
|
+
* @param needListen 是否开启resize事件监听
|
146
|
+
* @param needListen {en} Whether to enable resize event monitoring
|
147
|
+
* @returns 页面宽高,{ windowWidth, windowHeight }
|
148
|
+
* @example
|
149
|
+
* ```
|
150
|
+
* import { useWindowSize } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
151
|
+
*
|
152
|
+
* const { windowHeight, windowWidth } = useWindowSize();
|
153
|
+
* ```
|
154
|
+
*/
|
31
155
|
export declare function useWindowSize(listenResize?: boolean): {
|
32
156
|
windowWidth: number;
|
33
157
|
windowHeight: number;
|
@@ -37,14 +161,130 @@ export interface PopupScrollRefType {
|
|
37
161
|
maxScrollX: number;
|
38
162
|
maxScrollY: number;
|
39
163
|
}
|
164
|
+
/**
|
165
|
+
* 弹窗中滚动统一处理,防止滚动穿透
|
166
|
+
* @desc {en} Unified processing of scrolling in pop-up windows to prevent scrolling penetration
|
167
|
+
* @param visible 弹窗是否被打开
|
168
|
+
* @param visible {en} Whether the popup is opened
|
169
|
+
* @param popupDom 弹窗的dom元素
|
170
|
+
* @param popupDom {en} DOM element of the popup
|
171
|
+
* @param getScrollContainer 弹窗中的滚动容器,可传入多个
|
172
|
+
* @param getScrollContainer {en} The scrolling container in the popup, which can pass in multiple
|
173
|
+
* @param orientationDirection 弹窗内容朝向,默认为top(从上到下),用于实现模拟横屏
|
174
|
+
* @param orientationDirection {en} The content orientation of the popup, the default is top (from top to bottom), which is used to simulate a horizontal screen
|
175
|
+
* @param preventCallback 在滚动穿透被阻止(preventDefault被触发)时的回调
|
176
|
+
* @param preventCallback {en} Callback when scrolling is blocked (preventDefault is triggered)
|
177
|
+
* @param onTouchMove touchmove 自定义事件
|
178
|
+
* @param onTouchMove {en} Touchmove custom event
|
179
|
+
* @param gestureOutOfControl 是否禁用滚动穿透处理
|
180
|
+
* @param gestureOutOfControl {en} Whether to disable scroll through processing
|
181
|
+
* @example
|
182
|
+
* ```
|
183
|
+
* import { usePopupScroll } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
184
|
+
*
|
185
|
+
* usePopupScroll(visible, domRef.current, getScrollContainer, orientationDirection, onPreventTouchMove, onTouchMove, gestureOutOfControl);
|
186
|
+
* ```
|
187
|
+
*/
|
40
188
|
export declare function usePopupScroll(visible: boolean, popupDom: HTMLDivElement | null, getScrollContainer?: () => (HTMLElement | null)[] | HTMLElement | null, orientationDirection?: 'top' | 'bottom' | 'left' | 'right', preventCallback?: (e: TouchEvent, direction: 'x' | 'y') => void, onTouchMove?: (e: TouchEvent, prevented: boolean, direction: 'x' | 'y') => void, gestureOutOfControl?: boolean): void;
|
189
|
+
/**
|
190
|
+
* 在滑动类组件中,如果有内部可滚动区域,则在内部滚动区域滚动时禁用滑动事件
|
191
|
+
* @desc {en} In the sliding class component, if there is an inner scrollable area, the sliding event is disabled when the inner scrolling area is scrolled
|
192
|
+
* @param getInnerScrollContainer 内部可滚动区域,可传入多个
|
193
|
+
* @param getInnerScrollContainer {en} Inner scrollable area, can pass in multiple
|
194
|
+
* @example
|
195
|
+
* ```
|
196
|
+
* import { useSwiperInnerScroll } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
197
|
+
*
|
198
|
+
* useSwiperInnerScroll(getInnerScrollContainer);
|
199
|
+
* ```
|
200
|
+
*/
|
41
201
|
export declare function useSwiperInnerScroll(getInnerScrollContainer?: () => (HTMLElement | null)[] | HTMLElement | null): void;
|
202
|
+
/**
|
203
|
+
* 事件绑定统一封装
|
204
|
+
* @desc {en} Unified encapsulation of event binding
|
205
|
+
* @param dom 待绑定事件的dom元素
|
206
|
+
* @param dom {en} The dom element to be bound to the event
|
207
|
+
* @param event 待绑定事件名称
|
208
|
+
* @param event {en} The name of the event to be bound
|
209
|
+
* @param handler 待绑定事件回调
|
210
|
+
* @param handler {en} The callback of the event to be bound
|
211
|
+
* @param options 待绑定事件配置,默认为 { capture: true }
|
212
|
+
* @param options {en} Event configuration to be bound, the default is { capture: true }
|
213
|
+
* @example
|
214
|
+
* ```
|
215
|
+
* import { useAddListener } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
216
|
+
*
|
217
|
+
* useAddListener(domRef.current, 'touchstart', onTouchStart);
|
218
|
+
* useAddListener(domRef.current, 'touchend', onTouchEnd);
|
219
|
+
* ```
|
220
|
+
*/
|
42
221
|
export declare function useAddListener(dom: HTMLDivElement | null, event: string, handler: any, options?: {
|
43
222
|
capture: boolean;
|
44
223
|
}): void;
|
45
|
-
|
224
|
+
/**
|
225
|
+
* 在全屏组件出现时,将body的overflow设置为hidden,防止滚动穿透
|
226
|
+
* @desc {en} When the full screen component appears, set the overflow of the body to hidden to prevent scrolling penetration
|
227
|
+
* @param visible 全屏组件是否被打开
|
228
|
+
* @param visible {en} Whether the full screen component is opened
|
229
|
+
* @param preventBodyScroll 是否启用防滚动穿透,默认启用
|
230
|
+
* @param preventBodyScroll {en} Whether to enable anti-scroll penetration, enabled by default
|
231
|
+
* @param initialBodyOverflow body在初始状态下的overflow值,在全屏组件全部关闭后会还原
|
232
|
+
* @param initialBodyOverflow {en} The overflow value of the body in the initial state, which will be restored after all full-screen components are closed
|
233
|
+
* @example
|
234
|
+
* ```
|
235
|
+
* import { usePreventBodyScroll } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
236
|
+
*
|
237
|
+
* usePreventBodyScroll(visible, preventBodyScroll, initialBodyOverflow);
|
238
|
+
* ```
|
239
|
+
*/
|
240
|
+
export declare function usePreventBodyScroll(visible: boolean, preventBodyScroll?: boolean, initialBodyOverflow?: string): void;
|
241
|
+
/**
|
242
|
+
* 进度条计算公共逻辑,根据传入的参数计算出当前百分比和过渡效果开关,进度类组件内部使用
|
243
|
+
* @desc {en} Progress bar calculation common logic, used internally by the progress class component
|
244
|
+
* @returns [当前计算的百分比, 当前是否应有过渡效果]
|
245
|
+
* @example
|
246
|
+
* ```
|
247
|
+
* import { usePreventBodyScroll } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
248
|
+
*
|
249
|
+
* const [currentPercentage, transitionControl] = useProgress(mountedTransition, percentage, duration, mountedBezier, step);
|
250
|
+
* ```
|
251
|
+
*/
|
46
252
|
export declare function useProgress(mountedTransition: boolean, percentage: number, duration: number, mountedBezier: BezierType, step: number): [number, boolean];
|
253
|
+
/**
|
254
|
+
* 单击和双击事件统一处理
|
255
|
+
* @desc {en} Unified processing of single and double click events
|
256
|
+
* @param onClick 单击事件回调
|
257
|
+
* @param onClick {en} Callback of single click event
|
258
|
+
* @param onDoubleClick 双击事件回调
|
259
|
+
* @param onDoubleClick {en} Callback of double click event
|
260
|
+
* @param delay 两次点击被判定为双击事件的最大间隔时间
|
261
|
+
* @param delay {en} The maximum interval between two clicks is judged as a double-click event
|
262
|
+
* @returns clickHandler,统一后的事件处理方法
|
263
|
+
* @example
|
264
|
+
* ```
|
265
|
+
* import { useSingleAndDoubleClick } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
266
|
+
*
|
267
|
+
* const handleClick = useSingleAndDoubleClick(handleImageClick, handleImageDoubleClick);
|
268
|
+
* ```
|
269
|
+
*/
|
47
270
|
export declare function useSingleAndDoubleClick(onClick: (e: React.MouseEvent) => void, onDoubleClick: (e: React.MouseEvent) => void, delay?: number): (e: React.MouseEvent) => void;
|
271
|
+
/**
|
272
|
+
* 自动生成svg <def>标签的唯一标识,用于区分不同svg的<def>内容
|
273
|
+
* @desc {en} Automatically generate the unique identifier of the svg <def> tag, which is used to distinguish the <def> content of different svg
|
274
|
+
* @param userSetSvgKey 自定义唯一标识,传入则覆盖自动生成的值
|
275
|
+
* @param userSetSvgKey {en} Customize the unique identifier, if passed in, it will override the automatically generated value
|
276
|
+
* @returns 包含svgKey的对象 生成后的唯一标识
|
277
|
+
* @globalVariable
|
278
|
+
* ```
|
279
|
+
* let arcoSvgKeyCount = 0;
|
280
|
+
* ```
|
281
|
+
* @example
|
282
|
+
* ```
|
283
|
+
* import { useGenSvgKey } from '@arco-design/mobile-react/esm/_helpers/hooks';
|
284
|
+
*
|
285
|
+
* const { svgKey } = useGenSvgKey(userSetSvgKey);
|
286
|
+
* ```
|
287
|
+
*/
|
48
288
|
export declare function useGenSvgKey(userSetSvgKey: string): {
|
49
289
|
svgKey: string;
|
50
290
|
};
|