@kdcloudjs/kdesign 1.8.11 → 1.8.13
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.css +1 -1
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +93 -15
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +1 -1
- package/dist/kdesign.min.js +3 -3
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/KeyCode.js +1 -333
- package/es/_utils/arrayUtil.js +0 -8
- package/es/_utils/formatUtil.js +9 -59
- package/es/_utils/getStringLength.js +0 -1
- package/es/_utils/hooks.js +2 -34
- package/es/_utils/index.js +1 -7
- package/es/_utils/numberUtil.js +0 -54
- package/es/_utils/raf.js +2 -2
- package/es/_utils/reactNode.js +1 -1
- package/es/_utils/resizeObserver.js +2 -4
- package/es/_utils/type.js +0 -1
- package/es/_utils/usePopper.js +3 -3
- package/es/alert/alert.js +8 -16
- package/es/anchor/anchor-link.js +3 -3
- package/es/anchor/anchor.js +23 -26
- package/es/anchor/context.js +1 -1
- package/es/avatar/avatar.js +8 -11
- package/es/badge/badge.js +7 -13
- package/es/base-data/base-data.js +42 -104
- package/es/breadcrumb/breadcrumb.js +12 -12
- package/es/breadcrumb/breadcrumbItem.js +5 -5
- package/es/button/button.js +13 -24
- package/es/button/group.js +13 -13
- package/es/card/card.js +12 -14
- package/es/carousel/carousel.js +13 -13
- package/es/carousel/displayList.js +3 -3
- package/es/carousel/fadeList.js +3 -3
- package/es/carousel/slideList.js +4 -4
- package/es/carousel/slidebar.js +3 -3
- package/es/cascader/cascader.js +31 -36
- package/es/checkbox/checkbox.js +25 -30
- package/es/checkbox/group.js +8 -9
- package/es/city-picker/city-picker.js +28 -38
- package/es/city-picker/interface.js +1 -1
- package/es/city-picker/option.js +4 -4
- package/es/clipboard/clipboard.js +5 -23
- package/es/clipboard/util.js +0 -60
- package/es/collapse/collapse.js +5 -5
- package/es/collapse/panel.js +15 -15
- package/es/color-picker/color-picker-panel.js +12 -13
- package/es/color-picker/color-picker.js +6 -10
- package/es/color-picker/utils/validateColor.js +0 -3
- package/es/config-provider/ConfigContext.js +1 -4
- package/es/config-provider/SizeContext.js +3 -3
- package/es/config-provider/compDefaultProps.js +3 -10
- package/es/config-provider/configProvider.js +1 -6
- package/es/config-provider/defaultConfig.js +0 -1
- package/es/date-picker/calendar.js +6 -23
- package/es/date-picker/context.js +1 -1
- package/es/date-picker/date-panel.js +12 -13
- package/es/date-picker/date-picker.js +7 -12
- package/es/date-picker/hooks/use-hover-value.js +0 -1
- package/es/date-picker/hooks/use-picker-input.js +0 -4
- package/es/date-picker/hooks/use-range-disabled.js +2 -6
- package/es/date-picker/hooks/use-range-view-dates.js +1 -9
- package/es/date-picker/hooks/use-text-value-mapping.js +0 -1
- package/es/date-picker/locale/zh_CN.js +0 -1
- package/es/date-picker/panel/date-time/date-time.js +4 -6
- package/es/date-picker/panel/header/header.js +14 -14
- package/es/date-picker/panel/month/month.js +5 -6
- package/es/date-picker/panel/quarter/quarter.js +4 -4
- package/es/date-picker/panel/time/time-column.js +4 -6
- package/es/date-picker/panel/time/time.js +10 -35
- package/es/date-picker/panel/week/week.js +5 -8
- package/es/date-picker/panel/year/year.js +4 -6
- package/es/date-picker/popper.js +3 -6
- package/es/date-picker/range/input-range.js +12 -13
- package/es/date-picker/range-picker.js +13 -36
- package/es/date-picker/single/input-date.js +8 -14
- package/es/date-picker/utils/date-fns.js +0 -35
- package/es/date-picker/utils/get-extra-footer.js +1 -1
- package/es/date-picker/utils/get-ranges.js +8 -8
- package/es/date-picker/utils/index.js +0 -3
- package/es/divider/divider.js +2 -2
- package/es/drawer/drawer.js +14 -39
- package/es/dropdown/dropdown.js +10 -11
- package/es/dropdown/menu.js +8 -12
- package/es/empty/defaultEmptyImg.js +18 -18
- package/es/empty/empty.js +9 -10
- package/es/empty/illustrationEmptyImg.js +106 -106
- package/es/filter/condition.js +10 -10
- package/es/filter/filter.js +17 -19
- package/es/filter/scheme.js +34 -41
- package/es/form/Field.js +5 -5
- package/es/form/FieldContext.js +1 -1
- package/es/form/FieldLabel.js +2 -2
- package/es/form/FieldWrapper.js +6 -6
- package/es/form/Form.js +2 -5
- package/es/form/FormContext.js +2 -4
- package/es/form/hooks/useForm.js +1 -14
- package/es/form/index.js +1 -1
- package/es/grid/col.js +1 -7
- package/es/grid/row.js +3 -9
- package/es/icon/icon.js +2 -2
- package/es/image/image.js +5 -7
- package/es/image/preview-group.js +3 -4
- package/es/image/preview.js +22 -24
- package/es/image-cropper/cropper.js +3 -6
- package/es/image-cropper/image-cropper.js +5 -5
- package/es/image-cropper/operation-bar.js +9 -9
- package/es/index.js +4 -0
- package/es/input/ClearableLabeledInput.js +13 -13
- package/es/input/TextArea.js +7 -7
- package/es/input/calculateNodeHeight.js +6 -11
- package/es/input/index.js +0 -1
- package/es/input/input.js +5 -5
- package/es/input-number/inputNumber.js +3 -10
- package/es/layout/layout.js +5 -9
- package/es/layout/sider.js +11 -14
- package/es/link/link.js +8 -12
- package/es/locale/locale.js +4 -34
- package/es/menu/menu.js +3 -4
- package/es/menu/menuItem.js +8 -13
- package/es/menu/subMenu.js +19 -27
- package/es/menu/util.js +0 -4
- package/es/message/content.js +13 -13
- package/es/message/index.js +1 -3
- package/es/modal/confirm.js +1 -1
- package/es/modal/modal.js +32 -40
- package/es/notification/content.js +18 -18
- package/es/notification/index.js +1 -1
- package/es/notification-base/index.js +1 -1
- package/es/notification-base/notice.js +2 -2
- package/es/notification-base/notification.js +3 -3
- package/es/pagination/pagination.js +48 -70
- package/es/popconfirm/popconfirm.js +8 -10
- package/es/popper/index.d.ts +4 -1
- package/es/popper/index.js +84 -22
- package/es/progress/circle.js +6 -8
- package/es/progress/line.js +3 -3
- package/es/progress/progress.js +11 -11
- package/es/qr-code/qr-code.js +6 -6
- package/es/radio/context.js +1 -1
- package/es/radio/group.js +9 -13
- package/es/radio/radio-button.js +2 -2
- package/es/radio/radio.js +19 -24
- package/es/rate/rate.js +11 -61
- package/es/search/option.js +4 -5
- package/es/search/quick-search.js +36 -57
- package/es/search/search-panel.js +56 -60
- package/es/search/search.js +9 -10
- package/es/select/interface.js +1 -1
- package/es/select/option.js +4 -4
- package/es/select/select.js +47 -87
- package/es/signature/drawingBoard.js +16 -16
- package/es/signature/signature.js +20 -20
- package/es/signature/utils/signature_pad.js +4 -12
- package/es/slider/marks.js +3 -5
- package/es/slider/slider.js +11 -32
- package/es/slider/sliderTooltip.js +3 -3
- package/es/slider/steps.js +2 -2
- package/es/slider/track.js +1 -1
- package/es/space/space.js +3 -5
- package/es/spin/spin.js +16 -18
- package/es/split-panel/split-panel.js +7 -18
- package/es/split-panel/trigger.js +6 -6
- package/es/stepper/stepper.js +11 -12
- package/es/steps/Step.js +8 -8
- package/es/steps/Steps.js +5 -5
- package/es/switch/switch.js +4 -6
- package/es/table/api.js +5 -22
- package/es/table/table.js +4 -15
- package/es/tabs/active-line.js +2 -6
- package/es/tabs/arrow-button.js +3 -3
- package/es/tabs/context.js +1 -1
- package/es/tabs/index.js +0 -1
- package/es/tabs/tab-pane.js +6 -6
- package/es/tabs/tabs.js +31 -34
- package/es/tag/tag.js +7 -15
- package/es/timeline/Timeline.js +5 -5
- package/es/timeline/TimelineItem.js +5 -5
- package/es/tooltip/tooltip.js +2 -2
- package/es/transfer/list-body.js +4 -4
- package/es/transfer/list-item.js +5 -6
- package/es/transfer/list.js +18 -22
- package/es/transfer/operation.js +7 -7
- package/es/transfer/search.js +5 -5
- package/es/transfer/transfer.js +8 -13
- package/es/tree/tree.js +9 -9
- package/es/tree/treeNode.js +18 -20
- package/es/tree/utils/treeUtils.js +1 -27
- package/es/tree-select/interface.js +1 -1
- package/es/tree-select/tree-select.js +35 -48
- package/es/typography/base.js +5 -5
- package/es/typography/index.js +0 -1
- package/es/typography/paragraph.js +1 -1
- package/es/typography/text.js +1 -1
- package/es/typography/title.js +1 -1
- package/es/typography/typography.js +4 -8
- package/es/upload/dragger.js +2 -2
- package/es/upload/request.js +0 -5
- package/es/upload/scan-files.js +0 -1
- package/es/upload/upload.js +34 -34
- package/es/upload/verify-file.js +0 -1
- package/es/view-container/context.js +1 -1
- package/es/view-container/view-container.js +4 -8
- package/es/virtual-list/Filler.js +2 -2
- package/es/virtual-list/utils/algorithmUtil.js +0 -13
- package/es/virtual-list/utils/itemUtil.js +0 -30
- package/es/virtual-list/virtual-list.js +8 -11
- package/lib/_utils/KeyCode.js +1 -333
- package/lib/_utils/arrayUtil.js +0 -8
- package/lib/_utils/formatUtil.js +9 -59
- package/lib/_utils/getStringLength.js +0 -1
- package/lib/_utils/hooks.js +2 -34
- package/lib/_utils/index.js +0 -7
- package/lib/_utils/numberUtil.js +0 -54
- package/lib/_utils/raf.js +2 -2
- package/lib/_utils/reactNode.js +1 -1
- package/lib/_utils/resizeObserver.js +2 -4
- package/lib/_utils/type.js +0 -1
- package/lib/_utils/usePopper.js +3 -3
- package/lib/alert/alert.js +8 -16
- package/lib/anchor/anchor-link.js +3 -3
- package/lib/anchor/anchor.js +23 -26
- package/lib/anchor/context.js +1 -1
- package/lib/avatar/avatar.js +8 -11
- package/lib/badge/badge.js +7 -13
- package/lib/base-data/base-data.js +42 -104
- package/lib/breadcrumb/breadcrumb.js +12 -12
- package/lib/breadcrumb/breadcrumbItem.js +5 -5
- package/lib/button/button.js +13 -24
- package/lib/button/group.js +13 -13
- package/lib/card/card.js +12 -14
- package/lib/carousel/carousel.js +13 -13
- package/lib/carousel/displayList.js +3 -3
- package/lib/carousel/fadeList.js +3 -3
- package/lib/carousel/slideList.js +4 -4
- package/lib/carousel/slidebar.js +3 -3
- package/lib/cascader/cascader.js +31 -36
- package/lib/checkbox/checkbox.js +25 -30
- package/lib/checkbox/group.js +8 -8
- package/lib/city-picker/city-picker.js +28 -38
- package/lib/city-picker/interface.js +1 -1
- package/lib/city-picker/option.js +4 -4
- package/lib/clipboard/clipboard.js +5 -23
- package/lib/clipboard/util.js +0 -60
- package/lib/collapse/collapse.js +5 -5
- package/lib/collapse/panel.js +15 -15
- package/lib/color-picker/color-picker-panel.js +12 -14
- package/lib/color-picker/color-picker.js +6 -10
- package/lib/color-picker/utils/validateColor.js +0 -3
- package/lib/config-provider/ConfigContext.js +1 -5
- package/lib/config-provider/SizeContext.js +3 -3
- package/lib/config-provider/compDefaultProps.js +3 -10
- package/lib/config-provider/configProvider.js +1 -7
- package/lib/config-provider/defaultConfig.js +0 -1
- package/lib/date-picker/calendar.js +6 -23
- package/lib/date-picker/context.js +1 -1
- package/lib/date-picker/date-panel.js +12 -13
- package/lib/date-picker/date-picker.js +7 -12
- package/lib/date-picker/hooks/use-hover-value.js +0 -1
- package/lib/date-picker/hooks/use-picker-input.js +0 -4
- package/lib/date-picker/hooks/use-range-disabled.js +2 -6
- package/lib/date-picker/hooks/use-range-view-dates.js +1 -9
- package/lib/date-picker/hooks/use-text-value-mapping.js +0 -1
- package/lib/date-picker/locale/zh_CN.js +0 -1
- package/lib/date-picker/panel/date-time/date-time.js +4 -6
- package/lib/date-picker/panel/header/header.js +14 -14
- package/lib/date-picker/panel/month/month.js +5 -6
- package/lib/date-picker/panel/quarter/quarter.js +4 -4
- package/lib/date-picker/panel/time/time-column.js +4 -6
- package/lib/date-picker/panel/time/time.js +10 -35
- package/lib/date-picker/panel/week/week.js +5 -8
- package/lib/date-picker/panel/year/year.js +4 -6
- package/lib/date-picker/popper.js +3 -6
- package/lib/date-picker/range/input-range.js +12 -13
- package/lib/date-picker/range-picker.js +13 -36
- package/lib/date-picker/single/input-date.js +8 -14
- package/lib/date-picker/utils/date-fns.js +0 -34
- package/lib/date-picker/utils/get-extra-footer.js +1 -1
- package/lib/date-picker/utils/get-ranges.js +8 -8
- package/lib/date-picker/utils/index.js +0 -3
- package/lib/divider/divider.js +2 -2
- package/lib/drawer/drawer.js +14 -40
- package/lib/dropdown/dropdown.js +10 -11
- package/lib/dropdown/menu.js +8 -12
- package/lib/empty/defaultEmptyImg.js +18 -18
- package/lib/empty/empty.js +9 -10
- package/lib/empty/illustrationEmptyImg.js +106 -106
- package/lib/filter/condition.js +10 -10
- package/lib/filter/filter.js +17 -19
- package/lib/filter/scheme.js +34 -41
- package/lib/form/Field.js +5 -5
- package/lib/form/FieldContext.js +1 -1
- package/lib/form/FieldLabel.js +2 -2
- package/lib/form/FieldWrapper.js +6 -6
- package/lib/form/Form.js +2 -5
- package/lib/form/FormContext.js +2 -4
- package/lib/form/hooks/useForm.js +1 -14
- package/lib/form/index.js +1 -1
- package/lib/grid/col.js +1 -7
- package/lib/grid/row.js +3 -9
- package/lib/icon/icon.js +2 -2
- package/lib/image/image.js +5 -7
- package/lib/image/preview-group.js +3 -4
- package/lib/image/preview.js +22 -24
- package/lib/image-cropper/cropper.js +3 -6
- package/lib/image-cropper/image-cropper.js +5 -5
- package/lib/image-cropper/operation-bar.js +9 -9
- package/lib/index.js +2 -8
- package/lib/input/ClearableLabeledInput.js +13 -13
- package/lib/input/TextArea.js +7 -7
- package/lib/input/calculateNodeHeight.js +6 -11
- package/lib/input/index.js +0 -1
- package/lib/input/input.js +5 -5
- package/lib/input-number/inputNumber.js +3 -10
- package/lib/layout/layout.js +5 -9
- package/lib/layout/sider.js +11 -14
- package/lib/link/link.js +8 -12
- package/lib/locale/locale.js +4 -34
- package/lib/menu/menu.js +3 -4
- package/lib/menu/menuItem.js +8 -13
- package/lib/menu/subMenu.js +19 -27
- package/lib/menu/util.js +0 -4
- package/lib/message/content.js +13 -13
- package/lib/message/index.js +1 -3
- package/lib/modal/confirm.js +1 -1
- package/lib/modal/modal.js +32 -40
- package/lib/notification/content.js +18 -18
- package/lib/notification/index.js +1 -1
- package/lib/notification-base/index.js +1 -1
- package/lib/notification-base/notice.js +2 -2
- package/lib/notification-base/notification.js +3 -3
- package/lib/pagination/pagination.js +48 -70
- package/lib/popconfirm/popconfirm.js +8 -10
- package/lib/popper/index.d.ts +4 -1
- package/lib/popper/index.js +84 -22
- package/lib/progress/circle.js +6 -8
- package/lib/progress/line.js +3 -3
- package/lib/progress/progress.js +11 -11
- package/lib/qr-code/qr-code.js +6 -6
- package/lib/radio/context.js +1 -1
- package/lib/radio/group.js +9 -13
- package/lib/radio/radio-button.js +2 -2
- package/lib/radio/radio.js +19 -24
- package/lib/rate/rate.js +11 -61
- package/lib/search/option.js +4 -5
- package/lib/search/quick-search.js +36 -57
- package/lib/search/search-panel.js +56 -60
- package/lib/search/search.js +9 -10
- package/lib/select/interface.js +1 -1
- package/lib/select/option.js +4 -4
- package/lib/select/select.js +47 -87
- package/lib/signature/drawingBoard.js +16 -16
- package/lib/signature/signature.js +20 -20
- package/lib/signature/utils/signature_pad.js +4 -12
- package/lib/slider/marks.js +3 -5
- package/lib/slider/slider.js +11 -32
- package/lib/slider/sliderTooltip.js +3 -3
- package/lib/slider/steps.js +2 -2
- package/lib/slider/track.js +1 -1
- package/lib/space/space.js +3 -5
- package/lib/spin/spin.js +16 -18
- package/lib/split-panel/split-panel.js +7 -18
- package/lib/split-panel/trigger.js +6 -6
- package/lib/stepper/stepper.js +11 -12
- package/lib/steps/Step.js +8 -8
- package/lib/steps/Steps.js +5 -5
- package/lib/switch/switch.js +4 -6
- package/lib/table/api.js +5 -22
- package/lib/table/table.js +4 -15
- package/lib/tabs/active-line.js +2 -6
- package/lib/tabs/arrow-button.js +3 -3
- package/lib/tabs/context.js +1 -1
- package/lib/tabs/index.js +0 -1
- package/lib/tabs/tab-pane.js +6 -6
- package/lib/tabs/tabs.js +31 -34
- package/lib/tag/tag.js +7 -15
- package/lib/timeline/Timeline.js +5 -5
- package/lib/timeline/TimelineItem.js +5 -5
- package/lib/tooltip/tooltip.js +2 -2
- package/lib/transfer/list-body.js +4 -4
- package/lib/transfer/list-item.js +5 -6
- package/lib/transfer/list.js +18 -22
- package/lib/transfer/operation.js +7 -7
- package/lib/transfer/search.js +5 -5
- package/lib/transfer/transfer.js +8 -13
- package/lib/tree/tree.js +9 -9
- package/lib/tree/treeNode.js +18 -20
- package/lib/tree/utils/treeUtils.js +1 -27
- package/lib/tree-select/interface.js +1 -1
- package/lib/tree-select/tree-select.js +35 -48
- package/lib/typography/base.js +5 -5
- package/lib/typography/index.js +0 -1
- package/lib/typography/paragraph.js +1 -1
- package/lib/typography/text.js +1 -1
- package/lib/typography/title.js +1 -1
- package/lib/typography/typography.js +4 -8
- package/lib/upload/dragger.js +2 -2
- package/lib/upload/request.js +0 -5
- package/lib/upload/scan-files.js +0 -1
- package/lib/upload/upload.js +34 -34
- package/lib/upload/verify-file.js +0 -1
- package/lib/view-container/context.js +1 -1
- package/lib/view-container/view-container.js +4 -8
- package/lib/virtual-list/Filler.js +2 -2
- package/lib/virtual-list/utils/algorithmUtil.js +0 -13
- package/lib/virtual-list/utils/itemUtil.js +0 -30
- package/lib/virtual-list/virtual-list.js +8 -12
- package/package.json +1 -3
package/es/progress/circle.js
CHANGED
|
@@ -44,14 +44,14 @@ var Circle = function Circle(props) {
|
|
|
44
44
|
var gradientArr = isGradient ? _sortInstanceProperty(_context2 = _Object$keys(gradientColor)).call(_context2, function (a, b) {
|
|
45
45
|
return stripPercentToNumber(a) - stripPercentToNumber(b);
|
|
46
46
|
}) : null;
|
|
47
|
-
var gradientDom = isGradient ?
|
|
47
|
+
var gradientDom = isGradient ? React.createElement("defs", null, React.createElement("linearGradient", {
|
|
48
48
|
id: _concatInstanceProperty(_context3 = "".concat(prefixCls, "-gradient-")).call(_context3, gradientId),
|
|
49
49
|
x1: "100%",
|
|
50
50
|
y1: "0%",
|
|
51
51
|
x2: "0%",
|
|
52
52
|
y2: "0%"
|
|
53
53
|
}, gradientArr === null || gradientArr === void 0 ? void 0 : _mapInstanceProperty(gradientArr).call(gradientArr, function (key, index) {
|
|
54
|
-
return
|
|
54
|
+
return React.createElement("stop", {
|
|
55
55
|
key: index,
|
|
56
56
|
offset: key,
|
|
57
57
|
stopColor: gradientColor[key]
|
|
@@ -66,27 +66,25 @@ var Circle = function Circle(props) {
|
|
|
66
66
|
stroke: pathColor
|
|
67
67
|
};
|
|
68
68
|
var wrapperClassName = classNames("".concat(prefixCls, "-circle-box"), _defineProperty({}, "".concat(prefixCls, "-circle-gradient"), isGradient));
|
|
69
|
-
return
|
|
69
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
70
70
|
className: wrapperClassName,
|
|
71
71
|
style: circleStyle
|
|
72
|
-
},
|
|
72
|
+
}, React.createElement("svg", {
|
|
73
73
|
className: "".concat(prefixCls, "-circle"),
|
|
74
74
|
viewBox: "0 0 100 100",
|
|
75
75
|
strokeWidth: strokeWidth
|
|
76
|
-
}, gradientDom,
|
|
76
|
+
}, gradientDom, React.createElement("path", {
|
|
77
77
|
className: "".concat(prefixCls, "-circle-trail"),
|
|
78
78
|
style: {
|
|
79
79
|
stroke: trailColor
|
|
80
80
|
},
|
|
81
81
|
d: pathString,
|
|
82
|
-
// stroke={trailColor}
|
|
83
82
|
strokeWidth: strokeWidth,
|
|
84
83
|
fillOpacity: "0",
|
|
85
84
|
strokeLinecap: "round"
|
|
86
|
-
}),
|
|
85
|
+
}), React.createElement("path", {
|
|
87
86
|
className: "".concat(prefixCls, "-circle-path"),
|
|
88
87
|
d: pathString,
|
|
89
|
-
// stroke={pathColor}
|
|
90
88
|
strokeWidth: strokeWidth,
|
|
91
89
|
style: pathStyle,
|
|
92
90
|
fillOpacity: "0",
|
package/es/progress/line.js
CHANGED
|
@@ -18,12 +18,12 @@ var Line = function Line(props) {
|
|
|
18
18
|
width: "".concat(validProgress(percent), "%"),
|
|
19
19
|
height: strokeWidth && "".concat(strokeWidth, "px")
|
|
20
20
|
}, backgroundProps);
|
|
21
|
-
return
|
|
21
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
22
22
|
className: "".concat(prefixCls, "-outer")
|
|
23
|
-
},
|
|
23
|
+
}, React.createElement("div", {
|
|
24
24
|
className: "".concat(prefixCls, "-inner"),
|
|
25
25
|
style: trailStyle
|
|
26
|
-
},
|
|
26
|
+
}, React.createElement("div", {
|
|
27
27
|
className: "".concat(prefixCls, "-bg"),
|
|
28
28
|
style: percentStyle
|
|
29
29
|
}))), children);
|
package/es/progress/progress.js
CHANGED
|
@@ -62,29 +62,29 @@ var Progress = function Progress(props) {
|
|
|
62
62
|
if (!showInfo && type !== 'circle' || infoPosition !== 'right' && isLoading) return null;
|
|
63
63
|
var text;
|
|
64
64
|
var textFormatter = format || function (percentNumber) {
|
|
65
|
-
return
|
|
65
|
+
return React.createElement(React.Fragment, null, React.createElement("span", {
|
|
66
66
|
className: "".concat(prefixCls, "-text-percent")
|
|
67
|
-
}, percentNumber),
|
|
67
|
+
}, percentNumber), React.createElement("span", {
|
|
68
68
|
className: "".concat(prefixCls, "-text-unit")
|
|
69
69
|
}, "%"));
|
|
70
70
|
};
|
|
71
71
|
var successNodeMap = {
|
|
72
|
-
line:
|
|
72
|
+
line: React.createElement(Icon, {
|
|
73
73
|
className: "".concat(prefixCls, "-icon"),
|
|
74
74
|
type: "right-solid"
|
|
75
75
|
}),
|
|
76
|
-
circle:
|
|
76
|
+
circle: React.createElement(Icon, {
|
|
77
77
|
className: "".concat(prefixCls, "-icon"),
|
|
78
78
|
type: "right-bold"
|
|
79
79
|
}),
|
|
80
80
|
custom: successIcon
|
|
81
81
|
};
|
|
82
82
|
var failureNodeMap = {
|
|
83
|
-
line:
|
|
83
|
+
line: React.createElement(Icon, {
|
|
84
84
|
className: "".concat(prefixCls, "-icon"),
|
|
85
85
|
type: "refresh-solid"
|
|
86
86
|
}),
|
|
87
|
-
circle:
|
|
87
|
+
circle: React.createElement(Icon, {
|
|
88
88
|
className: "".concat(prefixCls, "-icon"),
|
|
89
89
|
type: "close-bold"
|
|
90
90
|
}),
|
|
@@ -97,7 +97,7 @@ var Progress = function Progress(props) {
|
|
|
97
97
|
} else if (progressStatus === 'success') {
|
|
98
98
|
text = successNodeMap.custom || successNodeMap[type];
|
|
99
99
|
}
|
|
100
|
-
return
|
|
100
|
+
return React.createElement("span", {
|
|
101
101
|
className: "".concat(prefixCls, "-text")
|
|
102
102
|
}, text);
|
|
103
103
|
};
|
|
@@ -125,22 +125,22 @@ var Progress = function Progress(props) {
|
|
|
125
125
|
} else if (progressStatus === 'success') {
|
|
126
126
|
text = concatMap[2];
|
|
127
127
|
}
|
|
128
|
-
return
|
|
128
|
+
return React.createElement("div", {
|
|
129
129
|
className: "".concat(prefixCls, "-special-text")
|
|
130
130
|
}, text);
|
|
131
131
|
};
|
|
132
|
-
var progress =
|
|
132
|
+
var progress = React.createElement(Line, _extends({}, progressProps, {
|
|
133
133
|
prefixCls: progressPrefixCls
|
|
134
134
|
}), renderProgressInfo(progressPrefixCls, progressStatus, progressProps));
|
|
135
135
|
if (type === 'circle') {
|
|
136
|
-
progress =
|
|
136
|
+
progress = React.createElement(Circle, _extends({}, progressProps, {
|
|
137
137
|
prefixCls: progressPrefixCls
|
|
138
138
|
}), renderProgressInfo(progressPrefixCls, progressStatus, progressProps));
|
|
139
139
|
}
|
|
140
140
|
useEffect(function () {
|
|
141
141
|
onProcess && onProcess(percent);
|
|
142
142
|
}, [percent, onProcess]);
|
|
143
|
-
return
|
|
143
|
+
return React.createElement("div", _extends({}, omit(progressProps, ['status', 'format', 'width', 'strokeWidth', 'trailWidth', 'trailColor', 'strokeColor', 'percent', 'infoPosition', 'showInfo', 'textMap', 'onProcess']), {
|
|
144
144
|
className: progressClasses
|
|
145
145
|
}), progress, renderSpecialInfo(progressPrefixCls, progressStatus, progressProps));
|
|
146
146
|
};
|
package/es/qr-code/qr-code.js
CHANGED
|
@@ -60,25 +60,25 @@ var QRCode = function QRCode(props) {
|
|
|
60
60
|
fgColor: color,
|
|
61
61
|
imageSettings: icon ? imageSettings : undefined
|
|
62
62
|
};
|
|
63
|
-
return
|
|
63
|
+
return React.createElement("div", {
|
|
64
64
|
className: qrCodeClass,
|
|
65
65
|
style: _extends(_extends({}, style), {
|
|
66
66
|
width: "".concat(containerSize, "px"),
|
|
67
67
|
height: "".concat(containerSize, "px"),
|
|
68
68
|
backgroundColor: bgColor
|
|
69
69
|
})
|
|
70
|
-
}, status !== 'active' &&
|
|
70
|
+
}, status !== 'active' && React.createElement("div", {
|
|
71
71
|
className: "".concat(qrCodePrefixCls, "-mask")
|
|
72
|
-
}, status === 'loading' &&
|
|
72
|
+
}, status === 'loading' && React.createElement(Spin, null), status === 'expired' && React.createElement(React.Fragment, null, React.createElement("p", {
|
|
73
73
|
className: "".concat(qrCodePrefixCls, "-expired")
|
|
74
|
-
}, qrCodeLangMsg.qrCodeExpired), onRefresh &&
|
|
75
|
-
icon:
|
|
74
|
+
}, qrCodeLangMsg.qrCodeExpired), onRefresh && React.createElement(Button, {
|
|
75
|
+
icon: React.createElement(Icon, {
|
|
76
76
|
type: "refresh"
|
|
77
77
|
}),
|
|
78
78
|
type: "text",
|
|
79
79
|
onClick: onRefresh,
|
|
80
80
|
size: "middle"
|
|
81
|
-
}, qrCodeLangMsg.clickRefresh))), type === 'canvas' ?
|
|
81
|
+
}, qrCodeLangMsg.clickRefresh))), type === 'canvas' ? React.createElement(QRCodeCanvas, _extends({}, codeProps)) : React.createElement(QRCodeSVG, _extends({}, codeProps)));
|
|
82
82
|
};
|
|
83
83
|
QRCode.displayName = 'QRCode';
|
|
84
84
|
export default QRCode;
|
package/es/radio/context.js
CHANGED
package/es/radio/group.js
CHANGED
|
@@ -7,7 +7,7 @@ import ConfigContext from '../config-provider/ConfigContext';
|
|
|
7
7
|
import { getCompProps } from '../_utils';
|
|
8
8
|
import Radio from './radio';
|
|
9
9
|
import { RadioGroupContextProvider } from './context';
|
|
10
|
-
var RadioGroup =
|
|
10
|
+
var RadioGroup = React.forwardRef(function (props, ref) {
|
|
11
11
|
var _React$useContext = React.useContext(ConfigContext),
|
|
12
12
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
13
13
|
prefixCls = _React$useContext.prefixCls,
|
|
@@ -17,7 +17,6 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
17
17
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
18
18
|
value = _React$useState2[0],
|
|
19
19
|
setValue = _React$useState2[1];
|
|
20
|
-
// 从props更新value值
|
|
21
20
|
React.useEffect(function () {
|
|
22
21
|
if (typeof props.value !== 'undefined') {
|
|
23
22
|
setValue(props.value);
|
|
@@ -42,18 +41,16 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
42
41
|
children = _getCompProps.children,
|
|
43
42
|
className = _getCompProps.className,
|
|
44
43
|
optionType = _getCompProps.optionType,
|
|
45
|
-
customPrefixcls = _getCompProps.prefixCls;
|
|
46
|
-
var groupPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, "radio-group", customPrefixcls);
|
|
47
|
-
var radioPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, "radio", customPrefixcls);
|
|
44
|
+
customPrefixcls = _getCompProps.prefixCls;
|
|
45
|
+
var groupPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, "radio-group", customPrefixcls);
|
|
46
|
+
var radioPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, "radio", customPrefixcls);
|
|
48
47
|
var childrenToRender = children;
|
|
49
|
-
// 如果存在 options, 优先使用
|
|
50
48
|
if (options && options.length > 0) {
|
|
51
49
|
var _context;
|
|
52
50
|
var optionsPrefixCls = optionType === undefined ? radioPrefixCls : _concatInstanceProperty(_context = "".concat(radioPrefixCls, "-")).call(_context, optionType);
|
|
53
51
|
childrenToRender = _mapInstanceProperty(options).call(options, function (option) {
|
|
54
52
|
if (typeof option === 'string') {
|
|
55
|
-
|
|
56
|
-
return /*#__PURE__*/React.createElement(Radio, {
|
|
53
|
+
return React.createElement(Radio, {
|
|
57
54
|
key: option,
|
|
58
55
|
prefixCls: optionsPrefixCls,
|
|
59
56
|
disabled: disabled,
|
|
@@ -61,8 +58,7 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
61
58
|
checked: value === option
|
|
62
59
|
}, option);
|
|
63
60
|
}
|
|
64
|
-
|
|
65
|
-
return /*#__PURE__*/React.createElement(Radio, {
|
|
61
|
+
return React.createElement(Radio, {
|
|
66
62
|
key: "radio-group-value-options-".concat(option.value),
|
|
67
63
|
prefixCls: optionsPrefixCls,
|
|
68
64
|
disabled: option.disabled || disabled,
|
|
@@ -72,14 +68,14 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
72
68
|
}, option.label);
|
|
73
69
|
});
|
|
74
70
|
}
|
|
75
|
-
return
|
|
71
|
+
return React.createElement("div", {
|
|
76
72
|
className: classNames(groupPrefixCls, className),
|
|
77
73
|
style: style,
|
|
78
74
|
id: id,
|
|
79
75
|
ref: ref
|
|
80
76
|
}, childrenToRender);
|
|
81
77
|
};
|
|
82
|
-
return
|
|
78
|
+
return React.createElement(RadioGroupContextProvider, {
|
|
83
79
|
value: {
|
|
84
80
|
value: value,
|
|
85
81
|
name: props.name,
|
|
@@ -88,4 +84,4 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
88
84
|
}
|
|
89
85
|
}, renderGroup());
|
|
90
86
|
});
|
|
91
|
-
export default
|
|
87
|
+
export default React.memo(RadioGroup);
|
package/es/radio/radio-button.js
CHANGED
|
@@ -32,7 +32,7 @@ var RadioButton = function RadioButton(props, ref) {
|
|
|
32
32
|
radioProps.checked = props.value === radioGroupContext.value;
|
|
33
33
|
radioProps.disabled = props.disabled || radioGroupContext.disabled;
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return React.createElement(Radio, _extends({
|
|
36
36
|
title: title,
|
|
37
37
|
prefixCls: radioButtonPrefixCls
|
|
38
38
|
}, radioProps, {
|
|
@@ -40,4 +40,4 @@ var RadioButton = function RadioButton(props, ref) {
|
|
|
40
40
|
ref: ref
|
|
41
41
|
}), children);
|
|
42
42
|
};
|
|
43
|
-
export default
|
|
43
|
+
export default React.forwardRef(RadioButton);
|
package/es/radio/radio.js
CHANGED
|
@@ -38,7 +38,7 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
38
38
|
disabled = _a.disabled,
|
|
39
39
|
defaultChecked = _a.defaultChecked,
|
|
40
40
|
customPrefixcls = _a.prefixCls,
|
|
41
|
-
restProps = __rest(_a, ["style", "checked", "children", "className", "radioType", "value", "disabled", "defaultChecked", "prefixCls"]);
|
|
41
|
+
restProps = __rest(_a, ["style", "checked", "children", "className", "radioType", "value", "disabled", "defaultChecked", "prefixCls"]);
|
|
42
42
|
devWarning(!(isNumber(value) || isString(value)) && value !== '', 'radio', 'radio `value` type must string or number ');
|
|
43
43
|
devWarning(value === '', 'radio', 'radio value type is not empty string ');
|
|
44
44
|
var mergedDisabled = (context === null || context === void 0 ? void 0 : context.disabled) || restProps.disabled;
|
|
@@ -46,7 +46,7 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
46
46
|
var getPrefix = function getPrefix(radioType) {
|
|
47
47
|
return "radio".concat(radioType === 'square' ? "-".concat(radioType) : '');
|
|
48
48
|
};
|
|
49
|
-
var radioPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, getPrefix(radioType), customPrefixcls);
|
|
49
|
+
var radioPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, getPrefix(radioType), customPrefixcls);
|
|
50
50
|
var _React$useState = React.useState(initValue),
|
|
51
51
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
52
52
|
isChecked = _React$useState2[0],
|
|
@@ -67,7 +67,7 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
67
67
|
context.onChange(e, value);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
|
-
var classString = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(radioPrefixCls), true), _defineProperty(_classNames, "".concat(radioPrefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(radioPrefixCls, "-checked"), isChecked), _classNames), className);
|
|
70
|
+
var classString = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(radioPrefixCls), true), _defineProperty(_classNames, "".concat(radioPrefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(radioPrefixCls, "-checked"), isChecked), _classNames), className);
|
|
71
71
|
useEffect(function () {
|
|
72
72
|
var _a;
|
|
73
73
|
var handleRepeatClick = function handleRepeatClick(e) {
|
|
@@ -80,30 +80,25 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
80
80
|
(_a = radioRef === null || radioRef === void 0 ? void 0 : radioRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('click', handleRepeatClick);
|
|
81
81
|
return function () {
|
|
82
82
|
var _a;
|
|
83
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
84
83
|
(_a = radioRef === null || radioRef === void 0 ? void 0 : radioRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', handleRepeatClick);
|
|
85
84
|
};
|
|
86
85
|
}, []);
|
|
87
|
-
return (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
})), children !== undefined ? /*#__PURE__*/React.createElement("span", {
|
|
103
|
-
className: "".concat(radioPrefixCls, "-text")
|
|
104
|
-
}, children) : null)
|
|
105
|
-
);
|
|
86
|
+
return React.createElement("label", {
|
|
87
|
+
className: classString,
|
|
88
|
+
style: style,
|
|
89
|
+
ref: mergedRef
|
|
90
|
+
}, React.createElement("input", _extends({}, restProps, {
|
|
91
|
+
type: "radio",
|
|
92
|
+
className: "".concat(radioPrefixCls, "-input"),
|
|
93
|
+
checked: isChecked,
|
|
94
|
+
onChange: onChange,
|
|
95
|
+
value: value,
|
|
96
|
+
name: context === null || context === void 0 ? void 0 : context.name,
|
|
97
|
+
disabled: mergedDisabled
|
|
98
|
+
})), children !== undefined ? React.createElement("span", {
|
|
99
|
+
className: "".concat(radioPrefixCls, "-text")
|
|
100
|
+
}, children) : null);
|
|
106
101
|
};
|
|
107
|
-
var Radio =
|
|
102
|
+
var Radio = React.forwardRef(InternalRadio);
|
|
108
103
|
Radio.displayName = 'Radio';
|
|
109
104
|
export default Radio;
|
package/es/rate/rate.js
CHANGED
|
@@ -34,24 +34,20 @@ var Rate = function Rate(props) {
|
|
|
34
34
|
onHoverChange = _getCompProps.onHoverChange,
|
|
35
35
|
onFocus = _getCompProps.onFocus;
|
|
36
36
|
devWarning(SizeTypes.indexOf(size) === -1, 'Rate', "cannot found SizeType '".concat(size, "'"));
|
|
37
|
-
// className前缀
|
|
38
37
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'rate', customPrefixcls);
|
|
39
38
|
var _React$useState = React.useState(defaultValue),
|
|
40
39
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
41
40
|
selectedValue = _React$useState2[0],
|
|
42
|
-
setSelectedValue = _React$useState2[1];
|
|
41
|
+
setSelectedValue = _React$useState2[1];
|
|
43
42
|
var _React$useState3 = React.useState(0),
|
|
44
43
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
45
44
|
activeNumber = _React$useState4[0],
|
|
46
|
-
setActiveNumber = _React$useState4[1];
|
|
45
|
+
setActiveNumber = _React$useState4[1];
|
|
47
46
|
React.useEffect(function () {
|
|
48
47
|
if (value !== undefined && value !== selectedValue) {
|
|
49
48
|
setSelectedValue(value);
|
|
50
49
|
}
|
|
51
50
|
}, [value, selectedValue]);
|
|
52
|
-
// const shouldSetValue = (value: number) => {
|
|
53
|
-
// return value && value !== 0 && value !== selectedValue
|
|
54
|
-
// }
|
|
55
51
|
var handleClick = React.useCallback(function (value) {
|
|
56
52
|
setSelectedValue(value);
|
|
57
53
|
onChange && onChange(value);
|
|
@@ -69,31 +65,19 @@ var Rate = function Rate(props) {
|
|
|
69
65
|
var handleBlur = React.useCallback(function () {
|
|
70
66
|
onBlur && onBlur();
|
|
71
67
|
}, [onBlur]);
|
|
72
|
-
/**
|
|
73
|
-
*获取图标
|
|
74
|
-
* @param icon
|
|
75
|
-
* @param index
|
|
76
|
-
*/
|
|
77
68
|
var getIcon = function getIcon(icon, activeIcon, index, isActive) {
|
|
78
69
|
if (activeIcon && isActive) {
|
|
79
70
|
icon = activeIcon;
|
|
80
71
|
}
|
|
81
72
|
if (typeof icon === 'function') {
|
|
82
|
-
return
|
|
73
|
+
return React.createElement("span", {
|
|
83
74
|
className: "".concat(prefixCls, "-icon-wrapper")
|
|
84
75
|
}, icon(index));
|
|
85
76
|
}
|
|
86
|
-
return
|
|
77
|
+
return React.createElement("span", {
|
|
87
78
|
className: "".concat(prefixCls, "-icon-second-content")
|
|
88
79
|
}, icon);
|
|
89
80
|
};
|
|
90
|
-
/**
|
|
91
|
-
* 获取第一个图标状态
|
|
92
|
-
* @param value
|
|
93
|
-
* @param index
|
|
94
|
-
* @param onlyActiveCurrent
|
|
95
|
-
* @param isSecondIconActive
|
|
96
|
-
*/
|
|
97
81
|
var getFirstIconStatus = function getFirstIconStatus(value, index, onlyActiveCurrent, secondIconStatus) {
|
|
98
82
|
var half = 0.5;
|
|
99
83
|
var isInteger = _Number$isInteger(value);
|
|
@@ -103,18 +87,14 @@ var Rate = function Rate(props) {
|
|
|
103
87
|
var isActiveFirst = value === index - half;
|
|
104
88
|
var mark;
|
|
105
89
|
if (secondIconStatus) {
|
|
106
|
-
// 第二个图标被激活则第一个也必须激活
|
|
107
90
|
mark = true;
|
|
108
91
|
} else if (!onlyActiveCurrent) {
|
|
109
|
-
// 激活点击位置所有左侧图标
|
|
110
92
|
mark = isActiveAllLeft;
|
|
111
93
|
} else if (isInteger) {
|
|
112
|
-
// 点击全图标只激活当前点击图标
|
|
113
94
|
mark = isActiveCurrent;
|
|
114
95
|
} else {
|
|
115
|
-
mark = isActiveFirst;
|
|
96
|
+
mark = isActiveFirst;
|
|
116
97
|
}
|
|
117
|
-
|
|
118
98
|
return mark;
|
|
119
99
|
};
|
|
120
100
|
var transferValue = function transferValue(value, index) {
|
|
@@ -125,34 +105,18 @@ var Rate = function Rate(props) {
|
|
|
125
105
|
return Math.round(value);
|
|
126
106
|
}
|
|
127
107
|
};
|
|
128
|
-
/**
|
|
129
|
-
* 获取第二个图标状态
|
|
130
|
-
* @param value
|
|
131
|
-
* @param index
|
|
132
|
-
* @param onlyActiveCurrent
|
|
133
|
-
*/
|
|
134
108
|
var getSecondIconStatus = function getSecondIconStatus(value, index, onlyActiveCurrent) {
|
|
135
109
|
if (!onlyActiveCurrent) {
|
|
136
|
-
// 激活所有左侧图标
|
|
137
110
|
return value >= index;
|
|
138
111
|
} else {
|
|
139
|
-
return value === index;
|
|
112
|
+
return value === index;
|
|
140
113
|
}
|
|
141
114
|
};
|
|
142
|
-
/**
|
|
143
|
-
* 返回图标的样式
|
|
144
|
-
* @param isActive
|
|
145
|
-
*/
|
|
146
115
|
var getIconStyle = function getIconStyle(isActive) {
|
|
147
116
|
if (isActive) return {
|
|
148
117
|
color: color
|
|
149
118
|
};
|
|
150
119
|
};
|
|
151
|
-
/**
|
|
152
|
-
*
|
|
153
|
-
* @param selectActive 当前图标是否被选中
|
|
154
|
-
* @param mouseActive 当前图标是否触发鼠标hover效果
|
|
155
|
-
*/
|
|
156
120
|
var isSelected = function isSelected(selectActive, mouseActive) {
|
|
157
121
|
return activeNumber !== 0 ? mouseActive : selectActive;
|
|
158
122
|
};
|
|
@@ -160,9 +124,6 @@ var Rate = function Rate(props) {
|
|
|
160
124
|
var _context, _classnames;
|
|
161
125
|
return classnames((_classnames = {}, _defineProperty(_classnames, _concatInstanceProperty(_context = "".concat(prefixCls, "-icon-")).call(_context, name), true), _defineProperty(_classnames, "".concat(prefixCls, "-icon-selected"), isActive), _classnames));
|
|
162
126
|
};
|
|
163
|
-
/**
|
|
164
|
-
* 获取图标视图
|
|
165
|
-
*/
|
|
166
127
|
var getRateIconView = function getRateIconView() {
|
|
167
128
|
var half = 0.5;
|
|
168
129
|
var rateIconsView = [];
|
|
@@ -177,12 +138,12 @@ var Rate = function Rate(props) {
|
|
|
177
138
|
var firstIconStyle = getIconStyle(isFirstActive);
|
|
178
139
|
var firstIconClassName = getIconClassName('first', isFirstActive);
|
|
179
140
|
var secondIconClassName = getIconClassName('second', isSecondActive);
|
|
180
|
-
rateIconsView.push(
|
|
141
|
+
rateIconsView.push(React.createElement("span", {
|
|
181
142
|
className: "".concat(prefixCls, "-item"),
|
|
182
143
|
key: i
|
|
183
|
-
},
|
|
144
|
+
}, React.createElement("div", {
|
|
184
145
|
className: "".concat(prefixCls, "-icon-view")
|
|
185
|
-
}, allowHalf &&
|
|
146
|
+
}, allowHalf && React.createElement("span", {
|
|
186
147
|
style: firstIconStyle,
|
|
187
148
|
className: firstIconClassName,
|
|
188
149
|
onClick: function onClick() {
|
|
@@ -194,7 +155,7 @@ var Rate = function Rate(props) {
|
|
|
194
155
|
onMouseLeave: function onMouseLeave() {
|
|
195
156
|
return handleMouseLeave();
|
|
196
157
|
}
|
|
197
|
-
}, getIcon(icon, activeIcon, i, isFirstActive)),
|
|
158
|
+
}, getIcon(icon, activeIcon, i, isFirstActive)), React.createElement("span", {
|
|
198
159
|
style: IconStyle,
|
|
199
160
|
className: secondIconClassName,
|
|
200
161
|
onClick: function onClick() {
|
|
@@ -213,19 +174,8 @@ var Rate = function Rate(props) {
|
|
|
213
174
|
}
|
|
214
175
|
return rateIconsView;
|
|
215
176
|
};
|
|
216
|
-
/**
|
|
217
|
-
* 获取图标下方情感描述文字
|
|
218
|
-
* @param index 图标对应索引
|
|
219
|
-
*/
|
|
220
|
-
// const getEmotionalTextView = (index:number):React.ReactNode => {
|
|
221
|
-
// return (
|
|
222
|
-
// <span className={`${prefixCls}-item-text`}>
|
|
223
|
-
// {emotionalText[index] ? emotionalText[index] : null}
|
|
224
|
-
// </span>
|
|
225
|
-
// )
|
|
226
|
-
// }
|
|
227
177
|
var getRateClassName = classnames(prefixCls, className, (_classnames2 = {}, _defineProperty(_classnames2, _concatInstanceProperty(_context2 = "".concat(prefixCls, "-size-")).call(_context2, size), size), _defineProperty(_classnames2, "".concat(prefixCls, "-disabled"), disabled), _classnames2));
|
|
228
|
-
var rate =
|
|
178
|
+
var rate = React.createElement("span", {
|
|
229
179
|
className: getRateClassName,
|
|
230
180
|
style: style,
|
|
231
181
|
onMouseLeave: function onMouseLeave() {
|
package/es/search/option.js
CHANGED
|
@@ -23,7 +23,6 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
23
23
|
var optionTagCls = classNames(_defineProperty({}, "".concat(optionPrefixCls, "-option-tag"), true));
|
|
24
24
|
var optionContentCls = classNames(_defineProperty({}, "".concat(optionPrefixCls, "-option-content"), true));
|
|
25
25
|
var handleClick = function handleClick() {
|
|
26
|
-
// setSelected(!isSelected)
|
|
27
26
|
onChangeSelect && (onChangeSelect === null || onChangeSelect === void 0 ? void 0 : onChangeSelect({
|
|
28
27
|
tag: tag,
|
|
29
28
|
label: searchValue,
|
|
@@ -31,17 +30,17 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
31
30
|
}));
|
|
32
31
|
};
|
|
33
32
|
var formatSearchValue = isFormatVal ? getStringToArray(searchValue || '').join(" ".concat(getLangMsg('Search', 'or'), " ")) : searchValue;
|
|
34
|
-
return
|
|
33
|
+
return React.createElement("div", {
|
|
35
34
|
ref: optionRef,
|
|
36
35
|
className: optionCls,
|
|
37
36
|
onClick: handleClick
|
|
38
|
-
},
|
|
37
|
+
}, React.createElement("span", {
|
|
39
38
|
className: optionTagCls
|
|
40
|
-
}, "".concat(tag, "\uFF1A")),
|
|
39
|
+
}, "".concat(tag, "\uFF1A")), React.createElement("span", {
|
|
41
40
|
className: optionContentCls,
|
|
42
41
|
title: formatSearchValue
|
|
43
42
|
}, formatSearchValue));
|
|
44
43
|
};
|
|
45
|
-
var Option =
|
|
44
|
+
var Option = React.forwardRef(InternalOption);
|
|
46
45
|
Option.displayName = 'Option';
|
|
47
46
|
export default Option;
|