ik-next-ui 0.0.11 → 0.0.13

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 (59) hide show
  1. package/dist/IkApprovalProcess/ik.index.es.js +90 -90
  2. package/dist/IkApprovalProcessDetail/ik.index.es.js +4387 -4209
  3. package/dist/IkAvatar/ik.index.es.js +140 -0
  4. package/dist/IkBaseDialog/ik.index.es.js +28 -28
  5. package/dist/IkCollapseCard/ik.index.es.js +11 -11
  6. package/dist/IkDescription/ik.index.es.js +4004 -3826
  7. package/dist/IkDetailPreviewFiles/ik.index.es.js +4060 -3882
  8. package/dist/IkIconPicker/ik.index.es.js +13 -13
  9. package/dist/IkImage/ik-next-ui.css +1 -0
  10. package/dist/IkImage/ik.index.es.js +173 -0
  11. package/dist/IkImageUploadEditor/ik.index.es.js +1416 -1436
  12. package/dist/IkMonacoEditor/ik.index.es.js +1 -1
  13. package/dist/IkPickerUser/ik.index.es.js +55 -55
  14. package/dist/IkPlayer/ik.index.es.js +1316 -1138
  15. package/dist/IkPreviewFile/ik.index.es.js +4307 -4129
  16. package/dist/IkPreviewFileDialog/ik.index.es.js +4107 -3929
  17. package/dist/IkRadioGroup/ik.index.es.js +24 -24
  18. package/dist/IkSideText/ik-next-ui.css +1 -1
  19. package/dist/IkSideText/ik.index.es.js +208 -142
  20. package/dist/IkSvgIcon/ik.index.es.js +10 -10
  21. package/dist/IkUploadFile/ik.index.es.js +4947 -4769
  22. package/dist/IkUploadImage/ik-next-ui.css +1 -1
  23. package/dist/IkUploadImage/ik.index.es.js +32 -31
  24. package/dist/IkVerticalStepBar/ik.index.es.js +15 -15
  25. package/dist/Provider/ik.index.es.js +1 -1
  26. package/dist/build/version.json.d.ts +5 -0
  27. package/dist/ik-next-ui.css +2 -2
  28. package/dist/index.es.js +28408 -28098
  29. package/dist/index.umd.js +133 -132
  30. package/dist/src/components/IkAvatar/index.d.ts +56 -0
  31. package/dist/src/components/IkAvatar/src/index.vue.d.ts +49 -0
  32. package/dist/src/components/IkBtnContent/index.d.ts +34 -0
  33. package/dist/src/components/IkBtnContent/src/index.d.ts +36 -0
  34. package/dist/src/components/IkDragList/index.d.ts +3 -3
  35. package/dist/src/components/IkDragList/src/IkDragList.vue.d.ts +1 -1
  36. package/dist/src/components/IkImage/index.d.ts +107 -0
  37. package/dist/src/components/IkImage/src/index.vue.d.ts +98 -0
  38. package/dist/src/components/IkMonacoEditor/index.d.ts +2 -2
  39. package/dist/src/components/IkMonacoEditor/src/index.vue.d.ts +2 -2
  40. package/dist/src/components/IkPickerUser/index.d.ts +1 -1
  41. package/dist/src/components/IkPickerUser/src/list/GroupList.vue.d.ts +1 -1
  42. package/dist/src/components/IkPickerUser/src/list/PostList.vue.d.ts +1 -1
  43. package/dist/src/components/IkPickerUser/src/list/RoleList.vue.d.ts +1 -1
  44. package/dist/src/components/IkPickerUser/src/picker.vue.d.ts +1 -1
  45. package/dist/src/components/IkSideText/IkSideText.vue.d.ts +10 -1
  46. package/dist/src/components/IkSideText/index.d.ts +10 -1
  47. package/dist/src/components/IkSvgIcon/index.d.ts +2 -2
  48. package/dist/src/components/IkTooltip/index.d.ts +3 -3
  49. package/dist/src/components/IkTooltip/src/index.vue.d.ts +1 -1
  50. package/dist/src/components/IkTree/IkTree.vue.d.ts +2123 -63
  51. package/dist/src/components/IkTree/index.d.ts +6481 -301
  52. package/dist/src/components/IkUploadFile/src/components/ErrorFileItem.vue.d.ts +2 -2
  53. package/dist/src/components/IkUploadImage/index.d.ts +3 -3
  54. package/dist/src/components/IkUploadImage/src/index.vue.d.ts +1 -1
  55. package/dist/src/components/index.d.ts +2 -0
  56. package/dist/src/iking-ui/version.d.ts +1 -1
  57. package/package.json +1 -1
  58. package/dist/src/components/package.json.d.ts +0 -33
  59. package/dist/src/components-dev/IkUmoEditor/index.d.ts +0 -322
@@ -1,32 +1,36 @@
1
- import { inject as z, computed as d, defineComponent as I, resolveComponent as N, openBlock as s, createElementBlock as f, normalizeStyle as v, normalizeClass as C, unref as k, createBlock as h, withCtx as b, createElementVNode as c, createCommentVNode as w, Fragment as M, useCssVars as V, ref as W, createTextVNode as A, toDisplayString as $ } from "vue";
2
- import { ikColor as F } from "iking-utils-pro";
3
- import { Icon as U } from "@iconify/vue";
4
- import { UseImage as j } from "@vueuse/components";
5
- const O = (e, i) => (e.install = (t) => {
6
- for (const n of [e, ...Object.values({})])
7
- t.component(n.name, n);
1
+ import { inject as z, computed as c, defineComponent as I, resolveComponent as S, openBlock as a, createElementBlock as d, normalizeStyle as k, normalizeClass as C, unref as p, createBlock as g, withCtx as x, createElementVNode as f, createCommentVNode as w, Fragment as B, ref as E, createVNode as F, toDisplayString as $, useCssVars as G, createTextVNode as P } from "vue";
2
+ import { ikColor as R } from "iking-utils-pro";
3
+ import { Icon as N } from "@iconify/vue";
4
+ import { UseImage as A } from "@vueuse/components";
5
+ const U = (e, o) => (e.install = (t) => {
6
+ for (const l of [e, ...Object.values({})])
7
+ t.component(l.name, l);
8
8
  }, e);
9
- function E(...e) {
10
- const i = [];
9
+ function O(...e) {
10
+ const o = [];
11
11
  for (const t of e)
12
12
  if (t) {
13
13
  if (typeof t == "string")
14
- i.push(t);
14
+ o.push(t);
15
15
  else if (Array.isArray(t)) {
16
- const n = E(...t);
17
- n && i.push(n);
16
+ const l = O(...t);
17
+ l && o.push(l);
18
18
  } else if (typeof t == "object")
19
- for (const [n, r] of Object.entries(t))
20
- r && i.push(n);
19
+ for (const [l, s] of Object.entries(t))
20
+ s && o.push(l);
21
21
  }
22
- return i.join(" ");
22
+ return o.join(" ");
23
23
  }
24
- const S = (e, i) => {
24
+ const T = (e, o) => {
25
25
  const t = e.__vccOpts || e;
26
- for (const [n, r] of i)
27
- t[n] = r;
26
+ for (const [l, s] of o)
27
+ t[l] = s;
28
28
  return t;
29
- }, L = [
29
+ }, q = (e, o) => {
30
+ if (!o) return "";
31
+ const t = /fileUrl=[^&]*fileUrl=/;
32
+ return o.startsWith("http") ? o.replace(t, "fileUrl=") : `${e || location.origin}${o}`.replace(t, "fileUrl=");
33
+ }, M = [
30
34
  "csv",
31
35
  "djvu",
32
36
  "doc",
@@ -81,29 +85,29 @@ const S = (e, i) => {
81
85
  "mp4",
82
86
  "flv",
83
87
  "tls"
84
- ], P = (e) => {
85
- const i = z("loadUrl"), t = d(() => e.loadUrl || e.fileUrl || (i == null ? void 0 : i.value)), n = z("uploadUrl"), r = d(() => e.action || e.uploadUrl || (n == null ? void 0 : n.value)), l = z("token"), g = d(() => e.token || (l == null ? void 0 : l.value)), u = z("onlyofficeConfig"), y = d(() => e.onlyofficeConfig || (u == null ? void 0 : u.value)), m = z("userInfo"), p = d(() => e.userInfo || (m == null ? void 0 : m.value)), x = [...L, ...L.map((o) => o.toLocaleUpperCase())];
88
+ ], V = (e) => {
89
+ const o = z("loadUrl"), t = c(() => e.loadUrl || e.fileUrl || (o == null ? void 0 : o.value)), l = z("uploadUrl"), s = c(() => e.action || e.uploadUrl || (l == null ? void 0 : l.value)), n = z("token"), h = c(() => e.token || (n == null ? void 0 : n.value)), u = z("onlyofficeConfig"), m = c(() => e.onlyofficeConfig || (u == null ? void 0 : u.value)), v = z("userInfo"), b = c(() => e.userInfo || (v == null ? void 0 : v.value)), y = [...M, ...M.map((i) => i.toLocaleUpperCase())];
86
90
  return {
87
91
  cLoadUrl: t,
88
- cUploadUrl: r,
89
- cToken: g,
90
- cOnlyofficeConfig: y,
91
- cUserInfo: p,
92
- cOnlyofficePreviewType: x,
92
+ cUploadUrl: s,
93
+ cToken: h,
94
+ cOnlyofficeConfig: m,
95
+ cUserInfo: b,
96
+ cOnlyofficePreviewType: y,
93
97
  cHeaders: {
94
- Authorization: g.value
98
+ Authorization: h.value
95
99
  }
96
100
  };
97
- }, q = {
101
+ }, D = {
98
102
  key: 2,
99
103
  class: "shrink-0 size-inherit",
100
104
  "aria-hidden": "true"
101
- }, D = ["xlink:href"], H = ["xlink:href"], R = ["size"], J = ["xlink:href"], K = ["xlink:href"], Q = /* @__PURE__ */ I({
105
+ }, H = ["xlink:href"], J = ["xlink:href"], K = ["size"], Q = ["xlink:href"], X = ["xlink:href"], Y = /* @__PURE__ */ I({
102
106
  name: "IkSvgIcon",
103
107
  __name: "index",
104
108
  props: {
105
109
  name: {},
106
- class: {},
110
+ class: { type: [Boolean, null, String, Object, Array] },
107
111
  showBg: { type: Boolean, default: !1 },
108
112
  disabled: { type: Boolean, default: !1 },
109
113
  size: {},
@@ -120,124 +124,124 @@ const S = (e, i) => {
120
124
  hover: { type: Boolean, default: !1 }
121
125
  },
122
126
  emits: ["click"],
123
- setup(e, { emit: i }) {
124
- const t = e, n = i, r = d(() => t.danger ? "danger" : t.error ? "error" : t.type), l = d(() => {
127
+ setup(e, { emit: o }) {
128
+ const t = e, l = o, s = c(() => t.danger ? "danger" : t.error ? "error" : t.type), n = c(() => {
125
129
  if (!t.name)
126
130
  return;
127
- const o = (a) => /^\.{1,2}\//.test(a) || a.startsWith("/") || a.includes("/");
128
- return /^https?:\/\//.test(t.name) || o(t.name) ? "img" : t.name.startsWith("iksvg_") ? "two-color-svg" : /i-[^:]+:[^:]+/.test(t.name) || t.name.startsWith("ik") ? "unocss" : t.name.includes(":") ? "iconify" : "svg";
129
- }), g = {
131
+ const i = (r) => /^\.{1,2}\//.test(r) || r.startsWith("/") || r.includes("/");
132
+ return /^https?:\/\//.test(t.name) || i(t.name) ? "img" : t.name.startsWith("iksvg_") ? "two-color-svg" : /i-[^:]+:[^:]+/.test(t.name) || t.name.startsWith("ik") ? "unocss" : t.name.includes(":") ? "iconify" : "svg";
133
+ }), h = {
130
134
  big: 24,
131
135
  default: 22,
132
136
  small: 20
133
137
  };
134
138
  function u() {
135
- return t.size ? g[t.size] || t.size : 18;
139
+ return t.size ? h[t.size] || t.size : 18;
136
140
  }
137
- const y = d(() => {
138
- const o = u(), a = typeof o == "number" ? `${o}px` : o;
141
+ const m = c(() => {
142
+ const i = u(), r = typeof i == "number" ? `${i}px` : i;
139
143
  return {
140
- width: a,
141
- height: a,
142
- fontSize: a
144
+ width: r,
145
+ height: r,
146
+ fontSize: r
143
147
  };
144
- }), m = d(() => {
145
- const a = `${Number.parseInt(u()) + 8}px`;
148
+ }), v = c(() => {
149
+ const r = `${Number.parseInt(u()) + 8}px`;
146
150
  return {
147
- width: a,
148
- height: a
151
+ width: r,
152
+ height: r
149
153
  };
150
154
  });
151
- function p(o) {
152
- t.onClick ? t.onClick(o) : n("click", o);
155
+ function b(i) {
156
+ t.onClick ? t.onClick(i) : l("click", i);
153
157
  }
154
- const x = d(() => {
155
- if (l.value !== "two-color-svg")
158
+ const y = c(() => {
159
+ if (n.value !== "two-color-svg")
156
160
  return {};
157
- const o = {};
161
+ const i = {};
158
162
  if (t.disabled)
159
- return o["--ik-icon-deep-color"] = "var(--ik-icon-deep-disabled)", o["--ik-icon-shallow-color"] = "var(--ik-icon-shallow-disabled)", o;
160
- if (t.deepColor && (o["--ik-icon-deep-color"] = t.deepColor), t.shallowColor && (o["--ik-icon-shallow-color"] = t.shallowColor), t.colorMode !== "auto")
163
+ return i["--ik-icon-deep-color"] = "var(--ik-icon-deep-disabled)", i["--ik-icon-shallow-color"] = "var(--ik-icon-shallow-disabled)", i;
164
+ if (t.deepColor && (i["--ik-icon-deep-color"] = t.deepColor), t.shallowColor && (i["--ik-icon-shallow-color"] = t.shallowColor), t.colorMode !== "auto")
161
165
  switch (t.colorMode) {
162
166
  case "primary":
163
- t.deepColor || (o["--ik-icon-deep-color"] = "var(--ik-color-primary)"), t.shallowColor || (o["--ik-icon-shallow-color"] = "var(--ik-primary-light-1, color-mix(in srgb, var(--ik-color-primary) 30%, white))");
167
+ t.deepColor || (i["--ik-icon-deep-color"] = "var(--ik-color-primary)"), t.shallowColor || (i["--ik-icon-shallow-color"] = "var(--ik-primary-light-1, color-mix(in srgb, var(--ik-color-primary) 30%, white))");
164
168
  break;
165
169
  case "deep":
166
- t.shallowColor || (o["--ik-icon-shallow-color"] = o["--ik-icon-deep-color"] || t.deepColor || "var(--ik-icon-deep-color)");
170
+ t.shallowColor || (i["--ik-icon-shallow-color"] = i["--ik-icon-deep-color"] || t.deepColor || "var(--ik-icon-deep-color)");
167
171
  break;
168
172
  case "shallow":
169
- t.deepColor || (o["--ik-icon-deep-color"] = o["--ik-icon-shallow-color"] || t.shallowColor || "var(--ik-icon-shallow-color)");
173
+ t.deepColor || (i["--ik-icon-deep-color"] = i["--ik-icon-shallow-color"] || t.shallowColor || "var(--ik-icon-shallow-color)");
170
174
  break;
171
175
  }
172
- return t.active && r.value !== "default" && !t.deepColor && !t.shallowColor && t.colorMode === "auto" && (o["--ik-icon-deep-color"] = `var(--ik-icon-${r.value}-deep-active)`, o["--ik-icon-shallow-color"] = `var(--ik-icon-${r.value}-shallow-active)`), o;
176
+ return t.active && s.value !== "default" && !t.deepColor && !t.shallowColor && t.colorMode === "auto" && (i["--ik-icon-deep-color"] = `var(--ik-icon-${s.value}-deep-active)`, i["--ik-icon-shallow-color"] = `var(--ik-icon-${s.value}-shallow-active)`), i;
173
177
  });
174
- return (o, a) => {
175
- var B;
176
- const G = N("IkTooltip");
177
- return s(), f(
178
+ return (i, r) => {
179
+ var j;
180
+ const W = S("IkTooltip");
181
+ return a(), d(
178
182
  "i",
179
183
  {
180
- class: C(k(E)(
184
+ class: C(p(O)(
181
185
  "ik-icon relative size-[1em] flex-inline items-center justify-center fill-current leading-[1em]",
182
186
  t.class,
183
187
  e.showBg ? "bg" : "",
184
188
  e.disabled ? "is-disabled" : "",
185
189
  e.active ? "is-active" : "",
186
- r.value !== "default" ? `is-${r.value}` : "",
190
+ s.value !== "default" ? `is-${s.value}` : "",
187
191
  e.unMargin ? "un-margin" : "margin",
188
192
  e.hover ? "is-hover" : ""
189
193
  )),
190
- style: v(e.showBg ? m.value : y.value),
191
- onClick: p
194
+ style: k(e.showBg ? v.value : m.value),
195
+ onClick: b
192
196
  },
193
197
  [
194
- e.title ? (s(), h(G, {
198
+ e.title ? (a(), g(W, {
195
199
  key: 0,
196
200
  text: e.title
197
201
  }, {
198
- default: b(() => {
199
- var T;
202
+ default: x(() => {
203
+ var L;
200
204
  return [
201
- l.value === "unocss" ? (s(), f(
205
+ n.value === "unocss" ? (a(), d(
202
206
  "i",
203
207
  {
204
208
  key: 0,
205
- class: C(["iconfont shrink-0 size-inherit", `${e.name} ${(T = e.name) == null ? void 0 : T.split("_")[0]}`]),
206
- style: v({ ...x.value, ...e.showBg ? y.value : {} })
209
+ class: C(["iconfont shrink-0 size-inherit", `${e.name} ${(L = e.name) == null ? void 0 : L.split("_")[0]}`]),
210
+ style: k({ ...y.value, ...e.showBg ? m.value : {} })
207
211
  },
208
212
  null,
209
213
  6
210
214
  /* CLASS, STYLE */
211
- )) : l.value === "iconify" ? (s(), h(k(U), {
215
+ )) : n.value === "iconify" ? (a(), g(p(N), {
212
216
  key: 1,
213
217
  icon: e.name,
214
218
  class: "shrink-0 size-inherit"
215
- }, null, 8, ["icon"])) : l.value === "svg" ? (s(), f("svg", q, [
216
- c("use", {
219
+ }, null, 8, ["icon"])) : n.value === "svg" ? (a(), d("svg", D, [
220
+ f("use", {
217
221
  "xlink:href": `#icon-${e.name}`
218
- }, null, 8, D)
219
- ])) : l.value === "two-color-svg" ? (s(), f(
222
+ }, null, 8, H)
223
+ ])) : n.value === "two-color-svg" ? (a(), d(
220
224
  "svg",
221
225
  {
222
226
  key: 3,
223
227
  class: "two-color-icon shrink-0 size-inherit",
224
- style: v(x.value),
228
+ style: k(y.value),
225
229
  "aria-hidden": "true"
226
230
  },
227
231
  [
228
- c("use", {
232
+ f("use", {
229
233
  "xlink:href": `#${e.name}`
230
- }, null, 8, H)
234
+ }, null, 8, J)
231
235
  ],
232
236
  4
233
237
  /* STYLE */
234
- )) : l.value === "img" ? (s(), h(k(j), {
238
+ )) : n.value === "img" ? (a(), g(p(A), {
235
239
  key: 4,
236
240
  src: e.name,
237
241
  class: "shrink-0"
238
242
  }, {
239
- loading: b(() => [...a[0] || (a[0] = [
240
- c(
243
+ loading: x(() => [...r[0] || (r[0] = [
244
+ f(
241
245
  "i",
242
246
  { class: "i-line-md:loading-loop size-inherit" },
243
247
  null,
@@ -245,8 +249,8 @@ const S = (e, i) => {
245
249
  /* CACHED */
246
250
  )
247
251
  ])]),
248
- error: b(() => [...a[1] || (a[1] = [
249
- c(
252
+ error: x(() => [...r[1] || (r[1] = [
253
+ f(
250
254
  "i",
251
255
  { class: "i-ph:image-broken-duotone size-inherit" },
252
256
  null,
@@ -261,55 +265,55 @@ const S = (e, i) => {
261
265
  }),
262
266
  _: 1
263
267
  /* STABLE */
264
- }, 8, ["text"])) : (s(), f(
265
- M,
268
+ }, 8, ["text"])) : (a(), d(
269
+ B,
266
270
  { key: 1 },
267
271
  [
268
- l.value === "unocss" ? (s(), f(
272
+ n.value === "unocss" ? (a(), d(
269
273
  "i",
270
274
  {
271
275
  key: 0,
272
- class: C(["iconfont shrink-0 size-inherit", `${e.name} ${(B = e.name) == null ? void 0 : B.split("_")[0]}`]),
273
- style: v({ ...x.value, ...e.showBg ? y.value : {} })
276
+ class: C(["iconfont shrink-0 size-inherit", `${e.name} ${(j = e.name) == null ? void 0 : j.split("_")[0]}`]),
277
+ style: k({ ...y.value, ...e.showBg ? m.value : {} })
274
278
  },
275
279
  null,
276
280
  6
277
281
  /* CLASS, STYLE */
278
- )) : l.value === "iconify" ? (s(), h(k(U), {
282
+ )) : n.value === "iconify" ? (a(), g(p(N), {
279
283
  key: 1,
280
284
  icon: e.name,
281
285
  class: "shrink-0 size-inherit"
282
- }, null, 8, ["icon"])) : l.value === "svg" ? (s(), f("svg", {
286
+ }, null, 8, ["icon"])) : n.value === "svg" ? (a(), d("svg", {
283
287
  key: 2,
284
288
  class: "shrink-0 size-inherit",
285
289
  size: e.size,
286
290
  "aria-hidden": "true"
287
291
  }, [
288
- c("use", {
292
+ f("use", {
289
293
  "xlink:href": `#icon-${e.name}`
290
- }, null, 8, J)
291
- ], 8, R)) : l.value === "two-color-svg" ? (s(), f(
294
+ }, null, 8, Q)
295
+ ], 8, K)) : n.value === "two-color-svg" ? (a(), d(
292
296
  "svg",
293
297
  {
294
298
  key: 3,
295
299
  class: "two-color-icon shrink-0 size-inherit",
296
- style: v(x.value),
300
+ style: k(y.value),
297
301
  "aria-hidden": "true"
298
302
  },
299
303
  [
300
- c("use", {
304
+ f("use", {
301
305
  "xlink:href": `#${e.name}`
302
- }, null, 8, K)
306
+ }, null, 8, X)
303
307
  ],
304
308
  4
305
309
  /* STYLE */
306
- )) : l.value === "img" ? (s(), h(k(j), {
310
+ )) : n.value === "img" ? (a(), g(p(A), {
307
311
  key: 4,
308
312
  src: e.name,
309
313
  class: "shrink-0"
310
314
  }, {
311
- loading: b(() => [...a[2] || (a[2] = [
312
- c(
315
+ loading: x(() => [...r[2] || (r[2] = [
316
+ f(
313
317
  "i",
314
318
  { class: "i-line-md:loading-loop size-inherit" },
315
319
  null,
@@ -317,8 +321,8 @@ const S = (e, i) => {
317
321
  /* CACHED */
318
322
  )
319
323
  ])]),
320
- error: b(() => [...a[3] || (a[3] = [
321
- c(
324
+ error: x(() => [...r[3] || (r[3] = [
325
+ f(
322
326
  "i",
323
327
  { class: "i-ph:image-broken-duotone size-inherit" },
324
328
  null,
@@ -339,12 +343,71 @@ const S = (e, i) => {
339
343
  );
340
344
  };
341
345
  }
342
- }), X = /* @__PURE__ */ S(Q, [["__scopeId", "data-v-7dee8b6e"]]), Y = O(X), Z = () => ({
343
- getLinearGradient: (i) => {
344
- const t = F.hexToRGB(i).replace(/[^\d,]/g, "").split(",").map(Number);
345
- return `linear-gradient(to top, ${i} 4%, rgb(${t[0]},${t[1] + 50},${t[2]}) 88%)`;
346
+ }), Z = /* @__PURE__ */ T(Y, [["__scopeId", "data-v-7dee8b6e"]]), _ = U(Z), ee = { class: "text-sm text-white bg-[var(--el-avatar-bg-color)] flex-center h-full w-full" }, te = /* @__PURE__ */ I({
347
+ name: "IkAvatar",
348
+ __name: "index",
349
+ props: {
350
+ src: {},
351
+ name: {},
352
+ size: { default: 40 },
353
+ shape: { default: "circle" },
354
+ fit: { default: "fill" },
355
+ alt: {},
356
+ loadUrl: {}
357
+ },
358
+ setup(e) {
359
+ const o = e, t = c(() => {
360
+ var m;
361
+ return ((m = o.name) == null ? void 0 : m.slice(-1)) || "";
362
+ }), { cLoadUrl: l } = V(o), s = c(() => q(l.value, o.src || "")), n = c(() => o.src ? [s.value] : []), h = E(!1);
363
+ function u() {
364
+ o.src && (h.value = !0);
365
+ }
366
+ return (m, v) => {
367
+ const b = S("ElAvatar"), y = S("el-image-viewer");
368
+ return a(), d(
369
+ B,
370
+ null,
371
+ [
372
+ F(b, {
373
+ src: e.src,
374
+ size: e.size,
375
+ shape: e.shape,
376
+ fit: e.fit,
377
+ style: k({ "--el-avatar-bg-color": s.value ? "var(--ik-form-bg)" : "var(--ik-color-primary)" }),
378
+ onClick: u
379
+ }, {
380
+ default: x(() => [
381
+ f(
382
+ "span",
383
+ ee,
384
+ $(t.value),
385
+ 1
386
+ /* TEXT */
387
+ )
388
+ ]),
389
+ _: 1
390
+ /* STABLE */
391
+ }, 8, ["src", "size", "shape", "fit", "style"]),
392
+ h.value ? (a(), g(y, {
393
+ key: 0,
394
+ "url-list": n.value,
395
+ "show-progress": "",
396
+ teleported: "",
397
+ onClose: v[0] || (v[0] = (i) => h.value = !1)
398
+ }, null, 8, ["url-list"])) : w("v-if", !0)
399
+ ],
400
+ 64
401
+ /* STABLE_FRAGMENT */
402
+ );
403
+ };
404
+ }
405
+ }), oe = U(te), ie = () => ({
406
+ getLinearGradient: (o) => {
407
+ const t = R.hexToRGB(o).replace(/[^\d,]/g, "").split(",").map(Number);
408
+ return `linear-gradient(to top, ${o} 4%, rgb(${t[0]},${t[1] + 50},${t[2]}) 88%)`;
346
409
  }
347
- }), _ = /* @__PURE__ */ I({
410
+ }), le = /* @__PURE__ */ I({
348
411
  __name: "IkLinearIcon",
349
412
  props: {
350
413
  icon: {
@@ -361,18 +424,18 @@ const S = (e, i) => {
361
424
  }
362
425
  },
363
426
  setup(e) {
364
- V((r) => ({
365
- v435077c3: n.value
427
+ G((s) => ({
428
+ v435077c3: l.value
366
429
  }));
367
- const i = e, { getLinearGradient: t } = Z(), n = d(() => `${i.size}px`);
368
- return (r, l) => (s(), f(
430
+ const o = e, { getLinearGradient: t } = ie(), l = c(() => `${o.size}px`);
431
+ return (s, n) => (a(), d(
369
432
  "div",
370
433
  {
371
434
  class: "form-icon",
372
- style: v({ backgroundImage: k(t)(e.backgroundColor || "#28b8a4") })
435
+ style: k({ backgroundImage: p(t)(e.backgroundColor || "#28b8a4") })
373
436
  },
374
437
  [
375
- c(
438
+ f(
376
439
  "i",
377
440
  {
378
441
  class: C(`ikflow ${e.icon}`)
@@ -386,7 +449,7 @@ const S = (e, i) => {
386
449
  /* STYLE */
387
450
  ));
388
451
  }
389
- }), ee = /* @__PURE__ */ S(_, [["__scopeId", "data-v-0bc5a180"]]), te = { class: "side-text items-center" }, oe = { class: "side-left flex items-center" }, ie = { class: "side-right" }, ne = { class: "text-over-line" }, le = { class: "text-over-line sub-title" }, ae = /* @__PURE__ */ I({
452
+ }), ne = /* @__PURE__ */ T(le, [["__scopeId", "data-v-0bc5a180"]]), ae = { class: "side-text items-center" }, se = { class: "side-left flex items-center" }, re = { class: "side-right" }, ce = { class: "text-over-line" }, ue = { class: "text-over-line sub-title" }, fe = /* @__PURE__ */ I({
390
453
  __name: "IkSideText",
391
454
  props: {
392
455
  // 名称
@@ -441,32 +504,35 @@ const S = (e, i) => {
441
504
  loadUrl: {
442
505
  type: String,
443
506
  default: ""
507
+ },
508
+ fit: {
509
+ type: String,
510
+ default: "cover"
444
511
  }
445
512
  },
446
513
  setup(e) {
447
- const i = e, { cLoadUrl: t } = P(i), n = (u) => u ? u.startsWith("http") ? u : `${t.value}${u}` : "", r = d(() => n(i.avatar)), l = W(!!i.avatar), g = () => {
448
- l.value = !1;
514
+ const o = e, { cLoadUrl: t } = V(o), l = (u) => u ? u.startsWith("http") ? u : `${t.value}${u}` : "", s = c(() => l(o.avatar)), n = E(!!o.avatar), h = () => {
515
+ n.value = !1;
449
516
  };
450
- return (u, y) => {
451
- var p;
452
- const m = N("el-avatar");
453
- return s(), f("div", te, [
454
- c("div", oe, [
455
- e.avatarType === "url" ? (s(), h(m, {
517
+ return (u, m) => {
518
+ var v;
519
+ return a(), d("div", ae, [
520
+ f("div", se, [
521
+ e.avatarType === "url" ? (a(), g(p(oe), {
456
522
  key: 0,
457
- style: v({ "--el-avatar-bg-color": r.value ? "var(--ik-form-bg)" : "var(--ik-color-primary)" }),
523
+ style: k({ "--el-avatar-bg-color": s.value ? "var(--ik-form-bg)" : "var(--ik-color-primary)" }),
458
524
  size: e.size,
459
525
  shape: e.shape,
460
- src: r.value,
461
- fit: "contain",
462
- onError: g
526
+ src: s.value,
527
+ fit: e.fit,
528
+ onError: h
463
529
  }, {
464
- default: b(() => [
465
- l.value ? w("v-if", !0) : (s(), f(
466
- M,
530
+ default: x(() => [
531
+ n.value ? w("v-if", !0) : (a(), d(
532
+ B,
467
533
  { key: 0 },
468
534
  [
469
- A(
535
+ P(
470
536
  $(e.name.slice(-2)),
471
537
  1
472
538
  /* TEXT */
@@ -478,32 +544,32 @@ const S = (e, i) => {
478
544
  ]),
479
545
  _: 1
480
546
  /* STABLE */
481
- }, 8, ["style", "size", "shape", "src"])) : w("v-if", !0),
482
- e.avatarType === "icon" ? (s(), h(k(Y), {
547
+ }, 8, ["style", "size", "shape", "src", "fit"])) : w("v-if", !0),
548
+ e.avatarType === "icon" ? (a(), g(p(_), {
483
549
  key: 1,
484
- name: `iksvg_${(p = e.avatar) == null ? void 0 : p.replace("iksvg_", "")}`,
550
+ name: `iksvg_${(v = e.avatar) == null ? void 0 : v.replace("iksvg_", "")}`,
485
551
  "show-bg": e.showIconBg,
486
552
  type: e.iconType,
487
- style: v({ fontSize: e.showIconBg ? "34px" : "40px" }),
553
+ style: k({ fontSize: e.showIconBg ? "34px" : "40px" }),
488
554
  size: e.iconSize
489
555
  }, null, 8, ["name", "show-bg", "type", "style", "size"])) : w("v-if", !0),
490
- e.avatarType === "linearIcon" ? (s(), h(ee, {
556
+ e.avatarType === "linearIcon" ? (a(), g(ne, {
491
557
  key: 2,
492
558
  icon: e.avatar,
493
559
  "background-color": e.iconBackgroundColor
494
560
  }, null, 8, ["icon", "background-color"])) : w("v-if", !0)
495
561
  ]),
496
- c("div", ie, [
497
- c(
562
+ f("div", re, [
563
+ f(
498
564
  "p",
499
- ne,
565
+ ce,
500
566
  $(e.text),
501
567
  1
502
568
  /* TEXT */
503
569
  ),
504
- c(
570
+ f(
505
571
  "p",
506
- le,
572
+ ue,
507
573
  $(e.subText),
508
574
  1
509
575
  /* TEXT */
@@ -512,8 +578,8 @@ const S = (e, i) => {
512
578
  ]);
513
579
  };
514
580
  }
515
- }), se = /* @__PURE__ */ S(ae, [["__scopeId", "data-v-13c30ce6"]]), fe = O(se);
581
+ }), de = /* @__PURE__ */ T(fe, [["__scopeId", "data-v-ac7ef2be"]]), ge = U(de);
516
582
  export {
517
- fe as IkSideText,
518
- fe as default
583
+ ge as IkSideText,
584
+ ge as default
519
585
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as j, computed as d, resolveComponent as O, openBlock as n, createElementBlock as c, normalizeStyle as f, normalizeClass as y, unref as h, createBlock as k, withCtx as m, createElementVNode as u, createCommentVNode as C, Fragment as T } from "vue";
1
+ import { defineComponent as M, computed as d, resolveComponent as O, openBlock as n, createElementBlock as c, normalizeStyle as f, normalizeClass as y, unref as h, createBlock as k, withCtx as m, createElementVNode as u, createCommentVNode as C, Fragment as T } from "vue";
2
2
  import { Icon as b } from "@iconify/vue";
3
3
  import { UseImage as x } from "@vueuse/components";
4
- const N = (i, r) => (i.install = (e) => {
4
+ const A = (i, r) => (i.install = (e) => {
5
5
  for (const t of [i, ...Object.values({})])
6
6
  e.component(t.name, t);
7
7
  }, i);
@@ -20,16 +20,16 @@ function B(...i) {
20
20
  }
21
21
  return r.join(" ");
22
22
  }
23
- const W = {
23
+ const N = {
24
24
  key: 2,
25
25
  class: "shrink-0 size-inherit",
26
26
  "aria-hidden": "true"
27
- }, A = ["xlink:href"], E = ["xlink:href"], F = ["size"], V = ["xlink:href"], P = ["xlink:href"], U = /* @__PURE__ */ j({
27
+ }, W = ["xlink:href"], E = ["xlink:href"], F = ["size"], V = ["xlink:href"], P = ["xlink:href"], U = /* @__PURE__ */ M({
28
28
  name: "IkSvgIcon",
29
29
  __name: "index",
30
30
  props: {
31
31
  name: {},
32
- class: {},
32
+ class: { type: [Boolean, null, String, Object, Array] },
33
33
  showBg: { type: Boolean, default: !1 },
34
34
  disabled: { type: Boolean, default: !1 },
35
35
  size: {},
@@ -99,7 +99,7 @@ const W = {
99
99
  });
100
100
  return (o, l) => {
101
101
  var z;
102
- const M = O("IkTooltip");
102
+ const j = O("IkTooltip");
103
103
  return n(), c(
104
104
  "i",
105
105
  {
@@ -117,7 +117,7 @@ const W = {
117
117
  onClick: S
118
118
  },
119
119
  [
120
- i.title ? (n(), k(M, {
120
+ i.title ? (n(), k(j, {
121
121
  key: 0,
122
122
  text: i.title
123
123
  }, {
@@ -138,10 +138,10 @@ const W = {
138
138
  key: 1,
139
139
  icon: i.name,
140
140
  class: "shrink-0 size-inherit"
141
- }, null, 8, ["icon"])) : s.value === "svg" ? (n(), c("svg", W, [
141
+ }, null, 8, ["icon"])) : s.value === "svg" ? (n(), c("svg", N, [
142
142
  u("use", {
143
143
  "xlink:href": `#icon-${i.name}`
144
- }, null, 8, A)
144
+ }, null, 8, W)
145
145
  ])) : s.value === "two-color-svg" ? (n(), c(
146
146
  "svg",
147
147
  {
@@ -270,7 +270,7 @@ const W = {
270
270
  for (const [t, a] of r)
271
271
  e[t] = a;
272
272
  return e;
273
- }, D = /* @__PURE__ */ q(U, [["__scopeId", "data-v-7dee8b6e"]]), K = N(D);
273
+ }, D = /* @__PURE__ */ q(U, [["__scopeId", "data-v-7dee8b6e"]]), K = A(D);
274
274
  export {
275
275
  K as IkSvgIcon,
276
276
  K as default