@kdcloudjs/kdesign 1.8.23 → 1.8.25

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.
@@ -114,7 +114,8 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
114
114
  };
115
115
  var handleClearClick = function handleClearClick() {
116
116
  var formatArr = colorFormat(defaultSystemColor, 0);
117
- setPanelState(formatArr, defaultSystemColor, '', 0, '0%');
117
+ var defaultColor = colorFormat(defaultSystemColor, 1, currentColorType, true);
118
+ setPanelState(formatArr, defaultColor, '', 0, '0%');
118
119
  setClickColorIndex(-1);
119
120
  onChange === null || onChange === void 0 ? void 0 : onChange('', formatArr);
120
121
  };
@@ -153,11 +154,11 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
153
154
  var handleTypeChange = function handleTypeChange(selectValue) {
154
155
  var _a, _b, _c;
155
156
  setCurrentColorType(selectValue);
157
+ var colorStr = (_a = _findInstanceProperty(colTypeArr).call(colTypeArr, function (item) {
158
+ return item.type === selectValue;
159
+ })) === null || _a === void 0 ? void 0 : _a.value;
160
+ setCorrectColorValue(colorFormat(colorStr, 1, selectValue, true));
156
161
  if (inputCorrectColorValue) {
157
- var colorStr = (_a = _findInstanceProperty(colTypeArr).call(colTypeArr, function (item) {
158
- return item.type === selectValue;
159
- })) === null || _a === void 0 ? void 0 : _a.value;
160
- setCorrectColorValue(colorFormat(colorStr, 1, selectValue, true));
161
162
  setInputColorValue((_b = _findInstanceProperty(colTypeArr).call(colTypeArr, function (item) {
162
163
  return item.type === format;
163
164
  })) === null || _b === void 0 ? void 0 : _b.value);
@@ -237,7 +238,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
237
238
  } else {
238
239
  if (!inputCorrectColorValue) {
239
240
  var _formatArr = colorFormat(correctColor, 1, 'all', true);
240
- setPanelState(_formatArr, removeTransparency(correctColor, currentColorType), correctColor, 1, '100%');
241
+ setPanelState(_formatArr, removeTransparency(correctColor, currentColorType), removeTransparency(correctColor, format), 1, '100%');
241
242
  onChange === null || onChange === void 0 ? void 0 : onChange((_b = _findInstanceProperty(_formatArr).call(_formatArr, function (item) {
242
243
  return item.type === format;
243
244
  })) === null || _b === void 0 ? void 0 : _b.value, _formatArr);
@@ -216,7 +216,7 @@ var InternalColorPicker = function InternalColorPicker(props, ref) {
216
216
  var _classNames2;
217
217
  var afterIconContainerCls = classNames("".concat(colorPickerPrefixCls, "-icon"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(colorPickerPrefixCls, "-icon-underline"), borderType === 'underline'), _defineProperty(_classNames2, "".concat(colorPickerPrefixCls, "-icon-bordered"), borderType === 'bordered'), _classNames2));
218
218
  var getBgc = function getBgc() {
219
- return inputCorrectColorValue ? colTypeArr[2].value : removeTransparency(colTypeArr[2].value, currentColorType);
219
+ return inputCorrectColorValue ? colTypeArr[2].value : removeTransparency(colTypeArr[2].value, 'RGB');
220
220
  };
221
221
  var noneLineCls = "".concat(colorPickerPrefixCls, "-icon-no-color-line");
222
222
  return React.createElement("div", {
@@ -227,7 +227,7 @@ var InternalColorPicker = function InternalColorPicker(props, ref) {
227
227
  }, !validateColor(value) && !inputCorrectColorValue && React.createElement("div", {
228
228
  className: noneLineCls
229
229
  }));
230
- }, [borderType, colTypeArr, colorPickerPrefixCls, currentColorType, inputCorrectColorValue, value]);
230
+ }, [borderType, colTypeArr, colorPickerPrefixCls, inputCorrectColorValue, value]);
231
231
  var colorInputEle = React.createElement("div", {
232
232
  className: containerCls,
233
233
  ref: inputRef,
@@ -181,6 +181,10 @@
181
181
  }
182
182
  .kd-color-picker-pop.bottomLeft.hidden,
183
183
  .kd-color-picker-pop.bottomRight.hidden {
184
+ opacity: 0;
185
+ visibility: hidden;
186
+ -webkit-transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
187
+ transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
184
188
  -webkit-animation-name: kdSlideUpOut;
185
189
  animation-name: kdSlideUpOut;
186
190
  }
@@ -382,6 +386,8 @@
382
386
  }
383
387
  .kd-color-picker-pop .kd-color-picker-panel-container-select .kd-select .kd-select,
384
388
  .kd-color-picker-pop .kd-color-picker-panel-container-select .kd-select .kd-select-selection-item {
389
+ min-height: unset;
390
+ line-height: unset;
385
391
  overflow: visible;
386
392
  text-overflow: unset;
387
393
  }
@@ -80,6 +80,9 @@
80
80
 
81
81
  &.bottomLeft.hidden,
82
82
  &.bottomRight.hidden {
83
+ opacity: 0;
84
+ visibility: hidden;
85
+ transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
83
86
  animation-name: kdSlideUpOut;
84
87
  }
85
88
 
@@ -309,6 +312,8 @@
309
312
 
310
313
  .@{kd-prefix}-select,
311
314
  .@{kd-prefix}-select-selection-item {
315
+ min-height: unset;
316
+ line-height: unset;
312
317
  overflow: visible;
313
318
  text-overflow: unset;
314
319
  }
@@ -126,7 +126,8 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
126
126
  };
127
127
  var handleClearClick = function handleClearClick() {
128
128
  var formatArr = (0, _colorFormat.colorFormat)(_defaultColor.defaultSystemColor, 0);
129
- setPanelState(formatArr, _defaultColor.defaultSystemColor, '', 0, '0%');
129
+ var defaultColor = (0, _colorFormat.colorFormat)(_defaultColor.defaultSystemColor, 1, currentColorType, true);
130
+ setPanelState(formatArr, defaultColor, '', 0, '0%');
130
131
  setClickColorIndex(-1);
131
132
  onChange === null || onChange === void 0 ? void 0 : onChange('', formatArr);
132
133
  };
@@ -165,11 +166,11 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
165
166
  var handleTypeChange = function handleTypeChange(selectValue) {
166
167
  var _a, _b, _c;
167
168
  setCurrentColorType(selectValue);
169
+ var colorStr = (_a = (0, _find.default)(colTypeArr).call(colTypeArr, function (item) {
170
+ return item.type === selectValue;
171
+ })) === null || _a === void 0 ? void 0 : _a.value;
172
+ setCorrectColorValue((0, _colorFormat.colorFormat)(colorStr, 1, selectValue, true));
168
173
  if (inputCorrectColorValue) {
169
- var colorStr = (_a = (0, _find.default)(colTypeArr).call(colTypeArr, function (item) {
170
- return item.type === selectValue;
171
- })) === null || _a === void 0 ? void 0 : _a.value;
172
- setCorrectColorValue((0, _colorFormat.colorFormat)(colorStr, 1, selectValue, true));
173
174
  setInputColorValue((_b = (0, _find.default)(colTypeArr).call(colTypeArr, function (item) {
174
175
  return item.type === format;
175
176
  })) === null || _b === void 0 ? void 0 : _b.value);
@@ -249,7 +250,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
249
250
  } else {
250
251
  if (!inputCorrectColorValue) {
251
252
  var _formatArr = (0, _colorFormat.colorFormat)(correctColor, 1, 'all', true);
252
- setPanelState(_formatArr, (0, _removeTransparency.removeTransparency)(correctColor, currentColorType), correctColor, 1, '100%');
253
+ setPanelState(_formatArr, (0, _removeTransparency.removeTransparency)(correctColor, currentColorType), (0, _removeTransparency.removeTransparency)(correctColor, format), 1, '100%');
253
254
  onChange === null || onChange === void 0 ? void 0 : onChange((_b = (0, _find.default)(_formatArr).call(_formatArr, function (item) {
254
255
  return item.type === format;
255
256
  })) === null || _b === void 0 ? void 0 : _b.value, _formatArr);
@@ -228,7 +228,7 @@ var InternalColorPicker = function InternalColorPicker(props, ref) {
228
228
  var _classNames2;
229
229
  var afterIconContainerCls = (0, _classnames.default)("".concat(colorPickerPrefixCls, "-icon"), (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, "".concat(colorPickerPrefixCls, "-icon-underline"), borderType === 'underline'), (0, _defineProperty2.default)(_classNames2, "".concat(colorPickerPrefixCls, "-icon-bordered"), borderType === 'bordered'), _classNames2));
230
230
  var getBgc = function getBgc() {
231
- return inputCorrectColorValue ? colTypeArr[2].value : (0, _removeTransparency.removeTransparency)(colTypeArr[2].value, currentColorType);
231
+ return inputCorrectColorValue ? colTypeArr[2].value : (0, _removeTransparency.removeTransparency)(colTypeArr[2].value, 'RGB');
232
232
  };
233
233
  var noneLineCls = "".concat(colorPickerPrefixCls, "-icon-no-color-line");
234
234
  return _react.default.createElement("div", {
@@ -239,7 +239,7 @@ var InternalColorPicker = function InternalColorPicker(props, ref) {
239
239
  }, !(0, _validateColor.validateColor)(value) && !inputCorrectColorValue && _react.default.createElement("div", {
240
240
  className: noneLineCls
241
241
  }));
242
- }, [borderType, colTypeArr, colorPickerPrefixCls, currentColorType, inputCorrectColorValue, value]);
242
+ }, [borderType, colTypeArr, colorPickerPrefixCls, inputCorrectColorValue, value]);
243
243
  var colorInputEle = _react.default.createElement("div", {
244
244
  className: containerCls,
245
245
  ref: inputRef,
@@ -181,6 +181,10 @@
181
181
  }
182
182
  .kd-color-picker-pop.bottomLeft.hidden,
183
183
  .kd-color-picker-pop.bottomRight.hidden {
184
+ opacity: 0;
185
+ visibility: hidden;
186
+ -webkit-transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
187
+ transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
184
188
  -webkit-animation-name: kdSlideUpOut;
185
189
  animation-name: kdSlideUpOut;
186
190
  }
@@ -382,6 +386,8 @@
382
386
  }
383
387
  .kd-color-picker-pop .kd-color-picker-panel-container-select .kd-select .kd-select,
384
388
  .kd-color-picker-pop .kd-color-picker-panel-container-select .kd-select .kd-select-selection-item {
389
+ min-height: unset;
390
+ line-height: unset;
385
391
  overflow: visible;
386
392
  text-overflow: unset;
387
393
  }
@@ -80,6 +80,9 @@
80
80
 
81
81
  &.bottomLeft.hidden,
82
82
  &.bottomRight.hidden {
83
+ opacity: 0;
84
+ visibility: hidden;
85
+ transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
83
86
  animation-name: kdSlideUpOut;
84
87
  }
85
88
 
@@ -309,6 +312,8 @@
309
312
 
310
313
  .@{kd-prefix}-select,
311
314
  .@{kd-prefix}-select-selection-item {
315
+ min-height: unset;
316
+ line-height: unset;
312
317
  overflow: visible;
313
318
  text-overflow: unset;
314
319
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.8.23",
3
+ "version": "1.8.25",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [