antd-mobile 5.0.0-rc.21 → 5.0.0-rc.25
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/2x/README.md +7 -6
- package/2x/cjs/components/avatar/avatar.d.ts +1 -1
- package/2x/cjs/components/badge/badge.css +18 -10
- package/2x/cjs/components/badge/badge.d.ts +1 -0
- package/2x/cjs/components/badge/badge.js +4 -5
- package/2x/cjs/components/button/button.css +1 -1
- package/2x/cjs/components/calendar/calendar.js +4 -0
- package/2x/cjs/components/capsule-tabs/capsule-tabs.css +1 -1
- package/2x/cjs/components/cascade-picker-view/cascade-picker-view.d.ts +1 -2
- package/2x/cjs/components/checkbox/check-icon.js +4 -13
- package/2x/cjs/components/checkbox/checkbox.css +11 -30
- package/2x/cjs/components/checkbox/checkbox.js +4 -6
- package/2x/cjs/components/checkbox/indeterminate-icon.d.ts +3 -0
- package/2x/cjs/components/checkbox/indeterminate-icon.js +24 -0
- package/2x/cjs/components/date-picker/date-picker.d.ts +1 -1
- package/2x/cjs/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/2x/cjs/components/error-block/error-block.d.ts +1 -1
- package/2x/cjs/components/floating-bubble/floating-bubble.css +1 -0
- package/2x/cjs/components/floating-panel/floating-panel.d.ts +2 -0
- package/2x/cjs/components/floating-panel/floating-panel.js +5 -0
- package/2x/cjs/components/form/form-item.css +3 -2
- package/2x/cjs/components/form/form-item.d.ts +2 -2
- package/2x/cjs/components/form/form-item.js +9 -5
- package/2x/cjs/components/form/form.css +7 -3
- package/2x/cjs/components/form/form.d.ts +5 -4
- package/2x/cjs/components/form/index.css +10 -5
- package/2x/cjs/components/form/index.d.ts +5 -4
- package/2x/cjs/components/image-viewer/image-viewer.d.ts +8 -2
- package/2x/cjs/components/image-viewer/image-viewer.js +8 -5
- package/2x/cjs/components/image-viewer/index.d.ts +6 -2
- package/2x/cjs/components/image-viewer/slides.d.ts +7 -3
- package/2x/cjs/components/image-viewer/slides.js +18 -11
- package/2x/cjs/components/input/input.css +28 -25
- package/2x/cjs/components/input/input.d.ts +4 -4
- package/2x/cjs/components/input/input.js +10 -4
- package/2x/cjs/components/jumbo-tabs/jumbo-tabs.css +4 -1
- package/2x/cjs/components/list/list.css +2 -6
- package/2x/cjs/components/list/list.d.ts +1 -1
- package/2x/cjs/components/modal/modal.css +25 -20
- package/2x/cjs/components/modal/modal.js +8 -12
- package/2x/cjs/components/nav-bar/nav-bar.css +3 -3
- package/2x/cjs/components/notice-bar/notice-bar.d.ts +1 -1
- package/2x/cjs/components/passcode-input/passcode-input.d.ts +2 -2
- package/2x/cjs/components/picker/picker.css +10 -2
- package/2x/cjs/components/picker/picker.d.ts +1 -1
- package/2x/cjs/components/picker-view/picker-view.css +4 -2
- package/2x/cjs/components/picker-view/picker-view.d.ts +1 -1
- package/2x/cjs/components/picker-view/wheel.js +1 -1
- package/2x/cjs/components/popover/arrow.d.ts +3 -0
- package/2x/cjs/components/popover/arrow.js +26 -0
- package/2x/cjs/components/popover/index.d.ts +7 -15
- package/2x/cjs/components/popover/index.js +4 -2
- package/2x/cjs/components/popover/popover-menu.css +63 -0
- package/2x/cjs/components/popover/popover-menu.d.ts +20 -0
- package/{cjs/components/popover/pop-menu.js → 2x/cjs/components/popover/popover-menu.js} +23 -26
- package/2x/cjs/components/popover/popover.css +90 -318
- package/2x/cjs/components/popover/popover.d.ts +9 -8
- package/2x/cjs/components/popover/popover.js +11 -17
- package/2x/cjs/components/radio/radio.css +9 -12
- package/2x/cjs/components/radio/radio.js +1 -3
- package/2x/cjs/components/result/result.css +2 -5
- package/2x/cjs/components/search-bar/search-bar.css +14 -9
- package/2x/cjs/components/selector/selector.css +4 -0
- package/2x/cjs/components/spin-loading/spin-loading.css +1 -19
- package/2x/cjs/components/spin-loading/spin-loading.d.ts +1 -1
- package/2x/cjs/components/spin-loading/spin-loading.js +33 -5
- package/2x/cjs/components/stepper/stepper.css +4 -7
- package/2x/cjs/components/stepper/stepper.js +0 -1
- package/2x/cjs/components/swipe-action/swipe-action.d.ts +2 -2
- package/2x/cjs/components/swipe-action/swipe-action.js +1 -1
- package/2x/cjs/components/swiper/swiper.js +14 -19
- package/2x/cjs/components/switch/switch.css +8 -3
- package/2x/cjs/components/tabs/tabs.css +1 -1
- package/2x/cjs/components/tag/tag.css +3 -3
- package/2x/cjs/components/text-area/text-area.css +9 -9
- package/2x/cjs/components/text-area/text-area.d.ts +2 -2
- package/2x/cjs/components/text-area/text-area.js +41 -32
- package/2x/cjs/components/virtual-input/virtual-input.d.ts +1 -1
- package/2x/cjs/utils/get-scroll-parent.js +1 -1
- package/2x/es/components/avatar/avatar.d.ts +1 -1
- package/2x/es/components/badge/badge.css +18 -10
- package/2x/es/components/badge/badge.d.ts +1 -0
- package/2x/es/components/badge/badge.js +4 -5
- package/2x/es/components/button/button.css +1 -1
- package/2x/es/components/calendar/calendar.js +2 -0
- package/2x/es/components/capsule-tabs/capsule-tabs.css +1 -1
- package/2x/es/components/cascade-picker-view/cascade-picker-view.d.ts +1 -2
- package/2x/es/components/checkbox/check-icon.js +4 -13
- package/2x/es/components/checkbox/checkbox.css +11 -30
- package/2x/es/components/checkbox/checkbox.js +3 -6
- package/2x/es/components/checkbox/indeterminate-icon.d.ts +3 -0
- package/2x/es/components/checkbox/indeterminate-icon.js +10 -0
- package/2x/es/components/date-picker/date-picker.d.ts +1 -1
- package/2x/es/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/2x/es/components/error-block/error-block.d.ts +1 -1
- package/2x/es/components/floating-bubble/floating-bubble.css +1 -0
- package/2x/es/components/floating-panel/floating-panel.d.ts +2 -0
- package/2x/es/components/floating-panel/floating-panel.js +5 -0
- package/2x/es/components/form/form-item.css +3 -2
- package/2x/es/components/form/form-item.d.ts +2 -2
- package/2x/es/components/form/form-item.js +9 -5
- package/2x/es/components/form/form.css +7 -3
- package/2x/es/components/form/form.d.ts +5 -4
- package/2x/es/components/form/index.css +10 -5
- package/2x/es/components/form/index.d.ts +5 -4
- package/2x/es/components/image-viewer/image-viewer.d.ts +8 -2
- package/2x/es/components/image-viewer/image-viewer.js +4 -3
- package/2x/es/components/image-viewer/index.d.ts +6 -2
- package/2x/es/components/image-viewer/slides.d.ts +7 -3
- package/2x/es/components/image-viewer/slides.js +19 -10
- package/2x/es/components/input/input.css +28 -25
- package/2x/es/components/input/input.d.ts +4 -4
- package/2x/es/components/input/input.js +7 -4
- package/2x/es/components/jumbo-tabs/jumbo-tabs.css +4 -1
- package/2x/es/components/list/list.css +2 -6
- package/2x/es/components/list/list.d.ts +1 -1
- package/2x/es/components/modal/modal.css +25 -20
- package/2x/es/components/modal/modal.js +8 -12
- package/2x/es/components/nav-bar/nav-bar.css +3 -3
- package/2x/es/components/notice-bar/notice-bar.d.ts +1 -1
- package/2x/es/components/passcode-input/passcode-input.d.ts +2 -2
- package/2x/es/components/picker/picker.css +10 -2
- package/2x/es/components/picker/picker.d.ts +1 -1
- package/2x/es/components/picker-view/picker-view.css +4 -2
- package/2x/es/components/picker-view/picker-view.d.ts +1 -1
- package/2x/es/components/picker-view/wheel.js +1 -1
- package/2x/es/components/popover/arrow.d.ts +3 -0
- package/2x/es/components/popover/arrow.js +12 -0
- package/2x/es/components/popover/index.d.ts +7 -15
- package/2x/es/components/popover/index.js +3 -2
- package/2x/es/components/popover/popover-menu.css +63 -0
- package/2x/es/components/popover/popover-menu.d.ts +20 -0
- package/2x/es/components/popover/popover-menu.js +52 -0
- package/2x/es/components/popover/popover.css +90 -318
- package/2x/es/components/popover/popover.d.ts +9 -8
- package/2x/es/components/popover/popover.js +10 -17
- package/2x/es/components/radio/radio.css +9 -12
- package/2x/es/components/radio/radio.js +1 -3
- package/2x/es/components/result/result.css +2 -5
- package/2x/es/components/search-bar/search-bar.css +14 -9
- package/2x/es/components/selector/selector.css +4 -0
- package/2x/es/components/spin-loading/spin-loading.css +1 -19
- package/2x/es/components/spin-loading/spin-loading.d.ts +1 -1
- package/2x/es/components/spin-loading/spin-loading.js +32 -5
- package/2x/es/components/stepper/stepper.css +4 -7
- package/2x/es/components/stepper/stepper.js +0 -1
- package/2x/es/components/swipe-action/swipe-action.d.ts +2 -2
- package/2x/es/components/swipe-action/swipe-action.js +1 -1
- package/2x/es/components/swiper/swiper.js +13 -19
- package/2x/es/components/switch/switch.css +8 -3
- package/2x/es/components/tabs/tabs.css +1 -1
- package/2x/es/components/tag/tag.css +3 -3
- package/2x/es/components/text-area/text-area.css +9 -9
- package/2x/es/components/text-area/text-area.d.ts +2 -2
- package/2x/es/components/text-area/text-area.js +41 -31
- package/2x/es/components/virtual-input/virtual-input.d.ts +1 -1
- package/2x/es/utils/get-scroll-parent.js +1 -1
- package/2x/package.json +2 -2
- package/README.md +7 -6
- package/cjs/components/avatar/avatar.d.ts +1 -1
- package/cjs/components/badge/badge.css +16 -10
- package/cjs/components/badge/badge.d.ts +1 -0
- package/cjs/components/badge/badge.js +4 -5
- package/cjs/components/button/button.css +1 -1
- package/cjs/components/calendar/calendar.js +4 -0
- package/cjs/components/capsule-tabs/capsule-tabs.css +1 -1
- package/cjs/components/cascade-picker-view/cascade-picker-view.d.ts +1 -2
- package/cjs/components/checkbox/check-icon.js +4 -13
- package/cjs/components/checkbox/checkbox.css +11 -27
- package/cjs/components/checkbox/checkbox.js +4 -6
- package/cjs/components/checkbox/indeterminate-icon.d.ts +3 -0
- package/cjs/components/checkbox/indeterminate-icon.js +24 -0
- package/cjs/components/date-picker/date-picker.d.ts +1 -1
- package/cjs/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/cjs/components/error-block/error-block.d.ts +1 -1
- package/cjs/components/floating-bubble/floating-bubble.css +1 -0
- package/cjs/components/floating-panel/floating-panel.d.ts +2 -0
- package/cjs/components/floating-panel/floating-panel.js +5 -0
- package/cjs/components/form/form-item.css +3 -2
- package/cjs/components/form/form-item.d.ts +2 -2
- package/cjs/components/form/form-item.js +9 -5
- package/cjs/components/form/form.css +6 -3
- package/cjs/components/form/form.d.ts +5 -4
- package/cjs/components/form/index.css +9 -5
- package/cjs/components/form/index.d.ts +5 -4
- package/cjs/components/image-viewer/image-viewer.d.ts +8 -2
- package/cjs/components/image-viewer/image-viewer.js +8 -5
- package/cjs/components/image-viewer/index.d.ts +6 -2
- package/cjs/components/image-viewer/slides.d.ts +7 -3
- package/cjs/components/image-viewer/slides.js +18 -11
- package/cjs/components/input/input.css +26 -24
- package/cjs/components/input/input.d.ts +4 -4
- package/cjs/components/input/input.js +10 -4
- package/cjs/components/jumbo-tabs/jumbo-tabs.css +4 -1
- package/cjs/components/list/list.css +2 -5
- package/cjs/components/list/list.d.ts +1 -1
- package/cjs/components/modal/modal.css +23 -19
- package/cjs/components/modal/modal.js +8 -12
- package/cjs/components/nav-bar/nav-bar.css +3 -3
- package/cjs/components/notice-bar/notice-bar.d.ts +1 -1
- package/cjs/components/passcode-input/passcode-input.d.ts +2 -2
- package/cjs/components/picker/picker.css +9 -2
- package/cjs/components/picker/picker.d.ts +1 -1
- package/cjs/components/picker-view/picker-view.css +4 -2
- package/cjs/components/picker-view/picker-view.d.ts +1 -1
- package/cjs/components/picker-view/wheel.js +1 -1
- package/cjs/components/popover/arrow.d.ts +3 -0
- package/cjs/components/popover/arrow.js +26 -0
- package/cjs/components/popover/index.d.ts +7 -15
- package/cjs/components/popover/index.js +4 -2
- package/cjs/components/popover/popover-menu.css +52 -0
- package/cjs/components/popover/popover-menu.d.ts +20 -0
- package/{2x/cjs/components/popover/pop-menu.js → cjs/components/popover/popover-menu.js} +23 -26
- package/cjs/components/popover/popover.css +83 -276
- package/cjs/components/popover/popover.d.ts +9 -8
- package/cjs/components/popover/popover.js +11 -17
- package/cjs/components/radio/radio.css +9 -12
- package/cjs/components/radio/radio.js +1 -3
- package/cjs/components/result/result.css +2 -5
- package/cjs/components/search-bar/search-bar.css +13 -9
- package/cjs/components/selector/selector.css +3 -0
- package/cjs/components/spin-loading/spin-loading.css +1 -17
- package/cjs/components/spin-loading/spin-loading.d.ts +1 -1
- package/cjs/components/spin-loading/spin-loading.js +33 -5
- package/cjs/components/stepper/stepper.css +4 -6
- package/cjs/components/stepper/stepper.js +0 -1
- package/cjs/components/swipe-action/swipe-action.d.ts +2 -2
- package/cjs/components/swipe-action/swipe-action.js +1 -1
- package/cjs/components/swiper/swiper.js +14 -19
- package/cjs/components/switch/switch.css +8 -3
- package/cjs/components/tabs/tabs.css +1 -1
- package/cjs/components/tag/tag.css +3 -3
- package/cjs/components/text-area/text-area.css +9 -9
- package/cjs/components/text-area/text-area.d.ts +2 -2
- package/cjs/components/text-area/text-area.js +41 -32
- package/cjs/components/virtual-input/virtual-input.d.ts +1 -1
- package/cjs/utils/get-scroll-parent.js +1 -1
- package/es/components/avatar/avatar.d.ts +1 -1
- package/es/components/badge/badge.css +16 -10
- package/es/components/badge/badge.d.ts +1 -0
- package/es/components/badge/badge.js +4 -5
- package/es/components/button/button.css +1 -1
- package/es/components/calendar/calendar.js +2 -0
- package/es/components/capsule-tabs/capsule-tabs.css +1 -1
- package/es/components/cascade-picker-view/cascade-picker-view.d.ts +1 -2
- package/es/components/checkbox/check-icon.js +4 -13
- package/es/components/checkbox/checkbox.css +11 -27
- package/es/components/checkbox/checkbox.js +3 -6
- package/es/components/checkbox/indeterminate-icon.d.ts +3 -0
- package/es/components/checkbox/indeterminate-icon.js +10 -0
- package/es/components/date-picker/date-picker.d.ts +1 -1
- package/es/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/es/components/error-block/error-block.d.ts +1 -1
- package/es/components/floating-bubble/floating-bubble.css +1 -0
- package/es/components/floating-panel/floating-panel.d.ts +2 -0
- package/es/components/floating-panel/floating-panel.js +5 -0
- package/es/components/form/form-item.css +3 -2
- package/es/components/form/form-item.d.ts +2 -2
- package/es/components/form/form-item.js +9 -5
- package/es/components/form/form.css +6 -3
- package/es/components/form/form.d.ts +5 -4
- package/es/components/form/index.css +9 -5
- package/es/components/form/index.d.ts +5 -4
- package/es/components/image-viewer/image-viewer.d.ts +8 -2
- package/es/components/image-viewer/image-viewer.js +4 -3
- package/es/components/image-viewer/index.d.ts +6 -2
- package/es/components/image-viewer/slides.d.ts +7 -3
- package/es/components/image-viewer/slides.js +19 -10
- package/es/components/input/input.css +26 -24
- package/es/components/input/input.d.ts +4 -4
- package/es/components/input/input.js +7 -4
- package/es/components/jumbo-tabs/jumbo-tabs.css +4 -1
- package/es/components/list/list.css +2 -5
- package/es/components/list/list.d.ts +1 -1
- package/es/components/modal/modal.css +23 -19
- package/es/components/modal/modal.js +8 -12
- package/es/components/nav-bar/nav-bar.css +3 -3
- package/es/components/notice-bar/notice-bar.d.ts +1 -1
- package/es/components/passcode-input/passcode-input.d.ts +2 -2
- package/es/components/picker/picker.css +9 -2
- package/es/components/picker/picker.d.ts +1 -1
- package/es/components/picker-view/picker-view.css +4 -2
- package/es/components/picker-view/picker-view.d.ts +1 -1
- package/es/components/picker-view/wheel.js +1 -1
- package/es/components/popover/arrow.d.ts +3 -0
- package/es/components/popover/arrow.js +12 -0
- package/es/components/popover/index.d.ts +7 -15
- package/es/components/popover/index.js +3 -2
- package/es/components/popover/popover-menu.css +52 -0
- package/es/components/popover/popover-menu.d.ts +20 -0
- package/es/components/popover/popover-menu.js +52 -0
- package/es/components/popover/popover.css +83 -276
- package/es/components/popover/popover.d.ts +9 -8
- package/es/components/popover/popover.js +10 -17
- package/es/components/radio/radio.css +9 -12
- package/es/components/radio/radio.js +1 -3
- package/es/components/result/result.css +2 -5
- package/es/components/search-bar/search-bar.css +13 -9
- package/es/components/selector/selector.css +3 -0
- package/es/components/spin-loading/spin-loading.css +1 -17
- package/es/components/spin-loading/spin-loading.d.ts +1 -1
- package/es/components/spin-loading/spin-loading.js +32 -5
- package/es/components/stepper/stepper.css +4 -6
- package/es/components/stepper/stepper.js +0 -1
- package/es/components/swipe-action/swipe-action.d.ts +2 -2
- package/es/components/swipe-action/swipe-action.js +1 -1
- package/es/components/swiper/swiper.js +13 -19
- package/es/components/switch/switch.css +8 -3
- package/es/components/tabs/tabs.css +1 -1
- package/es/components/tag/tag.css +3 -3
- package/es/components/text-area/text-area.css +9 -9
- package/es/components/text-area/text-area.d.ts +2 -2
- package/es/components/text-area/text-area.js +41 -31
- package/es/components/virtual-input/virtual-input.d.ts +1 -1
- package/es/utils/get-scroll-parent.js +1 -1
- package/package.json +2 -2
- package/umd/antd-mobile.js +1 -1
- package/2x/cjs/components/popover/animation.css +0 -111
- package/2x/cjs/components/popover/pop-menu.d.ts +0 -28
- package/2x/es/components/popover/animation.css +0 -111
- package/2x/es/components/popover/pop-menu.d.ts +0 -28
- package/2x/es/components/popover/pop-menu.js +0 -54
- package/cjs/components/popover/animation.css +0 -96
- package/cjs/components/popover/pop-menu.d.ts +0 -28
- package/es/components/popover/animation.css +0 -96
- package/es/components/popover/pop-menu.d.ts +0 -28
- package/es/components/popover/pop-menu.js +0 -54
package/2x/README.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
<img src="https://gw.alipayobjects.com/mdn/rms_ee68a8/afts/img/A*
|
|
1
|
+
<img src="https://gw.alipayobjects.com/mdn/rms_ee68a8/afts/img/A*8HtNS4uMKkAAAAAAAAAAAAAAARQnAQ" alt="logo" width="100%" />
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|

|
|
5
|
-

|
|
6
|
+

|
|
6
7
|

|
|
7
8
|
[](http://isitmaintained.com/project/ant-design/ant-design-mobile 'Average time to resolve an issue')
|
|
8
9
|
[](http://isitmaintained.com/project/ant-design/ant-design-mobile 'Percentage of issues still open')
|
|
9
10
|

|
|
11
|
+
[](https://codecov.io/gh/ant-design/ant-design-mobile)
|
|
10
12
|

|
|
11
13
|
|
|
12
14
|
```bash
|
|
@@ -20,17 +22,16 @@ $ yarn add antd-mobile@next
|
|
|
20
22
|
- **Atomic**: The function of each component, neither more nor less, is exactly what you need.
|
|
21
23
|
- **Fluent**: With smooth gestures and delicate animation, it helps the product create the ultimate experience.
|
|
22
24
|
|
|
23
|
-
v5(Poplar) is the next major version of antd-mobile, we recommend using it instead of v2.
|
|
24
|
-
|
|
25
25
|
You can also play with antd-mobile just in browser with [Codesandbox](https://codesandbox.io/s/antd-mobile-snrxr?file=/package.json). No need to prepare development environment.
|
|
26
26
|
|
|
27
27
|
If you found bugs or would like to request some new features, please consider opening an [issue](https://github.com/ant-design/ant-design-mobile/issues/new).
|
|
28
28
|
|
|
29
29
|
If you have some question about how to use ant-mobile, you can start a [discussion thread](https://github.com/ant-design/ant-design-mobile/discussions).
|
|
30
30
|
|
|
31
|
-
Feel free to join
|
|
31
|
+
And we also have some community groups here. Feel free to join us:
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
- [DingDing](https://gw.alipayobjects.com/mdn/rms_25513e/afts/img/A*hBjlR4nUWjkAAAAAAAAAAAAAARQnAQ)
|
|
34
|
+
- [Discord](https://discord.gg/jmNvw4WFYn)
|
|
34
35
|
|
|
35
36
|
---
|
|
36
37
|
|
|
@@ -5,5 +5,5 @@ export declare type AvatarProps = {
|
|
|
5
5
|
src: string;
|
|
6
6
|
fallback?: ReactNode;
|
|
7
7
|
fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
8
|
-
} & Pick<ImageProps, 'alt' | 'lazy' | 'onClick' | 'onError'> & NativeProps<'--size'>;
|
|
8
|
+
} & Pick<ImageProps, 'alt' | 'lazy' | 'onClick' | 'onError'> & NativeProps<'--size' | '--border-radius'>;
|
|
9
9
|
export declare const Avatar: FC<AvatarProps>;
|
|
@@ -4,24 +4,28 @@
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.adm-badge {
|
|
7
|
-
display: inline-
|
|
8
|
-
color: #fff;
|
|
9
|
-
font-weight: normal;
|
|
10
|
-
text-align: center;
|
|
7
|
+
display: inline-flex;
|
|
11
8
|
vertical-align: middle;
|
|
12
|
-
box-sizing:
|
|
13
|
-
min-width: 32px;
|
|
9
|
+
box-sizing: content-box;
|
|
14
10
|
border-radius: 200px;
|
|
15
|
-
padding: 0 8px;
|
|
16
|
-
font-size: 18px;
|
|
17
|
-
line-height: 1.2;
|
|
18
|
-
white-space: nowrap;
|
|
19
11
|
background-color: var(--color);
|
|
20
12
|
--right: 0;
|
|
21
13
|
--top: 0;
|
|
22
14
|
--color: var(--adm-badge-color, #ff411c);
|
|
23
15
|
}
|
|
24
16
|
|
|
17
|
+
.adm-badge-content {
|
|
18
|
+
color: #fff;
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
min-width: 16px;
|
|
21
|
+
padding: 2px 8px;
|
|
22
|
+
font-size: 18px;
|
|
23
|
+
line-height: 24px;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
font-weight: normal;
|
|
26
|
+
text-align: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
25
29
|
.adm-badge-fixed {
|
|
26
30
|
position: absolute;
|
|
27
31
|
right: var(--right);
|
|
@@ -34,4 +38,8 @@
|
|
|
34
38
|
width: 20px;
|
|
35
39
|
height: 20px;
|
|
36
40
|
border-radius: 10px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.adm-badge-bordered {
|
|
44
|
+
border: solid 2px var(--adm-color-white);
|
|
37
45
|
}
|
|
@@ -24,16 +24,15 @@ const Badge = props => {
|
|
|
24
24
|
children
|
|
25
25
|
} = props;
|
|
26
26
|
const isDot = content === dot;
|
|
27
|
-
const badgeCls = (0, _classnames.default)(classPrefix, {
|
|
28
|
-
[`${classPrefix}-fixed`]: !!children,
|
|
29
|
-
[`${classPrefix}-dot`]: isDot
|
|
30
|
-
});
|
|
27
|
+
const badgeCls = (0, _classnames.default)(classPrefix, !!children && `${classPrefix}-fixed`, isDot && `${classPrefix}-dot`, props.bordered && `${classPrefix}-bordered`);
|
|
31
28
|
const element = content ? (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
32
29
|
className: badgeCls,
|
|
33
30
|
style: {
|
|
34
31
|
'--color': color
|
|
35
32
|
}
|
|
36
|
-
}, !isDot &&
|
|
33
|
+
}, !isDot && _react.default.createElement("div", {
|
|
34
|
+
className: `${classPrefix}-content`
|
|
35
|
+
}, content))) : null;
|
|
37
36
|
return children ? _react.default.createElement("div", {
|
|
38
37
|
className: `${classPrefix}-wrap`
|
|
39
38
|
}, children, element) : element;
|
|
@@ -21,12 +21,16 @@ var _arrowLeftDouble = require("./arrow-left-double");
|
|
|
21
21
|
|
|
22
22
|
var _configProvider = require("../config-provider");
|
|
23
23
|
|
|
24
|
+
var _isoWeek = _interopRequireDefault(require("dayjs/plugin/isoWeek"));
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
29
|
|
|
28
30
|
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; }
|
|
29
31
|
|
|
32
|
+
_dayjs.default.extend(_isoWeek.default);
|
|
33
|
+
|
|
30
34
|
const classPrefix = 'adm-calendar';
|
|
31
35
|
const defaultProps = {
|
|
32
36
|
weekStartsOn: 'Sunday'
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { NativeProps } from '../../utils/native-props';
|
|
3
2
|
import type { PickerViewProps } from '../picker-view';
|
|
4
3
|
import type { CascadePickerOption } from '../cascade-picker';
|
|
5
4
|
export declare type CascadePickerViewProps = Omit<PickerViewProps, 'columns'> & {
|
|
6
5
|
options: CascadePickerOption[];
|
|
7
|
-
}
|
|
6
|
+
};
|
|
8
7
|
export declare const CascadePickerView: FC<CascadePickerViewProps>;
|
|
@@ -15,19 +15,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
15
15
|
|
|
16
16
|
const CheckIcon = (0, _react.memo)(props => {
|
|
17
17
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("svg", {
|
|
18
|
-
viewBox: '0 0
|
|
19
|
-
}, _react.default.createElement("g", {
|
|
20
|
-
stroke: 'none',
|
|
21
|
-
strokeWidth: '1',
|
|
22
|
-
fill: 'none',
|
|
23
|
-
fillRule: 'evenodd'
|
|
24
|
-
}, _react.default.createElement("g", {
|
|
25
|
-
transform: 'translate(-35.000000, -40.000000)',
|
|
26
|
-
fill: 'currentColor'
|
|
27
|
-
}, _react.default.createElement("g", {
|
|
28
|
-
transform: 'translate(24.000000, 26.000000)'
|
|
18
|
+
viewBox: '0 0 40 40'
|
|
29
19
|
}, _react.default.createElement("path", {
|
|
30
|
-
d: '
|
|
31
|
-
|
|
20
|
+
d: 'M31.5541766,15 L28.0892433,15 L28.0892434,15 C27.971052,15 27.8576674,15.044522 27.7740471,15.1239792 L18.2724722,24.1625319 L13.2248725,19.3630279 L13.2248725,19.3630279 C13.1417074,19.2834412 13.0287551,19.2384807 12.9107898,19.2380079 L9.44474455,19.2380079 L9.44474454,19.2380079 C9.19869815,19.2384085 8.99957935,19.4284738 9,19.66253 C9,19.7747587 9.04719253,19.8823283 9.13066188,19.9616418 L17.0907466,27.5338228 C17.4170809,27.8442545 17.8447695,28 18.2713393,28 L18.2980697,28 C18.7168464,27.993643 19.133396,27.8378975 19.4530492,27.5338228 L31.8693384,15.7236361 L31.8693384,15.7236361 C32.0434167,15.5582251 32.0435739,15.2898919 31.8696892,15.1242941 C31.7860402,15.0446329 31.6725052,15 31.5541421,15 L31.5541766,15 Z',
|
|
21
|
+
fill: 'currentColor'
|
|
22
|
+
})));
|
|
32
23
|
});
|
|
33
24
|
exports.CheckIcon = CheckIcon;
|
|
@@ -15,20 +15,18 @@
|
|
|
15
15
|
|
|
16
16
|
.adm-checkbox .adm-checkbox-icon {
|
|
17
17
|
flex: none;
|
|
18
|
-
border: 2px solid
|
|
18
|
+
border: 2px solid var(--adm-color-light);
|
|
19
19
|
border-radius: var(--icon-size);
|
|
20
20
|
box-sizing: border-box;
|
|
21
|
-
display: flex;
|
|
22
|
-
justify-content: center;
|
|
23
|
-
align-items: center;
|
|
24
21
|
width: var(--icon-size);
|
|
25
22
|
height: var(--icon-size);
|
|
26
|
-
color:
|
|
23
|
+
color: var(--adm-color-white);
|
|
27
24
|
}
|
|
28
25
|
|
|
29
|
-
.adm-checkbox .adm-checkbox-icon
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
.adm-checkbox .adm-checkbox-icon > svg {
|
|
27
|
+
display: block;
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 100%;
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
.adm-checkbox.adm-checkbox-block {
|
|
@@ -45,22 +43,13 @@
|
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
.adm-checkbox.adm-checkbox-disabled .adm-checkbox-content {
|
|
48
|
-
|
|
46
|
+
opacity: 0.4;
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
.adm-checkbox.adm-checkbox-disabled.adm-checkbox-
|
|
52
|
-
color: #
|
|
53
|
-
border-color:
|
|
54
|
-
background-color: #
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.adm-checkbox.adm-checkbox-disabled.adm-checkbox-checked .adm-checkbox-icon {
|
|
58
|
-
color: #ccc;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.adm-checkbox.adm-checkbox-disabled .adm-checkbox-icon {
|
|
62
|
-
border-color: #ccc;
|
|
63
|
-
background-color: #ebedf0;
|
|
49
|
+
.adm-checkbox.adm-checkbox-disabled .adm-checkbox-icon.adm-checkbox-icon {
|
|
50
|
+
color: #b7b7b7;
|
|
51
|
+
border-color: var(--adm-color-light);
|
|
52
|
+
background-color: #f5f5f5;
|
|
64
53
|
}
|
|
65
54
|
|
|
66
55
|
.adm-checkbox .adm-checkbox-custom-icon {
|
|
@@ -68,18 +57,10 @@
|
|
|
68
57
|
}
|
|
69
58
|
|
|
70
59
|
.adm-checkbox.adm-checkbox-indeterminate .adm-checkbox-icon {
|
|
71
|
-
border-color: var(--adm-color-primary);
|
|
72
60
|
background-color: #ffffff;
|
|
73
61
|
color: var(--adm-color-primary);
|
|
74
62
|
}
|
|
75
63
|
|
|
76
|
-
.adm-checkbox.adm-checkbox-indeterminate .adm-checkbox-indeterminate-checked {
|
|
77
|
-
width: 60%;
|
|
78
|
-
height: 60%;
|
|
79
|
-
border-radius: 100%;
|
|
80
|
-
background-color: currentColor;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
64
|
.adm-checkbox-content {
|
|
84
65
|
flex: 0 1 auto;
|
|
85
66
|
font-size: var(--font-size);
|
|
@@ -21,6 +21,8 @@ var _devLog = require("../../utils/dev-log");
|
|
|
21
21
|
|
|
22
22
|
var _checkIcon = require("./check-icon");
|
|
23
23
|
|
|
24
|
+
var _indeterminateIcon = require("./indeterminate-icon");
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -85,16 +87,12 @@ const Checkbox = p => {
|
|
|
85
87
|
|
|
86
88
|
return _react.default.createElement("div", {
|
|
87
89
|
className: `${classPrefix}-icon`
|
|
88
|
-
}, props.indeterminate ? _react.default.createElement(
|
|
89
|
-
className: `${classPrefix}-indeterminate-checked`
|
|
90
|
-
}) : checked && _react.default.createElement(_checkIcon.CheckIcon, {
|
|
91
|
-
className: `${classPrefix}-icon-checked`
|
|
92
|
-
}));
|
|
90
|
+
}, props.indeterminate ? _react.default.createElement(_indeterminateIcon.IndeterminateIcon, null) : checked && _react.default.createElement(_checkIcon.CheckIcon, null));
|
|
93
91
|
};
|
|
94
92
|
|
|
95
93
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("label", {
|
|
96
94
|
className: (0, _classnames.default)(classPrefix, {
|
|
97
|
-
[`${classPrefix}-checked`]: checked,
|
|
95
|
+
[`${classPrefix}-checked`]: checked && !props.indeterminate,
|
|
98
96
|
[`${classPrefix}-indeterminate`]: props.indeterminate,
|
|
99
97
|
[`${classPrefix}-disabled`]: disabled,
|
|
100
98
|
[`${classPrefix}-block`]: props.block
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.IndeterminateIcon = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _nativeProps = require("../../utils/native-props");
|
|
11
|
+
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
const IndeterminateIcon = (0, _react.memo)(props => {
|
|
17
|
+
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("svg", {
|
|
18
|
+
viewBox: '0 0 40 40'
|
|
19
|
+
}, _react.default.createElement("path", {
|
|
20
|
+
d: 'M20,9 C26.0752953,9 31,13.9247047 31,20 C31,26.0752953 26.0752953,31 20,31 C13.9247047,31 9,26.0752953 9,20 C9,13.9247047 13.9247047,9 20,9 Z',
|
|
21
|
+
fill: 'currentColor'
|
|
22
|
+
})));
|
|
23
|
+
});
|
|
24
|
+
exports.IndeterminateIcon = IndeterminateIcon;
|
|
@@ -2,7 +2,7 @@ import { FC, ReactNode } from 'react';
|
|
|
2
2
|
import type { PickerProps } from '../picker';
|
|
3
3
|
import { NativeProps } from '../../utils/native-props';
|
|
4
4
|
import type { Precision, DatePickerFilter } from './date-picker-utils';
|
|
5
|
-
export declare type DatePickerProps = Pick<PickerProps, 'onCancel' | 'onClose' | 'visible' | 'confirmText' | 'cancelText' | 'getContainer' | 'afterShow' | 'afterClose' | 'onClick' | 'title' | 'stopPropagation'> & {
|
|
5
|
+
export declare type DatePickerProps = Pick<PickerProps, 'onCancel' | 'onClose' | 'visible' | 'confirmText' | 'cancelText' | 'getContainer' | 'afterShow' | 'afterClose' | 'onClick' | 'title' | 'stopPropagation' | 'style'> & {
|
|
6
6
|
value?: Date | null;
|
|
7
7
|
defaultValue?: Date | null;
|
|
8
8
|
onSelect?: (value: Date) => void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
+
import type { PickerViewProps } from '../picker-view';
|
|
2
3
|
import { NativeProps } from '../../utils/native-props';
|
|
3
4
|
import type { Precision, DatePickerFilter } from '../date-picker/date-picker-utils';
|
|
4
|
-
export declare type DatePickerViewProps = {
|
|
5
|
+
export declare type DatePickerViewProps = Pick<PickerViewProps, 'style'> & {
|
|
5
6
|
value?: Date;
|
|
6
7
|
defaultValue?: Date;
|
|
7
8
|
onChange?: (value: Date) => void;
|
|
@@ -10,5 +11,5 @@ export declare type DatePickerViewProps = {
|
|
|
10
11
|
precision?: Precision;
|
|
11
12
|
renderLabel?: (type: Precision, data: number) => ReactNode;
|
|
12
13
|
filter?: DatePickerFilter;
|
|
13
|
-
} & NativeProps
|
|
14
|
+
} & NativeProps;
|
|
14
15
|
export declare const DatePickerView: FC<DatePickerViewProps>;
|
|
@@ -6,5 +6,5 @@ export declare type ErrorBlockProps = {
|
|
|
6
6
|
image?: string | ReactElement;
|
|
7
7
|
description?: ReactNode;
|
|
8
8
|
fullPage?: boolean;
|
|
9
|
-
} & NativeProps<'--image-height' | '--image-height-full-page'>;
|
|
9
|
+
} & NativeProps<'--image-height' | '--image-height-full-page' | '--image-width' | '--image-width-full-page'>;
|
|
10
10
|
export declare const ErrorBlock: FC<ErrorBlockProps>;
|
|
@@ -3,6 +3,7 @@ import { NativeProps } from '../../utils/native-props';
|
|
|
3
3
|
export declare type FloatingPanelProps = {
|
|
4
4
|
anchors: number[];
|
|
5
5
|
children: ReactNode;
|
|
6
|
+
onHeightChange?: (height: number, animating: boolean) => void;
|
|
6
7
|
} & NativeProps<'--border-radius' | '--z-index'>;
|
|
7
8
|
export declare type FloatingPanelRef = {
|
|
8
9
|
setHeight: (height: number, options?: {
|
|
@@ -12,4 +13,5 @@ export declare type FloatingPanelRef = {
|
|
|
12
13
|
export declare const FloatingPanel: React.ForwardRefExoticComponent<{
|
|
13
14
|
anchors: number[];
|
|
14
15
|
children: ReactNode;
|
|
16
|
+
onHeightChange?: ((height: number, animating: boolean) => void) | undefined;
|
|
15
17
|
} & NativeProps<"--z-index" | "--border-radius"> & React.RefAttributes<FloatingPanelRef>>;
|
|
@@ -44,6 +44,11 @@ const FloatingPanel = (0, _react.forwardRef)((props, ref) => {
|
|
|
44
44
|
y: bounds.bottom,
|
|
45
45
|
config: {
|
|
46
46
|
tension: 300
|
|
47
|
+
},
|
|
48
|
+
onChange: result => {
|
|
49
|
+
var _a;
|
|
50
|
+
|
|
51
|
+
(_a = props.onHeightChange) === null || _a === void 0 ? void 0 : _a.call(props, result.value.y, y.isAnimating);
|
|
47
52
|
}
|
|
48
53
|
}));
|
|
49
54
|
(0, _react2.useDrag)(state => {
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
.adm-form-item-label-required {
|
|
14
14
|
position: absolute;
|
|
15
15
|
left: -0.6em;
|
|
16
|
-
top: 0
|
|
16
|
+
top: 0;
|
|
17
|
+
font-family: SimSun, sans-serif;
|
|
17
18
|
color: var(--adm-color-danger);
|
|
18
19
|
user-select: none;
|
|
19
20
|
}
|
|
@@ -27,8 +28,8 @@
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
.adm-form-vertical .adm-form-item-label {
|
|
30
|
-
margin-bottom: 8px;
|
|
31
31
|
font-size: 30px;
|
|
32
|
+
margin-bottom: 8px;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
.adm-form-vertical .adm-form-item-footer {
|
|
@@ -7,7 +7,7 @@ import type { FormLayout } from './index';
|
|
|
7
7
|
declare type RenderChildren<Values = any> = (form: FormInstance<Values>) => React.ReactNode;
|
|
8
8
|
declare type ChildrenType<Values = any> = RenderChildren<Values> | React.ReactNode;
|
|
9
9
|
declare type RcFieldProps = Omit<FieldProps, 'children'>;
|
|
10
|
-
export declare type FormItemProps = RcFieldProps
|
|
10
|
+
export declare type FormItemProps = Pick<RcFieldProps, 'dependencies' | 'valuePropName' | 'name' | 'rules' | 'messageVariables' | 'trigger' | 'validateTrigger' | 'shouldUpdate'> & Pick<ListItemProps, 'style' | 'onClick' | 'extra' | 'arrow'> & {
|
|
11
11
|
label?: React.ReactNode;
|
|
12
12
|
help?: React.ReactNode;
|
|
13
13
|
hasFeedback?: boolean;
|
|
@@ -17,6 +17,6 @@ export declare type FormItemProps = RcFieldProps & NativeProps & Pick<ListItemPr
|
|
|
17
17
|
hidden?: boolean;
|
|
18
18
|
layout?: FormLayout;
|
|
19
19
|
children: ChildrenType;
|
|
20
|
-
};
|
|
20
|
+
} & NativeProps;
|
|
21
21
|
export declare const FormItem: FC<FormItemProps>;
|
|
22
22
|
export {};
|
|
@@ -48,7 +48,8 @@ const FormItemLayout = props => {
|
|
|
48
48
|
children,
|
|
49
49
|
htmlFor,
|
|
50
50
|
hidden,
|
|
51
|
-
errors
|
|
51
|
+
errors,
|
|
52
|
+
arrow
|
|
52
53
|
} = props;
|
|
53
54
|
const context = (0, _react.useContext)(_context.FormContext);
|
|
54
55
|
const hasFeedback = props.hasFeedback !== undefined ? props.hasFeedback : context.hasFeedback;
|
|
@@ -77,7 +78,8 @@ const FormItemLayout = props => {
|
|
|
77
78
|
[`${classPrefix}-hidden`]: hidden
|
|
78
79
|
}),
|
|
79
80
|
disabled: disabled,
|
|
80
|
-
onClick: props.onClick
|
|
81
|
+
onClick: props.onClick,
|
|
82
|
+
arrow: arrow
|
|
81
83
|
}, children);
|
|
82
84
|
};
|
|
83
85
|
|
|
@@ -105,9 +107,10 @@ const FormItem = props => {
|
|
|
105
107
|
validateTrigger,
|
|
106
108
|
onClick,
|
|
107
109
|
shouldUpdate,
|
|
108
|
-
dependencies
|
|
110
|
+
dependencies,
|
|
111
|
+
arrow
|
|
109
112
|
} = props,
|
|
110
|
-
fieldProps = (0, _tslib.__rest)(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies"]);
|
|
113
|
+
fieldProps = (0, _tslib.__rest)(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "arrow"]);
|
|
111
114
|
|
|
112
115
|
const {
|
|
113
116
|
validateTrigger: contextValidateTrigger
|
|
@@ -166,7 +169,8 @@ const FormItem = props => {
|
|
|
166
169
|
errors: errors,
|
|
167
170
|
onClick: onClick,
|
|
168
171
|
hidden: hidden,
|
|
169
|
-
layout: layout
|
|
172
|
+
layout: layout,
|
|
173
|
+
arrow: arrow
|
|
170
174
|
}, _react.default.createElement(_context.NoStyleItemContext.Provider, {
|
|
171
175
|
value: onSubMetaChange
|
|
172
176
|
}, baseChildren));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.adm-form .adm-list.adm-list {
|
|
2
|
-
--padding-left:
|
|
3
|
-
--padding-right:
|
|
2
|
+
--padding-left: 32px;
|
|
3
|
+
--padding-right: 24px;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.adm-form-horizontal .adm-list.adm-list {
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
--align-items: stretch;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
.adm-form-horizontal .adm-list.adm-list .adm-list-item-content-extra {
|
|
12
|
+
align-self: center;
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
.adm-form .adm-form-footer {
|
|
12
|
-
padding: 24px;
|
|
16
|
+
padding: 40px 24px;
|
|
13
17
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
import { ListProps } from '../list';
|
|
4
|
-
import type { FormProps as RcFormProps, FormInstance } from 'rc-field-form';
|
|
4
|
+
import type { FormProps as RcFormProps, FormInstance as RCFormInstance } from 'rc-field-form';
|
|
5
5
|
import { FormContextType } from './context';
|
|
6
6
|
import type { FormLayout } from '.';
|
|
7
|
-
export declare type
|
|
7
|
+
export declare type FormInstance = Pick<RCFormInstance, 'getFieldValue' | 'getFieldsValue' | 'getFieldError' | 'getFieldsError' | 'isFieldTouched' | 'isFieldsTouched' | 'resetFields' | 'setFields' | 'setFieldsValue' | 'submit' | 'validateFields'>;
|
|
8
|
+
export declare type FormProps = Pick<RcFormProps, 'form' | 'initialValues' | 'name' | 'preserve' | 'validateMessages' | 'validateTrigger' | 'onFieldsChange' | 'onFinish' | 'onFinishFailed' | 'onValuesChange' | 'children'> & NativeProps & Partial<FormContextType> & {
|
|
8
9
|
footer?: ReactNode;
|
|
9
10
|
layout?: FormLayout;
|
|
10
11
|
mode?: ListProps['mode'];
|
|
11
12
|
};
|
|
12
|
-
export declare const Form: React.ForwardRefExoticComponent<RcFormProps<any> & NativeProps<never> & Partial<FormContextType> & {
|
|
13
|
+
export declare const Form: React.ForwardRefExoticComponent<Pick<RcFormProps<any>, "children" | "form" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & NativeProps<never> & Partial<FormContextType> & {
|
|
13
14
|
footer?: ReactNode;
|
|
14
15
|
layout?: "horizontal" | "vertical" | undefined;
|
|
15
16
|
mode?: ListProps['mode'];
|
|
16
|
-
} & React.RefAttributes<
|
|
17
|
+
} & React.RefAttributes<Pick<RCFormInstance<any>, "submit" | "getFieldValue" | "getFieldsValue" | "getFieldError" | "getFieldsError" | "isFieldTouched" | "isFieldsTouched" | "resetFields" | "setFields" | "setFieldsValue" | "validateFields">>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.adm-form .adm-list.adm-list {
|
|
2
|
-
--padding-left:
|
|
3
|
-
--padding-right:
|
|
2
|
+
--padding-left: 32px;
|
|
3
|
+
--padding-right: 24px;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.adm-form-horizontal .adm-list.adm-list {
|
|
@@ -8,8 +8,12 @@
|
|
|
8
8
|
--align-items: stretch;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
.adm-form-horizontal .adm-list.adm-list .adm-list-item-content-extra {
|
|
12
|
+
align-self: center;
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
.adm-form .adm-form-footer {
|
|
12
|
-
padding: 24px;
|
|
16
|
+
padding: 40px 24px;
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
.adm-form-item + .adm-form-item {
|
|
@@ -27,7 +31,8 @@
|
|
|
27
31
|
.adm-form-item-label-required {
|
|
28
32
|
position: absolute;
|
|
29
33
|
left: -0.6em;
|
|
30
|
-
top: 0
|
|
34
|
+
top: 0;
|
|
35
|
+
font-family: SimSun, sans-serif;
|
|
31
36
|
color: var(--adm-color-danger);
|
|
32
37
|
user-select: none;
|
|
33
38
|
}
|
|
@@ -41,8 +46,8 @@
|
|
|
41
46
|
}
|
|
42
47
|
|
|
43
48
|
.adm-form-vertical .adm-form-item-label {
|
|
44
|
-
margin-bottom: 8px;
|
|
45
49
|
font-size: 30px;
|
|
50
|
+
margin-bottom: 8px;
|
|
46
51
|
}
|
|
47
52
|
|
|
48
53
|
.adm-form-vertical .adm-form-item-footer {
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
import './index.less';
|
|
3
3
|
import { useForm } from 'rc-field-form';
|
|
4
4
|
export declare type FormLayout = 'vertical' | 'horizontal';
|
|
5
|
-
export type { FormProps } from './form';
|
|
6
|
-
export type {
|
|
7
|
-
|
|
5
|
+
export type { FormProps, FormInstance } from './form';
|
|
6
|
+
export type { FormItemProps } from './form-item';
|
|
7
|
+
export type { ValidateMessages, FieldData, NamePath, } from 'rc-field-form/es/interface';
|
|
8
|
+
declare const _default: import("react").ForwardRefExoticComponent<Pick<import("rc-field-form").FormProps<any>, "children" | "form" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & import("../../utils/native-props").NativeProps<never> & Partial<import("./context").FormContextType> & {
|
|
8
9
|
footer?: import("react").ReactNode;
|
|
9
10
|
layout?: "horizontal" | "vertical" | undefined;
|
|
10
11
|
mode?: "default" | "card" | undefined;
|
|
11
|
-
} & import("react").RefAttributes<import("rc-field-form").FormInstance<any>>> & {
|
|
12
|
+
} & import("react").RefAttributes<Pick<import("rc-field-form").FormInstance<any>, "submit" | "getFieldValue" | "getFieldsValue" | "getFieldError" | "getFieldsError" | "isFieldTouched" | "isFieldsTouched" | "resetFields" | "setFields" | "setFieldsValue" | "validateFields">>> & {
|
|
12
13
|
Item: import("react").FC<import("./form-item").FormItemProps>;
|
|
13
14
|
Header: import("react").FC<{}>;
|
|
14
15
|
useForm: typeof useForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
2
|
import { GetContainer } from '../../utils/render-to-container';
|
|
3
|
+
import { SlidesRef } from './slides';
|
|
3
4
|
export declare type ImageViewerProps = {
|
|
4
5
|
image?: string;
|
|
5
6
|
maxZoom?: number;
|
|
@@ -9,9 +10,14 @@ export declare type ImageViewerProps = {
|
|
|
9
10
|
afterClose?: () => void;
|
|
10
11
|
};
|
|
11
12
|
export declare const ImageViewer: FC<ImageViewerProps>;
|
|
13
|
+
export declare type MultiImageViewerRef = SlidesRef;
|
|
12
14
|
export declare type MultiImageViewerProps = Omit<ImageViewerProps, 'image'> & {
|
|
13
15
|
images?: string[];
|
|
14
16
|
defaultIndex?: number;
|
|
15
17
|
onIndexChange?: (index: number) => void;
|
|
16
18
|
};
|
|
17
|
-
export declare const MultiImageViewer:
|
|
19
|
+
export declare const MultiImageViewer: React.ForwardRefExoticComponent<Pick<ImageViewerProps, "visible" | "onClose" | "afterClose" | "getContainer" | "maxZoom"> & {
|
|
20
|
+
images?: string[] | undefined;
|
|
21
|
+
defaultIndex?: number | undefined;
|
|
22
|
+
onIndexChange?: ((index: number) => void) | undefined;
|
|
23
|
+
} & React.RefAttributes<SlidesRef>>;
|