sun-card-design 1.1.11 → 1.1.12

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 (131) hide show
  1. package/dist/mobile/sun-card-design-mobile.es10.js +1 -1
  2. package/dist/mobile/sun-card-design-mobile.es11.js +1 -1
  3. package/dist/mobile/sun-card-design-mobile.es12.js +1 -1
  4. package/dist/mobile/sun-card-design-mobile.es13.js +3 -3
  5. package/dist/mobile/sun-card-design-mobile.es14.js +1 -1
  6. package/dist/mobile/sun-card-design-mobile.es15.js +1 -1
  7. package/dist/mobile/sun-card-design-mobile.es16.js +1 -1
  8. package/dist/mobile/sun-card-design-mobile.es17.js +1 -1
  9. package/dist/mobile/sun-card-design-mobile.es18.js +1 -1
  10. package/dist/mobile/sun-card-design-mobile.es19.js +1 -1
  11. package/dist/mobile/sun-card-design-mobile.es2.js +39 -23
  12. package/dist/mobile/sun-card-design-mobile.es20.js +1 -1
  13. package/dist/mobile/sun-card-design-mobile.es21.js +3 -3
  14. package/dist/mobile/sun-card-design-mobile.es22.js +1 -1
  15. package/dist/mobile/sun-card-design-mobile.es23.js +3 -3
  16. package/dist/mobile/sun-card-design-mobile.es24.js +1 -1
  17. package/dist/mobile/sun-card-design-mobile.es25.js +9 -3
  18. package/dist/mobile/sun-card-design-mobile.es27.js +54 -0
  19. package/dist/mobile/sun-card-design-mobile.es3.js +1 -1
  20. package/dist/mobile/sun-card-design-mobile.es33.js +2 -35
  21. package/dist/mobile/sun-card-design-mobile.es35.js +7 -34
  22. package/dist/mobile/sun-card-design-mobile.es38.js +120 -32
  23. package/dist/mobile/sun-card-design-mobile.es4.js +1 -1
  24. package/dist/mobile/{sun-card-design-mobile.es49.js → sun-card-design-mobile.es43.js} +3 -3
  25. package/dist/mobile/sun-card-design-mobile.es5.js +2 -8
  26. package/dist/mobile/{sun-card-design-mobile.es64.js → sun-card-design-mobile.es56.js} +2 -2
  27. package/dist/mobile/sun-card-design-mobile.es57.js +49 -0
  28. package/dist/mobile/sun-card-design-mobile.es6.js +2 -2
  29. package/dist/mobile/sun-card-design-mobile.es7.js +2 -2
  30. package/dist/mobile/sun-card-design-mobile.es8.js +1 -1
  31. package/dist/mobile/sun-card-design-mobile.es9.js +2 -2
  32. package/dist/pc/sun-card-design-pc.es10.js +1 -1
  33. package/dist/pc/sun-card-design-pc.es11.js +1 -1
  34. package/dist/pc/sun-card-design-pc.es12.js +1 -1
  35. package/dist/pc/sun-card-design-pc.es13.js +3 -3
  36. package/dist/pc/sun-card-design-pc.es14.js +1 -1
  37. package/dist/pc/sun-card-design-pc.es15.js +1 -1
  38. package/dist/pc/sun-card-design-pc.es16.js +1 -1
  39. package/dist/pc/sun-card-design-pc.es17.js +1 -1
  40. package/dist/pc/sun-card-design-pc.es18.js +1 -1
  41. package/dist/pc/sun-card-design-pc.es19.js +1 -1
  42. package/dist/pc/sun-card-design-pc.es2.js +33 -22
  43. package/dist/pc/sun-card-design-pc.es20.js +1 -1
  44. package/dist/pc/sun-card-design-pc.es21.js +3 -3
  45. package/dist/pc/sun-card-design-pc.es22.js +1 -1
  46. package/dist/pc/sun-card-design-pc.es23.js +3 -3
  47. package/dist/pc/sun-card-design-pc.es24.js +1 -1
  48. package/dist/pc/sun-card-design-pc.es25.js +9 -3
  49. package/dist/pc/sun-card-design-pc.es27.js +54 -0
  50. package/dist/pc/sun-card-design-pc.es3.js +1 -1
  51. package/dist/pc/sun-card-design-pc.es33.js +2 -35
  52. package/dist/pc/sun-card-design-pc.es35.js +7 -34
  53. package/dist/pc/sun-card-design-pc.es38.js +120 -32
  54. package/dist/pc/sun-card-design-pc.es4.js +1 -1
  55. package/dist/pc/{sun-card-design-pc.es49.js → sun-card-design-pc.es43.js} +3 -3
  56. package/dist/pc/sun-card-design-pc.es5.js +2 -8
  57. package/dist/pc/{sun-card-design-pc.es64.js → sun-card-design-pc.es56.js} +2 -2
  58. package/dist/pc/sun-card-design-pc.es57.js +49 -0
  59. package/dist/pc/sun-card-design-pc.es6.js +2 -2
  60. package/dist/pc/sun-card-design-pc.es7.js +2 -2
  61. package/dist/pc/sun-card-design-pc.es8.js +1 -1
  62. package/dist/pc/sun-card-design-pc.es9.js +2 -2
  63. package/dist/sun-card-design.css +1 -1
  64. package/package.json +47 -15
  65. package/dist/mobile/sun-card-design-mobile.es32.js +0 -37
  66. package/dist/mobile/sun-card-design-mobile.es34.js +0 -37
  67. package/dist/mobile/sun-card-design-mobile.es36.js +0 -37
  68. package/dist/mobile/sun-card-design-mobile.es37.js +0 -37
  69. package/dist/mobile/sun-card-design-mobile.es39.js +0 -4
  70. package/dist/mobile/sun-card-design-mobile.es41.js +0 -10
  71. package/dist/mobile/sun-card-design-mobile.es44.js +0 -125
  72. package/dist/mobile/sun-card-design-mobile.es58.js +0 -842
  73. package/dist/mobile/sun-card-design-mobile.es59.js +0 -139
  74. package/dist/mobile/sun-card-design-mobile.es67.js +0 -37
  75. package/dist/mobile/sun-card-design-mobile.es68.js +0 -37
  76. package/dist/mobile/sun-card-design-mobile.es70.js +0 -37
  77. package/dist/mobile/sun-card-design-mobile.es71.js +0 -68
  78. package/dist/mobile/sun-card-design-mobile.es72.js +0 -107
  79. package/dist/mobile/sun-card-design-mobile.es73.js +0 -85
  80. package/dist/mobile/sun-card-design-mobile.es74.js +0 -175
  81. package/dist/mobile/sun-card-design-mobile.es75.js +0 -44
  82. package/dist/mobile/sun-card-design-mobile.es76.js +0 -4
  83. package/dist/mobile/sun-card-design-mobile.es77.js +0 -148
  84. package/dist/mobile/sun-card-design-mobile.es78.js +0 -4
  85. package/dist/mobile/sun-card-design-mobile.es79.js +0 -4
  86. package/dist/mobile/sun-card-design-mobile.es80.js +0 -4
  87. package/dist/mobile/sun-card-design-mobile.es81.js +0 -4
  88. package/dist/mobile/sun-card-design-mobile.es82.js +0 -4
  89. package/dist/mobile/sun-card-design-mobile.es83.js +0 -4
  90. package/dist/mobile/sun-card-design-mobile.es84.js +0 -4
  91. package/dist/mobile/sun-card-design-mobile.es85.js +0 -4
  92. package/dist/mobile/sun-card-design-mobile.es86.js +0 -148
  93. package/dist/mobile/sun-card-design-mobile.es87.js +0 -112
  94. package/dist/mobile/sun-card-design-mobile.es88.js +0 -153
  95. package/dist/mobile/sun-card-design-mobile.es89.js +0 -49
  96. package/dist/mobile/sun-card-design-mobile.es90.js +0 -153
  97. package/dist/mobile/sun-card-design-mobile.es91.js +0 -49
  98. package/dist/pc/sun-card-design-pc.es32.js +0 -37
  99. package/dist/pc/sun-card-design-pc.es34.js +0 -37
  100. package/dist/pc/sun-card-design-pc.es36.js +0 -37
  101. package/dist/pc/sun-card-design-pc.es37.js +0 -37
  102. package/dist/pc/sun-card-design-pc.es39.js +0 -4
  103. package/dist/pc/sun-card-design-pc.es41.js +0 -10
  104. package/dist/pc/sun-card-design-pc.es44.js +0 -125
  105. package/dist/pc/sun-card-design-pc.es58.js +0 -842
  106. package/dist/pc/sun-card-design-pc.es59.js +0 -139
  107. package/dist/pc/sun-card-design-pc.es68.js +0 -37
  108. package/dist/pc/sun-card-design-pc.es70.js +0 -37
  109. package/dist/pc/sun-card-design-pc.es71.js +0 -68
  110. package/dist/pc/sun-card-design-pc.es72.js +0 -107
  111. package/dist/pc/sun-card-design-pc.es73.js +0 -85
  112. package/dist/pc/sun-card-design-pc.es74.js +0 -4
  113. package/dist/pc/sun-card-design-pc.es75.js +0 -148
  114. package/dist/pc/sun-card-design-pc.es76.js +0 -4
  115. package/dist/pc/sun-card-design-pc.es77.js +0 -4
  116. package/dist/pc/sun-card-design-pc.es78.js +0 -4
  117. package/dist/pc/sun-card-design-pc.es79.js +0 -4
  118. package/dist/pc/sun-card-design-pc.es80.js +0 -4
  119. package/dist/pc/sun-card-design-pc.es81.js +0 -4
  120. package/dist/pc/sun-card-design-pc.es82.js +0 -4
  121. package/dist/pc/sun-card-design-pc.es83.js +0 -4
  122. package/dist/pc/sun-card-design-pc.es84.js +0 -175
  123. package/dist/pc/sun-card-design-pc.es85.js +0 -44
  124. package/dist/pc/sun-card-design-pc.es86.js +0 -148
  125. package/dist/pc/sun-card-design-pc.es87.js +0 -112
  126. package/dist/pc/sun-card-design-pc.es88.js +0 -153
  127. package/dist/pc/sun-card-design-pc.es89.js +0 -49
  128. package/dist/pc/sun-card-design-pc.es90.js +0 -153
  129. package/dist/pc/sun-card-design-pc.es91.js +0 -49
  130. /package/dist/mobile/{sun-card-design-mobile.es28.js → sun-card-design-mobile.es29.js} +0 -0
  131. /package/dist/pc/{sun-card-design-pc.es28.js → sun-card-design-pc.es29.js} +0 -0
@@ -1,139 +0,0 @@
1
- import { Matrix4, Vector3, Object3D, Vector2 } from "three";
2
- class CSS2DObject extends Object3D {
3
- /**
4
- * Constructs a new CSS2D object.
5
- *
6
- * @param {DOMElement} [element] - The DOM element.
7
- */
8
- constructor(element = document.createElement("div")) {
9
- super();
10
- this.isCSS2DObject = true;
11
- this.element = element;
12
- this.element.style.position = "absolute";
13
- this.element.style.userSelect = "none";
14
- this.element.setAttribute("draggable", false);
15
- this.center = new Vector2(0.5, 0.5);
16
- this.addEventListener("removed", function() {
17
- this.traverse(function(object) {
18
- if (object.element instanceof object.element.ownerDocument.defaultView.Element && object.element.parentNode !== null) {
19
- object.element.remove();
20
- }
21
- });
22
- });
23
- }
24
- copy(source, recursive) {
25
- super.copy(source, recursive);
26
- this.element = source.element.cloneNode(true);
27
- this.center = source.center;
28
- return this;
29
- }
30
- }
31
- const _vector = new Vector3();
32
- const _viewMatrix = new Matrix4();
33
- const _viewProjectionMatrix = new Matrix4();
34
- const _a = new Vector3();
35
- const _b = new Vector3();
36
- class CSS2DRenderer {
37
- /**
38
- * Constructs a new CSS2D renderer.
39
- *
40
- * @param {CSS2DRenderer~Parameters} [parameters] - The parameters.
41
- */
42
- constructor(parameters = {}) {
43
- const _this = this;
44
- let _width, _height;
45
- let _widthHalf, _heightHalf;
46
- const cache = {
47
- objects: /* @__PURE__ */ new WeakMap()
48
- };
49
- const domElement = parameters.element !== void 0 ? parameters.element : document.createElement("div");
50
- domElement.style.overflow = "hidden";
51
- this.domElement = domElement;
52
- this.getSize = function() {
53
- return {
54
- width: _width,
55
- height: _height
56
- };
57
- };
58
- this.render = function(scene, camera) {
59
- if (scene.matrixWorldAutoUpdate === true) scene.updateMatrixWorld();
60
- if (camera.parent === null && camera.matrixWorldAutoUpdate === true) camera.updateMatrixWorld();
61
- _viewMatrix.copy(camera.matrixWorldInverse);
62
- _viewProjectionMatrix.multiplyMatrices(camera.projectionMatrix, _viewMatrix);
63
- renderObject(scene, scene, camera);
64
- zOrder(scene);
65
- };
66
- this.setSize = function(width, height) {
67
- _width = width;
68
- _height = height;
69
- _widthHalf = _width / 2;
70
- _heightHalf = _height / 2;
71
- domElement.style.width = width + "px";
72
- domElement.style.height = height + "px";
73
- };
74
- function hideObject(object) {
75
- if (object.isCSS2DObject) object.element.style.display = "none";
76
- for (let i = 0, l = object.children.length; i < l; i++) {
77
- hideObject(object.children[i]);
78
- }
79
- }
80
- function renderObject(object, scene, camera) {
81
- if (object.visible === false) {
82
- hideObject(object);
83
- return;
84
- }
85
- if (object.isCSS2DObject) {
86
- _vector.setFromMatrixPosition(object.matrixWorld);
87
- _vector.applyMatrix4(_viewProjectionMatrix);
88
- const visible = _vector.z >= -1 && _vector.z <= 1 && object.layers.test(camera.layers) === true;
89
- const element = object.element;
90
- element.style.display = visible === true ? "" : "none";
91
- if (visible === true) {
92
- object.onBeforeRender(_this, scene, camera);
93
- element.style.transform = "translate(" + -100 * object.center.x + "%," + -100 * object.center.y + "%)translate(" + (_vector.x * _widthHalf + _widthHalf) + "px," + (-_vector.y * _heightHalf + _heightHalf) + "px)";
94
- if (element.parentNode !== domElement) {
95
- domElement.appendChild(element);
96
- }
97
- object.onAfterRender(_this, scene, camera);
98
- }
99
- const objectData = {
100
- distanceToCameraSquared: getDistanceToSquared(camera, object)
101
- };
102
- cache.objects.set(object, objectData);
103
- }
104
- for (let i = 0, l = object.children.length; i < l; i++) {
105
- renderObject(object.children[i], scene, camera);
106
- }
107
- }
108
- function getDistanceToSquared(object1, object2) {
109
- _a.setFromMatrixPosition(object1.matrixWorld);
110
- _b.setFromMatrixPosition(object2.matrixWorld);
111
- return _a.distanceToSquared(_b);
112
- }
113
- function filterAndFlatten(scene) {
114
- const result = [];
115
- scene.traverseVisible(function(object) {
116
- if (object.isCSS2DObject) result.push(object);
117
- });
118
- return result;
119
- }
120
- function zOrder(scene) {
121
- const sorted = filterAndFlatten(scene).sort(function(a, b) {
122
- if (a.renderOrder !== b.renderOrder) {
123
- return b.renderOrder - a.renderOrder;
124
- }
125
- const distanceA = cache.objects.get(a).distanceToCameraSquared;
126
- const distanceB = cache.objects.get(b).distanceToCameraSquared;
127
- return distanceA - distanceB;
128
- });
129
- const zMax = sorted.length;
130
- for (let i = 0, l = sorted.length; i < l; i++) {
131
- sorted[i].element.style.zIndex = zMax - i;
132
- }
133
- }
134
- }
135
- }
136
- export {
137
- CSS2DObject,
138
- CSS2DRenderer
139
- };
@@ -1,37 +0,0 @@
1
- import { createVNode } from "vue";
2
- import CloseCircleFilled$1 from "./sun-card-design-mobile.es77.js";
3
- import Icon from "./sun-card-design-mobile.es75.js";
4
- function _objectSpread(target) {
5
- for (var i = 1; i < arguments.length; i++) {
6
- var source = arguments[i] != null ? Object(arguments[i]) : {};
7
- var ownKeys = Object.keys(source);
8
- if (typeof Object.getOwnPropertySymbols === "function") {
9
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
10
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
11
- }));
12
- }
13
- ownKeys.forEach(function(key) {
14
- _defineProperty(target, key, source[key]);
15
- });
16
- }
17
- return target;
18
- }
19
- function _defineProperty(obj, key, value) {
20
- if (key in obj) {
21
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
22
- } else {
23
- obj[key] = value;
24
- }
25
- return obj;
26
- }
27
- var CloseCircleFilled = function CloseCircleFilled2(props, context) {
28
- var p = _objectSpread({}, props, context.attrs);
29
- return createVNode(Icon, _objectSpread({}, p, {
30
- "icon": CloseCircleFilled$1
31
- }), null);
32
- };
33
- CloseCircleFilled.displayName = "CloseCircleFilled";
34
- CloseCircleFilled.inheritAttrs = false;
35
- export {
36
- CloseCircleFilled as default
37
- };
@@ -1,37 +0,0 @@
1
- import { createVNode } from "vue";
2
- import CloseCircleFilled$1 from "./sun-card-design-mobile.es79.js";
3
- import Icon from "./sun-card-design-mobile.es77.js";
4
- function _objectSpread(target) {
5
- for (var i = 1; i < arguments.length; i++) {
6
- var source = arguments[i] != null ? Object(arguments[i]) : {};
7
- var ownKeys = Object.keys(source);
8
- if (typeof Object.getOwnPropertySymbols === "function") {
9
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
10
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
11
- }));
12
- }
13
- ownKeys.forEach(function(key) {
14
- _defineProperty(target, key, source[key]);
15
- });
16
- }
17
- return target;
18
- }
19
- function _defineProperty(obj, key, value) {
20
- if (key in obj) {
21
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
22
- } else {
23
- obj[key] = value;
24
- }
25
- return obj;
26
- }
27
- var CloseCircleFilled = function CloseCircleFilled2(props, context) {
28
- var p = _objectSpread({}, props, context.attrs);
29
- return createVNode(Icon, _objectSpread({}, p, {
30
- "icon": CloseCircleFilled$1
31
- }), null);
32
- };
33
- CloseCircleFilled.displayName = "CloseCircleFilled";
34
- CloseCircleFilled.inheritAttrs = false;
35
- export {
36
- CloseCircleFilled as default
37
- };
@@ -1,37 +0,0 @@
1
- import { createVNode } from "vue";
2
- import UploadOutlined$1 from "./sun-card-design-mobile.es85.js";
3
- import Icon from "./sun-card-design-mobile.es77.js";
4
- function _objectSpread(target) {
5
- for (var i = 1; i < arguments.length; i++) {
6
- var source = arguments[i] != null ? Object(arguments[i]) : {};
7
- var ownKeys = Object.keys(source);
8
- if (typeof Object.getOwnPropertySymbols === "function") {
9
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
10
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
11
- }));
12
- }
13
- ownKeys.forEach(function(key) {
14
- _defineProperty(target, key, source[key]);
15
- });
16
- }
17
- return target;
18
- }
19
- function _defineProperty(obj, key, value) {
20
- if (key in obj) {
21
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
22
- } else {
23
- obj[key] = value;
24
- }
25
- return obj;
26
- }
27
- var UploadOutlined = function UploadOutlined2(props, context) {
28
- var p = _objectSpread({}, props, context.attrs);
29
- return createVNode(Icon, _objectSpread({}, p, {
30
- "icon": UploadOutlined$1
31
- }), null);
32
- };
33
- UploadOutlined.displayName = "UploadOutlined";
34
- UploadOutlined.inheritAttrs = false;
35
- export {
36
- UploadOutlined as default
37
- };
@@ -1,68 +0,0 @@
1
- import IconBase from "./sun-card-design-mobile.es72.js";
2
- import { normalizeTwoToneColors } from "./sun-card-design-mobile.es73.js";
3
- function _slicedToArray(arr, i) {
4
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
5
- }
6
- function _nonIterableRest() {
7
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8
- }
9
- function _unsupportedIterableToArray(o, minLen) {
10
- if (!o) return;
11
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
12
- var n = Object.prototype.toString.call(o).slice(8, -1);
13
- if (n === "Object" && o.constructor) n = o.constructor.name;
14
- if (n === "Map" || n === "Set") return Array.from(o);
15
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
16
- }
17
- function _arrayLikeToArray(arr, len) {
18
- if (len == null || len > arr.length) len = arr.length;
19
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
20
- arr2[i] = arr[i];
21
- }
22
- return arr2;
23
- }
24
- function _iterableToArrayLimit(arr, i) {
25
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
26
- if (_i == null) return;
27
- var _arr = [];
28
- var _n = true;
29
- var _d = false;
30
- var _s, _e;
31
- try {
32
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
33
- _arr.push(_s.value);
34
- if (i && _arr.length === i) break;
35
- }
36
- } catch (err) {
37
- _d = true;
38
- _e = err;
39
- } finally {
40
- try {
41
- if (!_n && _i["return"] != null) _i["return"]();
42
- } finally {
43
- if (_d) throw _e;
44
- }
45
- }
46
- return _arr;
47
- }
48
- function _arrayWithHoles(arr) {
49
- if (Array.isArray(arr)) return arr;
50
- }
51
- function setTwoToneColor(twoToneColor) {
52
- var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
53
- return IconBase.setTwoToneColors({
54
- primaryColor,
55
- secondaryColor
56
- });
57
- }
58
- function getTwoToneColor() {
59
- var colors = IconBase.getTwoToneColors();
60
- if (!colors.calculated) {
61
- return colors.primaryColor;
62
- }
63
- return [colors.primaryColor, colors.secondaryColor];
64
- }
65
- export {
66
- getTwoToneColor,
67
- setTwoToneColor
68
- };
@@ -1,107 +0,0 @@
1
- import { getSecondaryColor, useInsertStyles, warning, isIconDefinition, generate } from "./sun-card-design-mobile.es73.js";
2
- var _excluded = ["icon", "primaryColor", "secondaryColor"];
3
- function _objectWithoutProperties(source, excluded) {
4
- if (source == null) return {};
5
- var target = _objectWithoutPropertiesLoose(source, excluded);
6
- var key, i;
7
- if (Object.getOwnPropertySymbols) {
8
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
9
- for (i = 0; i < sourceSymbolKeys.length; i++) {
10
- key = sourceSymbolKeys[i];
11
- if (excluded.indexOf(key) >= 0) continue;
12
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
13
- target[key] = source[key];
14
- }
15
- }
16
- return target;
17
- }
18
- function _objectWithoutPropertiesLoose(source, excluded) {
19
- if (source == null) return {};
20
- var target = {};
21
- var sourceKeys = Object.keys(source);
22
- var key, i;
23
- for (i = 0; i < sourceKeys.length; i++) {
24
- key = sourceKeys[i];
25
- if (excluded.indexOf(key) >= 0) continue;
26
- target[key] = source[key];
27
- }
28
- return target;
29
- }
30
- function _objectSpread(target) {
31
- for (var i = 1; i < arguments.length; i++) {
32
- var source = arguments[i] != null ? Object(arguments[i]) : {};
33
- var ownKeys = Object.keys(source);
34
- if (typeof Object.getOwnPropertySymbols === "function") {
35
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
36
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
37
- }));
38
- }
39
- ownKeys.forEach(function(key) {
40
- _defineProperty(target, key, source[key]);
41
- });
42
- }
43
- return target;
44
- }
45
- function _defineProperty(obj, key, value) {
46
- if (key in obj) {
47
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
48
- } else {
49
- obj[key] = value;
50
- }
51
- return obj;
52
- }
53
- var twoToneColorPalette = {
54
- primaryColor: "#333",
55
- secondaryColor: "#E6E6E6",
56
- calculated: false
57
- };
58
- function setTwoToneColors(_ref) {
59
- var primaryColor = _ref.primaryColor, secondaryColor = _ref.secondaryColor;
60
- twoToneColorPalette.primaryColor = primaryColor;
61
- twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
62
- twoToneColorPalette.calculated = !!secondaryColor;
63
- }
64
- function getTwoToneColors() {
65
- return _objectSpread({}, twoToneColorPalette);
66
- }
67
- var IconBase = function IconBase2(props, context) {
68
- var _props$context$attrs = _objectSpread({}, props, context.attrs), icon = _props$context$attrs.icon, primaryColor = _props$context$attrs.primaryColor, secondaryColor = _props$context$attrs.secondaryColor, restProps = _objectWithoutProperties(_props$context$attrs, _excluded);
69
- var colors = twoToneColorPalette;
70
- if (primaryColor) {
71
- colors = {
72
- primaryColor,
73
- secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
74
- };
75
- }
76
- useInsertStyles();
77
- warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
78
- if (!isIconDefinition(icon)) {
79
- return null;
80
- }
81
- var target = icon;
82
- if (target && typeof target.icon === "function") {
83
- target = _objectSpread({}, target, {
84
- icon: target.icon(colors.primaryColor, colors.secondaryColor)
85
- });
86
- }
87
- return generate(target.icon, "svg-".concat(target.name), _objectSpread({}, restProps, {
88
- "data-icon": target.name,
89
- width: "1em",
90
- height: "1em",
91
- fill: "currentColor",
92
- "aria-hidden": "true"
93
- }));
94
- };
95
- IconBase.props = {
96
- icon: Object,
97
- primaryColor: String,
98
- secondaryColor: String,
99
- focusable: String
100
- };
101
- IconBase.inheritAttrs = false;
102
- IconBase.displayName = "IconBase";
103
- IconBase.getTwoToneColors = getTwoToneColors;
104
- IconBase.setTwoToneColors = setTwoToneColors;
105
- export {
106
- IconBase as default
107
- };
@@ -1,85 +0,0 @@
1
- import { nextTick, h } from "vue";
2
- import { generate as generate$1 } from "./sun-card-design-mobile.es74.js";
3
- import insertCss from "./sun-card-design-mobile.es75.js";
4
- function _objectSpread(target) {
5
- for (var i = 1; i < arguments.length; i++) {
6
- var source = arguments[i] != null ? Object(arguments[i]) : {};
7
- var ownKeys = Object.keys(source);
8
- if (typeof Object.getOwnPropertySymbols === "function") {
9
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
10
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
11
- }));
12
- }
13
- ownKeys.forEach(function(key) {
14
- _defineProperty(target, key, source[key]);
15
- });
16
- }
17
- return target;
18
- }
19
- function _defineProperty(obj, key, value) {
20
- if (key in obj) {
21
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
22
- } else {
23
- obj[key] = value;
24
- }
25
- return obj;
26
- }
27
- function warn(valid, message) {
28
- if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
29
- console.error("Warning: ".concat(message));
30
- }
31
- }
32
- function warning(valid, message) {
33
- warn(valid, "[@ant-design/icons-vue] ".concat(message));
34
- }
35
- function isIconDefinition(target) {
36
- return typeof target === "object" && typeof target.name === "string" && typeof target.theme === "string" && (typeof target.icon === "object" || typeof target.icon === "function");
37
- }
38
- function generate(node, key, rootProps) {
39
- if (!rootProps) {
40
- return h(node.tag, _objectSpread({
41
- key
42
- }, node.attrs), (node.children || []).map(function(child, index) {
43
- return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
44
- }));
45
- }
46
- return h(node.tag, _objectSpread({
47
- key
48
- }, rootProps, node.attrs), (node.children || []).map(function(child, index) {
49
- return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
50
- }));
51
- }
52
- function getSecondaryColor(primaryColor) {
53
- return generate$1(primaryColor)[0];
54
- }
55
- function normalizeTwoToneColors(twoToneColor) {
56
- if (!twoToneColor) {
57
- return [];
58
- }
59
- return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
60
- }
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";
62
- var cssInjectedFlag = false;
63
- var useInsertStyles = function useInsertStyles2() {
64
- var styleStr = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : iconStyles;
65
- nextTick(function() {
66
- if (!cssInjectedFlag) {
67
- if (typeof window !== "undefined" && window.document && window.document.documentElement) {
68
- insertCss(styleStr, {
69
- prepend: true
70
- });
71
- }
72
- cssInjectedFlag = true;
73
- }
74
- });
75
- };
76
- export {
77
- generate,
78
- getSecondaryColor,
79
- iconStyles,
80
- isIconDefinition,
81
- normalizeTwoToneColors,
82
- useInsertStyles,
83
- warn,
84
- warning
85
- };
@@ -1,175 +0,0 @@
1
- import { inputToRGB } from "./sun-card-design-mobile.es86.js";
2
- import { rgbToHsv, rgbToHex } from "./sun-card-design-mobile.es87.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
- export {
171
- generate,
172
- presetDarkPalettes,
173
- presetPalettes,
174
- presetPrimaryColors
175
- };