@kdcloudjs/kdesign 1.7.33-stable.12 → 1.7.33-stable.12-hotfix.3
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 +8518 -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 +78 -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 +86 -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
package/es/spin/spin.js
CHANGED
|
@@ -19,7 +19,7 @@ import devWarning from '../_utils/devwarning';
|
|
|
19
19
|
export var SpinTypes = tuple('page', 'container', 'component');
|
|
20
20
|
// remove this line and code Spin component here
|
|
21
21
|
var InteranalSpin = function InteranalSpin(props, ref) {
|
|
22
|
-
var _context
|
|
22
|
+
var _context;
|
|
23
23
|
var _useContext = useContext(ConfigContext),
|
|
24
24
|
getPrefixCls = _useContext.getPrefixCls,
|
|
25
25
|
prefixCls = _useContext.prefixCls,
|
|
@@ -36,7 +36,7 @@ var InteranalSpin = function InteranalSpin(props, ref) {
|
|
|
36
36
|
others = __rest(spinProps, ["children", "className", "indicator", "spinning", "style", "tip", "type", "prefixCls"]);
|
|
37
37
|
devWarning(SpinTypes.indexOf(type) === -1, 'spin', "cannot found spin type '".concat(type, "'"));
|
|
38
38
|
var spinPrefixCls = getPrefixCls(prefixCls, 'spin', customPrefixcls);
|
|
39
|
-
var spinClasses = classNames(spinPrefixCls, className, (
|
|
39
|
+
var spinClasses = classNames(spinPrefixCls, className, _defineProperty(_defineProperty(_defineProperty({}, _concatInstanceProperty(_context = "".concat(spinPrefixCls, "-")).call(_context, type), type), "".concat(spinPrefixCls, "-indicator-container"), true), "".concat(spinPrefixCls, "-has-children"), children));
|
|
40
40
|
// ref
|
|
41
41
|
var thisSpinRef = useRef();
|
|
42
42
|
var spinRef = ref || thisSpinRef;
|
|
@@ -82,19 +82,19 @@ var InteranalSpin = function InteranalSpin(props, ref) {
|
|
|
82
82
|
var singleStyle = children ? null : style;
|
|
83
83
|
var hasChildrenRef = children ? spinRef : null;
|
|
84
84
|
var singleRef = children ? null : spinRef;
|
|
85
|
-
var spinNode = spinning ? /*#__PURE__*/React.createElement("div", _extends({
|
|
85
|
+
var spinNode = spinning ? (/*#__PURE__*/React.createElement("div", _extends({
|
|
86
86
|
className: spinClasses,
|
|
87
87
|
ref: singleRef,
|
|
88
88
|
style: singleStyle
|
|
89
|
-
}, others), indicatorNode, tip || '') : null;
|
|
89
|
+
}, others), indicatorNode, tip || '')) : null;
|
|
90
90
|
var childrenParentClasses = classNames(_defineProperty({}, "".concat(spinPrefixCls, "-children-container"), children && spinning));
|
|
91
|
-
var spinHasChildren = children ? /*#__PURE__*/React.createElement("div", {
|
|
91
|
+
var spinHasChildren = children ? (/*#__PURE__*/React.createElement("div", {
|
|
92
92
|
className: "".concat(spinPrefixCls, "-children-wrapper"),
|
|
93
93
|
style: hasChildrenStyle,
|
|
94
94
|
ref: hasChildrenRef
|
|
95
95
|
}, spinNode, /*#__PURE__*/React.createElement("div", {
|
|
96
96
|
className: childrenParentClasses
|
|
97
|
-
}, children)) : spinNode;
|
|
97
|
+
}, children))) : spinNode;
|
|
98
98
|
return spinHasChildren;
|
|
99
99
|
};
|
|
100
100
|
var Spin = /*#__PURE__*/React.forwardRef(InteranalSpin);
|
|
@@ -72,13 +72,13 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
72
72
|
computeMin = _useState8[0],
|
|
73
73
|
setComputeMin = _useState8[1];
|
|
74
74
|
var _useState9 = useState(100),
|
|
75
|
-
|
|
76
|
-
computeMax =
|
|
77
|
-
setComputeMax =
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
offsetCache =
|
|
81
|
-
setOffsetCache =
|
|
75
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
76
|
+
computeMax = _useState0[0],
|
|
77
|
+
setComputeMax = _useState0[1];
|
|
78
|
+
var _useState1 = useState(0),
|
|
79
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
80
|
+
offsetCache = _useState10[0],
|
|
81
|
+
setOffsetCache = _useState10[1];
|
|
82
82
|
var isFirstPanelHide = offset === 0;
|
|
83
83
|
var isSecondPanelHide = offset === 100;
|
|
84
84
|
var canDrag = offset >= computeMin && offset <= computeMax;
|
package/es/stepper/stepper.js
CHANGED
|
@@ -57,9 +57,9 @@ var InternalStepper = function InternalStepper(props, ref) {
|
|
|
57
57
|
setValue = _useMergedState2[1];
|
|
58
58
|
// class
|
|
59
59
|
var getStepBtnClassNames = function getStepBtnClassNames(stepType, btnType) {
|
|
60
|
-
var _context, _context2, _context3, _context4, _context5, _context6, _context7
|
|
60
|
+
var _context, _context2, _context3, _context4, _context5, _context6, _context7;
|
|
61
61
|
var isDisabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
62
|
-
return classNames((
|
|
62
|
+
return classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, _concatInstanceProperty(_context = "".concat(inputPrefixCls, "-")).call(_context, stepType, "Step"), true), _concatInstanceProperty(_context2 = "".concat(inputPrefixCls, "-")).call(_context2, stepType, "Step-disabled"), isDisabled), _concatInstanceProperty(_context3 = _concatInstanceProperty(_context4 = "".concat(inputPrefixCls, "-")).call(_context4, stepType, "Step-")).call(_context3, btnType), btnType), _concatInstanceProperty(_context5 = "".concat(inputPrefixCls, "-")).call(_context5, stepType, "Step-small"), inputNumberProps.size === 'small'), _concatInstanceProperty(_context6 = "".concat(inputPrefixCls, "-")).call(_context6, stepType, "Step-middle"), inputNumberProps.size === 'middle'), _concatInstanceProperty(_context7 = "".concat(inputPrefixCls, "-")).call(_context7, stepType, "Step-large"), inputNumberProps.size === 'large'), stepBtnClassName, stepType === 'base' && stepBtnClassName));
|
|
63
63
|
};
|
|
64
64
|
var getStepPrefix = function getStepPrefix() {
|
|
65
65
|
if (type === 'embed') {
|
|
@@ -79,7 +79,7 @@ var InternalStepper = function InternalStepper(props, ref) {
|
|
|
79
79
|
};
|
|
80
80
|
var getStepSuffix = function getStepSuffix() {
|
|
81
81
|
var increaseClassName = getStepBtnClassNames('base', 'increase', showMinusdisabled || disabled);
|
|
82
|
-
return type === 'embed' ? getEmbedStepView() : /*#__PURE__*/React.createElement("span", {
|
|
82
|
+
return type === 'embed' ? getEmbedStepView() : (/*#__PURE__*/React.createElement("span", {
|
|
83
83
|
className: increaseClassName,
|
|
84
84
|
onMouseDown: function onMouseDown() {
|
|
85
85
|
if (disabled) return;
|
|
@@ -88,7 +88,7 @@ var InternalStepper = function InternalStepper(props, ref) {
|
|
|
88
88
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
89
89
|
className: "".concat(inputPrefixCls, "-icon"),
|
|
90
90
|
type: "add"
|
|
91
|
-
}));
|
|
91
|
+
})));
|
|
92
92
|
};
|
|
93
93
|
var isLegal = function isLegal(value) {
|
|
94
94
|
var reg = /^[0-9]*\.?[0-9]+$/;
|
|
@@ -171,10 +171,9 @@ var InternalStepper = function InternalStepper(props, ref) {
|
|
|
171
171
|
return false;
|
|
172
172
|
}, [stepMouseDownDelayTimer, stepMouseDownIntervalTimer]);
|
|
173
173
|
var getEmbedStepView = function getEmbedStepView() {
|
|
174
|
-
var _classNames2, _classNames3;
|
|
175
174
|
var embedStepClassName = getStepBtnClassNames('embed');
|
|
176
|
-
var plusClassName = classNames("".concat(inputPrefixCls, "-embedStep-plus"), (
|
|
177
|
-
var minusClassName = classNames("".concat(inputPrefixCls, "-embedStep-minus"), (
|
|
175
|
+
var plusClassName = classNames("".concat(inputPrefixCls, "-embedStep-plus"), _defineProperty(_defineProperty({}, stepBtnClassName, stepBtnClassName), "".concat(inputPrefixCls, "-embedStep-disabled"), showMinusdisabled || disabled));
|
|
176
|
+
var minusClassName = classNames("".concat(inputPrefixCls, "-embedStep-minus"), _defineProperty(_defineProperty({}, stepBtnClassName, stepBtnClassName), "".concat(inputPrefixCls, "-embedStep-disabled"), showPlusdisabled || disabled));
|
|
178
177
|
return /*#__PURE__*/React.createElement("span", {
|
|
179
178
|
className: embedStepClassName
|
|
180
179
|
}, /*#__PURE__*/React.createElement("span", {
|
package/es/steps/Step.js
CHANGED
|
@@ -76,10 +76,10 @@ var Step = function Step(props) {
|
|
|
76
76
|
}, /*#__PURE__*/React.createElement("div", {
|
|
77
77
|
className: "".concat(prefixCls, "-item-title"),
|
|
78
78
|
title: isString(title) ? title : ''
|
|
79
|
-
}, title), description && /*#__PURE__*/React.createElement("div", {
|
|
79
|
+
}, title), description && (/*#__PURE__*/React.createElement("div", {
|
|
80
80
|
className: "".concat(prefixCls, "-item-description"),
|
|
81
81
|
title: isString(description) ? description : ''
|
|
82
|
-
}, description))));
|
|
82
|
+
}, description)))));
|
|
83
83
|
};
|
|
84
84
|
Step.displayName = 'Step';
|
|
85
85
|
export default Step;
|
package/es/steps/Steps.js
CHANGED
|
@@ -20,7 +20,7 @@ import { toArray } from '../_utils/react-children';
|
|
|
20
20
|
import { Icon } from '../index';
|
|
21
21
|
import { Directions, Statuses, LabelPlacements } from './interface';
|
|
22
22
|
var Steps = function Steps(props) {
|
|
23
|
-
var _context,
|
|
23
|
+
var _context, _context2;
|
|
24
24
|
var _useContext = useContext(ConfigContext),
|
|
25
25
|
getPrefixCls = _useContext.getPrefixCls,
|
|
26
26
|
prefixCls = _useContext.prefixCls,
|
|
@@ -46,7 +46,7 @@ var Steps = function Steps(props) {
|
|
|
46
46
|
devWarning(Statuses.indexOf(status) === -1, 'steps', "cannot found steps status '".concat(status, "'"));
|
|
47
47
|
devWarning(LabelPlacements.indexOf(labelPlacement) === -1, 'steps', "cannot found steps labelPlacement '".concat(labelPlacement, "'"));
|
|
48
48
|
var stepsPrefixCls = getPrefixCls(prefixCls, 'steps', customPrefixcls); // 按钮样式前缀
|
|
49
|
-
var stepsClassName = classNames(stepsPrefixCls, _concatInstanceProperty(_context = "".concat(stepsPrefixCls, "-")).call(_context, direction), className, (
|
|
49
|
+
var stepsClassName = classNames(stepsPrefixCls, _concatInstanceProperty(_context = "".concat(stepsPrefixCls, "-")).call(_context, direction), className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(stepsPrefixCls, "-leftLable"), labelPlacement === 'left'), "".concat(stepsPrefixCls, "-rightLable"), labelPlacement === 'right'), "".concat(stepsPrefixCls, "-bottomLable"), labelPlacement === 'bottom'), "".concat(stepsPrefixCls, "-topLable"), labelPlacement === 'top'));
|
|
50
50
|
var onStepClick = function onStepClick(next) {
|
|
51
51
|
if (canClickCurrentStep || onChange && current !== next) {
|
|
52
52
|
onChange(next);
|
package/es/switch/switch.js
CHANGED
|
@@ -21,7 +21,7 @@ import { useMergedState } from '../_utils/hooks';
|
|
|
21
21
|
// type SwitchSize = 'large' | 'middle' | 'small'
|
|
22
22
|
export var SwitchSizes = tuple('large', 'small');
|
|
23
23
|
var Switch = function Switch(props) {
|
|
24
|
-
var _context
|
|
24
|
+
var _context;
|
|
25
25
|
var _useContext = useContext(ConfigContext),
|
|
26
26
|
getPrefixCls = _useContext.getPrefixCls,
|
|
27
27
|
prefixCls = _useContext.prefixCls,
|
|
@@ -62,13 +62,13 @@ var Switch = function Switch(props) {
|
|
|
62
62
|
return afterChangedChecked;
|
|
63
63
|
}
|
|
64
64
|
// ref
|
|
65
|
-
var switchClasses = classNames(switchPrefixCls, className, (
|
|
66
|
-
var loadingIcon = loading ? /*#__PURE__*/React.createElement("span", {
|
|
65
|
+
var switchClasses = classNames(switchPrefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, _concatInstanceProperty(_context = "".concat(switchPrefixCls, "-size-")).call(_context, size), size), "".concat(switchPrefixCls, "-disabled"), disabled || loading), "".concat(switchPrefixCls, "-loading"), loading), "".concat(switchPrefixCls, "-checked"), newChecked));
|
|
66
|
+
var loadingIcon = loading ? (/*#__PURE__*/React.createElement("span", {
|
|
67
67
|
className: "".concat(switchPrefixCls, "-loading-icon")
|
|
68
68
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
69
69
|
type: "loadding-circle",
|
|
70
70
|
spin: true
|
|
71
|
-
})) : null;
|
|
71
|
+
}))) : null;
|
|
72
72
|
return /*#__PURE__*/React.createElement("span", _extends({
|
|
73
73
|
className: switchClasses
|
|
74
74
|
}, others, {
|
package/es/table/table.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
2
3
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
3
4
|
import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/sort";
|
|
5
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
6
|
+
var t = {};
|
|
7
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
8
|
+
if (s != null && typeof _Object$getOwnPropertySymbols === "function") for (var i = 0, p = _Object$getOwnPropertySymbols(s); i < p.length; i++) {
|
|
9
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
4
13
|
import React, { forwardRef, useContext, useImperativeHandle, useRef } from 'react';
|
|
5
14
|
import { Table as BaseTable, useTablePipeline } from '@kdcloudjs/table';
|
|
6
15
|
import ConfigContext from '../config-provider/ConfigContext';
|
|
@@ -58,11 +67,13 @@ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
58
67
|
scrollLoad = props.scrollLoad,
|
|
59
68
|
_props$columnGroupExt = props.columnGroupExtend,
|
|
60
69
|
columnGroupExtend = _props$columnGroupExt === void 0 ? {} : _props$columnGroupExt,
|
|
61
|
-
rowDrag = props.rowDrag
|
|
70
|
+
rowDrag = props.rowDrag,
|
|
71
|
+
others = __rest(props, ["columns", "dataSource", "columnDrag", "columnResize", "primaryKey", "rowSelection", "rowDetail", "filter", "sort", "autoRowSpan", "treeMode", "prefixCls", "className", "style", "components", "isLoading", "footerDataSource", "useVirtual", "estimatedRowHeight", "emptyCellHeight", "hasHeader", "useOuterBorder", "defaultColumnWidth", "getRowProps", "getTableProps", "contextMenu", "rangeSelection", "cssVariables", "stickyScrollHeight", "scrollbarWidth", "scrollLoad", "columnGroupExtend", "rowDrag"]);
|
|
62
72
|
var _useContext = useContext(ConfigContext),
|
|
63
73
|
getPrefixCls = _useContext.getPrefixCls,
|
|
64
74
|
prefixCls = _useContext.prefixCls,
|
|
65
|
-
locale = _useContext.locale
|
|
75
|
+
locale = _useContext.locale,
|
|
76
|
+
isMobile = _useContext.isMobile;
|
|
66
77
|
var tablePrefixCls = getPrefixCls(prefixCls, customPrefixcls);
|
|
67
78
|
var tableCls = classNames(tablePrefixCls, className);
|
|
68
79
|
var localeText = locale.getCompLangMsg({
|
|
@@ -73,7 +84,8 @@ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
73
84
|
Checkbox: (components === null || components === void 0 ? void 0 : components.Checkbox) || Checkbox,
|
|
74
85
|
Radio: (components === null || components === void 0 ? void 0 : components.Radio) || Radio
|
|
75
86
|
},
|
|
76
|
-
localeText: localeText
|
|
87
|
+
localeText: localeText,
|
|
88
|
+
isMobile: isMobile
|
|
77
89
|
}).primaryKey(primaryKey === undefined ? '' : primaryKey).input({
|
|
78
90
|
columns: columns,
|
|
79
91
|
dataSource: dataSource
|
|
@@ -144,8 +156,12 @@ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
144
156
|
cssVariables: cssVariables,
|
|
145
157
|
stickyScrollHeight: stickyScrollHeight,
|
|
146
158
|
scrollbarWidth: scrollbarWidth,
|
|
147
|
-
scrollLoad: scrollLoad
|
|
148
|
-
|
|
159
|
+
scrollLoad: scrollLoad,
|
|
160
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
161
|
+
// @ts-ignore
|
|
162
|
+
isMobile: isMobile,
|
|
163
|
+
prefixCls: prefixCls
|
|
164
|
+
}, others));
|
|
149
165
|
});
|
|
150
166
|
Table.displayName = 'Table';
|
|
151
167
|
export default Table;
|
package/es/tabs/arrow-button.js
CHANGED
|
@@ -6,7 +6,7 @@ import ConfigContext from '../config-provider/ConfigContext';
|
|
|
6
6
|
import TabsContext from './context';
|
|
7
7
|
import Icon from '../icon';
|
|
8
8
|
var ArrowButton = function ArrowButton(props) {
|
|
9
|
-
var _context
|
|
9
|
+
var _context;
|
|
10
10
|
var context = useContext(TabsContext);
|
|
11
11
|
var _useContext = useContext(ConfigContext),
|
|
12
12
|
getPrefixCls = _useContext.getPrefixCls,
|
|
@@ -16,7 +16,7 @@ var ArrowButton = function ArrowButton(props) {
|
|
|
16
16
|
disabled = props.disabled,
|
|
17
17
|
onClick = props.onClick;
|
|
18
18
|
var arrowButtonPrefixCls = getPrefixCls(prefixCls, 'arrow-button');
|
|
19
|
-
var arrowButtonClasses = classNames(arrowButtonPrefixCls, className, (
|
|
19
|
+
var arrowButtonClasses = classNames(arrowButtonPrefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(arrowButtonPrefixCls, "-dynamic"), (context === null || context === void 0 ? void 0 : context.type) === 'dynamic'), _concatInstanceProperty(_context = "".concat(arrowButtonPrefixCls, "-")).call(_context, direction), direction), "".concat(arrowButtonPrefixCls, "-line"), (context === null || context === void 0 ? void 0 : context.type) === 'line'), "".concat(arrowButtonPrefixCls, "-disabled"), disabled));
|
|
20
20
|
return /*#__PURE__*/React.createElement("span", {
|
|
21
21
|
className: arrowButtonClasses,
|
|
22
22
|
onClick: onClick
|
package/es/tabs/style/index.css
CHANGED
|
@@ -385,7 +385,7 @@
|
|
|
385
385
|
max-width: var(--kd-c-tabs-pane-text-sizing-max-width);
|
|
386
386
|
}
|
|
387
387
|
.kd-tab-pane-text-active,
|
|
388
|
-
.kd-tab-pane-text:hover {
|
|
388
|
+
.kd-tab-pane-text-notMobile:hover {
|
|
389
389
|
color: var(--kd-c-tabs-color-text-active, var(--kd-g-color-theme, #5582f3));
|
|
390
390
|
}
|
|
391
391
|
.kd-tab-pane-text-disabled:hover {
|
|
@@ -472,12 +472,16 @@
|
|
|
472
472
|
-ms-flex-align: center;
|
|
473
473
|
align-items: center;
|
|
474
474
|
}
|
|
475
|
-
.kd-tab-pane-type-dynamic
|
|
475
|
+
.kd-tab-pane-type-dynamic .kd-tab-pane-operations .kdicon {
|
|
476
|
+
font-size: 16px;
|
|
477
|
+
}
|
|
478
|
+
.kd-tab-pane-type-dynamic.kd-tab-pane-box-active.kd-tab-pane-isMobile:not(.kd-tab-pane-disabled):hover .kd-tab-pane-operations span:first-child {
|
|
476
479
|
opacity: 1;
|
|
477
480
|
cursor: pointer;
|
|
478
481
|
}
|
|
479
|
-
.kd-tab-pane-type-dynamic .kd-tab-pane-operations
|
|
480
|
-
|
|
482
|
+
.kd-tab-pane-type-dynamic-notMobile:not(.kd-tab-pane-disabled):hover .kd-tab-pane-operations span:first-child {
|
|
483
|
+
opacity: 1;
|
|
484
|
+
cursor: pointer;
|
|
481
485
|
}
|
|
482
486
|
.kd-tab-pane-type-grid {
|
|
483
487
|
height: 24px;
|
|
@@ -506,7 +510,7 @@
|
|
|
506
510
|
.kd-tab-pane-type-grid.kd-tab-pane-disabled {
|
|
507
511
|
background-color: var(--kd-c-tabs-color-background-disabled, transparent);
|
|
508
512
|
}
|
|
509
|
-
.kd-tab-pane-
|
|
513
|
+
.kd-tab-pane-notMobile:hover {
|
|
510
514
|
color: var(--kd-c-tabs-color-text-active, var(--kd-g-color-theme, #5582f3));
|
|
511
515
|
}
|
|
512
516
|
.kd-tab-pane-operations {
|
package/es/tabs/style/index.less
CHANGED
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
text-overflow: ellipsis;
|
|
221
221
|
max-width: @tab-pane-text-max-width;
|
|
222
222
|
&-active,
|
|
223
|
-
|
|
223
|
+
&-notMobile:hover {
|
|
224
224
|
color: @tabPane-font-color-active;
|
|
225
225
|
}
|
|
226
226
|
&-disabled {
|
|
@@ -229,6 +229,7 @@
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
|
+
|
|
232
233
|
&-disabled {
|
|
233
234
|
color: @tabPane-font-color-disabled;
|
|
234
235
|
cursor: not-allowed;
|
|
@@ -303,6 +304,21 @@
|
|
|
303
304
|
margin: 0 0 0 4px;
|
|
304
305
|
display: inline-flex;
|
|
305
306
|
align-items: center;
|
|
307
|
+
.@{tabPane-prefix-cls}-operations .@{icon-prefix-cls} {
|
|
308
|
+
font-size: 16px;
|
|
309
|
+
}
|
|
310
|
+
&.@{tabPane-prefix-cls}-box-active {
|
|
311
|
+
&.@{tabPane-prefix-cls}-isMobile:not(.@{tabPane-prefix-cls}-disabled):hover {
|
|
312
|
+
.@{tabPane-prefix-cls}-operations {
|
|
313
|
+
span:first-child {
|
|
314
|
+
opacity: 1;
|
|
315
|
+
cursor: pointer;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
&-type-dynamic-notMobile {
|
|
306
322
|
&:not(.@{tabPane-prefix-cls}-disabled):hover {
|
|
307
323
|
.@{tabPane-prefix-cls}-operations {
|
|
308
324
|
span:first-child {
|
|
@@ -311,9 +327,6 @@
|
|
|
311
327
|
}
|
|
312
328
|
}
|
|
313
329
|
}
|
|
314
|
-
.@{tabPane-prefix-cls}-operations .@{icon-prefix-cls} {
|
|
315
|
-
font-size: 16px;
|
|
316
|
-
}
|
|
317
330
|
}
|
|
318
331
|
&-type-grid {
|
|
319
332
|
height: 24px;
|
|
@@ -340,6 +353,8 @@
|
|
|
340
353
|
&.@{tabPane-prefix-cls}-disabled {
|
|
341
354
|
background-color: @tab-disabled-bg;
|
|
342
355
|
}
|
|
356
|
+
}
|
|
357
|
+
&-notMobile {
|
|
343
358
|
&:hover {
|
|
344
359
|
color: @tabPane-font-color-active;
|
|
345
360
|
}
|
package/es/tabs/tab-pane.js
CHANGED
|
@@ -9,12 +9,13 @@ import TabsContext from './context';
|
|
|
9
9
|
import { tuple } from '../_utils/type';
|
|
10
10
|
export var TabPaneTypes = tuple('line', 'card', 'grid', 'dynamic');
|
|
11
11
|
var TabPane = function TabPane(props) {
|
|
12
|
-
var _context, _context2, _context3
|
|
12
|
+
var _context, _context2, _context3;
|
|
13
13
|
var context = useContext(TabsContext);
|
|
14
14
|
var tabPaneRef = useRef(null);
|
|
15
15
|
var _useContext = useContext(ConfigContext),
|
|
16
16
|
getPrefixCls = _useContext.getPrefixCls,
|
|
17
|
-
prefixCls = _useContext.prefixCls
|
|
17
|
+
prefixCls = _useContext.prefixCls,
|
|
18
|
+
isMobile = _useContext.isMobile;
|
|
18
19
|
var tab = props.tab,
|
|
19
20
|
id = props.id,
|
|
20
21
|
className = props.className,
|
|
@@ -30,8 +31,8 @@ var TabPane = function TabPane(props) {
|
|
|
30
31
|
tabPaneProps.disabled = context.disabled || disabled;
|
|
31
32
|
}
|
|
32
33
|
var tabPanePrefixCls = getPrefixCls(prefixCls, 'tab-pane');
|
|
33
|
-
var tabPaneBoxClasses = classNames(tabPanePrefixCls, className, (
|
|
34
|
-
var tabPaneTextClasses = classNames("".concat(tabPanePrefixCls, "-text"), (
|
|
34
|
+
var tabPaneBoxClasses = classNames(tabPanePrefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(tabPanePrefixCls, "-box-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), "".concat(tabPanePrefixCls, "-type-dynamic-notMobile"), !isMobile), _concatInstanceProperty(_context = "".concat(tabPanePrefixCls, "-type-")).call(_context, tabPaneProps.type), tabPaneProps.type), _concatInstanceProperty(_context2 = "".concat(tabPanePrefixCls, "-")).call(_context2, tabPaneProps.position), tabPaneProps.position), _concatInstanceProperty(_context3 = "".concat(tabPanePrefixCls, "-")).call(_context3, tabPaneProps.size), tabPaneProps.size), "".concat(tabPanePrefixCls, "-disabled"), tabPaneProps.disabled), "".concat(tabPanePrefixCls, "-notMobile"), !isMobile), "".concat(tabPanePrefixCls, "-isMobile"), isMobile));
|
|
35
|
+
var tabPaneTextClasses = classNames("".concat(tabPanePrefixCls, "-text"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(tabPanePrefixCls, "-text-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), "".concat(tabPanePrefixCls, "-text-disabled"), tabPaneProps.disabled), "".concat(tabPanePrefixCls, "-text-notMobile"), !isMobile));
|
|
35
36
|
var operationsClasses = classNames("".concat(tabPanePrefixCls, "-operations"), _defineProperty({}, "".concat(tabPanePrefixCls, "-operations-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled));
|
|
36
37
|
var handleClick = function handleClick(e) {
|
|
37
38
|
if (tabPaneProps.disabled) return;
|
package/es/tabs/tabs.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface ITabsProps {
|
|
|
14
14
|
size?: TabsSize;
|
|
15
15
|
style?: Record<string, unknown>;
|
|
16
16
|
className?: string;
|
|
17
|
+
tabsDropdownClassName?: string;
|
|
17
18
|
disabled?: boolean;
|
|
18
19
|
noContainer?: boolean;
|
|
19
20
|
showScrollArrow?: boolean;
|
|
@@ -25,6 +26,7 @@ export interface ITabsProps {
|
|
|
25
26
|
onChange?: TabChangeEventHandler;
|
|
26
27
|
getActiveLinePosition?: (left: number, width: number) => void;
|
|
27
28
|
getTriggerKey?: (key: any) => void;
|
|
29
|
+
paneItemOperation?: boolean;
|
|
28
30
|
}
|
|
29
31
|
declare const Tabs: React.FC<ITabsProps>;
|
|
30
32
|
export default Tabs;
|
package/es/tabs/tabs.js
CHANGED
|
@@ -32,7 +32,7 @@ function getDefaultActiveKey(props) {
|
|
|
32
32
|
return activeKey;
|
|
33
33
|
}
|
|
34
34
|
var Tabs = function Tabs(props) {
|
|
35
|
-
var _context,
|
|
35
|
+
var _context, _context2, _context3, _context4;
|
|
36
36
|
var _useContext = useContext(ConfigContext),
|
|
37
37
|
getPrefixCls = _useContext.getPrefixCls,
|
|
38
38
|
prefixCls = _useContext.prefixCls,
|
|
@@ -49,8 +49,10 @@ var Tabs = function Tabs(props) {
|
|
|
49
49
|
showScrollArrow = tabsProps.showScrollArrow,
|
|
50
50
|
_tabsProps$effect = tabsProps.effect,
|
|
51
51
|
effect = _tabsProps$effect === void 0 ? 'none' : _tabsProps$effect,
|
|
52
|
+
tabsDropdownClassName = tabsProps.tabsDropdownClassName,
|
|
52
53
|
children = tabsProps.children,
|
|
53
|
-
onChange = tabsProps.onChange
|
|
54
|
+
onChange = tabsProps.onChange,
|
|
55
|
+
needPanelOpration = tabsProps.needPanelOpration;
|
|
54
56
|
var tabsPrefixCls = getPrefixCls(prefixCls, 'tabs', customPrefixcls);
|
|
55
57
|
var activeKey;
|
|
56
58
|
if (tabsProps.activeKey) {
|
|
@@ -78,20 +80,27 @@ var Tabs = function Tabs(props) {
|
|
|
78
80
|
width = _useState8[0],
|
|
79
81
|
setWidth = _useState8[1];
|
|
80
82
|
var _useState9 = useState(0),
|
|
81
|
-
|
|
82
|
-
boxWidth =
|
|
83
|
-
setBoxWidth =
|
|
83
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
84
|
+
boxWidth = _useState0[0],
|
|
85
|
+
setBoxWidth = _useState0[1];
|
|
86
|
+
var _useState1 = useState(0),
|
|
87
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
88
|
+
ListWidth = _useState10[0],
|
|
89
|
+
setListWidth = _useState10[1];
|
|
84
90
|
var _useState11 = useState(0),
|
|
85
91
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
var _useState13 = useState(0),
|
|
89
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
90
|
-
ListPostion = _useState14[0],
|
|
91
|
-
setListPosition = _useState14[1];
|
|
92
|
+
ListPostion = _useState12[0],
|
|
93
|
+
setListPosition = _useState12[1];
|
|
92
94
|
var tabRef = useRef(null);
|
|
93
95
|
var tabListRef = useRef(null);
|
|
94
96
|
var carouselRef = useRef(null);
|
|
97
|
+
var touchStartX = useRef(0);
|
|
98
|
+
var lastListPosition = useRef(0);
|
|
99
|
+
var isDragging = useRef(false);
|
|
100
|
+
var _useState13 = useState(false),
|
|
101
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
102
|
+
triggerState = _useState14[0],
|
|
103
|
+
setTriggerState = _useState14[1];
|
|
95
104
|
var handleActive = function handleActive(id, e) {
|
|
96
105
|
setCurActiveKey(id);
|
|
97
106
|
onChange && onChange(id, e);
|
|
@@ -103,6 +112,37 @@ var Tabs = function Tabs(props) {
|
|
|
103
112
|
var getTriggerKey = function getTriggerKey(key) {
|
|
104
113
|
setTriggerKey(key);
|
|
105
114
|
};
|
|
115
|
+
var handleTouchStart = function handleTouchStart(e) {
|
|
116
|
+
if (ListWidth <= boxWidth) return;
|
|
117
|
+
touchStartX.current = e.touches[0].clientX;
|
|
118
|
+
lastListPosition.current = ListPostion;
|
|
119
|
+
isDragging.current = true;
|
|
120
|
+
};
|
|
121
|
+
var handleTouchMove = function handleTouchMove(e) {
|
|
122
|
+
var _a, _b;
|
|
123
|
+
if (!isDragging.current || ListWidth <= boxWidth) return;
|
|
124
|
+
var path = ((_b = (_a = e.nativeEvent).composedPath) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];
|
|
125
|
+
var isFromTabList = path.some(function (el) {
|
|
126
|
+
var _a, _b, _c;
|
|
127
|
+
return (_c = (_b = (_a = el) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.contains) === null || _c === void 0 ? void 0 : _c.call(_b, "".concat(tabsPrefixCls, "-tab-list"));
|
|
128
|
+
});
|
|
129
|
+
if (!isFromTabList) return; // 阻止非 tab 区域触发移动逻辑
|
|
130
|
+
var currentX = e.touches[0].clientX;
|
|
131
|
+
var deltaX = currentX - touchStartX.current;
|
|
132
|
+
var newPosition = lastListPosition.current + deltaX;
|
|
133
|
+
var maxLeft = 0;
|
|
134
|
+
var maxRight = boxWidth - ListWidth;
|
|
135
|
+
if (newPosition > maxLeft) newPosition = maxLeft;
|
|
136
|
+
if (newPosition < maxRight) newPosition = maxRight;
|
|
137
|
+
setListPosition(newPosition);
|
|
138
|
+
};
|
|
139
|
+
var handleTouchEnd = function handleTouchEnd() {
|
|
140
|
+
if (ListWidth <= boxWidth) return;
|
|
141
|
+
isDragging.current = false;
|
|
142
|
+
};
|
|
143
|
+
var handleVisibleChange = function handleVisibleChange(visible) {
|
|
144
|
+
setTriggerState(visible);
|
|
145
|
+
};
|
|
106
146
|
useEffect(function () {
|
|
107
147
|
setCurActiveKey(activeKey);
|
|
108
148
|
}, [activeKey]);
|
|
@@ -142,8 +182,8 @@ var Tabs = function Tabs(props) {
|
|
|
142
182
|
// return
|
|
143
183
|
}
|
|
144
184
|
}, [tabRef, left, width, type, ListWidth]);
|
|
145
|
-
var tabsClasses = classNames(tabsPrefixCls, className, (
|
|
146
|
-
var tabNavsClasses = classNames("".concat(tabsPrefixCls, "-navs"), (
|
|
185
|
+
var tabsClasses = classNames(tabsPrefixCls, className, _defineProperty(_defineProperty({}, _concatInstanceProperty(_context = "".concat(tabsPrefixCls, "-")).call(_context, position), position), "".concat(tabsPrefixCls, "-noContainer"), noContainer));
|
|
186
|
+
var tabNavsClasses = classNames("".concat(tabsPrefixCls, "-navs"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, _concatInstanceProperty(_context2 = "".concat(tabsPrefixCls, "-navs-")).call(_context2, type), type), _concatInstanceProperty(_context3 = "".concat(tabsPrefixCls, "-navs-")).call(_context3, position), position), _concatInstanceProperty(_context4 = "".concat(tabsPrefixCls, "-navs-")).call(_context4, size), size), "".concat(tabsPrefixCls, "-navs-disabled"), disabled));
|
|
147
187
|
var leftOperations;
|
|
148
188
|
var rightOperations;
|
|
149
189
|
var contextMenuList;
|
|
@@ -187,9 +227,9 @@ var Tabs = function Tabs(props) {
|
|
|
187
227
|
}) : null;
|
|
188
228
|
};
|
|
189
229
|
var renderLeftArrow = function renderLeftArrow() {
|
|
190
|
-
var _context5
|
|
230
|
+
var _context5;
|
|
191
231
|
if (!showScrollArrow || position === 'left' || ListWidth < boxWidth) return null;
|
|
192
|
-
var leftClasses = classNames("".concat(tabsPrefixCls, "-left-arrows"), (
|
|
232
|
+
var leftClasses = classNames("".concat(tabsPrefixCls, "-left-arrows"), _defineProperty(_defineProperty({}, _concatInstanceProperty(_context5 = "".concat(tabsPrefixCls, "-left-arrows-")).call(_context5, type), type), "".concat(tabsPrefixCls, "-left-arrows-noshadow"), ListPostion === 0));
|
|
193
233
|
var handleLeft = function handleLeft() {
|
|
194
234
|
if (!ListPostion) return;
|
|
195
235
|
var offset = ListPostion + boxWidth > 0 ? 0 : ListPostion + boxWidth;
|
|
@@ -204,20 +244,18 @@ var Tabs = function Tabs(props) {
|
|
|
204
244
|
}));
|
|
205
245
|
};
|
|
206
246
|
var renderRightArrows = function renderRightArrows(nodes) {
|
|
207
|
-
var _context6, _context7,
|
|
247
|
+
var _context6, _context7, _context8;
|
|
208
248
|
if (ListWidth < boxWidth || _includesInstanceProperty(_context6 = ['left', 'right']).call(_context6, position)) return null;
|
|
209
|
-
var rightClasses = classNames("".concat(tabsPrefixCls, "-right-arrows"), (
|
|
210
|
-
var menu =
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
return tmp;
|
|
220
|
-
});
|
|
249
|
+
var rightClasses = classNames("".concat(tabsPrefixCls, "-right-arrows"), _defineProperty(_defineProperty({}, _concatInstanceProperty(_context7 = "".concat(tabsPrefixCls, "-right-arrows-")).call(_context7, type), type), "".concat(tabsPrefixCls, "-right-arrows-noshadow"), ListWidth + ListPostion === boxWidth));
|
|
250
|
+
var menu = /*#__PURE__*/React.createElement(Dropdown.Menu, {
|
|
251
|
+
className: classNames(tabsDropdownClassName, _defineProperty({}, "".concat(tabsPrefixCls, "-right-arrows-menu"), needPanelOpration))
|
|
252
|
+
}, _mapInstanceProperty(nodes).call(nodes, function (node) {
|
|
253
|
+
return /*#__PURE__*/React.createElement(Dropdown.Item, {
|
|
254
|
+
key: node.props.id,
|
|
255
|
+
disabled: node.props.disabled,
|
|
256
|
+
className: node.props.id === curActiveKey ? "".concat(tabsPrefixCls, "-right-arrows-menu-active") : undefined
|
|
257
|
+
}, /*#__PURE__*/React.createElement("span", null, node.props.tab));
|
|
258
|
+
}));
|
|
221
259
|
var handleRight = function handleRight() {
|
|
222
260
|
if (ListPostion === boxWidth - ListWidth) return;
|
|
223
261
|
var offset = ListPostion - boxWidth > boxWidth - ListWidth ? ListPostion - boxWidth : boxWidth - ListWidth;
|
|
@@ -241,16 +279,17 @@ var Tabs = function Tabs(props) {
|
|
|
241
279
|
}
|
|
242
280
|
return /*#__PURE__*/React.createElement("div", {
|
|
243
281
|
className: rightClasses
|
|
244
|
-
}, showScrollArrow ? /*#__PURE__*/React.createElement(ArrowButton, {
|
|
282
|
+
}, showScrollArrow ? (/*#__PURE__*/React.createElement(ArrowButton, {
|
|
245
283
|
direction: "right",
|
|
246
284
|
disabled: ListWidth + ListPostion === boxWidth,
|
|
247
285
|
onClick: handleRight
|
|
248
|
-
}) : null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
286
|
+
})) : null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
249
287
|
menu: menu,
|
|
250
288
|
trigger: ['click'],
|
|
251
|
-
onItemClick: handleSelectItem
|
|
289
|
+
onItemClick: handleSelectItem,
|
|
290
|
+
onVisibleChange: handleVisibleChange
|
|
252
291
|
}, /*#__PURE__*/React.createElement("span", {
|
|
253
|
-
className: "".concat(tabsPrefixCls, "-more-btn")
|
|
292
|
+
className: classNames("".concat(tabsPrefixCls, "-more-btn"), _concatInstanceProperty(_context8 = "".concat(tabsPrefixCls, "-trigger-")).call(_context8, triggerState))
|
|
254
293
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
255
294
|
type: "arrow-down"
|
|
256
295
|
}))));
|
|
@@ -336,7 +375,13 @@ var Tabs = function Tabs(props) {
|
|
|
336
375
|
}, renderWrap);
|
|
337
376
|
};
|
|
338
377
|
return /*#__PURE__*/React.createElement("div", _extends({}, omit(tabsProps, ['activeKey', 'defaultActiveKey', 'showScrollArrow', 'noContainer']), {
|
|
339
|
-
className: tabNavsClasses
|
|
378
|
+
className: tabNavsClasses,
|
|
379
|
+
onTouchStart: handleTouchStart,
|
|
380
|
+
onTouchMove: handleTouchMove,
|
|
381
|
+
onTouchEnd: handleTouchEnd,
|
|
382
|
+
style: {
|
|
383
|
+
touchAction: 'pan-y'
|
|
384
|
+
}
|
|
340
385
|
}), renderLeftOperations(), renderLeftArrow(), /*#__PURE__*/React.createElement("div", {
|
|
341
386
|
ref: tabRef,
|
|
342
387
|
className: "".concat(tabsPrefixCls, "-tab-wrap")
|
package/es/tag/tag.js
CHANGED
|
@@ -22,7 +22,7 @@ export var TagColors = tuple('process', 'success', 'warning', 'error', 'end', 'e
|
|
|
22
22
|
export var TagSizes = tuple('small', 'middle', 'large');
|
|
23
23
|
// remove this line and code Tag component here
|
|
24
24
|
var InteranalTag = function InteranalTag(props, ref) {
|
|
25
|
-
var _context, _context2, _context3
|
|
25
|
+
var _context, _context2, _context3;
|
|
26
26
|
var _useContext = useContext(ConfigContext),
|
|
27
27
|
getPrefixCls = _useContext.getPrefixCls,
|
|
28
28
|
prefixCls = _useContext.prefixCls,
|
|
@@ -77,7 +77,7 @@ var InteranalTag = function InteranalTag(props, ref) {
|
|
|
77
77
|
};
|
|
78
78
|
// 预设的颜色值
|
|
79
79
|
var isPresetColor = ['process', 'success', 'warning', 'error', 'end', 'expired'].indexOf(color) > -1;
|
|
80
|
-
var tagClasses = classNames(tagPrefixCls, className, (
|
|
80
|
+
var tagClasses = classNames(tagPrefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, _concatInstanceProperty(_context = "".concat(tagPrefixCls, "-shape-")).call(_context, type), type), _concatInstanceProperty(_context2 = "".concat(tagPrefixCls, "-")).call(_context2, color), isPresetColor), "".concat(tagPrefixCls, "-has-color"), !isPresetColor && color && type === 'attribute'), "".concat(tagPrefixCls, "-clickable"), clickable), "".concat(tagPrefixCls, "-closable"), closable), _concatInstanceProperty(_context3 = "".concat(tagPrefixCls, "-size-")).call(_context3, size), size), "".concat(tagPrefixCls, "-closable-disabled"), type === 'edit' && disabled));
|
|
81
81
|
// 设置自定义颜色值的样式
|
|
82
82
|
var tagColorStyle = !isPresetColor && color && type === 'attribute' ? {
|
|
83
83
|
backgroundColor: color
|
|
@@ -91,12 +91,12 @@ var InteranalTag = function InteranalTag(props, ref) {
|
|
|
91
91
|
type: "close",
|
|
92
92
|
className: "".concat(tagPrefixCls, "-close-icon")
|
|
93
93
|
});
|
|
94
|
-
var closeNode = closable && type === 'edit' ? disabled ? /*#__PURE__*/React.createElement("span", {
|
|
94
|
+
var closeNode = closable && type === 'edit' ? disabled ? (/*#__PURE__*/React.createElement("span", {
|
|
95
95
|
className: "".concat(tagPrefixCls, "-closeWrapper")
|
|
96
|
-
}, closeIconNode) : /*#__PURE__*/React.createElement("span", {
|
|
96
|
+
}, closeIconNode)) : (/*#__PURE__*/React.createElement("span", {
|
|
97
97
|
className: "".concat(tagPrefixCls, "-closeWrapper"),
|
|
98
98
|
onClick: handleClose
|
|
99
|
-
}, closeIconNode) : null;
|
|
99
|
+
}, closeIconNode)) : null;
|
|
100
100
|
return /*#__PURE__*/React.createElement("span", _extends({
|
|
101
101
|
ref: tagRef,
|
|
102
102
|
onClick: handleClick,
|