@kdcloudjs/kdesign 1.7.33-stable.11 → 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 +8511 -6737
- 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 +43 -43
- 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 +47 -51
- 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 -1860
package/es/progress/progress.js
CHANGED
|
@@ -16,7 +16,7 @@ import devWarning from '../_utils/devwarning';
|
|
|
16
16
|
export var ProgressTypes = tuple('line', 'circle');
|
|
17
17
|
export var ProgressStatuses = tuple('normal', 'cycle', 'loading', 'failure', 'success');
|
|
18
18
|
var Progress = function Progress(props) {
|
|
19
|
-
var _context, _context2
|
|
19
|
+
var _context, _context2;
|
|
20
20
|
var _useContext = useContext(ConfigContext),
|
|
21
21
|
getPrefixCls = _useContext.getPrefixCls,
|
|
22
22
|
prefixCls = _useContext.prefixCls,
|
|
@@ -48,7 +48,7 @@ var Progress = function Progress(props) {
|
|
|
48
48
|
};
|
|
49
49
|
var progressStatus = getProgressStatus(progressProps);
|
|
50
50
|
var progressPrefixCls = getPrefixCls(prefixCls, 'progress', customPrefixcls);
|
|
51
|
-
var progressClasses = classNames(progressPrefixCls, className, (
|
|
51
|
+
var progressClasses = classNames(progressPrefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, _concatInstanceProperty(_context = "".concat(progressPrefixCls, "-type-")).call(_context, type), type), _concatInstanceProperty(_context2 = "".concat(progressPrefixCls, "-status-")).call(_context2, progressStatus), true), "".concat(progressPrefixCls, "-show-info"), showInfo), "".concat(progressPrefixCls, "-position-bottom"), progressProps.infoPosition !== 'right' && progressStatus === 'normal'));
|
|
52
52
|
var renderProgressInfo = function renderProgressInfo(prefixCls, progressStatus, props) {
|
|
53
53
|
var _props$type = props.type,
|
|
54
54
|
type = _props$type === void 0 ? 'line' : _props$type,
|
package/es/radio/radio.js
CHANGED
|
@@ -20,7 +20,6 @@ import { getCompProps } from '../_utils';
|
|
|
20
20
|
import RadioGroupContext from './context';
|
|
21
21
|
import devWarning from '../_utils/devwarning';
|
|
22
22
|
var InternalRadio = function InternalRadio(props, ref) {
|
|
23
|
-
var _classNames;
|
|
24
23
|
var context = React.useContext(RadioGroupContext);
|
|
25
24
|
var _React$useContext = React.useContext(ConfigContext),
|
|
26
25
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -67,7 +66,7 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
67
66
|
context.onChange(e, value);
|
|
68
67
|
}
|
|
69
68
|
};
|
|
70
|
-
var classString = classNames((
|
|
69
|
+
var classString = classNames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(radioPrefixCls), true), "".concat(radioPrefixCls, "-disabled"), disabled), "".concat(radioPrefixCls, "-checked"), isChecked), className); // 单选包裹元素class名称
|
|
71
70
|
useEffect(function () {
|
|
72
71
|
var _a;
|
|
73
72
|
var handleRepeatClick = function handleRepeatClick(e) {
|
package/es/rate/rate.js
CHANGED
|
@@ -10,7 +10,7 @@ import devWarning from '../_utils/devwarning';
|
|
|
10
10
|
import { tuple } from '../_utils/type';
|
|
11
11
|
export var SizeTypes = tuple('large', 'middle', 'small');
|
|
12
12
|
var Rate = function Rate(props) {
|
|
13
|
-
var _context2
|
|
13
|
+
var _context2;
|
|
14
14
|
var _React$useContext = React.useContext(ConfigContext),
|
|
15
15
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
16
16
|
pkgPrefixCls = _React$useContext.prefixCls,
|
|
@@ -114,7 +114,6 @@ var Rate = function Rate(props) {
|
|
|
114
114
|
} else {
|
|
115
115
|
mark = isActiveFirst; // 点击半个图标只激活当前点击图标
|
|
116
116
|
}
|
|
117
|
-
|
|
118
117
|
return mark;
|
|
119
118
|
};
|
|
120
119
|
var transferValue = function transferValue(value, index) {
|
|
@@ -157,8 +156,8 @@ var Rate = function Rate(props) {
|
|
|
157
156
|
return activeNumber !== 0 ? mouseActive : selectActive;
|
|
158
157
|
};
|
|
159
158
|
var getIconClassName = function getIconClassName(name, isActive) {
|
|
160
|
-
var _context
|
|
161
|
-
return classnames((
|
|
159
|
+
var _context;
|
|
160
|
+
return classnames(_defineProperty(_defineProperty({}, _concatInstanceProperty(_context = "".concat(prefixCls, "-icon-")).call(_context, name), true), "".concat(prefixCls, "-icon-selected"), isActive));
|
|
162
161
|
};
|
|
163
162
|
/**
|
|
164
163
|
* 获取图标视图
|
|
@@ -177,12 +176,12 @@ var Rate = function Rate(props) {
|
|
|
177
176
|
var firstIconStyle = getIconStyle(isFirstActive);
|
|
178
177
|
var firstIconClassName = getIconClassName('first', isFirstActive);
|
|
179
178
|
var secondIconClassName = getIconClassName('second', isSecondActive);
|
|
180
|
-
rateIconsView.push(
|
|
179
|
+
rateIconsView.push(/*#__PURE__*/React.createElement("span", {
|
|
181
180
|
className: "".concat(prefixCls, "-item"),
|
|
182
181
|
key: i
|
|
183
182
|
}, /*#__PURE__*/React.createElement("div", {
|
|
184
183
|
className: "".concat(prefixCls, "-icon-view")
|
|
185
|
-
}, allowHalf && /*#__PURE__*/React.createElement("span", {
|
|
184
|
+
}, allowHalf && (/*#__PURE__*/React.createElement("span", {
|
|
186
185
|
style: firstIconStyle,
|
|
187
186
|
className: firstIconClassName,
|
|
188
187
|
onClick: function onClick() {
|
|
@@ -194,7 +193,7 @@ var Rate = function Rate(props) {
|
|
|
194
193
|
onMouseLeave: function onMouseLeave() {
|
|
195
194
|
return handleMouseLeave();
|
|
196
195
|
}
|
|
197
|
-
}, getIcon(icon, activeIcon, i, isFirstActive)), /*#__PURE__*/React.createElement("span", {
|
|
196
|
+
}, getIcon(icon, activeIcon, i, isFirstActive))), /*#__PURE__*/React.createElement("span", {
|
|
198
197
|
style: IconStyle,
|
|
199
198
|
className: secondIconClassName,
|
|
200
199
|
onClick: function onClick() {
|
|
@@ -224,7 +223,7 @@ var Rate = function Rate(props) {
|
|
|
224
223
|
// </span>
|
|
225
224
|
// )
|
|
226
225
|
// }
|
|
227
|
-
var getRateClassName = classnames(prefixCls, className, (
|
|
226
|
+
var getRateClassName = classnames(prefixCls, className, _defineProperty(_defineProperty({}, _concatInstanceProperty(_context2 = "".concat(prefixCls, "-size-")).call(_context2, size), size), "".concat(prefixCls, "-disabled"), disabled));
|
|
228
227
|
var rate = /*#__PURE__*/React.createElement("span", {
|
|
229
228
|
className: getRateClassName,
|
|
230
229
|
style: style,
|
package/es/search/option.js
CHANGED
|
@@ -4,7 +4,6 @@ import classNames from 'classnames';
|
|
|
4
4
|
import ConfigContext from '../config-provider/ConfigContext';
|
|
5
5
|
import { getStringToArray } from '../_utils/arrayUtil';
|
|
6
6
|
var InternalOption = function InternalOption(props, ref) {
|
|
7
|
-
var _classNames;
|
|
8
7
|
var optionRef = useRef(null) || ref;
|
|
9
8
|
var className = props.className,
|
|
10
9
|
onChangeSelect = props.onChangeSelect,
|
|
@@ -19,7 +18,7 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
19
18
|
prefixCls = _useContext.prefixCls,
|
|
20
19
|
getLangMsg = _useContext.locale.getLangMsg;
|
|
21
20
|
var optionPrefixCls = getPrefixCls(prefixCls, 'quick-search');
|
|
22
|
-
var optionCls = classNames(className, (
|
|
21
|
+
var optionCls = classNames(className, _defineProperty(_defineProperty({}, "".concat(optionPrefixCls, "-option"), true), "".concat(optionPrefixCls, "-option-selected"), index === selectedIndex));
|
|
23
22
|
var optionTagCls = classNames(_defineProperty({}, "".concat(optionPrefixCls, "-option-tag"), true));
|
|
24
23
|
var optionContentCls = classNames(_defineProperty({}, "".concat(optionPrefixCls, "-option-content"), true));
|
|
25
24
|
var handleClick = function handleClick() {
|
|
@@ -27,7 +27,6 @@ import { Icon } from '../index';
|
|
|
27
27
|
import { getStringToArray } from '../_utils/arrayUtil';
|
|
28
28
|
var INPUT_MIN_WIDTH = 4; // 输入框最小宽度
|
|
29
29
|
var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
30
|
-
var _classNames, _classNames2;
|
|
31
30
|
var _useContext = useContext(ConfigContext),
|
|
32
31
|
getPrefixCls = _useContext.getPrefixCls,
|
|
33
32
|
prefixCls = _useContext.prefixCls,
|
|
@@ -73,13 +72,13 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
73
72
|
tagsList = _useState8[0],
|
|
74
73
|
setTagsList = _useState8[1]; // tags
|
|
75
74
|
var _useState9 = useState(INPUT_MIN_WIDTH),
|
|
76
|
-
|
|
77
|
-
inputWidth =
|
|
78
|
-
setInputWidth =
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
selectedIndex =
|
|
82
|
-
setSelectedIndex =
|
|
75
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
76
|
+
inputWidth = _useState0[0],
|
|
77
|
+
setInputWidth = _useState0[1]; // 输入框宽度
|
|
78
|
+
var _useState1 = useState(0),
|
|
79
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
80
|
+
selectedIndex = _useState10[0],
|
|
81
|
+
setSelectedIndex = _useState10[1]; // 下拉选中 默认第一个
|
|
83
82
|
// 处理智能搜索props
|
|
84
83
|
var getNlpSearchProps = function getNlpSearchProps() {
|
|
85
84
|
var nlpSearch = props.nlpSearch;
|
|
@@ -105,8 +104,8 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
105
104
|
setOptionShow(!!searchValue);
|
|
106
105
|
}, [searchValue]);
|
|
107
106
|
var quickSearchPrefixCls = getPrefixCls(prefixCls, 'quick-search', customPrefixcls);
|
|
108
|
-
var quickSearchCls = classNames(quickSearchPrefixCls, className, (
|
|
109
|
-
var quickSearchSelectorCls = classNames((
|
|
107
|
+
var quickSearchCls = classNames(quickSearchPrefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(quickSearchPrefixCls, "-focused"), isFocused || tagsList.length), "".concat(quickSearchPrefixCls, "-disabled"), disabled), "".concat(quickSearchPrefixCls, "-borderless"), borderType === 'none'), "".concat(quickSearchPrefixCls, "-border"), borderType === 'bordered'));
|
|
108
|
+
var quickSearchSelectorCls = classNames(_defineProperty(_defineProperty({}, "".concat(quickSearchPrefixCls, "-selector"), true), "".concat(quickSearchPrefixCls, "-selector-disabled"), disabled));
|
|
110
109
|
var inputCls = classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-input"), true));
|
|
111
110
|
// 下拉列表样式
|
|
112
111
|
var dropDownCls = classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-dropdown"), true));
|
|
@@ -159,6 +159,7 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
159
159
|
React.createElement("div", {
|
|
160
160
|
className: _concatInstanceProperty(_context3 = "".concat(prefixCls, "-panel-dropDown-result-list")).call(_context3, item.id === result.id ? " ".concat(prefixCls, "-panel-dropDown-result-list-active") : ''),
|
|
161
161
|
key: index,
|
|
162
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
162
163
|
onMouseOver: function onMouseOver() {
|
|
163
164
|
return handleMouseOver(item);
|
|
164
165
|
},
|
|
@@ -189,6 +190,7 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
189
190
|
);
|
|
190
191
|
})), /*#__PURE__*/React.createElement("div", {
|
|
191
192
|
className: _concatInstanceProperty(_context4 = "".concat(prefixCls, "-panel-dropDown-search")).call(_context4, result.id === 'search' ? " ".concat(prefixCls, "-panel-dropDown-search-active") : ''),
|
|
193
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
192
194
|
onMouseOver: function onMouseOver() {
|
|
193
195
|
return handleMouseOver({
|
|
194
196
|
id: 'search'
|
|
@@ -202,11 +204,11 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
202
204
|
type: "search"
|
|
203
205
|
}), /*#__PURE__*/React.createElement("span", {
|
|
204
206
|
className: "".concat(prefixCls, "-panel-dropDown-search-value")
|
|
205
|
-
}, "\u201C".concat(inputValue, "\u201D"))), panelSearchLoading && /*#__PURE__*/React.createElement("span", {
|
|
207
|
+
}, "\u201C".concat(inputValue, "\u201D"))), panelSearchLoading && (/*#__PURE__*/React.createElement("span", {
|
|
206
208
|
className: "".concat(prefixCls, "-panel-dropDown-loading")
|
|
207
209
|
}, /*#__PURE__*/React.createElement(Spin, {
|
|
208
210
|
type: "container"
|
|
209
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
211
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
210
212
|
className: "".concat(prefixCls, "-panel-dropDown-summary")
|
|
211
213
|
}, /*#__PURE__*/React.createElement("div", {
|
|
212
214
|
className: "".concat(prefixCls, "-panel-dropDown-summary-pic")
|
|
@@ -215,9 +217,9 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
215
217
|
preview: false
|
|
216
218
|
}) : displayImg), /*#__PURE__*/React.createElement("div", {
|
|
217
219
|
className: "".concat(prefixCls, "-panel-dropDown-summary-title")
|
|
218
|
-
}, result.id === 'search' ? "\u67E5\u770B\u66F4\u591A\"".concat(inputValue, "\"\u7684\u641C\u7D22\u7ED3\u679C") : result.title), result.id === 'search' ? /*#__PURE__*/React.createElement("div", {
|
|
220
|
+
}, result.id === 'search' ? "\u67E5\u770B\u66F4\u591A\"".concat(inputValue, "\"\u7684\u641C\u7D22\u7ED3\u679C") : result.title), result.id === 'search' ? (/*#__PURE__*/React.createElement("div", {
|
|
219
221
|
className: "".concat(prefixCls, "-panel-dropDown-summary-list")
|
|
220
|
-
}, "\u8303\u56F4: ".concat(type.label)) : _mapInstanceProperty(_context5 = _Object$keys(displayList)).call(_context5, function (item, index) {
|
|
222
|
+
}, "\u8303\u56F4: ".concat(type.label))) : _mapInstanceProperty(_context5 = _Object$keys(displayList)).call(_context5, function (item, index) {
|
|
221
223
|
return /*#__PURE__*/React.createElement("div", {
|
|
222
224
|
key: index,
|
|
223
225
|
className: "".concat(prefixCls, "-panel-dropDown-summary-list")
|
package/es/search/search.js
CHANGED
|
@@ -21,7 +21,7 @@ import { Input, Icon } from '../index';
|
|
|
21
21
|
import { SearchSizeTypes, BorderTypes, SearchTypes } from './interface';
|
|
22
22
|
import devWarning from '../_utils/devwarning';
|
|
23
23
|
var InternalSearch = function InternalSearch(props, ref) {
|
|
24
|
-
var _context
|
|
24
|
+
var _context;
|
|
25
25
|
var thisSearchRef = useRef();
|
|
26
26
|
var searchRef = ref || thisSearchRef;
|
|
27
27
|
var _useContext = useContext(ConfigContext),
|
|
@@ -54,7 +54,7 @@ var InternalSearch = function InternalSearch(props, ref) {
|
|
|
54
54
|
focused = _useState2[0],
|
|
55
55
|
setFocused = _useState2[1];
|
|
56
56
|
var searchPrefixCls = getPrefixCls(prefixCls, 'search', customPrefixcls);
|
|
57
|
-
var searchCls = classNames(searchPrefixCls, className, (
|
|
57
|
+
var searchCls = classNames(searchPrefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, _concatInstanceProperty(_context = "".concat(searchPrefixCls, "-size-")).call(_context, size), size), "".concat(searchPrefixCls, "-disabled"), disabled), "".concat(searchPrefixCls, "-focused"), focused && !disabled), "".concat(searchPrefixCls, "-borderless"), borderType === 'none'), "".concat(searchPrefixCls, "-border"), borderType === 'bordered'));
|
|
58
58
|
var handleSearchChange = useCallback(function (event) {
|
|
59
59
|
onSearch && (onSearch === null || onSearch === void 0 ? void 0 : onSearch(event));
|
|
60
60
|
}, [onSearch]);
|
|
@@ -74,22 +74,22 @@ var InternalSearch = function InternalSearch(props, ref) {
|
|
|
74
74
|
if (!prefix) {
|
|
75
75
|
return null;
|
|
76
76
|
}
|
|
77
|
-
return prefix && typeof prefix === 'boolean' ? /*#__PURE__*/React.createElement("span", {
|
|
77
|
+
return prefix && typeof prefix === 'boolean' ? (/*#__PURE__*/React.createElement("span", {
|
|
78
78
|
className: "".concat(searchPrefixCls, "-prefix")
|
|
79
79
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
80
80
|
type: "search"
|
|
81
|
-
})) : prefix;
|
|
81
|
+
}))) : prefix;
|
|
82
82
|
}, [prefix, searchPrefixCls]);
|
|
83
83
|
var renderSuffix = useCallback(function () {
|
|
84
84
|
if (!suffix) {
|
|
85
85
|
return null;
|
|
86
86
|
}
|
|
87
|
-
return typeof suffix === 'boolean' && suffix ? /*#__PURE__*/React.createElement("span", {
|
|
87
|
+
return typeof suffix === 'boolean' && suffix ? (/*#__PURE__*/React.createElement("span", {
|
|
88
88
|
className: "".concat(searchPrefixCls, "-suffix")
|
|
89
89
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
90
90
|
className: "kd-search-prefix",
|
|
91
91
|
type: "search"
|
|
92
|
-
})) : suffix;
|
|
92
|
+
}))) : suffix;
|
|
93
93
|
}, [suffix, searchPrefixCls]);
|
|
94
94
|
if (type === 'quick-search') {
|
|
95
95
|
return /*#__PURE__*/React.createElement(QuickSearch, _extends({}, restProps, {
|
package/es/select/option.js
CHANGED
|
@@ -8,7 +8,6 @@ import classNames from 'classnames';
|
|
|
8
8
|
import ConfigContext from '../config-provider/ConfigContext';
|
|
9
9
|
import { Checkbox } from '../index';
|
|
10
10
|
var InternalOption = function InternalOption(props, ref) {
|
|
11
|
-
var _classNames;
|
|
12
11
|
var optionRef = useRef(null) || ref;
|
|
13
12
|
var _useState = useState(false),
|
|
14
13
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -38,7 +37,7 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
38
37
|
setSelected(value !== undefined ? value === values : false);
|
|
39
38
|
}
|
|
40
39
|
});
|
|
41
|
-
var optionCls = classNames(selectOptionPrefixCls, className, (
|
|
40
|
+
var optionCls = classNames(selectOptionPrefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(selectOptionPrefixCls, "-option"), true), "".concat(selectOptionPrefixCls, "-option-active"), activeIndex === index), "".concat(selectOptionPrefixCls, "-option-selected"), isSelected), "".concat(selectOptionPrefixCls, "-option-disabled"), disabled));
|
|
42
41
|
var contentCls = classNames(_defineProperty({}, "".concat(selectOptionPrefixCls, "-option-content"), true));
|
|
43
42
|
var handleClick = function handleClick(e) {
|
|
44
43
|
e.preventDefault();
|
|
@@ -68,12 +67,12 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
68
67
|
onMouseLeave: handleOnMouseLeave
|
|
69
68
|
}, /*#__PURE__*/React.createElement("div", {
|
|
70
69
|
className: contentCls
|
|
71
|
-
}, isMultiple ? /*#__PURE__*/React.createElement(Checkbox, {
|
|
70
|
+
}, isMultiple ? (/*#__PURE__*/React.createElement(Checkbox, {
|
|
72
71
|
style: checkStyle,
|
|
73
72
|
value: value,
|
|
74
73
|
disabled: disabled,
|
|
75
74
|
checked: isSelected
|
|
76
|
-
}, children) : children)));
|
|
75
|
+
}, children)) : children)));
|
|
77
76
|
};
|
|
78
77
|
var Option = /*#__PURE__*/React.forwardRef(InternalOption);
|
|
79
78
|
Option.displayName = 'Option';
|
package/es/select/select.js
CHANGED
|
@@ -22,7 +22,7 @@ import VirtualList from '../virtual-list';
|
|
|
22
22
|
import KeyCode from '../_utils/KeyCode';
|
|
23
23
|
var INPUT_MIN_WIDTH = 4; // 输入框最小宽度
|
|
24
24
|
var InternalSelect = function InternalSelect(props, ref) {
|
|
25
|
-
var _context,
|
|
25
|
+
var _context, _context5;
|
|
26
26
|
var _useContext = useContext(ConfigContext),
|
|
27
27
|
getPrefixCls = _useContext.getPrefixCls,
|
|
28
28
|
prefixCls = _useContext.prefixCls,
|
|
@@ -102,13 +102,13 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
102
102
|
searchValue = _useState8[0],
|
|
103
103
|
setSearchValue = _useState8[1]; // 搜索框定时器
|
|
104
104
|
var _useState9 = useState(INPUT_MIN_WIDTH),
|
|
105
|
-
|
|
106
|
-
inputWidth =
|
|
107
|
-
setInputWidth =
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
focusd =
|
|
111
|
-
setFocusd =
|
|
105
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
106
|
+
inputWidth = _useState0[0],
|
|
107
|
+
setInputWidth = _useState0[1]; // 输入框宽度
|
|
108
|
+
var _useState1 = useState(autoFocus),
|
|
109
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
110
|
+
focusd = _useState10[0],
|
|
111
|
+
setFocusd = _useState10[1];
|
|
112
112
|
var isShowSearch = useMemo(function () {
|
|
113
113
|
return isBoolean(showSearch) ? showSearch : isMultiple;
|
|
114
114
|
}, [isMultiple, showSearch]);
|
|
@@ -123,7 +123,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
123
123
|
// 多选底部样式
|
|
124
124
|
var multipleFooterCls = classNames(_defineProperty({}, "".concat(selectPrefixCls, "-multiple-footer"), true));
|
|
125
125
|
// 多选,单选公共样式
|
|
126
|
-
var commCls = classNames((
|
|
126
|
+
var commCls = classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(selectPrefixCls, "-bordered"), borderType === 'bordered'), "".concat(selectPrefixCls, "-underline"), borderType === 'underline'), "".concat(selectPrefixCls, "-borderless"), borderType === 'none'), _concatInstanceProperty(_context = "".concat(selectPrefixCls, "-size-")).call(_context, size), size), "".concat(selectPrefixCls, "-wrapper"), true), "".concat(selectPrefixCls, "-show-search"), isShowSearch && focusd));
|
|
127
127
|
useEffect(function () {
|
|
128
128
|
if (typeof props.visible !== 'undefined') {
|
|
129
129
|
setOptionShow(props.visible);
|
|
@@ -367,7 +367,6 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
367
367
|
onDeselect && onDeselect(key); // 下拉项取消选中时调用,参数为选中项的value,多选模式下生效
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
|
|
371
370
|
setSearchValue('');
|
|
372
371
|
onSelect && onSelect(key); // 下拉项被选中时调用,参数为选中项value或key
|
|
373
372
|
};
|
|
@@ -450,13 +449,12 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
450
449
|
};
|
|
451
450
|
// 渲染后缀图标
|
|
452
451
|
var renderSuffix = function renderSuffix() {
|
|
453
|
-
var _classNames7;
|
|
454
452
|
var suffixIcon = selectProps.suffixIcon;
|
|
455
453
|
// 选择器下拉icon样式
|
|
456
|
-
var arrowIconCls = classNames((
|
|
454
|
+
var arrowIconCls = classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(selectPrefixCls, "-icon-arrow"), true), "".concat(selectPrefixCls, "-icon-arrow-up"), optionShow), "".concat(selectPrefixCls, "-icon-arrow-down"), !optionShow), "".concat(selectPrefixCls, "-icon-arrow-focus"), optionShow));
|
|
457
455
|
var iconShow = allowClear && !disabled && ((isMultiple ? mulOptions.length > 0 : (singleVal !== null && singleVal !== void 0 ? singleVal : '') !== '') || searchValue);
|
|
458
456
|
var clearIconCls = classNames(_defineProperty({}, "".concat(selectPrefixCls, "-icon-clear"), true));
|
|
459
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, iconShow ? /*#__PURE__*/React.createElement("span", {
|
|
457
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, iconShow ? (/*#__PURE__*/React.createElement("span", {
|
|
460
458
|
onClick: handleReset,
|
|
461
459
|
onMouseDown: function onMouseDown(e) {
|
|
462
460
|
return e.preventDefault();
|
|
@@ -465,7 +463,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
465
463
|
ref: clearRef
|
|
466
464
|
}, clearIcon || /*#__PURE__*/React.createElement(Icon, {
|
|
467
465
|
type: "close-solid"
|
|
468
|
-
})) : null, showArrow ? /*#__PURE__*/React.createElement("span", {
|
|
466
|
+
}))) : null, showArrow ? /*#__PURE__*/React.createElement("span", {
|
|
469
467
|
className: arrowIconCls
|
|
470
468
|
}, suffixIcon || /*#__PURE__*/React.createElement(Icon, {
|
|
471
469
|
type: "arrow-down"
|
|
@@ -568,7 +566,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
568
566
|
className: dropDownCls,
|
|
569
567
|
style: dropdownStyle,
|
|
570
568
|
ref: dropDownRef
|
|
571
|
-
}, !dropdownRender && childrenToRender.length > 0 ? dropRender(eleOptionList, heightStyle) : null, renderNotContent(), /*#__PURE__*/React.createElement("div", null, dropdownRender ? dropdownRender(dropRender(childrenToRender, heightStyle)) : null), isMultiple && realChildren.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
569
|
+
}, !dropdownRender && childrenToRender.length > 0 ? dropRender(eleOptionList, heightStyle) : null, renderNotContent(), /*#__PURE__*/React.createElement("div", null, dropdownRender ? dropdownRender(dropRender(childrenToRender, heightStyle)) : null), isMultiple && realChildren.length > 0 ? (/*#__PURE__*/React.createElement("div", {
|
|
572
570
|
className: multipleFooterCls
|
|
573
571
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
574
572
|
style: checkboxStyle,
|
|
@@ -577,7 +575,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
577
575
|
onChange: handleSelectAll
|
|
578
576
|
}, "\u5168\u9009"), /*#__PURE__*/React.createElement("span", {
|
|
579
577
|
className: "".concat(selectPrefixCls, "-multiple-footer-hadSelected")
|
|
580
|
-
}, "\u5DF2\u9009", /*#__PURE__*/React.createElement("span", null, selectedVal === null || selectedVal === void 0 ? void 0 : selectedVal.length), "\u9879")) : null));
|
|
578
|
+
}, "\u5DF2\u9009", /*#__PURE__*/React.createElement("span", null, selectedVal === null || selectedVal === void 0 ? void 0 : selectedVal.length), "\u9879"))) : null));
|
|
581
579
|
};
|
|
582
580
|
// 处理多选tag
|
|
583
581
|
var handleMaxTagHolder = useCallback(function () {
|
|
@@ -640,11 +638,11 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
640
638
|
};
|
|
641
639
|
// 渲染多选选择器 (待优化:多选框下拉按钮样式调整,限制tag数代码优化)
|
|
642
640
|
var renderMultiple = function renderMultiple() {
|
|
643
|
-
var _context3,
|
|
641
|
+
var _context3, _context4;
|
|
644
642
|
var maxTagCount = selectProps.maxTagCount,
|
|
645
643
|
maxTagPlaceholder = selectProps.maxTagPlaceholder;
|
|
646
|
-
var multipleCls = classNames(commCls, (
|
|
647
|
-
var itemCls = classNames((
|
|
644
|
+
var multipleCls = classNames(commCls, _defineProperty(_defineProperty(_defineProperty({}, "".concat(selectPrefixCls, "-multiple-disabled"), disabled), _concatInstanceProperty(_context3 = "".concat(selectPrefixCls, "-")).call(_context3, mode), mode), "".concat(selectPrefixCls, "-focused"), focusd || optionShow));
|
|
645
|
+
var itemCls = classNames(_defineProperty(_defineProperty({}, "".concat(selectPrefixCls, "-selection-item"), true), _concatInstanceProperty(_context4 = "".concat(selectPrefixCls, "-selection-item-")).call(_context4, size), size));
|
|
648
646
|
var TagStyle = {
|
|
649
647
|
margin: '2px 8px 2px 0',
|
|
650
648
|
maxWidth: '100%'
|
|
@@ -652,10 +650,10 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
652
650
|
return /*#__PURE__*/React.createElement("div", {
|
|
653
651
|
className: multipleCls,
|
|
654
652
|
ref: selectionRef
|
|
655
|
-
}, Array.isArray(mulOptions) ? /*#__PURE__*/React.createElement(React.Fragment, null, _mapInstanceProperty(mulOptions).call(mulOptions, function (item, index) {
|
|
653
|
+
}, Array.isArray(mulOptions) ? (/*#__PURE__*/React.createElement(React.Fragment, null, _mapInstanceProperty(mulOptions).call(mulOptions, function (item, index) {
|
|
656
654
|
var label = item.label,
|
|
657
655
|
value = item.value;
|
|
658
|
-
return !maxTagCount || index <= maxTagCount - 1 ? /*#__PURE__*/React.createElement("span", {
|
|
656
|
+
return !maxTagCount || index <= maxTagCount - 1 ? (/*#__PURE__*/React.createElement("span", {
|
|
659
657
|
key: value,
|
|
660
658
|
className: classNames("".concat(selectPrefixCls, "-selection-tag")),
|
|
661
659
|
onMouseDown: function onMouseDown(e) {
|
|
@@ -667,7 +665,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
667
665
|
label: label,
|
|
668
666
|
disabled: disabled,
|
|
669
667
|
size: size
|
|
670
|
-
}) : /*#__PURE__*/React.createElement(Tag, {
|
|
668
|
+
}) : (/*#__PURE__*/React.createElement(Tag, {
|
|
671
669
|
type: "edit",
|
|
672
670
|
style: TagStyle,
|
|
673
671
|
size: size,
|
|
@@ -677,12 +675,12 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
677
675
|
return handleRemove(e, value);
|
|
678
676
|
},
|
|
679
677
|
"data-tag": value
|
|
680
|
-
}, label)) : null;
|
|
681
|
-
}), maxTagCount && mulOptions.length > maxTagCount ? maxTagPlaceholder ? handleMaxTagHolder() : /*#__PURE__*/React.createElement("span", {
|
|
678
|
+
}, label)))) : null;
|
|
679
|
+
}), maxTagCount && mulOptions.length > maxTagCount ? maxTagPlaceholder ? handleMaxTagHolder() : (/*#__PURE__*/React.createElement("span", {
|
|
682
680
|
className: itemCls
|
|
683
681
|
}, /*#__PURE__*/React.createElement("span", {
|
|
684
682
|
className: "".concat(selectPrefixCls, "-selection-item-content")
|
|
685
|
-
}, "\u5171", mulOptions.length, "\u9879")) : null) : null, /*#__PURE__*/React.createElement("span", {
|
|
683
|
+
}, "\u5171", mulOptions.length, "\u9879"))) : null)) : null, /*#__PURE__*/React.createElement("span", {
|
|
686
684
|
className: "".concat(selectPrefixCls, "-selection-search"),
|
|
687
685
|
style: {
|
|
688
686
|
width: inputWidth
|
|
@@ -704,7 +702,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
704
702
|
className: "".concat(selectPrefixCls, "-suffix")
|
|
705
703
|
}, renderSuffix()));
|
|
706
704
|
};
|
|
707
|
-
var singleCls = classNames(commCls, (
|
|
705
|
+
var singleCls = classNames(commCls, _defineProperty(_defineProperty(_defineProperty({}, "".concat(selectPrefixCls, "-single"), true), "".concat(selectPrefixCls, "-single-disabled"), disabled), "".concat(selectPrefixCls, "-single-focused"), focusd && !disabled || optionShow));
|
|
708
706
|
// keyboard
|
|
709
707
|
var getActiveIndex = function getActiveIndex(index) {
|
|
710
708
|
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
@@ -756,10 +754,10 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
756
754
|
}
|
|
757
755
|
};
|
|
758
756
|
});
|
|
759
|
-
var
|
|
760
|
-
|
|
761
|
-
activeIndex =
|
|
762
|
-
setActiveIndex =
|
|
757
|
+
var _useState11 = useState(isShowSearch ? getActiveIndex(0) : -1),
|
|
758
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
759
|
+
activeIndex = _useState12[0],
|
|
760
|
+
setActiveIndex = _useState12[1];
|
|
763
761
|
var onInternalKeyDown = function onInternalKeyDown(e) {
|
|
764
762
|
var _a, _b;
|
|
765
763
|
var which = e.which;
|
package/es/slider/marks.d.ts
CHANGED
|
@@ -13,5 +13,5 @@ export interface marksProps {
|
|
|
13
13
|
bound: number;
|
|
14
14
|
onClickLabel: (e: React.MouseEvent | React.TouchEvent, point: React.ReactNode | markObjProps) => void;
|
|
15
15
|
}
|
|
16
|
-
declare function Marks(props: marksProps): JSX.Element;
|
|
16
|
+
declare function Marks(props: marksProps): React.JSX.Element;
|
|
17
17
|
export default Marks;
|
package/es/slider/marks.js
CHANGED
|
@@ -20,7 +20,6 @@ function Marks(props) {
|
|
|
20
20
|
var elements = _mapInstanceProperty(_context = _sortInstanceProperty(_context2 = _mapInstanceProperty(_context3 = _Object$keys(marks)).call(_context3, parseFloat)).call(_context2, function (a, b) {
|
|
21
21
|
return a - b;
|
|
22
22
|
})).call(_context, function (point) {
|
|
23
|
-
var _classNames;
|
|
24
23
|
// 判断label元素 可能是reactNode 也可能是{label: reactNode, style: css}
|
|
25
24
|
var markNode = marks[point];
|
|
26
25
|
var isObject = _typeof(markNode) === 'object' && ! /*#__PURE__*/React.isValidElement(markNode);
|
|
@@ -30,7 +29,7 @@ function Marks(props) {
|
|
|
30
29
|
var offset = "".concat(Math.abs(point - min) / range * 100, "%");
|
|
31
30
|
var markStyle = vertical ? _extends(_defineProperty({}, reverse ? 'top' : 'bottom', offset), markLabelStyle) : _extends(_defineProperty({}, reverse ? 'right' : 'left', offset), markLabelStyle);
|
|
32
31
|
var isActived = bound >= point;
|
|
33
|
-
var markClass = classNames((
|
|
32
|
+
var markClass = classNames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-mark-text"), true), "".concat(prefixCls, "-mark-text-actived"), isActived));
|
|
34
33
|
return /*#__PURE__*/React.createElement("span", {
|
|
35
34
|
className: markClass,
|
|
36
35
|
key: point,
|
package/es/slider/slider.js
CHANGED
|
@@ -23,7 +23,6 @@ import { useMergedState } from '../_utils/hooks';
|
|
|
23
23
|
import { getHandleCenterposition, ensureValueInRange, ensureValuePrecision } from './utils';
|
|
24
24
|
// remove this line and code Slider component here
|
|
25
25
|
var InteranalSlider = function InteranalSlider(props, ref) {
|
|
26
|
-
var _classNames;
|
|
27
26
|
var _useContext = useContext(ConfigContext),
|
|
28
27
|
getPrefixCls = _useContext.getPrefixCls,
|
|
29
28
|
prefixCls = _useContext.prefixCls,
|
|
@@ -56,7 +55,7 @@ var InteranalSlider = function InteranalSlider(props, ref) {
|
|
|
56
55
|
var thisSliderRef = useRef();
|
|
57
56
|
var sliderRef = ref || thisSliderRef;
|
|
58
57
|
var handleRef = useRef();
|
|
59
|
-
var sliderClasses = classNames(sliderPrefixCls, className, (
|
|
58
|
+
var sliderClasses = classNames(sliderPrefixCls, className, _defineProperty(_defineProperty(_defineProperty({}, "".concat(sliderPrefixCls, "-vertical"), vertical), "".concat(sliderPrefixCls, "-disabled"), disabled), "".concat(sliderPrefixCls, "-reverse"), reverse));
|
|
60
59
|
var _useMergedState = useMergedState(0, {
|
|
61
60
|
defaultValue: defaultValue,
|
|
62
61
|
value: propsValue
|
|
@@ -13,7 +13,6 @@ import React, { useRef } from 'react';
|
|
|
13
13
|
import Tooltip from '../tooltip';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
var SliderTooltip = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
16
|
-
var _ref, _ref2;
|
|
17
16
|
var visible = props.visible,
|
|
18
17
|
prefixCls = props.prefixCls,
|
|
19
18
|
reverse = props.reverse,
|
|
@@ -28,7 +27,7 @@ var SliderTooltip = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
28
27
|
var sliderHandleClass = classNames("".concat(prefixCls, "-handle"), _defineProperty({}, "".concat(prefixCls, "-reverse"), reverse));
|
|
29
28
|
var range = max - min;
|
|
30
29
|
var offset = "".concat(Math.abs(bound - min) / range * 100, "%");
|
|
31
|
-
var handleStyle = vertical ? (
|
|
30
|
+
var handleStyle = vertical ? _defineProperty(_defineProperty({}, reverse ? 'top' : 'bottom', offset), reverse ? 'bottom' : 'top', 'auto') : _defineProperty(_defineProperty({}, reverse ? 'right' : 'left', offset), reverse ? 'left' : 'right', 'auto');
|
|
32
31
|
var placement = vertical ? 'right' : 'top';
|
|
33
32
|
return /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
34
33
|
ref: tooltipRef
|
package/es/slider/steps.d.ts
CHANGED
package/es/slider/steps.js
CHANGED
|
@@ -33,11 +33,10 @@ function steps(props) {
|
|
|
33
33
|
bound = props.bound;
|
|
34
34
|
var range = max - min;
|
|
35
35
|
var elements = _mapInstanceProperty(_context3 = getAllMarkPoints(marks, dots, step, min, max)).call(_context3, function (point) {
|
|
36
|
-
var _classNames;
|
|
37
36
|
var isActived = bound >= point;
|
|
38
37
|
var offset = "".concat(Math.abs(point - min) / range * 100, "%");
|
|
39
38
|
var style = vertical ? _defineProperty({}, reverse ? 'top' : 'bottom', offset) : _defineProperty({}, reverse ? 'right' : 'left', offset);
|
|
40
|
-
var markPointClass = classNames((
|
|
39
|
+
var markPointClass = classNames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-dot"), true), "".concat(prefixCls, "-dot-actived"), isActived));
|
|
41
40
|
return /*#__PURE__*/React.createElement("span", {
|
|
42
41
|
className: markPointClass,
|
|
43
42
|
key: point,
|
package/es/slider/track.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface trackProps {
|
|
3
3
|
prefixCls: string;
|
|
4
4
|
vertical: boolean;
|
|
@@ -7,5 +7,5 @@ interface trackProps {
|
|
|
7
7
|
min: number;
|
|
8
8
|
max: number;
|
|
9
9
|
}
|
|
10
|
-
declare function Track(props: trackProps): JSX.Element;
|
|
10
|
+
declare function Track(props: trackProps): React.JSX.Element;
|
|
11
11
|
export default Track;
|
package/es/slider/track.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
function Track(props) {
|
|
4
|
-
var _ref, _ref2;
|
|
5
4
|
var prefixCls = props.prefixCls,
|
|
6
5
|
vertical = props.vertical,
|
|
7
6
|
reverse = props.reverse,
|
|
@@ -10,7 +9,7 @@ function Track(props) {
|
|
|
10
9
|
max = props.max;
|
|
11
10
|
var range = max - min;
|
|
12
11
|
var offset = "".concat(Math.abs(bound - min) / range * 100, "%");
|
|
13
|
-
var trackStyle = vertical ? (
|
|
12
|
+
var trackStyle = vertical ? _defineProperty(_defineProperty(_defineProperty({}, reverse ? 'top' : 'bottom', '0%'), reverse ? 'bottom' : 'top', 'auto'), "height", offset) : _defineProperty(_defineProperty(_defineProperty({}, reverse ? 'right' : 'left', '0%'), reverse ? 'left' : 'right', 'auto'), "width", offset);
|
|
14
13
|
return /*#__PURE__*/React.createElement("div", {
|
|
15
14
|
className: "".concat(prefixCls, "-track"),
|
|
16
15
|
style: trackStyle
|
package/es/space/space.js
CHANGED
|
@@ -53,19 +53,19 @@ var Space = function Space(props) {
|
|
|
53
53
|
'--rgap': gap.row && gap.row + 'px'
|
|
54
54
|
}, style);
|
|
55
55
|
var spaceClass = classNames(prefixCls, className, _concatInstanceProperty(_context = "".concat(prefixCls, "-")).call(_context, direction), _concatInstanceProperty(_context2 = "".concat(prefixCls, "-align-")).call(_context2, align), _defineProperty({}, "".concat(prefixCls, "-wrap"), wrap));
|
|
56
|
-
var
|
|
56
|
+
var _renderItems = function renderItems(children) {
|
|
57
57
|
var _context3;
|
|
58
58
|
return _mapInstanceProperty(_context3 = React.Children).call(_context3, children, function (child) {
|
|
59
59
|
if (child === null || child === void 0 ? void 0 : child.type) {
|
|
60
60
|
if (_typeof(child.type) === 'symbol') {
|
|
61
|
-
return
|
|
61
|
+
return _renderItems(child.props.children);
|
|
62
62
|
}
|
|
63
63
|
return child;
|
|
64
64
|
}
|
|
65
65
|
if (child) return /*#__PURE__*/React.createElement("span", null, child);
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
|
-
var Items =
|
|
68
|
+
var Items = _renderItems(children);
|
|
69
69
|
if (split) {
|
|
70
70
|
for (var i = 1; i < Items.length; i += 2) {
|
|
71
71
|
_spliceInstanceProperty(Items).call(Items, i, 0, /*#__PURE__*/React.cloneElement((split === null || split === void 0 ? void 0 : split.type) ? split : /*#__PURE__*/React.createElement("span", null, split), {
|