sun-card-design 1.1.2 → 1.1.10

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 (55) hide show
  1. package/dist/mobile/sun-card-design-mobile.es13.js +1 -1
  2. package/dist/mobile/sun-card-design-mobile.es14.js +3 -3
  3. package/dist/mobile/sun-card-design-mobile.es15.js +7 -3
  4. package/dist/mobile/sun-card-design-mobile.es2.js +8 -4
  5. package/dist/mobile/sun-card-design-mobile.es25.js +9 -4
  6. package/dist/mobile/sun-card-design-mobile.es49.js +8 -9
  7. package/dist/mobile/sun-card-design-mobile.es5.js +7 -12
  8. package/dist/mobile/sun-card-design-mobile.es67.js +37 -0
  9. package/dist/mobile/sun-card-design-mobile.es7.js +23 -4
  10. package/dist/mobile/sun-card-design-mobile.es72.js +4 -4
  11. package/dist/mobile/sun-card-design-mobile.es73.js +11 -30
  12. package/dist/mobile/sun-card-design-mobile.es75.js +10 -10
  13. package/dist/mobile/sun-card-design-mobile.es84.js +2 -4
  14. package/dist/mobile/sun-card-design-mobile.es85.js +42 -10
  15. package/dist/mobile/sun-card-design-mobile.es86.js +133 -94
  16. package/dist/mobile/sun-card-design-mobile.es87.js +110 -12
  17. package/dist/mobile/sun-card-design-mobile.es88.js +150 -145
  18. package/dist/mobile/sun-card-design-mobile.es89.js +36 -99
  19. package/dist/pc/sun-card-design-pc.es13.js +1 -1
  20. package/dist/pc/sun-card-design-pc.es14.js +3 -3
  21. package/dist/pc/sun-card-design-pc.es15.js +7 -3
  22. package/dist/pc/sun-card-design-pc.es2.js +8 -4
  23. package/dist/pc/sun-card-design-pc.es25.js +9 -4
  24. package/dist/pc/sun-card-design-pc.es32.js +2 -2
  25. package/dist/pc/sun-card-design-pc.es33.js +2 -2
  26. package/dist/pc/sun-card-design-pc.es34.js +2 -2
  27. package/dist/pc/sun-card-design-pc.es35.js +2 -2
  28. package/dist/pc/sun-card-design-pc.es36.js +2 -2
  29. package/dist/pc/sun-card-design-pc.es37.js +2 -2
  30. package/dist/pc/sun-card-design-pc.es38.js +2 -2
  31. package/dist/pc/sun-card-design-pc.es49.js +8 -9
  32. package/dist/pc/sun-card-design-pc.es5.js +7 -12
  33. package/dist/pc/sun-card-design-pc.es68.js +2 -2
  34. package/dist/pc/sun-card-design-pc.es7.js +23 -4
  35. package/dist/pc/sun-card-design-pc.es70.js +2 -2
  36. package/dist/pc/sun-card-design-pc.es72.js +4 -4
  37. package/dist/pc/sun-card-design-pc.es73.js +12 -31
  38. package/dist/pc/sun-card-design-pc.es74.js +2 -175
  39. package/dist/pc/sun-card-design-pc.es75.js +145 -9
  40. package/dist/pc/sun-card-design-pc.es76.js +2 -107
  41. package/dist/pc/sun-card-design-pc.es77.js +2 -2
  42. package/dist/pc/sun-card-design-pc.es78.js +2 -146
  43. package/dist/pc/sun-card-design-pc.es79.js +2 -2
  44. package/dist/pc/sun-card-design-pc.es80.js +2 -2
  45. package/dist/pc/sun-card-design-pc.es81.js +2 -2
  46. package/dist/pc/sun-card-design-pc.es82.js +2 -2
  47. package/dist/pc/sun-card-design-pc.es83.js +2 -2
  48. package/dist/pc/sun-card-design-pc.es84.js +173 -2
  49. package/dist/pc/sun-card-design-pc.es85.js +42 -2
  50. package/dist/pc/sun-card-design-pc.es86.js +146 -2
  51. package/dist/pc/sun-card-design-pc.es87.js +110 -12
  52. package/dist/pc/sun-card-design-pc.es88.js +150 -145
  53. package/dist/pc/sun-card-design-pc.es89.js +36 -99
  54. package/dist/sun-card-design.css +1 -1
  55. package/package.json +2 -1
@@ -61,7 +61,7 @@ const _sfc_main = {
61
61
  };
62
62
  }
63
63
  };
64
- const Panorama = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3226efd4"]]);
64
+ const Panorama = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-829605cc"]]);
65
65
  export {
66
66
  Panorama as default
67
67
  };
@@ -10,9 +10,9 @@ const _sfc_main = {
10
10
  setup(__props) {
11
11
  const props = __props;
12
12
  const queryCanvasEl = () => {
13
- const elTo = document.querySelector(".canvasTo");
13
+ const elTo = document.querySelector(".mb-main");
14
14
  if (elTo) return elTo;
15
- const el = document.querySelector(".canvas");
15
+ const el = document.querySelector(".pc-main");
16
16
  return el;
17
17
  };
18
18
  const onGenerate = async () => {
@@ -53,7 +53,7 @@ const _sfc_main = {
53
53
  };
54
54
  }
55
55
  };
56
- const GenerateImg = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cd034976"]]);
56
+ const GenerateImg = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2048419e"]]);
57
57
  export {
58
58
  GenerateImg as default
59
59
  };
@@ -6,13 +6,16 @@ const _hoisted_1 = { class: "main-grid" };
6
6
  const _sfc_main = {
7
7
  __name: "gridComp",
8
8
  props: ["record"],
9
- emits: ["clickEvent"],
9
+ emits: ["clickEvent", "fileUpdateEvent"],
10
10
  setup(__props, { emit: __emit }) {
11
11
  const props = __props;
12
12
  const emit = __emit;
13
13
  const onClick = (record) => {
14
14
  emit("clickEvent", record);
15
15
  };
16
+ const onUpdate = (record) => {
17
+ emit("fileUpdateEvent", record);
18
+ };
16
19
  return (_ctx, _cache) => {
17
20
  const _component_a_col = resolveComponent("a-col");
18
21
  const _component_a_row = resolveComponent("a-row");
@@ -43,7 +46,8 @@ const _sfc_main = {
43
46
  return openBlock(), createBlock(FormItem, {
44
47
  record: element,
45
48
  key: index2,
46
- onClickEvent: onClick
49
+ onClickEvent: onClick,
50
+ onFileUpdateEvent: onUpdate
47
51
  }, null, 8, ["record"]);
48
52
  }), 128))
49
53
  ], 4)
@@ -58,7 +62,7 @@ const _sfc_main = {
58
62
  };
59
63
  }
60
64
  };
61
- const Grid = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-92d93041"]]);
65
+ const Grid = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4c32288a"]]);
62
66
  export {
63
67
  Grid as default
64
68
  };
@@ -6,7 +6,7 @@ import _export_sfc from "./sun-card-design-mobile.es28.js";
6
6
  const _sfc_main = {
7
7
  __name: "mobilePanel",
8
8
  props: ["record", "config"],
9
- emits: ["clickEvent"],
9
+ emits: ["clickEvent", "fileUpdateEvent"],
10
10
  setup(__props, { emit: __emit }) {
11
11
  const props = __props;
12
12
  if (props?.config?.variableList) {
@@ -17,9 +17,12 @@ const _sfc_main = {
17
17
  const onClick = (record) => {
18
18
  emit("clickEvent", record);
19
19
  };
20
+ const onUpdated = (record) => {
21
+ emit("fileUpdateEvent", record);
22
+ };
20
23
  return (_ctx, _cache) => {
21
24
  return openBlock(), createElementBlock("div", {
22
- class: "msg-main",
25
+ class: "msg-main mb-main",
23
26
  style: normalizeStyle({
24
27
  background: props.record.config.background,
25
28
  padding: props.record.config.padding + "px",
@@ -31,14 +34,15 @@ const _sfc_main = {
31
34
  recordData: props.record,
32
35
  record: item,
33
36
  key: index,
34
- onClickEvent: onClick
37
+ onClickEvent: onClick,
38
+ onFileUpdateEvent: onUpdated
35
39
  }, null, 8, ["recordData", "record"]);
36
40
  }), 128))
37
41
  ], 4);
38
42
  };
39
43
  }
40
44
  };
41
- const MobilePanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ccb279e4"]]);
45
+ const MobilePanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0aa4d10d"]]);
42
46
  export {
43
47
  MobilePanel as default
44
48
  };
@@ -31,13 +31,16 @@ const _hoisted_1 = {
31
31
  const _sfc_main = {
32
32
  __name: "formItem",
33
33
  props: ["record"],
34
- emits: ["clickEvent"],
34
+ emits: ["clickEvent", "fileUpdateEvent"],
35
35
  setup(__props, { emit: __emit }) {
36
36
  const props = __props;
37
37
  const emit = __emit;
38
38
  const onClick = (record) => {
39
39
  emit("clickEvent", record);
40
40
  };
41
+ const onUpdate = (record) => {
42
+ emit("fileUpdateEvent", record);
43
+ };
41
44
  return (_ctx, _cache) => {
42
45
  return __props.record.state !== false ? (openBlock(), createElementBlock("div", _hoisted_1, [
43
46
  __props.record.type === "title" ? (openBlock(), createBlock(Title, {
@@ -57,7 +60,8 @@ const _sfc_main = {
57
60
  __props.record.type === "file" ? (openBlock(), createBlock(File, {
58
61
  key: 3,
59
62
  record: props.record,
60
- onClickEvent: onClick
63
+ onClickEvent: onClick,
64
+ onFileUpdateEvent: onUpdate
61
65
  }, null, 8, ["record"])) : createCommentVNode("", true),
62
66
  __props.record.type === "upload" ? (openBlock(), createBlock(Upload, {
63
67
  key: 4,
@@ -104,7 +108,8 @@ const _sfc_main = {
104
108
  __props.record.type === "grid" ? (openBlock(), createBlock(Grid, {
105
109
  key: 14,
106
110
  record: props.record,
107
- onClickEvent: onClick
111
+ onClickEvent: onClick,
112
+ onFileUpdateEvent: onUpdate
108
113
  }, null, 8, ["record"])) : createCommentVNode("", true),
109
114
  __props.record.type === "enterpriseSearch" ? (openBlock(), createBlock(EnterpriseSearch, {
110
115
  key: 15,
@@ -142,7 +147,7 @@ const _sfc_main = {
142
147
  };
143
148
  }
144
149
  };
145
- const FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f93442bd"]]);
150
+ const FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0fe9e516"]]);
146
151
  export {
147
152
  FormItem as default
148
153
  };
@@ -1,4 +1,4 @@
1
- import { ref, onUnmounted, createElementBlock, createCommentVNode, openBlock, createElementVNode, createBlock, unref } from "vue";
1
+ import { ref, onUnmounted, createElementBlock, createCommentVNode, openBlock, createBlock, createElementVNode, unref } from "vue";
2
2
  import * as THREE from "three";
3
3
  import { OrbitControls } from "./sun-card-design-mobile.es58.js";
4
4
  import TWEEN from "@tweenjs/tween.js";
@@ -172,22 +172,21 @@ const _sfc_main = {
172
172
  });
173
173
  return (_ctx, _cache) => {
174
174
  return show.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
175
+ isClose.value ? (openBlock(), createBlock(unref(CloseCircleFilled), {
176
+ key: 0,
177
+ class: "icon",
178
+ onClick: closeView
179
+ })) : createCommentVNode("", true),
175
180
  createElementVNode("div", {
176
181
  ref_key: "containerRef",
177
182
  ref: containerRef,
178
183
  class: "canvas-view"
179
- }, [
180
- isClose.value ? (openBlock(), createBlock(unref(CloseCircleFilled), {
181
- key: 0,
182
- class: "icon",
183
- onClick: closeView
184
- })) : createCommentVNode("", true)
185
- ], 512)
184
+ }, null, 512)
186
185
  ])) : createCommentVNode("", true);
187
186
  };
188
187
  }
189
188
  };
190
- const PanoramaView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9c7cbcbe"]]);
189
+ const PanoramaView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d6ec0f1f"]]);
191
190
  export {
192
191
  PanoramaView as default
193
192
  };
@@ -25,27 +25,21 @@ const _sfc_main = {
25
25
  EditOutlined
26
26
  };
27
27
  const emit = __emit;
28
- const obj = {
29
- primary: "#0066ff",
30
- default: "#fff",
31
- unimportant: "#f0f0f0",
32
- important: "#4e40e5"
33
- };
34
28
  const getWidth = () => {
35
- const obj2 = {
29
+ const obj = {
36
30
  auto: "auto",
37
31
  all: "100%",
38
32
  fixed: props.record.options.style.widthValue + "px"
39
33
  };
40
- return obj2[props.record.options.style.widthType];
34
+ return obj[props.record.options.style.widthType];
41
35
  };
42
36
  const getAlign = () => {
43
- const obj2 = {
37
+ const obj = {
44
38
  left: "flex-start",
45
39
  center: "center",
46
40
  right: "flex-end"
47
41
  };
48
- return obj2[props.record.options.style.align];
42
+ return obj[props.record.options.style.align];
49
43
  };
50
44
  const onClick = () => {
51
45
  emit("clickEvent", props.record);
@@ -62,8 +56,9 @@ const _sfc_main = {
62
56
  type: "primary",
63
57
  size: props.record.options.style.size,
64
58
  style: normalizeStyle({
65
- background: obj[props.record.options.style.type],
59
+ background: props.record.options.style.background,
66
60
  color: props.record.options.style.color,
61
+ borderRadius: props.record.options.style.borderRadius + "px",
67
62
  width: getWidth(),
68
63
  float: props.record.options.style.align
69
64
  }),
@@ -86,7 +81,7 @@ const _sfc_main = {
86
81
  };
87
82
  }
88
83
  };
89
- const Button = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-af850fd7"]]);
84
+ const Button = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-444f05bb"]]);
90
85
  export {
91
86
  Button as default
92
87
  };
@@ -0,0 +1,37 @@
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,4 +1,4 @@
1
- import { createElementBlock, openBlock, createElementVNode, unref, normalizeStyle, toDisplayString } from "vue";
1
+ import { resolveComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, unref, normalizeStyle, toDisplayString, createVNode, withCtx, createTextVNode } from "vue";
2
2
  import { fileIconSvg } from "./sun-card-design-mobile.es41.js";
3
3
  import { renderTextByVariables } from "./sun-card-design-mobile.es26.js";
4
4
  /* empty css */
@@ -8,14 +8,18 @@ const _hoisted_2 = ["innerHTML"];
8
8
  const _sfc_main = {
9
9
  __name: "fileComp",
10
10
  props: ["record"],
11
- emits: ["clickEvent"],
11
+ emits: ["clickEvent", "fileUpdateEvent"],
12
12
  setup(__props, { emit: __emit }) {
13
13
  const props = __props;
14
14
  const emit = __emit;
15
15
  const onClick = () => {
16
16
  emit("clickEvent", props.record);
17
17
  };
18
+ const onUpdate = () => {
19
+ emit("fileUpdateEvent", props.record);
20
+ };
18
21
  return (_ctx, _cache) => {
22
+ const _component_a_button = resolveComponent("a-button");
19
23
  return openBlock(), createElementBlock("div", _hoisted_1, [
20
24
  createElementVNode("div", null, [
21
25
  createElementVNode("div", {
@@ -39,13 +43,28 @@ const _sfc_main = {
39
43
  lineHeight: "20px",
40
44
  margin: "5px 0 0"
41
45
  })
42
- }, toDisplayString(unref(renderTextByVariables)(props.record.options.subtitle)), 5)
46
+ }, toDisplayString(unref(renderTextByVariables)(props.record.options.subtitle)), 5),
47
+ props.record.options?.isUpdate ? (openBlock(), createElementBlock("div", {
48
+ key: 0,
49
+ style: { "margin-top": "8px" },
50
+ onClick: onUpdate
51
+ }, [
52
+ createVNode(_component_a_button, {
53
+ type: "primary",
54
+ size: "small"
55
+ }, {
56
+ default: withCtx(() => [
57
+ createTextVNode(toDisplayString(props.record.options.updateText), 1)
58
+ ]),
59
+ _: 1
60
+ })
61
+ ])) : createCommentVNode("", true)
43
62
  ])
44
63
  ]);
45
64
  };
46
65
  }
47
66
  };
48
- const File = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-57bf4aca"]]);
67
+ const File = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8e4c7abb"]]);
49
68
  export {
50
69
  File as default
51
70
  };
@@ -1,5 +1,4 @@
1
- import { getSecondaryColor, warning, isIconDefinition, generate } from "./sun-card-design-mobile.es73.js";
2
- import { reactive } from "vue";
1
+ import { getSecondaryColor, useInsertStyles, warning, isIconDefinition, generate } from "./sun-card-design-mobile.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";
1
+ import { nextTick, h } from "vue";
2
2
  import { generate as generate$1 } from "./sun-card-design-mobile.es84.js";
3
- import { useInjectIconContext } from "./sun-card-design-mobile.es85.js";
4
- import { canUseDom, updateCSS } from "./sun-card-design-mobile.es86.js";
3
+ import insertCss from "./sun-card-design-mobile.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 {
@@ -2,9 +2,6 @@ import { createVNode } from "vue";
2
2
  import IconBase from "./sun-card-design-mobile.es72.js";
3
3
  import { setTwoToneColor, getTwoToneColor } from "./sun-card-design-mobile.es71.js";
4
4
  import { normalizeTwoToneColors } from "./sun-card-design-mobile.es73.js";
5
- import { blue } from "./sun-card-design-mobile.es84.js";
6
- import { useInjectIconContext } from "./sun-card-design-mobile.es85.js";
7
- import { InsertStyles } from "./sun-card-design-mobile.es87.js";
8
5
  var _excluded = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
9
6
  function _slicedToArray(arr, i) {
10
7
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
@@ -104,15 +101,18 @@ function _objectWithoutPropertiesLoose(source, excluded) {
104
101
  }
105
102
  return target;
106
103
  }
107
- setTwoToneColor(blue.primary);
104
+ setTwoToneColor("#1890ff");
108
105
  var Icon = function Icon2(props, context) {
109
106
  var _classObj;
110
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);
111
- var _useInjectIconContext = useInjectIconContext(), prefixCls = _useInjectIconContext.prefixCls, rootClassName = _useInjectIconContext.rootClassName;
112
- var classObj = (_classObj = {}, _defineProperty(_classObj, rootClassName.value, !!rootClassName.value), _defineProperty(_classObj, prefixCls.value, true), _defineProperty(_classObj, "".concat(prefixCls.value, "-").concat(icon.name), Boolean(icon.name)), _defineProperty(_classObj, "".concat(prefixCls.value, "-spin"), !!spin || icon.name === "loading"), _classObj);
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" : "";
113
112
  var iconTabIndex = tabindex;
114
113
  if (iconTabIndex === void 0 && onClick) {
115
114
  iconTabIndex = -1;
115
+ restProps.tabindex = iconTabIndex;
116
116
  }
117
117
  var svgStyle = rotate ? {
118
118
  msTransform: "rotate(".concat(rotate, "deg)"),
@@ -124,20 +124,20 @@ var Icon = function Icon2(props, context) {
124
124
  "aria-label": icon.name
125
125
  }, restProps, {
126
126
  "onClick": onClick,
127
- "class": [classObj, cls],
128
- "tabindex": iconTabIndex
127
+ "class": classObj
129
128
  }), [createVNode(IconBase, {
129
+ "class": svgClassString,
130
130
  "icon": icon,
131
131
  "primaryColor": primaryColor,
132
132
  "secondaryColor": secondaryColor,
133
133
  "style": svgStyle
134
- }, null), createVNode(InsertStyles, null, null)]);
134
+ }, null)]);
135
135
  };
136
136
  Icon.props = {
137
137
  spin: Boolean,
138
138
  rotate: Number,
139
139
  icon: Object,
140
- twoToneColor: [String, Array]
140
+ twoToneColor: String
141
141
  };
142
142
  Icon.displayName = "AntdIcon";
143
143
  Icon.inheritAttrs = false;
@@ -1,5 +1,5 @@
1
- import { inputToRGB } from "./sun-card-design-mobile.es88.js";
2
- import { rgbToHsv, rgbToHex } from "./sun-card-design-mobile.es89.js";
1
+ import { inputToRGB } from "./sun-card-design-mobile.es86.js";
2
+ import { rgbToHsv, rgbToHex } from "./sun-card-design-mobile.es87.js";
3
3
  var hueStep = 2;
4
4
  var saturationStep = 0.16;
5
5
  var saturationStep2 = 0.05;
@@ -167,9 +167,7 @@ Object.keys(presetPrimaryColors).forEach(function(key) {
167
167
  });
168
168
  presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
169
169
  });
170
- var blue = presetPalettes.blue;
171
170
  export {
172
- blue,
173
171
  generate,
174
172
  presetDarkPalettes,
175
173
  presetPalettes,
@@ -1,12 +1,44 @@
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
- });
9
- };
1
+ var containers = [];
2
+ var styleElements = [];
3
+ var usage = "insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";
4
+ function createStyleElement() {
5
+ var styleElement = document.createElement("style");
6
+ styleElement.setAttribute("type", "text/css");
7
+ return styleElement;
8
+ }
9
+ function insertCss(css, options) {
10
+ options = options || {};
11
+ if (css === void 0) {
12
+ throw new Error(usage);
13
+ }
14
+ var position = options.prepend === true ? "prepend" : "append";
15
+ var container = options.container !== void 0 ? options.container : document.querySelector("head");
16
+ var containerId = containers.indexOf(container);
17
+ if (containerId === -1) {
18
+ containerId = containers.push(container) - 1;
19
+ styleElements[containerId] = {};
20
+ }
21
+ var styleElement;
22
+ if (styleElements[containerId] !== void 0 && styleElements[containerId][position] !== void 0) {
23
+ styleElement = styleElements[containerId][position];
24
+ } else {
25
+ styleElement = styleElements[containerId][position] = createStyleElement();
26
+ if (position === "prepend") {
27
+ container.insertBefore(styleElement, container.childNodes[0]);
28
+ } else {
29
+ container.appendChild(styleElement);
30
+ }
31
+ }
32
+ if (css.charCodeAt(0) === 65279) {
33
+ css = css.substr(1, css.length);
34
+ }
35
+ if (styleElement.styleSheet) {
36
+ styleElement.styleSheet.cssText += css;
37
+ } else {
38
+ styleElement.textContent += css;
39
+ }
40
+ return styleElement;
41
+ }
10
42
  export {
11
- useInjectIconContext
43
+ insertCss as default
12
44
  };