antd-mobile 5.0.0-rc.20 → 5.0.0-rc.24
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 +5 -4
- 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/check-list/check-list.css +0 -4
- 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 +3 -3
- package/2x/cjs/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/2x/cjs/components/dialog/dialog-action-button.js +1 -0
- package/2x/cjs/components/dialog/dialog.css +15 -0
- package/2x/cjs/components/dialog/dialog.js +4 -2
- package/2x/cjs/components/error-block/error-block.d.ts +1 -1
- 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 +8 -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 +12 -3
- package/2x/cjs/components/form/form.d.ts +5 -4
- package/2x/cjs/components/form/form.js +1 -5
- package/2x/cjs/components/form/index.css +20 -5
- package/2x/cjs/components/form/index.d.ts +5 -4
- package/2x/cjs/components/image/image.d.ts +1 -0
- package/2x/cjs/components/image/image.js +4 -1
- 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-item.js +1 -1
- package/2x/cjs/components/list/list.css +2 -10
- package/2x/cjs/components/list/list.d.ts +1 -1
- package/2x/cjs/components/modal/modal.css +40 -20
- package/2x/cjs/components/modal/modal.js +11 -13
- 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/side-bar/corner.d.ts +3 -0
- package/2x/cjs/components/side-bar/corner.js +28 -0
- package/2x/cjs/components/side-bar/side-bar.css +30 -17
- package/2x/cjs/components/side-bar/side-bar.js +22 -5
- 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 +2 -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 +40 -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 +5 -4
- 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/check-list/check-list.css +0 -4
- 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 +3 -3
- package/2x/es/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/2x/es/components/dialog/dialog-action-button.js +1 -0
- package/2x/es/components/dialog/dialog.css +15 -0
- package/2x/es/components/dialog/dialog.js +4 -2
- package/2x/es/components/error-block/error-block.d.ts +1 -1
- 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 +8 -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 +12 -3
- package/2x/es/components/form/form.d.ts +5 -4
- package/2x/es/components/form/form.js +1 -5
- package/2x/es/components/form/index.css +20 -5
- package/2x/es/components/form/index.d.ts +5 -4
- package/2x/es/components/image/image.d.ts +1 -0
- package/2x/es/components/image/image.js +4 -1
- 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-item.js +1 -1
- package/2x/es/components/list/list.css +2 -10
- package/2x/es/components/list/list.d.ts +1 -1
- package/2x/es/components/modal/modal.css +40 -20
- package/2x/es/components/modal/modal.js +11 -13
- 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/side-bar/corner.d.ts +3 -0
- package/2x/es/components/side-bar/corner.js +14 -0
- package/2x/es/components/side-bar/side-bar.css +30 -17
- package/2x/es/components/side-bar/side-bar.js +21 -5
- 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 +2 -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 +40 -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 +5 -4
- 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/check-list/check-list.css +0 -3
- 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 +3 -3
- package/cjs/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/cjs/components/dialog/dialog-action-button.js +1 -0
- package/cjs/components/dialog/dialog.css +12 -0
- package/cjs/components/dialog/dialog.js +4 -2
- package/cjs/components/error-block/error-block.d.ts +1 -1
- 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 +7 -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 +10 -3
- package/cjs/components/form/form.d.ts +5 -4
- package/cjs/components/form/form.js +1 -5
- package/cjs/components/form/index.css +17 -5
- package/cjs/components/form/index.d.ts +5 -4
- package/cjs/components/image/image.d.ts +1 -0
- package/cjs/components/image/image.js +4 -1
- 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-item.js +1 -1
- package/cjs/components/list/list.css +2 -8
- package/cjs/components/list/list.d.ts +1 -1
- package/cjs/components/modal/modal.css +35 -19
- package/cjs/components/modal/modal.js +11 -13
- 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/side-bar/corner.d.ts +3 -0
- package/cjs/components/side-bar/corner.js +28 -0
- package/cjs/components/side-bar/side-bar.css +26 -16
- package/cjs/components/side-bar/side-bar.js +22 -5
- 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 +2 -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 +40 -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 +5 -4
- 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/check-list/check-list.css +0 -3
- 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 +3 -3
- package/es/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/es/components/dialog/dialog-action-button.js +1 -0
- package/es/components/dialog/dialog.css +12 -0
- package/es/components/dialog/dialog.js +4 -2
- package/es/components/error-block/error-block.d.ts +1 -1
- 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 +7 -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 +10 -3
- package/es/components/form/form.d.ts +5 -4
- package/es/components/form/form.js +1 -5
- package/es/components/form/index.css +17 -5
- package/es/components/form/index.d.ts +5 -4
- package/es/components/image/image.d.ts +1 -0
- package/es/components/image/image.js +4 -1
- 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-item.js +1 -1
- package/es/components/list/list.css +2 -8
- package/es/components/list/list.d.ts +1 -1
- package/es/components/modal/modal.css +35 -19
- package/es/components/modal/modal.js +11 -13
- 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/side-bar/corner.d.ts +3 -0
- package/es/components/side-bar/corner.js +14 -0
- package/es/components/side-bar/side-bar.css +26 -16
- package/es/components/side-bar/side-bar.js +21 -5
- 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 +2 -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 +40 -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
|
@@ -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,7 +1,14 @@
|
|
|
1
1
|
.adm-form .adm-list.adm-list {
|
|
2
|
-
--padding-left:
|
|
3
|
-
--padding-right:
|
|
2
|
+
--padding-left: 16px;
|
|
3
|
+
--padding-right: 12px;
|
|
4
|
+
}
|
|
5
|
+
.adm-form-horizontal .adm-list.adm-list {
|
|
6
|
+
--prefix-width: 6em;
|
|
7
|
+
--align-items: stretch;
|
|
8
|
+
}
|
|
9
|
+
.adm-form-horizontal .adm-list.adm-list .adm-list-item-content-extra {
|
|
10
|
+
align-self: center;
|
|
4
11
|
}
|
|
5
12
|
.adm-form .adm-form-footer {
|
|
6
|
-
padding: 12px;
|
|
13
|
+
padding: 20px 12px;
|
|
7
14
|
}
|
|
@@ -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">>>;
|
|
@@ -55,11 +55,7 @@ const Form = (0, _react.forwardRef)((p, ref) => {
|
|
|
55
55
|
lists.push(_react.default.createElement(_list.default, {
|
|
56
56
|
header: currentHeader,
|
|
57
57
|
key: count,
|
|
58
|
-
mode: mode
|
|
59
|
-
style: {
|
|
60
|
-
'--prefix-width': '6em',
|
|
61
|
-
'--align-items': 'stretch'
|
|
62
|
-
}
|
|
58
|
+
mode: mode
|
|
63
59
|
}, items));
|
|
64
60
|
items = [];
|
|
65
61
|
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
.adm-form .adm-list.adm-list {
|
|
2
|
-
--padding-left:
|
|
3
|
-
--padding-right:
|
|
2
|
+
--padding-left: 16px;
|
|
3
|
+
--padding-right: 12px;
|
|
4
|
+
}
|
|
5
|
+
.adm-form-horizontal .adm-list.adm-list {
|
|
6
|
+
--prefix-width: 6em;
|
|
7
|
+
--align-items: stretch;
|
|
8
|
+
}
|
|
9
|
+
.adm-form-horizontal .adm-list.adm-list .adm-list-item-content-extra {
|
|
10
|
+
align-self: center;
|
|
4
11
|
}
|
|
5
12
|
.adm-form .adm-form-footer {
|
|
6
|
-
padding: 12px;
|
|
13
|
+
padding: 20px 12px;
|
|
7
14
|
}
|
|
8
15
|
.adm-form-item + .adm-form-item {
|
|
9
16
|
border-top: none;
|
|
@@ -18,7 +25,8 @@
|
|
|
18
25
|
.adm-form-item-label-required {
|
|
19
26
|
position: absolute;
|
|
20
27
|
left: -0.6em;
|
|
21
|
-
top: 0
|
|
28
|
+
top: 0;
|
|
29
|
+
font-family: SimSun, sans-serif;
|
|
22
30
|
color: var(--adm-color-danger);
|
|
23
31
|
user-select: none;
|
|
24
32
|
}
|
|
@@ -29,12 +37,16 @@
|
|
|
29
37
|
display: none;
|
|
30
38
|
}
|
|
31
39
|
.adm-form-vertical .adm-form-item-label {
|
|
32
|
-
margin-bottom: 4px;
|
|
33
40
|
font-size: 15px;
|
|
41
|
+
margin-bottom: 4px;
|
|
34
42
|
}
|
|
35
43
|
.adm-form-vertical .adm-form-item-footer {
|
|
36
44
|
margin-top: 4px;
|
|
37
45
|
}
|
|
46
|
+
.adm-form-horizontal .adm-list-item-content-prefix {
|
|
47
|
+
padding-top: 12px;
|
|
48
|
+
padding-bottom: 12px;
|
|
49
|
+
}
|
|
38
50
|
.adm-form-item-label {
|
|
39
51
|
color: #666666;
|
|
40
52
|
}
|
|
@@ -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;
|
|
@@ -11,5 +11,6 @@ export declare type ImageProps = {
|
|
|
11
11
|
lazy?: boolean;
|
|
12
12
|
onClick?: (event: React.MouseEvent<HTMLImageElement, Event>) => void;
|
|
13
13
|
onError?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
14
|
+
onLoad?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
14
15
|
} & NativeProps<'--width' | '--height'> & Pick<React.ImgHTMLAttributes<HTMLImageElement>, 'crossOrigin' | 'decoding' | 'loading' | 'referrerPolicy' | 'sizes' | 'srcSet' | 'useMap'>;
|
|
15
16
|
export declare const Image: React.FC<ImageProps>;
|
|
@@ -61,8 +61,11 @@ const Image = (0, _stagedComponents.staged)(p => {
|
|
|
61
61
|
src: src,
|
|
62
62
|
alt: props.alt,
|
|
63
63
|
onClick: props.onClick,
|
|
64
|
-
onLoad:
|
|
64
|
+
onLoad: e => {
|
|
65
|
+
var _a;
|
|
66
|
+
|
|
65
67
|
setLoaded(true);
|
|
68
|
+
(_a = props.onLoad) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
66
69
|
},
|
|
67
70
|
onError: e => {
|
|
68
71
|
var _a;
|
|
@@ -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>>;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.MultiImageViewer = exports.ImageViewer = void 0;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
10
|
var _withDefaultProps = require("../../utils/with-default-props");
|
|
11
11
|
|
|
@@ -19,6 +19,10 @@ var _slides = require("./slides");
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
22
26
|
const classPrefix = `adm-image-viewer`;
|
|
23
27
|
const defaultProps = {
|
|
24
28
|
maxZoom: 3,
|
|
@@ -53,8 +57,7 @@ exports.ImageViewer = ImageViewer;
|
|
|
53
57
|
const multiDefaultProps = Object.assign(Object.assign({}, defaultProps), {
|
|
54
58
|
defaultIndex: 0
|
|
55
59
|
});
|
|
56
|
-
|
|
57
|
-
const MultiImageViewer = p => {
|
|
60
|
+
const MultiImageViewer = (0, _react.forwardRef)((p, ref) => {
|
|
58
61
|
const props = (0, _withDefaultProps.mergeProps)(multiDefaultProps, p);
|
|
59
62
|
|
|
60
63
|
const node = _react.default.createElement(_mask.default, {
|
|
@@ -65,6 +68,7 @@ const MultiImageViewer = p => {
|
|
|
65
68
|
}, _react.default.createElement("div", {
|
|
66
69
|
className: `${classPrefix}-content`
|
|
67
70
|
}, props.images && _react.default.createElement(_slides.Slides, {
|
|
71
|
+
ref: ref,
|
|
68
72
|
defaultIndex: props.defaultIndex,
|
|
69
73
|
onIndexChange: props.onIndexChange,
|
|
70
74
|
images: props.images,
|
|
@@ -77,6 +81,5 @@ const MultiImageViewer = p => {
|
|
|
77
81
|
})));
|
|
78
82
|
|
|
79
83
|
return (0, _renderToContainer.renderToContainer)(props.getContainer, node);
|
|
80
|
-
};
|
|
81
|
-
|
|
84
|
+
});
|
|
82
85
|
exports.MultiImageViewer = MultiImageViewer;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import './image-viewer.less';
|
|
3
3
|
import { showMultiImageViewer, showImageViewer, clearImageViewer } from './methods';
|
|
4
|
-
export type { ImageViewerProps, MultiImageViewerProps } from './image-viewer';
|
|
4
|
+
export type { ImageViewerProps, MultiImageViewerProps, MultiImageViewerRef, } from './image-viewer';
|
|
5
5
|
export type { ImageViewerHandler } from './methods';
|
|
6
6
|
declare const _default: import("react").FC<import("./image-viewer").ImageViewerProps> & {
|
|
7
|
-
Multi: import("react").
|
|
7
|
+
Multi: import("react").ForwardRefExoticComponent<Pick<import("./image-viewer").ImageViewerProps, "visible" | "onClose" | "afterClose" | "getContainer" | "maxZoom"> & {
|
|
8
|
+
images?: string[] | undefined;
|
|
9
|
+
defaultIndex?: number | undefined;
|
|
10
|
+
onIndexChange?: ((index: number) => void) | undefined;
|
|
11
|
+
} & import("react").RefAttributes<import("./slides").SlidesRef>> & {
|
|
8
12
|
show: typeof showMultiImageViewer;
|
|
9
13
|
};
|
|
10
14
|
show: typeof showImageViewer;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type SlidesType = {
|
|
3
3
|
images: string[];
|
|
4
4
|
onTap: () => void;
|
|
5
5
|
maxZoom: number;
|
|
6
6
|
defaultIndex: number;
|
|
7
7
|
onIndexChange?: (index: number) => void;
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
|
+
export declare type SlidesRef = {
|
|
10
|
+
swipeTo: (index: number, immediate: boolean) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const Slides: React.ForwardRefExoticComponent<SlidesType & React.RefAttributes<SlidesRef>>;
|
|
@@ -22,8 +22,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
22
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; }
|
|
23
23
|
|
|
24
24
|
const classPrefix = `adm-image-viewer`;
|
|
25
|
-
|
|
26
|
-
const Slides = props => {
|
|
25
|
+
const Slides = (0, _react.forwardRef)((props, ref) => {
|
|
27
26
|
const slideWidth = window.innerWidth + (0, _convertPx.convertPx)(16);
|
|
28
27
|
const [{
|
|
29
28
|
x
|
|
@@ -35,10 +34,23 @@ const Slides = props => {
|
|
|
35
34
|
}
|
|
36
35
|
}));
|
|
37
36
|
const count = props.images.length;
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
|
|
38
|
+
function swipeTo(index, immediate = false) {
|
|
40
39
|
var _a;
|
|
41
40
|
|
|
41
|
+
const i = (0, _bound.bound)(index, 0, count - 1);
|
|
42
|
+
(_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, i);
|
|
43
|
+
api.start({
|
|
44
|
+
x: i * slideWidth,
|
|
45
|
+
immediate
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
(0, _react.useImperativeHandle)(ref, () => ({
|
|
50
|
+
swipeTo
|
|
51
|
+
}));
|
|
52
|
+
const dragLockRef = (0, _react.useRef)(false);
|
|
53
|
+
const bind = (0, _react2.useDrag)(state => {
|
|
42
54
|
if (dragLockRef.current) return;
|
|
43
55
|
const [offsetX] = state.offset;
|
|
44
56
|
|
|
@@ -46,11 +58,7 @@ const Slides = props => {
|
|
|
46
58
|
const minIndex = Math.floor(offsetX / slideWidth);
|
|
47
59
|
const maxIndex = minIndex + 1;
|
|
48
60
|
const velocityOffset = Math.min(state.velocity[0] * 2000, slideWidth) * state.direction[0];
|
|
49
|
-
|
|
50
|
-
(_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, index);
|
|
51
|
-
api.start({
|
|
52
|
-
x: index * slideWidth
|
|
53
|
-
});
|
|
61
|
+
swipeTo((0, _bound.bound)(Math.round((offsetX + velocityOffset) / slideWidth), minIndex, maxIndex));
|
|
54
62
|
} else {
|
|
55
63
|
api.start({
|
|
56
64
|
x: offsetX,
|
|
@@ -99,6 +107,5 @@ const Slides = props => {
|
|
|
99
107
|
},
|
|
100
108
|
dragLockRef: dragLockRef
|
|
101
109
|
}))));
|
|
102
|
-
};
|
|
103
|
-
|
|
110
|
+
});
|
|
104
111
|
exports.Slides = Slides;
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
.adm-input
|
|
1
|
+
.adm-input {
|
|
2
2
|
--font-size: 17px;
|
|
3
3
|
--color: var(--adm-color-text);
|
|
4
4
|
--placeholder-color: var(--adm-color-light);
|
|
5
|
-
--disabled-color: var(--adm-color-weak);
|
|
6
5
|
--text-align: left;
|
|
6
|
+
--background-color: transparent;
|
|
7
7
|
display: flex;
|
|
8
8
|
justify-content: flex-start;
|
|
9
9
|
align-items: center;
|
|
10
10
|
width: 100%;
|
|
11
11
|
max-width: 100%;
|
|
12
12
|
max-height: 100%;
|
|
13
|
+
background-color: var(--background-color);
|
|
13
14
|
}
|
|
14
|
-
.adm-input {
|
|
15
|
+
.adm-input-disabled {
|
|
16
|
+
opacity: 0.4;
|
|
17
|
+
cursor: not-allowed;
|
|
18
|
+
}
|
|
19
|
+
.adm-input-element {
|
|
15
20
|
flex: auto;
|
|
16
21
|
display: inline-block;
|
|
17
22
|
box-sizing: border-box;
|
|
@@ -30,53 +35,50 @@
|
|
|
30
35
|
min-height: 1.5em;
|
|
31
36
|
text-align: var(--text-align);
|
|
32
37
|
}
|
|
33
|
-
.adm-input::placeholder {
|
|
38
|
+
.adm-input-element::placeholder {
|
|
34
39
|
color: var(--placeholder-color);
|
|
35
40
|
font-family: inherit;
|
|
36
41
|
}
|
|
37
|
-
.adm-input:-webkit-autofill {
|
|
42
|
+
.adm-input-element:-webkit-autofill {
|
|
38
43
|
background-color: transparent;
|
|
39
44
|
}
|
|
40
|
-
.adm-input:
|
|
41
|
-
color: var(--disabled-color);
|
|
42
|
-
cursor: not-allowed;
|
|
43
|
-
opacity: 1;
|
|
44
|
-
-webkit-text-fill-color: var(--disabled-color);
|
|
45
|
-
}
|
|
46
|
-
.adm-input:read-only {
|
|
45
|
+
.adm-input-element:read-only {
|
|
47
46
|
cursor: default;
|
|
48
47
|
}
|
|
49
|
-
.adm-input:invalid {
|
|
48
|
+
.adm-input-element:invalid {
|
|
50
49
|
box-shadow: none;
|
|
51
50
|
}
|
|
52
|
-
.adm-input::-ms-clear {
|
|
51
|
+
.adm-input-element::-ms-clear {
|
|
53
52
|
display: none;
|
|
54
53
|
}
|
|
55
|
-
.adm-input::-webkit-search-cancel-button {
|
|
54
|
+
.adm-input-element::-webkit-search-cancel-button {
|
|
56
55
|
display: none;
|
|
57
56
|
}
|
|
58
|
-
.adm-input::-webkit-search-decoration {
|
|
57
|
+
.adm-input-element::-webkit-search-decoration {
|
|
59
58
|
display: none;
|
|
60
59
|
}
|
|
61
|
-
.adm-input[type='date'],
|
|
62
|
-
.adm-input[type='time'],
|
|
63
|
-
.adm-input[type='datetime-local'] {
|
|
60
|
+
.adm-input-element[type='date'],
|
|
61
|
+
.adm-input-element[type='time'],
|
|
62
|
+
.adm-input-element[type='datetime-local'] {
|
|
64
63
|
min-height: 1.5em;
|
|
65
64
|
}
|
|
66
|
-
.adm-input[type='search'] {
|
|
65
|
+
.adm-input-element[type='search'] {
|
|
67
66
|
-webkit-appearance: none;
|
|
68
67
|
}
|
|
69
|
-
.adm-input[readonly] {
|
|
68
|
+
.adm-input-element[readonly] {
|
|
70
69
|
pointer-events: none;
|
|
71
70
|
}
|
|
72
71
|
.adm-input-clear {
|
|
73
72
|
flex: none;
|
|
74
73
|
margin-left: 8px;
|
|
75
|
-
color: var(--
|
|
76
|
-
padding:
|
|
74
|
+
color: var(--adm-color-light);
|
|
75
|
+
padding: 4px;
|
|
77
76
|
cursor: pointer;
|
|
78
77
|
}
|
|
78
|
+
.adm-input-clear:active {
|
|
79
|
+
color: var(--adm-color-weak);
|
|
80
|
+
}
|
|
79
81
|
.adm-input-clear .antd-mobile-icon {
|
|
80
82
|
display: block;
|
|
81
|
-
font-size:
|
|
83
|
+
font-size: 15px;
|
|
82
84
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
declare type NativeInputProps = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
4
|
-
export declare type InputProps = Pick<NativeInputProps, 'maxLength' | 'minLength' | 'max' | 'min' | 'autoComplete' | 'pattern' | 'inputMode' | 'type' | 'onFocus' | 'onBlur' | 'autoCapitalize' | 'autoCorrect' | 'onKeyDown' | 'onKeyUp'> & {
|
|
4
|
+
export declare type InputProps = Pick<NativeInputProps, 'maxLength' | 'minLength' | 'max' | 'min' | 'autoComplete' | 'pattern' | 'inputMode' | 'type' | 'onFocus' | 'onBlur' | 'autoCapitalize' | 'autoCorrect' | 'onKeyDown' | 'onKeyUp' | 'onCompositionStart' | 'onCompositionEnd'> & {
|
|
5
5
|
value?: string;
|
|
6
6
|
defaultValue?: string;
|
|
7
7
|
onChange?: (val: string) => void;
|
|
@@ -13,13 +13,13 @@ export declare type InputProps = Pick<NativeInputProps, 'maxLength' | 'minLength
|
|
|
13
13
|
id?: string;
|
|
14
14
|
onEnterPress?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
15
15
|
enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
|
16
|
-
} & NativeProps<'--font-size' | '--color' | '--placeholder-color' | '--
|
|
16
|
+
} & NativeProps<'--font-size' | '--color' | '--placeholder-color' | '--text-align'>;
|
|
17
17
|
export declare type InputRef = {
|
|
18
18
|
clear: () => void;
|
|
19
19
|
focus: () => void;
|
|
20
20
|
blur: () => void;
|
|
21
21
|
};
|
|
22
|
-
export declare const Input: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "pattern" | "max" | "min" | "type" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "autoCapitalize" | "autoCorrect" | "inputMode" | "autoComplete" | "maxLength" | "minLength"> & {
|
|
22
|
+
export declare const Input: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "pattern" | "max" | "min" | "type" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "autoCapitalize" | "autoCorrect" | "inputMode" | "autoComplete" | "maxLength" | "minLength"> & {
|
|
23
23
|
value?: string | undefined;
|
|
24
24
|
defaultValue?: string | undefined;
|
|
25
25
|
onChange?: ((val: string) => void) | undefined;
|
|
@@ -31,5 +31,5 @@ export declare const Input: React.ForwardRefExoticComponent<Pick<React.DetailedH
|
|
|
31
31
|
id?: string | undefined;
|
|
32
32
|
onEnterPress?: ((e: React.KeyboardEvent<HTMLInputElement>) => void) | undefined;
|
|
33
33
|
enterKeyHint?: "enter" | "search" | "done" | "go" | "next" | "previous" | "send" | undefined;
|
|
34
|
-
} & NativeProps<"--color" | "--font-size" | "--placeholder-color" | "--
|
|
34
|
+
} & NativeProps<"--color" | "--font-size" | "--placeholder-color" | "--text-align"> & React.RefAttributes<InputRef>>;
|
|
35
35
|
export {};
|
|
@@ -15,6 +15,10 @@ var _nativeProps = require("../../utils/native-props");
|
|
|
15
15
|
|
|
16
16
|
var _withDefaultProps = require("../../utils/with-default-props");
|
|
17
17
|
|
|
18
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
18
22
|
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); }
|
|
19
23
|
|
|
20
24
|
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,10 +70,10 @@ const Input = (0, _react.forwardRef)((p, ref) => {
|
|
|
66
70
|
};
|
|
67
71
|
}, [props.enterKeyHint]);
|
|
68
72
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
69
|
-
className: `${classPrefix}-
|
|
73
|
+
className: (0, _classnames.default)(`${classPrefix}`, props.disabled && `${classPrefix}-disabled`)
|
|
70
74
|
}, _react.default.createElement("input", {
|
|
71
75
|
ref: nativeInputRef,
|
|
72
|
-
className: classPrefix
|
|
76
|
+
className: `${classPrefix}-element`,
|
|
73
77
|
value: value,
|
|
74
78
|
onChange: e => {
|
|
75
79
|
setValue(e.target.value);
|
|
@@ -101,8 +105,10 @@ const Input = (0, _react.forwardRef)((p, ref) => {
|
|
|
101
105
|
autoCapitalize: props.autoCapitalize,
|
|
102
106
|
autoCorrect: props.autoCorrect,
|
|
103
107
|
onKeyDown: handleKeydown,
|
|
104
|
-
onKeyUp: props.onKeyUp
|
|
105
|
-
|
|
108
|
+
onKeyUp: props.onKeyUp,
|
|
109
|
+
onCompositionStart: props.onCompositionStart,
|
|
110
|
+
onCompositionEnd: props.onCompositionEnd
|
|
111
|
+
}), props.clearable && !!value && _react.default.createElement("div", {
|
|
106
112
|
className: `${classPrefix}-clear`,
|
|
107
113
|
onMouseDown: e => {
|
|
108
114
|
e.preventDefault();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.adm-jumbo-tabs {
|
|
2
|
+
--gap: 8px;
|
|
2
3
|
position: relative;
|
|
3
4
|
}
|
|
4
5
|
.adm-jumbo-tabs-header {
|
|
@@ -12,6 +13,7 @@
|
|
|
12
13
|
align-items: center;
|
|
13
14
|
position: relative;
|
|
14
15
|
overflow-x: scroll;
|
|
16
|
+
padding: 0 var(--gap);
|
|
15
17
|
scrollbar-width: none;
|
|
16
18
|
}
|
|
17
19
|
.adm-jumbo-tabs-tab-list::-webkit-scrollbar {
|
|
@@ -19,7 +21,7 @@
|
|
|
19
21
|
}
|
|
20
22
|
.adm-jumbo-tabs-tab-wrapper {
|
|
21
23
|
flex: auto;
|
|
22
|
-
padding: 0
|
|
24
|
+
padding: 0 calc(var(--gap) / 2);
|
|
23
25
|
text-align: center;
|
|
24
26
|
}
|
|
25
27
|
.adm-jumbo-tabs-tab {
|
|
@@ -36,6 +38,7 @@
|
|
|
36
38
|
}
|
|
37
39
|
.adm-jumbo-tabs-tab-title {
|
|
38
40
|
line-height: 24px;
|
|
41
|
+
padding: 0 4px;
|
|
39
42
|
}
|
|
40
43
|
.adm-jumbo-tabs-tab-description {
|
|
41
44
|
width: min-content;
|
|
@@ -28,7 +28,7 @@ const ListItem = props => {
|
|
|
28
28
|
}, props.prefix && _react.default.createElement("div", {
|
|
29
29
|
className: `${classPrefix}-content-prefix`
|
|
30
30
|
}, props.prefix), _react.default.createElement("div", {
|
|
31
|
-
className:
|
|
31
|
+
className: `${classPrefix}-content-main`
|
|
32
32
|
}, props.title && _react.default.createElement("div", {
|
|
33
33
|
className: `${classPrefix}-title`
|
|
34
34
|
}, props.title), props.children, props.description && _react.default.createElement("div", {
|
|
@@ -60,9 +60,6 @@
|
|
|
60
60
|
}
|
|
61
61
|
.adm-list-item-content-main {
|
|
62
62
|
flex: auto;
|
|
63
|
-
padding: 14px 0;
|
|
64
|
-
}
|
|
65
|
-
.adm-list-item-content-main.adm-list-item-content-main-multi-row {
|
|
66
63
|
padding: 12px 0;
|
|
67
64
|
}
|
|
68
65
|
.adm-list-item-content-extra {
|
|
@@ -86,10 +83,10 @@
|
|
|
86
83
|
opacity: 0.4;
|
|
87
84
|
pointer-events: none;
|
|
88
85
|
}
|
|
89
|
-
a.adm-list-item:active {
|
|
86
|
+
a.adm-list-item:active:not(.adm-list-item-disabled) {
|
|
90
87
|
background-color: var(--active-background-color);
|
|
91
88
|
}
|
|
92
|
-
a.adm-list-item:active::after {
|
|
89
|
+
a.adm-list-item:active:not(.adm-list-item-disabled)::after {
|
|
93
90
|
content: ' ';
|
|
94
91
|
display: block;
|
|
95
92
|
position: absolute;
|
|
@@ -98,6 +95,3 @@ a.adm-list-item:active::after {
|
|
|
98
95
|
left: 0;
|
|
99
96
|
border-bottom: var(--border-inner);
|
|
100
97
|
}
|
|
101
|
-
a.adm-list-item.adm-list-item-disabled:active {
|
|
102
|
-
background-color: unset;
|
|
103
|
-
}
|
|
@@ -3,5 +3,5 @@ import { NativeProps } from '../../utils/native-props';
|
|
|
3
3
|
export declare type ListProps = {
|
|
4
4
|
header?: ReactNode;
|
|
5
5
|
mode?: 'default' | 'card';
|
|
6
|
-
} & NativeProps<'--header-font-size' | '--prefix-width' | '--prefix-padding-right' | '--align-items' | '--active-background-color' | '--border-inner' | '--border-top' | '--border-bottom' | '--padding-left' | '--font-size'>;
|
|
6
|
+
} & NativeProps<'--header-font-size' | '--prefix-width' | '--prefix-padding-right' | '--align-items' | '--active-background-color' | '--border-inner' | '--border-top' | '--border-bottom' | '--padding-left' | '--padding-right' | '--font-size'>;
|
|
7
7
|
export declare const List: FC<ListProps>;
|