antd-mobile 5.31.1 → 5.32.1
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/bundle/antd-mobile.cjs.development.js +665 -553
- package/2x/bundle/antd-mobile.cjs.js +9 -9
- package/2x/bundle/antd-mobile.es.development.js +666 -554
- package/2x/bundle/antd-mobile.es.js +5659 -5580
- package/2x/bundle/antd-mobile.umd.development.js +665 -553
- package/2x/bundle/antd-mobile.umd.js +9 -9
- package/2x/bundle/style.css +16 -15
- package/2x/cjs/components/action-sheet/action-sheet.css +1 -1
- package/2x/cjs/components/button/button.css +2 -2
- package/2x/cjs/components/calendar/calendar.js +5 -1
- package/2x/cjs/components/calendar/convert.js +1 -6
- package/2x/cjs/components/capsule-tabs/capsule-tabs.js +2 -4
- package/2x/cjs/components/cascader/cascader.d.ts +2 -0
- package/2x/cjs/components/cascader/index.d.ts +1 -0
- package/2x/cjs/components/center-popup/center-popup.js +6 -5
- package/2x/cjs/components/checkbox/checkbox.d.ts +2 -0
- package/2x/cjs/components/checkbox/checkbox.js +1 -0
- package/2x/cjs/components/checkbox/index.d.ts +1 -0
- package/2x/cjs/components/collapse/collapse.js +28 -13
- package/2x/cjs/components/date-picker/date-picker-date-utils.js +24 -36
- package/2x/cjs/components/date-picker/date-picker-week-utils.js +12 -18
- package/2x/cjs/components/date-picker-view/date-picker-view.d.ts +7 -5
- package/2x/cjs/components/date-picker-view/date-picker-view.js +8 -2
- package/2x/cjs/components/dropdown/dropdown.js +1 -1
- package/2x/cjs/components/ellipsis/ellipsis.js +4 -4
- package/2x/cjs/components/error-block/create-error-block.js +4 -4
- package/2x/cjs/components/error-block/error-block.css +1 -1
- package/2x/cjs/components/floating-panel/floating-panel.js +8 -7
- package/2x/cjs/components/footer/footer.js +17 -21
- package/2x/cjs/components/form/form-item.d.ts +1 -1
- package/2x/cjs/components/form/form-item.js +6 -9
- package/2x/cjs/components/form/form.css +1 -1
- package/2x/cjs/components/form/index.css +1 -1
- package/2x/cjs/components/image-uploader/image-uploader.css +1 -1
- package/2x/cjs/components/image-uploader/image-uploader.js +1 -3
- package/2x/cjs/components/input/input.d.ts +2 -8
- package/2x/cjs/components/input/input.js +5 -1
- package/2x/cjs/components/jumbo-tabs/jumbo-tabs.js +1 -1
- package/2x/cjs/components/modal/modal.js +11 -13
- package/2x/cjs/components/notice-bar/notice-bar.css +2 -2
- package/2x/cjs/components/number-keyboard/number-keyboard.css +2 -2
- package/2x/cjs/components/picker-view/wheel.js +61 -14
- package/2x/cjs/components/popover/popover-menu.css +2 -2
- package/2x/cjs/components/popover/popover.js +5 -7
- package/2x/cjs/components/popup/popup.js +3 -3
- package/2x/cjs/components/progress-bar/progress-bar.css +1 -1
- package/2x/cjs/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/2x/cjs/components/radio/radio.d.ts +1 -0
- package/2x/cjs/components/radio/radio.js +1 -0
- package/2x/cjs/components/rate/rate.d.ts +1 -1
- package/2x/cjs/components/rate/star.d.ts +1 -1
- package/2x/cjs/components/result/result.js +2 -2
- package/2x/cjs/components/safe-area/safe-area.d.ts +1 -1
- package/2x/cjs/components/safe-area/safe-area.js +1 -1
- package/2x/cjs/components/side-bar/side-bar.d.ts +1 -2
- package/2x/cjs/components/side-bar/side-bar.js +4 -2
- package/2x/cjs/components/skeleton/skeleton.d.ts +1 -1
- package/2x/cjs/components/stepper/stepper.js +1 -5
- package/2x/cjs/components/steps/steps.js +5 -5
- package/2x/cjs/components/swipe-action/swipe-action.d.ts +4 -3
- package/2x/cjs/components/tab-bar/tab-bar.d.ts +1 -2
- package/2x/cjs/components/tab-bar/tab-bar.js +4 -2
- package/2x/cjs/components/tabs/tabs.js +1 -1
- package/2x/cjs/components/tag/tag.js +1 -1
- package/2x/cjs/components/text-area/text-area.css +1 -0
- package/2x/cjs/components/text-area/text-area.js +11 -2
- package/2x/cjs/components/toast/toast.css +2 -2
- package/2x/cjs/components/tree-select/multiple.js +2 -6
- package/2x/cjs/components/virtual-input/virtual-input.js +1 -1
- package/2x/cjs/components/water-mark/water-mark.js +1 -1
- package/2x/cjs/locales/base.d.ts +1 -1
- package/2x/cjs/locales/base.js +1 -1
- package/2x/cjs/locales/da-DK.d.ts +1 -1
- package/2x/cjs/locales/da-DK.js +1 -1
- package/2x/cjs/locales/en-US.d.ts +1 -1
- package/2x/cjs/locales/es-ES.d.ts +1 -1
- package/2x/cjs/locales/es-ES.js +1 -1
- package/2x/cjs/locales/fa-IR.d.ts +1 -1
- package/2x/cjs/locales/fa-IR.js +1 -1
- package/2x/cjs/locales/fr-FR.d.ts +1 -1
- package/2x/cjs/locales/fr-FR.js +1 -1
- package/2x/cjs/locales/id-ID.d.ts +1 -1
- package/2x/cjs/locales/id-ID.js +1 -1
- package/2x/cjs/locales/it-IT.d.ts +1 -1
- package/2x/cjs/locales/it-IT.js +1 -1
- package/2x/cjs/locales/ja-JP.d.ts +1 -1
- package/2x/cjs/locales/ja-JP.js +1 -1
- package/2x/cjs/locales/kk-KZ.d.ts +1 -1
- package/2x/cjs/locales/kk-KZ.js +1 -1
- package/2x/cjs/locales/ko-KR.d.ts +1 -1
- package/2x/cjs/locales/ko-KR.js +1 -1
- package/2x/cjs/locales/nb-NO.d.ts +1 -1
- package/2x/cjs/locales/nb-NO.js +1 -1
- package/2x/cjs/locales/nl-NL.d.ts +1 -1
- package/2x/cjs/locales/nl-NL.js +1 -1
- package/2x/cjs/locales/ru-RU.d.ts +134 -0
- package/2x/cjs/locales/ru-RU.js +144 -0
- package/2x/cjs/locales/zh-CN.d.ts +1 -1
- package/2x/cjs/locales/zh-CN.js +1 -1
- package/2x/cjs/locales/zh-HK.d.ts +1 -1
- package/2x/cjs/locales/zh-HK.js +1 -1
- package/2x/cjs/locales/zh-TW.d.ts +1 -1
- package/2x/cjs/locales/zh-TW.js +1 -1
- package/2x/cjs/utils/replace-message.d.ts +1 -0
- package/2x/cjs/utils/replace-message.js +13 -0
- package/2x/cjs/utils/use-lock-scroll.js +6 -2
- package/2x/es/components/action-sheet/action-sheet.css +1 -1
- package/2x/es/components/button/button.css +2 -2
- package/2x/es/components/calendar/calendar.js +5 -1
- package/2x/es/components/calendar/convert.js +1 -6
- package/2x/es/components/capsule-tabs/capsule-tabs.js +3 -5
- package/2x/es/components/cascader/cascader.d.ts +2 -0
- package/2x/es/components/cascader/index.d.ts +1 -0
- package/2x/es/components/center-popup/center-popup.js +6 -5
- package/2x/es/components/checkbox/checkbox.d.ts +2 -0
- package/2x/es/components/checkbox/checkbox.js +1 -0
- package/2x/es/components/checkbox/index.d.ts +1 -0
- package/2x/es/components/collapse/collapse.js +29 -14
- package/2x/es/components/date-picker/date-picker-date-utils.js +24 -36
- package/2x/es/components/date-picker/date-picker-week-utils.js +12 -18
- package/2x/es/components/date-picker-view/date-picker-view.d.ts +7 -5
- package/2x/es/components/date-picker-view/date-picker-view.js +8 -2
- package/2x/es/components/dropdown/dropdown.js +2 -2
- package/2x/es/components/ellipsis/ellipsis.js +4 -4
- package/2x/es/components/error-block/create-error-block.js +4 -4
- package/2x/es/components/error-block/error-block.css +1 -1
- package/2x/es/components/floating-panel/floating-panel.js +8 -7
- package/2x/es/components/footer/footer.js +17 -21
- package/2x/es/components/form/form-item.d.ts +1 -1
- package/2x/es/components/form/form-item.js +6 -9
- package/2x/es/components/form/form.css +1 -1
- package/2x/es/components/form/index.css +1 -1
- package/2x/es/components/image-uploader/image-uploader.css +1 -1
- package/2x/es/components/image-uploader/image-uploader.js +1 -3
- package/2x/es/components/input/input.d.ts +2 -8
- package/2x/es/components/input/input.js +5 -1
- package/2x/es/components/jumbo-tabs/jumbo-tabs.js +2 -2
- package/2x/es/components/modal/modal.js +11 -13
- package/2x/es/components/notice-bar/notice-bar.css +2 -2
- package/2x/es/components/number-keyboard/number-keyboard.css +2 -2
- package/2x/es/components/picker-view/wheel.js +61 -14
- package/2x/es/components/popover/popover-menu.css +2 -2
- package/2x/es/components/popover/popover.js +5 -7
- package/2x/es/components/popup/popup.js +3 -3
- package/2x/es/components/progress-bar/progress-bar.css +1 -1
- package/2x/es/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/2x/es/components/radio/radio.d.ts +1 -0
- package/2x/es/components/radio/radio.js +1 -0
- package/2x/es/components/rate/rate.d.ts +1 -1
- package/2x/es/components/rate/star.d.ts +1 -1
- package/2x/es/components/result/result.js +2 -2
- package/2x/es/components/safe-area/safe-area.d.ts +1 -1
- package/2x/es/components/safe-area/safe-area.js +1 -1
- package/2x/es/components/side-bar/side-bar.d.ts +1 -2
- package/2x/es/components/side-bar/side-bar.js +2 -2
- package/2x/es/components/skeleton/skeleton.d.ts +1 -1
- package/2x/es/components/stepper/stepper.js +1 -5
- package/2x/es/components/steps/steps.js +5 -5
- package/2x/es/components/swipe-action/swipe-action.d.ts +4 -3
- package/2x/es/components/tab-bar/tab-bar.d.ts +1 -2
- package/2x/es/components/tab-bar/tab-bar.js +2 -2
- package/2x/es/components/tabs/tabs.js +2 -2
- package/2x/es/components/tag/tag.js +1 -1
- package/2x/es/components/text-area/text-area.css +1 -0
- package/2x/es/components/text-area/text-area.js +11 -2
- package/2x/es/components/toast/toast.css +2 -2
- package/2x/es/components/tree-select/multiple.js +2 -6
- package/2x/es/components/virtual-input/virtual-input.js +1 -1
- package/2x/es/components/water-mark/water-mark.js +1 -1
- package/2x/es/locales/base.d.ts +1 -1
- package/2x/es/locales/base.js +1 -1
- package/2x/es/locales/da-DK.d.ts +1 -1
- package/2x/es/locales/da-DK.js +1 -1
- package/2x/es/locales/en-US.d.ts +1 -1
- package/2x/es/locales/es-ES.d.ts +1 -1
- package/2x/es/locales/es-ES.js +1 -1
- package/2x/es/locales/fa-IR.d.ts +1 -1
- package/2x/es/locales/fa-IR.js +1 -1
- package/2x/es/locales/fr-FR.d.ts +1 -1
- package/2x/es/locales/fr-FR.js +1 -1
- package/2x/es/locales/id-ID.d.ts +1 -1
- package/2x/es/locales/id-ID.js +1 -1
- package/2x/es/locales/it-IT.d.ts +1 -1
- package/2x/es/locales/it-IT.js +1 -1
- package/2x/es/locales/ja-JP.d.ts +1 -1
- package/2x/es/locales/ja-JP.js +1 -1
- package/2x/es/locales/kk-KZ.d.ts +1 -1
- package/2x/es/locales/kk-KZ.js +1 -1
- package/2x/es/locales/ko-KR.d.ts +1 -1
- package/2x/es/locales/ko-KR.js +1 -1
- package/2x/es/locales/nb-NO.d.ts +1 -1
- package/2x/es/locales/nb-NO.js +1 -1
- package/2x/es/locales/nl-NL.d.ts +1 -1
- package/2x/es/locales/nl-NL.js +1 -1
- package/2x/es/locales/ru-RU.d.ts +134 -0
- package/2x/es/locales/ru-RU.js +137 -0
- package/2x/es/locales/zh-CN.d.ts +1 -1
- package/2x/es/locales/zh-CN.js +1 -1
- package/2x/es/locales/zh-HK.d.ts +1 -1
- package/2x/es/locales/zh-HK.js +1 -1
- package/2x/es/locales/zh-TW.d.ts +1 -1
- package/2x/es/locales/zh-TW.js +1 -1
- package/2x/es/utils/replace-message.d.ts +1 -0
- package/2x/es/utils/replace-message.js +7 -0
- package/2x/es/utils/use-lock-scroll.js +6 -2
- package/2x/package.json +2 -2
- package/bundle/antd-mobile.cjs.development.js +665 -553
- package/bundle/antd-mobile.cjs.js +9 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +666 -554
- package/bundle/antd-mobile.es.js +5659 -5580
- package/bundle/antd-mobile.umd.development.js +665 -553
- package/bundle/antd-mobile.umd.js +9 -9
- package/bundle/style.css +1 -1
- package/cjs/components/action-sheet/action-sheet.css +1 -1
- package/cjs/components/button/button.css +2 -2
- package/cjs/components/calendar/calendar.js +5 -1
- package/cjs/components/calendar/convert.js +1 -6
- package/cjs/components/capsule-tabs/capsule-tabs.js +2 -4
- package/cjs/components/cascader/cascader.d.ts +2 -0
- package/cjs/components/cascader/index.d.ts +1 -0
- package/cjs/components/center-popup/center-popup.js +6 -5
- package/cjs/components/checkbox/checkbox.d.ts +2 -0
- package/cjs/components/checkbox/checkbox.js +1 -0
- package/cjs/components/checkbox/index.d.ts +1 -0
- package/cjs/components/collapse/collapse.js +28 -13
- package/cjs/components/date-picker/date-picker-date-utils.js +24 -36
- package/cjs/components/date-picker/date-picker-week-utils.js +12 -18
- package/cjs/components/date-picker-view/date-picker-view.d.ts +7 -5
- package/cjs/components/date-picker-view/date-picker-view.js +8 -2
- package/cjs/components/dropdown/dropdown.js +1 -1
- package/cjs/components/ellipsis/ellipsis.js +4 -4
- package/cjs/components/error-block/create-error-block.js +4 -4
- package/cjs/components/error-block/error-block.css +1 -1
- package/cjs/components/floating-panel/floating-panel.js +8 -7
- package/cjs/components/footer/footer.js +17 -21
- package/cjs/components/form/form-item.d.ts +1 -1
- package/cjs/components/form/form-item.js +6 -9
- package/cjs/components/form/form.css +1 -1
- package/cjs/components/form/index.css +1 -1
- package/cjs/components/image-uploader/image-uploader.css +1 -1
- package/cjs/components/image-uploader/image-uploader.js +1 -3
- package/cjs/components/input/input.d.ts +2 -8
- package/cjs/components/input/input.js +5 -1
- package/cjs/components/jumbo-tabs/jumbo-tabs.js +1 -1
- package/cjs/components/modal/modal.js +11 -13
- package/cjs/components/notice-bar/notice-bar.css +2 -2
- package/cjs/components/number-keyboard/number-keyboard.css +2 -2
- package/cjs/components/picker-view/wheel.js +61 -14
- package/cjs/components/popover/popover-menu.css +2 -2
- package/cjs/components/popover/popover.js +5 -7
- package/cjs/components/popup/popup.js +3 -3
- package/cjs/components/progress-bar/progress-bar.css +1 -1
- package/cjs/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/cjs/components/radio/radio.d.ts +1 -0
- package/cjs/components/radio/radio.js +1 -0
- package/cjs/components/rate/rate.d.ts +1 -1
- package/cjs/components/rate/star.d.ts +1 -1
- package/cjs/components/result/result.js +2 -2
- package/cjs/components/safe-area/safe-area.d.ts +1 -1
- package/cjs/components/safe-area/safe-area.js +1 -1
- package/cjs/components/side-bar/side-bar.d.ts +1 -2
- package/cjs/components/side-bar/side-bar.js +4 -2
- package/cjs/components/skeleton/skeleton.d.ts +1 -1
- package/cjs/components/stepper/stepper.js +1 -5
- package/cjs/components/steps/steps.js +5 -5
- package/cjs/components/swipe-action/swipe-action.d.ts +4 -3
- package/cjs/components/tab-bar/tab-bar.d.ts +1 -2
- package/cjs/components/tab-bar/tab-bar.js +4 -2
- package/cjs/components/tabs/tabs.js +1 -1
- package/cjs/components/tag/tag.js +1 -1
- package/cjs/components/text-area/text-area.css +1 -0
- package/cjs/components/text-area/text-area.js +11 -2
- package/cjs/components/toast/toast.css +2 -2
- package/cjs/components/tree-select/multiple.js +2 -6
- package/cjs/components/virtual-input/virtual-input.js +1 -1
- package/cjs/components/water-mark/water-mark.js +1 -1
- package/cjs/locales/base.d.ts +1 -1
- package/cjs/locales/base.js +1 -1
- package/cjs/locales/da-DK.d.ts +1 -1
- package/cjs/locales/da-DK.js +1 -1
- package/cjs/locales/en-US.d.ts +1 -1
- package/cjs/locales/es-ES.d.ts +1 -1
- package/cjs/locales/es-ES.js +1 -1
- package/cjs/locales/fa-IR.d.ts +1 -1
- package/cjs/locales/fa-IR.js +1 -1
- package/cjs/locales/fr-FR.d.ts +1 -1
- package/cjs/locales/fr-FR.js +1 -1
- package/cjs/locales/id-ID.d.ts +1 -1
- package/cjs/locales/id-ID.js +1 -1
- package/cjs/locales/it-IT.d.ts +1 -1
- package/cjs/locales/it-IT.js +1 -1
- package/cjs/locales/ja-JP.d.ts +1 -1
- package/cjs/locales/ja-JP.js +1 -1
- package/cjs/locales/kk-KZ.d.ts +1 -1
- package/cjs/locales/kk-KZ.js +1 -1
- package/cjs/locales/ko-KR.d.ts +1 -1
- package/cjs/locales/ko-KR.js +1 -1
- package/cjs/locales/nb-NO.d.ts +1 -1
- package/cjs/locales/nb-NO.js +1 -1
- package/cjs/locales/nl-NL.d.ts +1 -1
- package/cjs/locales/nl-NL.js +1 -1
- package/cjs/locales/ru-RU.d.ts +134 -0
- package/cjs/locales/ru-RU.js +144 -0
- package/cjs/locales/zh-CN.d.ts +1 -1
- package/cjs/locales/zh-CN.js +1 -1
- package/cjs/locales/zh-HK.d.ts +1 -1
- package/cjs/locales/zh-HK.js +1 -1
- package/cjs/locales/zh-TW.d.ts +1 -1
- package/cjs/locales/zh-TW.js +1 -1
- package/cjs/utils/replace-message.d.ts +1 -0
- package/cjs/utils/replace-message.js +13 -0
- package/cjs/utils/use-lock-scroll.js +6 -2
- package/es/components/action-sheet/action-sheet.css +1 -1
- package/es/components/button/button.css +2 -2
- package/es/components/calendar/calendar.js +5 -1
- package/es/components/calendar/convert.js +1 -6
- package/es/components/capsule-tabs/capsule-tabs.js +3 -5
- package/es/components/cascader/cascader.d.ts +2 -0
- package/es/components/cascader/index.d.ts +1 -0
- package/es/components/center-popup/center-popup.js +6 -5
- package/es/components/checkbox/checkbox.d.ts +2 -0
- package/es/components/checkbox/checkbox.js +1 -0
- package/es/components/checkbox/index.d.ts +1 -0
- package/es/components/collapse/collapse.js +29 -14
- package/es/components/date-picker/date-picker-date-utils.js +24 -36
- package/es/components/date-picker/date-picker-week-utils.js +12 -18
- package/es/components/date-picker-view/date-picker-view.d.ts +7 -5
- package/es/components/date-picker-view/date-picker-view.js +8 -2
- package/es/components/dropdown/dropdown.js +2 -2
- package/es/components/ellipsis/ellipsis.js +4 -4
- package/es/components/error-block/create-error-block.js +4 -4
- package/es/components/error-block/error-block.css +1 -1
- package/es/components/floating-panel/floating-panel.js +8 -7
- package/es/components/footer/footer.js +17 -21
- package/es/components/form/form-item.d.ts +1 -1
- package/es/components/form/form-item.js +6 -9
- package/es/components/form/form.css +1 -1
- package/es/components/form/index.css +1 -1
- package/es/components/image-uploader/image-uploader.css +1 -1
- package/es/components/image-uploader/image-uploader.js +1 -3
- package/es/components/input/input.d.ts +2 -8
- package/es/components/input/input.js +5 -1
- package/es/components/jumbo-tabs/jumbo-tabs.js +2 -2
- package/es/components/modal/modal.js +11 -13
- package/es/components/notice-bar/notice-bar.css +2 -2
- package/es/components/number-keyboard/number-keyboard.css +2 -2
- package/es/components/picker-view/wheel.js +61 -14
- package/es/components/popover/popover-menu.css +2 -2
- package/es/components/popover/popover.js +5 -7
- package/es/components/popup/popup.js +3 -3
- package/es/components/progress-bar/progress-bar.css +1 -1
- package/es/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/es/components/radio/radio.d.ts +1 -0
- package/es/components/radio/radio.js +1 -0
- package/es/components/rate/rate.d.ts +1 -1
- package/es/components/rate/star.d.ts +1 -1
- package/es/components/result/result.js +2 -2
- package/es/components/safe-area/safe-area.d.ts +1 -1
- package/es/components/safe-area/safe-area.js +1 -1
- package/es/components/side-bar/side-bar.d.ts +1 -2
- package/es/components/side-bar/side-bar.js +2 -2
- package/es/components/skeleton/skeleton.d.ts +1 -1
- package/es/components/stepper/stepper.js +1 -5
- package/es/components/steps/steps.js +5 -5
- package/es/components/swipe-action/swipe-action.d.ts +4 -3
- package/es/components/tab-bar/tab-bar.d.ts +1 -2
- package/es/components/tab-bar/tab-bar.js +2 -2
- package/es/components/tabs/tabs.js +2 -2
- package/es/components/tag/tag.js +1 -1
- package/es/components/text-area/text-area.css +1 -0
- package/es/components/text-area/text-area.js +11 -2
- package/es/components/toast/toast.css +2 -2
- package/es/components/tree-select/multiple.js +2 -6
- package/es/components/virtual-input/virtual-input.js +1 -1
- package/es/components/water-mark/water-mark.js +1 -1
- package/es/locales/base.d.ts +1 -1
- package/es/locales/base.js +1 -1
- package/es/locales/da-DK.d.ts +1 -1
- package/es/locales/da-DK.js +1 -1
- package/es/locales/en-US.d.ts +1 -1
- package/es/locales/es-ES.d.ts +1 -1
- package/es/locales/es-ES.js +1 -1
- package/es/locales/fa-IR.d.ts +1 -1
- package/es/locales/fa-IR.js +1 -1
- package/es/locales/fr-FR.d.ts +1 -1
- package/es/locales/fr-FR.js +1 -1
- package/es/locales/id-ID.d.ts +1 -1
- package/es/locales/id-ID.js +1 -1
- package/es/locales/it-IT.d.ts +1 -1
- package/es/locales/it-IT.js +1 -1
- package/es/locales/ja-JP.d.ts +1 -1
- package/es/locales/ja-JP.js +1 -1
- package/es/locales/kk-KZ.d.ts +1 -1
- package/es/locales/kk-KZ.js +1 -1
- package/es/locales/ko-KR.d.ts +1 -1
- package/es/locales/ko-KR.js +1 -1
- package/es/locales/nb-NO.d.ts +1 -1
- package/es/locales/nb-NO.js +1 -1
- package/es/locales/nl-NL.d.ts +1 -1
- package/es/locales/nl-NL.js +1 -1
- package/es/locales/ru-RU.d.ts +134 -0
- package/es/locales/ru-RU.js +137 -0
- package/es/locales/zh-CN.d.ts +1 -1
- package/es/locales/zh-CN.js +1 -1
- package/es/locales/zh-HK.d.ts +1 -1
- package/es/locales/zh-HK.js +1 -1
- package/es/locales/zh-TW.d.ts +1 -1
- package/es/locales/zh-TW.js +1 -1
- package/es/utils/replace-message.d.ts +1 -0
- package/es/utils/replace-message.js +7 -0
- package/es/utils/use-lock-scroll.js +6 -2
- package/package.json +2 -2
- package/umd/antd-mobile.js +1 -1
package/2x/bundle/style.css
CHANGED
|
@@ -128,7 +128,7 @@ div.adm-px-tester {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
.adm-action-sheet-button-item:active {
|
|
131
|
-
background-color:
|
|
131
|
+
background-color: var(--adm-color-border);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
.adm-action-sheet-button-item-disabled {
|
|
@@ -411,8 +411,8 @@ div.adm-px-tester {
|
|
|
411
411
|
transform: translate(calc(var(--border-width) * -1),calc(var(--border-width) * -1));
|
|
412
412
|
width: 100%;
|
|
413
413
|
height: 100%;
|
|
414
|
-
background-color:
|
|
415
|
-
border: var(--border-width) var(--border-style)
|
|
414
|
+
background-color: var(--adm-color-text-dark-solid);
|
|
415
|
+
border: var(--border-width) var(--border-style) var(--adm-color-text-dark-solid);
|
|
416
416
|
border-radius: var(--border-radius);
|
|
417
417
|
opacity: 0;
|
|
418
418
|
content: " ";
|
|
@@ -1766,7 +1766,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
1766
1766
|
|
|
1767
1767
|
.adm-error-block-description {
|
|
1768
1768
|
font-size: var(--adm-font-size-4);
|
|
1769
|
-
color:
|
|
1769
|
+
color: var(--adm-color-weak);
|
|
1770
1770
|
line-height: 1.4;
|
|
1771
1771
|
margin-top: 24px;
|
|
1772
1772
|
}
|
|
@@ -1946,7 +1946,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
1946
1946
|
|
|
1947
1947
|
.adm-form-list-operation {
|
|
1948
1948
|
text-align: center;
|
|
1949
|
-
color:
|
|
1949
|
+
color: var(--adm-color-primary);
|
|
1950
1950
|
}
|
|
1951
1951
|
|
|
1952
1952
|
.adm-form-item+.adm-form-item {
|
|
@@ -2113,7 +2113,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
2113
2113
|
}
|
|
2114
2114
|
|
|
2115
2115
|
.adm-popover-menu {
|
|
2116
|
-
--border-color:
|
|
2116
|
+
--border-color: var(--adm-color-border);
|
|
2117
2117
|
}
|
|
2118
2118
|
|
|
2119
2119
|
.adm-popover-menu.adm-popover {
|
|
@@ -2172,7 +2172,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
2172
2172
|
}
|
|
2173
2173
|
|
|
2174
2174
|
.adm-popover.adm-popover-dark.adm-popover-menu {
|
|
2175
|
-
--border-color:
|
|
2175
|
+
--border-color: var(--adm-color-text);
|
|
2176
2176
|
--background: rgba(0, 0, 0, .9);
|
|
2177
2177
|
}
|
|
2178
2178
|
|
|
@@ -2451,7 +2451,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
2451
2451
|
}
|
|
2452
2452
|
|
|
2453
2453
|
.adm-image-uploader-upload-button-wrap .adm-image-uploader-upload-button-icon {
|
|
2454
|
-
color:
|
|
2454
|
+
color: var(--adm-color-weak);
|
|
2455
2455
|
font-size: 64px;
|
|
2456
2456
|
}
|
|
2457
2457
|
|
|
@@ -2929,7 +2929,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
2929
2929
|
|
|
2930
2930
|
.adm-notice-bar {
|
|
2931
2931
|
--background-color: #ababab;
|
|
2932
|
-
--border-color:
|
|
2932
|
+
--border-color: var(--adm-color-weak);
|
|
2933
2933
|
--text-color: var(--adm-color-text-light-solid);
|
|
2934
2934
|
--font-size: var(--adm-font-size-7);
|
|
2935
2935
|
--icon-font-size: var(--adm-font-size-10);
|
|
@@ -2967,7 +2967,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
2967
2967
|
.adm-notice-bar.adm-notice-bar-info {
|
|
2968
2968
|
--background-color: #d0e4ff;
|
|
2969
2969
|
--border-color: #bcd8ff;
|
|
2970
|
-
--text-color:
|
|
2970
|
+
--text-color: var(--adm-color-primary);
|
|
2971
2971
|
}
|
|
2972
2972
|
|
|
2973
2973
|
.adm-notice-bar .adm-notice-bar-left {
|
|
@@ -3112,9 +3112,9 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
3112
3112
|
left: 50%;
|
|
3113
3113
|
width: 100%;
|
|
3114
3114
|
height: 100%;
|
|
3115
|
-
background-color:
|
|
3115
|
+
background-color: var(--adm-color-text-dark-solid);
|
|
3116
3116
|
border: inherit;
|
|
3117
|
-
border-color:
|
|
3117
|
+
border-color: var(--adm-color-text-dark-solid);
|
|
3118
3118
|
border-radius: inherit;
|
|
3119
3119
|
transform: translate(-50%,-50%);
|
|
3120
3120
|
opacity: 0;
|
|
@@ -3386,7 +3386,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
3386
3386
|
flex: none;
|
|
3387
3387
|
width: calc(var(--text-width) + 16px);
|
|
3388
3388
|
padding-left: 16px;
|
|
3389
|
-
color:
|
|
3389
|
+
color: var(--adm-color-weak);
|
|
3390
3390
|
}
|
|
3391
3391
|
|
|
3392
3392
|
.adm-progress-bar-rounded .adm-progress-bar-trail,
|
|
@@ -4697,6 +4697,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
4697
4697
|
--disabled-color: var(--adm-color-weak);
|
|
4698
4698
|
--text-align: left;
|
|
4699
4699
|
--count-text-align: right;
|
|
4700
|
+
position: relative;
|
|
4700
4701
|
width: 100%;
|
|
4701
4702
|
max-width: 100%;
|
|
4702
4703
|
max-height: 100%;
|
|
@@ -4783,14 +4784,14 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
4783
4784
|
left: 0;
|
|
4784
4785
|
width: 100%;
|
|
4785
4786
|
height: 100%;
|
|
4787
|
+
text-align: center;
|
|
4786
4788
|
}
|
|
4787
4789
|
|
|
4788
4790
|
.adm-toast-mask .adm-toast-main {
|
|
4789
4791
|
display: inline-block;
|
|
4790
4792
|
position: relative;
|
|
4791
4793
|
top: 50%;
|
|
4792
|
-
|
|
4793
|
-
transform: translate(-50%,-50%);
|
|
4794
|
+
transform: translateY(-50%);
|
|
4794
4795
|
width: auto;
|
|
4795
4796
|
max-width: 408px;
|
|
4796
4797
|
max-height: 70%;
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
transform: translate(calc(var(--border-width) * -1), calc(var(--border-width) * -1));
|
|
37
37
|
width: 100%;
|
|
38
38
|
height: 100%;
|
|
39
|
-
background-color:
|
|
40
|
-
border: var(--border-width) var(--border-style)
|
|
39
|
+
background-color: var(--adm-color-text-dark-solid);
|
|
40
|
+
border: var(--border-width) var(--border-style) var(--adm-color-text-dark-solid);
|
|
41
41
|
border-radius: var(--border-radius);
|
|
42
42
|
opacity: 0;
|
|
43
43
|
content: ' ';
|
|
@@ -15,6 +15,7 @@ var _configProvider = require("../config-provider");
|
|
|
15
15
|
var _isoWeek = _interopRequireDefault(require("dayjs/plugin/isoWeek"));
|
|
16
16
|
var _ahooks = require("ahooks");
|
|
17
17
|
var _usePropsValue = require("../../utils/use-props-value");
|
|
18
|
+
var _replaceMessage = require("../../utils/replace-message");
|
|
18
19
|
var _convert = require("./convert");
|
|
19
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -106,7 +107,10 @@ const Calendar = (0, _react.forwardRef)((p, ref) => {
|
|
|
106
107
|
}
|
|
107
108
|
}, props.prevMonthButton), _react.default.createElement("div", {
|
|
108
109
|
className: `${classPrefix}-title`
|
|
109
|
-
},
|
|
110
|
+
}, (0, _replaceMessage.replaceMessage)(locale.Calendar.yearAndMonth, {
|
|
111
|
+
year: current.year().toString(),
|
|
112
|
+
month: (current.month() + 1).toString()
|
|
113
|
+
})), _react.default.createElement("a", {
|
|
110
114
|
className: (0, _classnames.default)(`${classPrefix}-arrow-button`, `${classPrefix}-arrow-button-right`, `${classPrefix}-arrow-button-right-month`),
|
|
111
115
|
onClick: () => {
|
|
112
116
|
handlePageChange('add', 1, 'month');
|
|
@@ -8,12 +8,7 @@ exports.convertValueToRange = convertValueToRange;
|
|
|
8
8
|
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function convertValueToRange(selectionMode, value) {
|
|
11
|
-
if (selectionMode === undefined)
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
if (value === null) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
11
|
+
if (selectionMode === undefined || value === null) return null;
|
|
17
12
|
if (Array.isArray(value)) {
|
|
18
13
|
return value;
|
|
19
14
|
}
|
|
@@ -18,9 +18,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
18
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
19
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
20
|
const classPrefix = `adm-capsule-tabs`;
|
|
21
|
-
const CapsuleTab = () =>
|
|
22
|
-
return null;
|
|
23
|
-
};
|
|
21
|
+
const CapsuleTab = () => null;
|
|
24
22
|
exports.CapsuleTab = CapsuleTab;
|
|
25
23
|
const CapsuleTabs = props => {
|
|
26
24
|
var _a;
|
|
@@ -30,7 +28,7 @@ const CapsuleTabs = props => {
|
|
|
30
28
|
let firstActiveKey = null;
|
|
31
29
|
const panes = [];
|
|
32
30
|
(0, _traverseReactNode.traverseReactNode)(props.children, (child, index) => {
|
|
33
|
-
if (!_react.
|
|
31
|
+
if (!(0, _react.isValidElement)(child)) return;
|
|
34
32
|
const key = child.key;
|
|
35
33
|
if (typeof key !== 'string') return;
|
|
36
34
|
if (index === 0) {
|
|
@@ -21,6 +21,7 @@ export declare type CascaderProps = {
|
|
|
21
21
|
title?: ReactNode;
|
|
22
22
|
confirmText?: ReactNode;
|
|
23
23
|
cancelText?: ReactNode;
|
|
24
|
+
loading?: boolean;
|
|
24
25
|
children?: (items: (CascaderOption | null)[], actions: CascaderActions) => ReactNode;
|
|
25
26
|
onTabsChange?: (index: number) => void;
|
|
26
27
|
activeIcon?: ReactNode;
|
|
@@ -38,6 +39,7 @@ export declare const Cascader: React.ForwardRefExoticComponent<{
|
|
|
38
39
|
title?: ReactNode;
|
|
39
40
|
confirmText?: ReactNode;
|
|
40
41
|
cancelText?: ReactNode;
|
|
42
|
+
loading?: boolean | undefined;
|
|
41
43
|
children?: ((items: (CascaderOption | null)[], actions: CascaderActions) => ReactNode) | undefined;
|
|
42
44
|
onTabsChange?: ((index: number) => void) | undefined;
|
|
43
45
|
activeIcon?: ReactNode;
|
|
@@ -15,6 +15,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
|
|
|
15
15
|
title?: import("react").ReactNode;
|
|
16
16
|
confirmText?: import("react").ReactNode;
|
|
17
17
|
cancelText?: import("react").ReactNode;
|
|
18
|
+
loading?: boolean | undefined;
|
|
18
19
|
children?: ((items: (import("../cascader-view").CascaderOption | null)[], actions: import("./cascader").CascaderActions) => import("react").ReactNode) | undefined;
|
|
19
20
|
onTabsChange?: ((index: number) => void) | undefined;
|
|
20
21
|
activeIcon?: import("react").ReactNode;
|
|
@@ -21,6 +21,7 @@ var _popupBaseProps = require("../popup/popup-base-props");
|
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
23
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
|
+
const classPrefix = 'adm-center-popup';
|
|
24
25
|
const defaultProps = Object.assign(Object.assign({}, _popupBaseProps.defaultPopupBaseProps), {
|
|
25
26
|
getContainer: null
|
|
26
27
|
});
|
|
@@ -57,11 +58,11 @@ const CenterPopup = p => {
|
|
|
57
58
|
(0, _useLockScroll.useLockScroll)(ref, props.disableBodyScroll && active);
|
|
58
59
|
const maskVisible = (0, _useInnerVisible.useInnerVisible)(active && props.visible);
|
|
59
60
|
const body = _react.default.createElement("div", {
|
|
60
|
-
className: (0, _classnames.default)(
|
|
61
|
+
className: (0, _classnames.default)(`${classPrefix}-body`, props.bodyClassName),
|
|
61
62
|
style: props.bodyStyle
|
|
62
63
|
}, props.children);
|
|
63
64
|
const node = (0, _withStopPropagation.withStopPropagation)(props.stopPropagation, (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
64
|
-
className:
|
|
65
|
+
className: classPrefix,
|
|
65
66
|
style: {
|
|
66
67
|
display: active ? undefined : 'none',
|
|
67
68
|
pointerEvents: active ? undefined : 'none'
|
|
@@ -78,18 +79,18 @@ const CenterPopup = p => {
|
|
|
78
79
|
}
|
|
79
80
|
},
|
|
80
81
|
style: props.maskStyle,
|
|
81
|
-
className: (0, _classnames.default)(
|
|
82
|
+
className: (0, _classnames.default)(`${classPrefix}-mask`, props.maskClassName),
|
|
82
83
|
disableBodyScroll: false,
|
|
83
84
|
stopPropagation: props.stopPropagation
|
|
84
85
|
}), _react.default.createElement("div", {
|
|
85
|
-
className:
|
|
86
|
+
className: `${classPrefix}-wrap`,
|
|
86
87
|
role: props.role,
|
|
87
88
|
"aria-label": props['aria-label']
|
|
88
89
|
}, _react.default.createElement(_web.animated.div, {
|
|
89
90
|
style: style,
|
|
90
91
|
ref: ref
|
|
91
92
|
}, props.showCloseButton && _react.default.createElement("a", {
|
|
92
|
-
className: (0, _classnames.default)(
|
|
93
|
+
className: (0, _classnames.default)(`${classPrefix}-close`, 'adm-plain-anchor'),
|
|
93
94
|
onClick: () => {
|
|
94
95
|
var _a;
|
|
95
96
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
@@ -12,6 +12,7 @@ export declare type CheckboxProps = {
|
|
|
12
12
|
id?: string;
|
|
13
13
|
icon?: (checked: boolean, indeterminate: boolean) => React.ReactNode;
|
|
14
14
|
children?: React.ReactNode;
|
|
15
|
+
onClick?: (event: React.MouseEvent<HTMLLabelElement, MouseEvent>) => void;
|
|
15
16
|
} & NativeProps<'--icon-size' | '--font-size' | '--gap'>;
|
|
16
17
|
export declare type CheckboxRef = {
|
|
17
18
|
check: () => void;
|
|
@@ -29,6 +30,7 @@ export declare const Checkbox: React.ForwardRefExoticComponent<{
|
|
|
29
30
|
id?: string | undefined;
|
|
30
31
|
icon?: ((checked: boolean, indeterminate: boolean) => React.ReactNode) | undefined;
|
|
31
32
|
children?: React.ReactNode;
|
|
33
|
+
onClick?: ((event: React.MouseEvent<HTMLLabelElement, MouseEvent>) => void) | undefined;
|
|
32
34
|
} & {
|
|
33
35
|
className?: string | undefined;
|
|
34
36
|
style?: (React.CSSProperties & Partial<Record<"--font-size" | "--icon-size" | "--gap", string>>) | undefined;
|
|
@@ -78,6 +78,7 @@ const Checkbox = (0, _react.forwardRef)((p, ref) => {
|
|
|
78
78
|
}, props.indeterminate ? _react.default.createElement(_indeterminateIcon.IndeterminateIcon, null) : checked && _react.default.createElement(_checkIcon.CheckIcon, null));
|
|
79
79
|
};
|
|
80
80
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("label", {
|
|
81
|
+
onClick: props.onClick,
|
|
81
82
|
className: (0, _classnames.default)(classPrefix, {
|
|
82
83
|
[`${classPrefix}-checked`]: checked && !props.indeterminate,
|
|
83
84
|
[`${classPrefix}-indeterminate`]: props.indeterminate,
|
|
@@ -12,6 +12,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
|
|
|
12
12
|
id?: string | undefined;
|
|
13
13
|
icon?: ((checked: boolean, indeterminate: boolean) => import("react").ReactNode) | undefined;
|
|
14
14
|
children?: import("react").ReactNode;
|
|
15
|
+
onClick?: ((event: import("react").MouseEvent<HTMLLabelElement, MouseEvent>) => void) | undefined;
|
|
15
16
|
} & {
|
|
16
17
|
className?: string | undefined;
|
|
17
18
|
style?: (import("react").CSSProperties & Partial<Record<"--font-size" | "--icon-size" | "--gap", string>>) | undefined;
|
|
@@ -88,26 +88,41 @@ const CollapsePanelContent = props => {
|
|
|
88
88
|
}, _react.default.createElement(_list.default.Item, null, shouldRender && props.children)));
|
|
89
89
|
};
|
|
90
90
|
const Collapse = props => {
|
|
91
|
-
var _a;
|
|
92
91
|
const panels = [];
|
|
93
92
|
(0, _traverseReactNode.traverseReactNode)(props.children, child => {
|
|
94
|
-
if (!_react.
|
|
93
|
+
if (!(0, _react.isValidElement)(child)) return;
|
|
95
94
|
const key = child.key;
|
|
96
95
|
if (typeof key !== 'string') return;
|
|
97
96
|
panels.push(child);
|
|
98
97
|
});
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
98
|
+
const handlePropsValue = () => {
|
|
99
|
+
var _a;
|
|
100
|
+
if (!props.accordion) {
|
|
101
|
+
return {
|
|
102
|
+
value: props.activeKey,
|
|
103
|
+
defaultValue: (_a = props.defaultActiveKey) !== null && _a !== void 0 ? _a : [],
|
|
104
|
+
onChange: props.onChange
|
|
105
|
+
};
|
|
105
106
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
const initValue = {
|
|
108
|
+
value: [],
|
|
109
|
+
defaultValue: [],
|
|
110
|
+
onChange: v => {
|
|
111
|
+
var _a, _b;
|
|
112
|
+
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, (_b = v[0]) !== null && _b !== void 0 ? _b : null);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
if (props.activeKey === undefined) {
|
|
116
|
+
initValue.value = undefined;
|
|
117
|
+
} else if (props.activeKey !== null) {
|
|
118
|
+
initValue.value = [props.activeKey];
|
|
119
|
+
}
|
|
120
|
+
if (![null, undefined].includes(props.defaultActiveKey)) {
|
|
121
|
+
initValue.defaultValue = [props.defaultActiveKey];
|
|
122
|
+
}
|
|
123
|
+
return initValue;
|
|
124
|
+
};
|
|
125
|
+
const [activeKey, setActiveKey] = (0, _usePropsValue.usePropsValue)(handlePropsValue());
|
|
111
126
|
const activeKeyList = activeKey === null ? [] : Array.isArray(activeKey) ? activeKey : [activeKey];
|
|
112
127
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
113
128
|
className: classPrefix
|
|
@@ -75,67 +75,55 @@ function generateDatePickerColumns(selected, min, max, precision, renderLabel, f
|
|
|
75
75
|
const lower = minYear;
|
|
76
76
|
const upper = maxYear;
|
|
77
77
|
const years = generateColumn(lower, upper, 'year');
|
|
78
|
-
ret.push(years.map(v => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
};
|
|
83
|
-
}));
|
|
78
|
+
ret.push(years.map(v => ({
|
|
79
|
+
label: renderLabel('year', v),
|
|
80
|
+
value: v.toString()
|
|
81
|
+
})));
|
|
84
82
|
}
|
|
85
83
|
if (rank >= precisionRankRecord.month) {
|
|
86
84
|
const lower = isInMinYear ? minMonth : 1;
|
|
87
85
|
const upper = isInMaxYear ? maxMonth : 12;
|
|
88
86
|
const months = generateColumn(lower, upper, 'month');
|
|
89
|
-
ret.push(months.map(v => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
};
|
|
94
|
-
}));
|
|
87
|
+
ret.push(months.map(v => ({
|
|
88
|
+
label: renderLabel('month', v),
|
|
89
|
+
value: v.toString()
|
|
90
|
+
})));
|
|
95
91
|
}
|
|
96
92
|
if (rank >= precisionRankRecord.day) {
|
|
97
93
|
const lower = isInMinMonth ? minDay : 1;
|
|
98
94
|
const upper = isInMaxMonth ? maxDay : firstDayInSelectedMonth.daysInMonth();
|
|
99
95
|
const days = generateColumn(lower, upper, 'day');
|
|
100
|
-
ret.push(days.map(v => {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
};
|
|
105
|
-
}));
|
|
96
|
+
ret.push(days.map(v => ({
|
|
97
|
+
label: renderLabel('day', v),
|
|
98
|
+
value: v.toString()
|
|
99
|
+
})));
|
|
106
100
|
}
|
|
107
101
|
if (rank >= precisionRankRecord.hour) {
|
|
108
102
|
const lower = isInMinDay ? minHour : 0;
|
|
109
103
|
const upper = isInMaxDay ? maxHour : 23;
|
|
110
104
|
const hours = generateColumn(lower, upper, 'hour');
|
|
111
|
-
ret.push(hours.map(v => {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
};
|
|
116
|
-
}));
|
|
105
|
+
ret.push(hours.map(v => ({
|
|
106
|
+
label: renderLabel('hour', v),
|
|
107
|
+
value: v.toString()
|
|
108
|
+
})));
|
|
117
109
|
}
|
|
118
110
|
if (rank >= precisionRankRecord.minute) {
|
|
119
111
|
const lower = isInMinHour ? minMinute : 0;
|
|
120
112
|
const upper = isInMaxHour ? maxMinute : 59;
|
|
121
113
|
const minutes = generateColumn(lower, upper, 'minute');
|
|
122
|
-
ret.push(minutes.map(v => {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
};
|
|
127
|
-
}));
|
|
114
|
+
ret.push(minutes.map(v => ({
|
|
115
|
+
label: renderLabel('minute', v),
|
|
116
|
+
value: v.toString()
|
|
117
|
+
})));
|
|
128
118
|
}
|
|
129
119
|
if (rank >= precisionRankRecord.second) {
|
|
130
120
|
const lower = isInMinMinute ? minSecond : 0;
|
|
131
121
|
const upper = isInMaxMinute ? maxSecond : 59;
|
|
132
122
|
const seconds = generateColumn(lower, upper, 'second');
|
|
133
|
-
ret.push(seconds.map(v => {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
};
|
|
138
|
-
}));
|
|
123
|
+
ret.push(seconds.map(v => ({
|
|
124
|
+
label: renderLabel('second', v),
|
|
125
|
+
value: v.toString()
|
|
126
|
+
})));
|
|
139
127
|
}
|
|
140
128
|
// Till Now
|
|
141
129
|
if (tillNow) {
|
|
@@ -58,34 +58,28 @@ function generateDatePickerColumns(selected, min, max, precision, renderLabel, f
|
|
|
58
58
|
const lower = minYear;
|
|
59
59
|
const upper = maxYear;
|
|
60
60
|
const years = generateColumn(lower, upper, 'year');
|
|
61
|
-
ret.push(years.map(v => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
}));
|
|
61
|
+
ret.push(years.map(v => ({
|
|
62
|
+
label: renderLabel('year', v),
|
|
63
|
+
value: v.toString()
|
|
64
|
+
})));
|
|
67
65
|
}
|
|
68
66
|
if (rank >= precisionRankRecord.week) {
|
|
69
67
|
const lower = isInMinYear ? minWeek : 1;
|
|
70
68
|
const upper = isInMaxYear ? maxWeek : selectedYearWeeks;
|
|
71
69
|
const weeks = generateColumn(lower, upper, 'week');
|
|
72
|
-
ret.push(weeks.map(v => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
};
|
|
77
|
-
}));
|
|
70
|
+
ret.push(weeks.map(v => ({
|
|
71
|
+
label: renderLabel('week', v),
|
|
72
|
+
value: v.toString()
|
|
73
|
+
})));
|
|
78
74
|
}
|
|
79
75
|
if (rank >= precisionRankRecord['week-day']) {
|
|
80
76
|
const lower = isInMinWeek ? minWeekday : 1;
|
|
81
77
|
const upper = isInMaxWeek ? maxWeekday : 7;
|
|
82
78
|
const weeks = generateColumn(lower, upper, 'week-day');
|
|
83
|
-
ret.push(weeks.map(v => {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
};
|
|
88
|
-
}));
|
|
79
|
+
ret.push(weeks.map(v => ({
|
|
80
|
+
label: renderLabel('week-day', v),
|
|
81
|
+
value: v.toString()
|
|
82
|
+
})));
|
|
89
83
|
}
|
|
90
84
|
return ret;
|
|
91
85
|
}
|
|
@@ -2,15 +2,17 @@ import { FC, ReactNode } from 'react';
|
|
|
2
2
|
import type { PickerViewProps } from '../picker-view';
|
|
3
3
|
import { NativeProps } from '../../utils/native-props';
|
|
4
4
|
import type { Precision, DatePickerFilter } from '../date-picker/date-picker-utils';
|
|
5
|
+
import type { PickerDate } from '../date-picker/util';
|
|
5
6
|
export declare type RenderLabel = (type: Precision | 'now', data: number) => ReactNode;
|
|
6
7
|
export declare type DatePickerViewProps = Pick<PickerViewProps, 'style' | 'mouseWheel' | 'loading' | 'loadingContent'> & {
|
|
7
|
-
value?:
|
|
8
|
-
defaultValue?:
|
|
9
|
-
onChange?: (value:
|
|
10
|
-
min?:
|
|
11
|
-
max?:
|
|
8
|
+
value?: PickerDate;
|
|
9
|
+
defaultValue?: PickerDate;
|
|
10
|
+
onChange?: (value: PickerDate) => void;
|
|
11
|
+
min?: PickerDate;
|
|
12
|
+
max?: PickerDate;
|
|
12
13
|
precision?: Precision;
|
|
13
14
|
renderLabel?: RenderLabel;
|
|
14
15
|
filter?: DatePickerFilter;
|
|
16
|
+
tillNow?: boolean;
|
|
15
17
|
} & NativeProps;
|
|
16
18
|
export declare const DatePickerView: FC<DatePickerViewProps>;
|
|
@@ -11,6 +11,7 @@ var _withDefaultProps = require("../../utils/with-default-props");
|
|
|
11
11
|
var _usePropsValue = require("../../utils/use-props-value");
|
|
12
12
|
var _datePickerUtils = require("../date-picker/date-picker-utils");
|
|
13
13
|
var _useRenderLabel = _interopRequireDefault(require("./useRenderLabel"));
|
|
14
|
+
var _util = require("../date-picker/util");
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -31,7 +32,12 @@ const DatePickerView = p => {
|
|
|
31
32
|
defaultValue: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : null
|
|
32
33
|
});
|
|
33
34
|
const mergedRenderLabel = (0, _useRenderLabel.default)(renderLabel);
|
|
34
|
-
const pickerValue = (0, _react.useMemo)(() =>
|
|
35
|
+
const pickerValue = (0, _react.useMemo)(() => {
|
|
36
|
+
if (value === null || value === void 0 ? void 0 : value.tillNow) {
|
|
37
|
+
return [_util.TILL_NOW, null, null];
|
|
38
|
+
}
|
|
39
|
+
return (0, _datePickerUtils.convertDateToStringArray)(value, props.precision);
|
|
40
|
+
}, [value, props.precision]);
|
|
35
41
|
const onChange = (0, _react.useCallback)(val => {
|
|
36
42
|
var _a;
|
|
37
43
|
const date = (0, _datePickerUtils.convertStringArrayToDate)(val, props.precision);
|
|
@@ -41,7 +47,7 @@ const DatePickerView = p => {
|
|
|
41
47
|
}
|
|
42
48
|
}, [props.onChange, props.precision]);
|
|
43
49
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement(_pickerView.default, {
|
|
44
|
-
columns: selected => (0, _datePickerUtils.generateDatePickerColumns)(selected, props.min, props.max, props.precision, mergedRenderLabel, props.filter),
|
|
50
|
+
columns: selected => (0, _datePickerUtils.generateDatePickerColumns)(selected, props.min, props.max, props.precision, mergedRenderLabel, props.filter, props.tillNow),
|
|
45
51
|
loading: props.loading,
|
|
46
52
|
loadingContent: props.loadingContent,
|
|
47
53
|
value: pickerValue,
|
|
@@ -58,7 +58,7 @@ const Dropdown = (0, _react.forwardRef)((p, ref) => {
|
|
|
58
58
|
let popupForceRender = false;
|
|
59
59
|
const items = [];
|
|
60
60
|
const navs = _react.default.Children.map(props.children, child => {
|
|
61
|
-
if (_react.
|
|
61
|
+
if ((0, _react.isValidElement)(child)) {
|
|
62
62
|
const childProps = Object.assign(Object.assign({}, child.props), {
|
|
63
63
|
onClick: () => {
|
|
64
64
|
changeActive(child.key);
|
|
@@ -127,18 +127,18 @@ const Ellipsis = p => {
|
|
|
127
127
|
(0, _ahooks.useIsomorphicLayoutEffect)(() => {
|
|
128
128
|
calcEllipsised();
|
|
129
129
|
}, [props.content, props.direction, props.rows, props.expandText, props.collapseText]);
|
|
130
|
-
const expandActionElement =
|
|
130
|
+
const expandActionElement = !!props.expandText && (0, _withStopPropagation.withStopPropagation)(props.stopPropagationForActionButtons, _react.default.createElement("a", {
|
|
131
131
|
ref: expandElRef,
|
|
132
132
|
onClick: () => {
|
|
133
133
|
setExpanded(true);
|
|
134
134
|
}
|
|
135
|
-
}, props.expandText))
|
|
136
|
-
const collapseActionElement =
|
|
135
|
+
}, props.expandText));
|
|
136
|
+
const collapseActionElement = !!props.collapseText && (0, _withStopPropagation.withStopPropagation)(props.stopPropagationForActionButtons, _react.default.createElement("a", {
|
|
137
137
|
ref: collapseElRef,
|
|
138
138
|
onClick: () => {
|
|
139
139
|
setExpanded(false);
|
|
140
140
|
}
|
|
141
|
-
}, props.collapseText))
|
|
141
|
+
}, props.collapseText));
|
|
142
142
|
const renderContent = () => {
|
|
143
143
|
if (!exceeded) return props.content;
|
|
144
144
|
if (expanded) return _react.default.createElement(_react.default.Fragment, null, props.content, collapseActionElement);
|
|
@@ -22,7 +22,7 @@ function createErrorBlock(imageRecord) {
|
|
|
22
22
|
locale
|
|
23
23
|
} = (0, _configProvider.useConfig)();
|
|
24
24
|
const contentPack = locale.ErrorBlock[props.status];
|
|
25
|
-
const
|
|
25
|
+
const desc = 'description' in props ? props.description : contentPack.description;
|
|
26
26
|
const title = 'title' in props ? props.title : contentPack.title;
|
|
27
27
|
const image = (_a = props.image) !== null && _a !== void 0 ? _a : imageRecord[props.status];
|
|
28
28
|
const imageNode = typeof image === 'string' ? _react.default.createElement("img", {
|
|
@@ -37,11 +37,11 @@ function createErrorBlock(imageRecord) {
|
|
|
37
37
|
className: `${classPrefix}-image`
|
|
38
38
|
}, imageNode), _react.default.createElement("div", {
|
|
39
39
|
className: `${classPrefix}-description`
|
|
40
|
-
}, title && _react.default.createElement("div", {
|
|
40
|
+
}, ![undefined, null].includes(title) && _react.default.createElement("div", {
|
|
41
41
|
className: `${classPrefix}-description-title`
|
|
42
|
-
}, title),
|
|
42
|
+
}, title), ![undefined, null].includes(desc) && _react.default.createElement("div", {
|
|
43
43
|
className: `${classPrefix}-description-subtitle`
|
|
44
|
-
},
|
|
44
|
+
}, desc)), props.children && _react.default.createElement("div", {
|
|
45
45
|
className: `${classPrefix}-content`
|
|
46
46
|
}, props.children)));
|
|
47
47
|
};
|