sun-card-design 1.1.3 → 1.1.11

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 (56) hide show
  1. package/dist/mobile/sun-card-design-mobile.es32.js +2 -2
  2. package/dist/mobile/sun-card-design-mobile.es33.js +2 -2
  3. package/dist/mobile/sun-card-design-mobile.es34.js +2 -2
  4. package/dist/mobile/sun-card-design-mobile.es35.js +2 -2
  5. package/dist/mobile/sun-card-design-mobile.es36.js +2 -2
  6. package/dist/mobile/sun-card-design-mobile.es37.js +2 -2
  7. package/dist/mobile/sun-card-design-mobile.es38.js +2 -2
  8. package/dist/mobile/sun-card-design-mobile.es49.js +1 -1
  9. package/dist/mobile/sun-card-design-mobile.es68.js +2 -2
  10. package/dist/mobile/sun-card-design-mobile.es70.js +2 -2
  11. package/dist/mobile/sun-card-design-mobile.es72.js +4 -4
  12. package/dist/mobile/sun-card-design-mobile.es73.js +12 -31
  13. package/dist/mobile/sun-card-design-mobile.es74.js +173 -2
  14. package/dist/mobile/sun-card-design-mobile.es75.js +35 -139
  15. package/dist/mobile/sun-card-design-mobile.es76.js +2 -2
  16. package/dist/mobile/sun-card-design-mobile.es77.js +146 -2
  17. package/dist/mobile/sun-card-design-mobile.es78.js +2 -2
  18. package/dist/mobile/sun-card-design-mobile.es79.js +2 -2
  19. package/dist/mobile/sun-card-design-mobile.es80.js +2 -2
  20. package/dist/mobile/sun-card-design-mobile.es81.js +2 -2
  21. package/dist/mobile/sun-card-design-mobile.es82.js +2 -2
  22. package/dist/mobile/sun-card-design-mobile.es83.js +2 -2
  23. package/dist/mobile/sun-card-design-mobile.es84.js +2 -175
  24. package/dist/mobile/sun-card-design-mobile.es85.js +2 -10
  25. package/dist/mobile/sun-card-design-mobile.es86.js +133 -94
  26. package/dist/mobile/sun-card-design-mobile.es87.js +110 -12
  27. package/dist/mobile/sun-card-design-mobile.es88.js +150 -145
  28. package/dist/mobile/sun-card-design-mobile.es89.js +36 -99
  29. package/dist/pc/sun-card-design-pc.es32.js +2 -2
  30. package/dist/pc/sun-card-design-pc.es33.js +2 -2
  31. package/dist/pc/sun-card-design-pc.es34.js +2 -2
  32. package/dist/pc/sun-card-design-pc.es35.js +2 -2
  33. package/dist/pc/sun-card-design-pc.es36.js +2 -2
  34. package/dist/pc/sun-card-design-pc.es37.js +2 -2
  35. package/dist/pc/sun-card-design-pc.es38.js +2 -2
  36. package/dist/pc/sun-card-design-pc.es68.js +2 -2
  37. package/dist/pc/sun-card-design-pc.es70.js +2 -2
  38. package/dist/pc/sun-card-design-pc.es72.js +4 -4
  39. package/dist/pc/sun-card-design-pc.es73.js +12 -31
  40. package/dist/pc/sun-card-design-pc.es74.js +2 -175
  41. package/dist/pc/sun-card-design-pc.es75.js +145 -9
  42. package/dist/pc/sun-card-design-pc.es76.js +2 -107
  43. package/dist/pc/sun-card-design-pc.es77.js +2 -2
  44. package/dist/pc/sun-card-design-pc.es78.js +2 -146
  45. package/dist/pc/sun-card-design-pc.es79.js +2 -2
  46. package/dist/pc/sun-card-design-pc.es80.js +2 -2
  47. package/dist/pc/sun-card-design-pc.es81.js +2 -2
  48. package/dist/pc/sun-card-design-pc.es82.js +2 -2
  49. package/dist/pc/sun-card-design-pc.es83.js +2 -2
  50. package/dist/pc/sun-card-design-pc.es84.js +173 -2
  51. package/dist/pc/sun-card-design-pc.es85.js +42 -2
  52. package/dist/pc/sun-card-design-pc.es86.js +146 -2
  53. package/dist/pc/sun-card-design-pc.es87.js +110 -12
  54. package/dist/pc/sun-card-design-pc.es88.js +150 -145
  55. package/dist/pc/sun-card-design-pc.es89.js +36 -99
  56. package/package.json +4 -3
@@ -1,112 +1,49 @@
1
- import { bound01, pad2 } from "./sun-card-design-mobile.es91.js";
2
- function rgbToRgb(r, g, b) {
3
- return {
4
- r: bound01(r, 255) * 255,
5
- g: bound01(g, 255) * 255,
6
- b: bound01(b, 255) * 255
7
- };
8
- }
9
- function hue2rgb(p, q, t) {
10
- if (t < 0) {
11
- t += 1;
12
- }
13
- if (t > 1) {
14
- t -= 1;
1
+ function bound01(n, max) {
2
+ if (isOnePointZero(n)) {
3
+ n = "100%";
15
4
  }
16
- if (t < 1 / 6) {
17
- return p + (q - p) * (6 * t);
5
+ var isPercent = isPercentage(n);
6
+ n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
7
+ if (isPercent) {
8
+ n = parseInt(String(n * max), 10) / 100;
18
9
  }
19
- if (t < 1 / 2) {
20
- return q;
10
+ if (Math.abs(n - max) < 1e-6) {
11
+ return 1;
21
12
  }
22
- if (t < 2 / 3) {
23
- return p + (q - p) * (2 / 3 - t) * 6;
24
- }
25
- return p;
26
- }
27
- function hslToRgb(h, s, l) {
28
- var r;
29
- var g;
30
- var b;
31
- h = bound01(h, 360);
32
- s = bound01(s, 100);
33
- l = bound01(l, 100);
34
- if (s === 0) {
35
- g = l;
36
- b = l;
37
- r = l;
13
+ if (max === 360) {
14
+ n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
38
15
  } else {
39
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
40
- var p = 2 * l - q;
41
- r = hue2rgb(p, q, h + 1 / 3);
42
- g = hue2rgb(p, q, h);
43
- b = hue2rgb(p, q, h - 1 / 3);
16
+ n = n % max / parseFloat(String(max));
44
17
  }
45
- return { r: r * 255, g: g * 255, b: b * 255 };
18
+ return n;
46
19
  }
47
- function rgbToHsv(r, g, b) {
48
- r = bound01(r, 255);
49
- g = bound01(g, 255);
50
- b = bound01(b, 255);
51
- var max = Math.max(r, g, b);
52
- var min = Math.min(r, g, b);
53
- var h = 0;
54
- var v = max;
55
- var d = max - min;
56
- var s = max === 0 ? 0 : d / max;
57
- if (max === min) {
58
- h = 0;
59
- } else {
60
- switch (max) {
61
- case r:
62
- h = (g - b) / d + (g < b ? 6 : 0);
63
- break;
64
- case g:
65
- h = (b - r) / d + 2;
66
- break;
67
- case b:
68
- h = (r - g) / d + 4;
69
- break;
70
- }
71
- h /= 6;
72
- }
73
- return { h, s, v };
20
+ function isOnePointZero(n) {
21
+ return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
74
22
  }
75
- function hsvToRgb(h, s, v) {
76
- h = bound01(h, 360) * 6;
77
- s = bound01(s, 100);
78
- v = bound01(v, 100);
79
- var i = Math.floor(h);
80
- var f = h - i;
81
- var p = v * (1 - s);
82
- var q = v * (1 - f * s);
83
- var t = v * (1 - (1 - f) * s);
84
- var mod = i % 6;
85
- var r = [v, q, p, p, t, v][mod];
86
- var g = [t, v, v, q, p, p][mod];
87
- var b = [p, p, t, v, v, q][mod];
88
- return { r: r * 255, g: g * 255, b: b * 255 };
23
+ function isPercentage(n) {
24
+ return typeof n === "string" && n.indexOf("%") !== -1;
89
25
  }
90
- function rgbToHex(r, g, b, allow3Char) {
91
- var hex = [
92
- pad2(Math.round(r).toString(16)),
93
- pad2(Math.round(g).toString(16)),
94
- pad2(Math.round(b).toString(16))
95
- ];
96
- return hex.join("");
26
+ function boundAlpha(a) {
27
+ a = parseFloat(a);
28
+ if (isNaN(a) || a < 0 || a > 1) {
29
+ a = 1;
30
+ }
31
+ return a;
97
32
  }
98
- function convertHexToDecimal(h) {
99
- return parseIntFromHex(h) / 255;
33
+ function convertToPercentage(n) {
34
+ if (n <= 1) {
35
+ return "".concat(Number(n) * 100, "%");
36
+ }
37
+ return n;
100
38
  }
101
- function parseIntFromHex(val) {
102
- return parseInt(val, 16);
39
+ function pad2(c) {
40
+ return c.length === 1 ? "0" + c : String(c);
103
41
  }
104
42
  export {
105
- convertHexToDecimal,
106
- hslToRgb,
107
- hsvToRgb,
108
- parseIntFromHex,
109
- rgbToHex,
110
- rgbToHsv,
111
- rgbToRgb
43
+ bound01,
44
+ boundAlpha,
45
+ convertToPercentage,
46
+ isOnePointZero,
47
+ isPercentage,
48
+ pad2
112
49
  };
@@ -1,6 +1,6 @@
1
1
  import { createVNode } from "vue";
2
- import EditOutlined$1 from "./sun-card-design-pc.es84.js";
3
- import Icon from "./sun-card-design-pc.es78.js";
2
+ import EditOutlined$1 from "./sun-card-design-pc.es81.js";
3
+ import Icon from "./sun-card-design-pc.es75.js";
4
4
  function _objectSpread(target) {
5
5
  for (var i = 1; i < arguments.length; i++) {
6
6
  var source = arguments[i] != null ? Object(arguments[i]) : {};
@@ -1,6 +1,6 @@
1
1
  import { createVNode } from "vue";
2
- import DeleteOutlined$1 from "./sun-card-design-pc.es82.js";
3
- import Icon from "./sun-card-design-pc.es78.js";
2
+ import DeleteOutlined$1 from "./sun-card-design-pc.es79.js";
3
+ import Icon from "./sun-card-design-pc.es75.js";
4
4
  function _objectSpread(target) {
5
5
  for (var i = 1; i < arguments.length; i++) {
6
6
  var source = arguments[i] != null ? Object(arguments[i]) : {};
@@ -1,6 +1,6 @@
1
1
  import { createVNode } from "vue";
2
- import CloseOutlined$1 from "./sun-card-design-pc.es81.js";
3
- import Icon from "./sun-card-design-pc.es78.js";
2
+ import CloseOutlined$1 from "./sun-card-design-pc.es78.js";
3
+ import Icon from "./sun-card-design-pc.es75.js";
4
4
  function _objectSpread(target) {
5
5
  for (var i = 1; i < arguments.length; i++) {
6
6
  var source = arguments[i] != null ? Object(arguments[i]) : {};
@@ -1,6 +1,6 @@
1
1
  import { createVNode } from "vue";
2
- import CheckOutlined$1 from "./sun-card-design-pc.es77.js";
3
- import Icon from "./sun-card-design-pc.es78.js";
2
+ import CheckOutlined$1 from "./sun-card-design-pc.es74.js";
3
+ import Icon from "./sun-card-design-pc.es75.js";
4
4
  function _objectSpread(target) {
5
5
  for (var i = 1; i < arguments.length; i++) {
6
6
  var source = arguments[i] != null ? Object(arguments[i]) : {};
@@ -1,6 +1,6 @@
1
1
  import { createVNode } from "vue";
2
- import ClearOutlined$1 from "./sun-card-design-pc.es79.js";
3
- import Icon from "./sun-card-design-pc.es78.js";
2
+ import ClearOutlined$1 from "./sun-card-design-pc.es76.js";
3
+ import Icon from "./sun-card-design-pc.es75.js";
4
4
  function _objectSpread(target) {
5
5
  for (var i = 1; i < arguments.length; i++) {
6
6
  var source = arguments[i] != null ? Object(arguments[i]) : {};
@@ -1,6 +1,6 @@
1
1
  import { createVNode } from "vue";
2
- import DownloadOutlined$1 from "./sun-card-design-pc.es83.js";
3
- import Icon from "./sun-card-design-pc.es78.js";
2
+ import DownloadOutlined$1 from "./sun-card-design-pc.es80.js";
3
+ import Icon from "./sun-card-design-pc.es75.js";
4
4
  function _objectSpread(target) {
5
5
  for (var i = 1; i < arguments.length; i++) {
6
6
  var source = arguments[i] != null ? Object(arguments[i]) : {};
@@ -1,6 +1,6 @@
1
1
  import { createVNode } from "vue";
2
- import SearchOutlined$1 from "./sun-card-design-pc.es85.js";
3
- import Icon from "./sun-card-design-pc.es78.js";
2
+ import SearchOutlined$1 from "./sun-card-design-pc.es82.js";
3
+ import Icon from "./sun-card-design-pc.es75.js";
4
4
  function _objectSpread(target) {
5
5
  for (var i = 1; i < arguments.length; i++) {
6
6
  var source = arguments[i] != null ? Object(arguments[i]) : {};
@@ -1,6 +1,6 @@
1
1
  import { createVNode } from "vue";
2
- import CloseCircleFilled$1 from "./sun-card-design-pc.es80.js";
3
- import Icon from "./sun-card-design-pc.es78.js";
2
+ import CloseCircleFilled$1 from "./sun-card-design-pc.es77.js";
3
+ import Icon from "./sun-card-design-pc.es75.js";
4
4
  function _objectSpread(target) {
5
5
  for (var i = 1; i < arguments.length; i++) {
6
6
  var source = arguments[i] != null ? Object(arguments[i]) : {};
@@ -1,6 +1,6 @@
1
1
  import { createVNode } from "vue";
2
- import UploadOutlined$1 from "./sun-card-design-pc.es86.js";
3
- import Icon from "./sun-card-design-pc.es78.js";
2
+ import UploadOutlined$1 from "./sun-card-design-pc.es83.js";
3
+ import Icon from "./sun-card-design-pc.es75.js";
4
4
  function _objectSpread(target) {
5
5
  for (var i = 1; i < arguments.length; i++) {
6
6
  var source = arguments[i] != null ? Object(arguments[i]) : {};
@@ -1,5 +1,4 @@
1
- import { getSecondaryColor, warning, isIconDefinition, generate } from "./sun-card-design-pc.es73.js";
2
- import { reactive } from "vue";
1
+ import { getSecondaryColor, useInsertStyles, warning, isIconDefinition, generate } from "./sun-card-design-pc.es73.js";
3
2
  var _excluded = ["icon", "primaryColor", "secondaryColor"];
4
3
  function _objectWithoutProperties(source, excluded) {
5
4
  if (source == null) return {};
@@ -51,11 +50,11 @@ function _defineProperty(obj, key, value) {
51
50
  }
52
51
  return obj;
53
52
  }
54
- var twoToneColorPalette = reactive({
53
+ var twoToneColorPalette = {
55
54
  primaryColor: "#333",
56
55
  secondaryColor: "#E6E6E6",
57
56
  calculated: false
58
- });
57
+ };
59
58
  function setTwoToneColors(_ref) {
60
59
  var primaryColor = _ref.primaryColor, secondaryColor = _ref.secondaryColor;
61
60
  twoToneColorPalette.primaryColor = primaryColor;
@@ -74,6 +73,7 @@ var IconBase = function IconBase2(props, context) {
74
73
  secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
75
74
  };
76
75
  }
76
+ useInsertStyles();
77
77
  warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
78
78
  if (!isIconDefinition(icon)) {
79
79
  return null;
@@ -1,7 +1,6 @@
1
- import { h, getCurrentInstance, nextTick } from "vue";
2
- import { generate as generate$1 } from "./sun-card-design-pc.es74.js";
3
- import { useInjectIconContext } from "./sun-card-design-pc.es75.js";
4
- import { canUseDom, updateCSS } from "./sun-card-design-pc.es76.js";
1
+ import { nextTick, h } from "vue";
2
+ import { generate as generate$1 } from "./sun-card-design-pc.es84.js";
3
+ import insertCss from "./sun-card-design-pc.es85.js";
5
4
  function _objectSpread(target) {
6
5
  for (var i = 1; i < arguments.length; i++) {
7
6
  var source = arguments[i] != null ? Object(arguments[i]) : {};
@@ -60,36 +59,18 @@ function normalizeTwoToneColors(twoToneColor) {
60
59
  return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
61
60
  }
62
61
  var iconStyles = "\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
63
- function getRoot(ele) {
64
- return ele && ele.getRootNode && ele.getRootNode();
65
- }
66
- function inShadow(ele) {
67
- if (!canUseDom()) {
68
- return false;
69
- }
70
- return getRoot(ele) instanceof ShadowRoot;
71
- }
72
- function getShadowRoot(ele) {
73
- return inShadow(ele) ? getRoot(ele) : null;
74
- }
62
+ var cssInjectedFlag = false;
75
63
  var useInsertStyles = function useInsertStyles2() {
76
- var _useInjectIconContext = useInjectIconContext(), prefixCls = _useInjectIconContext.prefixCls, csp = _useInjectIconContext.csp;
77
- var instance = getCurrentInstance();
78
- var mergedStyleStr = iconStyles;
79
- if (prefixCls) {
80
- mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls.value);
81
- }
64
+ var styleStr = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : iconStyles;
82
65
  nextTick(function() {
83
- if (!canUseDom()) {
84
- return;
66
+ if (!cssInjectedFlag) {
67
+ if (typeof window !== "undefined" && window.document && window.document.documentElement) {
68
+ insertCss(styleStr, {
69
+ prepend: true
70
+ });
71
+ }
72
+ cssInjectedFlag = true;
85
73
  }
86
- var ele = instance.vnode.el;
87
- var shadowRoot = getShadowRoot(ele);
88
- updateCSS(mergedStyleStr, "@ant-design-vue-icons", {
89
- prepend: true,
90
- csp: csp.value,
91
- attachTo: shadowRoot
92
- });
93
74
  });
94
75
  };
95
76
  export {
@@ -1,177 +1,4 @@
1
- import { inputToRGB } from "./sun-card-design-pc.es88.js";
2
- import { rgbToHsv, rgbToHex } from "./sun-card-design-pc.es89.js";
3
- var hueStep = 2;
4
- var saturationStep = 0.16;
5
- var saturationStep2 = 0.05;
6
- var brightnessStep1 = 0.05;
7
- var brightnessStep2 = 0.15;
8
- var lightColorCount = 5;
9
- var darkColorCount = 4;
10
- var darkColorMap = [{
11
- index: 7,
12
- opacity: 0.15
13
- }, {
14
- index: 6,
15
- opacity: 0.25
16
- }, {
17
- index: 5,
18
- opacity: 0.3
19
- }, {
20
- index: 5,
21
- opacity: 0.45
22
- }, {
23
- index: 5,
24
- opacity: 0.65
25
- }, {
26
- index: 5,
27
- opacity: 0.85
28
- }, {
29
- index: 4,
30
- opacity: 0.9
31
- }, {
32
- index: 3,
33
- opacity: 0.95
34
- }, {
35
- index: 2,
36
- opacity: 0.97
37
- }, {
38
- index: 1,
39
- opacity: 0.98
40
- }];
41
- function toHsv(_ref) {
42
- var r = _ref.r, g = _ref.g, b = _ref.b;
43
- var hsv = rgbToHsv(r, g, b);
44
- return {
45
- h: hsv.h * 360,
46
- s: hsv.s,
47
- v: hsv.v
48
- };
49
- }
50
- function toHex(_ref2) {
51
- var r = _ref2.r, g = _ref2.g, b = _ref2.b;
52
- return "#".concat(rgbToHex(r, g, b));
53
- }
54
- function mix(rgb1, rgb2, amount) {
55
- var p = amount / 100;
56
- var rgb = {
57
- r: (rgb2.r - rgb1.r) * p + rgb1.r,
58
- g: (rgb2.g - rgb1.g) * p + rgb1.g,
59
- b: (rgb2.b - rgb1.b) * p + rgb1.b
60
- };
61
- return rgb;
62
- }
63
- function getHue(hsv, i, light) {
64
- var hue;
65
- if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
66
- hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
67
- } else {
68
- hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
69
- }
70
- if (hue < 0) {
71
- hue += 360;
72
- } else if (hue >= 360) {
73
- hue -= 360;
74
- }
75
- return hue;
76
- }
77
- function getSaturation(hsv, i, light) {
78
- if (hsv.h === 0 && hsv.s === 0) {
79
- return hsv.s;
80
- }
81
- var saturation;
82
- if (light) {
83
- saturation = hsv.s - saturationStep * i;
84
- } else if (i === darkColorCount) {
85
- saturation = hsv.s + saturationStep;
86
- } else {
87
- saturation = hsv.s + saturationStep2 * i;
88
- }
89
- if (saturation > 1) {
90
- saturation = 1;
91
- }
92
- if (light && i === lightColorCount && saturation > 0.1) {
93
- saturation = 0.1;
94
- }
95
- if (saturation < 0.06) {
96
- saturation = 0.06;
97
- }
98
- return Number(saturation.toFixed(2));
99
- }
100
- function getValue(hsv, i, light) {
101
- var value;
102
- if (light) {
103
- value = hsv.v + brightnessStep1 * i;
104
- } else {
105
- value = hsv.v - brightnessStep2 * i;
106
- }
107
- if (value > 1) {
108
- value = 1;
109
- }
110
- return Number(value.toFixed(2));
111
- }
112
- function generate(color) {
113
- var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
114
- var patterns = [];
115
- var pColor = inputToRGB(color);
116
- for (var i = lightColorCount; i > 0; i -= 1) {
117
- var hsv = toHsv(pColor);
118
- var colorString = toHex(inputToRGB({
119
- h: getHue(hsv, i, true),
120
- s: getSaturation(hsv, i, true),
121
- v: getValue(hsv, i, true)
122
- }));
123
- patterns.push(colorString);
124
- }
125
- patterns.push(toHex(pColor));
126
- for (var _i = 1; _i <= darkColorCount; _i += 1) {
127
- var _hsv = toHsv(pColor);
128
- var _colorString = toHex(inputToRGB({
129
- h: getHue(_hsv, _i),
130
- s: getSaturation(_hsv, _i),
131
- v: getValue(_hsv, _i)
132
- }));
133
- patterns.push(_colorString);
134
- }
135
- if (opts.theme === "dark") {
136
- return darkColorMap.map(function(_ref3) {
137
- var index = _ref3.index, opacity = _ref3.opacity;
138
- var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || "#141414"), inputToRGB(patterns[index]), opacity * 100));
139
- return darkColorString;
140
- });
141
- }
142
- return patterns;
143
- }
144
- var presetPrimaryColors = {
145
- red: "#F5222D",
146
- volcano: "#FA541C",
147
- orange: "#FA8C16",
148
- gold: "#FAAD14",
149
- yellow: "#FADB14",
150
- lime: "#A0D911",
151
- green: "#52C41A",
152
- cyan: "#13C2C2",
153
- blue: "#1890FF",
154
- geekblue: "#2F54EB",
155
- purple: "#722ED1",
156
- magenta: "#EB2F96",
157
- grey: "#666666"
158
- };
159
- var presetPalettes = {};
160
- var presetDarkPalettes = {};
161
- Object.keys(presetPrimaryColors).forEach(function(key) {
162
- presetPalettes[key] = generate(presetPrimaryColors[key]);
163
- presetPalettes[key].primary = presetPalettes[key][5];
164
- presetDarkPalettes[key] = generate(presetPrimaryColors[key], {
165
- theme: "dark",
166
- backgroundColor: "#141414"
167
- });
168
- presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
169
- });
170
- var blue = presetPalettes.blue;
1
+ var CheckOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, "name": "check", "theme": "outlined" };
171
2
  export {
172
- blue,
173
- generate,
174
- presetDarkPalettes,
175
- presetPalettes,
176
- presetPrimaryColors
3
+ CheckOutlined as default
177
4
  };
@@ -1,12 +1,148 @@
1
- import { inject, ref } from "vue";
2
- var contextKey = Symbol("iconContext");
3
- var useInjectIconContext = function useInjectIconContext2() {
4
- return inject(contextKey, {
5
- prefixCls: ref("anticon"),
6
- rootClassName: ref(""),
7
- csp: ref()
8
- });
1
+ import { createVNode } from "vue";
2
+ import IconBase from "./sun-card-design-pc.es72.js";
3
+ import { setTwoToneColor, getTwoToneColor } from "./sun-card-design-pc.es71.js";
4
+ import { normalizeTwoToneColors } from "./sun-card-design-pc.es73.js";
5
+ var _excluded = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
6
+ function _slicedToArray(arr, i) {
7
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
8
+ }
9
+ function _nonIterableRest() {
10
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11
+ }
12
+ function _unsupportedIterableToArray(o, minLen) {
13
+ if (!o) return;
14
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
15
+ var n = Object.prototype.toString.call(o).slice(8, -1);
16
+ if (n === "Object" && o.constructor) n = o.constructor.name;
17
+ if (n === "Map" || n === "Set") return Array.from(o);
18
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
19
+ }
20
+ function _arrayLikeToArray(arr, len) {
21
+ if (len == null || len > arr.length) len = arr.length;
22
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
23
+ arr2[i] = arr[i];
24
+ }
25
+ return arr2;
26
+ }
27
+ function _iterableToArrayLimit(arr, i) {
28
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
29
+ if (_i == null) return;
30
+ var _arr = [];
31
+ var _n = true;
32
+ var _d = false;
33
+ var _s, _e;
34
+ try {
35
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
36
+ _arr.push(_s.value);
37
+ if (i && _arr.length === i) break;
38
+ }
39
+ } catch (err) {
40
+ _d = true;
41
+ _e = err;
42
+ } finally {
43
+ try {
44
+ if (!_n && _i["return"] != null) _i["return"]();
45
+ } finally {
46
+ if (_d) throw _e;
47
+ }
48
+ }
49
+ return _arr;
50
+ }
51
+ function _arrayWithHoles(arr) {
52
+ if (Array.isArray(arr)) return arr;
53
+ }
54
+ function _objectSpread(target) {
55
+ for (var i = 1; i < arguments.length; i++) {
56
+ var source = arguments[i] != null ? Object(arguments[i]) : {};
57
+ var ownKeys = Object.keys(source);
58
+ if (typeof Object.getOwnPropertySymbols === "function") {
59
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
60
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
61
+ }));
62
+ }
63
+ ownKeys.forEach(function(key) {
64
+ _defineProperty(target, key, source[key]);
65
+ });
66
+ }
67
+ return target;
68
+ }
69
+ function _defineProperty(obj, key, value) {
70
+ if (key in obj) {
71
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
72
+ } else {
73
+ obj[key] = value;
74
+ }
75
+ return obj;
76
+ }
77
+ function _objectWithoutProperties(source, excluded) {
78
+ if (source == null) return {};
79
+ var target = _objectWithoutPropertiesLoose(source, excluded);
80
+ var key, i;
81
+ if (Object.getOwnPropertySymbols) {
82
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
83
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
84
+ key = sourceSymbolKeys[i];
85
+ if (excluded.indexOf(key) >= 0) continue;
86
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
87
+ target[key] = source[key];
88
+ }
89
+ }
90
+ return target;
91
+ }
92
+ function _objectWithoutPropertiesLoose(source, excluded) {
93
+ if (source == null) return {};
94
+ var target = {};
95
+ var sourceKeys = Object.keys(source);
96
+ var key, i;
97
+ for (i = 0; i < sourceKeys.length; i++) {
98
+ key = sourceKeys[i];
99
+ if (excluded.indexOf(key) >= 0) continue;
100
+ target[key] = source[key];
101
+ }
102
+ return target;
103
+ }
104
+ setTwoToneColor("#1890ff");
105
+ var Icon = function Icon2(props, context) {
106
+ var _classObj;
107
+ var _props$context$attrs = _objectSpread({}, props, context.attrs), cls = _props$context$attrs["class"], icon = _props$context$attrs.icon, spin = _props$context$attrs.spin, rotate = _props$context$attrs.rotate, tabindex = _props$context$attrs.tabindex, twoToneColor = _props$context$attrs.twoToneColor, onClick = _props$context$attrs.onClick, restProps = _objectWithoutProperties(_props$context$attrs, _excluded);
108
+ var classObj = (_classObj = {
109
+ anticon: true
110
+ }, _defineProperty(_classObj, "anticon-".concat(icon.name), Boolean(icon.name)), _defineProperty(_classObj, cls, cls), _classObj);
111
+ var svgClassString = spin === "" || !!spin || icon.name === "loading" ? "anticon-spin" : "";
112
+ var iconTabIndex = tabindex;
113
+ if (iconTabIndex === void 0 && onClick) {
114
+ iconTabIndex = -1;
115
+ restProps.tabindex = iconTabIndex;
116
+ }
117
+ var svgStyle = rotate ? {
118
+ msTransform: "rotate(".concat(rotate, "deg)"),
119
+ transform: "rotate(".concat(rotate, "deg)")
120
+ } : void 0;
121
+ var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
122
+ return createVNode("span", _objectSpread({
123
+ "role": "img",
124
+ "aria-label": icon.name
125
+ }, restProps, {
126
+ "onClick": onClick,
127
+ "class": classObj
128
+ }), [createVNode(IconBase, {
129
+ "class": svgClassString,
130
+ "icon": icon,
131
+ "primaryColor": primaryColor,
132
+ "secondaryColor": secondaryColor,
133
+ "style": svgStyle
134
+ }, null)]);
9
135
  };
136
+ Icon.props = {
137
+ spin: Boolean,
138
+ rotate: Number,
139
+ icon: Object,
140
+ twoToneColor: String
141
+ };
142
+ Icon.displayName = "AntdIcon";
143
+ Icon.inheritAttrs = false;
144
+ Icon.getTwoToneColor = getTwoToneColor;
145
+ Icon.setTwoToneColor = setTwoToneColor;
10
146
  export {
11
- useInjectIconContext
147
+ Icon as default
12
148
  };