@huyooo/ui 0.1.11 → 0.1.14

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.
@@ -0,0 +1,22 @@
1
+ import { PropType } from 'vue';
2
+ declare function __VLS_template(): {
3
+ default?(_: {}): any;
4
+ };
5
+ declare const __VLS_component: import('vue').DefineComponent<{
6
+ activeKeys: {
7
+ type: PropType<number[]>;
8
+ required: true;
9
+ };
10
+ }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
11
+ activeKeys: {
12
+ type: PropType<number[]>;
13
+ required: true;
14
+ };
15
+ }>>, {}, {}>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,39 @@
1
+ declare function __VLS_template(): {
2
+ header?(_: {}): any;
3
+ default?(_: {}): any;
4
+ };
5
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
6
+ index: number;
7
+ }>, {
8
+ index: number;
9
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
10
+ index: number;
11
+ }>, {
12
+ index: number;
13
+ }>>>, {
14
+ index: number;
15
+ }, {}>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
17
+ export default _default;
18
+ type __VLS_WithDefaults<P, D> = {
19
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
20
+ default: D[K];
21
+ }> : P[K];
22
+ };
23
+ type __VLS_Prettify<T> = {
24
+ [K in keyof T]: T[K];
25
+ } & {};
26
+ type __VLS_WithTemplateSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
31
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
32
+ type __VLS_TypePropsToOption<T> = {
33
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
34
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
35
+ } : {
36
+ type: import('vue').PropType<T[K]>;
37
+ required: true;
38
+ };
39
+ };
@@ -0,0 +1,27 @@
1
+ declare const _default: import('vue').DefineComponent<{
2
+ title: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ default: () => string;
6
+ };
7
+ description: {
8
+ type: StringConstructor;
9
+ required: true;
10
+ default: () => string;
11
+ };
12
+ }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
13
+ title: {
14
+ type: StringConstructor;
15
+ required: true;
16
+ default: () => string;
17
+ };
18
+ description: {
19
+ type: StringConstructor;
20
+ required: true;
21
+ default: () => string;
22
+ };
23
+ }>>, {
24
+ title: string;
25
+ description: string;
26
+ }, {}>;
27
+ export default _default;
@@ -0,0 +1,79 @@
1
+ declare const _default: import('vue').DefineComponent<{
2
+ width: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ height: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ zIndex: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ top: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ left: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ right: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ blur: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ background: {
31
+ type: StringConstructor;
32
+ required: false;
33
+ default: () => string;
34
+ };
35
+ }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
36
+ width: {
37
+ type: StringConstructor;
38
+ default: string;
39
+ };
40
+ height: {
41
+ type: StringConstructor;
42
+ default: string;
43
+ };
44
+ zIndex: {
45
+ type: StringConstructor;
46
+ default: string;
47
+ };
48
+ top: {
49
+ type: StringConstructor;
50
+ default: string;
51
+ };
52
+ left: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ };
56
+ right: {
57
+ type: StringConstructor;
58
+ default: string;
59
+ };
60
+ blur: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ };
64
+ background: {
65
+ type: StringConstructor;
66
+ required: false;
67
+ default: () => string;
68
+ };
69
+ }>>, {
70
+ width: string;
71
+ height: string;
72
+ zIndex: string;
73
+ top: string;
74
+ left: string;
75
+ right: string;
76
+ blur: string;
77
+ background: string;
78
+ }, {}>;
79
+ export default _default;
@@ -0,0 +1,11 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ };
4
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
5
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
6
+ export default _default;
7
+ type __VLS_WithTemplateSlots<T, S> = T & {
8
+ new (): {
9
+ $slots: S;
10
+ };
11
+ };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { defineComponent as b, computed as _, openBlock as a, createElementBlock as l, createElementVNode as M, getCurrentScope as O, onScopeDispose as E, unref as w, ref as m, watch as N, getCurrentInstance as V, onMounted as W, createVNode as q, createCommentVNode as d } from "vue";
2
- import { Spin as A } from "@arco-design/web-vue";
3
- const D = { class: "SvgIcon" }, G = ["href", "fill"], L = /* @__PURE__ */ b({
1
+ import { defineComponent as p, computed as a, openBlock as l, createElementBlock as c, createElementVNode as u, getCurrentScope as G, onScopeDispose as K, unref as w, ref as d, watch as O, getCurrentInstance as P, onMounted as q, createVNode as B, createCommentVNode as m, provide as A, renderSlot as y, inject as I, normalizeClass as C, normalizeStyle as x, toDisplayString as E } from "vue";
2
+ import { Spin as V } from "@arco-design/web-vue";
3
+ const D = { class: "SvgIcon" }, H = ["href", "fill"], F = /* @__PURE__ */ p({
4
4
  __name: "SvgIcon",
5
5
  props: {
6
6
  prefix: {
@@ -20,97 +20,97 @@ const D = { class: "SvgIcon" }, G = ["href", "fill"], L = /* @__PURE__ */ b({
20
20
  }
21
21
  },
22
22
  setup(e) {
23
- const n = e, t = _(() => `#${n.prefix ?? "icon"}-${n.name}`);
24
- return (r, o) => (a(), l("svg", D, [
25
- M("use", {
26
- href: t.value,
27
- fill: n.color
28
- }, null, 8, G)
23
+ const t = e, n = a(() => `#${t.prefix ?? "icon"}-${t.name}`);
24
+ return (o, s) => (l(), c("svg", D, [
25
+ u("use", {
26
+ href: n.value,
27
+ fill: t.color
28
+ }, null, 8, H)
29
29
  ]));
30
30
  }
31
- }), k = (e, n) => {
32
- const t = e.__vccOpts || e;
33
- for (const [r, o] of n)
34
- t[r] = o;
35
- return t;
36
- }, Y = /* @__PURE__ */ k(L, [["__scopeId", "data-v-003a51d4"]]);
31
+ }), f = (e, t) => {
32
+ const n = e.__vccOpts || e;
33
+ for (const [o, s] of t)
34
+ n[o] = s;
35
+ return n;
36
+ }, Le = /* @__PURE__ */ f(F, [["__scopeId", "data-v-003a51d4"]]);
37
37
  function T(e) {
38
- return O() ? (E(e), !0) : !1;
38
+ return G() ? (K(e), !0) : !1;
39
39
  }
40
- function x(e) {
40
+ function W(e) {
41
41
  return typeof e == "function" ? e() : w(e);
42
42
  }
43
- const j = typeof window < "u" && typeof document < "u";
43
+ const X = typeof window < "u" && typeof document < "u";
44
44
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
45
- const z = (e) => e != null, p = () => {
46
- }, F = j ? window : void 0;
47
- function v(e) {
48
- var n;
49
- const t = x(e);
50
- return (n = t == null ? void 0 : t.$el) != null ? n : t;
45
+ const J = (e) => e != null, $ = () => {
46
+ }, Q = X ? window : void 0;
47
+ function k(e) {
48
+ var t;
49
+ const n = W(e);
50
+ return (t = n == null ? void 0 : n.$el) != null ? t : n;
51
51
  }
52
- function H() {
53
- const e = m(!1), n = V();
54
- return n && W(() => {
52
+ function U() {
53
+ const e = d(!1), t = P();
54
+ return t && q(() => {
55
55
  e.value = !0;
56
- }, n), e;
56
+ }, t), e;
57
57
  }
58
- function J(e) {
59
- const n = H();
60
- return _(() => (n.value, !!e()));
58
+ function Y(e) {
59
+ const t = U();
60
+ return a(() => (t.value, !!e()));
61
61
  }
62
- function K(e, n, t = {}) {
62
+ function Z(e, t, n = {}) {
63
63
  const {
64
- root: r,
65
- rootMargin: o = "0px",
66
- threshold: c = 0,
67
- window: f = F,
64
+ root: o,
65
+ rootMargin: s = "0px",
66
+ threshold: i = 0,
67
+ window: r = Q,
68
68
  immediate: g = !0
69
- } = t, h = J(() => f && "IntersectionObserver" in f), $ = _(() => {
70
- const i = x(e);
71
- return (Array.isArray(i) ? i : [i]).map(v).filter(z);
69
+ } = n, S = Y(() => r && "IntersectionObserver" in r), j = a(() => {
70
+ const v = W(e);
71
+ return (Array.isArray(v) ? v : [v]).map(k).filter(J);
72
72
  });
73
- let u = p;
74
- const s = m(g), B = h.value ? N(
75
- () => [$.value, v(r), s.value],
76
- ([i, C]) => {
77
- if (u(), !s.value || !i.length)
73
+ let h = $;
74
+ const _ = d(g), M = S.value ? O(
75
+ () => [j.value, k(o), _.value],
76
+ ([v, R]) => {
77
+ if (h(), !_.value || !v.length)
78
78
  return;
79
- const S = new IntersectionObserver(
80
- n,
79
+ const L = new IntersectionObserver(
80
+ t,
81
81
  {
82
- root: v(C),
83
- rootMargin: o,
84
- threshold: c
82
+ root: k(R),
83
+ rootMargin: s,
84
+ threshold: i
85
85
  }
86
86
  );
87
- i.forEach((I) => I && S.observe(I)), u = () => {
88
- S.disconnect(), u = p;
87
+ v.forEach((N) => N && L.observe(N)), h = () => {
88
+ L.disconnect(), h = $;
89
89
  };
90
90
  },
91
91
  { immediate: g, flush: "post" }
92
- ) : p, y = () => {
93
- u(), B(), s.value = !1;
92
+ ) : $, z = () => {
93
+ h(), M(), _.value = !1;
94
94
  };
95
- return T(y), {
96
- isSupported: h,
97
- isActive: s,
95
+ return T(z), {
96
+ isSupported: S,
97
+ isActive: _,
98
98
  pause() {
99
- u(), s.value = !1;
99
+ h(), _.value = !1;
100
100
  },
101
101
  resume() {
102
- s.value = !0;
102
+ _.value = !0;
103
103
  },
104
- stop: y
104
+ stop: z
105
105
  };
106
106
  }
107
- const P = {
107
+ const ee = {
108
108
  key: 0,
109
109
  class: "loading"
110
- }, Q = {
110
+ }, te = {
111
111
  key: 1,
112
112
  class: "none"
113
- }, R = /* @__PURE__ */ b({
113
+ }, ne = /* @__PURE__ */ p({
114
114
  __name: "InfiniteLoading",
115
115
  props: {
116
116
  loading: {
@@ -123,31 +123,265 @@ const P = {
123
123
  }
124
124
  },
125
125
  emits: ["infinite"],
126
- setup(e, { emit: n }) {
127
- const t = e, r = n, o = m(null);
128
- return K(
129
- o,
130
- ([{ isIntersecting: c }]) => {
131
- c && !t.loading && !t.finished && (console.log(c, "isIntersecting"), r("infinite"));
126
+ setup(e, { emit: t }) {
127
+ const n = e, o = t, s = d(null);
128
+ return Z(
129
+ s,
130
+ ([{ isIntersecting: i }]) => {
131
+ i && !n.loading && !n.finished && (console.log(i, "isIntersecting"), o("infinite"));
132
132
  },
133
133
  {
134
134
  threshold: 0
135
135
  }
136
- ), (c, f) => (a(), l("div", {
136
+ ), (i, r) => (l(), c("div", {
137
137
  class: "infinite-loading",
138
138
  ref_key: "container",
139
- ref: o
139
+ ref: s
140
140
  }, [
141
- e.loading ? (a(), l("div", P, [
142
- q(w(A), { tip: "数据加载中..." })
143
- ])) : d("", !0),
144
- e.finished ? (a(), l("div", Q, [
145
- d("", !0)
146
- ])) : d("", !0)
141
+ e.loading ? (l(), c("div", ee, [
142
+ B(w(V), { tip: "数据加载中..." })
143
+ ])) : m("", !0),
144
+ e.finished ? (l(), c("div", te, [
145
+ m("", !0)
146
+ ])) : m("", !0)
147
147
  ], 512));
148
148
  }
149
- }), Z = /* @__PURE__ */ k(R, [["__scopeId", "data-v-ffa0deb7"]]);
149
+ }), Ne = /* @__PURE__ */ f(ne, [["__scopeId", "data-v-ffa0deb7"]]), oe = /* @__PURE__ */ p({
150
+ __name: "Collapse",
151
+ props: {
152
+ activeKeys: {
153
+ type: Array,
154
+ required: !0
155
+ }
156
+ },
157
+ setup(e) {
158
+ const t = e, n = d(), o = d(new Set(t.activeKeys));
159
+ A("expandedIndexes", o);
160
+ const s = d(0);
161
+ return A("slotsCount", s), q(() => {
162
+ s.value = n.value.children.length;
163
+ }), O(
164
+ () => t.activeKeys,
165
+ (i) => {
166
+ o.value = new Set(i);
167
+ }
168
+ ), (i, r) => (l(), c("div", {
169
+ class: "collapse-container",
170
+ ref_key: "collapseRef",
171
+ ref: n
172
+ }, [
173
+ y(i.$slots, "default", {}, void 0, !0)
174
+ ], 512));
175
+ }
176
+ }), Ae = /* @__PURE__ */ f(oe, [["__scopeId", "data-v-37af01ec"]]), se = Symbol("ArcoConfigProvider"), ie = "arco", re = "$arco", le = (e) => {
177
+ var t, n, o;
178
+ const s = P(), i = I(se, void 0);
179
+ return `${(o = (n = i == null ? void 0 : i.prefixCls) != null ? n : (t = s == null ? void 0 : s.appContext.config.globalProperties[re]) == null ? void 0 : t.classPrefix) != null ? o : ie}-${e}`;
180
+ }, ce = Object.prototype.toString;
181
+ function ae(e) {
182
+ return ce.call(e) === "[object Number]" && e === e;
183
+ }
184
+ var ue = (e, t) => {
185
+ for (const [n, o] of t)
186
+ e[n] = o;
187
+ return e;
188
+ };
189
+ const de = p({
190
+ name: "IconRight",
191
+ props: {
192
+ size: {
193
+ type: [Number, String]
194
+ },
195
+ strokeWidth: {
196
+ type: Number,
197
+ default: 4
198
+ },
199
+ strokeLinecap: {
200
+ type: String,
201
+ default: "butt",
202
+ validator: (e) => ["butt", "round", "square"].includes(e)
203
+ },
204
+ strokeLinejoin: {
205
+ type: String,
206
+ default: "miter",
207
+ validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
208
+ },
209
+ rotate: Number,
210
+ spin: Boolean
211
+ },
212
+ emits: {
213
+ click: (e) => !0
214
+ },
215
+ setup(e, { emit: t }) {
216
+ const n = le("icon"), o = a(() => [n, `${n}-right`, { [`${n}-spin`]: e.spin }]), s = a(() => {
217
+ const r = {};
218
+ return e.size && (r.fontSize = ae(e.size) ? `${e.size}px` : e.size), e.rotate && (r.transform = `rotate(${e.rotate}deg)`), r;
219
+ });
220
+ return {
221
+ cls: o,
222
+ innerStyle: s,
223
+ onClick: (r) => {
224
+ t("click", r);
225
+ }
226
+ };
227
+ }
228
+ }), pe = ["stroke-width", "stroke-linecap", "stroke-linejoin"], fe = /* @__PURE__ */ u("path", { d: "m16 39.513 15.556-15.557L16 8.4" }, null, -1), _e = [
229
+ fe
230
+ ];
231
+ function ve(e, t, n, o, s, i) {
232
+ return l(), c("svg", {
233
+ viewBox: "0 0 48 48",
234
+ fill: "none",
235
+ xmlns: "http://www.w3.org/2000/svg",
236
+ stroke: "currentColor",
237
+ class: C(e.cls),
238
+ style: x(e.innerStyle),
239
+ "stroke-width": e.strokeWidth,
240
+ "stroke-linecap": e.strokeLinecap,
241
+ "stroke-linejoin": e.strokeLinejoin,
242
+ onClick: t[0] || (t[0] = (...r) => e.onClick && e.onClick(...r))
243
+ }, _e, 14, pe);
244
+ }
245
+ var b = /* @__PURE__ */ ue(de, [["render", ve]]);
246
+ const ge = Object.assign(b, {
247
+ install: (e, t) => {
248
+ var n;
249
+ const o = (n = t == null ? void 0 : t.iconPrefix) != null ? n : "";
250
+ e.component(o + b.name, b);
251
+ }
252
+ }), he = {
253
+ key: 0,
254
+ class: "collapse-content"
255
+ }, me = /* @__PURE__ */ p({
256
+ __name: "CollapseItem",
257
+ props: {
258
+ index: { default: 0 }
259
+ },
260
+ setup(e) {
261
+ const t = e, n = I("slotsCount", d(0)), o = I("expandedIndexes"), s = a(() => t.index === n.value - 1), i = a(() => o.value.has(t.index)), r = () => {
262
+ o && (i.value ? o.value.delete(t.index) : o.value.add(t.index));
263
+ };
264
+ return (g, S) => (l(), c("div", {
265
+ class: C(["collapse-item", { "no-border": s.value }])
266
+ }, [
267
+ u("button", {
268
+ class: "collapse-header",
269
+ onClick: r
270
+ }, [
271
+ u("span", null, [
272
+ y(g.$slots, "header", {}, void 0, !0)
273
+ ]),
274
+ u("span", {
275
+ class: C(["collapse-icon", { rotated: i.value }])
276
+ }, [
277
+ B(w(ge))
278
+ ], 2)
279
+ ]),
280
+ i.value ? (l(), c("div", he, [
281
+ y(g.$slots, "default", {}, void 0, !0)
282
+ ])) : m("", !0)
283
+ ], 2));
284
+ }
285
+ }), Ee = /* @__PURE__ */ f(me, [["__scopeId", "data-v-f2e1f58c"]]), ye = { class: "ContentHead" }, Se = { class: "title" }, $e = {
286
+ key: 0,
287
+ class: "description"
288
+ }, ke = /* @__PURE__ */ p({
289
+ __name: "ContentHead",
290
+ props: {
291
+ title: {
292
+ type: String,
293
+ required: !0,
294
+ default: () => ""
295
+ },
296
+ description: {
297
+ type: String,
298
+ required: !0,
299
+ default: () => ""
300
+ }
301
+ },
302
+ setup(e) {
303
+ const t = e;
304
+ return (n, o) => (l(), c("div", ye, [
305
+ u("h1", Se, E(t.title), 1),
306
+ t.description ? (l(), c("p", $e, E(t.description), 1)) : m("", !0)
307
+ ]));
308
+ }
309
+ }), Oe = /* @__PURE__ */ f(ke, [["__scopeId", "data-v-f1ddfae6"]]), be = /* @__PURE__ */ p({
310
+ __name: "Ellipsis",
311
+ props: {
312
+ width: {
313
+ type: String,
314
+ default: "100%"
315
+ },
316
+ height: {
317
+ type: String,
318
+ default: "100%"
319
+ },
320
+ zIndex: {
321
+ type: String,
322
+ default: "-1"
323
+ },
324
+ top: {
325
+ type: String,
326
+ default: "10%"
327
+ },
328
+ left: {
329
+ type: String,
330
+ default: "0%"
331
+ },
332
+ right: {
333
+ type: String,
334
+ default: "auto"
335
+ },
336
+ blur: {
337
+ type: String,
338
+ default: "0px"
339
+ },
340
+ background: {
341
+ type: String,
342
+ required: !1,
343
+ default: () => "linear-gradient(180deg, rgb(0 225 10 / 10%) 0.31%, rgb(26 214 255 / 52%) 74.99%, rgb(220 189 0 / 0%) 99.69%)"
344
+ }
345
+ },
346
+ setup(e) {
347
+ const t = e, n = a(() => ({
348
+ pointerEvents: "none",
349
+ position: "absolute",
350
+ zIndex: t.zIndex,
351
+ width: t.width,
352
+ height: t.height,
353
+ filter: `blur(${t.blur})`
354
+ })), o = a(() => ({
355
+ width: "100%",
356
+ height: "100%",
357
+ background: t.background
358
+ // background: `linear-gradient(180deg, #D5D1FF 0.31%, #EAEDFF 74.99%, rgba(240, 246, 255, 0) 99.69%)`,
359
+ // background: `linear-gradient(180deg, rgb(0 225 10 / 63%) 0.31%, rgb(26 214 255 / 52%) 74.99%, rgb(220 189 0 / 0%) 99.69%)`,
360
+ // background: `linear-gradient(315deg, rgb(0 225 10 / 63%) 10%, rgb(26 214 255 / 52%) 50%, rgb(220 189 0 / 37%) 100%)`,
361
+ }));
362
+ return (s, i) => (l(), c("div", {
363
+ class: "ellipsis",
364
+ style: x(n.value)
365
+ }, [
366
+ u("div", {
367
+ class: "ellipsis-item",
368
+ style: x(o.value)
369
+ }, null, 4)
370
+ ], 4));
371
+ }
372
+ }), Pe = /* @__PURE__ */ f(be, [["__scopeId", "data-v-470c9c2f"]]), Ie = {}, Ce = { class: "WidthContainer" };
373
+ function xe(e, t) {
374
+ return l(), c("div", Ce, [
375
+ y(e.$slots, "default", {}, void 0, !0)
376
+ ]);
377
+ }
378
+ const qe = /* @__PURE__ */ f(Ie, [["render", xe], ["__scopeId", "data-v-1e360997"]]);
150
379
  export {
151
- Z as InfiniteLoading,
152
- Y as SvgIcon
380
+ Ae as Collapse,
381
+ Ee as CollapseItem,
382
+ Oe as ContentHead,
383
+ Pe as Ellipsis,
384
+ Ne as InfiniteLoading,
385
+ Le as SvgIcon,
386
+ qe as WidthContainer
153
387
  };
@@ -1 +1 @@
1
- (function(i,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@arco-design/web-vue")):typeof define=="function"&&define.amd?define(["exports","vue","@arco-design/web-vue"],e):(i=typeof globalThis<"u"?globalThis:i||self,e(i.ui={},i.Vue,i.webVue))})(this,function(i,e,k){"use strict";const I={class:"SvgIcon"},w=["href","fill"],B=e.defineComponent({__name:"SvgIcon",props:{prefix:{type:String,required:!1,default:"icon"},name:{type:String,required:!0,default:()=>""},color:{type:String,required:!1,default:"#333"}},setup(n){const t=n,o=e.computed(()=>`#${t.prefix??"icon"}-${t.name}`);return(s,r)=>(e.openBlock(),e.createElementBlock("svg",I,[e.createElementVNode("use",{href:o.value,fill:t.color},null,8,w)]))}}),m=(n,t)=>{const o=n.__vccOpts||n;for(const[s,r]of t)o[s]=r;return o},v=m(B,[["__scopeId","data-v-003a51d4"]]);function C(n){return e.getCurrentScope()?(e.onScopeDispose(n),!0):!1}function _(n){return typeof n=="function"?n():e.unref(n)}const V=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const x=n=>n!=null,d=()=>{},E=V?window:void 0;function u(n){var t;const o=_(n);return(t=o==null?void 0:o.$el)!=null?t:o}function M(){const n=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{n.value=!0},t),n}function N(n){const t=M();return e.computed(()=>(t.value,!!n()))}function O(n,t,o={}){const{root:s,rootMargin:r="0px",threshold:l=0,window:p=E,immediate:g=!0}=o,h=N(()=>p&&"IntersectionObserver"in p),W=e.computed(()=>{const a=_(n);return(Array.isArray(a)?a:[a]).map(u).filter(x)});let f=d;const c=e.ref(g),A=h.value?e.watch(()=>[W.value,u(s),c.value],([a,L])=>{if(f(),!c.value||!a.length)return;const S=new IntersectionObserver(t,{root:u(L),rootMargin:r,threshold:l});a.forEach(b=>b&&S.observe(b)),f=()=>{S.disconnect(),f=d}},{immediate:g,flush:"post"}):d,y=()=>{f(),A(),c.value=!1};return C(y),{isSupported:h,isActive:c,pause(){f(),c.value=!1},resume(){c.value=!0},stop:y}}const $={key:0,class:"loading"},q={key:1,class:"none"},T=m(e.defineComponent({__name:"InfiniteLoading",props:{loading:{type:Boolean,default:()=>!1},finished:{type:Boolean,default:()=>!1}},emits:["infinite"],setup(n,{emit:t}){const o=n,s=t,r=e.ref(null);return O(r,([{isIntersecting:l}])=>{l&&!o.loading&&!o.finished&&(console.log(l,"isIntersecting"),s("infinite"))},{threshold:0}),(l,p)=>(e.openBlock(),e.createElementBlock("div",{class:"infinite-loading",ref_key:"container",ref:r},[n.loading?(e.openBlock(),e.createElementBlock("div",$,[e.createVNode(e.unref(k.Spin),{tip:"数据加载中..."})])):e.createCommentVNode("",!0),n.finished?(e.openBlock(),e.createElementBlock("div",q,[e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512))}}),[["__scopeId","data-v-ffa0deb7"]]);i.InfiniteLoading=T,i.SvgIcon=v,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
1
+ (function(l,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@arco-design/web-vue")):typeof define=="function"&&define.amd?define(["exports","vue","@arco-design/web-vue"],e):(l=typeof globalThis<"u"?globalThis:l||self,e(l.ui={},l.Vue,l.webVue))})(this,function(l,e,$){"use strict";const b={class:"SvgIcon"},I=["href","fill"],B=e.defineComponent({__name:"SvgIcon",props:{prefix:{type:String,required:!1,default:"icon"},name:{type:String,required:!0,default:()=>""},color:{type:String,required:!1,default:"#333"}},setup(t){const n=t,o=e.computed(()=>`#${n.prefix??"icon"}-${n.name}`);return(i,s)=>(e.openBlock(),e.createElementBlock("svg",b,[e.createElementVNode("use",{href:o.value,fill:n.color},null,8,I)]))}}),a=(t,n)=>{const o=t.__vccOpts||t;for(const[i,s]of n)o[i]=s;return o},x=a(B,[["__scopeId","data-v-003a51d4"]]);function E(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function y(t){return typeof t=="function"?t():e.unref(t)}const w=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const N=t=>t!=null,m=()=>{},V=w?window:void 0;function _(t){var n;const o=y(t);return(n=o==null?void 0:o.$el)!=null?n:o}function z(){const t=e.ref(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function L(t){const n=z();return e.computed(()=>(n.value,!!t()))}function j(t,n,o={}){const{root:i,rootMargin:s="0px",threshold:r=0,window:c=V,immediate:f=!0}=o,h=L(()=>c&&"IntersectionObserver"in c),ce=e.computed(()=>{const p=y(t);return(Array.isArray(p)?p:[p]).map(_).filter(N)});let u=m;const d=e.ref(f),le=h.value?e.watch(()=>[ce.value,_(i),d.value],([p,ae])=>{if(u(),!d.value||!p.length)return;const C=new IntersectionObserver(n,{root:_(ae),rootMargin:s,threshold:r});p.forEach(S=>S&&C.observe(S)),u=()=>{C.disconnect(),u=m}},{immediate:f,flush:"post"}):m,k=()=>{u(),le(),d.value=!1};return E(k),{isSupported:h,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:k}}const q={key:0,class:"loading"},O={key:1,class:"none"},P=a(e.defineComponent({__name:"InfiniteLoading",props:{loading:{type:Boolean,default:()=>!1},finished:{type:Boolean,default:()=>!1}},emits:["infinite"],setup(t,{emit:n}){const o=t,i=n,s=e.ref(null);return j(s,([{isIntersecting:r}])=>{r&&!o.loading&&!o.finished&&(console.log(r,"isIntersecting"),i("infinite"))},{threshold:0}),(r,c)=>(e.openBlock(),e.createElementBlock("div",{class:"infinite-loading",ref_key:"container",ref:s},[t.loading?(e.openBlock(),e.createElementBlock("div",q,[e.createVNode(e.unref($.Spin),{tip:"数据加载中..."})])):e.createCommentVNode("",!0),t.finished?(e.openBlock(),e.createElementBlock("div",O,[e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512))}}),[["__scopeId","data-v-ffa0deb7"]]),A=a(e.defineComponent({__name:"Collapse",props:{activeKeys:{type:Array,required:!0}},setup(t){const n=t,o=e.ref(),i=e.ref(new Set(n.activeKeys));e.provide("expandedIndexes",i);const s=e.ref(0);return e.provide("slotsCount",s),e.onMounted(()=>{s.value=o.value.children.length}),e.watch(()=>n.activeKeys,r=>{i.value=new Set(r)}),(r,c)=>(e.openBlock(),e.createElementBlock("div",{class:"collapse-container",ref_key:"collapseRef",ref:o},[e.renderSlot(r.$slots,"default",{},void 0,!0)],512))}}),[["__scopeId","data-v-37af01ec"]]),W=Symbol("ArcoConfigProvider"),M="arco",R="$arco",D=t=>{var n,o,i;const s=e.getCurrentInstance(),r=e.inject(W,void 0);return`${(i=(o=r==null?void 0:r.prefixCls)!=null?o:(n=s==null?void 0:s.appContext.config.globalProperties[R])==null?void 0:n.classPrefix)!=null?i:M}-${t}`},G=Object.prototype.toString;function H(t){return G.call(t)==="[object Number]"&&t===t}var K=(t,n)=>{for(const[o,i]of n)t[o]=i;return t};const T=e.defineComponent({name:"IconRight",props:{size:{type:[Number,String]},strokeWidth:{type:Number,default:4},strokeLinecap:{type:String,default:"butt",validator:t=>["butt","round","square"].includes(t)},strokeLinejoin:{type:String,default:"miter",validator:t=>["arcs","bevel","miter","miter-clip","round"].includes(t)},rotate:Number,spin:Boolean},emits:{click:t=>!0},setup(t,{emit:n}){const o=D("icon"),i=e.computed(()=>[o,`${o}-right`,{[`${o}-spin`]:t.spin}]),s=e.computed(()=>{const c={};return t.size&&(c.fontSize=H(t.size)?`${t.size}px`:t.size),t.rotate&&(c.transform=`rotate(${t.rotate}deg)`),c});return{cls:i,innerStyle:s,onClick:c=>{n("click",c)}}}}),v=["stroke-width","stroke-linecap","stroke-linejoin"],F=[e.createElementVNode("path",{d:"m16 39.513 15.556-15.557L16 8.4"},null,-1)];function X(t,n,o,i,s,r){return e.openBlock(),e.createElementBlock("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",class:e.normalizeClass(t.cls),style:e.normalizeStyle(t.innerStyle),"stroke-width":t.strokeWidth,"stroke-linecap":t.strokeLinecap,"stroke-linejoin":t.strokeLinejoin,onClick:n[0]||(n[0]=(...c)=>t.onClick&&t.onClick(...c))},F,14,v)}var g=K(T,[["render",X]]);const J=Object.assign(g,{install:(t,n)=>{var o;const i=(o=n==null?void 0:n.iconPrefix)!=null?o:"";t.component(i+g.name,g)}}),Q={key:0,class:"collapse-content"},U=a(e.defineComponent({__name:"CollapseItem",props:{index:{default:0}},setup(t){const n=t,o=e.inject("slotsCount",e.ref(0)),i=e.inject("expandedIndexes"),s=e.computed(()=>n.index===o.value-1),r=e.computed(()=>i.value.has(n.index)),c=()=>{i&&(r.value?i.value.delete(n.index):i.value.add(n.index))};return(f,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["collapse-item",{"no-border":s.value}])},[e.createElementVNode("button",{class:"collapse-header",onClick:c},[e.createElementVNode("span",null,[e.renderSlot(f.$slots,"header",{},void 0,!0)]),e.createElementVNode("span",{class:e.normalizeClass(["collapse-icon",{rotated:r.value}])},[e.createVNode(e.unref(J))],2)]),r.value?(e.openBlock(),e.createElementBlock("div",Q,[e.renderSlot(f.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-f2e1f58c"]]),Y={class:"ContentHead"},Z={class:"title"},ee={key:0,class:"description"},te=a(e.defineComponent({__name:"ContentHead",props:{title:{type:String,required:!0,default:()=>""},description:{type:String,required:!0,default:()=>""}},setup(t){const n=t;return(o,i)=>(e.openBlock(),e.createElementBlock("div",Y,[e.createElementVNode("h1",Z,e.toDisplayString(n.title),1),n.description?(e.openBlock(),e.createElementBlock("p",ee,e.toDisplayString(n.description),1)):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-f1ddfae6"]]),ne=a(e.defineComponent({__name:"Ellipsis",props:{width:{type:String,default:"100%"},height:{type:String,default:"100%"},zIndex:{type:String,default:"-1"},top:{type:String,default:"10%"},left:{type:String,default:"0%"},right:{type:String,default:"auto"},blur:{type:String,default:"0px"},background:{type:String,required:!1,default:()=>"linear-gradient(180deg, rgb(0 225 10 / 10%) 0.31%, rgb(26 214 255 / 52%) 74.99%, rgb(220 189 0 / 0%) 99.69%)"}},setup(t){const n=t,o=e.computed(()=>({pointerEvents:"none",position:"absolute",zIndex:n.zIndex,width:n.width,height:n.height,filter:`blur(${n.blur})`})),i=e.computed(()=>({width:"100%",height:"100%",background:n.background}));return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:"ellipsis",style:e.normalizeStyle(o.value)},[e.createElementVNode("div",{class:"ellipsis-item",style:e.normalizeStyle(i.value)},null,4)],4))}}),[["__scopeId","data-v-470c9c2f"]]),oe={},ie={class:"WidthContainer"};function se(t,n){return e.openBlock(),e.createElementBlock("div",ie,[e.renderSlot(t.$slots,"default",{},void 0,!0)])}const re=a(oe,[["render",se],["__scopeId","data-v-1e360997"]]);l.Collapse=A,l.CollapseItem=U,l.ContentHead=te,l.Ellipsis=ne,l.InfiniteLoading=P,l.SvgIcon=x,l.WidthContainer=re,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
package/dist/main.d.ts CHANGED
@@ -1,3 +1,8 @@
1
1
  import { default as SvgIcon } from './components/SvgIcon.vue';
2
2
  import { default as InfiniteLoading } from './components/InfiniteLoading.vue';
3
- export { SvgIcon, InfiniteLoading };
3
+ import { default as Collapse } from './components/Collapse.vue';
4
+ import { default as CollapseItem } from './components/CollapseItem.vue';
5
+ import { default as ContentHead } from './components/ContentHead.vue';
6
+ import { default as Ellipsis } from './components/Ellipsis.vue';
7
+ import { default as WidthContainer } from './components/WidthContainer.vue';
8
+ export { SvgIcon, InfiniteLoading, Collapse, CollapseItem, ContentHead, Ellipsis, WidthContainer, };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .SvgIcon[data-v-003a51d4]{width:1em;height:1em}.infinite-loading .loading[data-v-ffa0deb7]{display:flex;align-items:center;justify-content:center}.infinite-loading .loading .text[data-v-ffa0deb7]{color:#999;font-size:16px}.infinite-loading .none[data-v-ffa0deb7]{display:flex;align-items:center;justify-content:center}.infinite-loading .none .text[data-v-ffa0deb7]{color:#999;font-size:14px}
1
+ .SvgIcon[data-v-003a51d4]{width:1em;height:1em}.infinite-loading .loading[data-v-ffa0deb7]{display:flex;align-items:center;justify-content:center}.infinite-loading .loading .text[data-v-ffa0deb7]{color:#999;font-size:16px}.infinite-loading .none[data-v-ffa0deb7]{display:flex;align-items:center;justify-content:center}.infinite-loading .none .text[data-v-ffa0deb7]{color:#999;font-size:14px}.collapse-container[data-v-37af01ec]{display:flex;flex-direction:column;gap:8px;width:100%}.collapse-item[data-v-f2e1f58c]{display:flex;flex-direction:column;border-bottom:1px solid rgb(229,230,235)}.collapse-item.no-border[data-v-f2e1f58c]{border-bottom:none}.collapse-header[data-v-f2e1f58c]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:20px 0;font-size:18px;cursor:pointer;background:none;border:none;text-align:left;transition:color .3s}.collapse-icon[data-v-f2e1f58c]{transition:transform .2s;font-size:18px}.collapse-icon.rotated[data-v-f2e1f58c]{transform:rotate(90deg)}.collapse-content[data-v-f2e1f58c]{overflow:hidden;padding:0 0 20px;color:#213547cc;font-size:16px}.ContentHead[data-v-f1ddfae6]{display:flex;flex-direction:column;margin-bottom:50px}.ContentHead .title[data-v-f1ddfae6]{display:flex;flex-direction:row;justify-content:center;align-items:center;font-family:Polysans median,sans-serif;font-size:3rem;font-weight:600}.ContentHead .description[data-v-f1ddfae6]{line-height:36px;font-size:18px;font-family:Polysans neutral,sans-serif}.ellipsis[data-v-470c9c2f]{pointer-events:none}.ellipsis-item[data-v-470c9c2f]{width:100%;height:100%}.WidthContainer[data-v-1e360997]{max-width:1344px;padding:0 32px;display:flex;flex:1;width:1344px}
@@ -0,0 +1,54 @@
1
+ export declare function prettyFormat(code: any): string;
2
+ export interface TreeNode {
3
+ children?: TreeNode[];
4
+ [key: string]: any;
5
+ }
6
+ export declare function treeFindPath(tree: TreeNode[], value: number | string, key: string): TreeNode[];
7
+ export declare function findLabel(options: any[], key: string | number): any;
8
+ export declare const formatDateByLocale: (locale: Intl.LocalesArgument, d: string | number | Date) => string;
9
+ export declare const searchTextRegExp: (query?: string) => RegExp;
10
+ export declare function excludePath(navigation: any[], exclude: string[]): any[];
11
+ export declare function parsePath(path: string): string[];
12
+ interface MenuNode {
13
+ name: string;
14
+ redirect?: string;
15
+ path: string;
16
+ children?: MenuNode[];
17
+ }
18
+ export declare function findFirstNodeOfDeepestArray(menuArray: MenuNode[]): MenuNode | null;
19
+ export declare function getDateRanges(): {
20
+ today: {
21
+ startTime: string;
22
+ endTime: string;
23
+ };
24
+ week: {
25
+ startTime: string;
26
+ endTime: string;
27
+ };
28
+ month: {
29
+ startTime: string;
30
+ endTime: string;
31
+ };
32
+ year: {
33
+ startTime: string;
34
+ endTime: string;
35
+ };
36
+ };
37
+ export declare function hideKey(key: string, visibleStartLength?: number, visibleEndLength?: number, maxHiddenLength?: number): string;
38
+ export declare const domainRegex: RegExp;
39
+ export declare const domainAndPortRegex: RegExp;
40
+ export declare function hideEmail(email: string, prefixLength?: number): string;
41
+ export declare function validateOrderAmount(amount: string): boolean;
42
+ export declare const phoneRegex: RegExp;
43
+ export declare function extractOrganizationId(url: string, key: string): string | null;
44
+ export declare function beautifyJSON(jsonData: any): string;
45
+ export declare function getValue(value: any): string;
46
+ export declare function getNestedValue<T extends Record<string, any>>(obj: T, key: string): any;
47
+ export declare function formatFileSize(size: number): string;
48
+ export declare function getFileExtension(fileName: string): string | undefined;
49
+ export declare function separatePathAndFileName(filePath: string): {
50
+ path: string;
51
+ fileName: string;
52
+ } | null;
53
+ export declare function createMailtoLink(recipient: string, subject: string, body: string): string;
54
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@huyooo/ui",
3
3
  "private": false,
4
- "version": "0.1.11",
4
+ "version": "0.1.14",
5
5
  "type": "module",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.js",
@@ -35,5 +35,5 @@
35
35
  "@arco-design/web-vue": "^2.56.3",
36
36
  "@iconify/vue": "^4.1.2"
37
37
  },
38
- "gitHead": "40ccf0498b0cdae5294078255dfc93c1e354425f"
38
+ "gitHead": "e6673b47ed2b3489a13d245d7dc0f802ff556a11"
39
39
  }