@kdcloudjs/kdesign 1.7.4 → 1.7.6

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 (50) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/kdesign-complete.less +268 -212
  3. package/dist/kdesign.css +34 -10
  4. package/dist/kdesign.css.map +1 -1
  5. package/dist/kdesign.js +64 -34
  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/color-picker/color-picker-panel.js +3 -6
  11. package/es/color-picker/interface.d.ts +10 -2
  12. package/es/color-picker/style/index.css +21 -0
  13. package/es/color-picker/style/index.less +260 -213
  14. package/es/config-provider/compDefaultProps.d.ts +5 -0
  15. package/es/config-provider/compDefaultProps.js +6 -1
  16. package/es/dropdown/dropdown.js +3 -1
  17. package/es/form/Field.js +1 -0
  18. package/es/input/ClearableLabeledInput.d.ts +1 -0
  19. package/es/input/ClearableLabeledInput.js +4 -3
  20. package/es/input/TextArea.d.ts +1 -0
  21. package/es/input/TextArea.js +3 -2
  22. package/es/input/input.d.ts +1 -0
  23. package/es/input/input.js +3 -2
  24. package/es/input/style/index.css +12 -9
  25. package/es/input/style/index.less +5 -1
  26. package/es/input/style/mixin.less +5 -2
  27. package/es/input/style/token.less +1 -0
  28. package/es/tree/tree.d.ts +1 -0
  29. package/es/tree/treeHooks.js +1 -1
  30. package/lib/color-picker/color-picker-panel.js +3 -6
  31. package/lib/color-picker/interface.d.ts +10 -2
  32. package/lib/color-picker/style/index.css +21 -0
  33. package/lib/color-picker/style/index.less +260 -213
  34. package/lib/config-provider/compDefaultProps.d.ts +5 -0
  35. package/lib/config-provider/compDefaultProps.js +6 -1
  36. package/lib/dropdown/dropdown.js +3 -1
  37. package/lib/form/Field.js +1 -0
  38. package/lib/input/ClearableLabeledInput.d.ts +1 -0
  39. package/lib/input/ClearableLabeledInput.js +4 -3
  40. package/lib/input/TextArea.d.ts +1 -0
  41. package/lib/input/TextArea.js +3 -2
  42. package/lib/input/input.d.ts +1 -0
  43. package/lib/input/input.js +3 -2
  44. package/lib/input/style/index.css +12 -9
  45. package/lib/input/style/index.less +5 -1
  46. package/lib/input/style/mixin.less +5 -2
  47. package/lib/input/style/token.less +1 -0
  48. package/lib/tree/tree.d.ts +1 -0
  49. package/lib/tree/treeHooks.js +1 -1
  50. package/package.json +3 -1
@@ -28,7 +28,8 @@ var ClearableInput = function ClearableInput(props) {
28
28
  focused = props.focused,
29
29
  numberMark = props.numberMark,
30
30
  inputCount = props.inputCount,
31
- count = props.count;
31
+ count = props.count,
32
+ status = props.status;
32
33
  var _useState = useState(false),
33
34
  _useState2 = _slicedToArray(_useState, 2),
34
35
  isMouseEnter = _useState2[0],
@@ -80,7 +81,7 @@ var ClearableInput = function ClearableInput(props) {
80
81
  className: "".concat(prefixCls, "-prefix"),
81
82
  onMouseDown: mouseDownHandle
82
83
  }, prefix) : null;
83
- var inputWrapperClasses = classNames((_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper-focused"), focused && !disabled), _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper-disabled"), disabled), _defineProperty(_classNames2, _concatInstanceProperty(_context = "".concat(prefixCls, "-wrapper-size-")).call(_context, size), size), _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper-borderless"), borderType === 'none'), _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper-underline"), borderType === 'underline'), _classNames2), _defineProperty({}, className, className && !addonBefore && !addonAfter));
84
+ var inputWrapperClasses = classNames((_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper-focused"), focused && !disabled), _defineProperty(_classNames2, _concatInstanceProperty(_context = "".concat(prefixCls, "-wrapper-size-")).call(_context, size), size), _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper-borderless"), borderType === 'none'), _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper-underline"), borderType === 'underline'), _defineProperty(_classNames2, "".concat(prefixCls, "-error"), status === 'error'), _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper-disabled"), disabled), _classNames2), _defineProperty({}, className, className && !addonBefore && !addonAfter));
84
85
  return /*#__PURE__*/React.createElement("span", {
85
86
  className: inputWrapperClasses,
86
87
  style: style,
@@ -95,7 +96,7 @@ var ClearableInput = function ClearableInput(props) {
95
96
  if (!addonBefore && !addonAfter && !count) {
96
97
  return originElement;
97
98
  }
98
- var addonClassName = classNames("".concat(prefixCls, "-group-addon"), (_classNames4 = {}, _defineProperty(_classNames4, "".concat(prefixCls, "-group-addon-borderless"), borderType === 'none'), _defineProperty(_classNames4, "".concat(prefixCls, "-group-addon-underline"), borderType === 'underline'), _defineProperty(_classNames4, "".concat(prefixCls, "-group-addon-disabled"), disabled), _classNames4));
99
+ var addonClassName = classNames("".concat(prefixCls, "-group-addon"), (_classNames4 = {}, _defineProperty(_classNames4, "".concat(prefixCls, "-group-addon-borderless"), borderType === 'none'), _defineProperty(_classNames4, "".concat(prefixCls, "-group-addon-underline"), borderType === 'underline'), _defineProperty(_classNames4, "".concat(prefixCls, "-error"), status === 'error'), _defineProperty(_classNames4, "".concat(prefixCls, "-group-addon-disabled"), disabled), _classNames4));
99
100
  var addonBeforeNode = addonBefore ? /*#__PURE__*/React.createElement("span", {
100
101
  className: addonClassName
101
102
  }, addonBefore) : null;
@@ -14,6 +14,7 @@ export interface textAreaProps extends React.TextareaHTMLAttributes<HTMLInputEle
14
14
  style?: Record<string, unknown>;
15
15
  size?: InputSiteType;
16
16
  autoSize?: AutoSizeType | boolean;
17
+ status?: 'error';
17
18
  }
18
19
  export interface AutoSizeType {
19
20
  minRows?: number;
@@ -51,7 +51,8 @@ var InternalTextarea = function InternalTextarea(props, ref) {
51
51
  placeholder = textAreaProps.placeholder,
52
52
  style = textAreaProps.style,
53
53
  size = textAreaProps.size,
54
- others = __rest(textAreaProps, ["value", "allowClear", "borderType", "defaultValue", "count", "countPosition", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size"]);
54
+ status = textAreaProps.status,
55
+ others = __rest(textAreaProps, ["value", "allowClear", "borderType", "defaultValue", "count", "countPosition", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size", "status"]);
55
56
  var textAreaPrefixCls = getPrefixCls(prefixCls, 'input', customPrefixcls); // TextArea样式前缀
56
57
  devWarning(BorderTypes.indexOf(borderType) === -1, 'textarea', "cannot found textarea borderType '".concat(borderType, "'"));
57
58
  var _useMergedState = useMergedState('', {
@@ -172,7 +173,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
172
173
  ref: textareaRef,
173
174
  disabled: disabled,
174
175
  style: _extends({}, textareaStyles, hadCount || !!allowClear ? otherStyles : style),
175
- className: classNames("".concat(prefixCls, "-textarea"), (_classNames2 = {}, _defineProperty(_classNames2, _concatInstanceProperty(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames2, "".concat(prefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames2, "".concat(prefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_classNames2, "".concat(prefixCls, "-no-resize"), canResize !== true), _defineProperty(_classNames2, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _classNames2), _defineProperty({}, className, className && !allowClear && !hadCount)),
176
+ className: classNames("".concat(prefixCls, "-textarea"), (_classNames2 = {}, _defineProperty(_classNames2, _concatInstanceProperty(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames2, "".concat(prefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames2, "".concat(prefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames2, "".concat(prefixCls, "-no-resize"), canResize !== true), _defineProperty(_classNames2, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _defineProperty(_classNames2, "".concat(prefixCls, "-error"), status === 'error'), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _classNames2), _defineProperty({}, className, className && !allowClear && !hadCount)),
176
177
  onChange: handleChange,
177
178
  onFocus: !disabled ? handleFocus : undefined,
178
179
  onBlur: !disabled ? handleBlur : undefined,
@@ -22,6 +22,7 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
22
22
  value?: any;
23
23
  readonly?: 'readonly';
24
24
  count?: boolean;
25
+ status?: 'error';
25
26
  }
26
27
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<unknown>>;
27
28
  export default Input;
package/es/input/input.js CHANGED
@@ -49,7 +49,8 @@ var InternalInput = function InternalInput(props, ref) {
49
49
  className = inputProps.className,
50
50
  maxLength = inputProps.maxLength,
51
51
  count = inputProps.count,
52
- others = __rest(inputProps, ["type", "size", "disabled", "onPressEnter", "borderType", "prefixCls", "onFocus", "onBlur", "onChange", "placeholderTobeValue", "defaultValue", "value", "className", "maxLength", "count"]);
52
+ status = inputProps.status,
53
+ others = __rest(inputProps, ["type", "size", "disabled", "onPressEnter", "borderType", "prefixCls", "onFocus", "onBlur", "onChange", "placeholderTobeValue", "defaultValue", "value", "className", "maxLength", "count", "status"]);
53
54
  devWarning(InputSiteTypes.indexOf(size) === -1, 'input', "cannot found input size '".concat(size, "'"));
54
55
  devWarning(BorderTypes.indexOf(borderType) === -1, 'input', "cannot found input borderType '".concat(borderType, "'"));
55
56
  var _useMergedState = useMergedState('', {
@@ -72,7 +73,7 @@ var InternalInput = function InternalInput(props, ref) {
72
73
  var inputPrefixCls = getPrefixCls(prefixCls, 'input', customPrefixcls); // 按钮样式前缀
73
74
  var addonBefore = others.addonBefore,
74
75
  addonAfter = others.addonAfter;
75
- var inputClasses = classNames(inputPrefixCls, (_classNames = {}, _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(inputPrefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames, "".concat(inputPrefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames, "".concat(inputPrefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames, "".concat(inputPrefixCls, "-disabled"), disabled), _classNames), _defineProperty({}, className, className && !hasPrefixSuffix(inputProps) && !addonBefore && !addonAfter));
76
+ var inputClasses = classNames(inputPrefixCls, (_classNames = {}, _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(inputPrefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames, "".concat(inputPrefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames, "".concat(inputPrefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames, "".concat(inputPrefixCls, "-error"), status === 'error'), _defineProperty(_classNames, "".concat(inputPrefixCls, "-disabled"), disabled), _classNames), _defineProperty({}, className, className && !hasPrefixSuffix(inputProps) && !addonBefore && !addonAfter));
76
77
  var handleFocus = function handleFocus(event) {
77
78
  setFocused(true);
78
79
  onFocus && onFocus(event);
@@ -146,10 +146,10 @@ textarea {
146
146
  box-shadow: none;
147
147
  outline: none;
148
148
  }
149
- .kd-input:not(.kd-input-disabled):hover {
149
+ .kd-input:not(.kd-input-disabled):not(.kd-input-error):hover {
150
150
  border-color: var(--kd-c-input-color-border-focused, var(--kd-g-color-theme, #5582f3));
151
151
  }
152
- .kd-input:not(.kd-input-disabled):focus {
152
+ .kd-input:not(.kd-input-disabled):not(.kd-input-error):focus {
153
153
  color: #212121;
154
154
  border-color: var(--kd-c-input-color-border-focused, var(--kd-g-color-theme, #5582f3));
155
155
  }
@@ -193,10 +193,10 @@ textarea {
193
193
  box-shadow: none;
194
194
  outline: none;
195
195
  }
196
- .kd-input-textarea:not(.kd-input-disabled):hover {
196
+ .kd-input-textarea:not(.kd-input-disabled):not(.kd-input-error):hover {
197
197
  border-color: var(--kd-c-input-color-border-focused, var(--kd-g-color-theme, #5582f3));
198
198
  }
199
- .kd-input-textarea:not(.kd-input-disabled):focus {
199
+ .kd-input-textarea:not(.kd-input-disabled):not(.kd-input-error):focus {
200
200
  color: #212121;
201
201
  border-color: var(--kd-c-input-color-border-focused, var(--kd-g-color-theme, #5582f3));
202
202
  }
@@ -300,10 +300,10 @@ textarea {
300
300
  box-shadow: none;
301
301
  outline: none;
302
302
  }
303
- .kd-input-wrapper:not(.kd-input-wrapper-disabled):hover {
303
+ .kd-input-wrapper:not(.kd-input-wrapper-disabled):not(.kd-input-error):hover {
304
304
  border-color: var(--kd-c-input-color-border-focused, var(--kd-g-color-theme, #5582f3));
305
305
  }
306
- .kd-input-wrapper:not(.kd-input-wrapper-disabled):focus {
306
+ .kd-input-wrapper:not(.kd-input-wrapper-disabled):not(.kd-input-error):focus {
307
307
  color: #212121;
308
308
  border-color: var(--kd-c-input-color-border-focused, var(--kd-g-color-theme, #5582f3));
309
309
  }
@@ -363,7 +363,7 @@ textarea {
363
363
  border-radius: 0 !important;
364
364
  padding-left: 0;
365
365
  }
366
- .kd-input-wrapper-focused {
366
+ .kd-input-wrapper-focused:not(.kd-input-error) {
367
367
  border-color: var(--kd-c-input-color-border-focused, var(--kd-g-color-theme, #5582f3));
368
368
  }
369
369
  .kd-input-wrapper-disabled {
@@ -408,10 +408,10 @@ textarea {
408
408
  box-shadow: none;
409
409
  outline: none;
410
410
  }
411
- .kd-input-wrapper-textarea:not(.kd-input-disabled):hover {
411
+ .kd-input-wrapper-textarea:not(.kd-input-disabled):not(.kd-input-error):hover {
412
412
  border-color: var(--kd-c-input-color-border-focused, var(--kd-g-color-theme, #5582f3));
413
413
  }
414
- .kd-input-wrapper-textarea:not(.kd-input-disabled):focus {
414
+ .kd-input-wrapper-textarea:not(.kd-input-disabled):not(.kd-input-error):focus {
415
415
  color: #212121;
416
416
  border-color: var(--kd-c-input-color-border-focused, var(--kd-g-color-theme, #5582f3));
417
417
  }
@@ -537,3 +537,6 @@ textarea {
537
537
  .kd-input-input-mark-inner {
538
538
  color: var(--kd-c-input-placeholder-color-text, var(--kd-g-color-text-placeholder, #ccc));
539
539
  }
540
+ .kd-input-error:not(.kd-input-disabled):not(.kd-input-wrapper-disabled):not(.kd-input-group-addon-disabled) {
541
+ border-color: var(--kd-c-input-color-error, var(--kd-g-color-error, #fb2323));
542
+ }
@@ -152,7 +152,7 @@ textarea {
152
152
  .underline;
153
153
  }
154
154
 
155
- &-focused {
155
+ &-focused:not(.@{input-prefix-cls}-error) {
156
156
  border-color: @input-border-color-focused;
157
157
  }
158
158
 
@@ -308,4 +308,8 @@ textarea {
308
308
  &-input-mark-inner {
309
309
  color: @input-placeholder-color-inner;
310
310
  }
311
+
312
+ &-error:not(.@{input-prefix-cls}-disabled):not(.@{input-prefix-cls}-wrapper-disabled):not(.@{input-prefix-cls}-group-addon-disabled) {
313
+ border-color: @input-error-color;
314
+ }
311
315
  }
@@ -1,8 +1,11 @@
1
+ @import '../../style/themes/index';
1
2
  @import './token.less';
3
+ @input-prefix-cls: ~'@{kd-prefix}-input';
2
4
 
3
5
  // 输入框默认样式Mixins
4
6
  .input(@prefix) {
5
7
  @disabled-prefix-cls: ~'@{prefix}-disabled';
8
+ @error-prefix-cls: ~'@{input-prefix-cls}-error';
6
9
  width: 100%;
7
10
  min-width: 0;
8
11
  border: @input-border-width-inner solid @input-border-color-disabled-inner;
@@ -29,10 +32,10 @@
29
32
  box-shadow: none;
30
33
  outline: none;
31
34
  }
32
- &:not(.@{disabled-prefix-cls}):hover {
35
+ &:not(.@{disabled-prefix-cls}):not(.@{error-prefix-cls}):hover {
33
36
  border-color: @input-border-color-focused;
34
37
  }
35
- &:not(.@{disabled-prefix-cls}):focus {
38
+ &:not(.@{disabled-prefix-cls}):not(.@{error-prefix-cls}):focus {
36
39
  color: @input-focus-color;
37
40
  border-color: @input-border-color-focused;
38
41
  }
@@ -21,6 +21,7 @@
21
21
  );
22
22
  @input-color-disabled-inner: var(~'@{input-prefix}-color-disabled', @color-disabled);
23
23
  @input-affix-color: var(~'@{input-prefix}-affix-color-text', #666);
24
+ @input-error-color: var(~'@{input-prefix}-color-error', @color-error);
24
25
 
25
26
  // font
26
27
  @input-small-font-size-inner: var(~'@{input-prefix}-font-size-small', @font-size-small);
package/es/tree/tree.d.ts CHANGED
@@ -40,6 +40,7 @@ export interface TreeProps {
40
40
  estimatedItemSize?: number;
41
41
  expandOnClickNode?: boolean;
42
42
  onlyExpandOnClickIcon?: boolean;
43
+ showIcon?: boolean;
43
44
  }
44
45
  export declare type TreeNodeData = {
45
46
  checkable?: boolean;
@@ -74,7 +74,7 @@ export var useExpand = function useExpand(flattenAllData, expandedKeysProps, def
74
74
  setExpandedKeys = _React$useState8[1];
75
75
  React.useEffect(function () {
76
76
  setExpandedKeys(initialExpandedKeys);
77
- }, [flattenAllData, expandedKeysProps, searchExpandedKeys, defaultExpandAll, defaultExpandedKeys, defaultExpandRoot, defaultExpandParent]);
77
+ }, [flattenAllData, expandedKeysProps, searchExpandedKeys, defaultExpandAll, defaultExpandedKeys, defaultExpandRoot, defaultExpandParent, scrollKey]);
78
78
  return [expandedKeys, setExpandedKeys];
79
79
  };
80
80
  export var useScrollToKey = function useScrollToKey(scrollKey, index, estimatedItemSize, scrollRef, viewportHeight, treeNodePrefixCls) {
@@ -28,7 +28,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
28
28
  /* eslint-disable */
29
29
 
30
30
  var ColorPickerPanel = function ColorPickerPanel(props) {
31
- var _context;
31
+ var _classNames, _context;
32
32
  var setCorrectColorValue = props.setCorrectColorValue,
33
33
  setInputColorValue = props.setInputColorValue,
34
34
  setAlpha = props.setAlpha,
@@ -65,7 +65,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
65
65
  locale = _useContext.locale;
66
66
  var colorPickerPrefixCls = getPrefixCls(prefixCls, 'color-picker');
67
67
  var panelCls = (0, _classnames.default)("".concat(colorPickerPrefixCls, "-panel"));
68
- var panelChromePickerCls = (0, _classnames.default)("".concat(colorPickerPrefixCls, "-panel-chrome"));
68
+ var panelChromePickerCls = (0, _classnames.default)("".concat(colorPickerPrefixCls, "-panel-chrome"), (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(colorPickerPrefixCls, "-panel-chrome-no-box"), !(showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showBox)), (0, _defineProperty2.default)(_classNames, "".concat(colorPickerPrefixCls, "-panel-chrome-no-hue"), !(showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showHue)), (0, _defineProperty2.default)(_classNames, "".concat(colorPickerPrefixCls, "-panel-chrome-no-opacity"), !(showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showOpacity)), _classNames));
69
69
  var panelFollowThemeCls = (0, _classnames.default)("".concat(colorPickerPrefixCls, "-panel-switch"));
70
70
  var panelInputCls = (0, _classnames.default)("".concat(colorPickerPrefixCls, "-panel-input"), (0, _defineProperty2.default)({}, "".concat(colorPickerPrefixCls, "-panel-input-no-recommend"), !showPresetColor));
71
71
  var transparentCls = (0, _classnames.default)("".concat(colorPickerPrefixCls, "-panel-transparent"));
@@ -109,19 +109,16 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
109
109
  if (value === undefined) {
110
110
  setAlphaNoVerifyVal(e.target.value);
111
111
  if (regPercentage.test(val)) {
112
- console.log(1);
113
112
  formatArr = (0, _colorFormat.colorFormat)(correctColorValue, +val.replace('%', '') / 100, 'all', true);
114
113
  outValue = formatArr[(0, _colorFormat.valOfCorrespondingType)(currentColorType)].value;
115
114
  setPanelState(formatArr, outValue, outValue, +val.replace('%', '') / 100);
116
115
  setClickedColorIndex((0, _colorFormat.highlightPresetColorIndex)(formatArr[0].value, (0, _colorFormat.presetColorToHEX)(presetColor || _systemPresetColor.systemPresetColor)));
117
116
  } else if (regDot.test(val)) {
118
- console.log(2);
119
117
  formatArr = (0, _colorFormat.colorFormat)(correctColorValue, +val, 'all', true);
120
118
  outValue = formatArr[(0, _colorFormat.valOfCorrespondingType)(currentColorType)].value;
121
119
  setPanelState(formatArr, outValue, outValue, (0, _colorFormat.strFixed)(val, 2));
122
120
  setClickedColorIndex((0, _colorFormat.highlightPresetColorIndex)(formatArr[0].value, (0, _colorFormat.presetColorToHEX)(presetColor || _systemPresetColor.systemPresetColor)));
123
121
  } else {
124
- console.log(3);
125
122
  formatArr = (0, _colorFormat.colorFormat)(correctColorValue, 1, 'all', true);
126
123
  outValue = formatArr[(0, _colorFormat.valOfCorrespondingType)(currentColorType)].value;
127
124
  setPanelState(formatArr, outValue, outValue, 1);
@@ -191,7 +188,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
191
188
  return /*#__PURE__*/_react.default.createElement("div", {
192
189
  className: panelCls,
193
190
  ref: panelClsRef
194
- }, showColorPickerBox && /*#__PURE__*/_react.default.createElement(_reactColor.ChromePicker, {
191
+ }, /*#__PURE__*/_react.default.createElement(_reactColor.ChromePicker, {
195
192
  className: panelChromePickerCls,
196
193
  color: colTypeArr[2].value,
197
194
  onChange: handleChromeChange
@@ -26,7 +26,11 @@ export interface IColorPickerProps extends PopperProps {
26
26
  showPresetColor: boolean;
27
27
  placeholder: string;
28
28
  presetColor: string[];
29
- showColorPickerBox: boolean;
29
+ showColorPickerBox: {
30
+ showBox: boolean;
31
+ showHue: boolean;
32
+ showOpacity: boolean;
33
+ };
30
34
  defaultOpen: boolean;
31
35
  onChange: (inputValue: string, formatColorArr: Array<IColorTypesObj>) => void;
32
36
  }
@@ -49,7 +53,11 @@ export interface IColorPickerPanelProps {
49
53
  showSwitch?: boolean;
50
54
  showColorTransfer?: boolean;
51
55
  showPresetColor?: boolean;
52
- showColorPickerBox?: boolean;
56
+ showColorPickerBox?: {
57
+ showBox?: boolean;
58
+ showHue?: boolean;
59
+ showOpacity?: boolean;
60
+ };
53
61
  value: string;
54
62
  setCurrentColorType: (currentColorType: IColorTypesObj['type']) => void;
55
63
  setColTypeArr: (colTypeArr: Array<IColorTypesObj>) => void;
@@ -222,6 +222,27 @@
222
222
  .kd-color-picker-pop .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:last-child {
223
223
  display: none !important;
224
224
  }
225
+ .kd-color-picker-pop .kd-color-picker-panel-chrome-no-box > div:first-child {
226
+ display: none;
227
+ }
228
+ .kd-color-picker-pop .kd-color-picker-panel-chrome-no-hue > div:last-child .flexbox-fix:first-child > div:last-child > div:first-child {
229
+ display: none;
230
+ }
231
+ .kd-color-picker-pop .kd-color-picker-panel-chrome-no-hue > div:last-child .flexbox-fix:first-child > div:last-child > div:last-child {
232
+ margin-top: 8px;
233
+ }
234
+ .kd-color-picker-pop .kd-color-picker-panel-chrome-no-opacity > div:last-child .flexbox-fix:first-child > div:last-child > div:last-child {
235
+ display: none;
236
+ }
237
+ .kd-color-picker-pop .kd-color-picker-panel-chrome-no-opacity > div:last-child .flexbox-fix:first-child > div:last-child > div:first-child {
238
+ margin-top: 8px;
239
+ }
240
+ .kd-color-picker-pop .kd-color-picker-panel .kd-color-picker-panel-chrome-no-box.kd-color-picker-panel-chrome-no-hue.kd-color-picker-panel-chrome-no-opacity {
241
+ display: none;
242
+ }
243
+ .kd-color-picker-pop .kd-color-picker-panel .kd-color-picker-panel-chrome-no-hue.kd-color-picker-panel-chrome-no-opacity > div:last-child {
244
+ display: none;
245
+ }
225
246
  .kd-color-picker-pop .kd-color-picker-panel-switch {
226
247
  margin: 12px 0 0;
227
248
  font-size: 12px;