@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
|
@@ -110,7 +110,7 @@ function Panel(props) {
|
|
|
110
110
|
endPeriod = _getYearsPeriod.endPeriod;
|
|
111
111
|
var headerCls = classnames("".concat(prefixCls, "-header"), "".concat(prefixCls, "-header-year"));
|
|
112
112
|
return {
|
|
113
|
-
children: /*#__PURE__*/React.createElement(React.Fragment, null, startPeriod, " - ", endPeriod),
|
|
113
|
+
children: (/*#__PURE__*/React.createElement(React.Fragment, null, startPeriod, " - ", endPeriod)),
|
|
114
114
|
className: headerCls
|
|
115
115
|
};
|
|
116
116
|
};
|
|
@@ -133,18 +133,17 @@ function Panel(props) {
|
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
135
|
var renderDateHeader = function renderDateHeader() {
|
|
136
|
-
var _classnames, _classnames2;
|
|
137
136
|
var year = getYear(viewDate);
|
|
138
137
|
var month = getMonth(viewDate) + 1;
|
|
139
138
|
var headerCls = classnames("".concat(prefixCls, "-header"), "".concat(prefixCls, "-header-date"));
|
|
140
139
|
return {
|
|
141
|
-
children: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
142
|
-
className: classnames("".concat(prefixCls, "-header-text-inner"), (
|
|
140
|
+
children: (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
141
|
+
className: classnames("".concat(prefixCls, "-header-text-inner"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-header-text-inner-active"), innerPicker === 'year'), "".concat(prefixCls, "-header-text-inner-hover"), picker === 'date')),
|
|
143
142
|
onClick: onHeaderYearClick
|
|
144
143
|
}, year + locale.year), /*#__PURE__*/React.createElement("span", {
|
|
145
|
-
className: classnames("".concat(prefixCls, "-header-text-inner"), (
|
|
144
|
+
className: classnames("".concat(prefixCls, "-header-text-inner"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-header-text-inner-active"), innerPicker === 'month'), "".concat(prefixCls, "-header-text-inner-hover"), picker === 'date')),
|
|
146
145
|
onClick: onHeaderMonthClick
|
|
147
|
-
}, month + locale.month)),
|
|
146
|
+
}, month + locale.month))),
|
|
148
147
|
className: headerCls
|
|
149
148
|
};
|
|
150
149
|
};
|
|
@@ -350,9 +350,9 @@ var InternalDatePicker = function InternalDatePicker(props, ref) {
|
|
|
350
350
|
innerPicker: innerPicker,
|
|
351
351
|
setInnerPicker: setInnerPicker
|
|
352
352
|
}
|
|
353
|
-
}, panelNode, (extraFooter || rangesNode || todayNode) && innerPicker === undefined ? /*#__PURE__*/React.createElement("div", {
|
|
353
|
+
}, panelNode, (extraFooter || rangesNode || todayNode) && innerPicker === undefined ? (/*#__PURE__*/React.createElement("div", {
|
|
354
354
|
className: "".concat(datePickerPrefixCls, "-footer")
|
|
355
|
-
}, extraFooter, rangesNode, todayNode) : null);
|
|
355
|
+
}, extraFooter, rangesNode, todayNode)) : null);
|
|
356
356
|
};
|
|
357
357
|
var inputProps = {
|
|
358
358
|
inputRef: inputRef,
|
|
@@ -395,7 +395,7 @@ var InternalDatePicker = function InternalDatePicker(props, ref) {
|
|
|
395
395
|
triggerChange: triggerChange,
|
|
396
396
|
resetText: resetText
|
|
397
397
|
};
|
|
398
|
-
return usePopper(
|
|
398
|
+
return usePopper(/*#__PURE__*/React.createElement(InputDate, _extends({
|
|
399
399
|
ref: inputDivRef
|
|
400
400
|
}, inputProps)), /*#__PURE__*/React.createElement("div", {
|
|
401
401
|
ref: popperRef,
|
|
@@ -15,7 +15,6 @@ export default function useRangeCls(_ref) {
|
|
|
15
15
|
isEnd = _ref.isEnd;
|
|
16
16
|
function getClassName(date) {
|
|
17
17
|
if (isRange) {
|
|
18
|
-
var _classnames;
|
|
19
18
|
var _rangeValue = rangeValue || [null, null];
|
|
20
19
|
if (hoverRangedValue === null || hoverRangedValue === void 0 ? void 0 : _findInstanceProperty(hoverRangedValue).call(hoverRangedValue, function (n) {
|
|
21
20
|
return n;
|
|
@@ -28,7 +27,7 @@ export default function useRangeCls(_ref) {
|
|
|
28
27
|
if (isSameDay(_rangeValue[0], _rangeValue[1])) return {};
|
|
29
28
|
if (isCurrentMonth && !isCurrentMonth(date)) return {};
|
|
30
29
|
if (_rangeValue[0] && _rangeValue[1] && isAfter(_rangeValue[0], _rangeValue[1])) return {};
|
|
31
|
-
return classnames((
|
|
30
|
+
return classnames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-range-view"), isAfterStart(date, _rangeValue) && isBeforeEnd(date, _rangeValue)), "".concat(prefixCls, "-range-start"), isStart(date, _rangeValue)), "".concat(prefixCls, "-range-end"), isEnd(date, _rangeValue)));
|
|
32
31
|
}
|
|
33
32
|
return {};
|
|
34
33
|
}
|
|
@@ -8,5 +8,5 @@ export interface DatetimePanelProps extends PanelSharedProps, Omit<CalendarProps
|
|
|
8
8
|
showTime?: boolean | SharedTimeProps;
|
|
9
9
|
defaultValue?: DateType;
|
|
10
10
|
}
|
|
11
|
-
declare function DatetimePanel(props: DatetimePanelProps): JSX.Element;
|
|
11
|
+
declare function DatetimePanel(props: DatetimePanelProps): React.JSX.Element;
|
|
12
12
|
export default DatetimePanel;
|
|
@@ -19,36 +19,36 @@ function Header(props) {
|
|
|
19
19
|
var textCls = classnames("".concat(prefixCls, "-header-text"));
|
|
20
20
|
return /*#__PURE__*/React.createElement("div", {
|
|
21
21
|
className: className
|
|
22
|
-
}, onSuperPrev ? /*#__PURE__*/React.createElement("span", {
|
|
22
|
+
}, onSuperPrev ? (/*#__PURE__*/React.createElement("span", {
|
|
23
23
|
className: iconCls,
|
|
24
24
|
onClick: onSuperPrev
|
|
25
25
|
}, superPrevIcon || /*#__PURE__*/React.createElement(Icon, {
|
|
26
26
|
type: "double-arrow-left"
|
|
27
|
-
})) : /*#__PURE__*/React.createElement("span", {
|
|
27
|
+
}))) : (/*#__PURE__*/React.createElement("span", {
|
|
28
28
|
className: iconCls
|
|
29
|
-
}), onPrev ? /*#__PURE__*/React.createElement("span", {
|
|
29
|
+
})), onPrev ? (/*#__PURE__*/React.createElement("span", {
|
|
30
30
|
className: iconCls,
|
|
31
31
|
onClick: onPrev
|
|
32
32
|
}, prevIcon || /*#__PURE__*/React.createElement(Icon, {
|
|
33
33
|
type: "arrow-left"
|
|
34
|
-
})) : /*#__PURE__*/React.createElement("span", {
|
|
34
|
+
}))) : (/*#__PURE__*/React.createElement("span", {
|
|
35
35
|
className: iconCls
|
|
36
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
36
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
37
37
|
className: textCls
|
|
38
|
-
}, children), onNext ? /*#__PURE__*/React.createElement("span", {
|
|
38
|
+
}, children), onNext ? (/*#__PURE__*/React.createElement("span", {
|
|
39
39
|
className: iconCls,
|
|
40
40
|
onClick: onNext
|
|
41
41
|
}, nextIcon || /*#__PURE__*/React.createElement(Icon, {
|
|
42
42
|
type: "arrow-right"
|
|
43
|
-
})) : /*#__PURE__*/React.createElement("span", {
|
|
43
|
+
}))) : (/*#__PURE__*/React.createElement("span", {
|
|
44
44
|
className: iconCls
|
|
45
|
-
}), onSuperNext ? /*#__PURE__*/React.createElement("span", {
|
|
45
|
+
})), onSuperNext ? (/*#__PURE__*/React.createElement("span", {
|
|
46
46
|
className: iconCls,
|
|
47
47
|
onClick: onSuperNext
|
|
48
48
|
}, superNextIcon || /*#__PURE__*/React.createElement(Icon, {
|
|
49
49
|
type: "double-arrow-right"
|
|
50
|
-
})) : /*#__PURE__*/React.createElement("span", {
|
|
50
|
+
}))) : (/*#__PURE__*/React.createElement("span", {
|
|
51
51
|
className: iconCls
|
|
52
|
-
}));
|
|
52
|
+
})));
|
|
53
53
|
}
|
|
54
54
|
export default Header;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { DateType } from '../../interface';
|
|
3
3
|
export interface MonthProps {
|
|
4
4
|
showFullMonth?: boolean;
|
|
5
5
|
disabledDate?(date: DateType): boolean;
|
|
6
6
|
}
|
|
7
|
-
declare function Month(props: MonthProps): JSX.Element;
|
|
7
|
+
declare function Month(props: MonthProps): React.JSX.Element;
|
|
8
8
|
export default Month;
|
|
@@ -55,8 +55,7 @@ function Month(props) {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
var getMonthClassNames = function getMonthClassNames(i) {
|
|
58
|
-
|
|
59
|
-
return classnames("".concat(prefixCls, "-month-text"), (_classnames = {}, _defineProperty(_classnames, "".concat(prefixCls, "-month-text-selected"), getMonthSelected(i)), _defineProperty(_classnames, "".concat(prefixCls, "-month-text-today"), getMonthToday(i)), _classnames));
|
|
58
|
+
return classnames("".concat(prefixCls, "-month-text"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-month-text-selected"), getMonthSelected(i)), "".concat(prefixCls, "-month-text-today"), getMonthToday(i)));
|
|
60
59
|
};
|
|
61
60
|
var getRangeCls = useRangeCls({
|
|
62
61
|
prefixCls: prefixCls,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { DateType } from '../../interface';
|
|
3
3
|
interface QuarterProps {
|
|
4
4
|
disabledDate?: (date: DateType) => boolean;
|
|
5
5
|
}
|
|
6
|
-
declare function Quarter(props: QuarterProps): JSX.Element;
|
|
6
|
+
declare function Quarter(props: QuarterProps): React.JSX.Element;
|
|
7
7
|
export default Quarter;
|
|
@@ -51,8 +51,7 @@ function Quarter(props) {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
var getQuarterClassNames = function getQuarterClassNames(q) {
|
|
54
|
-
|
|
55
|
-
return classnames("".concat(prefixCls, "-quarter-text"), (_classnames = {}, _defineProperty(_classnames, "".concat(prefixCls, "-quarter-text-selected"), getQuarterSelected(q)), _defineProperty(_classnames, "".concat(prefixCls, "-quarter-text-today"), getQuarterToday(q)), _classnames));
|
|
54
|
+
return classnames("".concat(prefixCls, "-quarter-text"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-quarter-text-selected"), getQuarterSelected(q)), "".concat(prefixCls, "-quarter-text-today"), getQuarterToday(q)));
|
|
56
55
|
};
|
|
57
56
|
var getRangeCls = useRangeCls({
|
|
58
57
|
prefixCls: prefixCls,
|
|
@@ -13,5 +13,5 @@ export interface TimeUnitColumnProps {
|
|
|
13
13
|
hideDisabledOptions?: boolean;
|
|
14
14
|
onSelect?: (value: number) => void;
|
|
15
15
|
}
|
|
16
|
-
declare function TimeUnitColumn(props: TimeUnitColumnProps): JSX.Element;
|
|
16
|
+
declare function TimeUnitColumn(props: TimeUnitColumnProps): React.JSX.Element;
|
|
17
17
|
export default TimeUnitColumn;
|
|
@@ -48,7 +48,6 @@ function TimeUnitColumn(props) {
|
|
|
48
48
|
position: 'relative'
|
|
49
49
|
}
|
|
50
50
|
}, _mapInstanceProperty(units).call(units, function (unit) {
|
|
51
|
-
var _classNames;
|
|
52
51
|
if (hideDisabledOptions && unit.disabled) {
|
|
53
52
|
return null;
|
|
54
53
|
}
|
|
@@ -57,7 +56,7 @@ function TimeUnitColumn(props) {
|
|
|
57
56
|
ref: function ref(element) {
|
|
58
57
|
liRefs.current.set(unit.value, element);
|
|
59
58
|
},
|
|
60
|
-
className: classNames(cellPrefixCls, (
|
|
59
|
+
className: classNames(cellPrefixCls, _defineProperty(_defineProperty({}, "".concat(cellPrefixCls, "-disabled"), unit.disabled), "".concat(cellPrefixCls, "-selected"), value === unit.value)),
|
|
61
60
|
onClick: function onClick() {
|
|
62
61
|
if (unit.disabled) {
|
|
63
62
|
return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { DateType, DisabledTimes, PanelSharedProps, PickerMode } from '../../interface';
|
|
3
3
|
export interface SharedTimeProps extends DisabledTimes {
|
|
4
4
|
format?: string;
|
|
@@ -17,5 +17,5 @@ export interface TimePanelProps extends PanelSharedProps, SharedTimeProps {
|
|
|
17
17
|
format?: string;
|
|
18
18
|
picker?: PickerMode;
|
|
19
19
|
}
|
|
20
|
-
declare function TimePanel(props: TimePanelProps): JSX.Element;
|
|
20
|
+
declare function TimePanel(props: TimePanelProps): React.JSX.Element;
|
|
21
21
|
export default TimePanel;
|
|
@@ -212,9 +212,9 @@ function TimePanel(props) {
|
|
|
212
212
|
className: classNames("".concat(prefixCls, "-time"), {
|
|
213
213
|
// [`${panelPrefixCls}-active`]: active,
|
|
214
214
|
})
|
|
215
|
-
}, picker !== 'time' ? /*#__PURE__*/React.createElement(Header, {
|
|
215
|
+
}, picker !== 'time' ? (/*#__PURE__*/React.createElement(Header, {
|
|
216
216
|
className: "".concat(prefixCls, "-time-header")
|
|
217
|
-
}, !disabledTimePanel && value ? formatDate(value, format) : null) : null, /*#__PURE__*/React.createElement("div", {
|
|
217
|
+
}, !disabledTimePanel && value ? formatDate(value, format) : null)) : null, /*#__PURE__*/React.createElement("div", {
|
|
218
218
|
className: classNames("".concat(prefixCls, "-content"), {
|
|
219
219
|
// [`${panelPrefixCls}-active`]: active,
|
|
220
220
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { DateType, PickerMode } from '../../interface';
|
|
3
3
|
export interface WeekProps {
|
|
4
4
|
day: DateType;
|
|
@@ -7,5 +7,5 @@ export interface WeekProps {
|
|
|
7
7
|
showTime?: boolean;
|
|
8
8
|
disabledDate?: (date: DateType) => boolean;
|
|
9
9
|
}
|
|
10
|
-
declare function Week(props: WeekProps): JSX.Element;
|
|
10
|
+
declare function Week(props: WeekProps): React.JSX.Element;
|
|
11
11
|
export default Week;
|
|
@@ -93,8 +93,8 @@ function Week(props) {
|
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
var getDayClassNames = function getDayClassNames(date) {
|
|
96
|
-
var
|
|
97
|
-
return picker === 'date' ? classnames("".concat(prefixCls, "-calendar-text"), (
|
|
96
|
+
var _context, _context2;
|
|
97
|
+
return picker === 'date' ? classnames("".concat(prefixCls, "-calendar-text"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-calendar-text-selected"), getSelected(date)), "".concat(prefixCls, "-calendar-text-today"), getToday(date))) : picker === 'week' ? classnames(_concatInstanceProperty(_context = "".concat(prefixCls, "-calendar-")).call(_context, picker, "-text"), _defineProperty({}, _concatInstanceProperty(_context2 = "".concat(prefixCls, "-calendar-")).call(_context2, picker, "-text-today"), getWeekToday(date))) : '';
|
|
98
98
|
};
|
|
99
99
|
var getRangeCls = useRangeCls({
|
|
100
100
|
prefixCls: prefixCls,
|
|
@@ -153,19 +153,18 @@ function Week(props) {
|
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
155
|
var renderDays = function renderDays() {
|
|
156
|
-
var _context3
|
|
156
|
+
var _context3;
|
|
157
157
|
var startOfWeek = getStartOfWeek(day);
|
|
158
158
|
var days = [];
|
|
159
159
|
var weekNumber = formatWeekNumber(startOfWeek);
|
|
160
160
|
if (showWeekNumber) {
|
|
161
161
|
var calenderWeekNumberCls = classnames("".concat(prefixCls, "-calendar-weeknumber"));
|
|
162
|
-
days.push(
|
|
162
|
+
days.push(/*#__PURE__*/React.createElement("div", {
|
|
163
163
|
key: "W",
|
|
164
164
|
className: calenderWeekNumberCls
|
|
165
165
|
}, weekNumber));
|
|
166
166
|
}
|
|
167
167
|
var week = _concatInstanceProperty(days).call(days, _mapInstanceProperty(_context3 = [0, 1, 2, 3, 4, 5, 6]).call(_context3, function (offset) {
|
|
168
|
-
var _classnames3;
|
|
169
168
|
var day = addDays(startOfWeek, offset);
|
|
170
169
|
var date = getDate(day);
|
|
171
170
|
var now;
|
|
@@ -203,12 +202,12 @@ function Week(props) {
|
|
|
203
202
|
// console.log('disabledDate', disabledDate)
|
|
204
203
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
205
204
|
key: day.valueOf(),
|
|
206
|
-
className: classnames("".concat(prefixCls, "-calendar-item"), (
|
|
205
|
+
className: classnames("".concat(prefixCls, "-calendar-item"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-calendar-item-disabled"), disabledDate && disabledDate(day)), "".concat(prefixCls, "-calendar-current"), currentMonth === getMonth(day)), getRangeCls(day))
|
|
207
206
|
}, _props), /*#__PURE__*/React.createElement("div", {
|
|
208
207
|
className: getDayClassNames(day)
|
|
209
208
|
}, date));
|
|
210
209
|
}));
|
|
211
|
-
var calenderLineCls = classnames((
|
|
210
|
+
var calenderLineCls = classnames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-calendar-line"), picker !== 'week'), "".concat(prefixCls, "-calendar-week-line"), picker === 'week'), "".concat(prefixCls, "-calendar-week-selected"), picker === 'week' && getWeekSelected(startOfWeek)));
|
|
212
211
|
return /*#__PURE__*/React.createElement("div", {
|
|
213
212
|
className: calenderLineCls
|
|
214
213
|
}, week);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { DateType, PickerMode } from '../../interface';
|
|
3
3
|
export interface YearProps {
|
|
4
4
|
yearItemNumber: number;
|
|
@@ -7,5 +7,5 @@ export interface YearProps {
|
|
|
7
7
|
disabledDate?: (date: DateType) => boolean;
|
|
8
8
|
picker?: PickerMode;
|
|
9
9
|
}
|
|
10
|
-
declare function Year(props: YearProps): JSX.Element;
|
|
10
|
+
declare function Year(props: YearProps): React.JSX.Element;
|
|
11
11
|
export default Year;
|
|
@@ -55,8 +55,7 @@ function Year(props) {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
function getYearClassNames(y) {
|
|
58
|
-
|
|
59
|
-
return classnames("".concat(prefixCls, "-year-text"), (_classnames = {}, _defineProperty(_classnames, "".concat(prefixCls, "-year-text-selected"), getYearSelected(y)), _defineProperty(_classnames, "".concat(prefixCls, "-year-text-today"), getYearToday(y)), _classnames));
|
|
58
|
+
return classnames("".concat(prefixCls, "-year-text"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-year-text-selected"), getYearSelected(y)), "".concat(prefixCls, "-year-text-today"), getYearToday(y)));
|
|
60
59
|
}
|
|
61
60
|
var getRangeCls = useRangeCls({
|
|
62
61
|
prefixCls: prefixCls,
|
|
@@ -114,7 +113,7 @@ function Year(props) {
|
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
115
|
};
|
|
117
|
-
yearsList.push(
|
|
116
|
+
yearsList.push(/*#__PURE__*/React.createElement("div", _extends({
|
|
118
117
|
className: classnames("".concat(prefixCls, "-year-item"), _defineProperty({}, "".concat(prefixCls, "-year-item-disabled"), disabledDate && disabledDate(year)), getRangeCls(year)),
|
|
119
118
|
key: y
|
|
120
119
|
}, _props), /*#__PURE__*/React.createElement("span", {
|
package/es/date-picker/popper.js
CHANGED
|
@@ -6,7 +6,6 @@ import classnames from 'classnames';
|
|
|
6
6
|
import { usePopper } from 'react-popper';
|
|
7
7
|
import { useOnClickOutside } from '../_utils/hooks';
|
|
8
8
|
function Popper(props, ref) {
|
|
9
|
-
var _classnames;
|
|
10
9
|
var showArrow = props.showArrow,
|
|
11
10
|
onClickOutside = props.onClickOutside,
|
|
12
11
|
inputDivRef = props.inputDivRef,
|
|
@@ -45,7 +44,7 @@ function Popper(props, ref) {
|
|
|
45
44
|
}),
|
|
46
45
|
styles = _usePopper.styles,
|
|
47
46
|
attributes = _usePopper.attributes;
|
|
48
|
-
var arrowCls = classnames((
|
|
47
|
+
var arrowCls = classnames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-has-arrow"), showArrow), "".concat(prefixCls, "-no-arrow"), !showArrow));
|
|
49
48
|
var panelWarpperCls = classnames("".concat(prefixCls, "-panel"), dropdownClassName, _defineProperty({
|
|
50
49
|
'has-arrow': showArrow,
|
|
51
50
|
'no-arrow': !showArrow
|
|
@@ -8,7 +8,7 @@ import { Icon } from '../../index';
|
|
|
8
8
|
import usePickerInput from '../hooks/use-picker-input';
|
|
9
9
|
import { getInputSize, getRangePlaceholder, elementsContains, getValue, updateValues } from '../utils';
|
|
10
10
|
function InputDate(props, ref) {
|
|
11
|
-
var
|
|
11
|
+
var _context, _context2, _context3;
|
|
12
12
|
var startInputRef = props.startInputRef,
|
|
13
13
|
endInputRef = props.endInputRef,
|
|
14
14
|
startInputDivRef = props.startInputDivRef,
|
|
@@ -172,7 +172,7 @@ function InputDate(props, ref) {
|
|
|
172
172
|
_usePickerInput4$ = _usePickerInput4[1],
|
|
173
173
|
endFocused = _usePickerInput4$.focused,
|
|
174
174
|
endTyping = _usePickerInput4$.typing;
|
|
175
|
-
var borderClass = classnames((
|
|
175
|
+
var borderClass = classnames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-underline"), borderType === 'underline'), "".concat(prefixCls, "-borderless"), borderType === 'none'));
|
|
176
176
|
var mouseEnterHandle = function mouseEnterHandle(e) {
|
|
177
177
|
setIsMouseEnter(true);
|
|
178
178
|
if (typeof onMouseEnter === 'function') {
|
|
@@ -187,7 +187,7 @@ function InputDate(props, ref) {
|
|
|
187
187
|
};
|
|
188
188
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
189
189
|
ref: ref,
|
|
190
|
-
className: classnames(prefixCls, "".concat(prefixCls, "-range"), className, borderClass, (
|
|
190
|
+
className: classnames(prefixCls, "".concat(prefixCls, "-range"), className, borderClass, _defineProperty(_defineProperty(_defineProperty({}, _concatInstanceProperty(_context = "".concat(prefixCls, "-")).call(_context, size), size), "".concat(prefixCls, "-disabled"), mergedDisabled[0] && mergedDisabled[1]), "".concat(prefixCls, "-focused"), mergedActivePickerIndex === 0 ? startFocused : endFocused)),
|
|
191
191
|
style: style,
|
|
192
192
|
onMouseDown: onInternalonMouseDown,
|
|
193
193
|
onMouseUp: onMouseUp,
|
|
@@ -196,7 +196,7 @@ function InputDate(props, ref) {
|
|
|
196
196
|
onContextMenu: onContextMenu,
|
|
197
197
|
onClick: onInternalonClick
|
|
198
198
|
}, dataOrAriaProps), /*#__PURE__*/React.createElement("div", {
|
|
199
|
-
className: classnames("".concat(prefixCls, "-input"), (
|
|
199
|
+
className: classnames("".concat(prefixCls, "-input"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-input-active"), mergedActivePickerIndex === 0), "".concat(prefixCls, "-input-placeholder"), !!startHoverValue), _concatInstanceProperty(_context2 = "".concat(prefixCls, "-input-")).call(_context2, size), size)),
|
|
200
200
|
ref: startInputDivRef
|
|
201
201
|
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
202
202
|
id: id,
|
|
@@ -216,7 +216,7 @@ function InputDate(props, ref) {
|
|
|
216
216
|
className: "".concat(prefixCls, "-range-separator"),
|
|
217
217
|
ref: separatorRef
|
|
218
218
|
}, separator), /*#__PURE__*/React.createElement("div", {
|
|
219
|
-
className: classnames("".concat(prefixCls, "-input"), (
|
|
219
|
+
className: classnames("".concat(prefixCls, "-input"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-input-active"), mergedActivePickerIndex === 1), "".concat(prefixCls, "-input-placeholder"), !!endHoverValue), _concatInstanceProperty(_context3 = "".concat(prefixCls, "-input-")).call(_context3, size), size)),
|
|
220
220
|
ref: endInputDivRef
|
|
221
221
|
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
222
222
|
ref: endInputRef,
|
|
@@ -308,9 +308,9 @@ var InternalRangePicker = function InternalRangePicker(props, ref) {
|
|
|
308
308
|
var _useMergedState9 = useMergedState([picker, picker], {
|
|
309
309
|
value: mode
|
|
310
310
|
}),
|
|
311
|
-
|
|
312
|
-
mergedModes =
|
|
313
|
-
setInnerModes =
|
|
311
|
+
_useMergedState0 = _slicedToArray(_useMergedState9, 2),
|
|
312
|
+
mergedModes = _useMergedState0[0],
|
|
313
|
+
setInnerModes = _useMergedState0[1];
|
|
314
314
|
var _useState3 = useState(undefined),
|
|
315
315
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
316
316
|
innerPicker = _useState4[0],
|
|
@@ -675,7 +675,7 @@ var InternalRangePicker = function InternalRangePicker(props, ref) {
|
|
|
675
675
|
}
|
|
676
676
|
return null;
|
|
677
677
|
};
|
|
678
|
-
return usePopper(
|
|
678
|
+
return usePopper(/*#__PURE__*/React.createElement(InputDate, _extends({
|
|
679
679
|
ref: inputDivRef
|
|
680
680
|
}, inputProps)), /*#__PURE__*/React.createElement("div", {
|
|
681
681
|
ref: popperRef,
|
|
@@ -683,9 +683,9 @@ var InternalRangePicker = function InternalRangePicker(props, ref) {
|
|
|
683
683
|
e.preventDefault();
|
|
684
684
|
},
|
|
685
685
|
className: classNames("".concat(datePickerPrefixCls, "-container"))
|
|
686
|
-
}, /*#__PURE__*/React.createElement("div", null, renderPanels(), extraNode || rangesNode ? /*#__PURE__*/React.createElement("div", {
|
|
686
|
+
}, /*#__PURE__*/React.createElement("div", null, renderPanels(), extraNode || rangesNode ? (/*#__PURE__*/React.createElement("div", {
|
|
687
687
|
className: "".concat(datePickerPrefixCls, "-footer")
|
|
688
|
-
}, extraNode, rangesNode) : null), /*#__PURE__*/React.createElement("div", null, renderConfig())), {
|
|
688
|
+
}, extraNode, rangesNode)) : null), /*#__PURE__*/React.createElement("div", null, renderConfig())), {
|
|
689
689
|
trigger: 'click',
|
|
690
690
|
prefixCls: "".concat(datePickerPrefixCls, "-panel"),
|
|
691
691
|
arrow: false,
|
|
@@ -8,7 +8,7 @@ import { Icon } from '../../index';
|
|
|
8
8
|
import usePickerInput from '../hooks/use-picker-input';
|
|
9
9
|
import { getInputSize, getPlaceholder, elementsContains } from '../utils';
|
|
10
10
|
function InputDate(props, ref) {
|
|
11
|
-
var
|
|
11
|
+
var _context;
|
|
12
12
|
var inputRef = props.inputRef,
|
|
13
13
|
panelDivRef = props.panelDivRef,
|
|
14
14
|
id = props.id,
|
|
@@ -140,10 +140,10 @@ function InputDate(props, ref) {
|
|
|
140
140
|
_usePickerInput2$ = _usePickerInput2[1],
|
|
141
141
|
focused = _usePickerInput2$.focused,
|
|
142
142
|
typing = _usePickerInput2$.typing;
|
|
143
|
-
var borderClass = classnames((
|
|
143
|
+
var borderClass = classnames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-underline"), borderType === 'underline'), "".concat(prefixCls, "-borderless"), borderType === 'none'));
|
|
144
144
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
145
145
|
ref: ref,
|
|
146
|
-
className: classnames(prefixCls, className, borderClass, (
|
|
146
|
+
className: classnames(prefixCls, className, borderClass, _defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-focused"), focused), _concatInstanceProperty(_context = "".concat(prefixCls, "-")).call(_context, size), size)),
|
|
147
147
|
style: style,
|
|
148
148
|
onMouseDown: onInternalonMouseDown,
|
|
149
149
|
onMouseUp: onInternalMouseUp,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PanelMode } from '../interface';
|
|
3
|
-
export default function getExtraFooter(prefixCls: string, mode: PanelMode, renderExtraFooter?: (mode: PanelMode) => React.ReactNode): JSX.Element | null;
|
|
3
|
+
export default function getExtraFooter(prefixCls: string, mode: PanelMode, renderExtraFooter?: (mode: PanelMode) => React.ReactNode): React.JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { Components, RangeList, InnerLocale } from '../interface';
|
|
3
3
|
export interface RangesProps {
|
|
4
4
|
prefixCls: string;
|
|
@@ -11,4 +11,4 @@ export interface RangesProps {
|
|
|
11
11
|
showNow?: boolean;
|
|
12
12
|
locale: InnerLocale;
|
|
13
13
|
}
|
|
14
|
-
export default function getRanges({ prefixCls, rangeList, components, needConfirmButton, onNow, onOk, okDisabled, showNow, locale, }: RangesProps): JSX.Element | null;
|
|
14
|
+
export default function getRanges({ prefixCls, rangeList, components, needConfirmButton, onNow, onOk, okDisabled, showNow, locale, }: RangesProps): React.JSX.Element | null;
|
|
@@ -42,12 +42,12 @@ export default function getRanges(_ref) {
|
|
|
42
42
|
onClick: onNow
|
|
43
43
|
}, locale.now));
|
|
44
44
|
}
|
|
45
|
-
okNode = needConfirmButton && /*#__PURE__*/React.createElement("li", {
|
|
45
|
+
okNode = needConfirmButton && (/*#__PURE__*/React.createElement("li", {
|
|
46
46
|
className: "".concat(prefixCls, "-ok")
|
|
47
47
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
48
48
|
onClick: onOk,
|
|
49
49
|
className: classnames("".concat(prefixCls, "-ok-btn"), okDisabled && "".concat(prefixCls, "-btn-disabled"))
|
|
50
|
-
}, locale.confrim));
|
|
50
|
+
}, locale.confrim)));
|
|
51
51
|
}
|
|
52
52
|
if (!presetNode && !okNode) {
|
|
53
53
|
return null;
|
package/es/drawer/drawer.js
CHANGED
|
@@ -35,7 +35,7 @@ var documentBody = document.body;
|
|
|
35
35
|
// return ('-' + size || 0) + 'px'
|
|
36
36
|
// }
|
|
37
37
|
var InternalDrawer = function InternalDrawer(props, ref) {
|
|
38
|
-
var
|
|
38
|
+
var _context2, _context3;
|
|
39
39
|
var _a;
|
|
40
40
|
var _useContext = useContext(ConfigContext),
|
|
41
41
|
getPrefixCls = _useContext.getPrefixCls,
|
|
@@ -180,7 +180,7 @@ var InternalDrawer = function InternalDrawer(props, ref) {
|
|
|
180
180
|
setDraerTransform(visible, placementName, value);
|
|
181
181
|
}
|
|
182
182
|
}, [contentRef, getHorizontalBoolAndPlacementName, height, setDraerTransform, visible, width]);
|
|
183
|
-
var drawerClasses = classNames(drawerPrefixCls, className, (
|
|
183
|
+
var drawerClasses = classNames(drawerPrefixCls, className, _defineProperty(_defineProperty(_defineProperty({}, "".concat(drawerPrefixCls, "-hide"), !visible), "".concat(drawerPrefixCls, "-active"), visible), "".concat(drawerPrefixCls, "-not-at-body"), !isBody));
|
|
184
184
|
var headerClass = "".concat(drawerPrefixCls, "-header");
|
|
185
185
|
var _getHorizontalBoolAnd2 = getHorizontalBoolAndPlacementName(),
|
|
186
186
|
placementName = _getHorizontalBoolAnd2.placementName;
|
|
@@ -194,28 +194,28 @@ var InternalDrawer = function InternalDrawer(props, ref) {
|
|
|
194
194
|
transform: transform
|
|
195
195
|
});
|
|
196
196
|
var container = /*#__PURE__*/React.createElement("div", {
|
|
197
|
-
className: classNames((
|
|
197
|
+
className: classNames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(drawerPrefixCls, "-container-box"), true), "".concat(drawerPrefixCls, "-has-container-box"), drawerContainer), _concatInstanceProperty(_context3 = "".concat(drawerPrefixCls, "-container-")).call(_context3, placement), true)),
|
|
198
198
|
style: containerStyle,
|
|
199
199
|
ref: contentRef
|
|
200
|
-
}, (title || closable) && /*#__PURE__*/React.createElement("div", {
|
|
200
|
+
}, (title || closable) && (/*#__PURE__*/React.createElement("div", {
|
|
201
201
|
className: classNames(headerClass, headerClassName),
|
|
202
202
|
style: headerStyle
|
|
203
203
|
}, /*#__PURE__*/React.createElement("div", {
|
|
204
204
|
className: classNames("".concat(drawerPrefixCls, "-title"), titleClassName),
|
|
205
205
|
style: titleStyle
|
|
206
|
-
}, title), closable && /*#__PURE__*/React.createElement("div", {
|
|
206
|
+
}, title), closable && (/*#__PURE__*/React.createElement("div", {
|
|
207
207
|
className: "".concat(drawerPrefixCls, "-close-icon"),
|
|
208
208
|
onClick: function onClick() {
|
|
209
209
|
return closeDrawer();
|
|
210
210
|
}
|
|
211
211
|
}, closeIcon || /*#__PURE__*/React.createElement(Icon, {
|
|
212
212
|
type: "close"
|
|
213
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
213
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
214
214
|
className: "".concat(drawerPrefixCls, "-body")
|
|
215
|
-
}, (showChildren || visible) && toArray(children)), footer && /*#__PURE__*/React.createElement("div", {
|
|
215
|
+
}, (showChildren || visible) && toArray(children)), footer && (/*#__PURE__*/React.createElement("div", {
|
|
216
216
|
className: classNames("".concat(drawerPrefixCls, "-footer"), footerClassName),
|
|
217
217
|
style: footerStyle
|
|
218
|
-
}, footer));
|
|
218
|
+
}, footer)));
|
|
219
219
|
var opposition = !mask && _includesInstanceProperty(PlacementTypes).call(PlacementTypes, placement) ? _includesInstanceProperty(horizontalPlacements).call(horizontalPlacements, placement) ? _filterInstanceProperty(horizontalPlacements).call(horizontalPlacements, function (p) {
|
|
220
220
|
return p !== placement;
|
|
221
221
|
})[0] : _filterInstanceProperty(verticalPlacements).call(verticalPlacements, function (p) {
|
|
@@ -230,11 +230,11 @@ var InternalDrawer = function InternalDrawer(props, ref) {
|
|
|
230
230
|
zIndex: zindex || 'auto'
|
|
231
231
|
}, noneMaskStyle), opposition ? _defineProperty({}, opposition, 'unset') : {}),
|
|
232
232
|
ref: containerRef
|
|
233
|
-
}, mask && /*#__PURE__*/React.createElement("div", {
|
|
233
|
+
}, mask && (/*#__PURE__*/React.createElement("div", {
|
|
234
234
|
onClick: handleMaskClick,
|
|
235
235
|
className: classNames("".concat(drawerPrefixCls, "-mask"), maskClassName),
|
|
236
236
|
style: maskStyle
|
|
237
|
-
}), container);
|
|
237
|
+
})), container);
|
|
238
238
|
if (drawerContainer instanceof HTMLElement) return /*#__PURE__*/ReactDOM.createPortal(comp, drawerContainer);else if (drawerContainer !== false) {
|
|
239
239
|
return /*#__PURE__*/ReactDOM.createPortal(comp, documentBody);
|
|
240
240
|
}
|