@arco-design/mobile-react 2.19.1 → 2.21.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 +53 -0
- package/README.en-US.md +6 -6
- package/README.md +6 -6
- package/cjs/_helpers/type.d.ts +1 -1
- package/cjs/avatar/group.js +1 -1
- package/cjs/avatar/index.d.ts +1 -1
- package/cjs/avatar/index.js +11 -14
- package/cjs/avatar/style/css/index.css +96 -126
- package/cjs/avatar/style/index.less +54 -72
- package/cjs/badge/index.d.ts +1 -1
- package/cjs/badge/index.js +7 -9
- package/cjs/badge/style/css/index.css +5 -5
- package/cjs/badge/style/index.less +5 -5
- package/cjs/button/hooks.d.ts +1 -2
- package/cjs/button/hooks.js +5 -3
- package/cjs/button/index.d.ts +6 -0
- package/cjs/button/index.js +38 -33
- package/cjs/button/style/css/index.css +75 -310
- package/cjs/button/style/index.less +32 -38
- package/cjs/carousel/index.d.ts +1 -1
- package/cjs/carousel/index.js +1 -1
- package/cjs/cell/index.d.ts +1 -1
- package/cjs/cell/index.js +1 -1
- package/cjs/checkbox/index.d.ts +1 -1
- package/cjs/checkbox/index.js +1 -1
- package/cjs/collapse/index.d.ts +1 -1
- package/cjs/collapse/index.js +1 -1
- package/cjs/count-down/demo/style/mobile.less +1 -1
- package/cjs/count-down/index.d.ts +1 -1
- package/cjs/count-down/index.js +1 -1
- package/cjs/date-picker/index.d.ts +1 -1
- package/cjs/date-picker/index.js +1 -1
- package/cjs/dropdown/dropdown.d.ts +3 -0
- package/cjs/dropdown/dropdown.js +322 -0
- package/cjs/dropdown/index.d.ts +3 -4
- package/cjs/dropdown/index.js +3 -303
- package/cjs/dropdown/options.js +2 -1
- package/cjs/dropdown/style/css/index.css +3 -0
- package/cjs/dropdown/style/index.less +2 -0
- package/cjs/dropdown/type.d.ts +20 -9
- package/cjs/dropdown-menu/dropdown-menu.d.ts +4 -0
- package/cjs/dropdown-menu/dropdown-menu.js +273 -0
- package/cjs/dropdown-menu/helper.d.ts +1 -1
- package/cjs/dropdown-menu/index.d.ts +2 -3
- package/cjs/dropdown-menu/index.js +2 -245
- package/cjs/dropdown-menu/type.d.ts +21 -20
- package/cjs/ellipsis/index.d.ts +1 -1
- package/cjs/ellipsis/index.js +1 -1
- package/cjs/grid/index.js +13 -12
- package/cjs/image/index.d.ts +1 -2
- package/cjs/image/index.js +14 -9
- package/cjs/image/style/css/index.css +2 -1
- package/cjs/image/style/index.less +2 -1
- package/cjs/image-picker/add-icon.d.ts +2 -0
- package/cjs/image-picker/add-icon.js +22 -0
- package/cjs/image-picker/demo/style/css/mobile.css +40 -0
- package/cjs/image-picker/demo/style/mobile.less +42 -0
- package/cjs/image-picker/index.d.ts +13 -0
- package/cjs/image-picker/index.js +331 -0
- package/cjs/image-picker/style/css/index.css +147 -0
- package/cjs/image-picker/style/css/index.d.ts +2 -0
- package/cjs/image-picker/style/css/index.js +5 -0
- package/cjs/image-picker/style/index.d.ts +2 -0
- package/cjs/image-picker/style/index.js +5 -0
- package/cjs/image-picker/style/index.less +116 -0
- package/cjs/image-picker/type.d.ts +174 -0
- package/cjs/image-picker/type.js +3 -0
- package/cjs/image-preview/index.d.ts +3 -3
- package/cjs/image-preview/index.js +1 -1
- package/cjs/index.d.ts +3 -0
- package/cjs/index.js +13 -1
- package/cjs/input/hooks.js +49 -8
- package/cjs/input/index.d.ts +1 -1
- package/cjs/input/index.js +1 -1
- package/cjs/input/props.d.ts +8 -2
- package/cjs/nav-bar/index.js +7 -2
- package/cjs/notice-bar/index.d.ts +1 -1
- package/cjs/notice-bar/index.js +1 -1
- package/cjs/picker/index.d.ts +1 -1
- package/cjs/picker/index.js +1 -1
- package/cjs/picker-view/index.d.ts +1 -1
- package/cjs/picker-view/index.js +1 -1
- package/cjs/popover/index.d.ts +1 -1
- package/cjs/popover/index.js +1 -1
- package/cjs/popup-swiper/index.js +3 -2
- package/cjs/radio/index.d.ts +1 -1
- package/cjs/radio/index.js +1 -1
- package/cjs/rate/index.d.ts +1 -1
- package/cjs/rate/index.js +1 -1
- package/cjs/search-bar/association.d.ts +3 -0
- package/cjs/search-bar/association.js +92 -0
- package/cjs/search-bar/cancel-button.d.ts +10 -0
- package/cjs/search-bar/cancel-button.js +41 -0
- package/cjs/search-bar/demo/style/css/mobile.css +5 -0
- package/cjs/search-bar/demo/style/mobile.less +9 -0
- package/cjs/search-bar/highlight.d.ts +12 -0
- package/cjs/search-bar/highlight.js +77 -0
- package/cjs/search-bar/index.d.ts +13 -0
- package/cjs/search-bar/index.js +239 -0
- package/cjs/search-bar/style/css/index.css +148 -0
- package/cjs/search-bar/style/css/index.d.ts +2 -0
- package/cjs/search-bar/style/css/index.js +5 -0
- package/cjs/search-bar/style/index.d.ts +2 -0
- package/cjs/search-bar/style/index.js +5 -0
- package/cjs/search-bar/style/index.less +111 -0
- package/cjs/search-bar/type.d.ts +163 -0
- package/cjs/search-bar/type.js +3 -0
- package/cjs/show-monitor/index.js +31 -3
- package/cjs/slider/index.d.ts +1 -1
- package/cjs/slider/index.js +1 -1
- package/cjs/steps/demo/style/css/mobile.css +1 -1
- package/cjs/steps/demo/style/mobile.less +1 -1
- package/cjs/steps/index.d.ts +1 -1
- package/cjs/steps/index.js +1 -1
- package/cjs/steps/style/css/index.css +5 -15
- package/cjs/steps/style/index.less +6 -10
- package/cjs/sticky/index.d.ts +1 -1
- package/cjs/style.d.ts +3 -0
- package/cjs/style.js +6 -0
- package/cjs/swipe-action/demo/style/css/mobile.css +5 -0
- package/cjs/swipe-action/demo/style/mobile.less +9 -0
- package/cjs/swipe-action/index.d.ts +12 -0
- package/cjs/swipe-action/index.js +339 -0
- package/cjs/swipe-action/item.d.ts +11 -0
- package/cjs/swipe-action/item.js +52 -0
- package/cjs/swipe-action/style/css/index.css +88 -0
- package/cjs/swipe-action/style/css/index.d.ts +2 -0
- package/cjs/swipe-action/style/css/index.js +5 -0
- package/cjs/swipe-action/style/index.d.ts +2 -0
- package/cjs/swipe-action/style/index.js +5 -0
- package/cjs/swipe-action/style/index.less +89 -0
- package/cjs/swipe-action/type.d.ts +123 -0
- package/cjs/swipe-action/type.js +3 -0
- package/cjs/switch/index.d.ts +1 -1
- package/cjs/switch/index.js +1 -1
- package/cjs/tabs/tab-pane.js +5 -1
- package/cjs/tag/index.d.ts +1 -1
- package/cjs/tag/index.js +1 -1
- package/cjs/textarea/index.d.ts +1 -1
- package/cjs/textarea/index.js +1 -1
- package/dist/index.js +8040 -6845
- package/dist/index.min.js +6 -7
- package/dist/style.css +497 -447
- package/dist/style.min.css +1 -1
- package/esm/_helpers/type.d.ts +1 -1
- package/esm/avatar/group.js +1 -1
- package/esm/avatar/index.d.ts +1 -1
- package/esm/avatar/index.js +11 -14
- package/esm/avatar/style/css/index.css +96 -126
- package/esm/avatar/style/index.less +54 -72
- package/esm/badge/index.d.ts +1 -1
- package/esm/badge/index.js +7 -9
- package/esm/badge/style/css/index.css +5 -5
- package/esm/badge/style/index.less +5 -5
- package/esm/button/hooks.d.ts +1 -2
- package/esm/button/hooks.js +5 -3
- package/esm/button/index.d.ts +6 -0
- package/esm/button/index.js +40 -35
- package/esm/button/style/css/index.css +75 -310
- package/esm/button/style/index.less +32 -38
- package/esm/carousel/index.d.ts +1 -1
- package/esm/carousel/index.js +1 -1
- package/esm/cell/index.d.ts +1 -1
- package/esm/cell/index.js +1 -1
- package/esm/checkbox/index.d.ts +1 -1
- package/esm/checkbox/index.js +1 -1
- package/esm/collapse/index.d.ts +1 -1
- package/esm/collapse/index.js +1 -1
- package/esm/count-down/demo/style/mobile.less +1 -1
- package/esm/count-down/index.d.ts +1 -1
- package/esm/count-down/index.js +1 -1
- package/esm/date-picker/index.d.ts +1 -1
- package/esm/date-picker/index.js +1 -1
- package/esm/dropdown/dropdown.d.ts +3 -0
- package/esm/dropdown/dropdown.js +304 -0
- package/esm/dropdown/index.d.ts +3 -4
- package/esm/dropdown/index.js +3 -293
- package/esm/dropdown/options.js +2 -1
- package/esm/dropdown/style/css/index.css +3 -0
- package/esm/dropdown/style/index.less +2 -0
- package/esm/dropdown/type.d.ts +20 -9
- package/esm/dropdown-menu/dropdown-menu.d.ts +4 -0
- package/esm/dropdown-menu/dropdown-menu.js +256 -0
- package/esm/dropdown-menu/helper.d.ts +1 -1
- package/esm/dropdown-menu/index.d.ts +2 -3
- package/esm/dropdown-menu/index.js +2 -237
- package/esm/dropdown-menu/type.d.ts +21 -20
- package/esm/ellipsis/index.d.ts +1 -1
- package/esm/ellipsis/index.js +1 -1
- package/esm/grid/index.js +13 -12
- package/esm/image/index.d.ts +1 -2
- package/esm/image/index.js +15 -10
- package/esm/image/style/css/index.css +2 -1
- package/esm/image/style/index.less +2 -1
- package/esm/image-picker/add-icon.d.ts +2 -0
- package/esm/image-picker/add-icon.js +14 -0
- package/esm/image-picker/demo/style/css/mobile.css +40 -0
- package/esm/image-picker/demo/style/mobile.less +42 -0
- package/esm/image-picker/index.d.ts +13 -0
- package/esm/image-picker/index.js +302 -0
- package/esm/image-picker/style/css/index.css +147 -0
- package/esm/image-picker/style/css/index.d.ts +2 -0
- package/esm/image-picker/style/css/index.js +2 -0
- package/esm/image-picker/style/index.d.ts +2 -0
- package/esm/image-picker/style/index.js +2 -0
- package/esm/image-picker/style/index.less +116 -0
- package/esm/image-picker/type.d.ts +174 -0
- package/esm/image-picker/type.js +1 -0
- package/esm/image-preview/index.d.ts +3 -3
- package/esm/image-preview/index.js +1 -1
- package/esm/index.d.ts +3 -0
- package/esm/index.js +3 -0
- package/esm/input/hooks.js +49 -8
- package/esm/input/index.d.ts +1 -1
- package/esm/input/index.js +1 -1
- package/esm/input/props.d.ts +8 -2
- package/esm/nav-bar/index.js +6 -2
- package/esm/notice-bar/index.d.ts +1 -1
- package/esm/notice-bar/index.js +1 -1
- package/esm/picker/index.d.ts +1 -1
- package/esm/picker/index.js +1 -1
- package/esm/picker-view/index.d.ts +1 -1
- package/esm/picker-view/index.js +1 -1
- package/esm/popover/index.d.ts +1 -1
- package/esm/popover/index.js +1 -1
- package/esm/popup-swiper/index.js +3 -2
- package/esm/radio/index.d.ts +1 -1
- package/esm/radio/index.js +1 -1
- package/esm/rate/index.d.ts +1 -1
- package/esm/rate/index.js +1 -1
- package/esm/search-bar/association.d.ts +3 -0
- package/esm/search-bar/association.js +82 -0
- package/esm/search-bar/cancel-button.d.ts +10 -0
- package/esm/search-bar/cancel-button.js +30 -0
- package/esm/search-bar/demo/style/css/mobile.css +5 -0
- package/esm/search-bar/demo/style/mobile.less +9 -0
- package/esm/search-bar/highlight.d.ts +12 -0
- package/esm/search-bar/highlight.js +66 -0
- package/esm/search-bar/index.d.ts +13 -0
- package/esm/search-bar/index.js +213 -0
- package/esm/search-bar/style/css/index.css +148 -0
- package/esm/search-bar/style/css/index.d.ts +2 -0
- package/esm/search-bar/style/css/index.js +2 -0
- package/esm/search-bar/style/index.d.ts +2 -0
- package/esm/search-bar/style/index.js +2 -0
- package/esm/search-bar/style/index.less +111 -0
- package/esm/search-bar/type.d.ts +163 -0
- package/esm/search-bar/type.js +1 -0
- package/esm/show-monitor/index.js +31 -3
- package/esm/slider/index.d.ts +1 -1
- package/esm/slider/index.js +1 -1
- package/esm/steps/demo/style/css/mobile.css +1 -1
- package/esm/steps/demo/style/mobile.less +1 -1
- package/esm/steps/index.d.ts +1 -1
- package/esm/steps/index.js +1 -1
- package/esm/steps/style/css/index.css +5 -15
- package/esm/steps/style/index.less +6 -10
- package/esm/sticky/index.d.ts +1 -1
- package/esm/style.d.ts +3 -0
- package/esm/style.js +3 -0
- package/esm/swipe-action/demo/style/css/mobile.css +5 -0
- package/esm/swipe-action/demo/style/mobile.less +9 -0
- package/esm/swipe-action/index.d.ts +12 -0
- package/esm/swipe-action/index.js +321 -0
- package/esm/swipe-action/item.d.ts +11 -0
- package/esm/swipe-action/item.js +42 -0
- package/esm/swipe-action/style/css/index.css +88 -0
- package/esm/swipe-action/style/css/index.d.ts +2 -0
- package/esm/swipe-action/style/css/index.js +2 -0
- package/esm/swipe-action/style/index.d.ts +2 -0
- package/esm/swipe-action/style/index.js +2 -0
- package/esm/swipe-action/style/index.less +89 -0
- package/esm/swipe-action/type.d.ts +123 -0
- package/esm/swipe-action/type.js +1 -0
- package/esm/switch/index.d.ts +1 -1
- package/esm/switch/index.js +1 -1
- package/esm/tabs/tab-pane.js +5 -1
- package/esm/tag/index.d.ts +1 -1
- package/esm/tag/index.js +1 -1
- package/esm/textarea/index.d.ts +1 -1
- package/esm/textarea/index.js +1 -1
- package/package.json +3 -3
- package/tokens/app/arcodesign/default/css-variables.less +53 -3
- package/tokens/app/arcodesign/default/index.d.ts +53 -3
- package/tokens/app/arcodesign/default/index.js +54 -4
- package/tokens/app/arcodesign/default/index.json +629 -39
- package/tokens/app/arcodesign/default/index.less +53 -3
- package/umd/_helpers/type.d.ts +1 -1
- package/umd/avatar/group.js +1 -1
- package/umd/avatar/index.d.ts +1 -1
- package/umd/avatar/index.js +11 -14
- package/umd/avatar/style/css/index.css +96 -126
- package/umd/avatar/style/index.less +54 -72
- package/umd/badge/index.d.ts +1 -1
- package/umd/badge/index.js +7 -9
- package/umd/badge/style/css/index.css +5 -5
- package/umd/badge/style/index.less +5 -5
- package/umd/button/hooks.d.ts +1 -2
- package/umd/button/hooks.js +5 -3
- package/umd/button/index.d.ts +6 -0
- package/umd/button/index.js +38 -33
- package/umd/button/style/css/index.css +75 -310
- package/umd/button/style/index.less +32 -38
- package/umd/carousel/index.d.ts +1 -1
- package/umd/carousel/index.js +1 -1
- package/umd/cell/index.d.ts +1 -1
- package/umd/cell/index.js +1 -1
- package/umd/checkbox/index.d.ts +1 -1
- package/umd/checkbox/index.js +1 -1
- package/umd/collapse/index.d.ts +1 -1
- package/umd/collapse/index.js +1 -1
- package/umd/count-down/demo/style/mobile.less +1 -1
- package/umd/count-down/index.d.ts +1 -1
- package/umd/count-down/index.js +1 -1
- package/umd/date-picker/index.d.ts +1 -1
- package/umd/date-picker/index.js +1 -1
- package/umd/dropdown/dropdown.d.ts +3 -0
- package/umd/dropdown/dropdown.js +325 -0
- package/umd/dropdown/index.d.ts +3 -4
- package/umd/dropdown/index.js +5 -298
- package/umd/dropdown/options.js +2 -1
- package/umd/dropdown/style/css/index.css +3 -0
- package/umd/dropdown/style/index.less +2 -0
- package/umd/dropdown/type.d.ts +20 -9
- package/umd/dropdown-menu/dropdown-menu.d.ts +4 -0
- package/umd/dropdown-menu/dropdown-menu.js +278 -0
- package/umd/dropdown-menu/helper.d.ts +1 -1
- package/umd/dropdown-menu/index.d.ts +2 -3
- package/umd/dropdown-menu/index.js +5 -241
- package/umd/dropdown-menu/type.d.ts +21 -20
- package/umd/ellipsis/index.d.ts +1 -1
- package/umd/ellipsis/index.js +1 -1
- package/umd/grid/index.js +13 -12
- package/umd/image/index.d.ts +1 -2
- package/umd/image/index.js +14 -9
- package/umd/image/style/css/index.css +2 -1
- package/umd/image/style/index.less +2 -1
- package/umd/image-picker/add-icon.d.ts +2 -0
- package/umd/image-picker/add-icon.js +35 -0
- package/umd/image-picker/demo/style/css/mobile.css +40 -0
- package/umd/image-picker/demo/style/mobile.less +42 -0
- package/umd/image-picker/index.d.ts +13 -0
- package/umd/image-picker/index.js +329 -0
- package/umd/image-picker/style/css/index.css +147 -0
- package/umd/image-picker/style/css/index.d.ts +2 -0
- package/umd/image-picker/style/css/index.js +15 -0
- package/umd/image-picker/style/index.d.ts +2 -0
- package/umd/image-picker/style/index.js +15 -0
- package/umd/image-picker/style/index.less +116 -0
- package/umd/image-picker/type.d.ts +174 -0
- package/umd/image-picker/type.js +17 -0
- package/umd/image-preview/index.d.ts +3 -3
- package/umd/image-preview/index.js +1 -1
- package/umd/index.d.ts +3 -0
- package/umd/index.js +11 -5
- package/umd/input/hooks.js +48 -7
- package/umd/input/index.d.ts +1 -1
- package/umd/input/index.js +1 -1
- package/umd/input/props.d.ts +8 -2
- package/umd/nav-bar/index.js +9 -6
- package/umd/notice-bar/index.d.ts +1 -1
- package/umd/notice-bar/index.js +1 -1
- package/umd/picker/index.d.ts +1 -1
- package/umd/picker/index.js +1 -1
- package/umd/picker-view/index.d.ts +1 -1
- package/umd/picker-view/index.js +1 -1
- package/umd/popover/index.d.ts +1 -1
- package/umd/popover/index.js +1 -1
- package/umd/popup-swiper/index.js +3 -2
- package/umd/radio/index.d.ts +1 -1
- package/umd/radio/index.js +1 -1
- package/umd/rate/index.d.ts +1 -1
- package/umd/rate/index.js +1 -1
- package/umd/search-bar/association.d.ts +3 -0
- package/umd/search-bar/association.js +101 -0
- package/umd/search-bar/cancel-button.d.ts +10 -0
- package/umd/search-bar/cancel-button.js +52 -0
- package/umd/search-bar/demo/style/css/mobile.css +5 -0
- package/umd/search-bar/demo/style/mobile.less +9 -0
- package/umd/search-bar/highlight.d.ts +12 -0
- package/umd/search-bar/highlight.js +87 -0
- package/umd/search-bar/index.d.ts +13 -0
- package/umd/search-bar/index.js +235 -0
- package/umd/search-bar/style/css/index.css +148 -0
- package/umd/search-bar/style/css/index.d.ts +2 -0
- package/umd/search-bar/style/css/index.js +15 -0
- package/umd/search-bar/style/index.d.ts +2 -0
- package/umd/search-bar/style/index.js +15 -0
- package/umd/search-bar/style/index.less +111 -0
- package/umd/search-bar/type.d.ts +163 -0
- package/umd/search-bar/type.js +17 -0
- package/umd/show-monitor/index.js +31 -3
- package/umd/slider/index.d.ts +1 -1
- package/umd/slider/index.js +1 -1
- package/umd/steps/demo/style/css/mobile.css +1 -1
- package/umd/steps/demo/style/mobile.less +1 -1
- package/umd/steps/index.d.ts +1 -1
- package/umd/steps/index.js +1 -1
- package/umd/steps/style/css/index.css +5 -15
- package/umd/steps/style/index.less +6 -10
- package/umd/sticky/index.d.ts +1 -1
- package/umd/style.d.ts +3 -0
- package/umd/style.js +4 -4
- package/umd/swipe-action/demo/style/css/mobile.css +5 -0
- package/umd/swipe-action/demo/style/mobile.less +9 -0
- package/umd/swipe-action/index.d.ts +12 -0
- package/umd/swipe-action/index.js +342 -0
- package/umd/swipe-action/item.d.ts +11 -0
- package/umd/swipe-action/item.js +62 -0
- package/umd/swipe-action/style/css/index.css +88 -0
- package/umd/swipe-action/style/css/index.d.ts +2 -0
- package/umd/swipe-action/style/css/index.js +15 -0
- package/umd/swipe-action/style/index.d.ts +2 -0
- package/umd/swipe-action/style/index.js +15 -0
- package/umd/swipe-action/style/index.less +89 -0
- package/umd/swipe-action/type.d.ts +123 -0
- package/umd/swipe-action/type.js +17 -0
- package/umd/switch/index.d.ts +1 -1
- package/umd/switch/index.js +1 -1
- package/umd/tabs/tab-pane.js +5 -1
- package/umd/tag/index.d.ts +1 -1
- package/umd/tag/index.js +1 -1
- package/umd/textarea/index.d.ts +1 -1
- package/umd/textarea/index.js +1 -1
package/cjs/input/index.js
CHANGED
@@ -22,7 +22,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
22
22
|
/**
|
23
23
|
* 输入框组件,支持添加前后缀。
|
24
24
|
* @en The input box, supports adding prefixes and suffixes.
|
25
|
-
* @type
|
25
|
+
* @type 数据录入
|
26
26
|
* @type_en Data Entry
|
27
27
|
* @name 输入框
|
28
28
|
* @name_en Input
|
package/cjs/input/props.d.ts
CHANGED
@@ -80,12 +80,12 @@ export interface BasicInputProps<T = HTMLInputElement> {
|
|
80
80
|
* 输入框头部内容,在输入框外部
|
81
81
|
* @en The content of the header of the input box, outside the input box
|
82
82
|
*/
|
83
|
-
prepend?: React.ReactNode;
|
83
|
+
prepend?: React.ReactNode | ((focusing: boolean, inputValue: string) => React.ReactNode);
|
84
84
|
/**
|
85
85
|
* 输入框尾部内容,在输入框外部
|
86
86
|
* @en The content at the end of the input box, outside the input box
|
87
87
|
*/
|
88
|
-
append?: React.ReactNode;
|
88
|
+
append?: React.ReactNode | ((focusing: boolean, inputValue: string) => React.ReactNode);
|
89
89
|
/**
|
90
90
|
* 在聚焦之前blur掉,即切换不同input时会重新弹起键盘,常用于input type切换时重新加载键盘,安卓上有效
|
91
91
|
* @en Blur before focusing, that is, the keyboard will be re-bounced when switching between different inputs. It is often used to reload the keyboard when the input type is switched. It is valid on Android.
|
@@ -102,6 +102,12 @@ export interface BasicInputProps<T = HTMLInputElement> {
|
|
102
102
|
* @default "focus"
|
103
103
|
*/
|
104
104
|
clearShowType?: 'focus' | 'value' | 'always';
|
105
|
+
/**
|
106
|
+
* 在聚焦模式下点击清除按钮时,是否要屏蔽对应产生的onBlur和onFocus事件
|
107
|
+
* @en Whether to block the onBlur and onFocus events generated when the clear button is clicked in focus mode
|
108
|
+
* @default true
|
109
|
+
*/
|
110
|
+
preventEventWhenClearing?: boolean;
|
105
111
|
/**
|
106
112
|
* 清除按钮类型,也可自定义
|
107
113
|
* @en Clear button type, also customizable
|
package/cjs/nav-bar/index.js
CHANGED
@@ -15,6 +15,8 @@ var _contextProvider = require("../context-provider");
|
|
15
15
|
|
16
16
|
var _backIcon = _interopRequireDefault(require("./back-icon"));
|
17
17
|
|
18
|
+
var _helpers = require("../_helpers");
|
19
|
+
|
18
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
19
21
|
|
20
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
@@ -66,8 +68,10 @@ var NavBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
66
68
|
customStyle = _useState2[0],
|
67
69
|
setCustomStyle = _useState2[1];
|
68
70
|
|
71
|
+
var system = (0, _helpers.useSystem)();
|
72
|
+
|
69
73
|
var onElementScroll = function onElementScroll(curOffset) {
|
70
|
-
setScrollToggleHide(curOffset
|
74
|
+
setScrollToggleHide(curOffset < showOffset);
|
71
75
|
|
72
76
|
if (getComputedStyleByScroll) {
|
73
77
|
var cstyle = getComputedStyleByScroll(curOffset);
|
@@ -93,6 +97,7 @@ var NavBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
93
97
|
(0, _react.useEffect)(function () {
|
94
98
|
var needBind = showOffset || getComputedStyleByScroll;
|
95
99
|
var container = (0, _mobileUtils.getValidScrollContainer)(getScrollContainer);
|
100
|
+
handleEleScroll();
|
96
101
|
|
97
102
|
if (needBind && container) {
|
98
103
|
container.addEventListener('scroll', handleEleScroll, false);
|
@@ -140,7 +145,7 @@ var NavBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
140
145
|
background: relBackground
|
141
146
|
} : {})
|
142
147
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
143
|
-
className: (0, _mobileUtils.cls)(className, prefixCls + "-nav-bar-wrapper", (_cls2 = {}, _cls2[prefixCls + "-nav-bar-wrapper-fixed"] = fixed, _cls2[prefixCls + "-nav-bar-wrapper-border"] = hasBottomLine, _cls2)),
|
148
|
+
className: (0, _mobileUtils.cls)(className, system, prefixCls + "-nav-bar-wrapper", (_cls2 = {}, _cls2[prefixCls + "-nav-bar-wrapper-fixed"] = fixed, _cls2[prefixCls + "-nav-bar-wrapper-border"] = hasBottomLine, _cls2)),
|
144
149
|
style: (0, _extends2.default)({
|
145
150
|
paddingTop: statusBarHeight ? statusBarHeight + "px" : ''
|
146
151
|
}, customStyle)
|
@@ -98,7 +98,7 @@ export interface NoticeBarRef {
|
|
98
98
|
/**
|
99
99
|
* 可自定义换行或滚动效果,支持循环滚动。
|
100
100
|
* @en Line wrapping or scrolling effects can be customized, and circular scrolling is supported.
|
101
|
-
* @type
|
101
|
+
* @type 信息展示
|
102
102
|
* @type_en Data Display
|
103
103
|
* @name 通知栏
|
104
104
|
* @name_en NoticeBar
|
package/cjs/notice-bar/index.js
CHANGED
@@ -20,7 +20,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
20
20
|
/**
|
21
21
|
* 可自定义换行或滚动效果,支持循环滚动。
|
22
22
|
* @en Line wrapping or scrolling effects can be customized, and circular scrolling is supported.
|
23
|
-
* @type
|
23
|
+
* @type 信息展示
|
24
24
|
* @type_en Data Display
|
25
25
|
* @name 通知栏
|
26
26
|
* @name_en NoticeBar
|
package/cjs/picker/index.d.ts
CHANGED
package/cjs/picker/index.js
CHANGED
@@ -45,7 +45,7 @@ export interface PickerViewRef {
|
|
45
45
|
/**
|
46
46
|
* 选择器视图组件,不含弹窗,方便使用方灵活定制选择器。
|
47
47
|
* @en The picker view component, not has contain popup, which is convenient for the user to flexibly customize the picker.
|
48
|
-
* @type
|
48
|
+
* @type 数据录入
|
49
49
|
* @type_en Data Entry
|
50
50
|
* @name 选择器视图
|
51
51
|
* @name_en PickerView
|
package/cjs/picker-view/index.js
CHANGED
@@ -46,7 +46,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
46
46
|
/**
|
47
47
|
* 选择器视图组件,不含弹窗,方便使用方灵活定制选择器。
|
48
48
|
* @en The picker view component, not has contain popup, which is convenient for the user to flexibly customize the picker.
|
49
|
-
* @type
|
49
|
+
* @type 数据录入
|
50
50
|
* @type_en Data Entry
|
51
51
|
* @name 选择器视图
|
52
52
|
* @name_en PickerView
|
package/cjs/popover/index.d.ts
CHANGED
@@ -8,7 +8,7 @@ declare const _default: import("react").ForwardRefExoticComponent<Partial<import
|
|
8
8
|
* @en Bubble card, supports six directions, small arrows are centered in each direction based on the mounted sub-elements, and supports controlled and uncontrolled modes.
|
9
9
|
* @name 气泡卡片
|
10
10
|
* @name_en Popover
|
11
|
-
* @type
|
11
|
+
* @type 信息展示
|
12
12
|
* @type_en Data Display
|
13
13
|
*/
|
14
14
|
export default _default;
|
package/cjs/popover/index.js
CHANGED
@@ -29,7 +29,7 @@ var Menu = (0, _menu.componentGenerator)(_popover.Popover);
|
|
29
29
|
* @en Bubble card, supports six directions, small arrows are centered in each direction based on the mounted sub-elements, and supports controlled and uncontrolled modes.
|
30
30
|
* @name 气泡卡片
|
31
31
|
* @name_en Popover
|
32
|
-
* @type
|
32
|
+
* @type 信息展示
|
33
33
|
* @type_en Data Display
|
34
34
|
*/
|
35
35
|
|
@@ -139,13 +139,14 @@ var PopupSwiper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
139
139
|
var movingFromDirec = allowedDirections.includes(fromDirec) ? fromDirec : '';
|
140
140
|
var disDirection = exitDirection || movingFromDirec;
|
141
141
|
var direcValue = ['top', 'bottom'].includes(disDirection) ? 'Y' : 'X';
|
142
|
+
var direcRatio = ['bottom', 'right'].includes(disDirection) ? 1 : -1;
|
142
143
|
|
143
144
|
switch (movingFromDirec) {
|
144
145
|
case 'top':
|
145
146
|
case 'bottom':
|
146
147
|
setDistance({
|
147
148
|
direction: direcValue,
|
148
|
-
value: Math
|
149
|
+
value: Math.abs(disY) * direcRatio
|
149
150
|
});
|
150
151
|
break;
|
151
152
|
|
@@ -153,7 +154,7 @@ var PopupSwiper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
153
154
|
case 'right':
|
154
155
|
setDistance({
|
155
156
|
direction: direcValue,
|
156
|
-
value: Math
|
157
|
+
value: Math.abs(disX) * direcRatio
|
157
158
|
});
|
158
159
|
break;
|
159
160
|
|
package/cjs/radio/index.d.ts
CHANGED
@@ -8,7 +8,7 @@ declare const _default: import("react").ForwardRefExoticComponent<import("./type
|
|
8
8
|
* @en Radio button, click to switch selection when available, supports disabled state and radio option group.
|
9
9
|
* @name 单选框
|
10
10
|
* @name_en Radio
|
11
|
-
* @type
|
11
|
+
* @type 数据录入
|
12
12
|
* @type_en Data Entry
|
13
13
|
*/
|
14
14
|
export default _default;
|
package/cjs/radio/index.js
CHANGED
@@ -29,7 +29,7 @@ var Group = (0, _group.componentGenerator)(_radio.Radio);
|
|
29
29
|
* @en Radio button, click to switch selection when available, supports disabled state and radio option group.
|
30
30
|
* @name 单选框
|
31
31
|
* @name_en Radio
|
32
|
-
* @type
|
32
|
+
* @type 数据录入
|
33
33
|
* @type_en Data Entry
|
34
34
|
*/
|
35
35
|
|
package/cjs/rate/index.d.ts
CHANGED
package/cjs/rate/index.js
CHANGED
@@ -0,0 +1,92 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
exports.__esModule = true;
|
6
|
+
exports.SearchBarAssociation = SearchBarAssociation;
|
7
|
+
|
8
|
+
var _mobileUtils = require("@arco-design/mobile-utils");
|
9
|
+
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
11
|
+
|
12
|
+
var _highlight = require("./highlight");
|
13
|
+
|
14
|
+
function SearchBarAssociation(props) {
|
15
|
+
var _cls;
|
16
|
+
|
17
|
+
var prefixCls = props.prefixCls,
|
18
|
+
_props$associationIte = props.associationItems,
|
19
|
+
associationItems = _props$associationIte === void 0 ? [] : _props$associationIte,
|
20
|
+
highlightClassName = props.highlightClassName,
|
21
|
+
_props$highlightMode = props.highlightMode,
|
22
|
+
highlightMode = _props$highlightMode === void 0 ? 'none' : _props$highlightMode,
|
23
|
+
highlightStyle = props.highlightStyle,
|
24
|
+
onAssociationClick = props.onAssociationClick,
|
25
|
+
onAssociationItemClick = props.onAssociationItemClick,
|
26
|
+
renderAssociation = props.renderAssociation,
|
27
|
+
renderAssociationItem = props.renderAssociationItem,
|
28
|
+
keyword = props.keyword,
|
29
|
+
visible = props.visible;
|
30
|
+
var searchBarAssociationPrefixCls = prefixCls + "-association";
|
31
|
+
var defaultHighlightClassName = searchBarAssociationPrefixCls + "-item-highlight";
|
32
|
+
|
33
|
+
var renderHighlightNode = function renderHighlightNode(content) {
|
34
|
+
if (!content || !keyword || highlightMode === 'none') {
|
35
|
+
return content;
|
36
|
+
}
|
37
|
+
|
38
|
+
var config = {
|
39
|
+
keyword: keyword,
|
40
|
+
content: content,
|
41
|
+
highlightClassName: highlightClassName || defaultHighlightClassName,
|
42
|
+
highlightStyle: highlightStyle
|
43
|
+
};
|
44
|
+
|
45
|
+
if (highlightMode === 'contain') {
|
46
|
+
return (0, _highlight.highlightWithContainMode)(config);
|
47
|
+
}
|
48
|
+
|
49
|
+
if (highlightMode === 'prefix') {
|
50
|
+
return (0, _highlight.highlightWithPrefixMode)(config);
|
51
|
+
}
|
52
|
+
|
53
|
+
return typeof highlightMode === 'function' ? highlightMode(content, keyword, defaultHighlightClassName) : content;
|
54
|
+
};
|
55
|
+
|
56
|
+
var renderItem = function renderItem(item, index) {
|
57
|
+
var itemContent = item.content;
|
58
|
+
var node = itemContent; // itemContent为string类型,并且开启高亮模式才去走渲染高亮内容的逻辑
|
59
|
+
// @en When `itemContent` is a string, and the highlight mode is turned on, the logic of rendering the highlighted content is performed
|
60
|
+
|
61
|
+
if (typeof itemContent === 'string' && highlightMode !== 'none') {
|
62
|
+
node = renderHighlightNode(itemContent);
|
63
|
+
}
|
64
|
+
|
65
|
+
if (renderAssociationItem) {
|
66
|
+
node = renderAssociationItem(item, index, node);
|
67
|
+
}
|
68
|
+
|
69
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
70
|
+
key: index,
|
71
|
+
className: searchBarAssociationPrefixCls + "-item",
|
72
|
+
onClick: function onClick() {
|
73
|
+
return onAssociationItemClick == null ? void 0 : onAssociationItemClick(item, index);
|
74
|
+
}
|
75
|
+
}, node);
|
76
|
+
};
|
77
|
+
|
78
|
+
var renderContent = function renderContent() {
|
79
|
+
var associationContent = associationItems.map(renderItem);
|
80
|
+
|
81
|
+
if (renderAssociation) {
|
82
|
+
return renderAssociation(associationContent);
|
83
|
+
}
|
84
|
+
|
85
|
+
return associationContent;
|
86
|
+
};
|
87
|
+
|
88
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
89
|
+
className: (0, _mobileUtils.cls)(searchBarAssociationPrefixCls, (_cls = {}, _cls[searchBarAssociationPrefixCls + "-visible"] = visible, _cls)),
|
90
|
+
onClick: onAssociationClick
|
91
|
+
}, renderContent());
|
92
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
interface CancelButtonProps {
|
3
|
+
className: string;
|
4
|
+
onCancel?: () => void;
|
5
|
+
focusing: boolean;
|
6
|
+
currentInputValue: string;
|
7
|
+
text?: string;
|
8
|
+
}
|
9
|
+
export declare function CancelButton(props: CancelButtonProps): JSX.Element | null;
|
10
|
+
export {};
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports.CancelButton = CancelButton;
|
5
|
+
|
6
|
+
var _mobileUtils = require("@arco-design/mobile-utils");
|
7
|
+
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
9
|
+
|
10
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
11
|
+
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
13
|
+
|
14
|
+
function CancelButton(props) {
|
15
|
+
var className = props.className,
|
16
|
+
onCancel = props.onCancel,
|
17
|
+
focusing = props.focusing,
|
18
|
+
currentInputValue = props.currentInputValue,
|
19
|
+
text = props.text;
|
20
|
+
|
21
|
+
var _useState = (0, _react.useState)(focusing || Boolean(currentInputValue)),
|
22
|
+
visible = _useState[0],
|
23
|
+
setVisible = _useState[1];
|
24
|
+
|
25
|
+
var handleClick = function handleClick() {
|
26
|
+
onCancel == null ? void 0 : onCancel(); // 如果不延迟,在聚焦切输入框有值的情况下,点击取消按钮会造成闪烁
|
27
|
+
// @en If there is no delay, when the focus cut input box has a value, clicking the cancel button will cause flickering
|
28
|
+
|
29
|
+
(0, _mobileUtils.nextTick)(function () {
|
30
|
+
setVisible(false);
|
31
|
+
});
|
32
|
+
};
|
33
|
+
|
34
|
+
(0, _react.useEffect)(function () {
|
35
|
+
setVisible(focusing || Boolean(currentInputValue));
|
36
|
+
}, [focusing, currentInputValue]);
|
37
|
+
return visible ? /*#__PURE__*/_react.default.createElement("span", {
|
38
|
+
className: className,
|
39
|
+
onClick: handleClick
|
40
|
+
}, text) : null;
|
41
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { SearchBarAssociationHighlightConfig } from './type';
|
3
|
+
/**
|
4
|
+
* 高亮搜索候选项中,包含的关键字
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
export declare function highlightWithContainMode(config: SearchBarAssociationHighlightConfig): React.ReactNode[];
|
8
|
+
/**
|
9
|
+
* 高亮搜索候选项和关键字的最长前缀公共字符串
|
10
|
+
*
|
11
|
+
*/
|
12
|
+
export declare function highlightWithPrefixMode(config: SearchBarAssociationHighlightConfig): string | (string | JSX.Element)[];
|
@@ -0,0 +1,77 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
exports.__esModule = true;
|
6
|
+
exports.highlightWithContainMode = highlightWithContainMode;
|
7
|
+
exports.highlightWithPrefixMode = highlightWithPrefixMode;
|
8
|
+
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
10
|
+
|
11
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
12
|
+
|
13
|
+
var _react = _interopRequireDefault(require("react"));
|
14
|
+
|
15
|
+
var _excluded = ["content", "keyword"];
|
16
|
+
|
17
|
+
function createHighlightNode(config, index) {
|
18
|
+
var keyword = config.keyword,
|
19
|
+
highlightClassName = config.highlightClassName,
|
20
|
+
highlightStyle = config.highlightStyle;
|
21
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
22
|
+
className: highlightClassName,
|
23
|
+
style: highlightStyle,
|
24
|
+
key: index
|
25
|
+
}, keyword);
|
26
|
+
}
|
27
|
+
/**
|
28
|
+
* 高亮搜索候选项中,包含的关键字
|
29
|
+
*
|
30
|
+
*/
|
31
|
+
|
32
|
+
|
33
|
+
function highlightWithContainMode(config) {
|
34
|
+
var _config$content = config.content,
|
35
|
+
content = _config$content === void 0 ? '' : _config$content,
|
36
|
+
_config$keyword = config.keyword,
|
37
|
+
keyword = _config$keyword === void 0 ? '' : _config$keyword; // 具体实现思路就是将keyword作为split的分隔符,切割content得到数组
|
38
|
+
|
39
|
+
var splitContent = content.split(keyword); // 再将高亮后的keyword节点,插空填入数组
|
40
|
+
|
41
|
+
var highlightResult = splitContent.reduce(function (prev, word, index) {
|
42
|
+
prev.push(word);
|
43
|
+
|
44
|
+
if (index !== splitContent.length - 1) {
|
45
|
+
prev.push(createHighlightNode(config, index));
|
46
|
+
}
|
47
|
+
|
48
|
+
return prev;
|
49
|
+
}, []);
|
50
|
+
return highlightResult;
|
51
|
+
}
|
52
|
+
/**
|
53
|
+
* 高亮搜索候选项和关键字的最长前缀公共字符串
|
54
|
+
*
|
55
|
+
*/
|
56
|
+
|
57
|
+
|
58
|
+
function highlightWithPrefixMode(config) {
|
59
|
+
var _config$content2 = config.content,
|
60
|
+
content = _config$content2 === void 0 ? '' : _config$content2,
|
61
|
+
_config$keyword2 = config.keyword,
|
62
|
+
keyword = _config$keyword2 === void 0 ? '' : _config$keyword2,
|
63
|
+
otherConfig = (0, _objectWithoutPropertiesLoose2.default)(config, _excluded);
|
64
|
+
var splitIndex = -1;
|
65
|
+
|
66
|
+
for (var i = 0; i < keyword.length; i++) {
|
67
|
+
if (i >= content.length || content[i] !== keyword[i]) {
|
68
|
+
break;
|
69
|
+
}
|
70
|
+
|
71
|
+
splitIndex = i;
|
72
|
+
}
|
73
|
+
|
74
|
+
return splitIndex > -1 ? [createHighlightNode((0, _extends2.default)({}, otherConfig, {
|
75
|
+
keyword: content.substring(0, splitIndex + 1)
|
76
|
+
}), 0), content.substring(splitIndex + 1)] : content;
|
77
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { SearchAssociationBaseItem, SearchBarProps, SearchBarRef } from './type';
|
3
|
+
export { SearchBarProps, SearchBarRef, SearchAssociationHighlightMode, SearchAssociationItem, SearchAssociationShowType, SearchBarShape, } from './type';
|
4
|
+
/**
|
5
|
+
* 搜索栏组件
|
6
|
+
* @en SearchBar component
|
7
|
+
* @type 数据录入
|
8
|
+
* @type_en Data Entry
|
9
|
+
* @name 搜索栏
|
10
|
+
* @name_en SearchBar
|
11
|
+
*/
|
12
|
+
declare const SearchBar: React.ForwardRefExoticComponent<SearchBarProps<SearchAssociationBaseItem> & React.RefAttributes<SearchBarRef>>;
|
13
|
+
export default SearchBar;
|