antd-mobile 5.14.3 → 5.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2x/README.md +31 -18
- package/2x/bundle/antd-mobile.cjs.js +504 -348
- package/2x/bundle/antd-mobile.es.js +499 -343
- package/2x/bundle/style.css +75 -19
- package/2x/cjs/components/action-sheet/action-sheet.d.ts +2 -4
- package/2x/cjs/components/action-sheet/action-sheet.js +6 -2
- package/2x/cjs/components/badge/badge.css +1 -1
- package/2x/cjs/components/badge/badge.d.ts +2 -0
- package/2x/cjs/components/badge/badge.js +2 -1
- package/2x/cjs/components/button/button.d.ts +5 -1
- package/2x/cjs/components/cascader/cascader.d.ts +29 -4
- package/2x/cjs/components/cascader/cascader.js +41 -19
- package/2x/cjs/components/cascader/index.d.ts +21 -2
- package/2x/cjs/components/center-popup/center-popup.css +11 -0
- package/2x/cjs/components/center-popup/center-popup.d.ts +4 -20
- package/2x/cjs/components/center-popup/center-popup.js +27 -14
- package/2x/cjs/components/checkbox/checkbox.d.ts +22 -2
- package/2x/cjs/components/checkbox/checkbox.js +14 -4
- package/2x/cjs/components/checkbox/index.d.ts +17 -2
- package/2x/cjs/components/checkbox/native-input.js +10 -8
- package/2x/cjs/components/date-picker/date-picker-date-utils.js +12 -15
- package/2x/cjs/components/date-picker/date-picker-week-utils.js +12 -15
- package/2x/cjs/components/date-picker/date-picker.d.ts +7 -3
- package/2x/cjs/components/date-picker/date-picker.js +3 -1
- package/2x/cjs/components/date-picker/index.d.ts +6 -2
- package/2x/cjs/components/dialog/dialog.js +3 -1
- package/2x/cjs/components/dropdown/dropdown.d.ts +5 -1
- package/2x/cjs/components/dropdown/index.d.ts +5 -1
- package/2x/cjs/components/floating-panel/floating-panel.d.ts +5 -1
- package/2x/cjs/components/form/form-item.js +2 -4
- package/2x/cjs/components/form/form-subscribe.js +3 -9
- package/2x/cjs/components/form/form.d.ts +5 -1
- package/2x/cjs/components/form/index.d.ts +5 -1
- package/2x/cjs/components/index-bar/index-bar.d.ts +5 -1
- package/2x/cjs/components/index-bar/index.d.ts +5 -1
- package/2x/cjs/components/infinite-scroll/infinite-scroll.js +13 -5
- package/2x/cjs/components/input/input.css +4 -0
- package/2x/cjs/components/input/input.d.ts +11 -4
- package/2x/cjs/components/input/input.js +5 -1
- package/2x/cjs/components/list/index.d.ts +10 -2
- package/2x/cjs/components/list/list.css +3 -0
- package/2x/cjs/components/list/list.d.ts +14 -3
- package/2x/cjs/components/list/list.js +16 -6
- package/2x/cjs/components/modal/modal-action-button.d.ts +2 -2
- package/2x/cjs/components/modal/modal.css +0 -9
- package/2x/cjs/components/modal/modal.js +4 -11
- package/2x/cjs/components/number-keyboard/number-keyboard.d.ts +1 -5
- package/2x/cjs/components/number-keyboard/number-keyboard.js +13 -7
- package/2x/cjs/components/passcode-input/passcode-input.d.ts +5 -1
- package/2x/cjs/components/picker/index.d.ts +10 -6
- package/2x/cjs/components/picker/picker.d.ts +6 -6
- package/2x/cjs/components/picker/picker.js +8 -7
- package/2x/cjs/components/picker-view/picker-view.css +1 -0
- package/2x/cjs/components/picker-view/wheel.js +10 -8
- package/2x/cjs/components/popover/index.d.ts +5 -1
- package/2x/cjs/components/popover/popover.d.ts +5 -1
- package/2x/cjs/components/popup/popup-base-props.d.ts +35 -0
- package/2x/cjs/components/popup/popup-base-props.js +18 -0
- package/2x/cjs/components/popup/popup.css +32 -0
- package/2x/cjs/components/popup/popup.d.ts +3 -19
- package/2x/cjs/components/popup/popup.js +43 -18
- package/2x/cjs/components/progress-bar/progress-bar.css +17 -3
- package/2x/cjs/components/progress-bar/progress-bar.d.ts +4 -2
- package/2x/cjs/components/progress-bar/progress-bar.js +27 -5
- package/2x/cjs/components/radio/radio.js +3 -3
- package/2x/cjs/components/rate/rate.css +2 -2
- package/2x/cjs/components/rate/rate.js +3 -3
- package/2x/cjs/components/rate/star.d.ts +2 -0
- package/2x/cjs/components/rate/star.js +37 -0
- package/2x/cjs/components/safe-area/safe-area.css +3 -2
- package/2x/cjs/components/search-bar/search-bar.d.ts +5 -1
- package/2x/cjs/components/slider/slider.js +2 -1
- package/2x/cjs/components/slider/thumb.d.ts +2 -1
- package/2x/cjs/components/slider/thumb.js +13 -1
- package/2x/cjs/components/stepper/stepper.js +14 -3
- package/2x/cjs/components/steps/steps.css +1 -1
- package/2x/cjs/components/swipe-action/swipe-action.d.ts +5 -1
- package/2x/cjs/components/swiper/index.d.ts +10 -2
- package/2x/cjs/components/swiper/swiper.d.ts +5 -1
- package/2x/cjs/components/switch/switch.js +10 -1
- package/2x/cjs/components/text-area/text-area.d.ts +6 -1
- package/2x/cjs/components/text-area/text-area.js +5 -0
- package/2x/cjs/components/toast/methods.js +32 -73
- package/2x/cjs/components/virtual-input/virtual-input.d.ts +5 -1
- package/2x/cjs/components/water-mark/water-mark.js +3 -2
- package/2x/cjs/global/global.css +0 -1
- package/2x/cjs/global/theme-default.css +0 -1
- package/2x/cjs/locales/base.d.ts +10 -0
- package/2x/cjs/locales/base.js +10 -0
- package/2x/cjs/locales/en-US.d.ts +10 -0
- package/2x/cjs/locales/es-ES.d.ts +10 -0
- package/2x/cjs/locales/fa-IR.d.ts +10 -0
- package/2x/cjs/locales/fr-FR.d.ts +10 -0
- package/2x/cjs/locales/id-ID.d.ts +118 -0
- package/2x/cjs/locales/id-ID.js +121 -0
- package/2x/cjs/locales/kk-KZ.d.ts +118 -0
- package/2x/cjs/locales/kk-KZ.js +124 -0
- package/2x/cjs/locales/ko-KR.d.ts +10 -0
- package/2x/cjs/locales/zh-CN.d.ts +10 -0
- package/2x/cjs/locales/zh-CN.js +10 -0
- package/2x/cjs/locales/zh-HK.d.ts +10 -0
- package/2x/cjs/locales/zh-TW.d.ts +10 -0
- package/2x/cjs/utils/native-props.d.ts +3 -3
- package/2x/cjs/utils/render-imperatively.d.ts +4 -1
- package/2x/cjs/utils/render-imperatively.js +23 -11
- package/2x/cjs/utils/use-props-value.js +2 -6
- package/2x/es/components/action-sheet/action-sheet.d.ts +2 -4
- package/2x/es/components/action-sheet/action-sheet.js +6 -2
- package/2x/es/components/badge/badge.css +1 -1
- package/2x/es/components/badge/badge.d.ts +2 -0
- package/2x/es/components/badge/badge.js +2 -1
- package/2x/es/components/button/button.d.ts +5 -1
- package/2x/es/components/cascader/cascader.d.ts +29 -4
- package/2x/es/components/cascader/cascader.js +42 -18
- package/2x/es/components/cascader/index.d.ts +21 -2
- package/2x/es/components/center-popup/center-popup.css +11 -0
- package/2x/es/components/center-popup/center-popup.d.ts +4 -20
- package/2x/es/components/center-popup/center-popup.js +25 -14
- package/2x/es/components/checkbox/checkbox.d.ts +22 -2
- package/2x/es/components/checkbox/checkbox.js +15 -3
- package/2x/es/components/checkbox/index.d.ts +17 -2
- package/2x/es/components/checkbox/native-input.js +9 -8
- package/2x/es/components/date-picker/date-picker-date-utils.js +12 -15
- package/2x/es/components/date-picker/date-picker-week-utils.js +12 -15
- package/2x/es/components/date-picker/date-picker.d.ts +7 -3
- package/2x/es/components/date-picker/date-picker.js +3 -1
- package/2x/es/components/date-picker/index.d.ts +6 -2
- package/2x/es/components/dialog/dialog.js +3 -1
- package/2x/es/components/dropdown/dropdown.d.ts +5 -1
- package/2x/es/components/dropdown/index.d.ts +5 -1
- package/2x/es/components/floating-panel/floating-panel.d.ts +5 -1
- package/2x/es/components/form/form-item.js +2 -2
- package/2x/es/components/form/form-subscribe.js +5 -8
- package/2x/es/components/form/form.d.ts +5 -1
- package/2x/es/components/form/index.d.ts +5 -1
- package/2x/es/components/index-bar/index-bar.d.ts +5 -1
- package/2x/es/components/index-bar/index.d.ts +5 -1
- package/2x/es/components/infinite-scroll/infinite-scroll.js +14 -6
- package/2x/es/components/input/input.css +4 -0
- package/2x/es/components/input/input.d.ts +11 -4
- package/2x/es/components/input/input.js +5 -1
- package/2x/es/components/list/index.d.ts +10 -2
- package/2x/es/components/list/list.css +3 -0
- package/2x/es/components/list/list.d.ts +14 -3
- package/2x/es/components/list/list.js +12 -4
- package/2x/es/components/modal/modal-action-button.d.ts +2 -2
- package/2x/es/components/modal/modal.css +0 -9
- package/2x/es/components/modal/modal.js +4 -10
- package/2x/es/components/number-keyboard/number-keyboard.d.ts +1 -5
- package/2x/es/components/number-keyboard/number-keyboard.js +13 -7
- package/2x/es/components/passcode-input/passcode-input.d.ts +5 -1
- package/2x/es/components/picker/index.d.ts +10 -6
- package/2x/es/components/picker/picker.d.ts +6 -6
- package/2x/es/components/picker/picker.js +8 -6
- package/2x/es/components/picker-view/picker-view.css +1 -0
- package/2x/es/components/picker-view/wheel.js +10 -8
- package/2x/es/components/popover/index.d.ts +5 -1
- package/2x/es/components/popover/popover.d.ts +5 -1
- package/2x/es/components/popup/popup-base-props.d.ts +35 -0
- package/2x/es/components/popup/popup-base-props.js +11 -0
- package/2x/es/components/popup/popup.css +32 -0
- package/2x/es/components/popup/popup.d.ts +3 -19
- package/2x/es/components/popup/popup.js +41 -19
- package/2x/es/components/progress-bar/progress-bar.css +17 -3
- package/2x/es/components/progress-bar/progress-bar.d.ts +4 -2
- package/2x/es/components/progress-bar/progress-bar.js +25 -5
- package/2x/es/components/radio/radio.js +3 -3
- package/2x/es/components/rate/rate.css +2 -2
- package/2x/es/components/rate/rate.js +2 -2
- package/2x/es/components/rate/star.d.ts +2 -0
- package/2x/es/components/rate/star.js +25 -0
- package/2x/es/components/safe-area/safe-area.css +3 -2
- package/2x/es/components/search-bar/search-bar.d.ts +5 -1
- package/2x/es/components/slider/slider.js +2 -1
- package/2x/es/components/slider/thumb.d.ts +2 -1
- package/2x/es/components/slider/thumb.js +12 -1
- package/2x/es/components/stepper/stepper.js +13 -3
- package/2x/es/components/steps/steps.css +1 -1
- package/2x/es/components/swipe-action/swipe-action.d.ts +5 -1
- package/2x/es/components/swiper/index.d.ts +10 -2
- package/2x/es/components/swiper/swiper.d.ts +5 -1
- package/2x/es/components/switch/switch.js +9 -1
- package/2x/es/components/text-area/text-area.d.ts +6 -1
- package/2x/es/components/text-area/text-area.js +5 -0
- package/2x/es/components/toast/methods.js +29 -67
- package/2x/es/components/virtual-input/virtual-input.d.ts +5 -1
- package/2x/es/components/water-mark/water-mark.js +3 -2
- package/2x/es/global/global.css +0 -1
- package/2x/es/global/theme-default.css +0 -1
- package/2x/es/locales/base.d.ts +10 -0
- package/2x/es/locales/base.js +10 -0
- package/2x/es/locales/en-US.d.ts +10 -0
- package/2x/es/locales/es-ES.d.ts +10 -0
- package/2x/es/locales/fa-IR.d.ts +10 -0
- package/2x/es/locales/fr-FR.d.ts +10 -0
- package/2x/es/locales/id-ID.d.ts +118 -0
- package/2x/es/locales/id-ID.js +111 -0
- package/2x/es/locales/kk-KZ.d.ts +118 -0
- package/2x/es/locales/kk-KZ.js +114 -0
- package/2x/es/locales/ko-KR.d.ts +10 -0
- package/2x/es/locales/zh-CN.d.ts +10 -0
- package/2x/es/locales/zh-CN.js +10 -0
- package/2x/es/locales/zh-HK.d.ts +10 -0
- package/2x/es/locales/zh-TW.d.ts +10 -0
- package/2x/es/utils/native-props.d.ts +3 -3
- package/2x/es/utils/render-imperatively.d.ts +4 -1
- package/2x/es/utils/render-imperatively.js +23 -11
- package/2x/es/utils/use-props-value.js +2 -6
- package/2x/package.json +3 -3
- package/2x/umd/antd-mobile.js +1 -1
- package/README.md +31 -18
- package/bundle/antd-mobile.cjs.js +504 -348
- package/bundle/antd-mobile.es.js +499 -343
- package/bundle/style.css +65 -18
- package/cjs/components/action-sheet/action-sheet.d.ts +2 -4
- package/cjs/components/action-sheet/action-sheet.js +6 -2
- package/cjs/components/badge/badge.css +1 -1
- package/cjs/components/badge/badge.d.ts +2 -0
- package/cjs/components/badge/badge.js +2 -1
- package/cjs/components/button/button.d.ts +5 -1
- package/cjs/components/cascader/cascader.d.ts +29 -4
- package/cjs/components/cascader/cascader.js +41 -19
- package/cjs/components/cascader/index.d.ts +21 -2
- package/cjs/components/center-popup/center-popup.css +10 -0
- package/cjs/components/center-popup/center-popup.d.ts +4 -20
- package/cjs/components/center-popup/center-popup.js +27 -14
- package/cjs/components/checkbox/checkbox.d.ts +22 -2
- package/cjs/components/checkbox/checkbox.js +14 -4
- package/cjs/components/checkbox/index.d.ts +17 -2
- package/cjs/components/checkbox/native-input.js +10 -8
- package/cjs/components/date-picker/date-picker-date-utils.js +12 -15
- package/cjs/components/date-picker/date-picker-week-utils.js +12 -15
- package/cjs/components/date-picker/date-picker.d.ts +7 -3
- package/cjs/components/date-picker/date-picker.js +3 -1
- package/cjs/components/date-picker/index.d.ts +6 -2
- package/cjs/components/dialog/dialog.js +3 -1
- package/cjs/components/dropdown/dropdown.d.ts +5 -1
- package/cjs/components/dropdown/index.d.ts +5 -1
- package/cjs/components/floating-panel/floating-panel.d.ts +5 -1
- package/cjs/components/form/form-item.js +2 -4
- package/cjs/components/form/form-subscribe.js +3 -9
- package/cjs/components/form/form.d.ts +5 -1
- package/cjs/components/form/index.d.ts +5 -1
- package/cjs/components/index-bar/index-bar.d.ts +5 -1
- package/cjs/components/index-bar/index.d.ts +5 -1
- package/cjs/components/infinite-scroll/infinite-scroll.js +13 -5
- package/cjs/components/input/input.css +3 -0
- package/cjs/components/input/input.d.ts +11 -4
- package/cjs/components/input/input.js +5 -1
- package/cjs/components/list/index.d.ts +10 -2
- package/cjs/components/list/list.css +3 -0
- package/cjs/components/list/list.d.ts +14 -3
- package/cjs/components/list/list.js +16 -6
- package/cjs/components/modal/modal-action-button.d.ts +2 -2
- package/cjs/components/modal/modal.css +0 -8
- package/cjs/components/modal/modal.js +4 -11
- package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -5
- package/cjs/components/number-keyboard/number-keyboard.js +13 -7
- package/cjs/components/passcode-input/passcode-input.d.ts +5 -1
- package/cjs/components/picker/index.d.ts +10 -6
- package/cjs/components/picker/picker.d.ts +6 -6
- package/cjs/components/picker/picker.js +8 -7
- package/cjs/components/picker-view/picker-view.css +1 -0
- package/cjs/components/picker-view/wheel.js +10 -8
- package/cjs/components/popover/index.d.ts +5 -1
- package/cjs/components/popover/popover.d.ts +5 -1
- package/cjs/components/popup/popup-base-props.d.ts +35 -0
- package/cjs/components/popup/popup-base-props.js +18 -0
- package/cjs/components/popup/popup.css +26 -0
- package/cjs/components/popup/popup.d.ts +3 -19
- package/cjs/components/popup/popup.js +43 -18
- package/cjs/components/progress-bar/progress-bar.css +15 -3
- package/cjs/components/progress-bar/progress-bar.d.ts +4 -2
- package/cjs/components/progress-bar/progress-bar.js +27 -5
- package/cjs/components/radio/radio.js +3 -3
- package/cjs/components/rate/rate.css +2 -2
- package/cjs/components/rate/rate.js +3 -3
- package/cjs/components/rate/star.d.ts +2 -0
- package/cjs/components/rate/star.js +37 -0
- package/cjs/components/safe-area/safe-area.css +3 -2
- package/cjs/components/search-bar/search-bar.d.ts +5 -1
- package/cjs/components/slider/slider.js +2 -1
- package/cjs/components/slider/thumb.d.ts +2 -1
- package/cjs/components/slider/thumb.js +13 -1
- package/cjs/components/stepper/stepper.js +14 -3
- package/cjs/components/steps/steps.css +1 -1
- package/cjs/components/swipe-action/swipe-action.d.ts +5 -1
- package/cjs/components/swiper/index.d.ts +10 -2
- package/cjs/components/swiper/swiper.d.ts +5 -1
- package/cjs/components/switch/switch.js +10 -1
- package/cjs/components/text-area/text-area.d.ts +6 -1
- package/cjs/components/text-area/text-area.js +5 -0
- package/cjs/components/toast/methods.js +32 -73
- package/cjs/components/virtual-input/virtual-input.d.ts +5 -1
- package/cjs/components/water-mark/water-mark.js +3 -2
- package/cjs/global/global.css +0 -1
- package/cjs/global/theme-default.css +0 -1
- package/cjs/locales/base.d.ts +10 -0
- package/cjs/locales/base.js +10 -0
- package/cjs/locales/en-US.d.ts +10 -0
- package/cjs/locales/es-ES.d.ts +10 -0
- package/cjs/locales/fa-IR.d.ts +10 -0
- package/cjs/locales/fr-FR.d.ts +10 -0
- package/cjs/locales/id-ID.d.ts +118 -0
- package/cjs/locales/id-ID.js +121 -0
- package/cjs/locales/kk-KZ.d.ts +118 -0
- package/cjs/locales/kk-KZ.js +124 -0
- package/cjs/locales/ko-KR.d.ts +10 -0
- package/cjs/locales/zh-CN.d.ts +10 -0
- package/cjs/locales/zh-CN.js +10 -0
- package/cjs/locales/zh-HK.d.ts +10 -0
- package/cjs/locales/zh-TW.d.ts +10 -0
- package/cjs/utils/native-props.d.ts +3 -3
- package/cjs/utils/render-imperatively.d.ts +4 -1
- package/cjs/utils/render-imperatively.js +23 -11
- package/cjs/utils/use-props-value.js +2 -6
- package/es/components/action-sheet/action-sheet.d.ts +2 -4
- package/es/components/action-sheet/action-sheet.js +6 -2
- package/es/components/badge/badge.css +1 -1
- package/es/components/badge/badge.d.ts +2 -0
- package/es/components/badge/badge.js +2 -1
- package/es/components/button/button.d.ts +5 -1
- package/es/components/cascader/cascader.d.ts +29 -4
- package/es/components/cascader/cascader.js +42 -18
- package/es/components/cascader/index.d.ts +21 -2
- package/es/components/center-popup/center-popup.css +10 -0
- package/es/components/center-popup/center-popup.d.ts +4 -20
- package/es/components/center-popup/center-popup.js +25 -14
- package/es/components/checkbox/checkbox.d.ts +22 -2
- package/es/components/checkbox/checkbox.js +15 -3
- package/es/components/checkbox/index.d.ts +17 -2
- package/es/components/checkbox/native-input.js +9 -8
- package/es/components/date-picker/date-picker-date-utils.js +12 -15
- package/es/components/date-picker/date-picker-week-utils.js +12 -15
- package/es/components/date-picker/date-picker.d.ts +7 -3
- package/es/components/date-picker/date-picker.js +3 -1
- package/es/components/date-picker/index.d.ts +6 -2
- package/es/components/dialog/dialog.js +3 -1
- package/es/components/dropdown/dropdown.d.ts +5 -1
- package/es/components/dropdown/index.d.ts +5 -1
- package/es/components/floating-panel/floating-panel.d.ts +5 -1
- package/es/components/form/form-item.js +2 -2
- package/es/components/form/form-subscribe.js +5 -8
- package/es/components/form/form.d.ts +5 -1
- package/es/components/form/index.d.ts +5 -1
- package/es/components/index-bar/index-bar.d.ts +5 -1
- package/es/components/index-bar/index.d.ts +5 -1
- package/es/components/infinite-scroll/infinite-scroll.js +14 -6
- package/es/components/input/input.css +3 -0
- package/es/components/input/input.d.ts +11 -4
- package/es/components/input/input.js +5 -1
- package/es/components/list/index.d.ts +10 -2
- package/es/components/list/list.css +3 -0
- package/es/components/list/list.d.ts +14 -3
- package/es/components/list/list.js +12 -4
- package/es/components/modal/modal-action-button.d.ts +2 -2
- package/es/components/modal/modal.css +0 -8
- package/es/components/modal/modal.js +4 -10
- package/es/components/number-keyboard/number-keyboard.d.ts +1 -5
- package/es/components/number-keyboard/number-keyboard.js +13 -7
- package/es/components/passcode-input/passcode-input.d.ts +5 -1
- package/es/components/picker/index.d.ts +10 -6
- package/es/components/picker/picker.d.ts +6 -6
- package/es/components/picker/picker.js +8 -6
- package/es/components/picker-view/picker-view.css +1 -0
- package/es/components/picker-view/wheel.js +10 -8
- package/es/components/popover/index.d.ts +5 -1
- package/es/components/popover/popover.d.ts +5 -1
- package/es/components/popup/popup-base-props.d.ts +35 -0
- package/es/components/popup/popup-base-props.js +11 -0
- package/es/components/popup/popup.css +26 -0
- package/es/components/popup/popup.d.ts +3 -19
- package/es/components/popup/popup.js +41 -19
- package/es/components/progress-bar/progress-bar.css +15 -3
- package/es/components/progress-bar/progress-bar.d.ts +4 -2
- package/es/components/progress-bar/progress-bar.js +25 -5
- package/es/components/radio/radio.js +3 -3
- package/es/components/rate/rate.css +2 -2
- package/es/components/rate/rate.js +2 -2
- package/es/components/rate/star.d.ts +2 -0
- package/es/components/rate/star.js +25 -0
- package/es/components/safe-area/safe-area.css +3 -2
- package/es/components/search-bar/search-bar.d.ts +5 -1
- package/es/components/slider/slider.js +2 -1
- package/es/components/slider/thumb.d.ts +2 -1
- package/es/components/slider/thumb.js +12 -1
- package/es/components/stepper/stepper.js +13 -3
- package/es/components/steps/steps.css +1 -1
- package/es/components/swipe-action/swipe-action.d.ts +5 -1
- package/es/components/swiper/index.d.ts +10 -2
- package/es/components/swiper/swiper.d.ts +5 -1
- package/es/components/switch/switch.js +9 -1
- package/es/components/text-area/text-area.d.ts +6 -1
- package/es/components/text-area/text-area.js +5 -0
- package/es/components/toast/methods.js +29 -67
- package/es/components/virtual-input/virtual-input.d.ts +5 -1
- package/es/components/water-mark/water-mark.js +3 -2
- package/es/global/global.css +0 -1
- package/es/global/theme-default.css +0 -1
- package/es/locales/base.d.ts +10 -0
- package/es/locales/base.js +10 -0
- package/es/locales/en-US.d.ts +10 -0
- package/es/locales/es-ES.d.ts +10 -0
- package/es/locales/fa-IR.d.ts +10 -0
- package/es/locales/fr-FR.d.ts +10 -0
- package/es/locales/id-ID.d.ts +118 -0
- package/es/locales/id-ID.js +111 -0
- package/es/locales/kk-KZ.d.ts +118 -0
- package/es/locales/kk-KZ.js +114 -0
- package/es/locales/ko-KR.d.ts +10 -0
- package/es/locales/zh-CN.d.ts +10 -0
- package/es/locales/zh-CN.js +10 -0
- package/es/locales/zh-HK.d.ts +10 -0
- package/es/locales/zh-TW.d.ts +10 -0
- package/es/utils/native-props.d.ts +3 -3
- package/es/utils/render-imperatively.d.ts +4 -1
- package/es/utils/render-imperatively.js +23 -11
- package/es/utils/use-props-value.js +2 -6
- package/package.json +3 -3
- package/umd/antd-mobile.js +1 -1
- package/2x/cjs/components/form/form-imperative-item.d.ts +0 -5
- package/2x/cjs/components/form/form-imperative-item.js +0 -57
- package/2x/es/components/form/form-imperative-item.d.ts +0 -5
- package/2x/es/components/form/form-imperative-item.js +0 -38
- package/cjs/components/form/form-imperative-item.d.ts +0 -5
- package/cjs/components/form/form-imperative-item.js +0 -57
- package/es/components/form/form-imperative-item.d.ts +0 -5
- package/es/components/form/form-imperative-item.js +0 -38
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { __rest, __awaiter } from "tslib";
|
|
2
|
-
import React$1, { useContext, useRef, useEffect, useMemo, useState, useImperativeHandle, memo, forwardRef, useCallback, createContext, cloneElement
|
|
2
|
+
import React$1, { useContext, useRef, useEffect, useMemo, useState, useImperativeHandle, memo, forwardRef, useCallback, createContext, cloneElement } from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import { useUnmountedRef, useUpdate, useMemoizedFn, useUpdateEffect,
|
|
4
|
+
import { useUnmountedRef, useIsomorphicLayoutEffect, useUpdate, useMemoizedFn, useUpdateEffect, createUpdateEffect, useThrottleFn, useDebounceEffect, useMount, useInViewport, useClickAway, useUnmount, useLockFn, useTimeout } from "ahooks";
|
|
5
5
|
import { useSpring, animated, to, Globals } from "@react-spring/web";
|
|
6
|
+
import { CloseOutline, RightOutline, CheckOutline, DownOutline, DownFill, QuestionCircleOutline, AddOutline, CloseCircleFill, LeftOutline, SoundOutline, TextDeletionOutline, CheckCircleFill, InformationCircleFill, ClockCircleFill, ExclamationCircleFill, SearchOutline, MinusOutline } from "antd-mobile-icons";
|
|
6
7
|
import dayjs from "dayjs";
|
|
7
8
|
import { isFragment, isMemo } from "react-is";
|
|
8
9
|
import { useDrag, useWheel, createUseGesture, dragAction, pinchAction } from "@use-gesture/react";
|
|
9
|
-
import { RightOutline, CheckOutline, DownOutline, DownFill, QuestionCircleOutline, CloseOutline, AddOutline, CloseCircleFill, LeftOutline, SoundOutline, TextDeletionOutline, StarFill, CheckCircleFill, InformationCircleFill, ClockCircleFill, ExclamationCircleFill, SearchOutline, MinusOutline } from "antd-mobile-icons";
|
|
10
10
|
import { staged } from "staged-components";
|
|
11
|
-
import RcForm, { List as List$2, Field, useWatch, useForm } from "rc-field-form";
|
|
11
|
+
import RcForm, { List as List$2, Field, useWatch, FieldContext as FieldContext$1, useForm } from "rc-field-form";
|
|
12
12
|
import { computePosition, offset, shift, limitShift, flip, hide, arrow, autoUpdate } from "@floating-ui/dom";
|
|
13
13
|
import Big from "big.js";
|
|
14
14
|
function _mergeNamespaces(n2, m2) {
|
|
@@ -27,7 +27,7 @@ function _mergeNamespaces(n2, m2) {
|
|
|
27
27
|
});
|
|
28
28
|
return Object.freeze(Object.defineProperty(n2, Symbol.toStringTag, { value: "Module" }));
|
|
29
29
|
}
|
|
30
|
-
var global$1 = /* @__PURE__ */ (() => ":root {\n --adm-radius-s: 4px;\n --adm-radius-m: 8px;\n --adm-radius-l: 12px;\n --adm-font-size-1: 9px;\n --adm-font-size-2: 10px;\n --adm-font-size-3: 11px;\n --adm-font-size-4: 12px;\n --adm-font-size-5: 13px;\n --adm-font-size-6: 14px;\n --adm-font-size-7: 15px;\n --adm-font-size-8: 16px;\n --adm-font-size-9: 17px;\n --adm-font-size-10: 18px;\n --adm-
|
|
30
|
+
var global$1 = /* @__PURE__ */ (() => ":root {\n --adm-radius-s: 4px;\n --adm-radius-m: 8px;\n --adm-radius-l: 12px;\n --adm-font-size-1: 9px;\n --adm-font-size-2: 10px;\n --adm-font-size-3: 11px;\n --adm-font-size-4: 12px;\n --adm-font-size-5: 13px;\n --adm-font-size-6: 14px;\n --adm-font-size-7: 15px;\n --adm-font-size-8: 16px;\n --adm-font-size-9: 17px;\n --adm-font-size-10: 18px;\n --adm-color-primary: #1677ff;\n --adm-color-success: #00b578;\n --adm-color-warning: #ff8f1f;\n --adm-color-danger: #ff3141;\n --adm-color-white: #ffffff;\n --adm-color-text: #333333;\n --adm-color-text-secondary: #666666;\n --adm-color-weak: #999999;\n --adm-color-light: #cccccc;\n --adm-color-border: #eeeeee;\n --adm-color-box: #f5f5f5;\n --adm-color-background: #ffffff;\n --adm-font-size-main: var(--adm-font-size-5);\n --adm-font-family: -apple-system, blinkmacsystemfont, 'Helvetica Neue',\n helvetica, segoe ui, arial, roboto, 'PingFang SC', 'miui',\n 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;\n --adm-border-color: var(--adm-color-border);\n}\nhtml[data-prefers-color-scheme='dark'] {\n --adm-color-primary: #3086ff;\n --adm-color-success: #34b368;\n --adm-color-warning: #ffa930;\n --adm-color-danger: #ff4a58;\n --adm-color-text: #e6e6e6;\n --adm-color-text-secondary: #b3b3b3;\n --adm-color-weak: #808080;\n --adm-color-light: #4d4d4d;\n --adm-color-border: #2b2b2b;\n --adm-color-box: #0a0a0a;\n --adm-color-background: #1a1a1a;\n --adm-border-color: var(--adm-color-border);\n}\n:root {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n color: var(--adm-color-text);\n font-size: var(--adm-font-size-main);\n font-family: var(--adm-font-family);\n}\na,\nbutton {\n cursor: pointer;\n}\na {\n color: var(--adm-color-primary);\n transition: opacity ease-in-out 0.2s;\n}\na:active {\n opacity: 0.8;\n}\n.adm-plain-anchor {\n color: unset;\n transition: none;\n}\n.adm-plain-anchor:active {\n opacity: unset;\n}\nbody.adm-overflow-hidden {\n overflow: hidden !important;\n}\ndiv.adm-px-tester {\n --size: 1;\n height: calc(var(--size) / 2 * 2px);\n width: 0;\n position: fixed;\n right: -100vw;\n bottom: -100vh;\n user-select: none;\n pointer-events: none;\n}\n")();
|
|
31
31
|
const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
|
|
32
32
|
if (canUseDom) {
|
|
33
33
|
document.addEventListener("touchstart", () => {
|
|
@@ -1347,6 +1347,16 @@ const base = {
|
|
|
1347
1347
|
pulling: "Scroll down to refresh",
|
|
1348
1348
|
canRelease: "Release to refresh immediately",
|
|
1349
1349
|
complete: "Refresh successful"
|
|
1350
|
+
},
|
|
1351
|
+
Slider: {
|
|
1352
|
+
name: "Slider"
|
|
1353
|
+
},
|
|
1354
|
+
Stepper: {
|
|
1355
|
+
decrease: "decrease",
|
|
1356
|
+
increase: "increase"
|
|
1357
|
+
},
|
|
1358
|
+
Switch: {
|
|
1359
|
+
name: "Switch"
|
|
1350
1360
|
}
|
|
1351
1361
|
};
|
|
1352
1362
|
const typeTemplate = "${label}\u4E0D\u662F\u4E00\u4E2A\u6709\u6548\u7684${type}";
|
|
@@ -1455,6 +1465,16 @@ const zhCN = mergeLocale(base, {
|
|
|
1455
1465
|
pulling: "\u4E0B\u62C9\u5237\u65B0",
|
|
1456
1466
|
canRelease: "\u91CA\u653E\u7ACB\u5373\u5237\u65B0",
|
|
1457
1467
|
complete: "\u5237\u65B0\u6210\u529F"
|
|
1468
|
+
},
|
|
1469
|
+
Slider: {
|
|
1470
|
+
name: "\u6ED1\u52A8\u8F93\u5165\u6761"
|
|
1471
|
+
},
|
|
1472
|
+
Stepper: {
|
|
1473
|
+
decrease: "\u51CF\u5C11",
|
|
1474
|
+
increase: "\u589E\u52A0"
|
|
1475
|
+
},
|
|
1476
|
+
Switch: {
|
|
1477
|
+
name: "\u5F00\u5173"
|
|
1458
1478
|
}
|
|
1459
1479
|
});
|
|
1460
1480
|
const defaultConfigRef = {
|
|
@@ -1546,7 +1566,7 @@ function mergeProps(...items) {
|
|
|
1546
1566
|
}
|
|
1547
1567
|
return ret;
|
|
1548
1568
|
}
|
|
1549
|
-
var popup = /* @__PURE__ */ (() => ".adm-popup {\n --z-index: var(--adm-popup-z-index, 1000);\n position: fixed;\n z-index: var(--z-index);\n}\n.adm-popup-body {\n position: fixed;\n background-color: var(--adm-color-background);\n z-index: calc(var(--z-index) + 10);\n}\n.adm-popup-body-position-bottom {\n width: 100%;\n bottom: 0;\n left: 0;\n}\n.adm-popup-body-position-top {\n width: 100%;\n top: 0;\n left: 0;\n}\n.adm-popup-body-position-left {\n height: 100%;\n top: 0;\n left: 0;\n}\n.adm-popup-body-position-right {\n height: 100%;\n top: 0;\n right: 0;\n}\n")();
|
|
1569
|
+
var popup = /* @__PURE__ */ (() => ".adm-popup {\n --z-index: var(--adm-popup-z-index, 1000);\n position: fixed;\n z-index: var(--z-index);\n}\n.adm-popup-body {\n position: fixed;\n background-color: var(--adm-color-background);\n z-index: calc(var(--z-index) + 10);\n}\n.adm-popup-body .adm-popup-close-icon {\n position: absolute;\n z-index: 100;\n}\n.adm-popup-body-position-bottom {\n width: 100%;\n bottom: 0;\n left: 0;\n}\n.adm-popup-body-position-bottom .adm-popup-close-icon {\n right: 8px;\n top: 8px;\n}\n.adm-popup-body-position-top {\n width: 100%;\n top: 0;\n left: 0;\n}\n.adm-popup-body-position-top .adm-popup-close-icon {\n right: 8px;\n bottom: 8px;\n}\n.adm-popup-body-position-left {\n height: 100%;\n top: 0;\n left: 0;\n}\n.adm-popup-body-position-left .adm-popup-close-icon {\n right: 8px;\n top: 8px;\n}\n.adm-popup-body-position-right {\n height: 100%;\n top: 0;\n right: 0;\n}\n.adm-popup-body-position-right .adm-popup-close-icon {\n left: 8px;\n top: 8px;\n}\n.adm-popup-close-icon {\n cursor: pointer;\n padding: 4px;\n font-size: 18px;\n color: var(--adm-color-weak);\n}\n")();
|
|
1550
1570
|
var mask = /* @__PURE__ */ (() => ".adm-mask {\n --z-index: var(--adm-mask-z-index, 1000);\n position: fixed;\n top: 0;\n left: 0;\n z-index: var(--z-index);\n display: block;\n width: 100%;\n height: 100%;\n}\n.adm-mask-aria-button {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.adm-mask-content {\n z-index: 1;\n}\n")();
|
|
1551
1571
|
const MIN_DISTANCE = 10;
|
|
1552
1572
|
function getDirection(x, y) {
|
|
@@ -8873,7 +8893,7 @@ const opacityRecord = {
|
|
|
8873
8893
|
thin: 0.35,
|
|
8874
8894
|
thick: 0.75
|
|
8875
8895
|
};
|
|
8876
|
-
const defaultProps
|
|
8896
|
+
const defaultProps$10 = {
|
|
8877
8897
|
visible: true,
|
|
8878
8898
|
destroyOnClose: false,
|
|
8879
8899
|
forceRender: false,
|
|
@@ -8884,7 +8904,7 @@ const defaultProps$$ = {
|
|
|
8884
8904
|
stopPropagation: ["click"]
|
|
8885
8905
|
};
|
|
8886
8906
|
const Mask = (p2) => {
|
|
8887
|
-
const props = mergeProps(defaultProps
|
|
8907
|
+
const props = mergeProps(defaultProps$10, p2);
|
|
8888
8908
|
const {
|
|
8889
8909
|
locale
|
|
8890
8910
|
} = useConfig();
|
|
@@ -8952,21 +8972,39 @@ const Mask = (p2) => {
|
|
|
8952
8972
|
destroyOnClose: props.destroyOnClose
|
|
8953
8973
|
}, renderToContainer(props.getContainer, node));
|
|
8954
8974
|
};
|
|
8955
|
-
const
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
8975
|
+
const defaultPopupBaseProps = {
|
|
8976
|
+
closeOnMaskClick: false,
|
|
8977
|
+
destroyOnClose: false,
|
|
8978
|
+
disableBodyScroll: true,
|
|
8979
|
+
forceRender: false,
|
|
8980
|
+
getContainer: null,
|
|
8960
8981
|
mask: true,
|
|
8961
|
-
|
|
8982
|
+
showCloseButton: false,
|
|
8983
|
+
stopPropagation: ["click"],
|
|
8984
|
+
visible: false
|
|
8962
8985
|
};
|
|
8986
|
+
function useInnerVisible(outerVisible) {
|
|
8987
|
+
const [innerVisible, setInnerVisible] = useState(outerVisible);
|
|
8988
|
+
useIsomorphicLayoutEffect(() => {
|
|
8989
|
+
setInnerVisible(outerVisible);
|
|
8990
|
+
}, [outerVisible]);
|
|
8991
|
+
return innerVisible;
|
|
8992
|
+
}
|
|
8993
|
+
const classPrefix$1h = `adm-popup`;
|
|
8994
|
+
const defaultProps$$ = Object.assign(Object.assign({}, defaultPopupBaseProps), {
|
|
8995
|
+
position: "bottom"
|
|
8996
|
+
});
|
|
8963
8997
|
const Popup = (p2) => {
|
|
8964
|
-
const props = mergeProps(defaultProps
|
|
8998
|
+
const props = mergeProps(defaultProps$$, p2);
|
|
8965
8999
|
const bodyCls = classNames(`${classPrefix$1h}-body`, props.bodyClassName, `${classPrefix$1h}-body-position-${props.position}`);
|
|
8966
|
-
const ref = useRef(null);
|
|
8967
9000
|
const [active, setActive] = useState(props.visible);
|
|
8968
|
-
|
|
8969
|
-
|
|
9001
|
+
useIsomorphicLayoutEffect(() => {
|
|
9002
|
+
if (props.visible) {
|
|
9003
|
+
setActive(true);
|
|
9004
|
+
}
|
|
9005
|
+
}, [props.visible]);
|
|
9006
|
+
const ref = useRef(null);
|
|
9007
|
+
useLockScroll(ref, props.disableBodyScroll && active);
|
|
8970
9008
|
const unmountedRef = useUnmountedRef();
|
|
8971
9009
|
const {
|
|
8972
9010
|
percent
|
|
@@ -8978,9 +9016,6 @@ const Popup = (p2) => {
|
|
|
8978
9016
|
tension: 300,
|
|
8979
9017
|
friction: 30
|
|
8980
9018
|
},
|
|
8981
|
-
onStart: () => {
|
|
8982
|
-
setActive(true);
|
|
8983
|
-
},
|
|
8984
9019
|
onRest: () => {
|
|
8985
9020
|
var _a, _b;
|
|
8986
9021
|
if (unmountedRef.current)
|
|
@@ -8993,6 +9028,7 @@ const Popup = (p2) => {
|
|
|
8993
9028
|
}
|
|
8994
9029
|
}
|
|
8995
9030
|
});
|
|
9031
|
+
const maskVisible = useInnerVisible(active && props.visible);
|
|
8996
9032
|
const node = withStopPropagation(props.stopPropagation, withNativeProps(props, React$1.createElement("div", {
|
|
8997
9033
|
className: classPrefix$1h,
|
|
8998
9034
|
onClick: props.onClick,
|
|
@@ -9000,8 +9036,16 @@ const Popup = (p2) => {
|
|
|
9000
9036
|
display: active ? void 0 : "none"
|
|
9001
9037
|
}
|
|
9002
9038
|
}, props.mask && React$1.createElement(Mask, {
|
|
9003
|
-
visible:
|
|
9004
|
-
|
|
9039
|
+
visible: maskVisible,
|
|
9040
|
+
forceRender: props.forceRender,
|
|
9041
|
+
destroyOnClose: props.destroyOnClose,
|
|
9042
|
+
onMaskClick: (e2) => {
|
|
9043
|
+
var _a, _b;
|
|
9044
|
+
(_a = props.onMaskClick) === null || _a === void 0 ? void 0 : _a.call(props, e2);
|
|
9045
|
+
if (props.closeOnMaskClick) {
|
|
9046
|
+
(_b = props.onClose) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
9047
|
+
}
|
|
9048
|
+
},
|
|
9005
9049
|
className: props.maskClassName,
|
|
9006
9050
|
style: props.maskStyle,
|
|
9007
9051
|
disableBodyScroll: false,
|
|
@@ -9026,10 +9070,20 @@ const Popup = (p2) => {
|
|
|
9026
9070
|
})
|
|
9027
9071
|
}),
|
|
9028
9072
|
ref
|
|
9029
|
-
},
|
|
9030
|
-
|
|
9073
|
+
}, props.showCloseButton && React$1.createElement("a", {
|
|
9074
|
+
className: classNames(`${classPrefix$1h}-close-icon`, "adm-plain-anchor"),
|
|
9075
|
+
onClick: () => {
|
|
9076
|
+
var _a;
|
|
9077
|
+
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
9078
|
+
}
|
|
9079
|
+
}, React$1.createElement(CloseOutline, null)), props.children))));
|
|
9080
|
+
return React$1.createElement(ShouldRender, {
|
|
9081
|
+
active,
|
|
9082
|
+
forceRender: props.forceRender,
|
|
9083
|
+
destroyOnClose: props.destroyOnClose
|
|
9084
|
+
}, renderToContainer(props.getContainer, node));
|
|
9031
9085
|
};
|
|
9032
|
-
var safeArea = /* @__PURE__ */ (() => ".adm-safe-area {\n display: block;\n width: 100%;\n}\n.adm-safe-area-position-top {\n padding-top: calc(env(safe-area-inset-top) * var(--
|
|
9086
|
+
var safeArea = /* @__PURE__ */ (() => ".adm-safe-area {\n --multiple: var(--adm-safe-area-multiple, 1);\n display: block;\n width: 100%;\n}\n.adm-safe-area-position-top {\n padding-top: calc(env(safe-area-inset-top) * var(--multiple));\n}\n.adm-safe-area-position-bottom {\n padding-bottom: calc(env(safe-area-inset-bottom) * var(--multiple));\n}\n")();
|
|
9033
9087
|
const classPrefix$1g = "adm-safe-area";
|
|
9034
9088
|
const SafeArea = (props) => {
|
|
9035
9089
|
return withNativeProps(props, React$1.createElement("div", {
|
|
@@ -9088,7 +9142,7 @@ function concurrentUnmount(container) {
|
|
|
9088
9142
|
});
|
|
9089
9143
|
});
|
|
9090
9144
|
}
|
|
9091
|
-
function unmount
|
|
9145
|
+
function unmount(container) {
|
|
9092
9146
|
if (createRoot) {
|
|
9093
9147
|
return concurrentUnmount(container);
|
|
9094
9148
|
}
|
|
@@ -9097,19 +9151,21 @@ function unmount$1(container) {
|
|
|
9097
9151
|
function renderToBody(element) {
|
|
9098
9152
|
const container = document.createElement("div");
|
|
9099
9153
|
document.body.appendChild(container);
|
|
9100
|
-
function
|
|
9101
|
-
const unmountResult = unmount
|
|
9154
|
+
function unmount$1() {
|
|
9155
|
+
const unmountResult = unmount(container);
|
|
9102
9156
|
if (unmountResult && container.parentNode) {
|
|
9103
9157
|
container.parentNode.removeChild(container);
|
|
9104
9158
|
}
|
|
9105
9159
|
}
|
|
9106
9160
|
render(element, container);
|
|
9107
|
-
return
|
|
9161
|
+
return unmount$1;
|
|
9108
9162
|
}
|
|
9109
9163
|
function renderImperatively(element) {
|
|
9110
9164
|
const Wrapper2 = React$1.forwardRef((_, ref) => {
|
|
9111
9165
|
const [visible, setVisible] = useState(false);
|
|
9112
9166
|
const closedRef = useRef(false);
|
|
9167
|
+
const [elementToRender, setElementToRender] = useState(element);
|
|
9168
|
+
const keyRef = useRef(0);
|
|
9113
9169
|
useEffect(() => {
|
|
9114
9170
|
if (!closedRef.current) {
|
|
9115
9171
|
setVisible(true);
|
|
@@ -9121,17 +9177,24 @@ function renderImperatively(element) {
|
|
|
9121
9177
|
var _a, _b;
|
|
9122
9178
|
closedRef.current = true;
|
|
9123
9179
|
setVisible(false);
|
|
9124
|
-
(_b = (_a =
|
|
9180
|
+
(_b = (_a = elementToRender.props).onClose) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
9125
9181
|
}
|
|
9126
9182
|
function afterClose() {
|
|
9127
9183
|
var _a, _b;
|
|
9128
9184
|
unmount2();
|
|
9129
|
-
(_b = (_a =
|
|
9185
|
+
(_b = (_a = elementToRender.props).afterClose) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
9130
9186
|
}
|
|
9131
9187
|
useImperativeHandle(ref, () => ({
|
|
9132
|
-
close: onClose
|
|
9188
|
+
close: onClose,
|
|
9189
|
+
replace: (element2) => {
|
|
9190
|
+
var _a, _b;
|
|
9191
|
+
keyRef.current++;
|
|
9192
|
+
(_b = (_a = elementToRender.props).afterClose) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
9193
|
+
setElementToRender(element2);
|
|
9194
|
+
}
|
|
9133
9195
|
}));
|
|
9134
|
-
return React$1.cloneElement(
|
|
9196
|
+
return React$1.cloneElement(elementToRender, Object.assign(Object.assign({}, elementToRender.props), {
|
|
9197
|
+
key: keyRef.current,
|
|
9135
9198
|
visible,
|
|
9136
9199
|
onClose,
|
|
9137
9200
|
afterClose
|
|
@@ -9141,25 +9204,30 @@ function renderImperatively(element) {
|
|
|
9141
9204
|
const unmount2 = renderToBody(React$1.createElement(Wrapper2, {
|
|
9142
9205
|
ref: wrapperRef
|
|
9143
9206
|
}));
|
|
9144
|
-
function close() {
|
|
9145
|
-
var _a;
|
|
9146
|
-
(_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
9147
|
-
}
|
|
9148
9207
|
return {
|
|
9149
|
-
close
|
|
9208
|
+
close: () => {
|
|
9209
|
+
var _a;
|
|
9210
|
+
(_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
9211
|
+
},
|
|
9212
|
+
replace: (element2) => {
|
|
9213
|
+
var _a;
|
|
9214
|
+
(_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.replace(element2);
|
|
9215
|
+
}
|
|
9150
9216
|
};
|
|
9151
9217
|
}
|
|
9152
9218
|
const classPrefix$1f = `adm-action-sheet`;
|
|
9153
|
-
const defaultProps$
|
|
9219
|
+
const defaultProps$_ = {
|
|
9154
9220
|
visible: false,
|
|
9155
9221
|
actions: [],
|
|
9156
9222
|
cancelText: "",
|
|
9157
9223
|
closeOnAction: false,
|
|
9158
9224
|
closeOnMaskClick: true,
|
|
9159
|
-
safeArea: true
|
|
9225
|
+
safeArea: true,
|
|
9226
|
+
destroyOnClose: false,
|
|
9227
|
+
forceRender: false
|
|
9160
9228
|
};
|
|
9161
9229
|
const ActionSheet = (p2) => {
|
|
9162
|
-
const props = mergeProps(defaultProps$
|
|
9230
|
+
const props = mergeProps(defaultProps$_, p2);
|
|
9163
9231
|
return React$1.createElement(Popup, {
|
|
9164
9232
|
visible: props.visible,
|
|
9165
9233
|
onMaskClick: () => {
|
|
@@ -9172,7 +9240,9 @@ const ActionSheet = (p2) => {
|
|
|
9172
9240
|
afterClose: props.afterClose,
|
|
9173
9241
|
className: classNames(`${classPrefix$1f}-popup`, props.popupClassName),
|
|
9174
9242
|
style: props.popupStyle,
|
|
9175
|
-
getContainer: props.getContainer
|
|
9243
|
+
getContainer: props.getContainer,
|
|
9244
|
+
destroyOnClose: props.destroyOnClose,
|
|
9245
|
+
forceRender: props.forceRender
|
|
9176
9246
|
}, withNativeProps(props, React$1.createElement("div", {
|
|
9177
9247
|
className: classPrefix$1f
|
|
9178
9248
|
}, props.extra && React$1.createElement("div", {
|
|
@@ -9218,7 +9288,7 @@ const ActionSheet = (p2) => {
|
|
|
9218
9288
|
function showActionSheet(props) {
|
|
9219
9289
|
return renderImperatively(React$1.createElement(ActionSheet, Object.assign({}, props)));
|
|
9220
9290
|
}
|
|
9221
|
-
var index$
|
|
9291
|
+
var index$i = attachPropertiesToComponent(ActionSheet, {
|
|
9222
9292
|
show: showActionSheet
|
|
9223
9293
|
});
|
|
9224
9294
|
var autoCenter = /* @__PURE__ */ (() => ".adm-auto-center {\n display: flex;\n justify-content: center;\n}\n.adm-auto-center-content {\n flex: 0 1 auto;\n}\n")();
|
|
@@ -9270,12 +9340,12 @@ const Fallback = memo(() => React$1.createElement("svg", {
|
|
|
9270
9340
|
mask: "url(#mask-2)"
|
|
9271
9341
|
}))))));
|
|
9272
9342
|
const classPrefix$1d = "adm-avatar";
|
|
9273
|
-
const defaultProps$
|
|
9343
|
+
const defaultProps$Z = {
|
|
9274
9344
|
fallback: React$1.createElement(Fallback, null),
|
|
9275
9345
|
fit: "cover"
|
|
9276
9346
|
};
|
|
9277
9347
|
const Avatar = (p2) => {
|
|
9278
|
-
const props = mergeProps(defaultProps$
|
|
9348
|
+
const props = mergeProps(defaultProps$Z, p2);
|
|
9279
9349
|
return withNativeProps(props, React$1.createElement(Image$1, {
|
|
9280
9350
|
className: classPrefix$1d,
|
|
9281
9351
|
src: props.src,
|
|
@@ -9288,7 +9358,7 @@ const Avatar = (p2) => {
|
|
|
9288
9358
|
onError: props.onError
|
|
9289
9359
|
}));
|
|
9290
9360
|
};
|
|
9291
|
-
var badge = /* @__PURE__ */ (() => ".adm-badge-
|
|
9361
|
+
var badge = /* @__PURE__ */ (() => ".adm-badge-wrapper {\n display: inline-block;\n position: relative;\n}\n.adm-badge {\n display: inline-flex;\n vertical-align: middle;\n box-sizing: content-box;\n border-radius: 100px;\n background-color: var(--color);\n --right: 0;\n --top: 0;\n --color: var(--adm-badge-color, #ff411c);\n}\n.adm-badge-content {\n color: var(--adm-color-white);\n box-sizing: border-box;\n min-width: 8px;\n padding: 1px 4px;\n font-size: var(--adm-font-size-1);\n line-height: 12px;\n white-space: nowrap;\n font-weight: normal;\n text-align: center;\n}\n.adm-badge-fixed {\n position: absolute;\n right: var(--right);\n top: var(--top);\n transform: translate(50%, -50%);\n}\n.adm-badge-dot {\n min-width: 10px;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n}\n.adm-badge-bordered {\n border: solid 1px var(--adm-color-white);\n}\n")();
|
|
9292
9362
|
const classPrefix$1c = `adm-badge`;
|
|
9293
9363
|
const dot = React$1.createElement(React$1.Fragment, null);
|
|
9294
9364
|
const Badge$1 = (props) => {
|
|
@@ -9308,7 +9378,8 @@ const Badge$1 = (props) => {
|
|
|
9308
9378
|
className: `${classPrefix$1c}-content`
|
|
9309
9379
|
}, content))) : null;
|
|
9310
9380
|
return children ? React$1.createElement("div", {
|
|
9311
|
-
className: `${classPrefix$1c}-
|
|
9381
|
+
className: classNames(`${classPrefix$1c}-wrapper`, props.wrapperClassName),
|
|
9382
|
+
style: props.wrapperStyle
|
|
9312
9383
|
}, children, element) : element;
|
|
9313
9384
|
};
|
|
9314
9385
|
var Badge = attachPropertiesToComponent(Badge$1, {
|
|
@@ -9322,12 +9393,12 @@ const colorRecord$3 = {
|
|
|
9322
9393
|
primary: "var(--adm-color-primary)",
|
|
9323
9394
|
white: "var(--adm-color-white)"
|
|
9324
9395
|
};
|
|
9325
|
-
const defaultProps$
|
|
9396
|
+
const defaultProps$Y = {
|
|
9326
9397
|
color: "default"
|
|
9327
9398
|
};
|
|
9328
9399
|
const DotLoading = memo((p2) => {
|
|
9329
9400
|
var _a;
|
|
9330
|
-
const props = mergeProps(defaultProps$
|
|
9401
|
+
const props = mergeProps(defaultProps$Y, p2);
|
|
9331
9402
|
return withNativeProps(props, React$1.createElement("div", {
|
|
9332
9403
|
style: {
|
|
9333
9404
|
color: (_a = colorRecord$3[props.color]) !== null && _a !== void 0 ? _a : props.color
|
|
@@ -9376,7 +9447,7 @@ function isIOS() {
|
|
|
9376
9447
|
return canUseDom ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
|
|
9377
9448
|
}
|
|
9378
9449
|
const classPrefix$1a = `adm-button`;
|
|
9379
|
-
const defaultProps$
|
|
9450
|
+
const defaultProps$X = {
|
|
9380
9451
|
color: "default",
|
|
9381
9452
|
fill: "solid",
|
|
9382
9453
|
block: false,
|
|
@@ -9389,7 +9460,7 @@ const defaultProps$W = {
|
|
|
9389
9460
|
size: "middle"
|
|
9390
9461
|
};
|
|
9391
9462
|
const Button = forwardRef((p2, ref) => {
|
|
9392
|
-
const props = mergeProps(defaultProps$
|
|
9463
|
+
const props = mergeProps(defaultProps$X, p2);
|
|
9393
9464
|
const [innerLoading, setInnerLoading] = useState(false);
|
|
9394
9465
|
const nativeButtonRef = useRef(null);
|
|
9395
9466
|
const loading = props.loading === "auto" ? innerLoading : props.loading;
|
|
@@ -9534,10 +9605,8 @@ function usePropsValue(options) {
|
|
|
9534
9605
|
}
|
|
9535
9606
|
const setState = useMemoizedFn((v) => {
|
|
9536
9607
|
const nextValue = typeof v === "function" ? v(stateRef.current) : v;
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
update();
|
|
9540
|
-
}
|
|
9608
|
+
stateRef.current = nextValue;
|
|
9609
|
+
update();
|
|
9541
9610
|
onChange === null || onChange === void 0 ? void 0 : onChange(nextValue);
|
|
9542
9611
|
});
|
|
9543
9612
|
return [stateRef.current, setState];
|
|
@@ -9556,7 +9625,7 @@ function convertValueToRange(selectionMode, value) {
|
|
|
9556
9625
|
}
|
|
9557
9626
|
dayjs.extend(isoWeek);
|
|
9558
9627
|
const classPrefix$19 = "adm-calendar";
|
|
9559
|
-
const defaultProps$
|
|
9628
|
+
const defaultProps$W = {
|
|
9560
9629
|
weekStartsOn: "Sunday",
|
|
9561
9630
|
defaultValue: null,
|
|
9562
9631
|
allowClear: true,
|
|
@@ -9567,7 +9636,7 @@ const defaultProps$V = {
|
|
|
9567
9636
|
};
|
|
9568
9637
|
const Calendar = forwardRef((p2, ref) => {
|
|
9569
9638
|
const today = dayjs();
|
|
9570
|
-
const props = mergeProps(defaultProps$
|
|
9639
|
+
const props = mergeProps(defaultProps$W, p2);
|
|
9571
9640
|
const {
|
|
9572
9641
|
locale
|
|
9573
9642
|
} = useConfig();
|
|
@@ -9992,7 +10061,7 @@ const CapsuleTabs = (props) => {
|
|
|
9992
10061
|
}, pane.props.children));
|
|
9993
10062
|
})));
|
|
9994
10063
|
};
|
|
9995
|
-
var index$
|
|
10064
|
+
var index$h = attachPropertiesToComponent(CapsuleTabs, {
|
|
9996
10065
|
Tab: CapsuleTab
|
|
9997
10066
|
});
|
|
9998
10067
|
var card = /* @__PURE__ */ (() => ".adm-card {\n background: var(--adm-color-background);\n border-radius: 8px;\n padding: 0 12px;\n}\n.adm-card-header {\n position: relative;\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n padding: 12px 0;\n}\n.adm-card-header:not(:last-child) {\n border-bottom: solid 0.5px var(--adm-color-border);\n}\n.adm-card-header-title {\n font-size: var(--adm-font-size-7);\n line-height: 1.4;\n font-weight: bold;\n}\n.adm-card-body {\n padding: 12px 0;\n}\n")();
|
|
@@ -10424,26 +10493,30 @@ const Wheel = memo((props) => {
|
|
|
10424
10493
|
className: "adm-picker-view-column-accessible-current",
|
|
10425
10494
|
role: "button",
|
|
10426
10495
|
"aria-label": current ? `\u5F53\u524D\u9009\u62E9\u7684\u662F\uFF1A${current.label}` : "\u5F53\u524D\u672A\u9009\u62E9"
|
|
10427
|
-
}, "-"), React$1.createElement("div",
|
|
10496
|
+
}, "-"), React$1.createElement("div", {
|
|
10428
10497
|
className: "adm-picker-view-column-accessible-button",
|
|
10429
10498
|
onClick: () => {
|
|
10499
|
+
if (!previous)
|
|
10500
|
+
return;
|
|
10430
10501
|
scrollSelect(previousIndex);
|
|
10431
10502
|
},
|
|
10432
|
-
role: "button",
|
|
10433
|
-
"aria-label": `\u9009\u62E9\u4E0A\u4E00\u9879\uFF1A${previous.label}`
|
|
10434
|
-
}, "-")
|
|
10503
|
+
role: previous ? "button" : "text",
|
|
10504
|
+
"aria-label": !previous ? "\u6CA1\u6709\u4E0A\u4E00\u9879" : `\u9009\u62E9\u4E0A\u4E00\u9879\uFF1A${previous.label}`
|
|
10505
|
+
}, "-"), React$1.createElement("div", {
|
|
10435
10506
|
className: "adm-picker-view-column-accessible-button",
|
|
10436
10507
|
onClick: () => {
|
|
10508
|
+
if (!next)
|
|
10509
|
+
return;
|
|
10437
10510
|
scrollSelect(nextIndex);
|
|
10438
10511
|
},
|
|
10439
|
-
role: "button",
|
|
10440
|
-
"aria-label": `\u9009\u62E9\u4E0B\u4E00\u9879\uFF1A${next.label}`
|
|
10441
|
-
}, "-"))
|
|
10512
|
+
role: next ? "button" : "text",
|
|
10513
|
+
"aria-label": !next ? "\u6CA1\u6709\u4E0B\u4E00\u9879" : `\u9009\u62E9\u4E0B\u4E00\u9879\uFF1A${next.label}`
|
|
10514
|
+
}, "-"));
|
|
10442
10515
|
}
|
|
10443
10516
|
return React$1.createElement("div", {
|
|
10444
|
-
ref: rootRef,
|
|
10445
10517
|
className: `${classPrefix$15}-column`
|
|
10446
10518
|
}, React$1.createElement(animated.div, {
|
|
10519
|
+
ref: rootRef,
|
|
10447
10520
|
style: {
|
|
10448
10521
|
translateY: y
|
|
10449
10522
|
},
|
|
@@ -10523,13 +10596,13 @@ function useColumnsExtend(rawColumns, value) {
|
|
|
10523
10596
|
}
|
|
10524
10597
|
const defaultRenderLabel$3 = (item) => item.label;
|
|
10525
10598
|
const classPrefix$14 = `adm-picker-view`;
|
|
10526
|
-
const defaultProps$
|
|
10599
|
+
const defaultProps$V = {
|
|
10527
10600
|
defaultValue: [],
|
|
10528
10601
|
renderLabel: defaultRenderLabel$3,
|
|
10529
10602
|
mouseWheel: false
|
|
10530
10603
|
};
|
|
10531
10604
|
const PickerView = memo((p2) => {
|
|
10532
|
-
const props = mergeProps(defaultProps$
|
|
10605
|
+
const props = mergeProps(defaultProps$V, p2);
|
|
10533
10606
|
const [innerValue, setInnerValue] = useState(props.value === void 0 ? props.defaultValue : props.value);
|
|
10534
10607
|
useEffect(() => {
|
|
10535
10608
|
if (props.value === void 0)
|
|
@@ -10590,19 +10663,21 @@ const PickerView = memo((p2) => {
|
|
|
10590
10663
|
}))));
|
|
10591
10664
|
});
|
|
10592
10665
|
PickerView.displayName = "PickerView";
|
|
10593
|
-
var pickerView = /* @__PURE__ */ (() => ".adm-picker-view {\n --height: 240px;\n --item-height: 34px;\n --item-font-size: var(--adm-font-size-8);\n height: var(--height);\n width: 100%;\n display: flex;\n position: relative;\n overflow: hidden;\n background: var(--adm-color-white);\n}\n.adm-picker-view-column {\n height: 100%;\n flex: 1;\n user-select: none;\n touch-action: none;\n position: relative;\n z-index: 0;\n}\n.adm-picker-view-column-wheel {\n width: 100%;\n cursor: grab;\n position: absolute;\n top: calc(50% - var(--item-height) / 2);\n left: 0;\n}\n.adm-picker-view-column-wheel::before {\n content: ' ';\n display: block;\n position: absolute;\n width: 100%;\n height: 100vh;\n top: -100vh;\n}\n.adm-picker-view-column-wheel::after {\n content: ' ';\n display: block;\n position: absolute;\n width: 100%;\n height: 100vh;\n bottom: -100vh;\n}\n.adm-picker-view-column-item {\n font-size: var(--item-font-size);\n padding: 0 6px;\n height: var(--item-height);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.adm-picker-view-column-item-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.adm-picker-view-column-accessible {\n width: 100%;\n height: 100%;\n pointer-events: none;\n opacity: 0;\n display: flex;\n flex-direction: column;\n position: relative;\n z-index: 0;\n}\n.adm-picker-view-column-accessible > * {\n flex: 1;\n text-overflow: ellipsis;\n}\n.adm-picker-view-column-accessible-current {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.adm-picker-view-column-accessible-button {\n width: 100%;\n height: 100%;\n}\n.adm-picker-view-mask {\n position: absolute;\n z-index: 10000;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n pointer-events: none;\n}\n.adm-picker-view-mask-top,\n.adm-picker-view-mask-bottom {\n flex: auto;\n}\n.adm-picker-view-mask-middle {\n height: var(--item-height);\n box-sizing: border-box;\n flex: none;\n border-top: solid 1px var(--adm-color-border);\n border-bottom: solid 1px var(--adm-color-border);\n}\n.adm-picker-view-mask-top {\n background: linear-gradient(0deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 50%, #ffffff);\n}\n.adm-picker-view-mask-bottom {\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 50%, #ffffff);\n}\n")();
|
|
10666
|
+
var pickerView = /* @__PURE__ */ (() => ".adm-picker-view {\n --height: 240px;\n --item-height: 34px;\n --item-font-size: var(--adm-font-size-8);\n height: var(--height);\n width: 100%;\n display: flex;\n position: relative;\n overflow: hidden;\n background: var(--adm-color-white);\n}\n.adm-picker-view-column {\n height: 100%;\n flex: 1;\n user-select: none;\n touch-action: none;\n position: relative;\n z-index: 0;\n}\n.adm-picker-view-column-wheel {\n width: 100%;\n cursor: grab;\n position: absolute;\n top: calc(50% - var(--item-height) / 2);\n left: 0;\n}\n.adm-picker-view-column-wheel::before {\n content: ' ';\n display: block;\n position: absolute;\n width: 100%;\n height: 100vh;\n top: -100vh;\n}\n.adm-picker-view-column-wheel::after {\n content: ' ';\n display: block;\n position: absolute;\n width: 100%;\n height: 100vh;\n bottom: -100vh;\n}\n.adm-picker-view-column-item {\n font-size: var(--item-font-size);\n padding: 0 6px;\n height: var(--item-height);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.adm-picker-view-column-item-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.adm-picker-view-column-accessible {\n width: 100%;\n height: 100%;\n pointer-events: none;\n opacity: 0;\n display: flex;\n flex-direction: column;\n position: relative;\n z-index: 0;\n padding-bottom: 1px;\n}\n.adm-picker-view-column-accessible > * {\n flex: 1;\n text-overflow: ellipsis;\n}\n.adm-picker-view-column-accessible-current {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.adm-picker-view-column-accessible-button {\n width: 100%;\n height: 100%;\n}\n.adm-picker-view-mask {\n position: absolute;\n z-index: 10000;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n pointer-events: none;\n}\n.adm-picker-view-mask-top,\n.adm-picker-view-mask-bottom {\n flex: auto;\n}\n.adm-picker-view-mask-middle {\n height: var(--item-height);\n box-sizing: border-box;\n flex: none;\n border-top: solid 1px var(--adm-color-border);\n border-bottom: solid 1px var(--adm-color-border);\n}\n.adm-picker-view-mask-top {\n background: linear-gradient(0deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 50%, #ffffff);\n}\n.adm-picker-view-mask-bottom {\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 50%, #ffffff);\n}\n")();
|
|
10594
10667
|
const classPrefix$13 = `adm-picker`;
|
|
10595
|
-
const defaultProps$
|
|
10668
|
+
const defaultProps$U = {
|
|
10596
10669
|
defaultValue: [],
|
|
10597
10670
|
closeOnMaskClick: true,
|
|
10598
|
-
renderLabel: defaultRenderLabel$3
|
|
10671
|
+
renderLabel: defaultRenderLabel$3,
|
|
10672
|
+
destroyOnClose: false,
|
|
10673
|
+
forceRender: false
|
|
10599
10674
|
};
|
|
10600
10675
|
const Picker$1 = memo(forwardRef((p2, ref) => {
|
|
10601
10676
|
var _a;
|
|
10602
10677
|
const {
|
|
10603
10678
|
locale
|
|
10604
10679
|
} = useConfig();
|
|
10605
|
-
const props = mergeProps(defaultProps$
|
|
10680
|
+
const props = mergeProps(defaultProps$U, {
|
|
10606
10681
|
confirmText: locale.common.confirm,
|
|
10607
10682
|
cancelText: locale.common.cancel
|
|
10608
10683
|
}, p2);
|
|
@@ -10654,12 +10729,12 @@ const Picker$1 = memo(forwardRef((p2, ref) => {
|
|
|
10654
10729
|
(_a2 = props.onSelect) === null || _a2 === void 0 ? void 0 : _a2.call(props, val, ext);
|
|
10655
10730
|
}
|
|
10656
10731
|
});
|
|
10657
|
-
const shouldRender = useShouldRender(visible, props.forceRender, props.destroyOnClose);
|
|
10658
10732
|
const pickerElement = withNativeProps(props, React$1.createElement("div", {
|
|
10659
10733
|
className: classPrefix$13
|
|
10660
10734
|
}, React$1.createElement("div", {
|
|
10661
10735
|
className: `${classPrefix$13}-header`
|
|
10662
10736
|
}, React$1.createElement("a", {
|
|
10737
|
+
role: "button",
|
|
10663
10738
|
className: `${classPrefix$13}-header-button`,
|
|
10664
10739
|
onClick: () => {
|
|
10665
10740
|
var _a2;
|
|
@@ -10669,6 +10744,7 @@ const Picker$1 = memo(forwardRef((p2, ref) => {
|
|
|
10669
10744
|
}, props.cancelText), React$1.createElement("div", {
|
|
10670
10745
|
className: `${classPrefix$13}-header-title`
|
|
10671
10746
|
}, props.title), React$1.createElement("a", {
|
|
10747
|
+
role: "button",
|
|
10672
10748
|
className: `${classPrefix$13}-header-button`,
|
|
10673
10749
|
onClick: () => {
|
|
10674
10750
|
setValue(innerValue);
|
|
@@ -10696,13 +10772,13 @@ const Picker$1 = memo(forwardRef((p2, ref) => {
|
|
|
10696
10772
|
setVisible(false);
|
|
10697
10773
|
},
|
|
10698
10774
|
getContainer: props.getContainer,
|
|
10699
|
-
destroyOnClose:
|
|
10775
|
+
destroyOnClose: props.destroyOnClose,
|
|
10700
10776
|
afterShow: props.afterShow,
|
|
10701
10777
|
afterClose: props.afterClose,
|
|
10702
10778
|
onClick: props.onClick,
|
|
10703
|
-
forceRender:
|
|
10779
|
+
forceRender: props.forceRender,
|
|
10704
10780
|
stopPropagation: props.stopPropagation
|
|
10705
|
-
},
|
|
10781
|
+
}, pickerElement, React$1.createElement(SafeArea, {
|
|
10706
10782
|
position: "bottom"
|
|
10707
10783
|
}));
|
|
10708
10784
|
return React$1.createElement(React$1.Fragment, null, popupElement, (_a = props.children) === null || _a === void 0 ? void 0 : _a.call(props, extend.items, actions));
|
|
@@ -10820,7 +10896,7 @@ function prompt$2(props) {
|
|
|
10820
10896
|
const unmount2 = renderToBody(React$1.createElement(Wrapper2, null));
|
|
10821
10897
|
});
|
|
10822
10898
|
}
|
|
10823
|
-
var index$
|
|
10899
|
+
var index$g = attachPropertiesToComponent(CascadePicker, {
|
|
10824
10900
|
prompt: prompt$2
|
|
10825
10901
|
});
|
|
10826
10902
|
const CascadePickerView = (props) => {
|
|
@@ -10838,13 +10914,13 @@ const classPrefix$12 = `adm-tabs`;
|
|
|
10838
10914
|
const Tab = () => {
|
|
10839
10915
|
return null;
|
|
10840
10916
|
};
|
|
10841
|
-
const defaultProps$
|
|
10917
|
+
const defaultProps$T = {
|
|
10842
10918
|
activeLineMode: "auto",
|
|
10843
10919
|
stretch: true
|
|
10844
10920
|
};
|
|
10845
10921
|
const Tabs$1 = (p2) => {
|
|
10846
10922
|
var _a;
|
|
10847
|
-
const props = mergeProps(defaultProps$
|
|
10923
|
+
const props = mergeProps(defaultProps$T, p2);
|
|
10848
10924
|
const tabListContainerRef = useRef(null);
|
|
10849
10925
|
const activeLineRef = useRef(null);
|
|
10850
10926
|
const keyToIndexRecord = {};
|
|
@@ -11063,15 +11139,22 @@ var Tabs = attachPropertiesToComponent(Tabs$1, {
|
|
|
11063
11139
|
Tab
|
|
11064
11140
|
});
|
|
11065
11141
|
var checkList = /* @__PURE__ */ (() => ".adm-check-list-item-extra {\n font-size: var(--adm-font-size-8);\n line-height: 1;\n color: var(--adm-color-primary);\n}\n.adm-check-list-item-readonly {\n cursor: unset;\n}\n")();
|
|
11066
|
-
var list = /* @__PURE__ */ (() => ".adm-list {\n --header-font-size: var(--adm-font-size-7);\n --prefix-width: 'auto';\n --prefix-padding-right: 12px;\n --align-items: center;\n --active-background-color: var(--adm-color-border);\n --border-inner: solid 1px var(--adm-color-border);\n --border-top: solid 1px var(--adm-color-border);\n --border-bottom: solid 1px var(--adm-color-border);\n --padding-left: 12px;\n --padding-right: 12px;\n --font-size: var(--adm-font-size-9);\n}\n.adm-list-header {\n color: var(--adm-color-weak);\n font-size: var(--header-font-size);\n padding: 8px var(--padding-right) 8px var(--padding-left);\n}\n.adm-list-body {\n background-color: var(--adm-color-background);\n overflow: hidden;\n font-size: var(--font-size);\n}\n.adm-list-body-inner {\n margin-top: -1px;\n}\n.adm-list-default .adm-list-body {\n border-top: var(--border-top);\n border-bottom: var(--border-bottom);\n}\n.adm-list-card {\n margin: 12px;\n}\n.adm-list-card .adm-list-body {\n border-radius: 8px;\n}\n.adm-list-card .adm-list-header {\n padding-left: 0;\n}\n.adm-list-item {\n display: block;\n padding-left: var(--padding-left);\n position: relative;\n background-color: var(--adm-color-background);\n line-height: 1.5;\n}\n.adm-list-item-title,\n.adm-list-item-description {\n color: var(--adm-color-weak);\n font-size: var(--adm-font-size-main);\n}\n.adm-list-item-content {\n display: flex;\n align-items: var(--align-items);\n justify-content: flex-start;\n border-top: var(--border-inner);\n padding-right: var(--padding-right);\n}\n.adm-list-item-content-prefix {\n width: var(--prefix-width);\n flex: none;\n padding-right: var(--prefix-padding-right);\n}\n.adm-list-item-content-main {\n flex: auto;\n padding: 12px 0;\n}\n.adm-list-item-content-extra {\n padding-left: 12px;\n font-size: var(--adm-font-size-7);\n color: var(--adm-color-weak);\n}\n.adm-list-item-content-arrow {\n flex: none;\n display: flex;\n align-items: center;\n margin-left: 4px;\n color: var(--adm-color-light);\n font-size: 19px;\n}\n.adm-list-item-disabled {\n cursor: not-allowed;\n}\n.adm-list-item-disabled.adm-list-item-disabled > .adm-list-item-content > * {\n opacity: 0.4;\n pointer-events: none;\n}\na.adm-list-item:active:not(.adm-list-item-disabled) {\n background-color: var(--active-background-color);\n}\na.adm-list-item:active:not(.adm-list-item-disabled)::after {\n content: ' ';\n display: block;\n position: absolute;\n width: 100%;\n bottom: -1px;\n left: 0;\n border-bottom: var(--border-inner);\n}\n")();
|
|
11142
|
+
var list = /* @__PURE__ */ (() => ".adm-list {\n --header-font-size: var(--adm-font-size-7);\n --prefix-width: 'auto';\n --prefix-padding-right: 12px;\n --align-items: center;\n --active-background-color: var(--adm-color-border);\n --border-inner: solid 1px var(--adm-color-border);\n --border-top: solid 1px var(--adm-color-border);\n --border-bottom: solid 1px var(--adm-color-border);\n --padding-left: 12px;\n --padding-right: 12px;\n --font-size: var(--adm-font-size-9);\n --extra-max-width: 70%;\n}\n.adm-list-header {\n color: var(--adm-color-weak);\n font-size: var(--header-font-size);\n padding: 8px var(--padding-right) 8px var(--padding-left);\n}\n.adm-list-body {\n background-color: var(--adm-color-background);\n overflow: hidden;\n font-size: var(--font-size);\n}\n.adm-list-body-inner {\n margin-top: -1px;\n}\n.adm-list-default .adm-list-body {\n border-top: var(--border-top);\n border-bottom: var(--border-bottom);\n}\n.adm-list-card {\n margin: 12px;\n}\n.adm-list-card .adm-list-body {\n border-radius: 8px;\n}\n.adm-list-card .adm-list-header {\n padding-left: 0;\n}\n.adm-list-item {\n display: block;\n padding-left: var(--padding-left);\n position: relative;\n background-color: var(--adm-color-background);\n line-height: 1.5;\n}\n.adm-list-item-title,\n.adm-list-item-description {\n color: var(--adm-color-weak);\n font-size: var(--adm-font-size-main);\n}\n.adm-list-item-content {\n display: flex;\n align-items: var(--align-items);\n justify-content: flex-start;\n border-top: var(--border-inner);\n padding-right: var(--padding-right);\n}\n.adm-list-item-content-prefix {\n width: var(--prefix-width);\n flex: none;\n padding-right: var(--prefix-padding-right);\n}\n.adm-list-item-content-main {\n flex: auto;\n padding: 12px 0;\n}\n.adm-list-item-content-extra {\n flex: none;\n padding-left: 12px;\n font-size: var(--adm-font-size-7);\n color: var(--adm-color-weak);\n max-width: var(--extra-max-width);\n}\n.adm-list-item-content-arrow {\n flex: none;\n display: flex;\n align-items: center;\n margin-left: 4px;\n color: var(--adm-color-light);\n font-size: 19px;\n}\n.adm-list-item-disabled {\n cursor: not-allowed;\n}\n.adm-list-item-disabled.adm-list-item-disabled > .adm-list-item-content > * {\n opacity: 0.4;\n pointer-events: none;\n}\na.adm-list-item:active:not(.adm-list-item-disabled) {\n background-color: var(--active-background-color);\n}\na.adm-list-item:active:not(.adm-list-item-disabled)::after {\n content: ' ';\n display: block;\n position: absolute;\n width: 100%;\n bottom: -1px;\n left: 0;\n border-bottom: var(--border-inner);\n}\n")();
|
|
11067
11143
|
const classPrefix$11 = `adm-list`;
|
|
11068
|
-
const defaultProps$
|
|
11144
|
+
const defaultProps$S = {
|
|
11069
11145
|
mode: "default"
|
|
11070
11146
|
};
|
|
11071
|
-
const List$1 = (p2) => {
|
|
11072
|
-
const props = mergeProps(defaultProps$
|
|
11147
|
+
const List$1 = forwardRef((p2, ref) => {
|
|
11148
|
+
const props = mergeProps(defaultProps$S, p2);
|
|
11149
|
+
const nativeElementRef = useRef(null);
|
|
11150
|
+
useImperativeHandle(ref, () => ({
|
|
11151
|
+
get nativeElement() {
|
|
11152
|
+
return nativeElementRef.current;
|
|
11153
|
+
}
|
|
11154
|
+
}));
|
|
11073
11155
|
return withNativeProps(props, React$1.createElement("div", {
|
|
11074
|
-
className: classNames(classPrefix$11, `${classPrefix$11}-${props.mode}`)
|
|
11156
|
+
className: classNames(classPrefix$11, `${classPrefix$11}-${props.mode}`),
|
|
11157
|
+
ref: nativeElementRef
|
|
11075
11158
|
}, props.header && React$1.createElement("div", {
|
|
11076
11159
|
className: `${classPrefix$11}-header`
|
|
11077
11160
|
}, props.header), React$1.createElement("div", {
|
|
@@ -11079,7 +11162,7 @@ const List$1 = (p2) => {
|
|
|
11079
11162
|
}, React$1.createElement("div", {
|
|
11080
11163
|
className: `${classPrefix$11}-body-inner`
|
|
11081
11164
|
}, props.children))));
|
|
11082
|
-
};
|
|
11165
|
+
});
|
|
11083
11166
|
function isNodeWithContent(node) {
|
|
11084
11167
|
return node !== void 0 && node !== null && node !== false;
|
|
11085
11168
|
}
|
|
@@ -11113,13 +11196,13 @@ var List = attachPropertiesToComponent(List$1, {
|
|
|
11113
11196
|
});
|
|
11114
11197
|
const CheckListContext = createContext(null);
|
|
11115
11198
|
const classPrefix$$ = "adm-check-list";
|
|
11116
|
-
const defaultProps$
|
|
11199
|
+
const defaultProps$R = {
|
|
11117
11200
|
multiple: false,
|
|
11118
11201
|
defaultValue: [],
|
|
11119
11202
|
activeIcon: React$1.createElement(CheckOutline, null)
|
|
11120
11203
|
};
|
|
11121
11204
|
const CheckList$1 = (p2) => {
|
|
11122
|
-
const props = mergeProps(defaultProps$
|
|
11205
|
+
const props = mergeProps(defaultProps$R, p2);
|
|
11123
11206
|
const [value, setValue] = usePropsValue(props);
|
|
11124
11207
|
function check(val) {
|
|
11125
11208
|
if (props.multiple) {
|
|
@@ -11288,14 +11371,14 @@ var Skeleton = attachPropertiesToComponent(Skeleton$1, {
|
|
|
11288
11371
|
Paragraph: SkeletonParagraph
|
|
11289
11372
|
});
|
|
11290
11373
|
const classPrefix$Y = `adm-cascader-view`;
|
|
11291
|
-
const defaultProps$
|
|
11374
|
+
const defaultProps$Q = {
|
|
11292
11375
|
defaultValue: []
|
|
11293
11376
|
};
|
|
11294
11377
|
const CascaderView$1 = (p2) => {
|
|
11295
11378
|
const {
|
|
11296
11379
|
locale
|
|
11297
11380
|
} = useConfig();
|
|
11298
|
-
const props = mergeProps(defaultProps$
|
|
11381
|
+
const props = mergeProps(defaultProps$Q, {
|
|
11299
11382
|
placeholder: locale.Cascader.placeholder
|
|
11300
11383
|
}, p2);
|
|
11301
11384
|
const [value, setValue] = usePropsValue(Object.assign(Object.assign({}, props), {
|
|
@@ -11402,19 +11485,43 @@ var CascaderView = attachPropertiesToComponent(CascaderView$1, {
|
|
|
11402
11485
|
optionSkeleton
|
|
11403
11486
|
});
|
|
11404
11487
|
const classPrefix$X = `adm-cascader`;
|
|
11405
|
-
const defaultProps$
|
|
11406
|
-
defaultValue: []
|
|
11488
|
+
const defaultProps$P = {
|
|
11489
|
+
defaultValue: [],
|
|
11490
|
+
destroyOnClose: true,
|
|
11491
|
+
forceRender: false
|
|
11407
11492
|
};
|
|
11408
|
-
const Cascader = (p2) => {
|
|
11493
|
+
const Cascader = forwardRef((p2, ref) => {
|
|
11409
11494
|
var _a;
|
|
11410
11495
|
const {
|
|
11411
11496
|
locale
|
|
11412
11497
|
} = useConfig();
|
|
11413
|
-
const props = mergeProps(defaultProps$
|
|
11498
|
+
const props = mergeProps(defaultProps$P, {
|
|
11414
11499
|
confirmText: locale.common.confirm,
|
|
11415
11500
|
cancelText: locale.common.cancel,
|
|
11416
11501
|
placeholder: locale.Cascader.placeholder
|
|
11417
11502
|
}, p2);
|
|
11503
|
+
const [visible, setVisible] = usePropsValue({
|
|
11504
|
+
value: props.visible,
|
|
11505
|
+
defaultValue: false,
|
|
11506
|
+
onChange: (v) => {
|
|
11507
|
+
var _a2;
|
|
11508
|
+
if (v === false) {
|
|
11509
|
+
(_a2 = props.onClose) === null || _a2 === void 0 ? void 0 : _a2.call(props);
|
|
11510
|
+
}
|
|
11511
|
+
}
|
|
11512
|
+
});
|
|
11513
|
+
const actions = {
|
|
11514
|
+
toggle: () => {
|
|
11515
|
+
setVisible((v) => !v);
|
|
11516
|
+
},
|
|
11517
|
+
open: () => {
|
|
11518
|
+
setVisible(true);
|
|
11519
|
+
},
|
|
11520
|
+
close: () => {
|
|
11521
|
+
setVisible(false);
|
|
11522
|
+
}
|
|
11523
|
+
};
|
|
11524
|
+
useImperativeHandle(ref, () => actions);
|
|
11418
11525
|
const [value, setValue] = usePropsValue(Object.assign(Object.assign({}, props), {
|
|
11419
11526
|
onChange: (val) => {
|
|
11420
11527
|
var _a2;
|
|
@@ -11424,12 +11531,12 @@ const Cascader = (p2) => {
|
|
|
11424
11531
|
const generateValueExtend = useCascaderValueExtend(props.options);
|
|
11425
11532
|
const [innerValue, setInnerValue] = useState(value);
|
|
11426
11533
|
useEffect(() => {
|
|
11427
|
-
if (!
|
|
11534
|
+
if (!visible) {
|
|
11428
11535
|
setInnerValue(value);
|
|
11429
11536
|
}
|
|
11430
|
-
}, [
|
|
11537
|
+
}, [visible]);
|
|
11431
11538
|
useEffect(() => {
|
|
11432
|
-
if (!
|
|
11539
|
+
if (!visible) {
|
|
11433
11540
|
setInnerValue(value);
|
|
11434
11541
|
}
|
|
11435
11542
|
}, [value]);
|
|
@@ -11440,18 +11547,17 @@ const Cascader = (p2) => {
|
|
|
11440
11547
|
}, React$1.createElement("a", {
|
|
11441
11548
|
className: `${classPrefix$X}-header-button`,
|
|
11442
11549
|
onClick: () => {
|
|
11443
|
-
var _a2
|
|
11550
|
+
var _a2;
|
|
11444
11551
|
(_a2 = props.onCancel) === null || _a2 === void 0 ? void 0 : _a2.call(props);
|
|
11445
|
-
(
|
|
11552
|
+
setVisible(false);
|
|
11446
11553
|
}
|
|
11447
11554
|
}, props.cancelText), React$1.createElement("div", {
|
|
11448
11555
|
className: `${classPrefix$X}-header-title`
|
|
11449
11556
|
}, props.title), React$1.createElement("a", {
|
|
11450
11557
|
className: `${classPrefix$X}-header-button`,
|
|
11451
11558
|
onClick: () => {
|
|
11452
|
-
var _a2;
|
|
11453
11559
|
setValue(innerValue);
|
|
11454
|
-
(
|
|
11560
|
+
setVisible(false);
|
|
11455
11561
|
}
|
|
11456
11562
|
}, props.confirmText)), React$1.createElement("div", {
|
|
11457
11563
|
className: `${classPrefix$X}-body`
|
|
@@ -11460,28 +11566,29 @@ const Cascader = (p2) => {
|
|
|
11460
11566
|
onChange: (val, ext) => {
|
|
11461
11567
|
var _a2;
|
|
11462
11568
|
setInnerValue(val);
|
|
11463
|
-
if (
|
|
11569
|
+
if (visible) {
|
|
11464
11570
|
(_a2 = props.onSelect) === null || _a2 === void 0 ? void 0 : _a2.call(props, val, ext);
|
|
11465
11571
|
}
|
|
11466
11572
|
}
|
|
11467
11573
|
})))));
|
|
11468
11574
|
const popupElement = React$1.createElement(Popup, {
|
|
11469
|
-
visible
|
|
11575
|
+
visible,
|
|
11470
11576
|
position: "bottom",
|
|
11471
11577
|
onMaskClick: () => {
|
|
11472
|
-
var _a2
|
|
11578
|
+
var _a2;
|
|
11473
11579
|
(_a2 = props.onCancel) === null || _a2 === void 0 ? void 0 : _a2.call(props);
|
|
11474
|
-
(
|
|
11580
|
+
setVisible(false);
|
|
11475
11581
|
},
|
|
11476
11582
|
getContainer: props.getContainer,
|
|
11477
|
-
destroyOnClose:
|
|
11583
|
+
destroyOnClose: props.destroyOnClose,
|
|
11584
|
+
forceRender: props.forceRender,
|
|
11478
11585
|
afterShow: props.afterShow,
|
|
11479
11586
|
afterClose: props.afterClose,
|
|
11480
11587
|
onClick: props.onClick,
|
|
11481
11588
|
stopPropagation: props.stopPropagation
|
|
11482
11589
|
}, cascaderElement);
|
|
11483
|
-
return React$1.createElement(React$1.Fragment, null, popupElement, (_a = props.children) === null || _a === void 0 ? void 0 : _a.call(props, generateValueExtend(value).items));
|
|
11484
|
-
};
|
|
11590
|
+
return React$1.createElement(React$1.Fragment, null, popupElement, (_a = props.children) === null || _a === void 0 ? void 0 : _a.call(props, generateValueExtend(value).items, actions));
|
|
11591
|
+
});
|
|
11485
11592
|
function prompt$1(props) {
|
|
11486
11593
|
return new Promise((resolve) => {
|
|
11487
11594
|
const Wrapper2 = () => {
|
|
@@ -11513,30 +11620,14 @@ function prompt$1(props) {
|
|
|
11513
11620
|
});
|
|
11514
11621
|
}
|
|
11515
11622
|
var cascader = /* @__PURE__ */ (() => ".adm-cascader {\n width: 100%;\n overflow: hidden;\n position: relative;\n display: flex;\n flex-direction: column;\n}\n.adm-cascader-header {\n flex: none;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 6px 8px;\n}\n.adm-cascader-header-button {\n font-size: var(--adm-font-size-7);\n display: inline-block;\n padding: 4px 4px;\n}\n.adm-cascader-header-title {\n padding: 4px 4px;\n font-size: var(--adm-font-size-7);\n color: var(--adm-color-text);\n text-align: center;\n flex: 1;\n}\n.adm-cascader-body {\n flex: auto;\n height: 100%;\n width: 100%;\n}\n.adm-cascader-body > .adm-cascader-view {\n --height: 310px;\n}\n")();
|
|
11516
|
-
var index$
|
|
11623
|
+
var index$f = attachPropertiesToComponent(Cascader, {
|
|
11517
11624
|
prompt: prompt$1,
|
|
11518
11625
|
optionSkeleton
|
|
11519
11626
|
});
|
|
11520
|
-
var centerPopup = /* @__PURE__ */ (() => ".adm-center-popup {\n --background-color: var(--adm-center-popup-background-color, var(--adm-color-background));\n --border-radius: var(--adm-center-popup-border-radius, 8px);\n --max-width: var(--adm-center-popup-max-width, 75vw);\n --min-width: var(--adm-center-popup-min-width, 280px);\n --z-index: var(--adm-center-popup-z-index, 1000);\n position: fixed;\n z-index: var(--z-index);\n}\n.adm-center-popup .adm-center-popup-mask {\n z-index: 0;\n}\n.adm-center-popup-wrap {\n position: fixed;\n z-index: 1;\n top: 50%;\n left: 50%;\n width: auto;\n min-width: var(--min-width);\n max-width: var(--max-width);\n transform: translate(-50%, -50%);\n}\n.adm-center-popup-body {\n background-color: var(--background-color);\n border-radius: var(--border-radius);\n}\n")();
|
|
11521
|
-
|
|
11522
|
-
const [innerVisible, setInnerVisible] = useState(outerVisible);
|
|
11523
|
-
useIsomorphicLayoutEffect(() => {
|
|
11524
|
-
setInnerVisible(outerVisible);
|
|
11525
|
-
}, [outerVisible]);
|
|
11526
|
-
return innerVisible;
|
|
11527
|
-
}
|
|
11528
|
-
const defaultProps$N = {
|
|
11529
|
-
destroyOnClose: false,
|
|
11530
|
-
disableBodyScroll: true,
|
|
11531
|
-
forceRender: false,
|
|
11532
|
-
getContainer: null,
|
|
11533
|
-
mask: true,
|
|
11534
|
-
showCloseButton: false,
|
|
11535
|
-
stopPropagation: ["click"],
|
|
11536
|
-
visible: false
|
|
11537
|
-
};
|
|
11627
|
+
var centerPopup = /* @__PURE__ */ (() => ".adm-center-popup {\n --background-color: var(--adm-center-popup-background-color, var(--adm-color-background));\n --border-radius: var(--adm-center-popup-border-radius, 8px);\n --max-width: var(--adm-center-popup-max-width, 75vw);\n --min-width: var(--adm-center-popup-min-width, 280px);\n --z-index: var(--adm-center-popup-z-index, 1000);\n position: fixed;\n z-index: var(--z-index);\n}\n.adm-center-popup .adm-center-popup-mask {\n z-index: 0;\n}\n.adm-center-popup-wrap {\n position: fixed;\n z-index: 1;\n top: 50%;\n left: 50%;\n width: auto;\n min-width: var(--min-width);\n max-width: var(--max-width);\n transform: translate(-50%, -50%);\n}\n.adm-center-popup-body {\n background-color: var(--background-color);\n border-radius: var(--border-radius);\n}\n.adm-center-popup-close {\n position: absolute;\n z-index: 100;\n right: 8px;\n top: 8px;\n cursor: pointer;\n padding: 4px;\n font-size: 18px;\n color: var(--adm-color-weak);\n}\n")();
|
|
11628
|
+
const defaultProps$O = defaultPopupBaseProps;
|
|
11538
11629
|
const CenterPopup = (p2) => {
|
|
11539
|
-
const props = mergeProps(defaultProps$
|
|
11630
|
+
const props = mergeProps(defaultProps$O, p2);
|
|
11540
11631
|
const unmountedRef = useUnmountedRef();
|
|
11541
11632
|
const style = useSpring({
|
|
11542
11633
|
scale: props.visible ? 1 : 0.8,
|
|
@@ -11582,16 +11673,31 @@ const CenterPopup = (p2) => {
|
|
|
11582
11673
|
visible: maskVisible,
|
|
11583
11674
|
forceRender: props.forceRender,
|
|
11584
11675
|
destroyOnClose: props.destroyOnClose,
|
|
11585
|
-
onMaskClick:
|
|
11676
|
+
onMaskClick: (e2) => {
|
|
11677
|
+
var _a, _b;
|
|
11678
|
+
(_a = props.onMaskClick) === null || _a === void 0 ? void 0 : _a.call(props, e2);
|
|
11679
|
+
if (props.closeOnMaskClick) {
|
|
11680
|
+
(_b = props.onClose) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
11681
|
+
}
|
|
11682
|
+
},
|
|
11586
11683
|
style: props.maskStyle,
|
|
11587
11684
|
className: classNames("adm-center-popup-mask", props.maskClassName),
|
|
11588
|
-
disableBodyScroll: false
|
|
11685
|
+
disableBodyScroll: false,
|
|
11686
|
+
stopPropagation: props.stopPropagation
|
|
11589
11687
|
}), React$1.createElement("div", {
|
|
11590
|
-
className: "adm-center-popup-wrap"
|
|
11688
|
+
className: "adm-center-popup-wrap",
|
|
11689
|
+
role: props.role,
|
|
11690
|
+
"aria-label": props["aria-label"]
|
|
11591
11691
|
}, React$1.createElement(animated.div, {
|
|
11592
11692
|
style,
|
|
11593
11693
|
ref
|
|
11594
|
-
},
|
|
11694
|
+
}, props.showCloseButton && React$1.createElement("a", {
|
|
11695
|
+
className: classNames("adm-center-popup-close", "adm-plain-anchor"),
|
|
11696
|
+
onClick: () => {
|
|
11697
|
+
var _a;
|
|
11698
|
+
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
11699
|
+
}
|
|
11700
|
+
}, React$1.createElement(CloseOutline, null)), body)))));
|
|
11595
11701
|
return React$1.createElement(ShouldRender, {
|
|
11596
11702
|
active,
|
|
11597
11703
|
forceRender: props.forceRender,
|
|
@@ -11600,12 +11706,12 @@ const CenterPopup = (p2) => {
|
|
|
11600
11706
|
};
|
|
11601
11707
|
var checkbox = /* @__PURE__ */ (() => ".adm-checkbox {\n --icon-size: 22px;\n --font-size: var(--adm-font-size-9);\n --gap: 8px;\n display: inline-flex;\n vertical-align: text-bottom;\n justify-content: flex-start;\n align-items: center;\n cursor: pointer;\n}\n.adm-checkbox input {\n display: none;\n}\n.adm-checkbox .adm-checkbox-icon {\n flex: none;\n border: 1px solid var(--adm-color-light);\n border-radius: var(--icon-size);\n box-sizing: border-box;\n width: var(--icon-size);\n height: var(--icon-size);\n color: var(--adm-color-white);\n}\n.adm-checkbox .adm-checkbox-icon > svg {\n display: block;\n width: 100%;\n height: 100%;\n}\n.adm-checkbox.adm-checkbox-block {\n display: flex;\n}\n.adm-checkbox.adm-checkbox-checked .adm-checkbox-icon {\n border-color: var(--adm-color-primary);\n background-color: var(--adm-color-primary);\n}\n.adm-checkbox.adm-checkbox-disabled {\n cursor: not-allowed;\n}\n.adm-checkbox.adm-checkbox-disabled .adm-checkbox-content {\n opacity: 0.4;\n}\n.adm-checkbox.adm-checkbox-disabled .adm-checkbox-icon.adm-checkbox-icon {\n color: #b7b7b7;\n border-color: var(--adm-color-light);\n background-color: var(--adm-color-box);\n}\n.adm-checkbox .adm-checkbox-custom-icon {\n font-size: var(--icon-size);\n}\n.adm-checkbox.adm-checkbox-indeterminate .adm-checkbox-icon {\n background-color: var(--adm-color-background);\n color: var(--adm-color-primary);\n}\n.adm-checkbox-content {\n flex: 0 1 auto;\n font-size: var(--font-size);\n padding-left: var(--gap);\n}\n")();
|
|
11602
11708
|
const CheckboxGroupContext = createContext(null);
|
|
11603
|
-
const defaultProps$
|
|
11709
|
+
const defaultProps$N = {
|
|
11604
11710
|
disabled: false,
|
|
11605
11711
|
defaultValue: []
|
|
11606
11712
|
};
|
|
11607
11713
|
const Group$1 = (p2) => {
|
|
11608
|
-
const props = mergeProps(defaultProps$
|
|
11714
|
+
const props = mergeProps(defaultProps$N, p2);
|
|
11609
11715
|
const [value, setValue] = usePropsValue(props);
|
|
11610
11716
|
return React$1.createElement(CheckboxGroupContext.Provider, {
|
|
11611
11717
|
value: {
|
|
@@ -11638,17 +11744,20 @@ const IndeterminateIcon = memo((props) => {
|
|
|
11638
11744
|
});
|
|
11639
11745
|
const NativeInput = (props) => {
|
|
11640
11746
|
const inputRef = useRef(null);
|
|
11747
|
+
const handleClick = useMemoizedFn((e2) => {
|
|
11748
|
+
e2.stopPropagation();
|
|
11749
|
+
e2.stopImmediatePropagation();
|
|
11750
|
+
const latestChecked = e2.target.checked;
|
|
11751
|
+
if (latestChecked === props.checked)
|
|
11752
|
+
return;
|
|
11753
|
+
props.onChange(latestChecked);
|
|
11754
|
+
});
|
|
11641
11755
|
useEffect(() => {
|
|
11642
11756
|
if (props.disabled)
|
|
11643
11757
|
return;
|
|
11644
11758
|
if (!inputRef.current)
|
|
11645
11759
|
return;
|
|
11646
11760
|
const input2 = inputRef.current;
|
|
11647
|
-
function handleClick(e2) {
|
|
11648
|
-
e2.stopPropagation();
|
|
11649
|
-
e2.stopImmediatePropagation();
|
|
11650
|
-
props.onChange(input2.checked);
|
|
11651
|
-
}
|
|
11652
11761
|
input2.addEventListener("click", handleClick);
|
|
11653
11762
|
return () => {
|
|
11654
11763
|
input2.removeEventListener("click", handleClick);
|
|
@@ -11656,7 +11765,7 @@ const NativeInput = (props) => {
|
|
|
11656
11765
|
}, [props.disabled, props.onChange]);
|
|
11657
11766
|
return React$1.createElement("input", {
|
|
11658
11767
|
ref: inputRef,
|
|
11659
|
-
type:
|
|
11768
|
+
type: props.type,
|
|
11660
11769
|
checked: props.checked,
|
|
11661
11770
|
onChange: () => {
|
|
11662
11771
|
},
|
|
@@ -11665,13 +11774,13 @@ const NativeInput = (props) => {
|
|
|
11665
11774
|
});
|
|
11666
11775
|
};
|
|
11667
11776
|
const classPrefix$W = `adm-checkbox`;
|
|
11668
|
-
const defaultProps$
|
|
11777
|
+
const defaultProps$M = {
|
|
11669
11778
|
defaultChecked: false,
|
|
11670
11779
|
indeterminate: false
|
|
11671
11780
|
};
|
|
11672
|
-
const Checkbox$1 = (p2) => {
|
|
11781
|
+
const Checkbox$1 = forwardRef((p2, ref) => {
|
|
11673
11782
|
const groupContext = useContext(CheckboxGroupContext);
|
|
11674
|
-
const props = mergeProps(defaultProps$
|
|
11783
|
+
const props = mergeProps(defaultProps$M, p2);
|
|
11675
11784
|
let [checked, setChecked] = usePropsValue({
|
|
11676
11785
|
value: props.checked,
|
|
11677
11786
|
defaultValue: props.defaultChecked,
|
|
@@ -11694,6 +11803,17 @@ const Checkbox$1 = (p2) => {
|
|
|
11694
11803
|
};
|
|
11695
11804
|
disabled = disabled || groupContext.disabled;
|
|
11696
11805
|
}
|
|
11806
|
+
useImperativeHandle(ref, () => ({
|
|
11807
|
+
check: () => {
|
|
11808
|
+
setChecked(true);
|
|
11809
|
+
},
|
|
11810
|
+
uncheck: () => {
|
|
11811
|
+
setChecked(false);
|
|
11812
|
+
},
|
|
11813
|
+
toggle: () => {
|
|
11814
|
+
setChecked(!checked);
|
|
11815
|
+
}
|
|
11816
|
+
}));
|
|
11697
11817
|
const renderIcon = () => {
|
|
11698
11818
|
if (props.icon) {
|
|
11699
11819
|
return React$1.createElement("div", {
|
|
@@ -11720,7 +11840,7 @@ const Checkbox$1 = (p2) => {
|
|
|
11720
11840
|
}), renderIcon(), props.children && React$1.createElement("div", {
|
|
11721
11841
|
className: `${classPrefix$W}-content`
|
|
11722
11842
|
}, props.children)));
|
|
11723
|
-
};
|
|
11843
|
+
});
|
|
11724
11844
|
var Checkbox = attachPropertiesToComponent(Checkbox$1, {
|
|
11725
11845
|
Group: Group$1
|
|
11726
11846
|
});
|
|
@@ -11868,7 +11988,7 @@ const Collapse = (props) => {
|
|
|
11868
11988
|
}, panel.props.children));
|
|
11869
11989
|
}))));
|
|
11870
11990
|
};
|
|
11871
|
-
var index$
|
|
11991
|
+
var index$e = attachPropertiesToComponent(Collapse, {
|
|
11872
11992
|
Panel: CollapsePanel
|
|
11873
11993
|
});
|
|
11874
11994
|
var datePicker = /* @__PURE__ */ (() => "")();
|
|
@@ -11935,17 +12055,6 @@ function generateDatePickerColumns$2(selected, min, max, precision, renderLabel,
|
|
|
11935
12055
|
const maxMinute = max.getMinutes();
|
|
11936
12056
|
const maxSecond = max.getSeconds();
|
|
11937
12057
|
const rank = precisionRankRecord$1[precision];
|
|
11938
|
-
if (rank >= precisionRankRecord$1.year) {
|
|
11939
|
-
const years = [];
|
|
11940
|
-
for (let i = minYear; i <= maxYear; i++) {
|
|
11941
|
-
const value = i.toString();
|
|
11942
|
-
years.push({
|
|
11943
|
-
label: renderLabel ? renderLabel("year", i) : value,
|
|
11944
|
-
value
|
|
11945
|
-
});
|
|
11946
|
-
}
|
|
11947
|
-
ret.push(years);
|
|
11948
|
-
}
|
|
11949
12058
|
const selectedYear = parseInt(selected[0]);
|
|
11950
12059
|
const firstDayInSelectedMonth = dayjs(convertStringArrayToDate$2([selected[0], selected[1], "1"]));
|
|
11951
12060
|
const selectedMonth = parseInt(selected[1]);
|
|
@@ -11979,6 +12088,17 @@ function generateDatePickerColumns$2(selected, min, max, precision, renderLabel,
|
|
|
11979
12088
|
}
|
|
11980
12089
|
return column;
|
|
11981
12090
|
};
|
|
12091
|
+
if (rank >= precisionRankRecord$1.year) {
|
|
12092
|
+
const lower = minYear;
|
|
12093
|
+
const upper = maxYear;
|
|
12094
|
+
const years = generateColumn(lower, upper, "year");
|
|
12095
|
+
ret.push(years.map((v) => {
|
|
12096
|
+
return {
|
|
12097
|
+
label: renderLabel("year", v),
|
|
12098
|
+
value: v.toString()
|
|
12099
|
+
};
|
|
12100
|
+
}));
|
|
12101
|
+
}
|
|
11982
12102
|
if (rank >= precisionRankRecord$1.month) {
|
|
11983
12103
|
const lower = isInMinYear ? minMonth : 1;
|
|
11984
12104
|
const upper = isInMaxYear ? maxMonth : 12;
|
|
@@ -12067,17 +12187,6 @@ function generateDatePickerColumns$1(selected, min, max, precision, renderLabel,
|
|
|
12067
12187
|
const minYear = min.getFullYear();
|
|
12068
12188
|
const maxYear = max.getFullYear();
|
|
12069
12189
|
const rank = precisionRankRecord[precision];
|
|
12070
|
-
if (rank >= precisionRankRecord.year) {
|
|
12071
|
-
const years = [];
|
|
12072
|
-
for (let i = minYear; i <= maxYear; i++) {
|
|
12073
|
-
const value = i.toString();
|
|
12074
|
-
years.push({
|
|
12075
|
-
label: renderLabel ? renderLabel("year", i) : value,
|
|
12076
|
-
value
|
|
12077
|
-
});
|
|
12078
|
-
}
|
|
12079
|
-
ret.push(years);
|
|
12080
|
-
}
|
|
12081
12190
|
const selectedYear = parseInt(selected[0]);
|
|
12082
12191
|
const isInMinYear = selectedYear === minYear;
|
|
12083
12192
|
const isInMaxYear = selectedYear === maxYear;
|
|
@@ -12108,6 +12217,17 @@ function generateDatePickerColumns$1(selected, min, max, precision, renderLabel,
|
|
|
12108
12217
|
}
|
|
12109
12218
|
return column;
|
|
12110
12219
|
};
|
|
12220
|
+
if (rank >= precisionRankRecord.year) {
|
|
12221
|
+
const lower = minYear;
|
|
12222
|
+
const upper = maxYear;
|
|
12223
|
+
const years = generateColumn(lower, upper, "year");
|
|
12224
|
+
ret.push(years.map((v) => {
|
|
12225
|
+
return {
|
|
12226
|
+
label: renderLabel("year", v),
|
|
12227
|
+
value: v.toString()
|
|
12228
|
+
};
|
|
12229
|
+
}));
|
|
12230
|
+
}
|
|
12111
12231
|
if (rank >= precisionRankRecord.week) {
|
|
12112
12232
|
const lower = isInMinYear ? minWeek : 1;
|
|
12113
12233
|
const upper = isInMaxYear ? maxWeek : selectedYearWeeks;
|
|
@@ -12185,7 +12305,7 @@ const defaultRenderLabel = (precision, data) => {
|
|
|
12185
12305
|
}
|
|
12186
12306
|
};
|
|
12187
12307
|
const thisYear$1 = new Date().getFullYear();
|
|
12188
|
-
const defaultProps$
|
|
12308
|
+
const defaultProps$L = {
|
|
12189
12309
|
min: new Date(new Date().setFullYear(thisYear$1 - 10)),
|
|
12190
12310
|
max: new Date(new Date().setFullYear(thisYear$1 + 10)),
|
|
12191
12311
|
precision: "day",
|
|
@@ -12193,7 +12313,7 @@ const defaultProps$K = {
|
|
|
12193
12313
|
defaultValue: null
|
|
12194
12314
|
};
|
|
12195
12315
|
const DatePicker = forwardRef((p2, ref) => {
|
|
12196
|
-
const props = mergeProps(defaultProps$
|
|
12316
|
+
const props = mergeProps(defaultProps$L, p2);
|
|
12197
12317
|
const [value, setValue] = usePropsValue({
|
|
12198
12318
|
value: props.value,
|
|
12199
12319
|
defaultValue: props.defaultValue,
|
|
@@ -12237,7 +12357,9 @@ const DatePicker = forwardRef((p2, ref) => {
|
|
|
12237
12357
|
onClick: props.onClick,
|
|
12238
12358
|
title: props.title,
|
|
12239
12359
|
stopPropagation: props.stopPropagation,
|
|
12240
|
-
mouseWheel: props.mouseWheel
|
|
12360
|
+
mouseWheel: props.mouseWheel,
|
|
12361
|
+
destroyOnClose: props.destroyOnClose,
|
|
12362
|
+
forceRender: props.forceRender
|
|
12241
12363
|
}, (_, actions) => {
|
|
12242
12364
|
var _a;
|
|
12243
12365
|
return (_a = props.children) === null || _a === void 0 ? void 0 : _a.call(props, value, actions);
|
|
@@ -12273,11 +12395,11 @@ function prompt(props) {
|
|
|
12273
12395
|
const unmount2 = renderToBody(React$1.createElement(Wrapper2, null));
|
|
12274
12396
|
});
|
|
12275
12397
|
}
|
|
12276
|
-
var index$
|
|
12398
|
+
var index$d = attachPropertiesToComponent(DatePicker, {
|
|
12277
12399
|
prompt
|
|
12278
12400
|
});
|
|
12279
12401
|
const thisYear = new Date().getFullYear();
|
|
12280
|
-
const defaultProps$
|
|
12402
|
+
const defaultProps$K = {
|
|
12281
12403
|
min: new Date(new Date().setFullYear(thisYear - 10)),
|
|
12282
12404
|
max: new Date(new Date().setFullYear(thisYear + 10)),
|
|
12283
12405
|
precision: "day",
|
|
@@ -12285,7 +12407,7 @@ const defaultProps$J = {
|
|
|
12285
12407
|
};
|
|
12286
12408
|
const DatePickerView = (p2) => {
|
|
12287
12409
|
var _a;
|
|
12288
|
-
const props = mergeProps(defaultProps$
|
|
12410
|
+
const props = mergeProps(defaultProps$K, p2);
|
|
12289
12411
|
const [value, setValue] = usePropsValue({
|
|
12290
12412
|
value: props.value,
|
|
12291
12413
|
defaultValue: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : null
|
|
@@ -12358,7 +12480,7 @@ const BrokenImageIcon = () => React$1.createElement("svg", {
|
|
|
12358
12480
|
fillRule: "nonzero"
|
|
12359
12481
|
}));
|
|
12360
12482
|
const classPrefix$U = `adm-image`;
|
|
12361
|
-
const defaultProps$
|
|
12483
|
+
const defaultProps$J = {
|
|
12362
12484
|
fit: "fill",
|
|
12363
12485
|
placeholder: React$1.createElement("div", {
|
|
12364
12486
|
className: `${classPrefix$U}-tip`
|
|
@@ -12370,7 +12492,7 @@ const defaultProps$I = {
|
|
|
12370
12492
|
draggable: false
|
|
12371
12493
|
};
|
|
12372
12494
|
const Image$1 = staged((p2) => {
|
|
12373
|
-
const props = mergeProps(defaultProps$
|
|
12495
|
+
const props = mergeProps(defaultProps$J, p2);
|
|
12374
12496
|
const [loaded, setLoaded] = useState(false);
|
|
12375
12497
|
const [failed, setFailed] = useState(false);
|
|
12376
12498
|
const ref = useRef(null);
|
|
@@ -12436,13 +12558,13 @@ const Image$1 = staged((p2) => {
|
|
|
12436
12558
|
}
|
|
12437
12559
|
}), renderInner()));
|
|
12438
12560
|
});
|
|
12439
|
-
const defaultProps$
|
|
12561
|
+
const defaultProps$I = {
|
|
12440
12562
|
actions: [],
|
|
12441
12563
|
closeOnAction: false,
|
|
12442
12564
|
closeOnMaskClick: false
|
|
12443
12565
|
};
|
|
12444
12566
|
const Dialog = (p2) => {
|
|
12445
|
-
const props = mergeProps(defaultProps$
|
|
12567
|
+
const props = mergeProps(defaultProps$I, p2);
|
|
12446
12568
|
const element = React$1.createElement(React$1.Fragment, null, !!props.image && React$1.createElement("div", {
|
|
12447
12569
|
className: cls$1("image-container")
|
|
12448
12570
|
}, React$1.createElement(Image$1, {
|
|
@@ -12492,7 +12614,9 @@ const Dialog = (p2) => {
|
|
|
12492
12614
|
stopPropagation: props.stopPropagation,
|
|
12493
12615
|
disableBodyScroll: props.disableBodyScroll,
|
|
12494
12616
|
destroyOnClose: props.destroyOnClose,
|
|
12495
|
-
forceRender: props.forceRender
|
|
12617
|
+
forceRender: props.forceRender,
|
|
12618
|
+
role: "dialog",
|
|
12619
|
+
"aria-label": props["aria-label"]
|
|
12496
12620
|
}, element);
|
|
12497
12621
|
};
|
|
12498
12622
|
function cls$1(name = "") {
|
|
@@ -12531,7 +12655,7 @@ function alert$1(p2) {
|
|
|
12531
12655
|
}));
|
|
12532
12656
|
});
|
|
12533
12657
|
}
|
|
12534
|
-
const defaultProps$
|
|
12658
|
+
const defaultProps$H = {
|
|
12535
12659
|
confirmText: "\u786E\u8BA4",
|
|
12536
12660
|
cancelText: "\u53D6\u6D88"
|
|
12537
12661
|
};
|
|
@@ -12539,7 +12663,7 @@ function confirm$1(p2) {
|
|
|
12539
12663
|
const {
|
|
12540
12664
|
locale
|
|
12541
12665
|
} = getDefaultConfig();
|
|
12542
|
-
const props = mergeProps(defaultProps$
|
|
12666
|
+
const props = mergeProps(defaultProps$H, {
|
|
12543
12667
|
confirmText: locale.common.confirm,
|
|
12544
12668
|
cancelText: locale.common.cancel
|
|
12545
12669
|
}, p2);
|
|
@@ -12577,7 +12701,7 @@ function clear$2() {
|
|
|
12577
12701
|
close();
|
|
12578
12702
|
});
|
|
12579
12703
|
}
|
|
12580
|
-
var index$
|
|
12704
|
+
var index$c = attachPropertiesToComponent(Dialog, {
|
|
12581
12705
|
show: show$2,
|
|
12582
12706
|
alert: alert$1,
|
|
12583
12707
|
confirm: confirm$1,
|
|
@@ -12585,12 +12709,12 @@ var index$b = attachPropertiesToComponent(Dialog, {
|
|
|
12585
12709
|
});
|
|
12586
12710
|
var divider = /* @__PURE__ */ (() => ".adm-divider-horizontal {\n display: flex;\n align-items: center;\n margin: 16px 0;\n border-width: 0;\n border-color: var(--adm-color-border);\n border-style: solid;\n color: var(--adm-color-weak);\n font-size: 14px;\n}\n.adm-divider-left.adm-divider-horizontal::before {\n max-width: 10%;\n}\n.adm-divider-right.adm-divider-horizontal::after {\n max-width: 10%;\n}\n.adm-divider-horizontal::after,\n.adm-divider-horizontal::before {\n flex: auto;\n display: block;\n content: '';\n border-style: inherit;\n border-color: inherit;\n border-width: 1px 0 0;\n}\n.adm-divider-horizontal .adm-divider-content {\n flex: none;\n padding: 0 16px;\n}\n.adm-divider-vertical {\n position: relative;\n top: -0.06em;\n display: inline-block;\n height: 0.9em;\n margin: 0 16px;\n vertical-align: middle;\n border-top: 0;\n border-left: 1px solid var(--adm-color-border);\n}\n")();
|
|
12587
12711
|
const classPrefix$T = `adm-divider`;
|
|
12588
|
-
const defaultProps$
|
|
12712
|
+
const defaultProps$G = {
|
|
12589
12713
|
contentPosition: "center",
|
|
12590
12714
|
direction: "horizontal"
|
|
12591
12715
|
};
|
|
12592
12716
|
const Divider = (p2) => {
|
|
12593
|
-
const props = mergeProps(defaultProps$
|
|
12717
|
+
const props = mergeProps(defaultProps$G, p2);
|
|
12594
12718
|
return withNativeProps(props, React$1.createElement("div", {
|
|
12595
12719
|
className: classNames(classPrefix$T, `${classPrefix$T}-${props.direction}`, `${classPrefix$T}-${props.contentPosition}`)
|
|
12596
12720
|
}, props.children && React$1.createElement("div", {
|
|
@@ -12632,13 +12756,13 @@ const ItemChildrenWrap = (props) => {
|
|
|
12632
12756
|
}, props.children) : null;
|
|
12633
12757
|
};
|
|
12634
12758
|
const classPrefix$R = `adm-dropdown`;
|
|
12635
|
-
const defaultProps$
|
|
12759
|
+
const defaultProps$F = {
|
|
12636
12760
|
defaultActiveKey: null,
|
|
12637
12761
|
closeOnMaskClick: true,
|
|
12638
12762
|
closeOnClickAway: false
|
|
12639
12763
|
};
|
|
12640
12764
|
const Dropdown = forwardRef((p2, ref) => {
|
|
12641
|
-
const props = mergeProps(defaultProps$
|
|
12765
|
+
const props = mergeProps(defaultProps$F, p2);
|
|
12642
12766
|
const [value, setValue] = usePropsValue({
|
|
12643
12767
|
value: props.activeKey,
|
|
12644
12768
|
defaultValue: props.defaultActiveKey,
|
|
@@ -12726,12 +12850,12 @@ const Dropdown = forwardRef((p2, ref) => {
|
|
|
12726
12850
|
}, item.props.children);
|
|
12727
12851
|
})))));
|
|
12728
12852
|
});
|
|
12729
|
-
var index$
|
|
12853
|
+
var index$b = attachPropertiesToComponent(Dropdown, {
|
|
12730
12854
|
Item
|
|
12731
12855
|
});
|
|
12732
12856
|
var ellipsis = /* @__PURE__ */ (() => ".adm-ellipsis {\n overflow: hidden;\n line-height: 1.5;\n}\n")();
|
|
12733
12857
|
const classPrefix$Q = `adm-ellipsis`;
|
|
12734
|
-
const defaultProps$
|
|
12858
|
+
const defaultProps$E = {
|
|
12735
12859
|
direction: "end",
|
|
12736
12860
|
rows: 1,
|
|
12737
12861
|
expandText: "",
|
|
@@ -12741,7 +12865,7 @@ const defaultProps$D = {
|
|
|
12741
12865
|
}
|
|
12742
12866
|
};
|
|
12743
12867
|
const Ellipsis = (p2) => {
|
|
12744
|
-
const props = mergeProps(defaultProps$
|
|
12868
|
+
const props = mergeProps(defaultProps$E, p2);
|
|
12745
12869
|
const rootRef = useRef(null);
|
|
12746
12870
|
const [ellipsised, setEllipsised] = useState({});
|
|
12747
12871
|
const [expanded, setExpanded] = useState(false);
|
|
@@ -12925,13 +13049,13 @@ const Empty = (props) => {
|
|
|
12925
13049
|
};
|
|
12926
13050
|
var errorBlock = /* @__PURE__ */ (() => ".adm-error-block {\n --color: var(--adm-color-text);\n --image-height: var(--adm-error-block-image-height, 100px);\n --image-height-full-page: var(--adm-error-block-image-height-full-page, 200px);\n --image-width: var(--adm-error-block-image-width, auto);\n --image-width-full-page: var(--adm-error-block-image-width-full-page, auto);\n box-sizing: border-box;\n text-align: center;\n}\n.adm-error-block-image {\n height: var(--image-height);\n width: var(--image-width);\n max-width: 100%;\n}\n.adm-error-block-image svg,\n.adm-error-block-image img {\n height: 100%;\n}\n.adm-error-block-description {\n font-size: var(--adm-font-size-4);\n color: #999;\n line-height: 1.4;\n margin-top: 12px;\n}\n.adm-error-block-description-title {\n font-size: var(--adm-font-size-7);\n}\n.adm-error-block-description-subtitle {\n margin-top: 8px;\n}\n.adm-error-block-content {\n margin-top: 12px;\n}\n.adm-error-block-full-page {\n padding-top: calc(50vh - var(--image-height-full-page));\n}\n.adm-error-block-full-page .adm-error-block-image {\n height: var(--image-height-full-page);\n width: var(--image-width-full-page);\n}\n.adm-error-block-full-page .adm-error-block-description {\n margin-top: 20px;\n font-size: var(--adm-font-size-main);\n}\n.adm-error-block-full-page .adm-error-block-description-title {\n font-size: 20px;\n color: var(--adm-color-text);\n}\n")();
|
|
12927
13051
|
const classPrefix$O = `adm-error-block`;
|
|
12928
|
-
const defaultProps$
|
|
13052
|
+
const defaultProps$D = {
|
|
12929
13053
|
status: "default"
|
|
12930
13054
|
};
|
|
12931
13055
|
function createErrorBlock(imageRecord2) {
|
|
12932
13056
|
const ErrorBlock2 = (p2) => {
|
|
12933
13057
|
var _a;
|
|
12934
|
-
const props = mergeProps(defaultProps$
|
|
13058
|
+
const props = mergeProps(defaultProps$D, p2);
|
|
12935
13059
|
const {
|
|
12936
13060
|
locale
|
|
12937
13061
|
} = useConfig();
|
|
@@ -13464,11 +13588,11 @@ const imageRecord = {
|
|
|
13464
13588
|
const ErrorBlock = createErrorBlock(imageRecord);
|
|
13465
13589
|
var floatingBubble = /* @__PURE__ */ (() => ".adm-floating-bubble {\n --initial-position-left: var(--initial-position-left);\n --initial-position-right: var(--initial-position-right);\n --initial-position-top: var(--initial-position-top);\n --initial-position-bottom: var(--initial-position-bottom);\n --z-index: 1;\n --edge-distance: 0;\n --size: 48px;\n --border-radius: 50%;\n --background: var(--adm-color-primary);\n}\n.adm-floating-bubble-boundary-outer {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n padding: var(--edge-distance);\n box-sizing: border-box;\n pointer-events: none;\n}\n.adm-floating-bubble-boundary {\n position: relative;\n width: 100%;\n height: 100%;\n}\n.adm-floating-bubble-button {\n position: fixed;\n top: var(--initial-position-top);\n bottom: var(--initial-position-bottom);\n left: var(--initial-position-left);\n right: var(--initial-position-right);\n box-sizing: border-box;\n width: var(--size);\n height: var(--size);\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n cursor: pointer;\n transition: opacity ease 0.15s;\n user-select: none;\n touch-action: none;\n background: var(--background);\n color: var(--adm-color-white);\n border-radius: var(--border-radius);\n z-index: var(--z-index);\n}\n")();
|
|
13466
13590
|
const classPrefix$N = `adm-floating-bubble`;
|
|
13467
|
-
const defaultProps$
|
|
13591
|
+
const defaultProps$C = {
|
|
13468
13592
|
axis: "y"
|
|
13469
13593
|
};
|
|
13470
13594
|
const FloatingBubble = (p2) => {
|
|
13471
|
-
const props = mergeProps(defaultProps$
|
|
13595
|
+
const props = mergeProps(defaultProps$C, p2);
|
|
13472
13596
|
const boundaryRef = useRef(null);
|
|
13473
13597
|
const buttonRef = useRef(null);
|
|
13474
13598
|
const [{
|
|
@@ -13549,12 +13673,12 @@ function nearest(arr, target) {
|
|
|
13549
13673
|
return Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur;
|
|
13550
13674
|
});
|
|
13551
13675
|
}
|
|
13552
|
-
const defaultProps$
|
|
13676
|
+
const defaultProps$B = {
|
|
13553
13677
|
handleDraggingOfContent: true
|
|
13554
13678
|
};
|
|
13555
13679
|
const FloatingPanel = forwardRef((p2, ref) => {
|
|
13556
13680
|
var _a, _b;
|
|
13557
|
-
const props = mergeProps(defaultProps$
|
|
13681
|
+
const props = mergeProps(defaultProps$B, p2);
|
|
13558
13682
|
const {
|
|
13559
13683
|
anchors
|
|
13560
13684
|
} = props;
|
|
@@ -13668,7 +13792,7 @@ const FloatingPanel = forwardRef((p2, ref) => {
|
|
|
13668
13792
|
ref: contentRef
|
|
13669
13793
|
}, props.children)));
|
|
13670
13794
|
});
|
|
13671
|
-
var index$
|
|
13795
|
+
var index$a = /* @__PURE__ */ (() => ".adm-form {\n --border-inner: solid 1px var(--adm-color-border);\n --border-top: solid 1px var(--adm-color-border);\n --border-bottom: solid 1px var(--adm-color-border);\n ---border-inner: var(--border-inner);\n ---border-top: var(--border-top);\n ---border-bottom: var(--border-bottom);\n}\n.adm-form .adm-list.adm-list {\n --padding-left: 16px;\n --padding-right: 12px;\n --border-inner: var(---border-inner);\n --border-top: var(---border-top);\n --border-bottom: var(---border-bottom);\n}\n.adm-form .adm-form-footer {\n padding: 20px 12px;\n}\n.adm-form-list-operation {\n text-align: center;\n color: #1677ff;\n}\n.adm-form-item + .adm-form-item {\n border-top: none;\n}\n.adm-form-item-label {\n display: block;\n height: 100%;\n line-height: 1.5;\n box-sizing: border-box;\n position: relative;\n color: var(--adm-color-text-secondary);\n}\n.adm-form-item-label .adm-form-item-required-asterisk {\n position: absolute;\n left: -0.6em;\n top: 0;\n font-family: SimSun, sans-serif;\n color: var(--adm-color-danger);\n user-select: none;\n}\n.adm-form-item-label .adm-form-item-required-text {\n margin-left: 4px;\n color: var(--adm-color-weak);\n}\n.adm-form-item-label-help {\n margin-left: 4px;\n cursor: pointer;\n}\n.adm-form-item-child {\n display: flex;\n}\n.adm-form-item-child-position-normal {\n justify-content: normal;\n}\n.adm-form-item-child-position-normal > * {\n flex: auto;\n}\n.adm-form-item-child-position-right {\n justify-content: flex-end;\n}\n.adm-form-item-child-position-right > * {\n flex: none;\n}\n.adm-form-item-feedback-error {\n color: var(--adm-color-danger);\n margin-top: 4px;\n}\n.adm-form-item-feedback-warning {\n color: var(--adm-color-warning);\n margin-top: 4px;\n}\n.adm-form-item.adm-form-item-hidden {\n display: none;\n}\n.adm-form-item.adm-form-item-horizontal.adm-list-item {\n --align-items: stretch;\n --prefix-width: 6.8em;\n}\n.adm-form-item.adm-form-item-horizontal .adm-list-item-content-prefix {\n padding-top: 12px;\n padding-bottom: 12px;\n}\n.adm-form-item.adm-form-item-horizontal .adm-list-item-content-extra {\n align-self: center;\n}\n.adm-form-item.adm-form-item-vertical .adm-form-item-label {\n font-size: var(--adm-font-size-7);\n margin-bottom: 4px;\n}\n")();
|
|
13672
13796
|
const defaultFormContext = {
|
|
13673
13797
|
name: void 0,
|
|
13674
13798
|
hasFeedback: true,
|
|
@@ -13712,9 +13836,9 @@ const FormArray = (props) => {
|
|
|
13712
13836
|
});
|
|
13713
13837
|
};
|
|
13714
13838
|
const classPrefix$M = "adm-form";
|
|
13715
|
-
const defaultProps$
|
|
13716
|
-
const Form
|
|
13717
|
-
const props = mergeProps(defaultProps$
|
|
13839
|
+
const defaultProps$A = defaultFormContext;
|
|
13840
|
+
const Form = forwardRef((p2, ref) => {
|
|
13841
|
+
const props = mergeProps(defaultProps$A, p2);
|
|
13718
13842
|
const {
|
|
13719
13843
|
className,
|
|
13720
13844
|
style,
|
|
@@ -14012,14 +14136,14 @@ function convertPx(px) {
|
|
|
14012
14136
|
return tester.getBoundingClientRect().height;
|
|
14013
14137
|
}
|
|
14014
14138
|
const classPrefix$L = `adm-popover`;
|
|
14015
|
-
const defaultProps$
|
|
14139
|
+
const defaultProps$z = {
|
|
14016
14140
|
placement: "top",
|
|
14017
14141
|
defaultVisible: false,
|
|
14018
14142
|
stopPropagation: ["click"],
|
|
14019
14143
|
getContainer: () => document.body
|
|
14020
14144
|
};
|
|
14021
14145
|
const Popover$1 = forwardRef((p2, ref) => {
|
|
14022
|
-
const props = mergeProps(defaultProps$
|
|
14146
|
+
const props = mergeProps(defaultProps$z, p2);
|
|
14023
14147
|
const {
|
|
14024
14148
|
mode = "light"
|
|
14025
14149
|
} = props;
|
|
@@ -14263,13 +14387,13 @@ const FormItemLayout = (props) => {
|
|
|
14263
14387
|
e2.preventDefault();
|
|
14264
14388
|
}
|
|
14265
14389
|
}, React$1.createElement(QuestionCircleOutline, null)))) : null;
|
|
14266
|
-
const description = React$1.createElement(React$1.Fragment, null, props.description, hasFeedback && React$1.createElement(React$1.Fragment, null, props.errors.map((error, index2) => React$1.createElement("div", {
|
|
14390
|
+
const description = props.description || hasFeedback ? React$1.createElement(React$1.Fragment, null, props.description, hasFeedback && React$1.createElement(React$1.Fragment, null, props.errors.map((error, index2) => React$1.createElement("div", {
|
|
14267
14391
|
key: `error-${index2}`,
|
|
14268
14392
|
className: `${classPrefix$J}-feedback-error`
|
|
14269
14393
|
}, error)), props.warnings.map((warning2, index2) => React$1.createElement("div", {
|
|
14270
14394
|
key: `warning-${index2}`,
|
|
14271
14395
|
className: `${classPrefix$J}-feedback-warning`
|
|
14272
|
-
}, warning2))));
|
|
14396
|
+
}, warning2)))) : null;
|
|
14273
14397
|
return React$1.createElement(List.Item, {
|
|
14274
14398
|
style,
|
|
14275
14399
|
title: layout === "vertical" && labelElement,
|
|
@@ -14463,15 +14587,13 @@ const FormItem = (props) => {
|
|
|
14463
14587
|
};
|
|
14464
14588
|
const FormSubscribe = (props) => {
|
|
14465
14589
|
const update = useUpdate();
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
dependencies: props.to
|
|
14469
|
-
}, (form) => React$1.createElement(React$1.Fragment, null, props.children(form.getFieldsValue(props.to), form), props.to.map((namePath) => React$1.createElement(Watcher, {
|
|
14590
|
+
const form = useContext(FieldContext$1);
|
|
14591
|
+
return React$1.createElement(React$1.Fragment, null, props.children(form.getFieldsValue(props.to), form), props.to.map((namePath) => React$1.createElement(Watcher, {
|
|
14470
14592
|
key: namePath.toString(),
|
|
14471
14593
|
form,
|
|
14472
14594
|
namePath,
|
|
14473
14595
|
onChange: update
|
|
14474
|
-
})))
|
|
14596
|
+
})));
|
|
14475
14597
|
};
|
|
14476
14598
|
const Watcher = memo((props) => {
|
|
14477
14599
|
const value = useWatch(props.namePath, props.form);
|
|
@@ -14480,7 +14602,7 @@ const Watcher = memo((props) => {
|
|
|
14480
14602
|
}, [value]);
|
|
14481
14603
|
return null;
|
|
14482
14604
|
});
|
|
14483
|
-
var
|
|
14605
|
+
var index$9 = attachPropertiesToComponent(Form, {
|
|
14484
14606
|
Item: FormItem,
|
|
14485
14607
|
Subscribe: FormSubscribe,
|
|
14486
14608
|
Header,
|
|
@@ -14751,14 +14873,14 @@ const Slides = forwardRef((props, ref) => {
|
|
|
14751
14873
|
}))));
|
|
14752
14874
|
});
|
|
14753
14875
|
const classPrefix$F = `adm-image-viewer`;
|
|
14754
|
-
const defaultProps$
|
|
14876
|
+
const defaultProps$y = {
|
|
14755
14877
|
maxZoom: 3,
|
|
14756
14878
|
getContainer: null,
|
|
14757
14879
|
visible: false
|
|
14758
14880
|
};
|
|
14759
14881
|
const ImageViewer$1 = (p2) => {
|
|
14760
14882
|
var _a;
|
|
14761
|
-
const props = mergeProps(defaultProps$
|
|
14883
|
+
const props = mergeProps(defaultProps$y, p2);
|
|
14762
14884
|
const node = React$1.createElement(Mask, {
|
|
14763
14885
|
visible: props.visible,
|
|
14764
14886
|
disableBodyScroll: false,
|
|
@@ -14780,7 +14902,7 @@ const ImageViewer$1 = (p2) => {
|
|
|
14780
14902
|
})));
|
|
14781
14903
|
return renderToContainer(props.getContainer, node);
|
|
14782
14904
|
};
|
|
14783
|
-
const multiDefaultProps = Object.assign(Object.assign({}, defaultProps$
|
|
14905
|
+
const multiDefaultProps = Object.assign(Object.assign({}, defaultProps$y), {
|
|
14784
14906
|
defaultIndex: 0
|
|
14785
14907
|
});
|
|
14786
14908
|
const MultiImageViewer = forwardRef((p2, ref) => {
|
|
@@ -14952,13 +15074,13 @@ const colorRecord$2 = {
|
|
|
14952
15074
|
primary: "var(--adm-color-primary)",
|
|
14953
15075
|
white: "var(--adm-color-white)"
|
|
14954
15076
|
};
|
|
14955
|
-
const defaultProps$
|
|
15077
|
+
const defaultProps$x = {
|
|
14956
15078
|
color: "default"
|
|
14957
15079
|
};
|
|
14958
15080
|
const circumference = 15 * 3.14159265358979 * 2;
|
|
14959
15081
|
const SpinLoading = memo((p2) => {
|
|
14960
15082
|
var _a;
|
|
14961
|
-
const props = mergeProps(defaultProps$
|
|
15083
|
+
const props = mergeProps(defaultProps$x, p2);
|
|
14962
15084
|
const motionReduced = useMotionReduced();
|
|
14963
15085
|
const {
|
|
14964
15086
|
percent
|
|
@@ -15049,11 +15171,11 @@ const PreviewItem = (props) => {
|
|
|
15049
15171
|
};
|
|
15050
15172
|
var space = /* @__PURE__ */ (() => ".adm-space-item {\n flex: none;\n}\n.adm-space {\n display: inline-flex;\n --gap: 8px;\n --gap-vertical: var(--gap);\n --gap-horizontal: var(--gap);\n}\n.adm-space-vertical {\n flex-direction: column;\n}\n.adm-space-vertical > .adm-space-item {\n margin-bottom: var(--gap-vertical);\n}\n.adm-space-vertical > .adm-space-item:last-child {\n margin-bottom: 0;\n}\n.adm-space-horizontal {\n flex-direction: row;\n}\n.adm-space-horizontal > .adm-space-item {\n margin-right: var(--gap-horizontal);\n}\n.adm-space-horizontal > .adm-space-item:last-child {\n margin-right: 0;\n}\n.adm-space-horizontal.adm-space-wrap {\n flex-wrap: wrap;\n margin-bottom: calc(var(--gap-vertical) * -1);\n}\n.adm-space-horizontal.adm-space-wrap > .adm-space-item {\n padding-bottom: var(--gap-vertical);\n}\n.adm-space.adm-space-block {\n display: flex;\n}\n.adm-space-align-center {\n align-items: center;\n}\n.adm-space-align-start {\n align-items: flex-start;\n}\n.adm-space-align-end {\n align-items: flex-end;\n}\n.adm-space-align-baseline {\n align-items: baseline;\n}\n.adm-space-justify-center {\n justify-content: center;\n}\n.adm-space-justify-start {\n justify-content: flex-start;\n}\n.adm-space-justify-end {\n justify-content: flex-end;\n}\n.adm-space-justify-between {\n justify-content: space-between;\n}\n.adm-space-justify-around {\n justify-content: space-around;\n}\n.adm-space-justify-evenly {\n justify-content: space-evenly;\n}\n.adm-space-justify-stretch {\n justify-content: stretch;\n}\n")();
|
|
15051
15173
|
const classPrefix$C = `adm-space`;
|
|
15052
|
-
const defaultProps$
|
|
15174
|
+
const defaultProps$w = {
|
|
15053
15175
|
direction: "horizontal"
|
|
15054
15176
|
};
|
|
15055
15177
|
const Space = (p2) => {
|
|
15056
|
-
const props = mergeProps(defaultProps$
|
|
15178
|
+
const props = mergeProps(defaultProps$w, p2);
|
|
15057
15179
|
const {
|
|
15058
15180
|
direction,
|
|
15059
15181
|
onClick
|
|
@@ -15074,7 +15196,7 @@ const Space = (p2) => {
|
|
|
15074
15196
|
})));
|
|
15075
15197
|
};
|
|
15076
15198
|
const classPrefix$B = `adm-image-uploader`;
|
|
15077
|
-
const defaultProps$
|
|
15199
|
+
const defaultProps$v = {
|
|
15078
15200
|
disableUpload: false,
|
|
15079
15201
|
deletable: true,
|
|
15080
15202
|
showUpload: true,
|
|
@@ -15090,7 +15212,7 @@ const ImageUploader = (p2) => {
|
|
|
15090
15212
|
const {
|
|
15091
15213
|
locale
|
|
15092
15214
|
} = useConfig();
|
|
15093
|
-
const props = mergeProps(defaultProps$
|
|
15215
|
+
const props = mergeProps(defaultProps$v, p2);
|
|
15094
15216
|
const [value, setValue] = usePropsValue(props);
|
|
15095
15217
|
const [tasks, setTasks] = useState([]);
|
|
15096
15218
|
useIsomorphicLayoutEffect(() => {
|
|
@@ -15325,11 +15447,11 @@ const Sidebar = (props) => {
|
|
|
15325
15447
|
}));
|
|
15326
15448
|
};
|
|
15327
15449
|
const classPrefix$z = `adm-index-bar`;
|
|
15328
|
-
const defaultProps$
|
|
15450
|
+
const defaultProps$u = {
|
|
15329
15451
|
sticky: true
|
|
15330
15452
|
};
|
|
15331
15453
|
const IndexBar = forwardRef((p2, ref) => {
|
|
15332
|
-
const props = mergeProps(defaultProps$
|
|
15454
|
+
const props = mergeProps(defaultProps$u, p2);
|
|
15333
15455
|
const titleHeight = convertPx(35);
|
|
15334
15456
|
const bodyRef = useRef(null);
|
|
15335
15457
|
const indexItems = [];
|
|
@@ -15430,7 +15552,7 @@ function isWindow(element) {
|
|
|
15430
15552
|
return element === window;
|
|
15431
15553
|
}
|
|
15432
15554
|
const classPrefix$y = `adm-infinite-scroll`;
|
|
15433
|
-
const defaultProps$
|
|
15555
|
+
const defaultProps$t = {
|
|
15434
15556
|
threshold: 250,
|
|
15435
15557
|
children: (hasMore, failed, retry) => React$1.createElement(InfiniteScrollContent, {
|
|
15436
15558
|
hasMore,
|
|
@@ -15439,7 +15561,7 @@ const defaultProps$s = {
|
|
|
15439
15561
|
})
|
|
15440
15562
|
};
|
|
15441
15563
|
const InfiniteScroll = (p2) => {
|
|
15442
|
-
const props = mergeProps(defaultProps$
|
|
15564
|
+
const props = mergeProps(defaultProps$t, p2);
|
|
15443
15565
|
const [failed, setFailed] = useState(false);
|
|
15444
15566
|
const doLoadMore = useLockFn((isRetry) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15445
15567
|
try {
|
|
@@ -15453,7 +15575,9 @@ const InfiniteScroll = (p2) => {
|
|
|
15453
15575
|
const [flag, setFlag] = useState({});
|
|
15454
15576
|
const nextFlagRef = useRef(flag);
|
|
15455
15577
|
const [scrollParent, setScrollParent] = useState();
|
|
15456
|
-
const
|
|
15578
|
+
const {
|
|
15579
|
+
run: check
|
|
15580
|
+
} = useThrottleFn(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
15457
15581
|
if (nextFlagRef.current !== flag)
|
|
15458
15582
|
return;
|
|
15459
15583
|
if (!props.hasMore)
|
|
@@ -15476,7 +15600,11 @@ const InfiniteScroll = (p2) => {
|
|
|
15476
15600
|
yield doLoadMore(false);
|
|
15477
15601
|
setFlag(nextFlag);
|
|
15478
15602
|
}
|
|
15479
|
-
})
|
|
15603
|
+
}), {
|
|
15604
|
+
wait: 100,
|
|
15605
|
+
leading: true,
|
|
15606
|
+
trailing: true
|
|
15607
|
+
});
|
|
15480
15608
|
useEffect(() => {
|
|
15481
15609
|
check();
|
|
15482
15610
|
});
|
|
@@ -15495,9 +15623,11 @@ const InfiniteScroll = (p2) => {
|
|
|
15495
15623
|
};
|
|
15496
15624
|
}, [scrollParent]);
|
|
15497
15625
|
function retry() {
|
|
15498
|
-
|
|
15499
|
-
|
|
15500
|
-
|
|
15626
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15627
|
+
setFailed(false);
|
|
15628
|
+
yield doLoadMore(true);
|
|
15629
|
+
setFlag(nextFlagRef.current);
|
|
15630
|
+
});
|
|
15501
15631
|
}
|
|
15502
15632
|
return withNativeProps(props, React$1.createElement("div", {
|
|
15503
15633
|
className: classPrefix$y,
|
|
@@ -15522,14 +15652,14 @@ const InfiniteScrollContent = (props) => {
|
|
|
15522
15652
|
}
|
|
15523
15653
|
return React$1.createElement(React$1.Fragment, null, React$1.createElement("span", null, locale.common.loading), React$1.createElement(DotLoading, null));
|
|
15524
15654
|
};
|
|
15525
|
-
var input = /* @__PURE__ */ (() => ".adm-input {\n --font-size: var(--adm-font-size-9);\n --color: var(--adm-color-text);\n --placeholder-color: var(--adm-color-light);\n --text-align: left;\n --background-color: transparent;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n min-height: 24px;\n background-color: var(--background-color);\n}\n.adm-input-disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n.adm-input-element {\n flex: auto;\n display: inline-block;\n box-sizing: border-box;\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n padding: 0;\n margin: 0;\n color: var(--color);\n font-size: var(--font-size);\n line-height: 1.5;\n background: transparent;\n border: 0;\n outline: none;\n appearance: none;\n min-height: 1.5em;\n text-align: var(--text-align);\n}\n.adm-input-element::placeholder {\n color: var(--placeholder-color);\n font-family: inherit;\n}\n.adm-input-element:-webkit-autofill {\n background-color: transparent;\n}\n.adm-input-element:read-only {\n cursor: default;\n}\n.adm-input-element:invalid {\n box-shadow: none;\n}\n.adm-input-element::-ms-clear {\n display: none;\n}\n.adm-input-element::-webkit-search-cancel-button {\n display: none;\n}\n.adm-input-element::-webkit-search-decoration {\n display: none;\n}\n.adm-input-element:disabled {\n opacity: 1;\n}\n.adm-input-element[type='date'],\n.adm-input-element[type='time'],\n.adm-input-element[type='datetime-local'] {\n min-height: 1.5em;\n}\n.adm-input-element[type='search'] {\n -webkit-appearance: none;\n}\n.adm-input-element[readonly] {\n pointer-events: none;\n}\n.adm-input-clear {\n flex: none;\n margin-left: 8px;\n color: var(--adm-color-light);\n padding: 4px;\n cursor: pointer;\n}\n.adm-input-clear:active {\n color: var(--adm-color-weak);\n}\n.adm-input-clear .antd-mobile-icon {\n display: block;\n font-size: var(--adm-font-size-7);\n}\n")();
|
|
15655
|
+
var input = /* @__PURE__ */ (() => ".adm-input {\n --font-size: var(--adm-font-size-9);\n --color: var(--adm-color-text);\n --placeholder-color: var(--adm-color-light);\n --text-align: left;\n --background-color: transparent;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n min-height: 24px;\n background-color: var(--background-color);\n}\n.adm-input-disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n.adm-input-element {\n flex: auto;\n display: inline-block;\n box-sizing: border-box;\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n padding: 0;\n margin: 0;\n color: var(--color);\n font-size: var(--font-size);\n line-height: 1.5;\n background: transparent;\n border: 0;\n outline: none;\n appearance: none;\n min-height: 1.5em;\n text-align: var(--text-align);\n}\n.adm-input-element::placeholder {\n color: var(--placeholder-color);\n font-family: inherit;\n}\n.adm-input-element:-webkit-autofill {\n background-color: transparent;\n}\n.adm-input-element:read-only {\n cursor: default;\n}\n.adm-input-element:invalid {\n box-shadow: none;\n}\n.adm-input-element::-ms-clear {\n display: none;\n}\n.adm-input-element::-ms-reveal {\n display: none;\n}\n.adm-input-element::-webkit-search-cancel-button {\n display: none;\n}\n.adm-input-element::-webkit-search-decoration {\n display: none;\n}\n.adm-input-element:disabled {\n opacity: 1;\n}\n.adm-input-element[type='date'],\n.adm-input-element[type='time'],\n.adm-input-element[type='datetime-local'] {\n min-height: 1.5em;\n}\n.adm-input-element[type='search'] {\n -webkit-appearance: none;\n}\n.adm-input-element[readonly] {\n pointer-events: none;\n}\n.adm-input-clear {\n flex: none;\n margin-left: 8px;\n color: var(--adm-color-light);\n padding: 4px;\n cursor: pointer;\n}\n.adm-input-clear:active {\n color: var(--adm-color-weak);\n}\n.adm-input-clear .antd-mobile-icon {\n display: block;\n font-size: var(--adm-font-size-7);\n}\n")();
|
|
15526
15656
|
const classPrefix$x = `adm-input`;
|
|
15527
|
-
const defaultProps$
|
|
15657
|
+
const defaultProps$s = {
|
|
15528
15658
|
defaultValue: "",
|
|
15529
15659
|
onlyShowClearWhenFocus: true
|
|
15530
15660
|
};
|
|
15531
15661
|
const Input = forwardRef((p2, ref) => {
|
|
15532
|
-
const props = mergeProps(defaultProps$
|
|
15662
|
+
const props = mergeProps(defaultProps$s, p2);
|
|
15533
15663
|
const [value, setValue] = usePropsValue(props);
|
|
15534
15664
|
const [hasFocus, setHasFocus] = useState(false);
|
|
15535
15665
|
const compositionStartRef = useRef(false);
|
|
@@ -15633,7 +15763,11 @@ const Input = forwardRef((p2, ref) => {
|
|
|
15633
15763
|
compositionStartRef.current = false;
|
|
15634
15764
|
(_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e2);
|
|
15635
15765
|
},
|
|
15636
|
-
onClick: props.onClick
|
|
15766
|
+
onClick: props.onClick,
|
|
15767
|
+
role: props.role,
|
|
15768
|
+
"aria-valuenow": props["aria-valuenow"],
|
|
15769
|
+
"aria-valuemax": props["aria-valuemax"],
|
|
15770
|
+
"aria-valuemin": props["aria-valuemin"]
|
|
15637
15771
|
}), shouldShowClear && React$1.createElement("div", {
|
|
15638
15772
|
className: `${classPrefix$x}-clear`,
|
|
15639
15773
|
onMouseDown: (e2) => {
|
|
@@ -15746,7 +15880,7 @@ const JumboTabs = (props) => {
|
|
|
15746
15880
|
var index$7 = attachPropertiesToComponent(JumboTabs, {
|
|
15747
15881
|
Tab: JumboTab
|
|
15748
15882
|
});
|
|
15749
|
-
var modal = /* @__PURE__ */ (() => ".adm-modal {\n --z-index: var(--adm-modal-z-index, 1000);\n ---z-index: var(--z-index);\n}\n.adm-modal .adm-center-popup {\n --z-index: var(---z-index);\n}\n.adm-modal-body {\n width: 100%;\n max-height: 70vh;\n font-size: var(--adm-font-size-6);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n.adm-modal-body > * {\n flex: none;\n}\n.adm-modal-body > .adm-modal-content {\n flex: auto;\n}\n.adm-modal-body:not(.adm-modal-with-image) {\n padding-top: 20px;\n}\n.adm-modal-image-container {\n margin-bottom: 12px;\n max-height: 40vh;\n overflow-y: scroll;\n}\n.adm-modal-header {\n margin-bottom: 8px;\n padding: 0 12px;\n}\n.adm-modal-title {\n margin-bottom: 8px;\n padding: 0 12px;\n font-weight: bold;\n font-size: var(--adm-font-size-10);\n line-height: 25px;\n text-align: center;\n}\n.adm-modal-content {\n padding: 0 12px 12px;\n max-height: 70vh;\n overflow-x: hidden;\n overflow-y: auto;\n font-size: var(--adm-font-size-7);\n line-height: 1.4;\n color: var(--adm-color-text);\n}\n.adm-modal-
|
|
15883
|
+
var modal = /* @__PURE__ */ (() => ".adm-modal {\n --z-index: var(--adm-modal-z-index, 1000);\n ---z-index: var(--z-index);\n}\n.adm-modal .adm-center-popup {\n --z-index: var(---z-index);\n}\n.adm-modal-body {\n width: 100%;\n max-height: 70vh;\n font-size: var(--adm-font-size-6);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n.adm-modal-body > * {\n flex: none;\n}\n.adm-modal-body > .adm-modal-content {\n flex: auto;\n}\n.adm-modal-body:not(.adm-modal-with-image) {\n padding-top: 20px;\n}\n.adm-modal-image-container {\n margin-bottom: 12px;\n max-height: 40vh;\n overflow-y: scroll;\n}\n.adm-modal-header {\n margin-bottom: 8px;\n padding: 0 12px;\n}\n.adm-modal-title {\n margin-bottom: 8px;\n padding: 0 12px;\n font-weight: bold;\n font-size: var(--adm-font-size-10);\n line-height: 25px;\n text-align: center;\n}\n.adm-modal-content {\n padding: 0 12px 12px;\n max-height: 70vh;\n overflow-x: hidden;\n overflow-y: auto;\n font-size: var(--adm-font-size-7);\n line-height: 1.4;\n color: var(--adm-color-text);\n}\n.adm-modal-footer {\n user-select: none;\n padding: 8px 12px 12px;\n}\n.adm-modal-footer-empty {\n padding: 0;\n height: 8px;\n}\n.adm-modal-footer.adm-space {\n --gap-vertical: 20px;\n}\n.adm-modal-footer .adm-modal-button {\n font-size: var(--adm-font-size-10);\n line-height: 25px;\n}\n.adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary) {\n padding-top: 0;\n padding-bottom: 0;\n}\n.adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary)::before {\n display: none;\n}\n.adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary):active {\n opacity: 0.7;\n}\n")();
|
|
15750
15884
|
const ModalActionButton = (props) => {
|
|
15751
15885
|
const {
|
|
15752
15886
|
action
|
|
@@ -15765,17 +15899,14 @@ const ModalActionButton = (props) => {
|
|
|
15765
15899
|
disabled: action.disabled
|
|
15766
15900
|
}, action.text));
|
|
15767
15901
|
};
|
|
15768
|
-
const defaultProps$
|
|
15902
|
+
const defaultProps$r = {
|
|
15769
15903
|
actions: [],
|
|
15770
15904
|
closeOnAction: false,
|
|
15771
15905
|
closeOnMaskClick: false
|
|
15772
15906
|
};
|
|
15773
15907
|
const Modal = (p2) => {
|
|
15774
|
-
const props = mergeProps(defaultProps$
|
|
15775
|
-
const element = React$1.createElement(React$1.Fragment, null, props.
|
|
15776
|
-
className: classNames(cls("close"), "adm-plain-anchor"),
|
|
15777
|
-
onClick: props.onClose
|
|
15778
|
-
}, React$1.createElement(CloseOutline, null)), !!props.image && React$1.createElement("div", {
|
|
15908
|
+
const props = mergeProps(defaultProps$r, p2);
|
|
15909
|
+
const element = React$1.createElement(React$1.Fragment, null, !!props.image && React$1.createElement("div", {
|
|
15779
15910
|
className: cls("image-container")
|
|
15780
15911
|
}, React$1.createElement(Image$1, {
|
|
15781
15912
|
src: props.image,
|
|
@@ -15809,10 +15940,9 @@ const Modal = (p2) => {
|
|
|
15809
15940
|
style: props.style,
|
|
15810
15941
|
afterClose: props.afterClose,
|
|
15811
15942
|
afterShow: props.afterShow,
|
|
15812
|
-
|
|
15813
|
-
|
|
15814
|
-
|
|
15815
|
-
} : void 0,
|
|
15943
|
+
showCloseButton: props.showCloseButton,
|
|
15944
|
+
closeOnMaskClick: props.closeOnMaskClick,
|
|
15945
|
+
onClose: props.onClose,
|
|
15816
15946
|
visible: props.visible,
|
|
15817
15947
|
getContainer: props.getContainer,
|
|
15818
15948
|
bodyStyle: props.bodyStyle,
|
|
@@ -15862,7 +15992,7 @@ function alert(p2) {
|
|
|
15862
15992
|
}));
|
|
15863
15993
|
});
|
|
15864
15994
|
}
|
|
15865
|
-
const defaultProps$
|
|
15995
|
+
const defaultProps$q = {
|
|
15866
15996
|
confirmText: "\u786E\u8BA4",
|
|
15867
15997
|
cancelText: "\u53D6\u6D88"
|
|
15868
15998
|
};
|
|
@@ -15870,7 +16000,7 @@ function confirm(p2) {
|
|
|
15870
16000
|
const {
|
|
15871
16001
|
locale
|
|
15872
16002
|
} = getDefaultConfig();
|
|
15873
|
-
const props = mergeProps(defaultProps$
|
|
16003
|
+
const props = mergeProps(defaultProps$q, {
|
|
15874
16004
|
confirmText: locale.common.confirm,
|
|
15875
16005
|
cancelText: locale.common.cancel
|
|
15876
16006
|
}, p2);
|
|
@@ -15916,12 +16046,12 @@ var index$6 = attachPropertiesToComponent(Modal, {
|
|
|
15916
16046
|
});
|
|
15917
16047
|
var navBar = /* @__PURE__ */ (() => ".adm-nav-bar {\n --height: 45px;\n --border-bottom: none;\n display: flex;\n align-items: center;\n height: var(--height);\n border-bottom: var(--border-bottom);\n padding: 0 12px;\n white-space: nowrap;\n}\n.adm-nav-bar-left,\n.adm-nav-bar-right {\n flex: 1;\n}\n.adm-nav-bar-title {\n flex: auto;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.adm-nav-bar-back {\n display: flex;\n align-items: center;\n margin-right: 16px;\n padding: 6px 0;\n cursor: pointer;\n}\n.adm-nav-bar-back-arrow {\n font-size: 24px;\n margin-right: 4px;\n}\n.adm-nav-bar-left {\n font-size: var(--adm-font-size-7);\n display: flex;\n justify-content: flex-start;\n align-items: center;\n}\n.adm-nav-bar-title {\n justify-content: center;\n white-space: nowrap;\n font-size: var(--adm-font-size-10);\n padding: 0 12px;\n}\n.adm-nav-bar-right {\n text-align: right;\n}\n")();
|
|
15918
16048
|
const classPrefix$v = `adm-nav-bar`;
|
|
15919
|
-
const defaultProps$
|
|
16049
|
+
const defaultProps$p = {
|
|
15920
16050
|
back: "",
|
|
15921
16051
|
backArrow: true
|
|
15922
16052
|
};
|
|
15923
16053
|
const NavBar = (p2) => {
|
|
15924
|
-
const props = mergeProps(defaultProps$
|
|
16054
|
+
const props = mergeProps(defaultProps$p, p2);
|
|
15925
16055
|
const {
|
|
15926
16056
|
back,
|
|
15927
16057
|
backArrow
|
|
@@ -15946,14 +16076,14 @@ const NavBar = (p2) => {
|
|
|
15946
16076
|
};
|
|
15947
16077
|
var noticeBar = /* @__PURE__ */ (() => ".adm-notice-bar {\n --background-color: #ababab;\n --border-color: #999999;\n --text-color: var(--adm-color-white);\n --font-size: var(--adm-font-size-7);\n --icon-font-size: var(--adm-font-size-10);\n --height: 38px;\n height: var(--height);\n box-sizing: border-box;\n font-size: var(--font-size);\n line-height: var(--height);\n padding: 0 12px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border: solid 1px var(--border-color);\n border-left: none;\n border-right: none;\n background-color: var(--background-color);\n color: var(--text-color);\n}\n.adm-notice-bar > span[role='img'] {\n color: var(--text-color);\n}\n.adm-notice-bar.adm-notice-bar-alert {\n --background-color: #fff9ed;\n --border-color: #fff3e9;\n --text-color: #ff6010;\n}\n.adm-notice-bar.adm-notice-bar-error {\n --background-color: #ff3b30;\n --border-color: #d9281e;\n --text-color: #ffffff;\n}\n.adm-notice-bar.adm-notice-bar-info {\n --background-color: #d0e4ff;\n --border-color: #bcd8ff;\n --text-color: #1677ff;\n}\n.adm-notice-bar .adm-notice-bar-left {\n flex-shrink: 0;\n margin-right: 8px;\n font-size: var(--icon-font-size);\n line-height: var(--height);\n}\n.adm-notice-bar .adm-notice-bar-content {\n flex: 1;\n overflow: hidden;\n position: relative;\n height: 100%;\n display: flex;\n align-items: center;\n}\n.adm-notice-bar .adm-notice-bar-content .adm-notice-bar-content-inner {\n width: auto;\n transition-timing-function: linear;\n position: absolute;\n white-space: nowrap;\n}\n.adm-notice-bar .adm-notice-bar-right {\n flex-shrink: 0;\n margin-left: 12px;\n}\n.adm-notice-bar-close-icon {\n font-size: var(--adm-font-size-10);\n}\n")();
|
|
15948
16078
|
const classPrefix$u = `adm-notice-bar`;
|
|
15949
|
-
const defaultProps$
|
|
16079
|
+
const defaultProps$o = {
|
|
15950
16080
|
color: "default",
|
|
15951
16081
|
delay: 2e3,
|
|
15952
16082
|
speed: 50,
|
|
15953
16083
|
icon: React$1.createElement(SoundOutline, null)
|
|
15954
16084
|
};
|
|
15955
16085
|
const NoticeBar = memo((p2) => {
|
|
15956
|
-
const props = mergeProps(defaultProps$
|
|
16086
|
+
const props = mergeProps(defaultProps$o, p2);
|
|
15957
16087
|
const containerRef = useRef(null);
|
|
15958
16088
|
const textRef = useRef(null);
|
|
15959
16089
|
const [visible, setVisible] = useState(true);
|
|
@@ -16038,16 +16168,18 @@ function shuffle(array) {
|
|
|
16038
16168
|
return result2;
|
|
16039
16169
|
}
|
|
16040
16170
|
const classPrefix$t = "adm-number-keyboard";
|
|
16041
|
-
const defaultProps$
|
|
16171
|
+
const defaultProps$n = {
|
|
16042
16172
|
defaultVisible: false,
|
|
16043
16173
|
randomOrder: false,
|
|
16044
16174
|
showCloseButton: true,
|
|
16045
16175
|
confirmText: null,
|
|
16046
16176
|
closeOnConfirm: true,
|
|
16047
|
-
safeArea: true
|
|
16177
|
+
safeArea: true,
|
|
16178
|
+
destroyOnClose: false,
|
|
16179
|
+
forceRender: false
|
|
16048
16180
|
};
|
|
16049
16181
|
const NumberKeyboard = (p2) => {
|
|
16050
|
-
const props = mergeProps(defaultProps$
|
|
16182
|
+
const props = mergeProps(defaultProps$n, p2);
|
|
16051
16183
|
const {
|
|
16052
16184
|
visible,
|
|
16053
16185
|
title,
|
|
@@ -16132,7 +16264,11 @@ const NumberKeyboard = (p2) => {
|
|
|
16132
16264
|
"sign-key": !isNumberKey && key,
|
|
16133
16265
|
"mid-key": index2 === 9 && !!confirmText
|
|
16134
16266
|
});
|
|
16135
|
-
|
|
16267
|
+
const ariaProps = key ? {
|
|
16268
|
+
role: "button",
|
|
16269
|
+
title: key
|
|
16270
|
+
} : void 0;
|
|
16271
|
+
return React$1.createElement("div", Object.assign({
|
|
16136
16272
|
key,
|
|
16137
16273
|
className,
|
|
16138
16274
|
onTouchStart: () => {
|
|
@@ -16145,10 +16281,8 @@ const NumberKeyboard = (p2) => {
|
|
|
16145
16281
|
if (key === "BACKSPACE") {
|
|
16146
16282
|
onBackspacePressEnd();
|
|
16147
16283
|
}
|
|
16148
|
-
}
|
|
16149
|
-
|
|
16150
|
-
role: "button"
|
|
16151
|
-
}, key === "BACKSPACE" ? React$1.createElement(TextDeletionOutline, null) : key);
|
|
16284
|
+
}
|
|
16285
|
+
}, ariaProps), key === "BACKSPACE" ? React$1.createElement(TextDeletionOutline, null) : key);
|
|
16152
16286
|
};
|
|
16153
16287
|
return React$1.createElement(Popup, {
|
|
16154
16288
|
visible,
|
|
@@ -16157,7 +16291,9 @@ const NumberKeyboard = (p2) => {
|
|
|
16157
16291
|
afterClose: props.afterClose,
|
|
16158
16292
|
afterShow: props.afterShow,
|
|
16159
16293
|
className: `${classPrefix$t}-popup`,
|
|
16160
|
-
stopPropagation: props.stopPropagation
|
|
16294
|
+
stopPropagation: props.stopPropagation,
|
|
16295
|
+
destroyOnClose: props.destroyOnClose,
|
|
16296
|
+
forceRender: props.forceRender
|
|
16161
16297
|
}, withNativeProps(props, React$1.createElement("div", {
|
|
16162
16298
|
ref: keyboardRef,
|
|
16163
16299
|
className: classPrefix$t,
|
|
@@ -16195,12 +16331,12 @@ const NumberKeyboard = (p2) => {
|
|
|
16195
16331
|
};
|
|
16196
16332
|
var pageIndicator = /* @__PURE__ */ (() => ".adm-page-indicator {\n display: flex;\n width: auto;\n --dot-color: rgba(0, 0, 0, 0.2);\n --active-dot-color: var(--adm-color-primary);\n --dot-size: 3px;\n --active-dot-size: 13px;\n --dot-border-radius: 1px;\n --active-dot-border-radius: var(--dot-border-radius);\n --dot-spacing: 3px;\n}\n.adm-page-indicator-dot {\n display: block;\n width: var(--dot-size);\n height: var(--dot-size);\n border-radius: var(--dot-border-radius);\n background: var(--dot-color);\n}\n.adm-page-indicator-dot:last-child {\n margin-right: 0;\n}\n.adm-page-indicator-dot-active {\n border-radius: var(--active-dot-border-radius);\n background: var(--active-dot-color);\n}\n.adm-page-indicator-color-white {\n --active-dot-color: var(--adm-color-white);\n}\n.adm-page-indicator-horizontal {\n flex-direction: row;\n}\n.adm-page-indicator-horizontal .adm-page-indicator-dot {\n margin-right: var(--dot-spacing);\n}\n.adm-page-indicator-horizontal .adm-page-indicator-dot-active {\n width: var(--active-dot-size);\n}\n.adm-page-indicator-vertical {\n flex-direction: column;\n}\n.adm-page-indicator-vertical .adm-page-indicator-dot {\n margin-bottom: var(--dot-spacing);\n}\n.adm-page-indicator-vertical .adm-page-indicator-dot-active {\n height: var(--active-dot-size);\n}\n")();
|
|
16197
16333
|
const classPrefix$s = `adm-page-indicator`;
|
|
16198
|
-
const defaultProps$
|
|
16334
|
+
const defaultProps$m = {
|
|
16199
16335
|
color: "primary",
|
|
16200
16336
|
direction: "horizontal"
|
|
16201
16337
|
};
|
|
16202
16338
|
const PageIndicator = memo((p2) => {
|
|
16203
|
-
const props = mergeProps(defaultProps$
|
|
16339
|
+
const props = mergeProps(defaultProps$m, p2);
|
|
16204
16340
|
const dots = [];
|
|
16205
16341
|
for (let i = 0; i < props.total; i++) {
|
|
16206
16342
|
dots.push(React$1.createElement("div", {
|
|
@@ -16216,7 +16352,7 @@ const PageIndicator = memo((p2) => {
|
|
|
16216
16352
|
});
|
|
16217
16353
|
var passcodeInput = /* @__PURE__ */ (() => ".adm-passcode-input {\n position: relative;\n display: inline-block;\n --cell-size: 40px;\n --cell-gap: 6px;\n --dot-size: 10px;\n --border-color: #e5e5e5;\n --border-radius: 8px;\n}\n.adm-passcode-input-cell-container {\n display: inline-flex;\n vertical-align: top;\n}\n.adm-passcode-input-cell {\n flex: none;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n font-size: var(--adm-font-size-10);\n width: var(--cell-size);\n height: var(--cell-size);\n background: var(--adm-color-white);\n}\n.adm-passcode-input:not(.seperated) {\n border-radius: var(--border-radius);\n overflow: hidden;\n border: 1px solid var(--border-color);\n}\n.adm-passcode-input:not(.seperated) .adm-passcode-input-cell:not(:last-child) {\n border-right: 1px solid var(--border-color);\n}\n.adm-passcode-input:not(.seperated).focused {\n border-color: var(--adm-color-primary);\n box-shadow: 0 0 2px 0 var(--adm-color-primary);\n outline: none;\n}\n.adm-passcode-input:not(.seperated).error {\n border-color: var(--adm-color-danger);\n box-shadow: 0 0 2px 0 var(--adm-color-danger);\n animation: 100ms ease-in-out 0s 3 normal none running adm-shake-horizontal;\n}\n.adm-passcode-input.seperated .adm-passcode-input-cell {\n border-radius: var(--border-radius);\n border: 1px solid var(--border-color);\n}\n.adm-passcode-input.seperated .adm-passcode-input-cell:not(:last-child) {\n margin-right: var(--cell-gap);\n}\n.adm-passcode-input.seperated .adm-passcode-input-cell.focused {\n border-color: var(--adm-color-primary);\n box-shadow: 0 0 2px 0 var(--adm-color-primary);\n}\n.adm-passcode-input.seperated.focused {\n outline: none;\n}\n.adm-passcode-input.seperated.error {\n animation: 100ms ease-in-out 0s 3 normal none running adm-shake-horizontal;\n}\n.adm-passcode-input.seperated.error .adm-passcode-input-cell {\n border-color: var(--adm-color-danger);\n box-shadow: 0 0 2px 0 var(--adm-color-danger);\n}\n.adm-passcode-input-cell.dot::before {\n content: '';\n width: var(--dot-size);\n height: var(--dot-size);\n border-radius: 50%;\n background: var(--adm-color-text);\n}\n.adm-passcode-input-cell.caret::after {\n content: '';\n width: 2px;\n height: 1.1em;\n margin-left: 1px;\n background: var(--adm-color-primary);\n animation: 1s linear infinite adm-caret-blink;\n}\n.adm-passcode-input > .adm-passcode-input-native-input {\n position: absolute;\n left: -200vw;\n top: 0;\n display: block;\n width: 50px;\n height: 20px;\n opacity: 0.5;\n}\n@keyframes adm-shake-horizontal {\n 0% {\n transform: translateX(0);\n }\n 10% {\n transform: translateX(-4px);\n }\n 20% {\n transform: translateX(5px);\n }\n 30% {\n transform: translateX(-1px);\n }\n 40% {\n transform: translateX(8px);\n }\n 50% {\n transform: translateX(0);\n }\n 60% {\n transform: translateX(-8px);\n }\n 70% {\n transform: translateX(1px);\n }\n 80% {\n transform: translateX(-5px);\n }\n 90% {\n transform: translateX(4px);\n }\n 100% {\n transform: translateX(0);\n }\n}\n@keyframes adm-caret-blink {\n from {\n opacity: 1;\n }\n 60% {\n opacity: 1;\n }\n 80% {\n opacity: 0;\n }\n to {\n opacity: 0;\n }\n}\n")();
|
|
16218
16354
|
const classPrefix$r = "adm-passcode-input";
|
|
16219
|
-
const defaultProps$
|
|
16355
|
+
const defaultProps$l = {
|
|
16220
16356
|
defaultValue: "",
|
|
16221
16357
|
length: 6,
|
|
16222
16358
|
plain: false,
|
|
@@ -16225,8 +16361,8 @@ const defaultProps$k = {
|
|
|
16225
16361
|
caret: true
|
|
16226
16362
|
};
|
|
16227
16363
|
const PasscodeInput = forwardRef((p2, ref) => {
|
|
16228
|
-
const props = mergeProps(defaultProps$
|
|
16229
|
-
const cellLength = props.length > 0 && props.length < Infinity ? Math.floor(props.length) : defaultProps$
|
|
16364
|
+
const props = mergeProps(defaultProps$l, p2);
|
|
16365
|
+
const cellLength = props.length > 0 && props.length < Infinity ? Math.floor(props.length) : defaultProps$l.length;
|
|
16230
16366
|
const [focused, setFocused] = useState(false);
|
|
16231
16367
|
const [value, setValue] = usePropsValue(props);
|
|
16232
16368
|
const rootRef = useRef(null);
|
|
@@ -16332,23 +16468,37 @@ const PasscodeInput = forwardRef((p2, ref) => {
|
|
|
16332
16468
|
}
|
|
16333
16469
|
}));
|
|
16334
16470
|
});
|
|
16335
|
-
var progressBar = /* @__PURE__ */ (() => ".adm-progress-bar {\n --track-width: var(--adm-progress-bar-track-width,
|
|
16471
|
+
var progressBar = /* @__PURE__ */ (() => ".adm-progress-bar {\n --track-width: var(--adm-progress-bar-track-width, 8px);\n --track-color: var(--adm-progress-bar-track-color, #e5e5e5);\n --fill-color: var(--adm-progress-bar-fill-color, var(--adm-color-primary));\n --text-width: var(--adm-progress-bar-text-width, 40px);\n display: flex;\n align-items: center;\n}\n.adm-progress-bar-trail {\n flex: auto;\n background: var(--track-color);\n overflow: hidden;\n height: var(--track-width);\n}\n.adm-progress-bar-fill {\n transition: width 0.3s;\n background: var(--fill-color);\n height: var(--track-width);\n}\n.adm-progress-bar-text {\n flex: none;\n width: calc(var(--text-width) + 8px);\n padding-left: 8px;\n color: #999999;\n}\n.adm-progress-bar-rounded .adm-progress-bar-trail,\n.adm-progress-bar-rounded .adm-progress-bar-fill {\n border-radius: var(--track-width);\n}\n")();
|
|
16336
16472
|
const classPrefix$q = `adm-progress-bar`;
|
|
16473
|
+
const defaultProps$k = {
|
|
16474
|
+
percent: 0,
|
|
16475
|
+
rounded: true,
|
|
16476
|
+
text: false
|
|
16477
|
+
};
|
|
16337
16478
|
const ProgressBar = (p2) => {
|
|
16338
|
-
const props = mergeProps(
|
|
16339
|
-
percent: 0
|
|
16340
|
-
}, p2);
|
|
16479
|
+
const props = mergeProps(defaultProps$k, p2);
|
|
16341
16480
|
const fillStyle = {
|
|
16342
16481
|
width: `${props.percent}%`
|
|
16343
16482
|
};
|
|
16483
|
+
const textElement = function() {
|
|
16484
|
+
if (props.text === true) {
|
|
16485
|
+
return `${props.percent}%`;
|
|
16486
|
+
}
|
|
16487
|
+
if (typeof props.text === "function") {
|
|
16488
|
+
return props.text(props.percent);
|
|
16489
|
+
}
|
|
16490
|
+
return props.text;
|
|
16491
|
+
}();
|
|
16344
16492
|
return withNativeProps(props, React$1.createElement("div", {
|
|
16345
|
-
className: classPrefix$q
|
|
16493
|
+
className: classNames(classPrefix$q, props.rounded && `${classPrefix$q}-rounded`)
|
|
16346
16494
|
}, React$1.createElement("div", {
|
|
16347
16495
|
className: `${classPrefix$q}-trail`
|
|
16348
16496
|
}, React$1.createElement("div", {
|
|
16349
16497
|
className: `${classPrefix$q}-fill`,
|
|
16350
16498
|
style: fillStyle
|
|
16351
|
-
})))
|
|
16499
|
+
})), isNodeWithContent(textElement) && React$1.createElement("div", {
|
|
16500
|
+
className: `${classPrefix$q}-text`
|
|
16501
|
+
}, textElement)));
|
|
16352
16502
|
};
|
|
16353
16503
|
var progressCircle = /* @__PURE__ */ (() => "/*\u8FDB\u5EA6\u5708*/\n.adm-progress-circle {\n --track-width: var(--adm-progress-circle-track-width, 3px);\n --size: var(--adm-progress-circle-size, 50px);\n --track-color: var(--adm-progress-circle-track-color, #e5e5e5);\n --fill-color: var(--adm-progress-circle-fill-color, var(--adm-color-primary));\n --percent: 0;\n --pi: 3.14159265;\n --radius: calc(var(--size) / 2 - var(--track-width) / 2);\n --circumference: calc(var(--radius) * var(--pi) * 2);\n display: inline-block;\n width: var(--size);\n height: var(--size);\n}\n.adm-progress-circle-svg {\n width: 100%;\n height: 100%;\n}\n.adm-progress-circle-svg > .adm-progress-circle-track,\n.adm-progress-circle-svg .adm-progress-circle-fill {\n stroke-width: var(--track-width);\n r: var(--radius);\n cx: calc(var(--size) / 2);\n cy: calc(var(--size) / 2);\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n}\n.adm-progress-circle-svg > .adm-progress-circle-track {\n stroke: var(--track-color);\n}\n.adm-progress-circle-svg > .adm-progress-circle-fill {\n transition: stroke-dashoffset 0.35s;\n stroke: var(--fill-color);\n stroke-dasharray: var(--circumference);\n stroke-dashoffset: calc(var(--circumference) * (1 - var(--percent) / 100));\n stroke-linecap: round;\n}\n.adm-progress-circle-content {\n position: relative;\n margin: auto;\n width: 100%;\n height: 100%;\n}\n.adm-progress-circle-info {\n position: absolute;\n width: 100%;\n top: 50%;\n left: 50%;\n text-align: center;\n transform: translate(-50%, -50%);\n}\n")();
|
|
16354
16504
|
const classPrefix$p = `adm-progress-circle`;
|
|
@@ -16592,14 +16742,14 @@ const Radio = (p2) => {
|
|
|
16592
16742
|
} = props;
|
|
16593
16743
|
if (groupContext && value !== void 0) {
|
|
16594
16744
|
checked = groupContext.value.includes(value);
|
|
16595
|
-
setChecked = (
|
|
16745
|
+
setChecked = (innerChecked) => {
|
|
16596
16746
|
var _a;
|
|
16597
|
-
if (
|
|
16747
|
+
if (innerChecked) {
|
|
16598
16748
|
groupContext.check(value);
|
|
16599
16749
|
} else {
|
|
16600
16750
|
groupContext.uncheck(value);
|
|
16601
16751
|
}
|
|
16602
|
-
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props,
|
|
16752
|
+
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, innerChecked);
|
|
16603
16753
|
};
|
|
16604
16754
|
disabled = disabled || groupContext.disabled;
|
|
16605
16755
|
}
|
|
@@ -16632,12 +16782,26 @@ const Radio = (p2) => {
|
|
|
16632
16782
|
var index$5 = attachPropertiesToComponent(Radio, {
|
|
16633
16783
|
Group
|
|
16634
16784
|
});
|
|
16635
|
-
var rate = /* @__PURE__ */ (() => ".adm-rate {\n --star-size: 24px;\n --active-color: #ffd21e;\n --inactive-color: var(--adm-color-
|
|
16785
|
+
var rate = /* @__PURE__ */ (() => ".adm-rate {\n --star-size: 24px;\n --active-color: #ffd21e;\n --inactive-color: var(--adm-color-border);\n display: inline-flex;\n}\n.adm-rate-box {\n position: relative;\n}\n.adm-rate-star {\n padding: 0.125em;\n line-height: var(--star-size);\n font-size: var(--star-size);\n color: var(--inactive-color);\n text-align: center;\n overflow: hidden;\n cursor: pointer;\n box-sizing: border-box;\n}\n.adm-rate-star-half {\n padding-right: 0;\n width: 50%;\n position: absolute;\n left: 0;\n top: 0;\n}\n.adm-rate-star-active {\n color: var(--active-color);\n}\n.adm-rate-star-readonly {\n cursor: unset;\n}\n")();
|
|
16786
|
+
const Star = () => {
|
|
16787
|
+
return React$1.createElement("svg", {
|
|
16788
|
+
viewBox: "0 0 42 40",
|
|
16789
|
+
height: "1em",
|
|
16790
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16791
|
+
style: {
|
|
16792
|
+
verticalAlign: "-0.125em"
|
|
16793
|
+
}
|
|
16794
|
+
}, React$1.createElement("path", {
|
|
16795
|
+
d: "m21 34-10.52 5.53a2 2 0 0 1-2.902-2.108l2.01-11.714-8.511-8.296a2 2 0 0 1 1.108-3.411l11.762-1.71 5.26-10.657a2 2 0 0 1 3.586 0l5.26 10.658L39.815 14a2 2 0 0 1 1.108 3.411l-8.51 8.296 2.009 11.714a2 2 0 0 1-2.902 2.109L21 34Z",
|
|
16796
|
+
fill: "currentColor",
|
|
16797
|
+
fillRule: "evenodd"
|
|
16798
|
+
}));
|
|
16799
|
+
};
|
|
16636
16800
|
const classPrefix$m = `adm-rate`;
|
|
16637
16801
|
const defaultProps$g = {
|
|
16638
16802
|
count: 5,
|
|
16639
16803
|
allowHalf: false,
|
|
16640
|
-
character: React$1.createElement(
|
|
16804
|
+
character: React$1.createElement(Star, null),
|
|
16641
16805
|
defaultValue: 0,
|
|
16642
16806
|
readOnly: false,
|
|
16643
16807
|
allowClear: true
|
|
@@ -17076,6 +17240,9 @@ const Thumb = (props) => {
|
|
|
17076
17240
|
icon
|
|
17077
17241
|
} = props;
|
|
17078
17242
|
const prevValue = useRef(value);
|
|
17243
|
+
const {
|
|
17244
|
+
locale
|
|
17245
|
+
} = useConfig();
|
|
17079
17246
|
const currentPosition = () => {
|
|
17080
17247
|
return {
|
|
17081
17248
|
left: `${(value - min) / (max - min) * 100}%`,
|
|
@@ -17112,7 +17279,14 @@ const Thumb = (props) => {
|
|
|
17112
17279
|
return React$1.createElement("div", Object.assign({
|
|
17113
17280
|
className: `${classPrefix$f}-thumb-container`,
|
|
17114
17281
|
style: currentPosition()
|
|
17115
|
-
}, bind()
|
|
17282
|
+
}, bind(), {
|
|
17283
|
+
role: "slider",
|
|
17284
|
+
"aria-label": props["aria-label"] || locale.Slider.name,
|
|
17285
|
+
"aria-valuemax": max,
|
|
17286
|
+
"aria-valuemin": min,
|
|
17287
|
+
"aria-valuenow": value,
|
|
17288
|
+
"aria-disabled": disabled
|
|
17289
|
+
}), renderPopoverContent ? React$1.createElement(Popover$1, {
|
|
17116
17290
|
content: renderPopoverContent(value),
|
|
17117
17291
|
placement: "top",
|
|
17118
17292
|
visible: dragging,
|
|
@@ -17249,7 +17423,8 @@ const Slider = (p2) => {
|
|
|
17249
17423
|
dragLockRef.current -= 1;
|
|
17250
17424
|
}, 100);
|
|
17251
17425
|
}
|
|
17252
|
-
}
|
|
17426
|
+
},
|
|
17427
|
+
"aria-label": props["aria-label"]
|
|
17253
17428
|
});
|
|
17254
17429
|
};
|
|
17255
17430
|
return withNativeProps(props, React$1.createElement("div", {
|
|
@@ -17300,6 +17475,9 @@ const Stepper = (p2) => {
|
|
|
17300
17475
|
min,
|
|
17301
17476
|
inputReadOnly
|
|
17302
17477
|
} = props;
|
|
17478
|
+
const {
|
|
17479
|
+
locale
|
|
17480
|
+
} = useConfig();
|
|
17303
17481
|
const [value, setValue] = usePropsValue(props);
|
|
17304
17482
|
const [inputValue, setInputValue] = useState(() => convertValueToText(value, props.digits));
|
|
17305
17483
|
function setValueWithCheck(v) {
|
|
@@ -17371,7 +17549,8 @@ const Stepper = (p2) => {
|
|
|
17371
17549
|
disabled: minusDisabled(),
|
|
17372
17550
|
fill: "none",
|
|
17373
17551
|
shape: "rectangular",
|
|
17374
|
-
color: "primary"
|
|
17552
|
+
color: "primary",
|
|
17553
|
+
"aria-label": locale.Stepper.decrease
|
|
17375
17554
|
}, React$1.createElement(MinusOutline, null)), React$1.createElement("div", {
|
|
17376
17555
|
className: `${classPrefix$d}-middle`
|
|
17377
17556
|
}, React$1.createElement(Input, {
|
|
@@ -17391,14 +17570,19 @@ const Stepper = (p2) => {
|
|
|
17391
17570
|
setHasFocus(false);
|
|
17392
17571
|
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e2);
|
|
17393
17572
|
},
|
|
17394
|
-
readOnly: inputReadOnly
|
|
17573
|
+
readOnly: inputReadOnly,
|
|
17574
|
+
role: "spinbutton",
|
|
17575
|
+
"aria-valuenow": Number(inputValue),
|
|
17576
|
+
"aria-valuemax": max,
|
|
17577
|
+
"aria-valuemin": min
|
|
17395
17578
|
})), React$1.createElement(Button, {
|
|
17396
17579
|
className: `${classPrefix$d}-plus`,
|
|
17397
17580
|
onClick: handlePlus,
|
|
17398
17581
|
disabled: plusDisabled(),
|
|
17399
17582
|
fill: "none",
|
|
17400
17583
|
shape: "rectangular",
|
|
17401
|
-
color: "primary"
|
|
17584
|
+
color: "primary",
|
|
17585
|
+
"aria-label": locale.Stepper.increase
|
|
17402
17586
|
}, React$1.createElement(AddOutline, null))));
|
|
17403
17587
|
};
|
|
17404
17588
|
function convertValueToText(value, digits) {
|
|
@@ -17415,7 +17599,7 @@ function convertTextToValue(text) {
|
|
|
17415
17599
|
return null;
|
|
17416
17600
|
return parseFloat(text);
|
|
17417
17601
|
}
|
|
17418
|
-
var steps = /* @__PURE__ */ (() => ".adm-step {\n --line-to-next-color: #e5e5e5;\n --icon-color: #e5e5e5;\n}\n.adm-step .adm-step-indicator {\n position: relative;\n}\n.adm-step .adm-step-indicator::after {\n content: '';\n position: absolute;\n z-index: 0;\n background-color: var(--line-to-next-color);\n}\n.adm-step .adm-step-indicator .adm-step-icon-container {\n position: absolute;\n z-index: 1;\n background: var(--adm-color-
|
|
17602
|
+
var steps = /* @__PURE__ */ (() => ".adm-step {\n --line-to-next-color: #e5e5e5;\n --icon-color: #e5e5e5;\n}\n.adm-step .adm-step-indicator {\n position: relative;\n}\n.adm-step .adm-step-indicator::after {\n content: '';\n position: absolute;\n z-index: 0;\n background-color: var(--line-to-next-color);\n}\n.adm-step .adm-step-indicator .adm-step-icon-container {\n position: absolute;\n z-index: 1;\n background: var(--adm-color-background);\n color: var(--icon-color);\n}\n.adm-step .adm-step-indicator .adm-step-icon-container > .antd-mobile-icon {\n display: block;\n}\n.adm-step:last-child .adm-step-indicator::after {\n display: none;\n}\n.adm-step-status-finish {\n --line-to-next-color: var(--adm-color-primary);\n}\n.adm-step-status-wait {\n --icon-color: #e5e5e5;\n}\n.adm-step-status-wait .adm-step-title {\n color: var(--adm-color-weak);\n}\n.adm-step-status-process {\n --icon-color: var(--adm-color-primary);\n}\n.adm-step-status-process .adm-step-title {\n color: var(--adm-color-primary);\n}\n.adm-step-status-finish {\n --icon-color: var(--adm-color-primary);\n}\n.adm-step-status-error {\n --icon-color: var(--adm-color-danger);\n}\n.adm-step-status-error .adm-step-title {\n color: var(--adm-color-danger);\n}\n.adm-steps {\n --title-font-size: var(--adm-font-size-main);\n --description-font-size: var(--adm-font-size-4);\n --indicator-margin-right: 0;\n --icon-size: 18px;\n width: 100%;\n box-sizing: border-box;\n}\n.adm-steps-horizontal {\n display: flex;\n justify-content: space-around;\n padding: 8px 0;\n}\n.adm-steps-horizontal .adm-step {\n flex: 1;\n}\n.adm-steps-horizontal .adm-step .adm-step-indicator {\n width: 100%;\n height: 24px;\n}\n.adm-steps-horizontal .adm-step .adm-step-indicator::after {\n left: 50%;\n top: 50%;\n height: 1px;\n transform: translateY(-50%);\n width: 100%;\n}\n.adm-steps-horizontal .adm-step .adm-step-indicator .adm-step-icon-container {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.adm-steps-horizontal .adm-step-content {\n text-align: center;\n font-size: var(--description-font-size);\n padding: 2px 8px 0;\n}\n.adm-steps-horizontal .adm-step-content .adm-step-title {\n font-size: var(--title-font-size);\n}\n.adm-steps-horizontal .adm-step-content .adm-step-description {\n margin-top: 4px;\n color: var(--adm-color-weak);\n}\n.adm-steps-vertical {\n padding: 8px 16px;\n}\n.adm-steps-vertical .adm-step {\n display: flex;\n align-items: stretch;\n}\n.adm-steps-vertical .adm-step .adm-step-indicator {\n flex: none;\n width: 24px;\n margin-right: var(--indicator-margin-right);\n}\n.adm-steps-vertical .adm-step .adm-step-indicator::after {\n left: 50%;\n top: calc(var(--title-font-size) * 1.5 / 2);\n width: 1px;\n transform: translateX(-50%);\n height: 100%;\n}\n.adm-steps-vertical .adm-step .adm-step-indicator .adm-step-icon-container {\n top: calc(var(--title-font-size) * 1.5 / 2);\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.adm-steps-vertical .adm-step:last-child .adm-step-content {\n padding-bottom: 0;\n}\n.adm-steps-vertical .adm-step .adm-step-content {\n flex: auto;\n padding-bottom: 24px;\n}\n.adm-steps-vertical .adm-step .adm-step-content .adm-step-title {\n font-size: var(--title-font-size);\n line-height: 1.5;\n}\n.adm-steps-vertical .adm-step .adm-step-content .adm-step-description {\n padding-top: 4px;\n font-size: var(--description-font-size);\n color: var(--adm-color-weak);\n}\n.adm-step-icon-container {\n font-size: var(--icon-size);\n}\n.adm-step-icon-dot {\n display: block;\n width: 8px;\n height: 8px;\n background: currentColor;\n border-radius: 4px;\n}\n")();
|
|
17419
17603
|
const classPrefix$c = `adm-step`;
|
|
17420
17604
|
const Step = (props) => {
|
|
17421
17605
|
const {
|
|
@@ -17949,6 +18133,9 @@ const Switch = (p2) => {
|
|
|
17949
18133
|
const props = mergeProps(defaultProps$8, p2);
|
|
17950
18134
|
const disabled = props.disabled || props.loading || false;
|
|
17951
18135
|
const [changing, setChanging] = useState(false);
|
|
18136
|
+
const {
|
|
18137
|
+
locale
|
|
18138
|
+
} = useConfig();
|
|
17952
18139
|
const [checked, setChecked] = usePropsValue({
|
|
17953
18140
|
value: props.checked,
|
|
17954
18141
|
defaultValue: props.defaultChecked,
|
|
@@ -17980,7 +18167,11 @@ const Switch = (p2) => {
|
|
|
17980
18167
|
className: classNames(classPrefix$8, {
|
|
17981
18168
|
[`${classPrefix$8}-checked`]: checked,
|
|
17982
18169
|
[`${classPrefix$8}-disabled`]: disabled || changing
|
|
17983
|
-
})
|
|
18170
|
+
}),
|
|
18171
|
+
role: "switch",
|
|
18172
|
+
"aria-label": locale.Switch.name,
|
|
18173
|
+
"aria-checked": checked,
|
|
18174
|
+
"aria-disabled": disabled
|
|
17984
18175
|
}, React$1.createElement("div", {
|
|
17985
18176
|
className: `${classPrefix$8}-checkbox`
|
|
17986
18177
|
}, React$1.createElement("div", {
|
|
@@ -18135,6 +18326,9 @@ const TextArea = forwardRef((p2, ref) => {
|
|
|
18135
18326
|
blur: () => {
|
|
18136
18327
|
var _a;
|
|
18137
18328
|
(_a = nativeTextAreaRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
18329
|
+
},
|
|
18330
|
+
get nativeElement() {
|
|
18331
|
+
return nativeTextAreaRef.current;
|
|
18138
18332
|
}
|
|
18139
18333
|
}));
|
|
18140
18334
|
useIsomorphicLayoutEffect(() => {
|
|
@@ -18276,79 +18470,41 @@ const InternalToast = (p2) => {
|
|
|
18276
18470
|
className: `${classPrefix$4}-icon`
|
|
18277
18471
|
}, iconElement), React$1.createElement(AutoCenter, null, content))));
|
|
18278
18472
|
};
|
|
18279
|
-
|
|
18280
|
-
|
|
18281
|
-
const unmountResult = unmount$1(container);
|
|
18282
|
-
if (unmountResult && container.parentNode) {
|
|
18283
|
-
container.parentNode.removeChild(container);
|
|
18284
|
-
}
|
|
18285
|
-
}
|
|
18473
|
+
let currentHandler = null;
|
|
18474
|
+
let currentTimeout = null;
|
|
18286
18475
|
const defaultProps$3 = {
|
|
18287
18476
|
duration: 2e3,
|
|
18288
18477
|
position: "center",
|
|
18289
18478
|
maskClickable: true
|
|
18290
18479
|
};
|
|
18480
|
+
const ToastInner = (props) => React$1.createElement(InternalToast, Object.assign({}, props));
|
|
18291
18481
|
function show(p2) {
|
|
18292
18482
|
const props = mergeProps(defaultProps$3, typeof p2 === "string" ? {
|
|
18293
18483
|
content: p2
|
|
18294
18484
|
} : p2);
|
|
18295
|
-
|
|
18296
|
-
|
|
18297
|
-
|
|
18298
|
-
} = props;
|
|
18299
|
-
const container = document.createElement("div");
|
|
18300
|
-
const bodyContainer = resolveContainer(getContainer);
|
|
18301
|
-
bodyContainer.appendChild(container);
|
|
18302
|
-
clear();
|
|
18303
|
-
containers.push(container);
|
|
18304
|
-
const TempToast = forwardRef((_, ref2) => {
|
|
18305
|
-
const [visible, setVisible] = useState(true);
|
|
18306
|
-
useEffect(() => {
|
|
18307
|
-
return () => {
|
|
18308
|
-
var _a;
|
|
18309
|
-
(_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
18310
|
-
};
|
|
18311
|
-
}, []);
|
|
18312
|
-
useEffect(() => {
|
|
18313
|
-
if (props.duration === 0) {
|
|
18314
|
-
return;
|
|
18315
|
-
}
|
|
18316
|
-
timer = window.setTimeout(() => {
|
|
18317
|
-
setVisible(false);
|
|
18318
|
-
}, props.duration);
|
|
18319
|
-
return () => {
|
|
18320
|
-
window.clearTimeout(timer);
|
|
18321
|
-
};
|
|
18322
|
-
}, []);
|
|
18323
|
-
useImperativeHandle(ref2, () => ({
|
|
18324
|
-
close: () => setVisible(false)
|
|
18325
|
-
}));
|
|
18326
|
-
return React$1.createElement(InternalToast, Object.assign({}, props, {
|
|
18327
|
-
getContainer: () => container,
|
|
18328
|
-
visible,
|
|
18329
|
-
afterClose: () => {
|
|
18330
|
-
unmount(container);
|
|
18331
|
-
}
|
|
18332
|
-
}));
|
|
18333
|
-
});
|
|
18334
|
-
const ref = createRef();
|
|
18335
|
-
render(React$1.createElement(TempToast, {
|
|
18336
|
-
ref
|
|
18337
|
-
}), container);
|
|
18338
|
-
return {
|
|
18339
|
-
close: () => {
|
|
18340
|
-
var _a;
|
|
18341
|
-
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
18485
|
+
const element = React$1.createElement(ToastInner, Object.assign({}, props, {
|
|
18486
|
+
onClose: () => {
|
|
18487
|
+
currentHandler = null;
|
|
18342
18488
|
}
|
|
18343
|
-
};
|
|
18489
|
+
}));
|
|
18490
|
+
if (currentHandler) {
|
|
18491
|
+
currentHandler.replace(element);
|
|
18492
|
+
} else {
|
|
18493
|
+
currentHandler = renderImperatively(element);
|
|
18494
|
+
}
|
|
18495
|
+
if (currentTimeout) {
|
|
18496
|
+
window.clearTimeout(currentTimeout);
|
|
18497
|
+
}
|
|
18498
|
+
if (props.duration !== 0) {
|
|
18499
|
+
currentTimeout = window.setTimeout(() => {
|
|
18500
|
+
clear();
|
|
18501
|
+
}, props.duration);
|
|
18502
|
+
}
|
|
18503
|
+
return currentHandler;
|
|
18344
18504
|
}
|
|
18345
18505
|
function clear() {
|
|
18346
|
-
|
|
18347
|
-
|
|
18348
|
-
if (!container)
|
|
18349
|
-
break;
|
|
18350
|
-
unmount(container);
|
|
18351
|
-
}
|
|
18506
|
+
currentHandler === null || currentHandler === void 0 ? void 0 : currentHandler.close();
|
|
18507
|
+
currentHandler = null;
|
|
18352
18508
|
}
|
|
18353
18509
|
function config(val) {
|
|
18354
18510
|
if (val.duration !== void 0) {
|
|
@@ -18852,12 +19008,12 @@ const WaterMark = (p2) => {
|
|
|
18852
19008
|
const img = new Image();
|
|
18853
19009
|
img.crossOrigin = "anonymous";
|
|
18854
19010
|
img.referrerPolicy = "no-referrer";
|
|
18855
|
-
img.src = image2;
|
|
18856
19011
|
img.onload = () => {
|
|
18857
19012
|
ctx.drawImage(img, -imageWidth * ratio / 2, -imageHeight * ratio / 2, imageWidth * ratio, imageHeight * ratio);
|
|
18858
19013
|
ctx.restore();
|
|
18859
19014
|
setBase64Url(canvas.toDataURL());
|
|
18860
19015
|
};
|
|
19016
|
+
img.src = image2;
|
|
18861
19017
|
} else if (content) {
|
|
18862
19018
|
ctx.textBaseline = "middle";
|
|
18863
19019
|
ctx.textAlign = "center";
|
|
@@ -18871,7 +19027,7 @@ const WaterMark = (p2) => {
|
|
|
18871
19027
|
setBase64Url(canvas.toDataURL());
|
|
18872
19028
|
}
|
|
18873
19029
|
} else {
|
|
18874
|
-
throw new Error("
|
|
19030
|
+
throw new Error("Canvas is not supported in the current environment");
|
|
18875
19031
|
}
|
|
18876
19032
|
}, [gapX, gapY, rotate, fontStyle, fontWeight, width, height, fontFamily, fontColor, image2, content, fontSize]);
|
|
18877
19033
|
return withNativeProps(props, React$1.createElement("div", {
|
|
@@ -18885,4 +19041,4 @@ const WaterMark = (p2) => {
|
|
|
18885
19041
|
}
|
|
18886
19042
|
}));
|
|
18887
19043
|
};
|
|
18888
|
-
export { index$
|
|
19044
|
+
export { index$i as ActionSheet, AutoCenter, Avatar, Badge, Button, Calendar, index$h as CapsuleTabs, Card, index$g as CascadePicker, CascadePickerView, index$f as Cascader, CascaderView, CenterPopup, CheckList, Checkbox, index$e as Collapse, ConfigProvider, index$d as DatePicker, DatePickerView, index$c as Dialog, Divider, DotLoading, index$b as Dropdown, Ellipsis, Empty, ErrorBlock, FloatingBubble, FloatingPanel, index$9 as Form, Grid, Image$1 as Image, ImageUploader, ImageViewer, index$8 as IndexBar, InfiniteScroll, Input, index$7 as JumboTabs, List, DotLoading as Loading, Mask, index$6 as Modal, NavBar, NoticeBar, NumberKeyboard, PageIndicator, PasscodeInput, Picker, PickerView, Popover, Popup, ProgressBar, ProgressCircle, PullToRefresh, index$5 as Radio, Rate, Result, SafeArea, ScrollMask, SearchBar, Selector, index$4 as SideBar, Skeleton, Slider, Space, SpinLoading, Stepper, index$3 as Steps, SwipeAction, index$2 as Swiper, Switch, index$1 as TabBar, Tabs, Tag, TextArea, Toast, index as TreeSelect, VirtualInput, WaterMark, createErrorBlock, reduceMotion, restoreMotion, setDefaultConfig };
|