@arco-design/mobile-react 2.20.0 → 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 +30 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/avatar/index.d.ts +1 -1
- package/cjs/avatar/index.js +1 -1
- package/cjs/badge/index.d.ts +1 -1
- package/cjs/badge/index.js +1 -1
- 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/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.js +36 -20
- package/cjs/dropdown/style/css/index.css +3 -0
- package/cjs/dropdown/style/index.less +2 -0
- package/cjs/ellipsis/index.d.ts +1 -1
- package/cjs/ellipsis/index.js +1 -1
- package/cjs/image/index.d.ts +1 -1
- package/cjs/image/index.js +1 -1
- package/cjs/image-picker/index.d.ts +4 -175
- package/cjs/image-picker/index.js +41 -18
- package/cjs/image-picker/type.d.ts +174 -0
- package/cjs/image-picker/type.js +3 -0
- package/cjs/image-preview/index.d.ts +1 -1
- package/cjs/image-preview/index.js +1 -1
- package/cjs/index.d.ts +2 -0
- package/cjs/index.js +9 -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/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/slider/index.d.ts +1 -1
- package/cjs/slider/index.js +1 -1
- package/cjs/steps/index.d.ts +1 -1
- package/cjs/steps/index.js +1 -1
- package/cjs/sticky/index.d.ts +1 -1
- package/cjs/style.d.ts +2 -0
- package/cjs/style.js +4 -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 +7450 -6611
- package/dist/index.min.js +6 -6
- package/dist/style.css +203 -0
- package/dist/style.min.css +1 -1
- package/esm/avatar/index.d.ts +1 -1
- package/esm/avatar/index.js +1 -1
- package/esm/badge/index.d.ts +1 -1
- package/esm/badge/index.js +1 -1
- 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/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.js +36 -20
- package/esm/dropdown/style/css/index.css +3 -0
- package/esm/dropdown/style/index.less +2 -0
- package/esm/ellipsis/index.d.ts +1 -1
- package/esm/ellipsis/index.js +1 -1
- package/esm/image/index.d.ts +1 -1
- package/esm/image/index.js +1 -1
- package/esm/image-picker/index.d.ts +4 -175
- package/esm/image-picker/index.js +30 -17
- package/esm/image-picker/type.d.ts +174 -0
- package/esm/image-picker/type.js +1 -0
- package/esm/image-preview/index.d.ts +1 -1
- package/esm/image-preview/index.js +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.js +2 -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/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/slider/index.d.ts +1 -1
- package/esm/slider/index.js +1 -1
- package/esm/steps/index.d.ts +1 -1
- package/esm/steps/index.js +1 -1
- package/esm/sticky/index.d.ts +1 -1
- package/esm/style.d.ts +2 -0
- package/esm/style.js +2 -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 +34 -0
- package/tokens/app/arcodesign/default/index.d.ts +34 -0
- package/tokens/app/arcodesign/default/index.js +34 -0
- package/tokens/app/arcodesign/default/index.json +398 -0
- package/tokens/app/arcodesign/default/index.less +34 -0
- package/umd/avatar/index.d.ts +1 -1
- package/umd/avatar/index.js +1 -1
- package/umd/badge/index.d.ts +1 -1
- package/umd/badge/index.js +1 -1
- 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/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.js +36 -20
- package/umd/dropdown/style/css/index.css +3 -0
- package/umd/dropdown/style/index.less +2 -0
- package/umd/ellipsis/index.d.ts +1 -1
- package/umd/ellipsis/index.js +1 -1
- package/umd/image/index.d.ts +1 -1
- package/umd/image/index.js +1 -1
- package/umd/image-picker/index.d.ts +4 -175
- package/umd/image-picker/index.js +40 -22
- package/umd/image-picker/type.d.ts +174 -0
- package/umd/image-picker/type.js +17 -0
- package/umd/image-preview/index.d.ts +1 -1
- package/umd/image-preview/index.js +1 -1
- package/umd/index.d.ts +2 -0
- package/umd/index.js +9 -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/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/slider/index.d.ts +1 -1
- package/umd/slider/index.js +1 -1
- package/umd/steps/index.d.ts +1 -1
- package/umd/steps/index.js +1 -1
- package/umd/sticky/index.d.ts +1 -1
- package/umd/style.d.ts +2 -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/CHANGELOG.md
CHANGED
@@ -3,6 +3,36 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
# [2.21.0](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.19.1...@arco-design/mobile-react@2.21.0) (2022-08-29)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* `Button` support coverIconWhenLoading ([#33](https://github.com/arco-design/arco-design-mobile/issues/33)) ([4213959](https://github.com/arco-design/arco-design-mobile/commit/421395918c8dc8ec8e6cb742aeed46503eaef925))
|
12
|
+
* `Dropdown` optimize animation when direction changed ([2022692](https://github.com/arco-design/arco-design-mobile/commit/20226924759486d66ecae7a8e466bc1c676cd923))
|
13
|
+
* `Dropdown` support customize select icon & value of string type ([9eb6f5d](https://github.com/arco-design/arco-design-mobile/commit/9eb6f5db76d2a1975e61a478d897522cf8bcbf8e))
|
14
|
+
* `DropdownMenu` optimize renderSelectLabel params ([1c685fd](https://github.com/arco-design/arco-design-mobile/commit/1c685fd85851f6735d1d91dc49c6f28ade0a858c))
|
15
|
+
* `ImagePicker` convert event.target.files to array ([dec36f1](https://github.com/arco-design/arco-design-mobile/commit/dec36f1edf313e34bb1fd290ce314206639a5717))
|
16
|
+
* `ImagePicker` fix uploaded images change ([#44](https://github.com/arco-design/arco-design-mobile/issues/44)) ([7511837](https://github.com/arco-design/arco-design-mobile/commit/75118376f7b08f39a2c438737075a0af0d39004d))
|
17
|
+
* `ImagePicker` optimize display when uploading ([a99f2f3](https://github.com/arco-design/arco-design-mobile/commit/a99f2f3e2927ce2f263a496da09e391395a8b545))
|
18
|
+
* `NavBar` trigger caculation when showOffset changes ([06119ce](https://github.com/arco-design/arco-design-mobile/commit/06119ceeefb286ac963dae0f8b49a1112063d1b9))
|
19
|
+
* `PopupSwiper` optimize moving direction ([fe1d100](https://github.com/arco-design/arco-design-mobile/commit/fe1d100fb3aba069ad66255c93654823beebf249))
|
20
|
+
* `ShowMonitor` support flush visible status ([#31](https://github.com/arco-design/arco-design-mobile/issues/31)) ([bdad151](https://github.com/arco-design/arco-design-mobile/commit/bdad151e8a466f20e3e033ccec9a5d458ff4fbf4))
|
21
|
+
* `Steps` converge style to token ([6cf4f26](https://github.com/arco-design/arco-design-mobile/commit/6cf4f267a271dc0d03f559c4aca8199f9fcae2ec))
|
22
|
+
* `Tabs` limit max scroll distance close ([#37](https://github.com/arco-design/arco-design-mobile/issues/37)) ([e716d01](https://github.com/arco-design/arco-design-mobile/commit/e716d014dfa34c4159d4011d2a1ccd5b7d133b4c)), closes [#36](https://github.com/arco-design/arco-design-mobile/issues/36)
|
23
|
+
* components classname optimize: `Avatar` & `Button` & `Badge` ([e6b70dd](https://github.com/arco-design/arco-design-mobile/commit/e6b70dd5eebb23646f2e7639b8a8a73bd51e57c3))
|
24
|
+
|
25
|
+
|
26
|
+
### Features
|
27
|
+
|
28
|
+
* add new component `ImagePicker` ([#24](https://github.com/arco-design/arco-design-mobile/issues/24)) ([73f6156](https://github.com/arco-design/arco-design-mobile/commit/73f615651f46dc670f29733f6b99ec56795fc48b))
|
29
|
+
* add new component `SearchBar` ([#22](https://github.com/arco-design/arco-design-mobile/issues/22)) ([36cf4d4](https://github.com/arco-design/arco-design-mobile/commit/36cf4d4d61506358cd84b41738d817db8399c04f))
|
30
|
+
* add new component `SwipeAction` ([221dc57](https://github.com/arco-design/arco-design-mobile/commit/221dc5776a508fcccd27de992e1ae58d137b7fb6))
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
|
6
36
|
# [2.20.0](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.19.1...@arco-design/mobile-react@2.20.0) (2022-08-12)
|
7
37
|
|
8
38
|
|
package/README.en-US.md
CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="_b
|
|
59
59
|
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">Click here</a>**
|
60
60
|
|
61
61
|
```
|
62
|
-
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.
|
63
|
-
<script src="https://unpkg.com/@arco-design/mobile-react@2.
|
62
|
+
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.20.0/dist/style.min.css">
|
63
|
+
<script src="https://unpkg.com/@arco-design/mobile-react@2.20.0/dist/index.min.js"></script>
|
64
64
|
```
|
65
65
|
|
66
66
|
## Full import
|
package/README.md
CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="
|
|
59
59
|
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">戳这里获取</a>**
|
60
60
|
|
61
61
|
```
|
62
|
-
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.
|
63
|
-
<script src="https://unpkg.com/@arco-design/mobile-react@2.
|
62
|
+
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.20.0/dist/style.min.css">
|
63
|
+
<script src="https://unpkg.com/@arco-design/mobile-react@2.20.0/dist/index.min.js"></script>
|
64
64
|
```
|
65
65
|
|
66
66
|
## 引入全部
|
package/cjs/avatar/index.d.ts
CHANGED
@@ -9,7 +9,7 @@ declare const _default: React.ForwardRefExoticComponent<AvatarProps<ImageProps &
|
|
9
9
|
/**
|
10
10
|
* 头像展示组件,支持圆形和方形两种形状,支持图片文字头像,支持五种尺寸。
|
11
11
|
* @en Avatar component supports two shapes of circle and square, supports pictures or text avatars, with five sizes.
|
12
|
-
* @type
|
12
|
+
* @type 信息展示
|
13
13
|
* @type_en Data Display
|
14
14
|
* @name 头像
|
15
15
|
* @name_en Avatar
|
package/cjs/avatar/index.js
CHANGED
@@ -171,7 +171,7 @@ var Avatar = componentGenerator(_image.BaseImage);
|
|
171
171
|
/**
|
172
172
|
* 头像展示组件,支持圆形和方形两种形状,支持图片文字头像,支持五种尺寸。
|
173
173
|
* @en Avatar component supports two shapes of circle and square, supports pictures or text avatars, with five sizes.
|
174
|
-
* @type
|
174
|
+
* @type 信息展示
|
175
175
|
* @type_en Data Display
|
176
176
|
* @name 头像
|
177
177
|
* @name_en Avatar
|
package/cjs/badge/index.d.ts
CHANGED
package/cjs/badge/index.js
CHANGED
@@ -20,7 +20,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
20
20
|
/**
|
21
21
|
* 在右上角展示徽标数字或小红点
|
22
22
|
* @en Display the badge number or small red dot in the upper right corner
|
23
|
-
* @type
|
23
|
+
* @type 信息展示
|
24
24
|
* @type_en Data Display
|
25
25
|
* @name 徽标
|
26
26
|
* @name_en Badge
|
package/cjs/carousel/index.d.ts
CHANGED
@@ -357,7 +357,7 @@ export interface CarouselRef {
|
|
357
357
|
/**
|
358
358
|
* 轮播组件,支持自定义轮播索引样式及滑块宽度。**需要注意的是,如果正使用`fastclick`,需要为 touchstart 的 target 添加`needsclick`类**(<a href="https://github.com/ftlabs/fastclick#ignore-certain-elements-with-needsclick" target="_blank">详情戳这里</a>),以规避`fastclick`逻辑与组件内部的手势冲突。(如果使用了`list`属性则无需额外添加)
|
359
359
|
* @en Carousel component, supports custom carousel index style and slider width. **Note that if you are using `fastclick`, you need to add a `needsclick` class to the touchstart target ** (<a href="https://github.com/ftlabs/fastclick#ignore-certain-elements- with-needsclick" target="_blank">click here for details</a>) to avoid `fastclick` logic conflicts with gestures inside the component. (no need to add if `list` is set)
|
360
|
-
* @type
|
360
|
+
* @type 信息展示
|
361
361
|
* @type_en Data Display
|
362
362
|
* @name 轮播图
|
363
363
|
* @name_en Carousel
|
package/cjs/carousel/index.js
CHANGED
@@ -22,7 +22,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
22
22
|
/**
|
23
23
|
* 轮播组件,支持自定义轮播索引样式及滑块宽度。**需要注意的是,如果正使用`fastclick`,需要为 touchstart 的 target 添加`needsclick`类**(<a href="https://github.com/ftlabs/fastclick#ignore-certain-elements-with-needsclick" target="_blank">详情戳这里</a>),以规避`fastclick`逻辑与组件内部的手势冲突。(如果使用了`list`属性则无需额外添加)
|
24
24
|
* @en Carousel component, supports custom carousel index style and slider width. **Note that if you are using `fastclick`, you need to add a `needsclick` class to the touchstart target ** (<a href="https://github.com/ftlabs/fastclick#ignore-certain-elements- with-needsclick" target="_blank">click here for details</a>) to avoid `fastclick` logic conflicts with gestures inside the component. (no need to add if `list` is set)
|
25
|
-
* @type
|
25
|
+
* @type 信息展示
|
26
26
|
* @type_en Data Display
|
27
27
|
* @name 轮播图
|
28
28
|
* @name_en Carousel
|
package/cjs/cell/index.d.ts
CHANGED
@@ -6,7 +6,7 @@ declare const _default: import("react").ForwardRefExoticComponent<import("./type
|
|
6
6
|
/**
|
7
7
|
* 单元格组件,含单元格及单元格组合,常用于设置项、表单等。
|
8
8
|
* @en Cell, including cells and cell group, are often used to set items, forms, etc.
|
9
|
-
* @type
|
9
|
+
* @type 信息展示
|
10
10
|
* @type_en Data Display
|
11
11
|
* @name 单元格
|
12
12
|
* @name_en Cell
|
package/cjs/cell/index.js
CHANGED
@@ -22,7 +22,7 @@ var Group = (0, _group.componentGenerator)(_cell.Cell);
|
|
22
22
|
/**
|
23
23
|
* 单元格组件,含单元格及单元格组合,常用于设置项、表单等。
|
24
24
|
* @en Cell, including cells and cell group, are often used to set items, forms, etc.
|
25
|
-
* @type
|
25
|
+
* @type 信息展示
|
26
26
|
* @type_en Data Display
|
27
27
|
* @name 单元格
|
28
28
|
* @name_en Cell
|
package/cjs/checkbox/index.d.ts
CHANGED
@@ -8,7 +8,7 @@ declare const _default: import("react").ForwardRefExoticComponent<import("./type
|
|
8
8
|
* @en Checkbox, click to switch selection when available, support disabled status, support checkbox group.
|
9
9
|
* @name 复选框
|
10
10
|
* @name_en Checkbox
|
11
|
-
* @type
|
11
|
+
* @type 数据录入
|
12
12
|
* @type_en Data Entry
|
13
13
|
*/
|
14
14
|
export default _default;
|
package/cjs/checkbox/index.js
CHANGED
@@ -29,7 +29,7 @@ var Group = (0, _group.componentGenerator)(_checkbox.Checkbox);
|
|
29
29
|
* @en Checkbox, click to switch selection when available, support disabled status, support checkbox group.
|
30
30
|
* @name 复选框
|
31
31
|
* @name_en Checkbox
|
32
|
-
* @type
|
32
|
+
* @type 数据录入
|
33
33
|
* @type_en Data Entry
|
34
34
|
*/
|
35
35
|
|
package/cjs/collapse/index.d.ts
CHANGED
package/cjs/collapse/index.js
CHANGED
package/cjs/count-down/index.js
CHANGED
@@ -30,7 +30,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
30
30
|
* @en Countdown Component
|
31
31
|
* @name 倒计时
|
32
32
|
* @name_en CountDown
|
33
|
-
* @type
|
33
|
+
* @type 信息展示
|
34
34
|
* @type_en Data Display
|
35
35
|
*/
|
36
36
|
var CountDown = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
@@ -12,7 +12,7 @@ export interface DatePickerRef {
|
|
12
12
|
/**
|
13
13
|
* 日期时间选择器,基于`Picker`组件扩展,支持指定范围,单位可精确到秒。
|
14
14
|
* @en Date picker, based on the `Picker` component, supports the specified range, the unit can be accurate to seconds.
|
15
|
-
* @type
|
15
|
+
* @type 数据录入
|
16
16
|
* @type_en Data Entry
|
17
17
|
* @name 日期时间选择器
|
18
18
|
* @name_en DatePicker
|
package/cjs/date-picker/index.js
CHANGED
@@ -51,7 +51,7 @@ var initDate = Date.now();
|
|
51
51
|
/**
|
52
52
|
* 日期时间选择器,基于`Picker`组件扩展,支持指定范围,单位可精确到秒。
|
53
53
|
* @en Date picker, based on the `Picker` component, supports the specified range, the unit can be accurate to seconds.
|
54
|
-
* @type
|
54
|
+
* @type 数据录入
|
55
55
|
* @type_en Data Entry
|
56
56
|
* @name 日期时间选择器
|
57
57
|
* @name_en DatePicker
|
package/cjs/dropdown/dropdown.js
CHANGED
@@ -96,7 +96,7 @@ function componentGenerator(Comp) {
|
|
96
96
|
// @en down=0 is to expand upwards, 1 is to expand downwards
|
97
97
|
|
98
98
|
|
99
|
-
var _useState3 = (0, _react.useState)(
|
99
|
+
var _useState3 = (0, _react.useState)(null),
|
100
100
|
down = _useState3[0],
|
101
101
|
setDown = _useState3[1];
|
102
102
|
|
@@ -135,12 +135,15 @@ function componentGenerator(Comp) {
|
|
135
135
|
|
136
136
|
(0, _helpers.usePopupScroll)(showDropdown, domRef.current, getScrollContainer);
|
137
137
|
(0, _helpers.usePreventBodyScroll)(showDropdown, preventBodyScroll, initialBodyOverflow);
|
138
|
-
(0, _react.
|
138
|
+
var updateDown = (0, _react.useCallback)(function (wrapperHeight) {
|
139
139
|
var _dropdownContainer$cu2;
|
140
140
|
|
141
141
|
// 为0的时候不改变
|
142
142
|
// @en Does not change when it is 0
|
143
|
-
if (
|
143
|
+
if (wrapperHeight === 0) {
|
144
|
+
return;
|
145
|
+
}
|
146
|
+
|
144
147
|
var tempEl = getAnchorElement ? getAnchorElement() : (_dropdownContainer$cu2 = dropdownContainer.current) == null ? void 0 : _dropdownContainer$cu2.parentElement;
|
145
148
|
|
146
149
|
var _ref = (tempEl == null ? void 0 : tempEl.getBoundingClientRect()) || {
|
@@ -155,7 +158,7 @@ function componentGenerator(Comp) {
|
|
155
158
|
var tempMaskHeight = windowHeight - tempTop; // 没有指定方向,且空间足够时,或向上展开的空间不够,向下展开
|
156
159
|
// @en If there is no specified direction and there is enough space, or there is not enough space to expand upward, expand downward
|
157
160
|
|
158
|
-
var tempDown = direction !== 'up' &&
|
161
|
+
var tempDown = direction !== 'up' && wrapperHeight < tempMaskHeight || wrapperHeight > tempTop;
|
159
162
|
|
160
163
|
if (tempDown) {
|
161
164
|
maskHeight.current = tempMaskHeight;
|
@@ -172,7 +175,7 @@ function componentGenerator(Comp) {
|
|
172
175
|
}
|
173
176
|
|
174
177
|
setDown(tempDown);
|
175
|
-
}, [
|
178
|
+
}, [props.top, props.bottom, Boolean(getAnchorElement), direction, windowHeight]);
|
176
179
|
/**
|
177
180
|
* 取消选择
|
178
181
|
* @en Cancel selection
|
@@ -213,19 +216,27 @@ function componentGenerator(Comp) {
|
|
213
216
|
};
|
214
217
|
}, [showDropdown, clickOtherToClose, handleCancel]);
|
215
218
|
(0, _react.useEffect)(function () {
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
219
|
+
var wrapperHeight = 0;
|
220
|
+
|
221
|
+
if (height !== void 0) {
|
222
|
+
// 受控模式下,完全交由外层控制
|
223
|
+
// @en In controlled mode, it is completely controlled by the outer layer
|
224
|
+
wrapperHeight = height;
|
225
|
+
} else {
|
226
|
+
if (!optionsContainer.current) return;
|
227
|
+
|
228
|
+
if (!showDropdown) {
|
229
|
+
wrapperHeight = 0;
|
221
230
|
} else {
|
222
|
-
|
223
|
-
if (!showDropdown) setOptionsWrapperHeight(0);else {
|
224
|
-
setOptionsWrapperHeight(optionsContainer.current.getBoundingClientRect().height);
|
225
|
-
}
|
231
|
+
wrapperHeight = optionsContainer.current.getBoundingClientRect().height;
|
226
232
|
}
|
233
|
+
}
|
234
|
+
|
235
|
+
updateDown(wrapperHeight);
|
236
|
+
(0, _mobileUtils.nextTick)(function () {
|
237
|
+
setOptionsWrapperHeight(wrapperHeight);
|
227
238
|
});
|
228
|
-
}, [showDropdown, options.length, height]);
|
239
|
+
}, [showDropdown, options.length, height, updateDown]);
|
229
240
|
(0, _react.useImperativeHandle)(ref, function () {
|
230
241
|
return {
|
231
242
|
dom: domRef.current
|
@@ -234,13 +245,17 @@ function componentGenerator(Comp) {
|
|
234
245
|
|
235
246
|
function getOptionsStyle() {
|
236
247
|
var trans = down ? 'translateY(-100%)' : 'translateY(100%)';
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
248
|
+
var transStyle = down === null ? {
|
249
|
+
opacity: 0
|
250
|
+
} : {
|
251
|
+
opacity: 1,
|
252
|
+
transform: optionsWrapperHeight ? 'translateY(0)' : trans,
|
253
|
+
transition: "all " + dropdownAnimationTimeout + "ms " + dropdownAnimationFunction
|
254
|
+
};
|
255
|
+
return (0, _helpers.getStyleWithVendor)((0, _extends2.default)({}, transStyle, {
|
241
256
|
overflow: optionsWrapperHeight > maxHeight || height ? 'auto' : 'hidden',
|
242
257
|
maxHeight: maxHeight + "px"
|
243
|
-
});
|
258
|
+
}));
|
244
259
|
}
|
245
260
|
|
246
261
|
function renderInnerOptions() {
|
@@ -274,6 +289,7 @@ function componentGenerator(Comp) {
|
|
274
289
|
},
|
275
290
|
onExited: function onExited(el) {
|
276
291
|
el.style.visibility = 'hidden';
|
292
|
+
setDown(null);
|
277
293
|
},
|
278
294
|
mountOnEnter: mountOnEnter,
|
279
295
|
unmountOnExit: unmountOnExit
|
package/cjs/ellipsis/index.d.ts
CHANGED
@@ -4,7 +4,7 @@ export * from './type';
|
|
4
4
|
/**
|
5
5
|
* 文本缩略组件,支持多行缩略、富文本、自定义缩略符、尾字符过滤等。
|
6
6
|
* @en Text ellipsis component supports multi-line abbreviations, rich text, custom abbreviations, tail character filtering, etc.
|
7
|
-
* @type
|
7
|
+
* @type 信息展示
|
8
8
|
* @type_en Data Display
|
9
9
|
* @name 文本缩略
|
10
10
|
* @name_en Ellipsis
|
package/cjs/ellipsis/index.js
CHANGED
@@ -34,7 +34,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
34
34
|
/**
|
35
35
|
* 文本缩略组件,支持多行缩略、富文本、自定义缩略符、尾字符过滤等。
|
36
36
|
* @en Text ellipsis component supports multi-line abbreviations, rich text, custom abbreviations, tail character filtering, etc.
|
37
|
-
* @type
|
37
|
+
* @type 信息展示
|
38
38
|
* @type_en Data Display
|
39
39
|
* @name 文本缩略
|
40
40
|
* @name_en Ellipsis
|
package/cjs/image/index.d.ts
CHANGED
@@ -177,7 +177,7 @@ export interface ImageRef {
|
|
177
177
|
/**
|
178
178
|
* 增强版的 img 标签,提供多种图片填充模式,支持图片加载中提示、加载失败提示。
|
179
179
|
* @en Enhanced img tag, provides a variety of image filling modes, and supports image loading prompts and loading failure prompts.
|
180
|
-
* @type
|
180
|
+
* @type 信息展示
|
181
181
|
* @type_en Data Display
|
182
182
|
* @name 图片
|
183
183
|
* @name_en Image
|
package/cjs/image/index.js
CHANGED
@@ -24,7 +24,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
24
24
|
/**
|
25
25
|
* 增强版的 img 标签,提供多种图片填充模式,支持图片加载中提示、加载失败提示。
|
26
26
|
* @en Enhanced img tag, provides a variety of image filling modes, and supports image loading prompts and loading failure prompts.
|
27
|
-
* @type
|
27
|
+
* @type 信息展示
|
28
28
|
* @type_en Data Display
|
29
29
|
* @name 图片
|
30
30
|
* @name_en Image
|
@@ -1,181 +1,10 @@
|
|
1
|
-
import React
|
2
|
-
import {
|
3
|
-
export
|
4
|
-
/**
|
5
|
-
* 图片地址
|
6
|
-
* @en Image Url
|
7
|
-
*/
|
8
|
-
url: string;
|
9
|
-
/**
|
10
|
-
* 图片文件
|
11
|
-
* @en Image File
|
12
|
-
*/
|
13
|
-
file?: File;
|
14
|
-
/**
|
15
|
-
* 图片状态
|
16
|
-
* @en Image Status
|
17
|
-
* @default 以图片自身加载状态而定
|
18
|
-
* @default_en According to inner status of the image
|
19
|
-
*/
|
20
|
-
status?: 'loaded' | 'loading' | 'error';
|
21
|
-
}
|
22
|
-
export interface AdapterFile {
|
23
|
-
url?: string;
|
24
|
-
size: number;
|
25
|
-
name: string;
|
26
|
-
}
|
27
|
-
export interface SelectCallback {
|
28
|
-
files: AdapterFile[];
|
29
|
-
}
|
30
|
-
export interface ImagePickerProps {
|
31
|
-
/**
|
32
|
-
* 自定义类名
|
33
|
-
* @en Custom className
|
34
|
-
*/
|
35
|
-
className?: string;
|
36
|
-
/**
|
37
|
-
* 自定义样式
|
38
|
-
* @en Custom stylesheet
|
39
|
-
*/
|
40
|
-
style?: React.CSSProperties;
|
41
|
-
/**
|
42
|
-
* 已选择图片列表
|
43
|
-
* @en selected images list
|
44
|
-
*/
|
45
|
-
images: ImagePickItem[];
|
46
|
-
/**
|
47
|
-
* 可以选择的文件类型
|
48
|
-
* @en Available File Types
|
49
|
-
* @default 'image/*'
|
50
|
-
*/
|
51
|
-
accept?: string;
|
52
|
-
/**
|
53
|
-
* 是否支持多选
|
54
|
-
* @en Whether To Support Multiple Selection
|
55
|
-
*/
|
56
|
-
multiple?: boolean;
|
57
|
-
/**
|
58
|
-
* 图片选取模式 Image selection mode [capture MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/capture)
|
59
|
-
* @en Whether To Support Multiple Selection [capture MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/capture)
|
60
|
-
*/
|
61
|
-
capture?: InputHTMLAttributes<unknown>['capture'];
|
62
|
-
/**
|
63
|
-
* 一行展示图片张数
|
64
|
-
* @en The Number Of Pictures Displayed In A Row
|
65
|
-
* @default 3
|
66
|
-
*/
|
67
|
-
columns?: number;
|
68
|
-
/**
|
69
|
-
* 格子间的间距
|
70
|
-
* @en spacing between grids
|
71
|
-
* @default 8
|
72
|
-
*/
|
73
|
-
gutter?: number;
|
74
|
-
/**
|
75
|
-
* 最多选择图片张数,超出数量自动隐藏上传按钮,0表示不做限制
|
76
|
-
* @en max Pictures Can Choose
|
77
|
-
*/
|
78
|
-
limit?: number;
|
79
|
-
/**
|
80
|
-
* 文件大小限制,单位为K
|
81
|
-
* @en File size limit, in K
|
82
|
-
*/
|
83
|
-
maxSize?: number;
|
84
|
-
/**
|
85
|
-
* 是否隐藏删除Icon
|
86
|
-
* @en Whether to hide delete Icon
|
87
|
-
* @default false
|
88
|
-
*/
|
89
|
-
hideDelete?: boolean;
|
90
|
-
/**
|
91
|
-
* 是否隐藏选择Icon
|
92
|
-
* @en Whether to hide Select Icon
|
93
|
-
* @default false
|
94
|
-
*/
|
95
|
-
hideSelect?: boolean;
|
96
|
-
/**
|
97
|
-
* 是否总是展示选择Icon,默认情况下当图片数量超出limit值时会自动隐藏选择Icon
|
98
|
-
* @en Whether to always show Select Icon
|
99
|
-
* @default false
|
100
|
-
*/
|
101
|
-
alwaysShowSelect?: boolean;
|
102
|
-
/**
|
103
|
-
* 禁用选择和删除图片
|
104
|
-
* @en Disable Select & Delete Image
|
105
|
-
*/
|
106
|
-
disabled?: boolean;
|
107
|
-
/**
|
108
|
-
* 自定义删除图标
|
109
|
-
* @en Defined Delete Icon
|
110
|
-
*/
|
111
|
-
deleteIcon?: React.ReactNode;
|
112
|
-
/**
|
113
|
-
* 自定义选择图标
|
114
|
-
* @en Defined Select Icon
|
115
|
-
*/
|
116
|
-
selectIcon?: React.ReactNode;
|
117
|
-
/**
|
118
|
-
* 透传给图片的属性
|
119
|
-
* @en Attributes passed through to the image
|
120
|
-
*/
|
121
|
-
imageProps?: Partial<ImageProps>;
|
122
|
-
/**
|
123
|
-
* 自定义上传失败展示
|
124
|
-
* @en Defined upload failed display
|
125
|
-
*/
|
126
|
-
renderError?: (index?: number) => React.ReactNode | React.ReactNode;
|
127
|
-
/**
|
128
|
-
* 自定义上传中展示
|
129
|
-
* @en Defined uploading display
|
130
|
-
*/
|
131
|
-
renderLoading?: (index?: number) => React.ReactNode | React.ReactNode;
|
132
|
-
/**
|
133
|
-
* 上传方法
|
134
|
-
* @en upload function
|
135
|
-
*/
|
136
|
-
upload?: (file: ImagePickItem) => Promise<ImagePickItem | null>;
|
137
|
-
/**
|
138
|
-
* 已选图片列表发生变化
|
139
|
-
* @en The list of selected images changes
|
140
|
-
*/
|
141
|
-
onChange?: (fileList: ImagePickItem[]) => void;
|
142
|
-
/**
|
143
|
-
* 图片超过限制大小
|
144
|
-
* @en Image exceeds size limit
|
145
|
-
*/
|
146
|
-
onMaxSizeExceed?: (file: File) => void;
|
147
|
-
/**
|
148
|
-
* 选择张数超过限制
|
149
|
-
* @en The number of pictures exceeds the limit
|
150
|
-
*/
|
151
|
-
onLimitExceed?: (files: File[]) => void;
|
152
|
-
/**
|
153
|
-
* 图片点击
|
154
|
-
* @en click event
|
155
|
-
*/
|
156
|
-
onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>, image: ImagePickItem, index: number) => void;
|
157
|
-
/**
|
158
|
-
* 图片长按事件
|
159
|
-
* @en long press event
|
160
|
-
*/
|
161
|
-
onLongPress?: (e: React.TouchEvent<HTMLElement>, image: ImagePickItem, index: number) => void;
|
162
|
-
/**
|
163
|
-
* 图片选择适配器
|
164
|
-
* @en Select Adaptor
|
165
|
-
*/
|
166
|
-
selectAdapter?: () => Promise<SelectCallback>;
|
167
|
-
}
|
168
|
-
export interface ImagePickerRef {
|
169
|
-
/**
|
170
|
-
* 最外层 DOM 元素
|
171
|
-
* @en The outer DOM element of the component
|
172
|
-
*/
|
173
|
-
dom: HTMLDivElement | null;
|
174
|
-
}
|
1
|
+
import React from 'react';
|
2
|
+
import { ImagePickerProps, ImagePickerRef } from './type';
|
3
|
+
export * from './type';
|
175
4
|
/**
|
176
5
|
* 图片选择器组件
|
177
6
|
* @en ImagePicker Component
|
178
|
-
* @type
|
7
|
+
* @type 数据录入
|
179
8
|
* @type_en Data Entry
|
180
9
|
* @name 图片选择器
|
181
10
|
* @name_en ImagePicker
|