@kdcloudjs/kdesign 1.7.51 → 1.7.52

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.
@@ -10,7 +10,7 @@ import { colorFormat, valOfCorrespondingType, strFixed, getColorObj, highlightPr
10
10
  import { defaultSystemColor } from './constant/defaultColor';
11
11
  import { validateColor } from './utils/validateColor';
12
12
  import { toLowerCase } from './utils/convertLetters';
13
- import Color from 'color-ie';
13
+ import Color from 'color';
14
14
  import { ChromePicker } from 'react-color';
15
15
  import devWarning from '../_utils/devwarning';
16
16
  import { useOnClickOutside } from '../_utils/hooks';
@@ -11,7 +11,7 @@ import ColorPickerPanel from './color-picker-panel';
11
11
  import { colorFormat, strFixed, getColorObj, valOfCorrespondingType, highlightPresetColorIndex, presetColorToHEX } from './utils/colorFormat';
12
12
  import { toLowerCase } from './utils/convertLetters';
13
13
  import { defaultSystemColor } from './constant/defaultColor';
14
- import Color from 'color-ie';
14
+ import Color from 'color';
15
15
  import { getCompProps } from '../_utils';
16
16
  import usePopper from '../_utils/usePopper';
17
17
  import { systemPresetColor } from './constant/systemPresetColor';
@@ -1,7 +1,7 @@
1
1
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
2
2
  import _findIndexInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find-index";
3
3
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
4
- import Color from 'color-ie';
4
+ import Color from 'color';
5
5
  import { validateColor } from './validateColor';
6
6
  import { toLowerCase } from './convertLetters';
7
7
  export var colorFormat = function colorFormat(colorStr) {
@@ -19,7 +19,7 @@ var _colorFormat = require("./utils/colorFormat");
19
19
  var _defaultColor = require("./constant/defaultColor");
20
20
  var _validateColor = require("./utils/validateColor");
21
21
  var _convertLetters = require("./utils/convertLetters");
22
- var _colorIe = _interopRequireDefault(require("color-ie"));
22
+ var _color = _interopRequireDefault(require("color"));
23
23
  var _reactColor = require("react-color");
24
24
  var _devwarning = _interopRequireDefault(require("../_utils/devwarning"));
25
25
  var _hooks = require("../_utils/hooks");
@@ -152,7 +152,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
152
152
  setIsFollow(switchValue);
153
153
  if (switchValue) {
154
154
  formatArr = (0, _colorFormat.colorFormat)(functionalColor, alpha);
155
- setPanelState(formatArr, formatArr[(0, _colorFormat.valOfCorrespondingType)(currentColorType)].value, functionalColorName, (0, _colorFormat.strFixed)((0, _colorIe.default)((0, _colorFormat.getColorObj)(functionalColor)).alpha(), 2), (0, _colorFormat.strFixed)((0, _colorIe.default)((0, _colorFormat.getColorObj)(functionalColor)).alpha(), 2) * 100 + '%');
155
+ setPanelState(formatArr, formatArr[(0, _colorFormat.valOfCorrespondingType)(currentColorType)].value, functionalColorName, (0, _colorFormat.strFixed)((0, _color.default)((0, _colorFormat.getColorObj)(functionalColor)).alpha(), 2), (0, _colorFormat.strFixed)((0, _color.default)((0, _colorFormat.getColorObj)(functionalColor)).alpha(), 2) * 100 + '%');
156
156
  setClickedColorIndex((0, _colorFormat.highlightPresetColorIndex)(formatArr[0].value, (0, _colorFormat.presetColorToHEX)(presetColor || _systemPresetColor.systemPresetColor)));
157
157
  } else {
158
158
  formatArr = (0, _colorFormat.colorFormat)(_defaultColor.defaultSystemColor, 1, 'all', true);
@@ -21,7 +21,7 @@ var _colorPickerPanel = _interopRequireDefault(require("./color-picker-panel"));
21
21
  var _colorFormat = require("./utils/colorFormat");
22
22
  var _convertLetters = require("./utils/convertLetters");
23
23
  var _defaultColor = require("./constant/defaultColor");
24
- var _colorIe = _interopRequireDefault(require("color-ie"));
24
+ var _color = _interopRequireDefault(require("color"));
25
25
  var _utils = require("../_utils");
26
26
  var _usePopper = _interopRequireDefault(require("../_utils/usePopper"));
27
27
  var _systemPresetColor = require("./constant/systemPresetColor");
@@ -105,8 +105,8 @@ var ColorPicker = function ColorPicker(props) {
105
105
  setAlphaNoVerifyVal(alphaStr);
106
106
  };
107
107
  if (inputValType) {
108
- var formatArr = (0, _colorFormat.colorFormat)(inpValue, (0, _colorFormat.strFixed)((0, _colorIe.default)((0, _colorFormat.getColorObj)(inpValue)).alpha(), 2));
109
- setState(formatArr, formatArr[(0, _colorFormat.valOfCorrespondingType)(currentColorType)].value, (0, _colorIe.default)((0, _colorFormat.getColorObj)(inpValue)).alpha(), ((0, _colorFormat.strFixed)((0, _colorIe.default)((0, _colorFormat.getColorObj)(inpValue)).alpha(), 2) * 100).toFixed() + '%');
108
+ var formatArr = (0, _colorFormat.colorFormat)(inpValue, (0, _colorFormat.strFixed)((0, _color.default)((0, _colorFormat.getColorObj)(inpValue)).alpha(), 2));
109
+ setState(formatArr, formatArr[(0, _colorFormat.valOfCorrespondingType)(currentColorType)].value, (0, _color.default)((0, _colorFormat.getColorObj)(inpValue)).alpha(), ((0, _colorFormat.strFixed)((0, _color.default)((0, _colorFormat.getColorObj)(inpValue)).alpha(), 2) * 100).toFixed() + '%');
110
110
  setClickedColorIndex((0, _colorFormat.highlightPresetColorIndex)(formatArr[0].value, (0, _colorFormat.presetColorToHEX)(presetColor || _systemPresetColor.systemPresetColor)));
111
111
  } else {
112
112
  var _formatArr = (0, _colorFormat.colorFormat)(_defaultColor.defaultSystemColor);
@@ -8,14 +8,14 @@ exports.valOfCorrespondingType = exports.strFixed = exports.presetColorToHEX = e
8
8
  var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
9
9
  var _findIndex = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find-index"));
10
10
  var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
11
- var _colorIe = _interopRequireDefault(require("color-ie"));
11
+ var _color = _interopRequireDefault(require("color"));
12
12
  var _validateColor = require("./validateColor");
13
13
  var _convertLetters = require("./convertLetters");
14
14
  var colorFormat = function colorFormat(colorStr) {
15
15
  var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
16
16
  var outType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'all';
17
17
  var formatHex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
18
- var ColorTools = (0, _colorIe.default)(getColorObj(colorStr)).alpha(alpha);
18
+ var ColorTools = (0, _color.default)(getColorObj(colorStr)).alpha(alpha);
19
19
  var toHex = function toHex() {
20
20
  if (/^#([0-9a-fA-F]{8})$/.test(colorStr)) {
21
21
  if (formatHex) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.7.51",
3
+ "version": "1.7.52",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [
@@ -85,7 +85,7 @@
85
85
  "axios": "^0.21.1",
86
86
  "big.js": "^6.0.2",
87
87
  "classnames": "^2.2.6",
88
- "color-ie": "^4.2.5",
88
+ "color": "^4.2.3",
89
89
  "copy-to-clipboard": "^3.3.1",
90
90
  "cropperjs": "^1.5.12",
91
91
  "css-vars-ponyfill": "^2.4.8",