@kdcloudjs/kdesign 1.7.33-stable.12 → 1.7.33-stable.12-hotfix.2
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/dist/kdesign-complete.less +19 -4
- package/dist/kdesign.css +10 -6
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +8510 -6736
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +2 -2
- package/dist/kdesign.min.js +16 -13
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/formatUtil.js +0 -2
- package/es/_utils/hooks.js +3 -3
- package/es/_utils/resizeObserver.js +7 -10
- package/es/_utils/usePopper.d.ts +1 -1
- package/es/_utils/usePopper.js +42 -42
- package/es/alert/alert.js +4 -5
- package/es/anchor/anchor-link.js +1 -2
- package/es/anchor/anchor.js +24 -24
- package/es/avatar/avatar.js +3 -3
- package/es/badge/badge.js +6 -6
- package/es/base-data/base-data.js +32 -32
- package/es/button/button.js +11 -12
- package/es/button/group.js +6 -6
- package/es/card/card.js +3 -3
- package/es/carousel/carousel.js +6 -6
- package/es/carousel/slidebar.d.ts +2 -2
- package/es/carousel/slidebar.js +3 -4
- package/es/cascader/cascader.js +28 -31
- package/es/cascader/util.js +6 -6
- package/es/checkbox/checkbox.js +13 -13
- package/es/city-picker/city-picker.js +26 -28
- package/es/city-picker/option.js +3 -4
- package/es/collapse/panel.js +10 -15
- package/es/color-picker/color-picker-panel.js +7 -7
- package/es/color-picker/color-picker.js +17 -18
- package/es/color-picker/utils/colorFormat.js +6 -6
- package/es/config-provider/ConfigContext.d.ts +2 -0
- package/es/config-provider/compDefaultProps.d.ts +3 -3
- package/es/config-provider/defaultConfig.d.ts +1 -0
- package/es/config-provider/defaultConfig.js +2 -1
- package/es/date-picker/calendar.d.ts +2 -2
- package/es/date-picker/calendar.js +2 -3
- package/es/date-picker/date-panel.d.ts +1 -1
- package/es/date-picker/date-panel.js +5 -6
- package/es/date-picker/date-picker.js +3 -3
- package/es/date-picker/hooks/use-range-cls.js +1 -2
- package/es/date-picker/panel/date-time/date-time.d.ts +1 -1
- package/es/date-picker/panel/header/header.d.ts +1 -1
- package/es/date-picker/panel/header/header.js +10 -10
- package/es/date-picker/panel/month/month.d.ts +2 -2
- package/es/date-picker/panel/month/month.js +1 -2
- package/es/date-picker/panel/quarter/quarter.d.ts +2 -2
- package/es/date-picker/panel/quarter/quarter.js +1 -2
- package/es/date-picker/panel/time/time-column.d.ts +1 -1
- package/es/date-picker/panel/time/time-column.js +1 -2
- package/es/date-picker/panel/time/time.d.ts +2 -2
- package/es/date-picker/panel/time/time.js +2 -2
- package/es/date-picker/panel/week/week.d.ts +2 -2
- package/es/date-picker/panel/week/week.js +6 -7
- package/es/date-picker/panel/year/year.d.ts +2 -2
- package/es/date-picker/panel/year/year.js +2 -3
- package/es/date-picker/popper.js +1 -2
- package/es/date-picker/range/input-range.js +5 -5
- package/es/date-picker/range-picker.js +6 -6
- package/es/date-picker/single/input-date.js +3 -3
- package/es/date-picker/utils/date-fns.js +0 -1
- package/es/date-picker/utils/get-extra-footer.d.ts +1 -1
- package/es/date-picker/utils/get-ranges.d.ts +2 -2
- package/es/date-picker/utils/get-ranges.js +2 -2
- package/es/drawer/drawer.js +10 -10
- package/es/dropdown/dropdown.js +9 -9
- package/es/dropdown/menu.js +2 -2
- package/es/empty/defaultEmptyImg.d.ts +2 -2
- package/es/empty/empty.js +6 -6
- package/es/empty/illustrationEmptyImg.d.ts +2 -2
- package/es/filter/condition.js +5 -5
- package/es/filter/filter.js +2 -2
- package/es/filter/scheme.js +13 -13
- package/es/form/Field.js +4 -5
- package/es/form/FieldLabel.js +1 -2
- package/es/form/FieldWrapper.js +4 -4
- package/es/form/Form.js +2 -2
- package/es/icon/icon.js +2 -2
- package/es/image/image.js +3 -3
- package/es/image/preview-group.js +3 -3
- package/es/image/preview.js +7 -7
- package/es/image-cropper/image-cropper.js +4 -4
- package/es/image-cropper/operation-bar.js +5 -5
- package/es/input/ClearableLabeledInput.js +8 -9
- package/es/input/TextArea.js +5 -6
- package/es/input/calculateNodeHeight.js +0 -5
- package/es/input/input.js +2 -2
- package/es/input-number/inputNumber.js +4 -4
- package/es/layout/sider.js +6 -6
- package/es/link/link.js +3 -3
- package/es/locale/locale.js +6 -7
- package/es/menu/menu.js +2 -2
- package/es/menu/menuItem.js +2 -2
- package/es/menu/subMenu.js +6 -6
- package/es/message/content.js +1 -1
- package/es/modal/confirm.js +1 -1
- package/es/modal/modal.js +11 -11
- package/es/notification/content.js +3 -3
- package/es/notification/index.js +6 -3
- package/es/notification-base/index.js +1 -1
- package/es/notification-base/notice.js +2 -2
- package/es/pagination/pagination.js +15 -15
- package/es/popconfirm/popconfirm.js +2 -2
- package/es/progress/circle.js +5 -5
- package/es/progress/progress.js +2 -2
- package/es/radio/radio.js +1 -2
- package/es/rate/rate.js +7 -8
- package/es/search/option.js +1 -2
- package/es/search/quick-search.js +9 -10
- package/es/search/search-panel.js +6 -4
- package/es/search/search.js +6 -6
- package/es/select/option.js +3 -4
- package/es/select/select.js +28 -30
- package/es/slider/marks.d.ts +1 -1
- package/es/slider/marks.js +1 -2
- package/es/slider/slider.js +1 -2
- package/es/slider/sliderTooltip.js +1 -2
- package/es/slider/steps.d.ts +1 -1
- package/es/slider/steps.js +1 -2
- package/es/slider/track.d.ts +2 -2
- package/es/slider/track.js +1 -2
- package/es/space/space.js +3 -3
- package/es/spin/spin.js +6 -6
- package/es/split-panel/split-panel.js +7 -7
- package/es/stepper/stepper.js +6 -7
- package/es/steps/Step.js +2 -2
- package/es/steps/Steps.js +2 -2
- package/es/switch/switch.js +4 -4
- package/es/table/table.js +21 -5
- package/es/tabs/arrow-button.js +2 -2
- package/es/tabs/style/index.css +9 -5
- package/es/tabs/style/index.less +19 -4
- package/es/tabs/tab-pane.js +5 -4
- package/es/tabs/tabs.d.ts +2 -0
- package/es/tabs/tabs.js +71 -33
- package/es/tag/tag.js +5 -5
- package/es/timeline/Timeline.js +5 -5
- package/es/timeline/TimelineItem.js +5 -5
- package/es/tooltip/tooltip.js +1 -1
- package/es/transfer/list-item.js +1 -2
- package/es/transfer/list.js +7 -8
- package/es/transfer/operation.d.ts +1 -1
- package/es/transfer/operation.js +2 -2
- package/es/transfer/search.js +2 -2
- package/es/transfer/transfer.js +1 -2
- package/es/tree/tree.js +12 -12
- package/es/tree/treeHooks.js +3 -3
- package/es/tree/treeNode.js +10 -13
- package/es/tree/utils/treeUtils.js +13 -13
- package/es/tree-select/tree-select.js +25 -26
- package/es/typography/base.js +2 -2
- package/es/upload/scan-files.js +3 -3
- package/es/upload/upload.js +36 -36
- package/es/virtual-list/virtual-list.js +5 -6
- package/lib/_utils/KeyCode.js +1 -2
- package/lib/_utils/arrayUtil.js +3 -5
- package/lib/_utils/formatUtil.js +0 -2
- package/lib/_utils/hooks.js +3 -3
- package/lib/_utils/index.js +2 -3
- package/lib/_utils/raf.js +2 -4
- package/lib/_utils/reactNode.js +2 -4
- package/lib/_utils/resizeObserver.js +8 -12
- package/lib/_utils/type.js +3 -5
- package/lib/_utils/usePopper.d.ts +1 -1
- package/lib/_utils/usePopper.js +46 -50
- package/lib/alert/alert.js +8 -13
- package/lib/alert/index.js +1 -2
- package/lib/anchor/anchor-link.js +3 -6
- package/lib/anchor/anchor.js +27 -30
- package/lib/anchor/context.js +2 -4
- package/lib/anchor/index.js +1 -2
- package/lib/avatar/avatar.js +7 -11
- package/lib/avatar/index.js +2 -4
- package/lib/badge/badge.js +10 -14
- package/lib/badge/index.js +2 -4
- package/lib/base-data/base-data.js +34 -36
- package/lib/base-data/index.js +2 -4
- package/lib/base-data/interface.js +1 -2
- package/lib/button/button.js +18 -26
- package/lib/button/group.js +9 -12
- package/lib/button/index.js +1 -2
- package/lib/card/card.js +5 -7
- package/lib/card/index.js +2 -4
- package/lib/carousel/carousel.js +10 -14
- package/lib/carousel/displayList.js +2 -3
- package/lib/carousel/fadeList.js +2 -3
- package/lib/carousel/index.js +2 -4
- package/lib/carousel/slideList.js +2 -3
- package/lib/carousel/slidebar.d.ts +2 -2
- package/lib/carousel/slidebar.js +5 -7
- package/lib/cascader/cascader.js +31 -37
- package/lib/cascader/index.js +2 -4
- package/lib/cascader/util.js +18 -30
- package/lib/checkbox/checkbox.js +15 -17
- package/lib/checkbox/group.js +8 -10
- package/lib/checkbox/index.js +2 -4
- package/lib/city-picker/city-picker.js +28 -32
- package/lib/city-picker/index.js +2 -4
- package/lib/city-picker/interface.js +2 -4
- package/lib/city-picker/option.js +5 -8
- package/lib/collapse/collapse.js +3 -6
- package/lib/collapse/index.js +1 -2
- package/lib/collapse/panel.js +12 -19
- package/lib/color-picker/color-picker-panel.js +9 -11
- package/lib/color-picker/color-picker.js +19 -22
- package/lib/color-picker/constant/colorTypes.js +2 -3
- package/lib/color-picker/constant/defaultColor.js +1 -2
- package/lib/color-picker/constant/systemPresetColor.js +1 -2
- package/lib/color-picker/index.js +2 -4
- package/lib/color-picker/interface.js +2 -4
- package/lib/color-picker/utils/colorFormat.js +13 -19
- package/lib/color-picker/utils/hooks/useOnClickOutside.js +1 -2
- package/lib/config-provider/ConfigContext.d.ts +2 -0
- package/lib/config-provider/ConfigContext.js +1 -2
- package/lib/config-provider/SizeContext.js +2 -4
- package/lib/config-provider/compDefaultProps.d.ts +3 -3
- package/lib/config-provider/compDefaultProps.js +2 -4
- package/lib/config-provider/configProvider.js +2 -4
- package/lib/config-provider/defaultConfig.d.ts +1 -0
- package/lib/config-provider/defaultConfig.js +3 -3
- package/lib/config-provider/index.js +1 -2
- package/lib/date-picker/calendar.d.ts +2 -2
- package/lib/date-picker/calendar.js +4 -7
- package/lib/date-picker/context.js +2 -4
- package/lib/date-picker/date-panel.d.ts +1 -1
- package/lib/date-picker/date-panel.js +7 -10
- package/lib/date-picker/date-picker.js +5 -7
- package/lib/date-picker/hooks/use-range-cls.js +1 -2
- package/lib/date-picker/hooks/use-range-disabled.js +1 -2
- package/lib/date-picker/hooks/use-range-view-dates.js +1 -2
- package/lib/date-picker/hooks/use-text-value-mapping.js +1 -2
- package/lib/date-picker/index.js +1 -2
- package/lib/date-picker/locale/zh_CN.js +1 -2
- package/lib/date-picker/panel/date-time/date-time.d.ts +1 -1
- package/lib/date-picker/panel/date-time/date-time.js +2 -4
- package/lib/date-picker/panel/header/header.d.ts +1 -1
- package/lib/date-picker/panel/header/header.js +12 -14
- package/lib/date-picker/panel/month/month.d.ts +2 -2
- package/lib/date-picker/panel/month/month.js +3 -6
- package/lib/date-picker/panel/quarter/quarter.d.ts +2 -2
- package/lib/date-picker/panel/quarter/quarter.js +3 -6
- package/lib/date-picker/panel/time/time-column.d.ts +1 -1
- package/lib/date-picker/panel/time/time-column.js +10 -12
- package/lib/date-picker/panel/time/time.d.ts +2 -2
- package/lib/date-picker/panel/time/time.js +4 -6
- package/lib/date-picker/panel/week/week.d.ts +2 -2
- package/lib/date-picker/panel/week/week.js +8 -11
- package/lib/date-picker/panel/year/year.d.ts +2 -2
- package/lib/date-picker/panel/year/year.js +4 -7
- package/lib/date-picker/popper.js +3 -6
- package/lib/date-picker/range/input-range.js +7 -9
- package/lib/date-picker/range-picker.js +8 -10
- package/lib/date-picker/single/input-date.js +5 -7
- package/lib/date-picker/utils/date-fns.js +11 -8
- package/lib/date-picker/utils/get-extra-footer.d.ts +1 -1
- package/lib/date-picker/utils/get-extra-footer.js +1 -2
- package/lib/date-picker/utils/get-ranges.d.ts +2 -2
- package/lib/date-picker/utils/get-ranges.js +2 -2
- package/lib/date-picker/utils/index.js +4 -7
- package/lib/drawer/drawer.js +13 -16
- package/lib/drawer/index.js +2 -4
- package/lib/dropdown/dropdown.js +11 -13
- package/lib/dropdown/index.js +2 -4
- package/lib/dropdown/menu.js +5 -8
- package/lib/empty/defaultEmptyImg.d.ts +2 -2
- package/lib/empty/defaultEmptyImg.js +2 -4
- package/lib/empty/empty.js +8 -10
- package/lib/empty/illustrationEmptyImg.d.ts +2 -2
- package/lib/empty/illustrationEmptyImg.js +2 -4
- package/lib/empty/index.js +2 -4
- package/lib/filter/condition.js +7 -9
- package/lib/filter/filter.js +4 -6
- package/lib/filter/index.js +2 -4
- package/lib/filter/scheme.js +15 -17
- package/lib/form/Field.js +7 -11
- package/lib/form/FieldContext.js +1 -2
- package/lib/form/FieldLabel.js +3 -6
- package/lib/form/FieldWrapper.js +6 -8
- package/lib/form/Form.js +4 -6
- package/lib/form/FormContext.js +2 -4
- package/lib/form/hooks/useForceUpdate.js +1 -2
- package/lib/form/hooks/useForm.js +2 -4
- package/lib/form/index.js +2 -4
- package/lib/grid/col.js +2 -4
- package/lib/grid/row.js +3 -6
- package/lib/icon/icon.js +4 -6
- package/lib/icon/index.js +2 -4
- package/lib/icon/interface.js +3 -6
- package/lib/image/image.js +5 -7
- package/lib/image/index.js +2 -4
- package/lib/image/preview-group.js +5 -7
- package/lib/image/preview.js +9 -11
- package/lib/image-cropper/cropper.js +3 -6
- package/lib/image-cropper/image-cropper.js +6 -8
- package/lib/image-cropper/index.js +1 -2
- package/lib/image-cropper/operation-bar.js +7 -9
- package/lib/index.js +1 -2
- package/lib/input/ClearableLabeledInput.js +10 -13
- package/lib/input/TextArea.js +7 -10
- package/lib/input/calculateNodeHeight.js +0 -5
- package/lib/input/index.js +2 -4
- package/lib/input/input.js +6 -10
- package/lib/input-number/index.js +1 -2
- package/lib/input-number/inputNumber.js +6 -8
- package/lib/layout/index.js +2 -4
- package/lib/layout/layout.js +6 -12
- package/lib/layout/sider.js +18 -20
- package/lib/link/index.js +2 -4
- package/lib/link/link.js +6 -9
- package/lib/locale/index.js +2 -4
- package/lib/locale/locale.js +10 -14
- package/lib/locale/zh-CN.js +1 -2
- package/lib/menu/index.js +2 -4
- package/lib/menu/menu.js +4 -6
- package/lib/menu/menuItem.js +5 -8
- package/lib/menu/subMenu.js +7 -8
- package/lib/menu/util.js +8 -16
- package/lib/message/content.js +3 -5
- package/lib/message/index.js +1 -2
- package/lib/modal/confirm.js +1 -1
- package/lib/modal/index.js +2 -4
- package/lib/modal/modal.js +15 -19
- package/lib/notification/content.js +5 -7
- package/lib/notification/index.js +7 -5
- package/lib/notification-base/index.js +2 -3
- package/lib/notification-base/notice.js +5 -8
- package/lib/notification-base/notification.js +2 -4
- package/lib/pagination/index.js +1 -2
- package/lib/pagination/pagination.js +19 -23
- package/lib/popconfirm/index.js +2 -4
- package/lib/popconfirm/popconfirm.js +4 -6
- package/lib/progress/circle.js +6 -7
- package/lib/progress/index.js +1 -2
- package/lib/progress/line.js +1 -2
- package/lib/progress/progress.js +6 -10
- package/lib/progress/utils.js +3 -5
- package/lib/radio/context.js +3 -6
- package/lib/radio/group.js +2 -4
- package/lib/radio/index.js +1 -2
- package/lib/radio/radio-button.js +2 -4
- package/lib/radio/radio.js +3 -6
- package/lib/rate/index.js +1 -2
- package/lib/rate/rate.js +10 -14
- package/lib/search/index.js +1 -2
- package/lib/search/interface.js +3 -6
- package/lib/search/option.js +3 -6
- package/lib/search/quick-search.js +11 -14
- package/lib/search/search-panel.js +8 -8
- package/lib/search/search.js +8 -10
- package/lib/select/index.js +1 -2
- package/lib/select/interface.js +3 -6
- package/lib/select/option.js +5 -8
- package/lib/select/select.js +30 -34
- package/lib/slider/index.js +2 -4
- package/lib/slider/marks.d.ts +1 -1
- package/lib/slider/marks.js +2 -4
- package/lib/slider/slider.js +3 -6
- package/lib/slider/sliderTooltip.js +3 -6
- package/lib/slider/steps.d.ts +1 -1
- package/lib/slider/steps.js +2 -4
- package/lib/slider/track.d.ts +2 -2
- package/lib/slider/track.js +2 -4
- package/lib/space/index.js +2 -4
- package/lib/space/space.js +5 -7
- package/lib/spin/index.js +2 -4
- package/lib/spin/spin.js +9 -12
- package/lib/split-panel/index.js +2 -4
- package/lib/split-panel/split-panel.js +10 -13
- package/lib/split-panel/trigger.js +1 -2
- package/lib/stepper/index.js +2 -4
- package/lib/stepper/stepper.js +9 -13
- package/lib/steps/Step.js +3 -4
- package/lib/steps/Steps.js +4 -6
- package/lib/steps/index.js +1 -2
- package/lib/steps/interface.js +3 -6
- package/lib/switch/index.js +1 -2
- package/lib/switch/switch.js +7 -10
- package/lib/table/feature/autoRowSpan.js +1 -2
- package/lib/table/feature/colGroupExtendable.js +1 -2
- package/lib/table/feature/columnDrag.js +1 -2
- package/lib/table/feature/columnResize.js +1 -2
- package/lib/table/feature/contextMenu.js +1 -2
- package/lib/table/feature/filter.js +1 -2
- package/lib/table/feature/mergeCellHover.js +1 -2
- package/lib/table/feature/rowDetail.js +1 -2
- package/lib/table/feature/rowSelection.js +1 -2
- package/lib/table/feature/sort.js +1 -2
- package/lib/table/feature/treeMode.js +1 -2
- package/lib/table/feature/useFooterDataSource.js +1 -2
- package/lib/table/feature/useRangeSelection.js +1 -2
- package/lib/table/feature/useRowDrag.js +1 -2
- package/lib/table/index.js +1 -2
- package/lib/table/table.js +23 -9
- package/lib/tabs/active-line.js +2 -4
- package/lib/tabs/arrow-button.js +4 -6
- package/lib/tabs/context.js +3 -6
- package/lib/tabs/index.js +1 -2
- package/lib/tabs/style/index.css +9 -5
- package/lib/tabs/style/index.less +19 -4
- package/lib/tabs/tab-pane.js +8 -10
- package/lib/tabs/tabs.d.ts +2 -0
- package/lib/tabs/tabs.js +79 -47
- package/lib/tag/index.js +2 -4
- package/lib/tag/tag.js +10 -15
- package/lib/timeline/Timeline.js +7 -9
- package/lib/timeline/TimelineItem.js +7 -9
- package/lib/timeline/index.js +1 -2
- package/lib/tooltip/index.js +2 -4
- package/lib/tooltip/tooltip.js +3 -5
- package/lib/transfer/index.js +1 -2
- package/lib/transfer/list-body.js +3 -6
- package/lib/transfer/list-item.js +2 -4
- package/lib/transfer/list.js +9 -12
- package/lib/transfer/operation.d.ts +1 -1
- package/lib/transfer/operation.js +3 -4
- package/lib/transfer/search.js +3 -4
- package/lib/transfer/transfer.js +3 -6
- package/lib/tree/index.js +2 -4
- package/lib/tree/tree.js +14 -16
- package/lib/tree/treeHooks.js +12 -20
- package/lib/tree/treeNode.js +12 -17
- package/lib/tree/utils/treeUtils.js +38 -62
- package/lib/tree-select/index.js +2 -4
- package/lib/tree-select/interface.js +3 -6
- package/lib/tree-select/tree-select.js +27 -30
- package/lib/typography/base.js +5 -8
- package/lib/typography/index.js +1 -2
- package/lib/typography/paragraph.js +2 -4
- package/lib/typography/text.js +1 -2
- package/lib/typography/title.js +2 -4
- package/lib/typography/typography.js +2 -4
- package/lib/upload/dragger.js +2 -4
- package/lib/upload/index.js +2 -4
- package/lib/upload/scan-files.js +4 -5
- package/lib/upload/upload.js +38 -40
- package/lib/upload/verify-file.js +2 -3
- package/lib/view-container/context.js +3 -6
- package/lib/view-container/index.js +1 -2
- package/lib/view-container/view-container.js +2 -4
- package/lib/virtual-list/Filler.js +2 -4
- package/lib/virtual-list/index.js +2 -4
- package/lib/virtual-list/utils/itemUtil.js +1 -2
- package/lib/virtual-list/virtual-list.js +7 -10
- package/package.json +7 -5
- package/CHANGELOG.md +0 -1880
|
@@ -53,7 +53,6 @@ export default function calculateNodeHeight(uiTextNode) {
|
|
|
53
53
|
} else if (boxSizing === 'content-box') {
|
|
54
54
|
height = parseFloat(new Big(height).minus(paddingSize).valueOf()); // height -= paddingSize
|
|
55
55
|
}
|
|
56
|
-
|
|
57
56
|
if (minRows !== null || maxRows !== null) {
|
|
58
57
|
hiddenTextarea.value = ' ';
|
|
59
58
|
var bigSingleRowHeight = new Big(hiddenTextarea.scrollHeight).minus(paddingSize);
|
|
@@ -62,20 +61,16 @@ export default function calculateNodeHeight(uiTextNode) {
|
|
|
62
61
|
if (boxSizing === 'border-box') {
|
|
63
62
|
minHeight = parseFloat(new Big(minHeight).plus(paddingSize).plus(borderSize).valueOf()); // minHeight + paddingSize + borderSize
|
|
64
63
|
}
|
|
65
|
-
|
|
66
64
|
height = new Big(minHeight).gt(height) ? minHeight : height; // Math.max(minHeight, height)
|
|
67
65
|
}
|
|
68
|
-
|
|
69
66
|
if (maxRows !== null) {
|
|
70
67
|
maxHeight = parseFloat(bigSingleRowHeight.times(maxRows).valueOf());
|
|
71
68
|
if (boxSizing === 'border-box') {
|
|
72
69
|
maxHeight = parseFloat(new Big(maxHeight).plus(paddingSize).plus(borderSize).valueOf()); // maxHeight + paddingSize + borderSize
|
|
73
70
|
}
|
|
74
|
-
|
|
75
71
|
height = new Big(maxHeight).lt(height) ? maxHeight : height; // Math.min(maxHeight, height)
|
|
76
72
|
}
|
|
77
73
|
}
|
|
78
|
-
|
|
79
74
|
var overflowY = new Big(height).lt(maxHeight) ? 'hidden' : '';
|
|
80
75
|
return {
|
|
81
76
|
height: height,
|
package/es/input/input.js
CHANGED
|
@@ -28,7 +28,7 @@ export function fixControlledValue(value) {
|
|
|
28
28
|
return value;
|
|
29
29
|
}
|
|
30
30
|
var InternalInput = function InternalInput(props, ref) {
|
|
31
|
-
var _context
|
|
31
|
+
var _context;
|
|
32
32
|
var _useContext = useContext(ConfigContext),
|
|
33
33
|
getPrefixCls = _useContext.getPrefixCls,
|
|
34
34
|
prefixCls = _useContext.prefixCls,
|
|
@@ -72,7 +72,7 @@ var InternalInput = function InternalInput(props, ref) {
|
|
|
72
72
|
var inputPrefixCls = getPrefixCls(prefixCls, 'input', customPrefixcls); // 按钮样式前缀
|
|
73
73
|
var addonBefore = others.addonBefore,
|
|
74
74
|
addonAfter = others.addonAfter;
|
|
75
|
-
var inputClasses = classNames(inputPrefixCls, (
|
|
75
|
+
var inputClasses = classNames(inputPrefixCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, _concatInstanceProperty(_context = "".concat(inputPrefixCls, "-size-")).call(_context, size), size), "".concat(inputPrefixCls, "-borderless"), borderType === 'none'), "".concat(inputPrefixCls, "-underline"), borderType === 'underline'), "".concat(inputPrefixCls, "-error"), status === 'error'), "".concat(inputPrefixCls, "-disabled"), disabled), _defineProperty({}, className, className && !hasPrefixSuffix(inputProps) && !addonBefore && !addonAfter));
|
|
76
76
|
var handleFocus = function handleFocus(event) {
|
|
77
77
|
setFocused(true);
|
|
78
78
|
onFocus && onFocus(event);
|
|
@@ -182,8 +182,8 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
|
|
|
182
182
|
resultNumerical = decimalValueLength ? _concatInstanceProperty(_context6 = _concatInstanceProperty(_context7 = "".concat(sign)).call(_context7, integerValue, ".")).call(_context6, decimalValue.substr(0, digitLength - integerValueLength)) : _concatInstanceProperty(_context8 = "".concat(sign)).call(_context8, integerValue);
|
|
183
183
|
}
|
|
184
184
|
} else if (typeof decimalLength === 'number' && typeof digitLength !== 'number') {
|
|
185
|
-
var _context9,
|
|
186
|
-
resultNumerical = decimalValueLength ? _concatInstanceProperty(_context9 = _concatInstanceProperty(
|
|
185
|
+
var _context9, _context0, _context1;
|
|
186
|
+
resultNumerical = decimalValueLength ? _concatInstanceProperty(_context9 = _concatInstanceProperty(_context0 = "".concat(sign)).call(_context0, integerValue, ".")).call(_context9, decimalValue.substr(0, decimalLength)) : _concatInstanceProperty(_context1 = "".concat(sign)).call(_context1, integerValue);
|
|
187
187
|
} else {
|
|
188
188
|
resultNumerical = numerical;
|
|
189
189
|
}
|
|
@@ -213,13 +213,13 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
|
|
|
213
213
|
});
|
|
214
214
|
};
|
|
215
215
|
var handleKeyDown = function handleKeyDown(event) {
|
|
216
|
-
var
|
|
216
|
+
var _context10;
|
|
217
217
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
|
|
218
218
|
if (!stepOption || props.disabled || props.readOnly) {
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
221
|
var keyCode = event.keyCode;
|
|
222
|
-
if (_includesInstanceProperty(
|
|
222
|
+
if (_includesInstanceProperty(_context10 = [38, 40]).call(_context10, keyCode)) {
|
|
223
223
|
event.preventDefault();
|
|
224
224
|
handleStepChang(keyCode === 38 ? 'plus' : 'minus');
|
|
225
225
|
}
|
package/es/layout/sider.js
CHANGED
|
@@ -137,15 +137,15 @@ var Sider = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
137
137
|
return rawWidth.constructor === Number ? "".concat(rawWidth, "px") : String(rawWidth);
|
|
138
138
|
};
|
|
139
139
|
var renderSider = function renderSider() {
|
|
140
|
-
var _context2, _context3
|
|
140
|
+
var _context2, _context3;
|
|
141
141
|
var siderWidth = getWidth(collapsed ? collapsedWidth : width);
|
|
142
|
-
var zeroWidthTrigger = parseFloat(String(collapsedWidth || 0)) === 0 ? /*#__PURE__*/React.createElement("span", {
|
|
142
|
+
var zeroWidthTrigger = parseFloat(String(collapsedWidth || 0)) === 0 ? (/*#__PURE__*/React.createElement("span", {
|
|
143
143
|
onClick: toggle,
|
|
144
144
|
className: classNames("".concat(prefixCls, "-zero-width-trigger"), _concatInstanceProperty(_context2 = "".concat(prefixCls, "-zero-width-trigger-")).call(_context2, reverseArrow ? 'right' : 'left')),
|
|
145
145
|
style: zeroWidthTriggerStyle
|
|
146
146
|
}, trigger || /*#__PURE__*/React.createElement(Icon, {
|
|
147
147
|
type: "project"
|
|
148
|
-
})) : null;
|
|
148
|
+
}))) : null;
|
|
149
149
|
var iconObj = {
|
|
150
150
|
expanded: reverseArrow ? /*#__PURE__*/React.createElement(Icon, {
|
|
151
151
|
type: "foldmenu"
|
|
@@ -160,20 +160,20 @@ var Sider = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
160
160
|
};
|
|
161
161
|
var status = collapsed ? 'collapsed' : 'expanded';
|
|
162
162
|
var defaultTrigger = iconObj[status];
|
|
163
|
-
var triggerDom = trigger !== null ? zeroWidthTrigger || /*#__PURE__*/React.createElement("div", {
|
|
163
|
+
var triggerDom = trigger !== null ? zeroWidthTrigger || (/*#__PURE__*/React.createElement("div", {
|
|
164
164
|
className: "".concat(prefixCls, "-trigger"),
|
|
165
165
|
onClick: toggle,
|
|
166
166
|
style: {
|
|
167
167
|
width: '100%'
|
|
168
168
|
}
|
|
169
|
-
}, trigger || defaultTrigger) : null;
|
|
169
|
+
}, trigger || defaultTrigger)) : null;
|
|
170
170
|
var divStyle = {
|
|
171
171
|
flex: "0 0 ".concat(siderWidth),
|
|
172
172
|
maxWidth: siderWidth,
|
|
173
173
|
minWidth: siderWidth,
|
|
174
174
|
width: siderWidth
|
|
175
175
|
};
|
|
176
|
-
var siderCls = classNames(prefixCls, _concatInstanceProperty(_context3 = "".concat(prefixCls, "-")).call(_context3, theme), (
|
|
176
|
+
var siderCls = classNames(prefixCls, _concatInstanceProperty(_context3 = "".concat(prefixCls, "-")).call(_context3, theme), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-collapsed"), !!collapsed), "".concat(prefixCls, "-has-trigger"), collapsible && trigger !== null && !zeroWidthTrigger), "".concat(prefixCls, "-below"), !!below), "".concat(prefixCls, "-zero-width"), parseFloat(siderWidth) === 0), className);
|
|
177
177
|
var siderProps = _extends(_extends({}, omit(props, ['collapsed', 'collapsible', 'onCollapse', 'onBreakpoint', 'collapsedWidth'])), {
|
|
178
178
|
className: siderCls,
|
|
179
179
|
style: _extends(_extends({}, style), divStyle),
|
package/es/link/link.js
CHANGED
|
@@ -17,7 +17,7 @@ import { getCompProps } from '../_utils';
|
|
|
17
17
|
import { tuple } from '../_utils/type';
|
|
18
18
|
export var LinkSizes = tuple('large', 'middle', 'small');
|
|
19
19
|
var InternalLink = function InternalLink(props, ref) {
|
|
20
|
-
var _context
|
|
20
|
+
var _context;
|
|
21
21
|
var _useContext = useContext(ConfigContext),
|
|
22
22
|
getPrefixCls = _useContext.getPrefixCls,
|
|
23
23
|
prefixCls = _useContext.prefixCls,
|
|
@@ -41,8 +41,8 @@ var InternalLink = function InternalLink(props, ref) {
|
|
|
41
41
|
// ref
|
|
42
42
|
var linkRef = ref || /*#__PURE__*/React.createRef();
|
|
43
43
|
var linkPrefixCls = getPrefixCls(prefixCls, 'link', customPrefixcls); // 按钮样式前缀
|
|
44
|
-
var wrapperClasses = classNames((
|
|
45
|
-
var linkClasses = classNames(className, (
|
|
44
|
+
var wrapperClasses = classNames(_defineProperty(_defineProperty({}, "".concat(linkPrefixCls), true), _concatInstanceProperty(_context = "".concat(linkPrefixCls, "-size-")).call(_context, size), size));
|
|
45
|
+
var linkClasses = classNames(className, _defineProperty(_defineProperty(_defineProperty({}, "".concat(linkPrefixCls, "-text"), true), "".concat(linkPrefixCls, "-underscore"), underscore), "".concat(linkPrefixCls, "-disabled"), disabled));
|
|
46
46
|
var handleClick = function handleClick(e) {
|
|
47
47
|
// 禁用状态 不跳转
|
|
48
48
|
disabled && e.preventDefault();
|
package/es/locale/locale.js
CHANGED
|
@@ -3,9 +3,9 @@ import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
|
3
3
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
4
4
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
5
5
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
6
|
-
function _createForOfIteratorHelper(
|
|
7
|
-
function _unsupportedIterableToArray(
|
|
8
|
-
function _arrayLikeToArray(
|
|
6
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && _getIteratorMethod(r) || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
7
|
+
function _unsupportedIterableToArray(r, a) { if (r) { var _context2; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context2 = {}.toString.call(r)).call(_context2, 8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
8
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
9
9
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
10
10
|
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
|
11
11
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
@@ -24,7 +24,7 @@ var LocaleCache = /*#__PURE__*/function () {
|
|
|
24
24
|
* @param {LocaleDataType | string} localeData 语言数据集合 | 语言类型
|
|
25
25
|
* @returns 设置后的语言对应的语言包
|
|
26
26
|
*/
|
|
27
|
-
_createClass(LocaleCache, [{
|
|
27
|
+
return _createClass(LocaleCache, [{
|
|
28
28
|
key: "setLocalesData",
|
|
29
29
|
value: function setLocalesData(locale, localeData) {
|
|
30
30
|
if (!(localeData || this.localesData[locale])) {
|
|
@@ -62,7 +62,6 @@ var LocaleCache = /*#__PURE__*/function () {
|
|
|
62
62
|
return this.localesData;
|
|
63
63
|
}
|
|
64
64
|
}]);
|
|
65
|
-
return LocaleCache;
|
|
66
65
|
}();
|
|
67
66
|
var localeCacher = new LocaleCache(_defineProperty({}, zhCNData.locale, zhCNData));
|
|
68
67
|
export default localeCacher;
|
|
@@ -180,11 +179,11 @@ function formatElement(msg, variables) {
|
|
|
180
179
|
var t = item.t,
|
|
181
180
|
v = item.v;
|
|
182
181
|
if (t === 0 && v !== '') {
|
|
183
|
-
elements.push(
|
|
182
|
+
elements.push(/*#__PURE__*/React.createElement("span", {
|
|
184
183
|
key: index
|
|
185
184
|
}, v));
|
|
186
185
|
} else if (t === 1) {
|
|
187
|
-
elements.push(
|
|
186
|
+
elements.push(/*#__PURE__*/React.cloneElement(variables[v], {
|
|
188
187
|
key: index
|
|
189
188
|
}));
|
|
190
189
|
}
|
package/es/menu/menu.js
CHANGED
|
@@ -27,7 +27,7 @@ var isFunction = function isFunction(fn) {
|
|
|
27
27
|
};
|
|
28
28
|
var openSubMenuSet = new _Set();
|
|
29
29
|
var Menu = function Menu(props) {
|
|
30
|
-
var _context2
|
|
30
|
+
var _context2;
|
|
31
31
|
var _a;
|
|
32
32
|
var _useContext = useContext(ConfigContext),
|
|
33
33
|
getPrefixCls = _useContext.getPrefixCls,
|
|
@@ -170,7 +170,7 @@ var Menu = function Menu(props) {
|
|
|
170
170
|
onMouseEnter: handleMouseEnterMenu
|
|
171
171
|
};
|
|
172
172
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
173
|
-
className: classNames(prefixCls, className, (
|
|
173
|
+
className: classNames(prefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-inline"), mode === 'inline'), "".concat(prefixCls, "-vertical"), mode !== 'inline'), "".concat(prefixCls, "-collapsed"), collapsed), _concatInstanceProperty(_context2 = "".concat(prefixCls, "-")).call(_context2, theme === 'light' ? 'light' : 'dark'), true)),
|
|
174
174
|
role: "menu",
|
|
175
175
|
style: style
|
|
176
176
|
}, mouseEvent), children && renderMenu(), additionalTools);
|
package/es/menu/menuItem.js
CHANGED
|
@@ -19,7 +19,7 @@ import { renderReactNodeFunction, DEFAUTL_PADDING } from './util';
|
|
|
19
19
|
import devWarning from '../_utils/devwarning';
|
|
20
20
|
export var MENU_ITEM_CONTAINER_NAME = 'menu-item-content-container';
|
|
21
21
|
var InternalMenuItem = function InternalMenuItem(props, ref) {
|
|
22
|
-
var _context
|
|
22
|
+
var _context;
|
|
23
23
|
var _React$useContext = React.useContext(ConfigContext),
|
|
24
24
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
25
25
|
pkgPrefixCls = _React$useContext.prefixCls,
|
|
@@ -119,7 +119,7 @@ var InternalMenuItem = function InternalMenuItem(props, ref) {
|
|
|
119
119
|
}, [selectedKey]);
|
|
120
120
|
return /*#__PURE__*/React.createElement("li", _extends({
|
|
121
121
|
ref: menuItemRef,
|
|
122
|
-
className: classNames(className, (
|
|
122
|
+
className: classNames(className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, prefixCls, subMenuMode !== 'horizontal'), "".concat(prefixCls, "-collapsed"), collapsed && level === 1), "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-active"), selectedKey === keyValue)),
|
|
123
123
|
role: "menuitem",
|
|
124
124
|
style: style,
|
|
125
125
|
key: keyValue
|
package/es/menu/subMenu.js
CHANGED
|
@@ -25,7 +25,7 @@ import usePopper from '../_utils/usePopper';
|
|
|
25
25
|
import devWarning from '../_utils/devwarning';
|
|
26
26
|
import { MENU_ITEM_CONTAINER_NAME } from './menuItem';
|
|
27
27
|
var SubMenu = function SubMenu(props) {
|
|
28
|
-
var
|
|
28
|
+
var _context4;
|
|
29
29
|
var _React$useContext = React.useContext(ConfigContext),
|
|
30
30
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
31
31
|
pkgPrefixCls = _React$useContext.prefixCls,
|
|
@@ -238,8 +238,8 @@ var SubMenu = function SubMenu(props) {
|
|
|
238
238
|
paddingLeft: "".concat(curPaddingLeft, "px")
|
|
239
239
|
};
|
|
240
240
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
241
|
-
var verticalView = usePopper(
|
|
242
|
-
className: classNames(prefixCls, className, (
|
|
241
|
+
var verticalView = usePopper(/*#__PURE__*/React.createElement("li", _extends({
|
|
242
|
+
className: classNames(prefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "light", theme === 'light'), "".concat(prefixCls, "-collapsed"), collapsed), "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-hover"), !disabled && Array.isArray(openKeys) && _includesInstanceProperty(openKeys).call(openKeys, keyValue)), "".concat(prefixCls, "-active"), Array.isArray(selectedKeyPath) && _includesInstanceProperty(selectedKeyPath).call(selectedKeyPath, keyValue))),
|
|
243
243
|
ref: subMenuVerticalRef,
|
|
244
244
|
key: keyValue
|
|
245
245
|
}, {
|
|
@@ -260,7 +260,7 @@ var SubMenu = function SubMenu(props) {
|
|
|
260
260
|
handleOnMouseEnter();
|
|
261
261
|
}
|
|
262
262
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
263
|
-
className: classNames("".concat(prefixCls, "-sub"), restProps.popupClassName, (
|
|
263
|
+
className: classNames("".concat(prefixCls, "-sub"), restProps.popupClassName, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-sub-second"), restProps.level === 1), "".concat(prefixCls, "-sub-third"), restProps.level === 2))
|
|
264
264
|
}, _mapInstanceProperty(_context4 = toArray(children)).call(_context4, function (item, index) {
|
|
265
265
|
var key = item.key || index;
|
|
266
266
|
return /*#__PURE__*/React.cloneElement(item, {
|
|
@@ -293,10 +293,10 @@ var SubMenu = function SubMenu(props) {
|
|
|
293
293
|
if (isVertical) {
|
|
294
294
|
return verticalView;
|
|
295
295
|
} else {
|
|
296
|
-
var
|
|
296
|
+
var _context5;
|
|
297
297
|
return /*#__PURE__*/React.createElement("li", _extends({
|
|
298
298
|
ref: subMenuRef,
|
|
299
|
-
className: classNames(prefixCls, className, (
|
|
299
|
+
className: classNames(prefixCls, className, _defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-collapsed"), collapsed), "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-active"), Array.isArray(selectedKeyPath) && _includesInstanceProperty(selectedKeyPath).call(selectedKeyPath, keyValue))),
|
|
300
300
|
key: keyValue
|
|
301
301
|
}, mouseEvent, {
|
|
302
302
|
style: style
|
package/es/message/content.js
CHANGED
|
@@ -65,7 +65,7 @@ var Content = function Content(args) {
|
|
|
65
65
|
className: "".concat(classPrefix, "-text")
|
|
66
66
|
}, content)), renderCloseIcon());
|
|
67
67
|
}
|
|
68
|
-
if (
|
|
68
|
+
if (/*#__PURE__*/React.isValidElement(content)) {
|
|
69
69
|
return content;
|
|
70
70
|
}
|
|
71
71
|
return null;
|
package/es/modal/confirm.js
CHANGED
|
@@ -19,7 +19,7 @@ export default function confirm(_a) {
|
|
|
19
19
|
document.body.appendChild(div);
|
|
20
20
|
function render(props) {
|
|
21
21
|
setTimeout(function () {
|
|
22
|
-
ReactDOM.render(
|
|
22
|
+
ReactDOM.render(/*#__PURE__*/React.createElement(Modal, _extends({}, props)), div);
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
render(restProps);
|
package/es/modal/modal.js
CHANGED
|
@@ -27,7 +27,7 @@ import { useHideDocumentScrollBar } from '../_utils/hooks';
|
|
|
27
27
|
export var ConfirmModalTypes = ['confirm', 'normal'];
|
|
28
28
|
export var ModalTypes = tuple('confirm', 'warning', 'error', 'normal');
|
|
29
29
|
var InternalModal = function InternalModal(props, ref) {
|
|
30
|
-
var
|
|
30
|
+
var _context2, _context3;
|
|
31
31
|
var _useContext = useContext(ConfigContext),
|
|
32
32
|
getPrefixCls = _useContext.getPrefixCls,
|
|
33
33
|
prefixCls = _useContext.prefixCls,
|
|
@@ -186,10 +186,10 @@ var InternalModal = function InternalModal(props, ref) {
|
|
|
186
186
|
}
|
|
187
187
|
}, [proxyCloseModal, onCancel, maskClosable]);
|
|
188
188
|
var isHidden = !destroyOnClose && !(isForceController ? visible : innerVisible);
|
|
189
|
-
var modalClasses = classNames(modalPrefixCls, className, (
|
|
189
|
+
var modalClasses = classNames(modalPrefixCls, className, _defineProperty(_defineProperty(_defineProperty({}, "".concat(modalPrefixCls, "-container"), true), "".concat(modalPrefixCls, "-container-hidden"), isHidden), "".concat(modalPrefixCls, "-container-show"), !isHidden));
|
|
190
190
|
var headerClass = "".concat(modalPrefixCls, "-header");
|
|
191
191
|
var container = /*#__PURE__*/React.createElement("div", {
|
|
192
|
-
className: classNames((
|
|
192
|
+
className: classNames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(modalPrefixCls, "-container-box"), true), "".concat(modalPrefixCls, "-has-container-box"), modalContainer), "".concat(modalPrefixCls, "-showline"), showline)),
|
|
193
193
|
style: {
|
|
194
194
|
width: width,
|
|
195
195
|
height: height
|
|
@@ -201,26 +201,26 @@ var InternalModal = function InternalModal(props, ref) {
|
|
|
201
201
|
className: headerClass
|
|
202
202
|
}, /*#__PURE__*/React.createElement("div", {
|
|
203
203
|
className: "".concat(modalPrefixCls, "-title-container")
|
|
204
|
-
}, titleIcon !== undefined ? titleIcon : type !== 'normal' && /*#__PURE__*/React.createElement("div", {
|
|
204
|
+
}, titleIcon !== undefined ? titleIcon : type !== 'normal' && (/*#__PURE__*/React.createElement("div", {
|
|
205
205
|
className: classNames("".concat(modalPrefixCls, "-title-icon"), _defineProperty({}, "modal-".concat(type, "-title-icon-bgcolor"), type))
|
|
206
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
206
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
207
207
|
className: "".concat(modalPrefixCls, "-title")
|
|
208
|
-
}, title)), closable && /*#__PURE__*/React.createElement("div", {
|
|
208
|
+
}, title)), closable && (/*#__PURE__*/React.createElement("div", {
|
|
209
209
|
className: "".concat(modalPrefixCls, "-close-icon"),
|
|
210
210
|
onClick: function onClick() {
|
|
211
211
|
return proxyCloseModal(onCancel);
|
|
212
212
|
}
|
|
213
213
|
}, closeIcon || /*#__PURE__*/React.createElement(Icon, {
|
|
214
214
|
type: "close"
|
|
215
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
215
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
216
216
|
className: classNames("".concat(modalPrefixCls, "-body"), bodyClassName),
|
|
217
217
|
style: bodyStyle
|
|
218
|
-
}, body), footer !== null && /*#__PURE__*/React.createElement("div", {
|
|
218
|
+
}, body), footer !== null && (/*#__PURE__*/React.createElement("div", {
|
|
219
219
|
className: classNames("".concat(modalPrefixCls, "-footer"), _concatInstanceProperty(_context2 = "".concat(modalPrefixCls, "-")).call(_context2, type, "-footer"), footerClassName),
|
|
220
220
|
style: _extends({
|
|
221
221
|
flexDirection: !footer && (!footerBtnOrder || footerBtnOrder === 'normal') ? 'row' : 'row-reverse'
|
|
222
222
|
}, footerStyle || {})
|
|
223
|
-
}, footer || generatorFooterByType(type)));
|
|
223
|
+
}, footer || generatorFooterByType(type))));
|
|
224
224
|
// 没有容器应该是不用居中的
|
|
225
225
|
// 但仍可拖拽
|
|
226
226
|
var handleDragStart = function handleDragStart(e, data) {
|
|
@@ -235,11 +235,11 @@ var InternalModal = function InternalModal(props, ref) {
|
|
|
235
235
|
};
|
|
236
236
|
var comp = /*#__PURE__*/React.createElement("div", _extends({
|
|
237
237
|
className: modalClasses
|
|
238
|
-
}, others), mask && /*#__PURE__*/React.createElement("div", {
|
|
238
|
+
}, others), mask && (/*#__PURE__*/React.createElement("div", {
|
|
239
239
|
onClick: handleMaskClick,
|
|
240
240
|
className: classNames(maskClassName, _defineProperty({}, "".concat(modalPrefixCls, "-mask"), true)),
|
|
241
241
|
style: maskStyle
|
|
242
|
-
}), /*#__PURE__*/React.createElement(Draggable, {
|
|
242
|
+
})), /*#__PURE__*/React.createElement(Draggable, {
|
|
243
243
|
defaultPosition: defaultPosition,
|
|
244
244
|
handle: ".".concat(headerClass),
|
|
245
245
|
disabled: !draggable,
|
|
@@ -56,7 +56,7 @@ var Content = function Content(args) {
|
|
|
56
56
|
if (_typeof(title) === null) {
|
|
57
57
|
return null;
|
|
58
58
|
}
|
|
59
|
-
if (
|
|
59
|
+
if (/*#__PURE__*/React.isValidElement(title)) {
|
|
60
60
|
return title;
|
|
61
61
|
}
|
|
62
62
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -68,7 +68,7 @@ var Content = function Content(args) {
|
|
|
68
68
|
}, title)), renderCloseIcon());
|
|
69
69
|
};
|
|
70
70
|
var getFooterElement = function getFooterElement() {
|
|
71
|
-
if (
|
|
71
|
+
if (/*#__PURE__*/React.isValidElement(footer)) {
|
|
72
72
|
return footer;
|
|
73
73
|
}
|
|
74
74
|
if (Array.isArray(footer)) {
|
|
@@ -100,7 +100,7 @@ var Content = function Content(args) {
|
|
|
100
100
|
className: classNames("".concat(classPrefix, "-description"))
|
|
101
101
|
}, content);
|
|
102
102
|
}
|
|
103
|
-
if (
|
|
103
|
+
if (/*#__PURE__*/React.isValidElement(content)) {
|
|
104
104
|
return content;
|
|
105
105
|
}
|
|
106
106
|
return null;
|
package/es/notification/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import NotificationApi from '../notification-base';
|
|
4
5
|
import Content from './content';
|
|
@@ -89,13 +90,15 @@ var setStyleByPlacement = function setStyleByPlacement(placement, el) {
|
|
|
89
90
|
}
|
|
90
91
|
};
|
|
91
92
|
var getNotificationHTMLElement = function getNotificationHTMLElement(placement) {
|
|
93
|
+
var _context;
|
|
92
94
|
var prefixCls = 'kd';
|
|
93
95
|
var suffix = "".concat(prefixCls, "-notice");
|
|
94
|
-
var htmlElement = document.querySelector("#".concat(suffix, "-").
|
|
96
|
+
var htmlElement = document.querySelector(_concatInstanceProperty(_context = "#".concat(suffix, "-")).call(_context, placement));
|
|
95
97
|
if (!htmlElement) {
|
|
98
|
+
var _context2, _context3;
|
|
96
99
|
htmlElement = document.createElement('div');
|
|
97
|
-
htmlElement.id = "".concat(suffix, "-").
|
|
98
|
-
htmlElement.className = "".concat(suffix, "-box-").
|
|
100
|
+
htmlElement.id = _concatInstanceProperty(_context2 = "".concat(suffix, "-")).call(_context2, placement);
|
|
101
|
+
htmlElement.className = _concatInstanceProperty(_context3 = "".concat(suffix, "-box-")).call(_context3, placement);
|
|
99
102
|
setStyleByPlacement(placement, htmlElement);
|
|
100
103
|
document.body.appendChild(htmlElement);
|
|
101
104
|
}
|
|
@@ -29,7 +29,7 @@ var renderNotification = function renderNotification(properties, el, callback) {
|
|
|
29
29
|
called = true;
|
|
30
30
|
callback && callback(notices);
|
|
31
31
|
};
|
|
32
|
-
ReactDOM.render(
|
|
32
|
+
ReactDOM.render(/*#__PURE__*/React.createElement(Notification, _extends({}, props, {
|
|
33
33
|
ref: ref
|
|
34
34
|
})), el);
|
|
35
35
|
};
|
|
@@ -7,7 +7,7 @@ import { getCompProps } from '../_utils';
|
|
|
7
7
|
import { tuple } from '../_utils/type';
|
|
8
8
|
export var NotificationTypes = tuple('success', 'warning', 'error', 'info', 'primary');
|
|
9
9
|
var Notice = function Notice(props) {
|
|
10
|
-
var _context
|
|
10
|
+
var _context;
|
|
11
11
|
var _useContext = useContext(ConfigContext),
|
|
12
12
|
getPrefixCls = _useContext.getPrefixCls,
|
|
13
13
|
prefixCls = _useContext.prefixCls,
|
|
@@ -26,7 +26,7 @@ var Notice = function Notice(props) {
|
|
|
26
26
|
var noticePrefixCls = getPrefixCls(prefixCls, suffixCls, customPrefixcls);
|
|
27
27
|
var timer = null;
|
|
28
28
|
var noticeRef = useRef();
|
|
29
|
-
var noticeClasses = classNames(noticePrefixCls, className, (
|
|
29
|
+
var noticeClasses = classNames(noticePrefixCls, className, _defineProperty(_defineProperty({}, _concatInstanceProperty(_context = "".concat(noticePrefixCls, "-")).call(_context, type), type), "".concat(noticePrefixCls, "-closable"), closable));
|
|
30
30
|
var animationEvent = function animationEvent() {
|
|
31
31
|
var _a, _b;
|
|
32
32
|
(_a = noticeRef.current) === null || _a === void 0 ? void 0 : _a.classList.remove("".concat(noticePrefixCls, "-leave"));
|
|
@@ -170,9 +170,9 @@ var Pagination = function Pagination(props) {
|
|
|
170
170
|
return changePage(page + 5 < totalPage ? page + 5 : totalPage);
|
|
171
171
|
};
|
|
172
172
|
var itemAttr = function itemAttr(prefix, title, active) {
|
|
173
|
-
var _context
|
|
173
|
+
var _context;
|
|
174
174
|
return {
|
|
175
|
-
className: classNames((
|
|
175
|
+
className: classNames(_defineProperty(_defineProperty(_defineProperty({}, _concatInstanceProperty(_context = "".concat(prefixCls, "-")).call(_context, prefix), true), "bordered", bordered), "active", active)),
|
|
176
176
|
title: showTitle ? title : undefined
|
|
177
177
|
};
|
|
178
178
|
};
|
|
@@ -217,10 +217,10 @@ var Pagination = function Pagination(props) {
|
|
|
217
217
|
var normalPagination = /*#__PURE__*/React.createElement("div", {
|
|
218
218
|
className: classNames(prefixCls, className),
|
|
219
219
|
style: style
|
|
220
|
-
}, Total, showJumper && /*#__PURE__*/React.createElement("span", {
|
|
220
|
+
}, Total, showJumper && (/*#__PURE__*/React.createElement("span", {
|
|
221
221
|
className: "".concat(prefixCls, "-current")
|
|
222
222
|
}, locale.getLangMsg('Pagination', 'order', {
|
|
223
|
-
order: /*#__PURE__*/React.createElement("input", {
|
|
223
|
+
order: (/*#__PURE__*/React.createElement("input", {
|
|
224
224
|
type: "text",
|
|
225
225
|
disabled: disabled,
|
|
226
226
|
onKeyUp: handleKeyUp,
|
|
@@ -228,8 +228,8 @@ var Pagination = function Pagination(props) {
|
|
|
228
228
|
onChange: handleChangeCurrentPage,
|
|
229
229
|
className: "".concat(prefixCls, "-current-input"),
|
|
230
230
|
value: inputPage === undefined ? page : inputPage
|
|
231
|
-
})
|
|
232
|
-
})), /*#__PURE__*/React.createElement("ul", {
|
|
231
|
+
}))
|
|
232
|
+
}))), /*#__PURE__*/React.createElement("ul", {
|
|
233
233
|
className: "".concat(prefixCls, "-action")
|
|
234
234
|
}, /*#__PURE__*/React.createElement("li", _extends({}, itemAttr('action-item', paginationLangMsg.first)), /*#__PURE__*/React.createElement("button", {
|
|
235
235
|
onClick: handleFirst,
|
|
@@ -243,7 +243,7 @@ var Pagination = function Pagination(props) {
|
|
|
243
243
|
}, innerIcon.next)), /*#__PURE__*/React.createElement("li", _extends({}, itemAttr('action-item', paginationLangMsg.last)), /*#__PURE__*/React.createElement("button", {
|
|
244
244
|
onClick: handleLast,
|
|
245
245
|
disabled: page === totalPage || disabled
|
|
246
|
-
}, innerIcon.last))), showSizeSelector && /*#__PURE__*/React.createElement("div", {
|
|
246
|
+
}, innerIcon.last))), showSizeSelector && (/*#__PURE__*/React.createElement("div", {
|
|
247
247
|
className: "".concat(prefixCls, "-selector")
|
|
248
248
|
}, /*#__PURE__*/React.createElement(Dropdown, _extends({
|
|
249
249
|
selectable: true,
|
|
@@ -266,7 +266,7 @@ var Pagination = function Pagination(props) {
|
|
|
266
266
|
className: classNames("".concat(prefixCls, "-selector-size"), "".concat(prefixCls, "-options-dropdown"), _defineProperty({}, "".concat(prefixCls, "-options-dropdown-open"), isOpen))
|
|
267
267
|
}, /*#__PURE__*/React.createElement("span", null, locale.getLangMsg('Pagination', 'perPage', {
|
|
268
268
|
size: size
|
|
269
|
-
})), innerIcon.down))));
|
|
269
|
+
})), innerIcon.down)))));
|
|
270
270
|
var simplePagination = /*#__PURE__*/React.createElement("div", {
|
|
271
271
|
className: classNames(prefixCls, 'simple', className),
|
|
272
272
|
style: style
|
|
@@ -280,7 +280,7 @@ var Pagination = function Pagination(props) {
|
|
|
280
280
|
disabled: page === 1 || disabled
|
|
281
281
|
}, innerIcon.prev)), /*#__PURE__*/React.createElement("li", _extends({}, itemAttr('action-item', _concatInstanceProperty(_context4 = "".concat(page, "/")).call(_context4, totalPage))), /*#__PURE__*/React.createElement("span", {
|
|
282
282
|
className: "".concat(prefixCls, "-current")
|
|
283
|
-
}, showJumper ? /*#__PURE__*/React.createElement("input", {
|
|
283
|
+
}, showJumper ? (/*#__PURE__*/React.createElement("input", {
|
|
284
284
|
type: "text",
|
|
285
285
|
disabled: disabled,
|
|
286
286
|
onKeyUp: handleKeyUp,
|
|
@@ -288,7 +288,7 @@ var Pagination = function Pagination(props) {
|
|
|
288
288
|
onChange: handleChangeCurrentPage,
|
|
289
289
|
className: "".concat(prefixCls, "-current-input"),
|
|
290
290
|
value: inputPage === undefined ? page : inputPage
|
|
291
|
-
}) : page), "/ ", /*#__PURE__*/React.createElement("span", {
|
|
291
|
+
})) : page), "/ ", /*#__PURE__*/React.createElement("span", {
|
|
292
292
|
className: "".concat(prefixCls, "-total")
|
|
293
293
|
}, totalPage)), /*#__PURE__*/React.createElement("li", _extends({}, itemAttr('action-item', paginationLangMsg.nextPage)), /*#__PURE__*/React.createElement("button", {
|
|
294
294
|
onClick: handleNext,
|
|
@@ -361,7 +361,7 @@ var Pagination = function Pagination(props) {
|
|
|
361
361
|
}), /*#__PURE__*/React.createElement("li", _extends({}, itemAttr('pages-item', paginationLangMsg.nextPage)), /*#__PURE__*/React.createElement("button", {
|
|
362
362
|
onClick: handleNext,
|
|
363
363
|
disabled: page === totalPage || disabled
|
|
364
|
-
}, innerIcon.next))), showJumper && /*#__PURE__*/React.createElement("div", {
|
|
364
|
+
}, innerIcon.next))), showJumper && (/*#__PURE__*/React.createElement("div", {
|
|
365
365
|
className: "".concat(prefixCls, "-jumper")
|
|
366
366
|
}, /*#__PURE__*/React.createElement("input", {
|
|
367
367
|
type: "text",
|
|
@@ -375,10 +375,10 @@ var Pagination = function Pagination(props) {
|
|
|
375
375
|
className: "".concat(prefixCls, "-jumper-button"),
|
|
376
376
|
disabled: disabled,
|
|
377
377
|
onClick: handleConfirmCurrentPage
|
|
378
|
-
}, "GO")), showSizeSelector && /*#__PURE__*/React.createElement("div", {
|
|
378
|
+
}, "GO"))), showSizeSelector && (/*#__PURE__*/React.createElement("div", {
|
|
379
379
|
className: "".concat(prefixCls, "-options")
|
|
380
380
|
}, locale.getLangMsg('Pagination', 'perPage', {
|
|
381
|
-
size: /*#__PURE__*/React.createElement(Dropdown, _extends({
|
|
381
|
+
size: (/*#__PURE__*/React.createElement(Dropdown, _extends({
|
|
382
382
|
selectable: true,
|
|
383
383
|
trigger: "click",
|
|
384
384
|
selectedKey: size,
|
|
@@ -395,8 +395,8 @@ var Pagination = function Pagination(props) {
|
|
|
395
395
|
onVisibleChange: dropdownVisibleChange
|
|
396
396
|
}), /*#__PURE__*/React.createElement("button", {
|
|
397
397
|
className: classNames("".concat(prefixCls, "-options-size"), "".concat(prefixCls, "-options-dropdown"), _defineProperty({}, "".concat(prefixCls, "-options-dropdown-open"), isOpen))
|
|
398
|
-
}, size, innerIcon.down))
|
|
399
|
-
})));
|
|
398
|
+
}, size, innerIcon.down)))
|
|
399
|
+
}))));
|
|
400
400
|
var mapPagination = {
|
|
401
401
|
basic: normalPagination,
|
|
402
402
|
bill: normalPagination,
|
|
@@ -52,11 +52,11 @@ var Popconfirm = function Popconfirm(props) {
|
|
|
52
52
|
};
|
|
53
53
|
var confirmPopper = /*#__PURE__*/React.createElement("div", {
|
|
54
54
|
className: "".concat(prefixCls, "-content")
|
|
55
|
-
}, confirmTitle && /*#__PURE__*/React.createElement("h3", {
|
|
55
|
+
}, confirmTitle && (/*#__PURE__*/React.createElement("h3", {
|
|
56
56
|
className: "".concat(prefixCls, "-title")
|
|
57
57
|
}, 'icon' in props ? icon === true ? /*#__PURE__*/React.createElement(Icon, {
|
|
58
58
|
type: "warning-solid"
|
|
59
|
-
}) : icon : null, confirmTitle), /*#__PURE__*/React.createElement("div", {
|
|
59
|
+
}) : icon : null, confirmTitle)), /*#__PURE__*/React.createElement("div", {
|
|
60
60
|
className: "".concat(prefixCls, "-message")
|
|
61
61
|
}, confirmMsg), /*#__PURE__*/React.createElement("div", {
|
|
62
62
|
className: "".concat(prefixCls, "-interaction")
|
package/es/progress/circle.js
CHANGED
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
var gradientSeed = 0;
|
|
10
10
|
var Circle = function Circle(props) {
|
|
11
|
-
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10, _context11, _context12
|
|
11
|
+
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context0, _context1, _context10, _context11, _context12;
|
|
12
12
|
var prefixCls = props.prefixCls,
|
|
13
13
|
_props$percent = props.percent,
|
|
14
14
|
percent = _props$percent === void 0 ? 0 : _props$percent,
|
|
@@ -44,7 +44,7 @@ var Circle = function Circle(props) {
|
|
|
44
44
|
var gradientArr = isGradient ? _sortInstanceProperty(_context2 = _Object$keys(gradientColor)).call(_context2, function (a, b) {
|
|
45
45
|
return stripPercentToNumber(a) - stripPercentToNumber(b);
|
|
46
46
|
}) : null;
|
|
47
|
-
var gradientDom = isGradient ? /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
47
|
+
var gradientDom = isGradient ? (/*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
48
48
|
id: _concatInstanceProperty(_context3 = "".concat(prefixCls, "-gradient-")).call(_context3, gradientId),
|
|
49
49
|
x1: "100%",
|
|
50
50
|
y1: "0%",
|
|
@@ -56,11 +56,11 @@ var Circle = function Circle(props) {
|
|
|
56
56
|
offset: key,
|
|
57
57
|
stopColor: gradientColor[key]
|
|
58
58
|
});
|
|
59
|
-
}))) : null;
|
|
59
|
+
})))) : null;
|
|
60
60
|
var pathColor = strokeColor && typeof strokeColor !== 'string' ? _concatInstanceProperty(_context4 = "url(#".concat(prefixCls, "-gradient-")).call(_context4, gradientId, ")") : strokeColor;
|
|
61
|
-
var pathString = _concatInstanceProperty(_context5 = _concatInstanceProperty(_context6 = _concatInstanceProperty(_context7 = _concatInstanceProperty(_context8 = _concatInstanceProperty(_context9 = _concatInstanceProperty(
|
|
61
|
+
var pathString = _concatInstanceProperty(_context5 = _concatInstanceProperty(_context6 = _concatInstanceProperty(_context7 = _concatInstanceProperty(_context8 = _concatInstanceProperty(_context9 = _concatInstanceProperty(_context0 = _concatInstanceProperty(_context1 = _concatInstanceProperty(_context10 = _concatInstanceProperty(_context11 = "M 50,50 m ".concat(beginPositionX, ",")).call(_context11, beginPositionY, " \n\n a ")).call(_context10, radius, ",")).call(_context1, radius, " 0 1 1 ")).call(_context0, endPositionX, ",")).call(_context9, endPositionY, " \n\n a ")).call(_context8, radius, ",")).call(_context7, radius, " 0 1 1 ")).call(_context6, endPositionX, ",")).call(_context5, -endPositionY, " \n");
|
|
62
62
|
var pathStyle = {
|
|
63
|
-
strokeDasharray: _concatInstanceProperty(
|
|
63
|
+
strokeDasharray: _concatInstanceProperty(_context12 = "".concat(percent / 100 * len, "px ")).call(_context12, len, "px"),
|
|
64
64
|
strokeDashoffset: '0px',
|
|
65
65
|
opacity: percent === 0 ? 0 : 1,
|
|
66
66
|
stroke: pathColor
|