@kdcloudjs/kdesign 1.7.15 → 1.7.17

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/kdesign-complete.less +27 -3
  3. package/dist/kdesign.css +21 -3
  4. package/dist/kdesign.css.map +1 -1
  5. package/dist/kdesign.js +137 -95
  6. package/dist/kdesign.js.map +1 -1
  7. package/dist/kdesign.min.css +3 -3
  8. package/dist/kdesign.min.js +3 -3
  9. package/dist/kdesign.min.js.map +1 -1
  10. package/es/button/group.d.ts +1 -0
  11. package/es/button/group.js +6 -3
  12. package/es/card/card.d.ts +1 -0
  13. package/es/card/card.js +30 -19
  14. package/es/carousel/carousel.js +3 -2
  15. package/es/carousel/slideList.d.ts +1 -0
  16. package/es/carousel/slideList.js +5 -2
  17. package/es/color-picker/color-picker-panel.js +4 -4
  18. package/es/color-picker/color-picker.js +4 -2
  19. package/es/color-picker/interface.d.ts +1 -0
  20. package/es/color-picker/style/index.css +4 -1
  21. package/es/color-picker/style/index.less +5 -1
  22. package/es/config-provider/compDefaultProps.d.ts +1 -0
  23. package/es/config-provider/compDefaultProps.js +1 -0
  24. package/es/dropdown/dropdown.js +7 -4
  25. package/es/dropdown/style/index.css +3 -0
  26. package/es/dropdown/style/index.less +4 -0
  27. package/es/filter/scheme.js +2 -1
  28. package/es/filter/style/index.css +2 -1
  29. package/es/filter/style/index.less +3 -2
  30. package/es/form/Field.js +1 -1
  31. package/es/input-number/inputNumber.js +1 -1
  32. package/es/locale/locale.d.ts +3 -4
  33. package/es/locale/zh-CN.js +8 -8
  34. package/es/notification/index.js +2 -1
  35. package/es/notification-base/index.js +11 -8
  36. package/es/select/select.js +8 -8
  37. package/es/select/style/index.css +7 -0
  38. package/es/select/style/index.less +11 -0
  39. package/es/tree-select/interface.d.ts +1 -0
  40. package/es/tree-select/tree-select.js +4 -3
  41. package/es/upload/interface.d.ts +1 -0
  42. package/es/upload/style/index.css +4 -0
  43. package/es/upload/style/index.less +4 -0
  44. package/es/upload/upload.js +16 -6
  45. package/lib/button/group.d.ts +1 -0
  46. package/lib/button/group.js +6 -3
  47. package/lib/card/card.d.ts +1 -0
  48. package/lib/card/card.js +30 -19
  49. package/lib/carousel/carousel.js +3 -2
  50. package/lib/carousel/slideList.d.ts +1 -0
  51. package/lib/carousel/slideList.js +5 -2
  52. package/lib/color-picker/color-picker-panel.js +4 -4
  53. package/lib/color-picker/color-picker.js +4 -2
  54. package/lib/color-picker/interface.d.ts +1 -0
  55. package/lib/color-picker/style/index.css +4 -1
  56. package/lib/color-picker/style/index.less +5 -1
  57. package/lib/config-provider/compDefaultProps.d.ts +1 -0
  58. package/lib/config-provider/compDefaultProps.js +1 -0
  59. package/lib/dropdown/dropdown.js +7 -4
  60. package/lib/dropdown/style/index.css +3 -0
  61. package/lib/dropdown/style/index.less +4 -0
  62. package/lib/filter/scheme.js +2 -1
  63. package/lib/filter/style/index.css +2 -1
  64. package/lib/filter/style/index.less +3 -2
  65. package/lib/form/Field.js +1 -1
  66. package/lib/input-number/inputNumber.js +1 -1
  67. package/lib/locale/locale.d.ts +3 -4
  68. package/lib/locale/zh-CN.js +8 -8
  69. package/lib/notification/index.js +2 -1
  70. package/lib/notification-base/index.js +11 -8
  71. package/lib/select/select.js +8 -8
  72. package/lib/select/style/index.css +7 -0
  73. package/lib/select/style/index.less +11 -0
  74. package/lib/tree-select/interface.d.ts +1 -0
  75. package/lib/tree-select/tree-select.js +4 -3
  76. package/lib/upload/interface.d.ts +1 -0
  77. package/lib/upload/style/index.css +4 -0
  78. package/lib/upload/style/index.less +4 -0
  79. package/lib/upload/upload.js +16 -6
  80. package/package.json +1 -1
@@ -19,6 +19,7 @@ export interface ButtonGroupProps extends PopperProps {
19
19
  type?: ButtonGroupType;
20
20
  onClick?: () => void;
21
21
  onItemClick?: (data: OverlayType) => void;
22
+ loading?: boolean;
22
23
  }
23
24
  declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
24
25
  export default ButtonGroup;
@@ -31,7 +31,8 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
31
31
  size = buttonGoupProps.size,
32
32
  buttonType = buttonGoupProps.buttonType,
33
33
  disabled = buttonGoupProps.disabled,
34
- onVisibleChange = buttonGoupProps.onVisibleChange;
34
+ onVisibleChange = buttonGoupProps.onVisibleChange,
35
+ loading = buttonGoupProps.loading;
35
36
  var _useState = useState(false),
36
37
  _useState2 = _slicedToArray(_useState, 2),
37
38
  optionShow = _useState2[0],
@@ -59,14 +60,16 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
59
60
  }, isBsicType && /*#__PURE__*/React.createElement(Button, {
60
61
  type: buttonType,
61
62
  size: size,
62
- disabled: disabled
63
+ disabled: disabled,
64
+ loading: loading
63
65
  }, children, /*#__PURE__*/React.createElement("span", {
64
66
  className: "".concat(btnGroupPrefixCls, "-basic-icon")
65
67
  }, optionShow ? iconUp : iconDown)), !isBsicType && /*#__PURE__*/React.createElement(Button, {
66
68
  type: buttonType,
67
69
  size: size,
68
70
  disabled: disabled,
69
- onClick: onClick
71
+ onClick: onClick,
72
+ loading: loading
70
73
  }, children), !isBsicType && /*#__PURE__*/React.createElement("span", {
71
74
  className: "".concat(btnGroupPrefixCls, "-trigger"),
72
75
  ref: triggerRef
package/es/card/card.d.ts CHANGED
@@ -20,6 +20,7 @@ export interface CardProps {
20
20
  bodyStyle?: React.CSSProperties;
21
21
  actions?: Array<React.ReactNode>;
22
22
  extra?: Array<React.ReactNode>;
23
+ ref?: React.ForwardedRef<HTMLDivElement>;
23
24
  }
24
25
  declare const Card: React.FC<CardProps>;
25
26
  export default Card;
package/es/card/card.js CHANGED
@@ -1,39 +1,50 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
+ import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
3
+ var __rest = this && this.__rest || function (s, e) {
4
+ var t = {};
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
6
+ if (s != null && typeof _Object$getOwnPropertySymbols === "function") for (var i = 0, p = _Object$getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
8
+ }
9
+ return t;
10
+ };
2
11
  import * as React from 'react';
3
12
  import classNames from 'classnames';
4
13
  import Checkbox from '../checkbox';
5
14
  import { getCompProps } from '../_utils';
6
15
  import { ConfigContext } from '../config-provider';
7
- var Card = function Card(props) {
16
+ var Card = /*#__PURE__*/React.forwardRef(function (props, ref) {
8
17
  var _React$useContext = React.useContext(ConfigContext),
9
18
  getPrefixCls = _React$useContext.getPrefixCls,
10
19
  pkgPrefixCls = _React$useContext.prefixCls,
11
20
  userDefaultProps = _React$useContext.compDefaultProps;
12
21
  // 属性需要合并一遍用户定义的默认属性
13
- var _getCompProps = getCompProps('Card', userDefaultProps, props),
14
- tags = _getCompProps.tags,
15
- style = _getCompProps.style,
16
- title = _getCompProps.title,
17
- avatar = _getCompProps.avatar,
18
- actions = _getCompProps.actions,
19
- extra = _getCompProps.extra,
20
- children = _getCompProps.children,
21
- className = _getCompProps.className,
22
- hoverable = _getCompProps.hoverable,
23
- headStyle = _getCompProps.headStyle,
24
- bodyStyle = _getCompProps.bodyStyle,
25
- selectable = _getCompProps.selectable,
26
- checkboxProps = _getCompProps.checkboxProps,
27
- customPrefixcls = _getCompProps.prefixCls;
22
+ var _a = getCompProps('Card', userDefaultProps, props),
23
+ tags = _a.tags,
24
+ style = _a.style,
25
+ title = _a.title,
26
+ avatar = _a.avatar,
27
+ actions = _a.actions,
28
+ extra = _a.extra,
29
+ children = _a.children,
30
+ className = _a.className,
31
+ hoverable = _a.hoverable,
32
+ headStyle = _a.headStyle,
33
+ bodyStyle = _a.bodyStyle,
34
+ selectable = _a.selectable,
35
+ checkboxProps = _a.checkboxProps,
36
+ customPrefixcls = _a.prefixCls,
37
+ others = __rest(_a, ["tags", "style", "title", "avatar", "actions", "extra", "children", "className", "hoverable", "headStyle", "bodyStyle", "selectable", "checkboxProps", "prefixCls"]);
28
38
  // className前缀
29
39
  var prefixCls = getPrefixCls(pkgPrefixCls, 'card', customPrefixcls);
30
40
  var cardClassName = classNames(prefixCls, {
31
41
  hoverable: hoverable
32
42
  }, className);
33
- return /*#__PURE__*/React.createElement("div", {
43
+ return /*#__PURE__*/React.createElement("div", _extends({
44
+ ref: ref,
34
45
  className: cardClassName,
35
46
  style: style
36
- }, title && !avatar && /*#__PURE__*/React.createElement("header", {
47
+ }, others), title && !avatar && /*#__PURE__*/React.createElement("header", {
37
48
  className: "".concat(prefixCls, "-header"),
38
49
  style: headStyle
39
50
  }, title), avatar && /*#__PURE__*/React.createElement("header", {
@@ -58,6 +69,6 @@ var Card = function Card(props) {
58
69
  }, actions), extra && /*#__PURE__*/React.createElement("div", {
59
70
  className: "".concat(prefixCls, "-extra")
60
71
  }, extra));
61
- };
72
+ });
62
73
  Card.displayName = 'Card';
63
74
  export default Card;
@@ -74,8 +74,8 @@ var InternalCarousel = function InternalCarousel(props, ref) {
74
74
  var setScrollXEffectStyle = React.useCallback(function () {
75
75
  var _context;
76
76
  if (!listRef.current) return;
77
- listRef.current.style.cssText = needAnimation ? _concatInstanceProperty(_context = "transform: translateX(".concat(posX, "px); transition:all 0.3s ")).call(_context, easing) : "transform: translateX(".concat(posX, "px); transition:'none'");
78
- }, [needAnimation, easing, posX]);
77
+ listRef.current.style.cssText = needAnimation ? _concatInstanceProperty(_context = "transform: translateX(".concat(posX, "px); transition:all 0.3s ")).call(_context, easing) : "transform: translateX(".concat(posX, "px); transition:none");
78
+ }, [children === null || children === void 0 ? void 0 : children.length, needAnimation, easing, posX]);
79
79
  var jumpTo = React.useCallback(function (index, needAnimation) {
80
80
  if (isFadeEffect) {
81
81
  if (index === -1 || index === children.length) index = 0;
@@ -213,6 +213,7 @@ var InternalCarousel = function InternalCarousel(props, ref) {
213
213
  content = /*#__PURE__*/React.createElement(SlideList, {
214
214
  items: children,
215
215
  parentPrefixCls: carouselPrefixCls,
216
+ currentIndex: currentIndex,
216
217
  ref: listRef
217
218
  });
218
219
  }
@@ -6,6 +6,7 @@ declare type ItemType = {
6
6
  export interface SlideListProps {
7
7
  parentPrefixCls: string;
8
8
  items: ItemType[];
9
+ currentIndex: number;
9
10
  }
10
11
  export declare const SlideList: React.ForwardRefExoticComponent<SlideListProps & React.RefAttributes<unknown>>;
11
12
  export {};
@@ -1,11 +1,14 @@
1
+ import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
1
2
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
2
3
  import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
3
4
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
5
+ import classNames from 'classnames';
4
6
  import React from 'react';
5
7
  export var SlideList = /*#__PURE__*/React.forwardRef(function (props, ref) {
6
8
  var _context2;
7
9
  var items = props.items,
8
- parentPrefixCls = props.parentPrefixCls;
10
+ parentPrefixCls = props.parentPrefixCls,
11
+ currentIndex = props.currentIndex;
9
12
  var slideListPrefixCls = "".concat(parentPrefixCls, "-list-slide");
10
13
  var listPrefixCls = "".concat(parentPrefixCls, "-list");
11
14
  var renderItems = function renderItems() {
@@ -13,7 +16,7 @@ export var SlideList = /*#__PURE__*/React.forwardRef(function (props, ref) {
13
16
  var _items = _concatInstanceProperty(_context = _sliceInstanceProperty(items).call(items, -1)).call(_context, items, _sliceInstanceProperty(items).call(items, 0, 1)); // 首位分别添加一项
14
17
  return _mapInstanceProperty(_items).call(_items, function (item, index) {
15
18
  return /*#__PURE__*/React.createElement("li", {
16
- className: "".concat(listPrefixCls, "-item"),
19
+ className: classNames("".concat(listPrefixCls, "-item"), _defineProperty({}, "".concat(listPrefixCls, "-item-active"), currentIndex === index - 1)),
17
20
  key: index
18
21
  }, item);
19
22
  });
@@ -42,6 +42,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
42
42
  showColorTransfer = props.showColorTransfer,
43
43
  showPresetColor = props.showPresetColor,
44
44
  showColorPickerBox = props.showColorPickerBox,
45
+ showColorPickerPanel = props.showColorPickerPanel,
45
46
  value = props.value;
46
47
  var panelInputRef = useRef(null);
47
48
  var panelClsRef = useRef(null);
@@ -56,7 +57,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
56
57
  var panelFollowThemeCls = classNames("".concat(colorPickerPrefixCls, "-panel-switch"));
57
58
  var panelInputCls = classNames("".concat(colorPickerPrefixCls, "-panel-input"), _defineProperty({}, "".concat(colorPickerPrefixCls, "-panel-input-no-recommend"), !showPresetColor));
58
59
  var transparentCls = classNames("".concat(colorPickerPrefixCls, "-panel-transparent"));
59
- var colorDivContainerCls = classNames("".concat(colorPickerPrefixCls, "-panel-colorDivContainer"));
60
+ var colorDivContainerCls = classNames("".concat(colorPickerPrefixCls, "-panel-colorDivContainer"), _defineProperty({}, "".concat(colorPickerPrefixCls, "-panel-colorDivContainer-unset-color"), (presetColor === null || presetColor === void 0 ? void 0 : presetColor.length) === 0));
60
61
  var colorLiClick = function colorLiClick(index, colorValue) {
61
62
  var formatArr = colorFormat(colorValue, alpha);
62
63
  var formatValue = toLowerCase(formatArr[valOfCorrespondingType(currentColorType)].value);
@@ -172,7 +173,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
172
173
  useOnClickOutside([panelClsRef, inputRef], function () {
173
174
  setShowPanel(false);
174
175
  });
175
- return /*#__PURE__*/React.createElement("div", {
176
+ return /*#__PURE__*/React.createElement(React.Fragment, null, showColorPickerPanel && /*#__PURE__*/React.createElement("div", {
176
177
  className: panelCls,
177
178
  ref: panelClsRef
178
179
  }, /*#__PURE__*/React.createElement(ChromePicker, {
@@ -193,7 +194,6 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
193
194
  value: correctColorValue,
194
195
  placeholder: "#",
195
196
  onChange: handleTypeChange,
196
- showSearch: true,
197
197
  optionLabelProp: "value",
198
198
  getPopupContainer: function getPopupContainer() {
199
199
  return panelInputRef.current;
@@ -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;
@@ -79,6 +79,7 @@ var ColorPicker = function ColorPicker(props) {
79
79
  var containerCls = classNames("".concat(colorPickerPrefixCls, "-container"));
80
80
  var inputCls = classNames("".concat(colorPickerPrefixCls, "-input"), className);
81
81
  var inputRef = useRef(null);
82
+ var showColorPickerPanel = showColorTransfer || typeof showPresetColor === 'boolean' && showPresetColor && (presetColor === null || presetColor === void 0 ? void 0 : presetColor.length) || typeof showPresetColor === 'undefined' || (functionalColor === null || functionalColor === void 0 ? void 0 : functionalColor.length) && showSwitch || (showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showBox) || (showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showHue) || (showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showOpacity);
82
83
  var setIconColor = function setIconColor(value) {
83
84
  value === functionalColorName ? setIsFollow(true) : setIsFollow(false);
84
85
  var inpValue = value === functionalColorName ? functionalColor : value;
@@ -136,7 +137,7 @@ var ColorPicker = function ColorPicker(props) {
136
137
  style: {
137
138
  backgroundColor: "".concat(colTypeArr[2].value || defaultSystemColor)
138
139
  }
139
- }, /*#__PURE__*/React.createElement(Icon, {
140
+ }, showColorPickerPanel && /*#__PURE__*/React.createElement(Icon, {
140
141
  type: "arrow-down"
141
142
  }));
142
143
  };
@@ -186,7 +187,8 @@ var ColorPicker = function ColorPicker(props) {
186
187
  colTypeArr: colTypeArr,
187
188
  setColTypeArr: setColTypeArr,
188
189
  currentColorType: currentColorType,
189
- setCurrentColorType: setCurrentColorType
190
+ setCurrentColorType: setCurrentColorType,
191
+ showColorPickerPanel: showColorPickerPanel
190
192
  });
191
193
  var popperProps = _extends(_extends({}, colorPickerProps), {
192
194
  popperClassName: popUpLayer,
@@ -58,6 +58,7 @@ export interface IColorPickerPanelProps {
58
58
  showHue?: boolean;
59
59
  showOpacity?: boolean;
60
60
  };
61
+ showColorPickerPanel: boolean;
61
62
  value: string;
62
63
  setCurrentColorType: (currentColorType: IColorTypesObj['type']) => void;
63
64
  setColTypeArr: (colTypeArr: Array<IColorTypesObj>) => void;
@@ -262,7 +262,7 @@
262
262
  font-size: var(--kd-c-color-picker-panel-select-font-size, var(--kd-g-font-size-middle, 14px));
263
263
  }
264
264
  .kd-color-picker-pop .kd-color-picker-panel-input-no-recommend {
265
- margin-bottom: 8px;
265
+ margin-bottom: 0;
266
266
  }
267
267
  .kd-color-picker-pop .kd-color-picker-panel-input .kd-select.bottomLeft,
268
268
  .kd-color-picker-pop .kd-color-picker-panel-input .kd-select.topLeft {
@@ -311,6 +311,9 @@
311
311
  grid-row-gap: 8px;
312
312
  margin-top: 12px;
313
313
  }
314
+ .kd-color-picker-pop .kd-color-picker-panel-colorDivContainer-unset-color {
315
+ margin-top: 0;
316
+ }
314
317
  .kd-color-picker-pop .kd-color-picker-panel-colorDivContainer li {
315
318
  position: relative;
316
319
  -webkit-box-sizing: border-box;
@@ -209,7 +209,7 @@
209
209
  font-size: @color-picker-panel-select-font-size;
210
210
 
211
211
  &-no-recommend {
212
- margin-bottom: 8px;
212
+ margin-bottom: 0;
213
213
  }
214
214
 
215
215
  .@{kd-prefix}-select {
@@ -266,6 +266,10 @@
266
266
  grid-row-gap: 8px;
267
267
  margin-top: 12px;
268
268
 
269
+ &-unset-color {
270
+ margin-top: 0;
271
+ }
272
+
269
273
  li {
270
274
  position: relative;
271
275
  box-sizing: border-box;
@@ -442,6 +442,7 @@ declare const compDefaultProps: {
442
442
  optionLabelProp: string;
443
443
  treeNodeFilterProp: string;
444
444
  treeExpandOnClickNode: boolean;
445
+ onlyExpandOnClickIcon: boolean;
445
446
  showSearch: boolean;
446
447
  switcherIcon: () => JSX.Element;
447
448
  expandOnClickNode: boolean;
@@ -456,6 +456,7 @@ var compDefaultProps = {
456
456
  optionLabelProp: 'title',
457
457
  treeNodeFilterProp: 'title',
458
458
  treeExpandOnClickNode: true,
459
+ onlyExpandOnClickIcon: true,
459
460
  showSearch: true,
460
461
  switcherIcon: function switcherIcon() {
461
462
  return /*#__PURE__*/React.createElement(Icon, {
@@ -16,7 +16,7 @@ var findItem = function findItem(element) {
16
16
  }
17
17
  };
18
18
  var Dropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
19
- var _a, _b, _c;
19
+ var _a, _b, _c, _d;
20
20
  var _React$useContext = React.useContext(ConfigContext),
21
21
  getPrefixCls = _React$useContext.getPrefixCls,
22
22
  pkgPrefixCls = _React$useContext.prefixCls,
@@ -40,14 +40,17 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
40
40
  React.useEffect(function () {
41
41
  setVisible(!!props.visible);
42
42
  }, [props.visible]);
43
- var child = /*#__PURE__*/React.cloneElement(React.Children.only(children), {
43
+ var child = children && ((_a = children === null || children === void 0 ? void 0 : children.type) === null || _a === void 0 ? void 0 : _a.displayName) === 'Input' ? /*#__PURE__*/React.createElement("span", {
44
+ className: classNames("".concat(prefixCls, "-trigger"), "".concat(prefixCls, "-trigger-container")),
45
+ ref: ref
46
+ }, children) : /*#__PURE__*/React.cloneElement(React.Children.only(children), {
44
47
  ref: children.ref || ref,
45
48
  className: classNames("".concat(prefixCls, "-trigger"), children.props.className, {
46
49
  disabled: disabled
47
50
  })
48
51
  });
49
52
  var isMenu = menu.type === Menu;
50
- var _React$useState3 = React.useState(props.selectedKey || ((_a = menu.props) === null || _a === void 0 ? void 0 : _a.defaultKey) || props.defaultKey || ''),
53
+ var _React$useState3 = React.useState(props.selectedKey || ((_b = menu.props) === null || _b === void 0 ? void 0 : _b.defaultKey) || props.defaultKey || ''),
51
54
  _React$useState4 = _slicedToArray(_React$useState3, 2),
52
55
  selectedKey = _React$useState4[0],
53
56
  setSelectedKey = _React$useState4[1];
@@ -56,7 +59,7 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
56
59
  setSelectedKey(props.selectedKey);
57
60
  }
58
61
  }, [props.selectedKey]);
59
- var menuSelectable = ((_b = menu.props) === null || _b === void 0 ? void 0 : _b.selectable) === undefined ? selectable : (_c = menu.props) === null || _c === void 0 ? void 0 : _c.selectable;
62
+ var menuSelectable = ((_c = menu.props) === null || _c === void 0 ? void 0 : _c.selectable) === undefined ? selectable : (_d = menu.props) === null || _d === void 0 ? void 0 : _d.selectable;
60
63
  var handleItemClick = function handleItemClick(e) {
61
64
  var _a;
62
65
  var item = findItem(e.target);
@@ -109,6 +109,9 @@
109
109
  .kd-dropdown-trigger {
110
110
  outline: none;
111
111
  }
112
+ .kd-dropdown-trigger-container {
113
+ display: inline-block;
114
+ }
112
115
  .kd-dropdown {
113
116
  -webkit-box-sizing: border-box;
114
117
  box-sizing: border-box;
@@ -9,6 +9,10 @@
9
9
 
10
10
  .@{dropdown-trigger-prefix-cls} {
11
11
  outline: none;
12
+
13
+ &-container {
14
+ display: inline-block;
15
+ }
12
16
  }
13
17
 
14
18
  .@{dropdown-prefix-cls} {
@@ -153,8 +153,9 @@ var SchemeFilter = function SchemeFilter(props) {
153
153
  };
154
154
  var handleChangeOption = function handleChangeOption(index, value) {
155
155
  var nextScheme = cloneDeep(scheme);
156
+ var realValue = value.target !== undefined ? value.target.value : value;
156
157
  nextScheme.items[index] = _extends(_extends({}, nextScheme.items[index]), {
157
- value: value
158
+ value: realValue
158
159
  });
159
160
  setScheme(nextScheme);
160
161
  };
@@ -327,7 +327,8 @@
327
327
  list-style: none;
328
328
  }
329
329
  .kd-filter .kd-filter-body-scheme-detail > li {
330
- line-height: 40px;
330
+ line-height: normal;
331
+ padding: 7px 0 5px 0;
331
332
  color: var(--kd-g-color-text-primary, #212121);
332
333
  font-size: var(--kd-g-font-size-small, 12px);
333
334
  }
@@ -117,7 +117,7 @@
117
117
  display: block;
118
118
  }
119
119
  }
120
-
120
+
121
121
  &-condition {
122
122
  display: flex;
123
123
  font-size: @font-size-small;
@@ -221,7 +221,8 @@
221
221
  &-detail {
222
222
  list-style: none;
223
223
  > li {
224
- line-height: 40px;
224
+ line-height: normal;
225
+ padding: 7px 0 5px 0;
225
226
  color: @color-text-primary;
226
227
  font-size: @font-size-small;
227
228
 
package/es/form/Field.js CHANGED
@@ -196,7 +196,7 @@ var Field = function Field(props) {
196
196
  var inputValue;
197
197
  if (innerDisplayName === 'RadioGroup' && payload) {
198
198
  inputValue = payload[1];
199
- } else if (Object.prototype.hasOwnProperty.call(evt, 'target') && _includesInstanceProperty(FormEventValuePropNames).call(FormEventValuePropNames, innerValuePropName)) {
199
+ } else if (evt && Object.prototype.hasOwnProperty.call(evt, 'target') && _includesInstanceProperty(FormEventValuePropNames).call(FormEventValuePropNames, innerValuePropName)) {
200
200
  inputValue = (_a = evt.target) === null || _a === void 0 ? void 0 : _a[innerValuePropName];
201
201
  } else {
202
202
  inputValue = evt;
@@ -72,7 +72,7 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
72
72
  return true;
73
73
  };
74
74
  useEffect(function () {
75
- setInputValue(value);
75
+ setInputValue(serialization(value + ''));
76
76
  }, [value]);
77
77
  var handleEventAttachValue = function handleEventAttachValue(event, value) {
78
78
  return _extends({}, event, {
@@ -59,14 +59,13 @@ declare class LocaleCache {
59
59
  'QuickSearch.desc': string[];
60
60
  'QuickSearch.nplDesc': string;
61
61
  'QuickSearch.emptyTip': string;
62
- /**
63
- * 获取当前语言包数据
64
- */
65
62
  'QuickSearch.or': string;
66
63
  'CityPicker.domestic': string;
67
64
  'CityPicker.internation': string;
68
65
  'CityPicker.common': string;
69
- 'CityPicker.noData': string;
66
+ 'CityPicker.noData': string; /**
67
+ * 获取所有语言包数据
68
+ */
70
69
  'ColorPicker.followFunctionalColor': string;
71
70
  'Search.placeholder': string;
72
71
  'Search.desc': string[];
@@ -14,15 +14,15 @@ var locale = _extends(_extends({
14
14
  'Progress.success': '加载成功',
15
15
  'Pagination.prevPage': '上一页',
16
16
  'Pagination.nextPage': '下一页',
17
- 'Pagination.total': '共{page}页{row}条',
18
- 'Pagination.page': '共{page}页',
19
- 'Pagination.row': '共{row}条',
17
+ 'Pagination.total': '共 {page} {row}条',
18
+ 'Pagination.page': '共 {page} 页',
19
+ 'Pagination.row': '共 {row} 条',
20
20
  'Pagination.first': '第一页',
21
21
  'Pagination.last': '最后一页',
22
- 'Pagination.perPage': '{size}条/页',
23
- 'Pagination.order': '第{order}页',
24
- 'Pagination.forward': '向前5页',
25
- 'Pagination.backward': '向后5页',
22
+ 'Pagination.perPage': '{size} 条/页',
23
+ 'Pagination.order': '第 {order} 页',
24
+ 'Pagination.forward': '向前 5 页',
25
+ 'Pagination.backward': '向后 5 页',
26
26
  'Transfer.selectAll': '全选',
27
27
  'Transfer.searchPlaceholder': ['请输入需要搜索的内容', '请输入需要搜索的内容'],
28
28
  'Transfer.leftTitle': '可选列表',
@@ -42,7 +42,7 @@ var locale = _extends(_extends({
42
42
  'CityPicker.internation': '国际',
43
43
  'CityPicker.common': '常用',
44
44
  'CityPicker.noData': '暂无数据',
45
- 'ColorPicker.followFunctionalColor': '跟随主题色',
45
+ 'ColorPicker.followFunctionalColor': '跟随功能色',
46
46
  'Search.placeholder': '请输入需要搜索的内容',
47
47
  'Search.desc': ['空格代表"或",回车代表"且"'],
48
48
  'Search.nplDesc': '智能搜索',
@@ -129,6 +129,7 @@ var Notification = {
129
129
  },
130
130
  destroy: function destroy(key) {
131
131
  NotificationApi.destroy(key);
132
- }
132
+ },
133
+ displayName: 'Notification'
133
134
  };
134
135
  export default Notification;
@@ -48,14 +48,17 @@ var NotificationApi = {
48
48
  destroy: function destroy(key) {
49
49
  if (key) {
50
50
  _Object$keys(notificationInstance).forEach(function (placement) {
51
- var instance = notificationInstance[placement].instance;
52
- var notices = instance.notices;
53
- if (Array.isArray(notices) && notices.length) {
54
- var flag = notices.some(function (notice) {
55
- return notice.key === key;
56
- });
57
- if (flag) {
58
- instance.remove(key);
51
+ var _a;
52
+ var instance = (_a = notificationInstance[placement]) === null || _a === void 0 ? void 0 : _a.instance;
53
+ if (instance) {
54
+ var notices = instance.notices;
55
+ if (Array.isArray(notices) && notices.length) {
56
+ var flag = notices.some(function (notice) {
57
+ return notice.key === key;
58
+ });
59
+ if (flag) {
60
+ instance.remove(key);
61
+ }
59
62
  }
60
63
  }
61
64
  });
@@ -108,6 +108,9 @@ var InternalSelect = function InternalSelect(props, ref) {
108
108
  _useState12 = _slicedToArray(_useState11, 2),
109
109
  focusd = _useState12[0],
110
110
  setFocusd = _useState12[1];
111
+ var isShowSearch = useMemo(function () {
112
+ return isBoolean(showSearch) ? showSearch : isMultiple;
113
+ }, [isMultiple, showSearch]);
111
114
  var selectPrefixCls = getPrefixCls(prefixCls, 'select', customPrefixcls);
112
115
  // 选择器样式
113
116
  var selectCls = classNames(selectPrefixCls, className, _defineProperty({}, "".concat(selectPrefixCls, "-visible"), optionShow));
@@ -119,7 +122,7 @@ var InternalSelect = function InternalSelect(props, ref) {
119
122
  // 多选底部样式
120
123
  var multipleFooterCls = classNames(_defineProperty({}, "".concat(selectPrefixCls, "-multiple-footer"), true));
121
124
  // 多选,单选公共样式
122
- var commCls = classNames((_classNames6 = {}, _defineProperty(_classNames6, "".concat(selectPrefixCls, "-bordered"), borderType === 'bordered'), _defineProperty(_classNames6, "".concat(selectPrefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames6, "".concat(selectPrefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames6, _concatInstanceProperty(_context = "".concat(selectPrefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames6, "".concat(selectPrefixCls, "-wrapper"), true), _classNames6));
125
+ var commCls = classNames((_classNames6 = {}, _defineProperty(_classNames6, "".concat(selectPrefixCls, "-bordered"), borderType === 'bordered'), _defineProperty(_classNames6, "".concat(selectPrefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames6, "".concat(selectPrefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames6, _concatInstanceProperty(_context = "".concat(selectPrefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames6, "".concat(selectPrefixCls, "-wrapper"), true), _defineProperty(_classNames6, "".concat(selectPrefixCls, "-show-search"), isShowSearch), _classNames6));
123
126
  useEffect(function () {
124
127
  if (typeof props.visible !== 'undefined') {
125
128
  setOptionShow(props.visible);
@@ -307,7 +310,7 @@ var InternalSelect = function InternalSelect(props, ref) {
307
310
  }
308
311
  } else {
309
312
  props.visible === undefined && setOptionShow(false);
310
- onChange && onChange(labelInValue ? {
313
+ initValue !== key && onChange && onChange(labelInValue ? {
311
314
  value: key,
312
315
  label: label
313
316
  } : key, _extends(_extends({}, optionsObj), {
@@ -323,7 +326,7 @@ var InternalSelect = function InternalSelect(props, ref) {
323
326
  multipleRef.current.selectedVal = key;
324
327
  setInitValue(key);
325
328
  props.visible === undefined && setOptionShow(false);
326
- onChange && onChange(labelInValue ? {
329
+ initValue !== key && onChange && onChange(labelInValue ? {
327
330
  value: key,
328
331
  label: label
329
332
  } : key, _extends(_extends({}, optionsObj), {
@@ -500,9 +503,6 @@ var InternalSelect = function InternalSelect(props, ref) {
500
503
  className: emptyListCls
501
504
  }, emptyContent);
502
505
  };
503
- var isShowSearch = useMemo(function () {
504
- return isBoolean(showSearch) ? showSearch : isMultiple;
505
- }, [isMultiple, showSearch]);
506
506
  useEffect(function () {
507
507
  var _a;
508
508
  if (isShowSearch && autoFocus && !disabled) {
@@ -558,7 +558,7 @@ var InternalSelect = function InternalSelect(props, ref) {
558
558
  className: dropDownCls,
559
559
  style: dropDownStyle,
560
560
  ref: dropDownRef
561
- }, !dropdownRender && childrenToRender.length > 0 && dropRender(eleOptionList, heightStyle), renderNotContent(), /*#__PURE__*/React.createElement("div", null, dropdownRender && dropdownRender(dropRender(childrenToRender, heightStyle))), isMultiple && /*#__PURE__*/React.createElement("div", {
561
+ }, !dropdownRender && childrenToRender.length > 0 && dropRender(eleOptionList, heightStyle), renderNotContent(), /*#__PURE__*/React.createElement("div", null, dropdownRender && dropdownRender(dropRender(childrenToRender, heightStyle))), isMultiple && realChildren.length > 0 && /*#__PURE__*/React.createElement("div", {
562
562
  className: multipleFooterCls
563
563
  }, /*#__PURE__*/React.createElement(Checkbox, {
564
564
  style: checkboxStyle,
@@ -567,7 +567,7 @@ var InternalSelect = function InternalSelect(props, ref) {
567
567
  onChange: handleSelectAll
568
568
  }, "\u5168\u9009"), /*#__PURE__*/React.createElement("span", {
569
569
  className: "".concat(selectPrefixCls, "-multiple-footer-hadSelected")
570
- }, "\u5DF2\u9009", /*#__PURE__*/React.createElement("span", null, isMultiple ? selectedVal.length : 0), "\u9879"))));
570
+ }, "\u5DF2\u9009", /*#__PURE__*/React.createElement("span", null, selectedVal.length), "\u9879"))));
571
571
  };
572
572
  // 处理多选tag
573
573
  var handleMaxTagHolder = useCallback(function () {
@@ -350,6 +350,12 @@
350
350
  overflow-x: hidden;
351
351
  position: relative;
352
352
  }
353
+ .kd-select-show-search {
354
+ cursor: text;
355
+ }
356
+ .kd-select-show-search.kd-select-single .kd-select-selection-search .kd-select-selection-search-input {
357
+ cursor: text;
358
+ }
353
359
  .kd-select-dropdown {
354
360
  display: block;
355
361
  left: 0;
@@ -471,6 +477,7 @@
471
477
  background: transparent;
472
478
  height: 100%;
473
479
  width: 100%;
480
+ cursor: pointer;
474
481
  }
475
482
  .kd-select .kd-select-single .kd-select-selection-item {
476
483
  display: inline-block;
@@ -120,6 +120,16 @@
120
120
  position: relative;
121
121
  }
122
122
 
123
+ &-show-search {
124
+ cursor: text;
125
+
126
+ &.@{select-prefix-cls}-single .@{select-prefix-cls}-selection-search {
127
+ .@{select-prefix-cls}-selection-search-input {
128
+ cursor: text;
129
+ }
130
+ }
131
+ }
132
+
123
133
  &-dropdown {
124
134
  display: block;
125
135
  left: 0;
@@ -232,6 +242,7 @@
232
242
  background: transparent;
233
243
  height: 100%;
234
244
  width: 100%;
245
+ cursor: pointer;
235
246
  }
236
247
  }
237
248
  &-item {