@kdcloudjs/kdesign 1.7.33-stable.12 → 1.7.33-stable.12-hotfix.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kdesign-complete.less +19 -4
- package/dist/kdesign.css +10 -6
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +8510 -6736
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +2 -2
- package/dist/kdesign.min.js +16 -13
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/formatUtil.js +0 -2
- package/es/_utils/hooks.js +3 -3
- package/es/_utils/resizeObserver.js +7 -10
- package/es/_utils/usePopper.d.ts +1 -1
- package/es/_utils/usePopper.js +42 -42
- package/es/alert/alert.js +4 -5
- package/es/anchor/anchor-link.js +1 -2
- package/es/anchor/anchor.js +24 -24
- package/es/avatar/avatar.js +3 -3
- package/es/badge/badge.js +6 -6
- package/es/base-data/base-data.js +32 -32
- package/es/button/button.js +11 -12
- package/es/button/group.js +6 -6
- package/es/card/card.js +3 -3
- package/es/carousel/carousel.js +6 -6
- package/es/carousel/slidebar.d.ts +2 -2
- package/es/carousel/slidebar.js +3 -4
- package/es/cascader/cascader.js +28 -31
- package/es/cascader/util.js +6 -6
- package/es/checkbox/checkbox.js +13 -13
- package/es/city-picker/city-picker.js +26 -28
- package/es/city-picker/option.js +3 -4
- package/es/collapse/panel.js +10 -15
- package/es/color-picker/color-picker-panel.js +7 -7
- package/es/color-picker/color-picker.js +17 -18
- package/es/color-picker/utils/colorFormat.js +6 -6
- package/es/config-provider/ConfigContext.d.ts +2 -0
- package/es/config-provider/compDefaultProps.d.ts +3 -3
- package/es/config-provider/defaultConfig.d.ts +1 -0
- package/es/config-provider/defaultConfig.js +2 -1
- package/es/date-picker/calendar.d.ts +2 -2
- package/es/date-picker/calendar.js +2 -3
- package/es/date-picker/date-panel.d.ts +1 -1
- package/es/date-picker/date-panel.js +5 -6
- package/es/date-picker/date-picker.js +3 -3
- package/es/date-picker/hooks/use-range-cls.js +1 -2
- package/es/date-picker/panel/date-time/date-time.d.ts +1 -1
- package/es/date-picker/panel/header/header.d.ts +1 -1
- package/es/date-picker/panel/header/header.js +10 -10
- package/es/date-picker/panel/month/month.d.ts +2 -2
- package/es/date-picker/panel/month/month.js +1 -2
- package/es/date-picker/panel/quarter/quarter.d.ts +2 -2
- package/es/date-picker/panel/quarter/quarter.js +1 -2
- package/es/date-picker/panel/time/time-column.d.ts +1 -1
- package/es/date-picker/panel/time/time-column.js +1 -2
- package/es/date-picker/panel/time/time.d.ts +2 -2
- package/es/date-picker/panel/time/time.js +2 -2
- package/es/date-picker/panel/week/week.d.ts +2 -2
- package/es/date-picker/panel/week/week.js +6 -7
- package/es/date-picker/panel/year/year.d.ts +2 -2
- package/es/date-picker/panel/year/year.js +2 -3
- package/es/date-picker/popper.js +1 -2
- package/es/date-picker/range/input-range.js +5 -5
- package/es/date-picker/range-picker.js +6 -6
- package/es/date-picker/single/input-date.js +3 -3
- package/es/date-picker/utils/date-fns.js +0 -1
- package/es/date-picker/utils/get-extra-footer.d.ts +1 -1
- package/es/date-picker/utils/get-ranges.d.ts +2 -2
- package/es/date-picker/utils/get-ranges.js +2 -2
- package/es/drawer/drawer.js +10 -10
- package/es/dropdown/dropdown.js +9 -9
- package/es/dropdown/menu.js +2 -2
- package/es/empty/defaultEmptyImg.d.ts +2 -2
- package/es/empty/empty.js +6 -6
- package/es/empty/illustrationEmptyImg.d.ts +2 -2
- package/es/filter/condition.js +5 -5
- package/es/filter/filter.js +2 -2
- package/es/filter/scheme.js +13 -13
- package/es/form/Field.js +4 -5
- package/es/form/FieldLabel.js +1 -2
- package/es/form/FieldWrapper.js +4 -4
- package/es/form/Form.js +2 -2
- package/es/icon/icon.js +2 -2
- package/es/image/image.js +3 -3
- package/es/image/preview-group.js +3 -3
- package/es/image/preview.js +7 -7
- package/es/image-cropper/image-cropper.js +4 -4
- package/es/image-cropper/operation-bar.js +5 -5
- package/es/input/ClearableLabeledInput.js +8 -9
- package/es/input/TextArea.js +5 -6
- package/es/input/calculateNodeHeight.js +0 -5
- package/es/input/input.js +2 -2
- package/es/input-number/inputNumber.js +4 -4
- package/es/layout/sider.js +6 -6
- package/es/link/link.js +3 -3
- package/es/locale/locale.js +6 -7
- package/es/menu/menu.js +2 -2
- package/es/menu/menuItem.js +2 -2
- package/es/menu/subMenu.js +6 -6
- package/es/message/content.js +1 -1
- package/es/modal/confirm.js +1 -1
- package/es/modal/modal.js +11 -11
- package/es/notification/content.js +3 -3
- package/es/notification/index.js +6 -3
- package/es/notification-base/index.js +1 -1
- package/es/notification-base/notice.js +2 -2
- package/es/pagination/pagination.js +15 -15
- package/es/popconfirm/popconfirm.js +2 -2
- package/es/progress/circle.js +5 -5
- package/es/progress/progress.js +2 -2
- package/es/radio/radio.js +1 -2
- package/es/rate/rate.js +7 -8
- package/es/search/option.js +1 -2
- package/es/search/quick-search.js +9 -10
- package/es/search/search-panel.js +6 -4
- package/es/search/search.js +6 -6
- package/es/select/option.js +3 -4
- package/es/select/select.js +28 -30
- package/es/slider/marks.d.ts +1 -1
- package/es/slider/marks.js +1 -2
- package/es/slider/slider.js +1 -2
- package/es/slider/sliderTooltip.js +1 -2
- package/es/slider/steps.d.ts +1 -1
- package/es/slider/steps.js +1 -2
- package/es/slider/track.d.ts +2 -2
- package/es/slider/track.js +1 -2
- package/es/space/space.js +3 -3
- package/es/spin/spin.js +6 -6
- package/es/split-panel/split-panel.js +7 -7
- package/es/stepper/stepper.js +6 -7
- package/es/steps/Step.js +2 -2
- package/es/steps/Steps.js +2 -2
- package/es/switch/switch.js +4 -4
- package/es/table/table.js +21 -5
- package/es/tabs/arrow-button.js +2 -2
- package/es/tabs/style/index.css +9 -5
- package/es/tabs/style/index.less +19 -4
- package/es/tabs/tab-pane.js +5 -4
- package/es/tabs/tabs.d.ts +2 -0
- package/es/tabs/tabs.js +71 -33
- package/es/tag/tag.js +5 -5
- package/es/timeline/Timeline.js +5 -5
- package/es/timeline/TimelineItem.js +5 -5
- package/es/tooltip/tooltip.js +1 -1
- package/es/transfer/list-item.js +1 -2
- package/es/transfer/list.js +7 -8
- package/es/transfer/operation.d.ts +1 -1
- package/es/transfer/operation.js +2 -2
- package/es/transfer/search.js +2 -2
- package/es/transfer/transfer.js +1 -2
- package/es/tree/tree.js +12 -12
- package/es/tree/treeHooks.js +3 -3
- package/es/tree/treeNode.js +10 -13
- package/es/tree/utils/treeUtils.js +13 -13
- package/es/tree-select/tree-select.js +25 -26
- package/es/typography/base.js +2 -2
- package/es/upload/scan-files.js +3 -3
- package/es/upload/upload.js +36 -36
- package/es/virtual-list/virtual-list.js +5 -6
- package/lib/_utils/KeyCode.js +1 -2
- package/lib/_utils/arrayUtil.js +3 -5
- package/lib/_utils/formatUtil.js +0 -2
- package/lib/_utils/hooks.js +3 -3
- package/lib/_utils/index.js +2 -3
- package/lib/_utils/raf.js +2 -4
- package/lib/_utils/reactNode.js +2 -4
- package/lib/_utils/resizeObserver.js +8 -12
- package/lib/_utils/type.js +3 -5
- package/lib/_utils/usePopper.d.ts +1 -1
- package/lib/_utils/usePopper.js +46 -50
- package/lib/alert/alert.js +8 -13
- package/lib/alert/index.js +1 -2
- package/lib/anchor/anchor-link.js +3 -6
- package/lib/anchor/anchor.js +27 -30
- package/lib/anchor/context.js +2 -4
- package/lib/anchor/index.js +1 -2
- package/lib/avatar/avatar.js +7 -11
- package/lib/avatar/index.js +2 -4
- package/lib/badge/badge.js +10 -14
- package/lib/badge/index.js +2 -4
- package/lib/base-data/base-data.js +34 -36
- package/lib/base-data/index.js +2 -4
- package/lib/base-data/interface.js +1 -2
- package/lib/button/button.js +18 -26
- package/lib/button/group.js +9 -12
- package/lib/button/index.js +1 -2
- package/lib/card/card.js +5 -7
- package/lib/card/index.js +2 -4
- package/lib/carousel/carousel.js +10 -14
- package/lib/carousel/displayList.js +2 -3
- package/lib/carousel/fadeList.js +2 -3
- package/lib/carousel/index.js +2 -4
- package/lib/carousel/slideList.js +2 -3
- package/lib/carousel/slidebar.d.ts +2 -2
- package/lib/carousel/slidebar.js +5 -7
- package/lib/cascader/cascader.js +31 -37
- package/lib/cascader/index.js +2 -4
- package/lib/cascader/util.js +18 -30
- package/lib/checkbox/checkbox.js +15 -17
- package/lib/checkbox/group.js +8 -10
- package/lib/checkbox/index.js +2 -4
- package/lib/city-picker/city-picker.js +28 -32
- package/lib/city-picker/index.js +2 -4
- package/lib/city-picker/interface.js +2 -4
- package/lib/city-picker/option.js +5 -8
- package/lib/collapse/collapse.js +3 -6
- package/lib/collapse/index.js +1 -2
- package/lib/collapse/panel.js +12 -19
- package/lib/color-picker/color-picker-panel.js +9 -11
- package/lib/color-picker/color-picker.js +19 -22
- package/lib/color-picker/constant/colorTypes.js +2 -3
- package/lib/color-picker/constant/defaultColor.js +1 -2
- package/lib/color-picker/constant/systemPresetColor.js +1 -2
- package/lib/color-picker/index.js +2 -4
- package/lib/color-picker/interface.js +2 -4
- package/lib/color-picker/utils/colorFormat.js +13 -19
- package/lib/color-picker/utils/hooks/useOnClickOutside.js +1 -2
- package/lib/config-provider/ConfigContext.d.ts +2 -0
- package/lib/config-provider/ConfigContext.js +1 -2
- package/lib/config-provider/SizeContext.js +2 -4
- package/lib/config-provider/compDefaultProps.d.ts +3 -3
- package/lib/config-provider/compDefaultProps.js +2 -4
- package/lib/config-provider/configProvider.js +2 -4
- package/lib/config-provider/defaultConfig.d.ts +1 -0
- package/lib/config-provider/defaultConfig.js +3 -3
- package/lib/config-provider/index.js +1 -2
- package/lib/date-picker/calendar.d.ts +2 -2
- package/lib/date-picker/calendar.js +4 -7
- package/lib/date-picker/context.js +2 -4
- package/lib/date-picker/date-panel.d.ts +1 -1
- package/lib/date-picker/date-panel.js +7 -10
- package/lib/date-picker/date-picker.js +5 -7
- package/lib/date-picker/hooks/use-range-cls.js +1 -2
- package/lib/date-picker/hooks/use-range-disabled.js +1 -2
- package/lib/date-picker/hooks/use-range-view-dates.js +1 -2
- package/lib/date-picker/hooks/use-text-value-mapping.js +1 -2
- package/lib/date-picker/index.js +1 -2
- package/lib/date-picker/locale/zh_CN.js +1 -2
- package/lib/date-picker/panel/date-time/date-time.d.ts +1 -1
- package/lib/date-picker/panel/date-time/date-time.js +2 -4
- package/lib/date-picker/panel/header/header.d.ts +1 -1
- package/lib/date-picker/panel/header/header.js +12 -14
- package/lib/date-picker/panel/month/month.d.ts +2 -2
- package/lib/date-picker/panel/month/month.js +3 -6
- package/lib/date-picker/panel/quarter/quarter.d.ts +2 -2
- package/lib/date-picker/panel/quarter/quarter.js +3 -6
- package/lib/date-picker/panel/time/time-column.d.ts +1 -1
- package/lib/date-picker/panel/time/time-column.js +10 -12
- package/lib/date-picker/panel/time/time.d.ts +2 -2
- package/lib/date-picker/panel/time/time.js +4 -6
- package/lib/date-picker/panel/week/week.d.ts +2 -2
- package/lib/date-picker/panel/week/week.js +8 -11
- package/lib/date-picker/panel/year/year.d.ts +2 -2
- package/lib/date-picker/panel/year/year.js +4 -7
- package/lib/date-picker/popper.js +3 -6
- package/lib/date-picker/range/input-range.js +7 -9
- package/lib/date-picker/range-picker.js +8 -10
- package/lib/date-picker/single/input-date.js +5 -7
- package/lib/date-picker/utils/date-fns.js +11 -8
- package/lib/date-picker/utils/get-extra-footer.d.ts +1 -1
- package/lib/date-picker/utils/get-extra-footer.js +1 -2
- package/lib/date-picker/utils/get-ranges.d.ts +2 -2
- package/lib/date-picker/utils/get-ranges.js +2 -2
- package/lib/date-picker/utils/index.js +4 -7
- package/lib/drawer/drawer.js +13 -16
- package/lib/drawer/index.js +2 -4
- package/lib/dropdown/dropdown.js +11 -13
- package/lib/dropdown/index.js +2 -4
- package/lib/dropdown/menu.js +5 -8
- package/lib/empty/defaultEmptyImg.d.ts +2 -2
- package/lib/empty/defaultEmptyImg.js +2 -4
- package/lib/empty/empty.js +8 -10
- package/lib/empty/illustrationEmptyImg.d.ts +2 -2
- package/lib/empty/illustrationEmptyImg.js +2 -4
- package/lib/empty/index.js +2 -4
- package/lib/filter/condition.js +7 -9
- package/lib/filter/filter.js +4 -6
- package/lib/filter/index.js +2 -4
- package/lib/filter/scheme.js +15 -17
- package/lib/form/Field.js +7 -11
- package/lib/form/FieldContext.js +1 -2
- package/lib/form/FieldLabel.js +3 -6
- package/lib/form/FieldWrapper.js +6 -8
- package/lib/form/Form.js +4 -6
- package/lib/form/FormContext.js +2 -4
- package/lib/form/hooks/useForceUpdate.js +1 -2
- package/lib/form/hooks/useForm.js +2 -4
- package/lib/form/index.js +2 -4
- package/lib/grid/col.js +2 -4
- package/lib/grid/row.js +3 -6
- package/lib/icon/icon.js +4 -6
- package/lib/icon/index.js +2 -4
- package/lib/icon/interface.js +3 -6
- package/lib/image/image.js +5 -7
- package/lib/image/index.js +2 -4
- package/lib/image/preview-group.js +5 -7
- package/lib/image/preview.js +9 -11
- package/lib/image-cropper/cropper.js +3 -6
- package/lib/image-cropper/image-cropper.js +6 -8
- package/lib/image-cropper/index.js +1 -2
- package/lib/image-cropper/operation-bar.js +7 -9
- package/lib/index.js +1 -2
- package/lib/input/ClearableLabeledInput.js +10 -13
- package/lib/input/TextArea.js +7 -10
- package/lib/input/calculateNodeHeight.js +0 -5
- package/lib/input/index.js +2 -4
- package/lib/input/input.js +6 -10
- package/lib/input-number/index.js +1 -2
- package/lib/input-number/inputNumber.js +6 -8
- package/lib/layout/index.js +2 -4
- package/lib/layout/layout.js +6 -12
- package/lib/layout/sider.js +18 -20
- package/lib/link/index.js +2 -4
- package/lib/link/link.js +6 -9
- package/lib/locale/index.js +2 -4
- package/lib/locale/locale.js +10 -14
- package/lib/locale/zh-CN.js +1 -2
- package/lib/menu/index.js +2 -4
- package/lib/menu/menu.js +4 -6
- package/lib/menu/menuItem.js +5 -8
- package/lib/menu/subMenu.js +7 -8
- package/lib/menu/util.js +8 -16
- package/lib/message/content.js +3 -5
- package/lib/message/index.js +1 -2
- package/lib/modal/confirm.js +1 -1
- package/lib/modal/index.js +2 -4
- package/lib/modal/modal.js +15 -19
- package/lib/notification/content.js +5 -7
- package/lib/notification/index.js +7 -5
- package/lib/notification-base/index.js +2 -3
- package/lib/notification-base/notice.js +5 -8
- package/lib/notification-base/notification.js +2 -4
- package/lib/pagination/index.js +1 -2
- package/lib/pagination/pagination.js +19 -23
- package/lib/popconfirm/index.js +2 -4
- package/lib/popconfirm/popconfirm.js +4 -6
- package/lib/progress/circle.js +6 -7
- package/lib/progress/index.js +1 -2
- package/lib/progress/line.js +1 -2
- package/lib/progress/progress.js +6 -10
- package/lib/progress/utils.js +3 -5
- package/lib/radio/context.js +3 -6
- package/lib/radio/group.js +2 -4
- package/lib/radio/index.js +1 -2
- package/lib/radio/radio-button.js +2 -4
- package/lib/radio/radio.js +3 -6
- package/lib/rate/index.js +1 -2
- package/lib/rate/rate.js +10 -14
- package/lib/search/index.js +1 -2
- package/lib/search/interface.js +3 -6
- package/lib/search/option.js +3 -6
- package/lib/search/quick-search.js +11 -14
- package/lib/search/search-panel.js +8 -8
- package/lib/search/search.js +8 -10
- package/lib/select/index.js +1 -2
- package/lib/select/interface.js +3 -6
- package/lib/select/option.js +5 -8
- package/lib/select/select.js +30 -34
- package/lib/slider/index.js +2 -4
- package/lib/slider/marks.d.ts +1 -1
- package/lib/slider/marks.js +2 -4
- package/lib/slider/slider.js +3 -6
- package/lib/slider/sliderTooltip.js +3 -6
- package/lib/slider/steps.d.ts +1 -1
- package/lib/slider/steps.js +2 -4
- package/lib/slider/track.d.ts +2 -2
- package/lib/slider/track.js +2 -4
- package/lib/space/index.js +2 -4
- package/lib/space/space.js +5 -7
- package/lib/spin/index.js +2 -4
- package/lib/spin/spin.js +9 -12
- package/lib/split-panel/index.js +2 -4
- package/lib/split-panel/split-panel.js +10 -13
- package/lib/split-panel/trigger.js +1 -2
- package/lib/stepper/index.js +2 -4
- package/lib/stepper/stepper.js +9 -13
- package/lib/steps/Step.js +3 -4
- package/lib/steps/Steps.js +4 -6
- package/lib/steps/index.js +1 -2
- package/lib/steps/interface.js +3 -6
- package/lib/switch/index.js +1 -2
- package/lib/switch/switch.js +7 -10
- package/lib/table/feature/autoRowSpan.js +1 -2
- package/lib/table/feature/colGroupExtendable.js +1 -2
- package/lib/table/feature/columnDrag.js +1 -2
- package/lib/table/feature/columnResize.js +1 -2
- package/lib/table/feature/contextMenu.js +1 -2
- package/lib/table/feature/filter.js +1 -2
- package/lib/table/feature/mergeCellHover.js +1 -2
- package/lib/table/feature/rowDetail.js +1 -2
- package/lib/table/feature/rowSelection.js +1 -2
- package/lib/table/feature/sort.js +1 -2
- package/lib/table/feature/treeMode.js +1 -2
- package/lib/table/feature/useFooterDataSource.js +1 -2
- package/lib/table/feature/useRangeSelection.js +1 -2
- package/lib/table/feature/useRowDrag.js +1 -2
- package/lib/table/index.js +1 -2
- package/lib/table/table.js +23 -9
- package/lib/tabs/active-line.js +2 -4
- package/lib/tabs/arrow-button.js +4 -6
- package/lib/tabs/context.js +3 -6
- package/lib/tabs/index.js +1 -2
- package/lib/tabs/style/index.css +9 -5
- package/lib/tabs/style/index.less +19 -4
- package/lib/tabs/tab-pane.js +8 -10
- package/lib/tabs/tabs.d.ts +2 -0
- package/lib/tabs/tabs.js +79 -47
- package/lib/tag/index.js +2 -4
- package/lib/tag/tag.js +10 -15
- package/lib/timeline/Timeline.js +7 -9
- package/lib/timeline/TimelineItem.js +7 -9
- package/lib/timeline/index.js +1 -2
- package/lib/tooltip/index.js +2 -4
- package/lib/tooltip/tooltip.js +3 -5
- package/lib/transfer/index.js +1 -2
- package/lib/transfer/list-body.js +3 -6
- package/lib/transfer/list-item.js +2 -4
- package/lib/transfer/list.js +9 -12
- package/lib/transfer/operation.d.ts +1 -1
- package/lib/transfer/operation.js +3 -4
- package/lib/transfer/search.js +3 -4
- package/lib/transfer/transfer.js +3 -6
- package/lib/tree/index.js +2 -4
- package/lib/tree/tree.js +14 -16
- package/lib/tree/treeHooks.js +12 -20
- package/lib/tree/treeNode.js +12 -17
- package/lib/tree/utils/treeUtils.js +38 -62
- package/lib/tree-select/index.js +2 -4
- package/lib/tree-select/interface.js +3 -6
- package/lib/tree-select/tree-select.js +27 -30
- package/lib/typography/base.js +5 -8
- package/lib/typography/index.js +1 -2
- package/lib/typography/paragraph.js +2 -4
- package/lib/typography/text.js +1 -2
- package/lib/typography/title.js +2 -4
- package/lib/typography/typography.js +2 -4
- package/lib/upload/dragger.js +2 -4
- package/lib/upload/index.js +2 -4
- package/lib/upload/scan-files.js +4 -5
- package/lib/upload/upload.js +38 -40
- package/lib/upload/verify-file.js +2 -3
- package/lib/view-container/context.js +3 -6
- package/lib/view-container/index.js +1 -2
- package/lib/view-container/view-container.js +2 -4
- package/lib/virtual-list/Filler.js +2 -4
- package/lib/virtual-list/index.js +2 -4
- package/lib/virtual-list/utils/itemUtil.js +1 -2
- package/lib/virtual-list/virtual-list.js +7 -10
- package/package.json +7 -5
- package/CHANGELOG.md +0 -1880
package/es/checkbox/checkbox.js
CHANGED
|
@@ -20,7 +20,7 @@ import isBoolean from 'lodash/isBoolean';
|
|
|
20
20
|
import Icon from '../icon';
|
|
21
21
|
import devWarning from '../_utils/devwarning';
|
|
22
22
|
var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
23
|
-
var _context, _context2, _context3,
|
|
23
|
+
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context0, _context1, _context10, _context11, _context12, _context13, _context14, _context15, _context16;
|
|
24
24
|
var _useContext = useContext(ConfigContext),
|
|
25
25
|
getPrefixCls = _useContext.getPrefixCls,
|
|
26
26
|
prefixCls = _useContext.prefixCls,
|
|
@@ -63,13 +63,13 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
63
63
|
var getIndeterminate = function getIndeterminate() {
|
|
64
64
|
return selected ? false : indeterminate;
|
|
65
65
|
};
|
|
66
|
-
var getDefaultClassName = classNames(className, (
|
|
67
|
-
var getSquareClassName = classNames(className, (
|
|
66
|
+
var getDefaultClassName = classNames(className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(checkboxPrefixCls), true), "".concat(checkboxPrefixCls, "-no-child"), !children), _concatInstanceProperty(_context = "".concat(checkboxPrefixCls, "-")).call(_context, mergedSize), !!children), _concatInstanceProperty(_context2 = "".concat(checkboxPrefixCls, "-")).call(_context2, mergedCheckboxType), true), _concatInstanceProperty(_context3 = "".concat(checkboxPrefixCls, "-")).call(_context3, mergedCheckboxType, "-disabled"), mergedDisabled), "checked", selected));
|
|
67
|
+
var getSquareClassName = classNames(className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(checkboxPrefixCls), true), _concatInstanceProperty(_context4 = "".concat(checkboxPrefixCls, "-")).call(_context4, mergedCheckboxType), true), _concatInstanceProperty(_context5 = "".concat(checkboxPrefixCls, "-")).call(_context5, mergedSize), !!children), _concatInstanceProperty(_context6 = "".concat(checkboxPrefixCls, "-")).call(_context6, mergedCheckboxType, "-disabled"), mergedDisabled), _concatInstanceProperty(_context7 = "".concat(checkboxPrefixCls, "-")).call(_context7, mergedCheckboxType, "-checked"), selected && !mergedDisabled), "checked", selected));
|
|
68
68
|
var getRootClassName = isDefaultType() ? getDefaultClassName : getSquareClassName;
|
|
69
69
|
var inputClassName = classNames(_defineProperty({}, "".concat(checkboxPrefixCls, "-input"), true));
|
|
70
|
-
var checkedWrapperClassName = classNames((
|
|
71
|
-
var triangleClassName = classNames((
|
|
72
|
-
var innerIconClassName = classNames(_defineProperty({}, _concatInstanceProperty(
|
|
70
|
+
var checkedWrapperClassName = classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, _concatInstanceProperty(_context8 = "".concat(checkboxPrefixCls, "-")).call(_context8, mergedCheckboxType, "-wrapper"), true), _concatInstanceProperty(_context9 = "".concat(checkboxPrefixCls, "-")).call(_context9, mergedCheckboxType, "-wrapper-size"), true), _concatInstanceProperty(_context0 = "".concat(checkboxPrefixCls, "-")).call(_context0, mergedCheckboxType, "-margin"), !!children), _concatInstanceProperty(_context1 = "".concat(checkboxPrefixCls, "-")).call(_context1, mergedCheckboxType, "-checked"), selected), _concatInstanceProperty(_context10 = "".concat(checkboxPrefixCls, "-")).call(_context10, mergedCheckboxType, "-indeterminate"), getIndeterminate()), _concatInstanceProperty(_context11 = "".concat(checkboxPrefixCls, "-")).call(_context11, mergedCheckboxType, "-disabled"), mergedDisabled && !selected), _concatInstanceProperty(_context12 = "".concat(checkboxPrefixCls, "-")).call(_context12, mergedCheckboxType, "-checked-disabled"), mergedDisabled && selected));
|
|
71
|
+
var triangleClassName = classNames(_defineProperty(_defineProperty(_defineProperty({}, _concatInstanceProperty(_context13 = "".concat(checkboxPrefixCls, "-")).call(_context13, mergedCheckboxType, "-triangle"), !selected), _concatInstanceProperty(_context14 = "".concat(checkboxPrefixCls, "-")).call(_context14, mergedCheckboxType, "-triangle-checked"), selected), _concatInstanceProperty(_context15 = "".concat(checkboxPrefixCls, "-")).call(_context15, mergedCheckboxType, "-triangle-disabled"), mergedDisabled));
|
|
72
|
+
var innerIconClassName = classNames(_defineProperty({}, _concatInstanceProperty(_context16 = "".concat(checkboxPrefixCls, "-")).call(_context16, mergedCheckboxType, "-inner"), true));
|
|
73
73
|
var handleChange = function handleChange(e) {
|
|
74
74
|
onChange && onChange(e);
|
|
75
75
|
(checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.onCheckboxGroupChange) && (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.onCheckboxGroupChange(value, e.target.checked, e));
|
|
@@ -96,7 +96,7 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
96
96
|
};
|
|
97
97
|
}, []);
|
|
98
98
|
var getDefaultCheckbox = function getDefaultCheckbox() {
|
|
99
|
-
var
|
|
99
|
+
var _context17, _context18;
|
|
100
100
|
var inputProps = {
|
|
101
101
|
type: 'checkbox',
|
|
102
102
|
className: inputClassName,
|
|
@@ -117,24 +117,24 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
117
117
|
ref: labelRef
|
|
118
118
|
}, rest), /*#__PURE__*/React.createElement("span", {
|
|
119
119
|
className: checkedWrapperClassName
|
|
120
|
-
}, selected ? /*#__PURE__*/React.createElement("span", {
|
|
120
|
+
}, selected ? (/*#__PURE__*/React.createElement("span", {
|
|
121
121
|
className: innerIconClassName
|
|
122
122
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
123
123
|
type: "right-bold",
|
|
124
|
-
className: _concatInstanceProperty(
|
|
125
|
-
})) : null, /*#__PURE__*/React.createElement("input", _extends({
|
|
124
|
+
className: _concatInstanceProperty(_context17 = "".concat(checkboxPrefixCls, "-")).call(_context17, mergedCheckboxType, "-inner-icon")
|
|
125
|
+
}))) : null, /*#__PURE__*/React.createElement("input", _extends({
|
|
126
126
|
type: "checkbox",
|
|
127
127
|
ref: ref
|
|
128
128
|
}, inputProps))), children ? /*#__PURE__*/React.createElement("span", {
|
|
129
129
|
className: "".concat(checkboxPrefixCls, "-children")
|
|
130
|
-
}, children) : null, !isDefaultType() ? /*#__PURE__*/React.createElement("span", {
|
|
130
|
+
}, children) : null, !isDefaultType() ? (/*#__PURE__*/React.createElement("span", {
|
|
131
131
|
className: triangleClassName
|
|
132
132
|
}, /*#__PURE__*/React.createElement("span", {
|
|
133
133
|
className: innerIconClassName
|
|
134
134
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
135
135
|
type: "right-bold",
|
|
136
|
-
className: _concatInstanceProperty(
|
|
137
|
-
}))) : null)
|
|
136
|
+
className: _concatInstanceProperty(_context18 = "".concat(checkboxPrefixCls, "-")).call(_context18, mergedCheckboxType, "-inner-icon")
|
|
137
|
+
})))) : null)
|
|
138
138
|
);
|
|
139
139
|
};
|
|
140
140
|
return getDefaultCheckbox();
|
|
@@ -24,7 +24,7 @@ var getCityId = function getCityId(data) {
|
|
|
24
24
|
return data;
|
|
25
25
|
};
|
|
26
26
|
var InternalSelect = function InternalSelect(props, ref) {
|
|
27
|
-
var _context
|
|
27
|
+
var _context;
|
|
28
28
|
var _useContext = useContext(ConfigContext),
|
|
29
29
|
getPrefixCls = _useContext.getPrefixCls,
|
|
30
30
|
prefixCls = _useContext.prefixCls,
|
|
@@ -108,13 +108,13 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
108
108
|
afterChangeFocus = _useState8[0],
|
|
109
109
|
setAfterChangeFocus = _useState8[1];
|
|
110
110
|
var _useState9 = useState(null),
|
|
111
|
-
|
|
112
|
-
seletedCity =
|
|
113
|
-
setSeletedCity =
|
|
114
|
-
var
|
|
115
|
-
|
|
116
|
-
tabsValue =
|
|
117
|
-
setTabsValue =
|
|
111
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
112
|
+
seletedCity = _useState0[0],
|
|
113
|
+
setSeletedCity = _useState0[1];
|
|
114
|
+
var _useState1 = useState('domestic'),
|
|
115
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
116
|
+
tabsValue = _useState10[0],
|
|
117
|
+
setTabsValue = _useState10[1];
|
|
118
118
|
var isDomestic = function isDomestic(type) {
|
|
119
119
|
return type === 'domestic';
|
|
120
120
|
};
|
|
@@ -122,7 +122,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
122
122
|
var cityPickerCls = classNames(selectPrefixCls, className, _defineProperty({}, "".concat(selectPrefixCls, "-visible"), optionShow));
|
|
123
123
|
var selectionCls = classNames(_defineProperty({}, "".concat(selectPrefixCls, "-selector"), true));
|
|
124
124
|
// 公共样式
|
|
125
|
-
var commCls = classNames((
|
|
125
|
+
var commCls = classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(selectPrefixCls, "-bordered"), borderType === 'bordered'), "".concat(selectPrefixCls, "-underline"), borderType === 'underline'), "".concat(selectPrefixCls, "-borderless"), borderType === 'none'), _concatInstanceProperty(_context = "".concat(selectPrefixCls, "-size-")).call(_context, size), size), "".concat(selectPrefixCls, "-wrapper"), true), "".concat(selectPrefixCls, "-show-search"), focusd));
|
|
126
126
|
useEffect(function () {
|
|
127
127
|
var _context2;
|
|
128
128
|
if (typeof value === 'undefined') return;
|
|
@@ -186,12 +186,11 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
186
186
|
};
|
|
187
187
|
// 渲染后缀图标
|
|
188
188
|
var renderSuffix = function renderSuffix() {
|
|
189
|
-
var _classNames4;
|
|
190
189
|
if (disabled) return null;
|
|
191
190
|
var suffixIcon = selectProps.suffixIcon;
|
|
192
|
-
var arrowIconCls = classNames((
|
|
191
|
+
var arrowIconCls = classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(selectPrefixCls, "-icon-arrow"), true), "".concat(selectPrefixCls, "-icon-arrow-up"), optionShow), "".concat(selectPrefixCls, "-icon-arrow-down"), !optionShow), "".concat(selectPrefixCls, "-icon-arrow-focus"), optionShow));
|
|
193
192
|
var iconShow = allowClear && !disabled && ((initValue !== null && initValue !== void 0 ? initValue : '') !== '' || searchValue);
|
|
194
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, iconShow && /*#__PURE__*/React.createElement("span", {
|
|
193
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, iconShow && (/*#__PURE__*/React.createElement("span", {
|
|
195
194
|
onClick: handleReset,
|
|
196
195
|
onMouseDown: function onMouseDown(e) {
|
|
197
196
|
return e.preventDefault();
|
|
@@ -200,7 +199,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
200
199
|
ref: clearRef
|
|
201
200
|
}, clearIcon || /*#__PURE__*/React.createElement(Icon, {
|
|
202
201
|
type: "close"
|
|
203
|
-
})), showArrow && /*#__PURE__*/React.createElement("span", {
|
|
202
|
+
}))), showArrow && /*#__PURE__*/React.createElement("span", {
|
|
204
203
|
className: arrowIconCls
|
|
205
204
|
}, suffixIcon || /*#__PURE__*/React.createElement(Icon, {
|
|
206
205
|
type: "arrow-down"
|
|
@@ -221,12 +220,12 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
221
220
|
}).join('|') : "(".concat(escapeRegExp(inputValue), ")"), 'i');
|
|
222
221
|
var strArr = text === null || text === void 0 ? void 0 : text.split(regex);
|
|
223
222
|
return /*#__PURE__*/React.createElement(React.Fragment, null, strArr === null || strArr === void 0 ? void 0 : _mapInstanceProperty(strArr).call(strArr, function (item, index) {
|
|
224
|
-
return (regex === null || regex === void 0 ? void 0 : regex.test(item)) ? /*#__PURE__*/React.createElement("span", {
|
|
223
|
+
return (regex === null || regex === void 0 ? void 0 : regex.test(item)) ? (/*#__PURE__*/React.createElement("span", {
|
|
225
224
|
key: index,
|
|
226
225
|
className: "".concat(selectPrefixCls, "-highlight")
|
|
227
|
-
}, item) : /*#__PURE__*/React.createElement("span", {
|
|
226
|
+
}, item)) : (/*#__PURE__*/React.createElement("span", {
|
|
228
227
|
key: index
|
|
229
|
-
}, item);
|
|
228
|
+
}, item));
|
|
230
229
|
}));
|
|
231
230
|
};
|
|
232
231
|
var handleOption = function handleOption(city) {
|
|
@@ -284,7 +283,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
284
283
|
};
|
|
285
284
|
// 渲染下拉列表框
|
|
286
285
|
var renderContent = function renderContent() {
|
|
287
|
-
return loading ? renderLoading() : /*#__PURE__*/React.createElement(React.Fragment, null, searchValue ? /*#__PURE__*/React.createElement(React.Fragment, null, isDomestic(type) && /*#__PURE__*/React.createElement(Tabs, {
|
|
286
|
+
return loading ? renderLoading() : (/*#__PURE__*/React.createElement(React.Fragment, null, searchValue ? (/*#__PURE__*/React.createElement(React.Fragment, null, isDomestic(type) && (/*#__PURE__*/React.createElement(Tabs, {
|
|
288
287
|
noContainer: true,
|
|
289
288
|
onChange: toggleTabPane,
|
|
290
289
|
activeKey: tabsValue
|
|
@@ -293,9 +292,9 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
293
292
|
key: item.id,
|
|
294
293
|
tab: item.name
|
|
295
294
|
}, item);
|
|
296
|
-
})), tabsValue === 'domestic' ? renderNodeList(domesticList, cityPickerLangMsg === null || cityPickerLangMsg === void 0 ? void 0 : cityPickerLangMsg.emptyText) : renderNodeList(foreignList, cityPickerLangMsg === null || cityPickerLangMsg === void 0 ? void 0 : cityPickerLangMsg.emptyText)) : /*#__PURE__*/React.createElement(React.Fragment, null, !!commonList.length && /*#__PURE__*/React.createElement("div", {
|
|
295
|
+
}))), tabsValue === 'domestic' ? renderNodeList(domesticList, cityPickerLangMsg === null || cityPickerLangMsg === void 0 ? void 0 : cityPickerLangMsg.emptyText) : renderNodeList(foreignList, cityPickerLangMsg === null || cityPickerLangMsg === void 0 ? void 0 : cityPickerLangMsg.emptyText))) : (/*#__PURE__*/React.createElement(React.Fragment, null, !!commonList.length && (/*#__PURE__*/React.createElement("div", {
|
|
297
296
|
className: "".concat(selectPrefixCls, "-dropdown-common")
|
|
298
|
-
}, cityPickerLangMsg === null || cityPickerLangMsg === void 0 ? void 0 : cityPickerLangMsg.common), renderNodeList(commonList, cityPickerLangMsg === null || cityPickerLangMsg === void 0 ? void 0 : cityPickerLangMsg.commonEmptyText, true)));
|
|
297
|
+
}, cityPickerLangMsg === null || cityPickerLangMsg === void 0 ? void 0 : cityPickerLangMsg.common)), renderNodeList(commonList, cityPickerLangMsg === null || cityPickerLangMsg === void 0 ? void 0 : cityPickerLangMsg.commonEmptyText, true)))));
|
|
299
298
|
};
|
|
300
299
|
var _renderCityInfo = useCallback(function (data) {
|
|
301
300
|
var isCommon = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -322,11 +321,10 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
322
321
|
}
|
|
323
322
|
}, [type, tabsValue]);
|
|
324
323
|
var renderSingle = function renderSingle() {
|
|
325
|
-
var _classNames5;
|
|
326
324
|
var hiddenStyle = !!searchValue || (initValue !== null && initValue !== void 0 ? initValue : '') !== '' ? {
|
|
327
325
|
visibility: 'hidden'
|
|
328
326
|
} : undefined;
|
|
329
|
-
var itemCls = classNames((
|
|
327
|
+
var itemCls = classNames(_defineProperty(_defineProperty({}, "".concat(selectPrefixCls, "-content-item"), true), "".concat(selectPrefixCls, "-content-item-seleted"), afterChangeFocus));
|
|
330
328
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
331
329
|
className: singleCls,
|
|
332
330
|
ref: selectionRef
|
|
@@ -342,10 +340,10 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
342
340
|
onFocus: handleFocus,
|
|
343
341
|
onBlur: handleBlur,
|
|
344
342
|
readOnly: !!disabled
|
|
345
|
-
}), !searchValue && /*#__PURE__*/React.createElement("span", {
|
|
343
|
+
}), !searchValue && (/*#__PURE__*/React.createElement("span", {
|
|
346
344
|
className: itemCls,
|
|
347
345
|
title: seletedCity === null || seletedCity === void 0 ? void 0 : seletedCity.name
|
|
348
|
-
}, seletedCity === null || seletedCity === void 0 ? void 0 : seletedCity.name)), !searchValue && /*#__PURE__*/React.createElement("span", {
|
|
346
|
+
}, seletedCity === null || seletedCity === void 0 ? void 0 : seletedCity.name))), !searchValue && /*#__PURE__*/React.createElement("span", {
|
|
349
347
|
className: "".concat(selectPrefixCls, "-content-info")
|
|
350
348
|
}, _renderCityInfo(seletedCity))), /*#__PURE__*/React.createElement("span", {
|
|
351
349
|
className: "".concat(selectPrefixCls, "-placeholder"),
|
|
@@ -354,7 +352,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
354
352
|
className: "".concat(selectPrefixCls, "-suffix")
|
|
355
353
|
}, renderSuffix())));
|
|
356
354
|
};
|
|
357
|
-
var singleCls = classNames(commCls, (
|
|
355
|
+
var singleCls = classNames(commCls, _defineProperty(_defineProperty({}, "".concat(selectPrefixCls, "-disabled"), disabled), "".concat(selectPrefixCls, "-focused"), !disabled && focusd || optionShow));
|
|
358
356
|
useEffect(function () {
|
|
359
357
|
if (optionShow && !disabled) {
|
|
360
358
|
var onDropdownVisibleChange = selectProps.onDropdownVisibleChange;
|
|
@@ -391,10 +389,10 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
391
389
|
}
|
|
392
390
|
return -1;
|
|
393
391
|
};
|
|
394
|
-
var
|
|
395
|
-
|
|
396
|
-
activeIndex =
|
|
397
|
-
setActiveIndex =
|
|
392
|
+
var _useState11 = useState(-1),
|
|
393
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
394
|
+
activeIndex = _useState12[0],
|
|
395
|
+
setActiveIndex = _useState12[1];
|
|
398
396
|
var initActiveIndex = function initActiveIndex() {
|
|
399
397
|
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
|
|
400
398
|
setActiveIndex(index === undefined ? getActiveIndex(0) : index);
|
package/es/city-picker/option.js
CHANGED
|
@@ -3,7 +3,6 @@ import React, { useContext, useRef } from 'react';
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import ConfigContext from '../config-provider/ConfigContext';
|
|
5
5
|
var InternalOption = function InternalOption(props, ref) {
|
|
6
|
-
var _classNames;
|
|
7
6
|
var optionRef = useRef(null) || ref;
|
|
8
7
|
var children = props.children,
|
|
9
8
|
value = props.value,
|
|
@@ -24,7 +23,7 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
24
23
|
prefixCls = _useContext.prefixCls;
|
|
25
24
|
var selectOptionPrefixCls = getPrefixCls(prefixCls, 'city-picker-list-item');
|
|
26
25
|
var isSelected = id !== undefined ? id === value : false;
|
|
27
|
-
var optionCls = classNames(selectOptionPrefixCls, className, (
|
|
26
|
+
var optionCls = classNames(selectOptionPrefixCls, className, _defineProperty(_defineProperty(_defineProperty({}, "".concat(selectOptionPrefixCls, "-selected"), isSelected), "".concat(selectOptionPrefixCls, "-disabled"), disabled), "".concat(selectOptionPrefixCls, "-active"), activeIndex === index));
|
|
28
27
|
var handleClick = function handleClick(e) {
|
|
29
28
|
e.preventDefault();
|
|
30
29
|
if (disabled || id === undefined) return;
|
|
@@ -43,11 +42,11 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
43
42
|
onClick: handleClick,
|
|
44
43
|
onMouseEnter: handleOnMouseEnter,
|
|
45
44
|
onMouseLeave: handleOnMouseLeave
|
|
46
|
-
}, typeof itemRender === 'function' ? itemRender(city) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
45
|
+
}, typeof itemRender === 'function' ? itemRender(city) : (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
47
46
|
className: "".concat(selectOptionPrefixCls, "-content")
|
|
48
47
|
}, children), /*#__PURE__*/React.createElement("span", {
|
|
49
48
|
className: "".concat(selectOptionPrefixCls, "-info")
|
|
50
|
-
}, renderCityInfo === null || renderCityInfo === void 0 ? void 0 : renderCityInfo(city, true)))));
|
|
49
|
+
}, renderCityInfo === null || renderCityInfo === void 0 ? void 0 : renderCityInfo(city, true))))));
|
|
51
50
|
};
|
|
52
51
|
var Option = /*#__PURE__*/React.forwardRef(InternalOption);
|
|
53
52
|
Option.displayName = 'CityPickerOption';
|
package/es/collapse/panel.js
CHANGED
|
@@ -17,7 +17,6 @@ import ConfigContext from '../config-provider/ConfigContext';
|
|
|
17
17
|
import { getCompProps } from '../_utils';
|
|
18
18
|
import Icon from '../icon';
|
|
19
19
|
var Panel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
20
|
-
var _classNames6, _classNames7, _classNames8;
|
|
21
20
|
var _React$useContext = React.useContext(ConfigContext),
|
|
22
21
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
23
22
|
prefixCls = _React$useContext.prefixCls,
|
|
@@ -63,8 +62,7 @@ var Panel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
63
62
|
onChange && onChange(panelKey);
|
|
64
63
|
};
|
|
65
64
|
var renderIcon = function renderIcon() {
|
|
66
|
-
var
|
|
67
|
-
var iconClassName = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(panelPrefixCls, "-icon"), true), _defineProperty(_classNames, "".concat(panelPrefixCls, "-animation-expand"), !expand), _defineProperty(_classNames, "".concat(panelPrefixCls, "-animation-collapse"), expand), _defineProperty(_classNames, "".concat(panelPrefixCls, "-disabled"), disabled), _classNames));
|
|
65
|
+
var iconClassName = classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(panelPrefixCls, "-icon"), true), "".concat(panelPrefixCls, "-animation-expand"), !expand), "".concat(panelPrefixCls, "-animation-collapse"), expand), "".concat(panelPrefixCls, "-disabled"), disabled));
|
|
68
66
|
return /*#__PURE__*/React.createElement("span", {
|
|
69
67
|
className: iconClassName,
|
|
70
68
|
onClick: handleClick
|
|
@@ -73,20 +71,18 @@ var Panel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
73
71
|
}));
|
|
74
72
|
};
|
|
75
73
|
var renderLeft = function renderLeft() {
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
var headerClassName = classNames((_classNames3 = {}, _defineProperty(_classNames3, "".concat(panelPrefixCls, "-header"), true), _defineProperty(_classNames3, "".concat(panelPrefixCls, "-disabled"), disabled), _classNames3));
|
|
74
|
+
var className = classNames(_defineProperty(_defineProperty({}, "".concat(panelPrefixCls, "-left"), true), "".concat(panelPrefixCls, "-disabled"), disabled));
|
|
75
|
+
var headerClassName = classNames(_defineProperty(_defineProperty({}, "".concat(panelPrefixCls, "-header"), true), "".concat(panelPrefixCls, "-disabled"), disabled));
|
|
79
76
|
return /*#__PURE__*/React.createElement("span", {
|
|
80
77
|
className: className,
|
|
81
78
|
onClick: handleClick
|
|
82
|
-
}, expandIconPosition === 'left' ? renderIcon() : null, header && /*#__PURE__*/React.createElement("span", {
|
|
79
|
+
}, expandIconPosition === 'left' ? renderIcon() : null, header && (/*#__PURE__*/React.createElement("span", {
|
|
83
80
|
className: headerClassName,
|
|
84
81
|
title: title
|
|
85
|
-
}, renderReactNode(header)));
|
|
82
|
+
}, renderReactNode(header))));
|
|
86
83
|
};
|
|
87
84
|
var renderRight = function renderRight() {
|
|
88
|
-
var
|
|
89
|
-
var className = classNames((_classNames4 = {}, _defineProperty(_classNames4, "".concat(panelPrefixCls, "-right"), true), _defineProperty(_classNames4, "".concat(panelPrefixCls, "-disabled"), disabled), _classNames4));
|
|
85
|
+
var className = classNames(_defineProperty(_defineProperty({}, "".concat(panelPrefixCls, "-right"), true), "".concat(panelPrefixCls, "-disabled"), disabled));
|
|
90
86
|
return /*#__PURE__*/React.createElement("span", {
|
|
91
87
|
className: className
|
|
92
88
|
}, extra && /*#__PURE__*/React.createElement("span", {
|
|
@@ -94,8 +90,7 @@ var Panel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
94
90
|
}, renderReactNode(extra)), expandIconPosition === 'right' ? renderIcon() : null);
|
|
95
91
|
};
|
|
96
92
|
var renderMiddle = function renderMiddle() {
|
|
97
|
-
var
|
|
98
|
-
var className = classNames((_classNames5 = {}, _defineProperty(_classNames5, "".concat(panelPrefixCls, "-middle"), true), _defineProperty(_classNames5, "".concat(panelPrefixCls, "-disabled"), disabled), _classNames5));
|
|
93
|
+
var className = classNames(_defineProperty(_defineProperty({}, "".concat(panelPrefixCls, "-middle"), true), "".concat(panelPrefixCls, "-disabled"), disabled));
|
|
99
94
|
return /*#__PURE__*/React.createElement("span", {
|
|
100
95
|
className: className
|
|
101
96
|
}, assist && /*#__PURE__*/React.createElement("span", {
|
|
@@ -108,9 +103,9 @@ var Panel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
108
103
|
}
|
|
109
104
|
return reactNode;
|
|
110
105
|
};
|
|
111
|
-
var rootClassName = classNames(className, (
|
|
112
|
-
var topClassName = classNames((
|
|
113
|
-
var childrenClassName = classNames((
|
|
106
|
+
var rootClassName = classNames(className, _defineProperty(_defineProperty(_defineProperty({}, "".concat(panelPrefixCls), true), "".concat(panelPrefixCls, "-border"), bordered), "".concat(panelPrefixCls, "-opened"), expand));
|
|
107
|
+
var topClassName = classNames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(panelPrefixCls, "-top"), true), "".concat(panelPrefixCls, "-disabled"), disabled), "".concat(panelPrefixCls, "-top-border"), bordered && expand));
|
|
108
|
+
var childrenClassName = classNames(_defineProperty(_defineProperty({}, "".concat(panelPrefixCls, "-children"), expand), "".concat(panelPrefixCls, "-children-hide"), !expand));
|
|
114
109
|
var childrenBorderedClassName = classNames(_defineProperty({}, "".concat(panelPrefixCls, "-children-bordered"), bordered));
|
|
115
110
|
var runExpandAnimation = function runExpandAnimation(element) {
|
|
116
111
|
element.style.height = '0px';
|
|
@@ -15,7 +15,7 @@ import { ChromePicker } from 'react-color';
|
|
|
15
15
|
import devWarning from '../_utils/devwarning';
|
|
16
16
|
import useOnClickOutside from './utils/hooks/useOnClickOutside';
|
|
17
17
|
var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
18
|
-
var
|
|
18
|
+
var _context;
|
|
19
19
|
var setCorrectColorValue = props.setCorrectColorValue,
|
|
20
20
|
setInputColorValue = props.setInputColorValue,
|
|
21
21
|
setAlpha = props.setAlpha,
|
|
@@ -53,7 +53,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
53
53
|
locale = _useContext.locale;
|
|
54
54
|
var colorPickerPrefixCls = getPrefixCls(prefixCls, 'color-picker');
|
|
55
55
|
var panelCls = classNames("".concat(colorPickerPrefixCls, "-panel"));
|
|
56
|
-
var panelChromePickerCls = classNames("".concat(colorPickerPrefixCls, "-panel-chrome"), (
|
|
56
|
+
var panelChromePickerCls = classNames("".concat(colorPickerPrefixCls, "-panel-chrome"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(colorPickerPrefixCls, "-panel-chrome-no-box"), !(showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showBox)), "".concat(colorPickerPrefixCls, "-panel-chrome-no-hue"), !(showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showHue)), "".concat(colorPickerPrefixCls, "-panel-chrome-no-opacity"), !(showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showOpacity)));
|
|
57
57
|
var panelFollowThemeCls = classNames("".concat(colorPickerPrefixCls, "-panel-switch"));
|
|
58
58
|
var panelInputCls = classNames("".concat(colorPickerPrefixCls, "-panel-input"), _defineProperty({}, "".concat(colorPickerPrefixCls, "-panel-input-no-recommend"), !showPresetColor));
|
|
59
59
|
var transparentCls = classNames("".concat(colorPickerPrefixCls, "-panel-transparent"));
|
|
@@ -173,19 +173,19 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
173
173
|
useOnClickOutside([panelClsRef, inputRef], function () {
|
|
174
174
|
setShowPanel(false);
|
|
175
175
|
});
|
|
176
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, showColorPickerPanel && /*#__PURE__*/React.createElement("div", {
|
|
176
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, showColorPickerPanel && (/*#__PURE__*/React.createElement("div", {
|
|
177
177
|
className: panelCls,
|
|
178
178
|
ref: panelClsRef
|
|
179
179
|
}, /*#__PURE__*/React.createElement(ChromePicker, {
|
|
180
180
|
className: panelChromePickerCls,
|
|
181
181
|
color: colTypeArr[2].value,
|
|
182
182
|
onChange: handleChromeChange
|
|
183
|
-
}), functionalColor && showSwitch && /*#__PURE__*/React.createElement("div", {
|
|
183
|
+
}), functionalColor && showSwitch && (/*#__PURE__*/React.createElement("div", {
|
|
184
184
|
className: panelFollowThemeCls
|
|
185
185
|
}, /*#__PURE__*/React.createElement("span", null, (switchName === null || switchName === void 0 ? void 0 : switchName.internationalName) && locale.getLangMsg('ColorPicker', switchName.internationalName) || switchName.name), /*#__PURE__*/React.createElement(Switch, {
|
|
186
186
|
checked: isFollow,
|
|
187
187
|
onChange: handleSwitchChange
|
|
188
|
-
})), showColorTransfer && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
188
|
+
}))), showColorTransfer && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
189
189
|
className: panelInputCls,
|
|
190
190
|
ref: panelInputRef
|
|
191
191
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
@@ -214,7 +214,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
214
214
|
borderType: "bordered",
|
|
215
215
|
value: alphaNoVerifyVal,
|
|
216
216
|
disabled: isFollow
|
|
217
|
-
})), showPresetColor && /*#__PURE__*/React.createElement("div", {
|
|
217
|
+
}))), showPresetColor && (/*#__PURE__*/React.createElement("div", {
|
|
218
218
|
className: colorDivContainerCls
|
|
219
219
|
}, _mapInstanceProperty(_context = checkUserPresetColor(presetColor) && presetColorToHEX(presetColor) || systemPresetColor).call(_context, function (colorValue, i) {
|
|
220
220
|
return /*#__PURE__*/React.createElement("li", {
|
|
@@ -230,7 +230,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
230
230
|
'square-click': clickedColorIndex === i
|
|
231
231
|
})
|
|
232
232
|
}));
|
|
233
|
-
}))));
|
|
233
|
+
}))))));
|
|
234
234
|
};
|
|
235
235
|
ColorPickerPanel.displayName = 'ColorPickerPanel';
|
|
236
236
|
export default ColorPickerPanel;
|
|
@@ -55,25 +55,25 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
55
55
|
colTypeArr = _useState8[0],
|
|
56
56
|
setColTypeArr = _useState8[1];
|
|
57
57
|
var _useState9 = useState(defaultOpen),
|
|
58
|
-
|
|
59
|
-
showPanel =
|
|
60
|
-
setShowPanel =
|
|
61
|
-
var
|
|
58
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
59
|
+
showPanel = _useState0[0],
|
|
60
|
+
setShowPanel = _useState0[1];
|
|
61
|
+
var _useState1 = useState(1),
|
|
62
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
63
|
+
alpha = _useState10[0],
|
|
64
|
+
setAlpha = _useState10[1];
|
|
65
|
+
var _useState11 = useState(alpha * 100 + '%'),
|
|
62
66
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
var _useState13 = useState(
|
|
67
|
+
alphaNoVerifyVal = _useState12[0],
|
|
68
|
+
setAlphaNoVerifyVal = _useState12[1];
|
|
69
|
+
var _useState13 = useState(false),
|
|
66
70
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
var _useState15 = useState(
|
|
71
|
+
isFollow = _useState14[0],
|
|
72
|
+
setIsFollow = _useState14[1];
|
|
73
|
+
var _useState15 = useState(),
|
|
70
74
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
var _useState17 = useState(),
|
|
74
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
75
|
-
clickedColorIndex = _useState18[0],
|
|
76
|
-
setClickedColorIndex = _useState18[1];
|
|
75
|
+
clickedColorIndex = _useState16[0],
|
|
76
|
+
setClickedColorIndex = _useState16[1];
|
|
77
77
|
var colorPickerPrefixCls = getPrefixCls(prefixCls, 'color-picker');
|
|
78
78
|
var popUpLayer = getPrefixCls(prefixCls, 'color-picker-pop');
|
|
79
79
|
var containerCls = classNames("".concat(colorPickerPrefixCls, "-container"));
|
|
@@ -130,8 +130,7 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
130
130
|
}
|
|
131
131
|
}, [value, defaultValue]);
|
|
132
132
|
var afterIcon = function afterIcon() {
|
|
133
|
-
var
|
|
134
|
-
var afterIconContainerCls = classNames("".concat(colorPickerPrefixCls, "-icon"), (_classNames = {}, _defineProperty(_classNames, "".concat(colorPickerPrefixCls, "-icon-underline"), borderType === 'underline'), _defineProperty(_classNames, "".concat(colorPickerPrefixCls, "-icon-bordered"), borderType === 'bordered'), _defineProperty(_classNames, "".concat(colorPickerPrefixCls, "-icon-up"), showPanel), _defineProperty(_classNames, "".concat(colorPickerPrefixCls, "-icon-down"), !showPanel), _classNames));
|
|
133
|
+
var afterIconContainerCls = classNames("".concat(colorPickerPrefixCls, "-icon"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(colorPickerPrefixCls, "-icon-underline"), borderType === 'underline'), "".concat(colorPickerPrefixCls, "-icon-bordered"), borderType === 'bordered'), "".concat(colorPickerPrefixCls, "-icon-up"), showPanel), "".concat(colorPickerPrefixCls, "-icon-down"), !showPanel));
|
|
135
134
|
return /*#__PURE__*/React.createElement("div", {
|
|
136
135
|
className: afterIconContainerCls,
|
|
137
136
|
style: {
|
|
@@ -90,11 +90,11 @@ export var getColorObj = function getColorObj(colorStr) {
|
|
|
90
90
|
var _b2 = colorArray[2].replace(')', '');
|
|
91
91
|
return _concatInstanceProperty(_context6 = _concatInstanceProperty(_context7 = "rgb(".concat(strFixed(r), ",")).call(_context7, strFixed(g), ",")).call(_context6, strFixed(_b2), ")");
|
|
92
92
|
} else {
|
|
93
|
-
var _context8, _context9,
|
|
93
|
+
var _context8, _context9, _context0;
|
|
94
94
|
var _r = colorArray[0].replace('rgba(', '');
|
|
95
95
|
var _b3 = colorArray[2];
|
|
96
96
|
var _a2 = colorArray[3].replace(')', '');
|
|
97
|
-
return _concatInstanceProperty(_context8 = _concatInstanceProperty(_context9 = _concatInstanceProperty(
|
|
97
|
+
return _concatInstanceProperty(_context8 = _concatInstanceProperty(_context9 = _concatInstanceProperty(_context0 = "rgba(".concat(strFixed(_r), ",")).call(_context0, strFixed(g), ",")).call(_context9, strFixed(_b3), ",")).call(_context8, strFixed(_a2, 2), ")");
|
|
98
98
|
}
|
|
99
99
|
} else {
|
|
100
100
|
return colorStr;
|
|
@@ -109,11 +109,11 @@ var removePercentage = function removePercentage(parameter) {
|
|
|
109
109
|
var colorToStr = function colorToStr(obj) {
|
|
110
110
|
var arr = obj.color;
|
|
111
111
|
if (obj.valpha === 1) {
|
|
112
|
-
var
|
|
113
|
-
return _concatInstanceProperty(
|
|
112
|
+
var _context1, _context10, _context11;
|
|
113
|
+
return _concatInstanceProperty(_context1 = _concatInstanceProperty(_context10 = _concatInstanceProperty(_context11 = "".concat(obj.model === 'hsv' ? 'hsb' : 'hsl', "(")).call(_context11, strFixed(arr[0]), ", ")).call(_context10, strFixed(arr[1]), "%, ")).call(_context1, strFixed(arr[2]), "%)");
|
|
114
114
|
} else {
|
|
115
|
-
var
|
|
116
|
-
return _concatInstanceProperty(
|
|
115
|
+
var _context12, _context13, _context14, _context15;
|
|
116
|
+
return _concatInstanceProperty(_context12 = _concatInstanceProperty(_context13 = _concatInstanceProperty(_context14 = _concatInstanceProperty(_context15 = "".concat(obj.model === 'hsv' ? 'hsba' : 'hsla', "(")).call(_context15, strFixed(arr[0]), ", ")).call(_context14, strFixed(arr[1]), "%, ")).call(_context13, strFixed(arr[2]), "%, ")).call(_context12, strFixed(obj.valpha, 2), ")");
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
119
|
export var strFixed = function strFixed(numStr) {
|
|
@@ -10,6 +10,7 @@ export interface IConfigProps {
|
|
|
10
10
|
prefixCls?: string;
|
|
11
11
|
localeConfig?: LocaleConfigType;
|
|
12
12
|
locale?: IntlUniversal;
|
|
13
|
+
isMobile?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export interface IContextConfigProps {
|
|
15
16
|
getPrefixCls?: (configPrefixCls?: string, suffixCls?: string, customizePrefixCls?: string) => string;
|
|
@@ -17,6 +18,7 @@ export interface IContextConfigProps {
|
|
|
17
18
|
prefixCls?: string;
|
|
18
19
|
localeConfig?: LocaleConfigType;
|
|
19
20
|
locale: IntlUniversal;
|
|
21
|
+
isMobile?: boolean;
|
|
20
22
|
}
|
|
21
23
|
declare const ConfigContext: import("react").Context<IContextConfigProps>;
|
|
22
24
|
export default ConfigContext;
|
|
@@ -245,7 +245,7 @@ declare const compDefaultProps: {
|
|
|
245
245
|
RadioGroup: {};
|
|
246
246
|
Rate: {
|
|
247
247
|
allowHalf: boolean;
|
|
248
|
-
icon: () => JSX.Element;
|
|
248
|
+
icon: () => React.JSX.Element;
|
|
249
249
|
count: number;
|
|
250
250
|
defaultValue: number;
|
|
251
251
|
disabled: boolean;
|
|
@@ -333,7 +333,7 @@ declare const compDefaultProps: {
|
|
|
333
333
|
disabled: boolean;
|
|
334
334
|
draggable: boolean;
|
|
335
335
|
virtual: boolean;
|
|
336
|
-
switcherIcon: () => JSX.Element;
|
|
336
|
+
switcherIcon: () => React.JSX.Element;
|
|
337
337
|
estimatedItemSize: number;
|
|
338
338
|
expandOnClickNode: boolean;
|
|
339
339
|
};
|
|
@@ -444,7 +444,7 @@ declare const compDefaultProps: {
|
|
|
444
444
|
treeExpandOnClickNode: boolean;
|
|
445
445
|
onlyExpandOnClickIcon: boolean;
|
|
446
446
|
showSearch: boolean;
|
|
447
|
-
switcherIcon: () => JSX.Element;
|
|
447
|
+
switcherIcon: () => React.JSX.Element;
|
|
448
448
|
expandOnClickNode: boolean;
|
|
449
449
|
listHeight: number;
|
|
450
450
|
virtual: boolean;
|
|
@@ -6,5 +6,6 @@ declare const defaultConfig: {
|
|
|
6
6
|
getLangMsg: (componentName: string, labelName: string, params?: any) => string | import("react").ReactNode[];
|
|
7
7
|
getCompLangMsg: (compLangMsgParams: import("../locale").CompLangMsgParams, customGetLangMsg?: ((componentName: string, labelName: string, params: any) => any) | undefined, localeDate?: any) => any;
|
|
8
8
|
};
|
|
9
|
+
isMobile: boolean;
|
|
9
10
|
};
|
|
10
11
|
export default defaultConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { DateType, PickerMode, SharedTimeProps } from './interface';
|
|
3
3
|
import { RangeShowTimeObject } from './range-picker';
|
|
4
4
|
export interface CalendarProps {
|
|
@@ -9,5 +9,5 @@ export interface CalendarProps {
|
|
|
9
9
|
showTime?: boolean | SharedTimeProps | RangeShowTimeObject;
|
|
10
10
|
disabledDate?: (date: DateType) => boolean;
|
|
11
11
|
}
|
|
12
|
-
declare function Calendar(props: CalendarProps): JSX.Element;
|
|
12
|
+
declare function Calendar(props: CalendarProps): React.JSX.Element;
|
|
13
13
|
export default Calendar;
|
|
@@ -23,7 +23,7 @@ function Calendar(props) {
|
|
|
23
23
|
var weekTitleItemCls = classnames("".concat(prefixCls, "-weektitle-item"));
|
|
24
24
|
if (showWeekNumber) {
|
|
25
25
|
var weekTitleNumberItemCls = classnames("".concat(prefixCls, "-weektitle-weeknumber"));
|
|
26
|
-
dayNames.push(
|
|
26
|
+
dayNames.push(/*#__PURE__*/React.createElement("div", {
|
|
27
27
|
key: "W",
|
|
28
28
|
className: weekTitleNumberItemCls
|
|
29
29
|
}));
|
|
@@ -43,7 +43,7 @@ function Calendar(props) {
|
|
|
43
43
|
var weeks = [];
|
|
44
44
|
var i = 0;
|
|
45
45
|
while (true) {
|
|
46
|
-
weeks.push(
|
|
46
|
+
weeks.push(/*#__PURE__*/React.createElement(Week, {
|
|
47
47
|
key: i,
|
|
48
48
|
day: currentWeekStart,
|
|
49
49
|
picker: picker,
|
|
@@ -69,7 +69,6 @@ function Calendar(props) {
|
|
|
69
69
|
// }
|
|
70
70
|
// }
|
|
71
71
|
}
|
|
72
|
-
|
|
73
72
|
return weeks;
|
|
74
73
|
};
|
|
75
74
|
var calendarCls = classnames("".concat(prefixCls, "-calendar"));
|
|
@@ -49,5 +49,5 @@ declare type OmitType = Omit<PickerPanelBaseProps, 'picker'> & Omit<PickerPanelD
|
|
|
49
49
|
interface MergedPickerPanelProps extends OmitType {
|
|
50
50
|
picker?: PickerMode;
|
|
51
51
|
}
|
|
52
|
-
declare function Panel(props: MergedPickerPanelProps): JSX.Element;
|
|
52
|
+
declare function Panel(props: MergedPickerPanelProps): React.JSX.Element;
|
|
53
53
|
export default Panel;
|