@lazycatcloud/lzc-toolkit 0.0.32 → 0.0.34

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.
package/dist/index.es.js CHANGED
@@ -1,73 +1,73 @@
1
- import { unref as w, getCurrentScope as Ie, onScopeDispose as Te, getCurrentInstance as Re, onMounted as Z, nextTick as ue, ref as m, watch as P, shallowRef as Ce, computed as h, onUnmounted as ce, inject as H, provide as E, defineComponent as j, openBlock as T, createBlock as de, Transition as ve, withCtx as fe, createElementBlock as B, createElementVNode as R, withModifiers as Be, normalizeClass as Pe, renderSlot as ee, createCommentVNode as $e, render as Ae, h as Y, normalizeStyle as te, useSlots as Le, withDirectives as Fe, vShow as De, pushScopeId as Me, popScopeId as Ve, toRef as ke, mergeProps as Ke, normalizeProps as le, guardReactiveProps as ne, Fragment as je, renderList as ze } from "vue";
1
+ import { unref as w, getCurrentScope as Ie, onScopeDispose as Te, getCurrentInstance as Re, onMounted as Z, nextTick as ue, ref as m, watch as P, shallowRef as Ce, computed as p, onUnmounted as ce, inject as H, provide as E, defineComponent as j, openBlock as T, createBlock as de, Transition as ve, withCtx as fe, createElementBlock as B, createElementVNode as R, withModifiers as Be, normalizeClass as Pe, renderSlot as ee, createCommentVNode as $e, render as Ae, h as Y, normalizeStyle as te, useSlots as Le, withDirectives as Fe, vShow as De, pushScopeId as Me, popScopeId as Ve, toRef as ke, mergeProps as Ke, normalizeProps as le, guardReactiveProps as ne, Fragment as je, renderList as ze } from "vue";
2
2
  var oe;
3
3
  const $ = typeof window < "u";
4
4
  $ && ((oe = window?.navigator) == null ? void 0 : oe.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
5
- function G(e) {
6
- return typeof e == "function" ? e() : w(e);
5
+ function G(t) {
6
+ return typeof t == "function" ? t() : w(t);
7
7
  }
8
- function Ne(e, t) {
8
+ function Ne(t, e) {
9
9
  function l(...n) {
10
- e(() => t.apply(this, n), { fn: t, thisArg: this, args: n });
10
+ t(() => e.apply(this, n), { fn: e, thisArg: this, args: n });
11
11
  }
12
12
  return l;
13
13
  }
14
- function Qe(e, t = {}) {
14
+ function Qe(t, e = {}) {
15
15
  let l, n;
16
16
  return (a) => {
17
- const o = G(e), d = G(t.maxWait);
18
- if (l && clearTimeout(l), o <= 0 || d !== void 0 && d <= 0)
17
+ const r = G(t), d = G(e.maxWait);
18
+ if (l && clearTimeout(l), r <= 0 || d !== void 0 && d <= 0)
19
19
  return n && (clearTimeout(n), n = null), a();
20
20
  d && !n && (n = setTimeout(() => {
21
21
  l && clearTimeout(l), n = null, a();
22
22
  }, d)), l = setTimeout(() => {
23
23
  n && clearTimeout(n), n = null, a();
24
- }, o);
24
+ }, r);
25
25
  };
26
26
  }
27
- function We(e) {
28
- return e;
27
+ function We(t) {
28
+ return t;
29
29
  }
30
- function Ue(e) {
31
- return Ie() ? (Te(e), !0) : !1;
30
+ function Ue(t) {
31
+ return Ie() ? (Te(t), !0) : !1;
32
32
  }
33
- function pe(e, t = 200, l = {}) {
34
- return Ne(Qe(t, l), e);
33
+ function he(t, e = 200, l = {}) {
34
+ return Ne(Qe(e, l), t);
35
35
  }
36
- function qe(e, t = !0) {
37
- Re() ? Z(e) : t ? e() : ue(e);
36
+ function qe(t, e = !0) {
37
+ Re() ? Z(t) : e ? t() : ue(t);
38
38
  }
39
- function he(e) {
40
- var t;
41
- const l = G(e);
42
- return (t = l?.$el) != null ? t : l;
39
+ function pe(t) {
40
+ var e;
41
+ const l = G(t);
42
+ return (e = l?.$el) != null ? e : l;
43
43
  }
44
44
  const Ye = $ ? window : void 0;
45
45
  $ && window.document;
46
46
  $ && window.navigator;
47
47
  $ && window.location;
48
- function Ge(e, t = !1) {
49
- const l = m(), n = () => l.value = Boolean(e());
50
- return n(), qe(n, t), l;
48
+ function Ge(t, e = !1) {
49
+ const l = m(), n = () => l.value = Boolean(t());
50
+ return n(), qe(n, e), l;
51
51
  }
52
52
  const J = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, X = "__vueuse_ssr_handlers__";
53
53
  J[X] = J[X] || {};
54
54
  J[X];
55
- var re = Object.getOwnPropertySymbols, Je = Object.prototype.hasOwnProperty, Xe = Object.prototype.propertyIsEnumerable, Ze = (e, t) => {
55
+ var re = Object.getOwnPropertySymbols, Je = Object.prototype.hasOwnProperty, Xe = Object.prototype.propertyIsEnumerable, Ze = (t, e) => {
56
56
  var l = {};
57
- for (var n in e)
58
- Je.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
59
- if (e != null && re)
60
- for (var n of re(e))
61
- t.indexOf(n) < 0 && Xe.call(e, n) && (l[n] = e[n]);
57
+ for (var n in t)
58
+ Je.call(t, n) && e.indexOf(n) < 0 && (l[n] = t[n]);
59
+ if (t != null && re)
60
+ for (var n of re(t))
61
+ e.indexOf(n) < 0 && Xe.call(t, n) && (l[n] = t[n]);
62
62
  return l;
63
63
  };
64
- function et(e, t, l = {}) {
65
- const n = l, { window: r = Ye } = n, a = Ze(n, ["window"]);
66
- let o;
67
- const d = Ge(() => r && "ResizeObserver" in r), g = () => {
68
- o && (o.disconnect(), o = void 0);
69
- }, f = P(() => he(e), (p) => {
70
- g(), d.value && r && p && (o = new ResizeObserver(t), o.observe(p, a));
64
+ function et(t, e, l = {}) {
65
+ const n = l, { window: o = Ye } = n, a = Ze(n, ["window"]);
66
+ let r;
67
+ const d = Ge(() => o && "ResizeObserver" in o), g = () => {
68
+ r && (r.disconnect(), r = void 0);
69
+ }, f = P(() => pe(t), (h) => {
70
+ g(), d.value && o && h && (r = new ResizeObserver(e), r.observe(h, a));
71
71
  }, { immediate: !0, flush: "post" }), v = () => {
72
72
  g(), f();
73
73
  };
@@ -76,29 +76,29 @@ function et(e, t, l = {}) {
76
76
  stop: v
77
77
  };
78
78
  }
79
- function tt(e, t = { width: 0, height: 0 }, l = {}) {
80
- const { box: n = "content-box" } = l, r = m(t.width), a = m(t.height);
81
- return et(e, ([o]) => {
82
- const d = n === "border-box" ? o.borderBoxSize : n === "content-box" ? o.contentBoxSize : o.devicePixelContentBoxSize;
83
- d ? (r.value = d.reduce((g, { inlineSize: f }) => g + f, 0), a.value = d.reduce((g, { blockSize: f }) => g + f, 0)) : (r.value = o.contentRect.width, a.value = o.contentRect.height);
84
- }, l), P(() => he(e), (o) => {
85
- r.value = o ? t.width : 0, a.value = o ? t.height : 0;
79
+ function tt(t, e = { width: 0, height: 0 }, l = {}) {
80
+ const { box: n = "content-box" } = l, o = m(e.width), a = m(e.height);
81
+ return et(t, ([r]) => {
82
+ const d = n === "border-box" ? r.borderBoxSize : n === "content-box" ? r.contentBoxSize : r.devicePixelContentBoxSize;
83
+ d ? (o.value = d.reduce((g, { inlineSize: f }) => g + f, 0), a.value = d.reduce((g, { blockSize: f }) => g + f, 0)) : (o.value = r.contentRect.width, a.value = r.contentRect.height);
84
+ }, l), P(() => pe(t), (r) => {
85
+ o.value = r ? e.width : 0, a.value = r ? e.height : 0;
86
86
  }), {
87
- width: r,
87
+ width: o,
88
88
  height: a
89
89
  };
90
90
  }
91
91
  var se;
92
- (function(e) {
93
- e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
92
+ (function(t) {
93
+ t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
94
94
  })(se || (se = {}));
95
- var lt = Object.defineProperty, ae = Object.getOwnPropertySymbols, nt = Object.prototype.hasOwnProperty, ot = Object.prototype.propertyIsEnumerable, ie = (e, t, l) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, rt = (e, t) => {
96
- for (var l in t || (t = {}))
97
- nt.call(t, l) && ie(e, l, t[l]);
95
+ var lt = Object.defineProperty, ae = Object.getOwnPropertySymbols, nt = Object.prototype.hasOwnProperty, ot = Object.prototype.propertyIsEnumerable, ie = (t, e, l) => e in t ? lt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: l }) : t[e] = l, rt = (t, e) => {
96
+ for (var l in e || (e = {}))
97
+ nt.call(e, l) && ie(t, l, e[l]);
98
98
  if (ae)
99
- for (var l of ae(t))
100
- ot.call(t, l) && ie(e, l, t[l]);
101
- return e;
99
+ for (var l of ae(e))
100
+ ot.call(e, l) && ie(t, l, e[l]);
101
+ return t;
102
102
  };
103
103
  const st = {
104
104
  easeInSine: [0.12, 0, 0.39, 0],
@@ -129,26 +129,26 @@ const st = {
129
129
  rt({
130
130
  linear: We
131
131
  }, st);
132
- function at(e, t) {
133
- const { scrollEndHook: l, itemHeight: n, overscan: r = 5 } = t, a = m(null), o = tt(a), d = m(!0), g = pe(N, 100);
132
+ function at(t, e) {
133
+ const { scrollEndHook: l, itemHeight: n, overscan: o = 5 } = e, a = m(null), r = tt(a), d = m(!0), g = he(N, 100);
134
134
  let f;
135
- const v = Ce(e), p = m(0), i = m({ start: 0, end: 10 });
135
+ const v = Ce(t), h = m(0), i = m({ start: 0, end: 10 });
136
136
  let u = 0;
137
- const x = m([]), b = h(() => {
137
+ const x = m([]), b = p(() => {
138
138
  let { sum: s, height: c } = { sum: 0, height: 0 };
139
- return v.value.map((S, _) => (typeof n == "number" ? c = n : c = n(_), s += c, { height: c, sum: s }));
140
- }), z = h(() => V(i.value.start)), I = h(() => typeof n == "number" ? b.value.length * n : b.value[b.value.length - 1]?.sum || 0), A = h(() => {
141
- let s = x.value.length - r, c = Math.max(s - u, 0);
139
+ return v.value.map((S, y) => (typeof n == "number" ? c = n : c = n(y), s += c, { height: c, sum: s }));
140
+ }), z = p(() => V(i.value.start)), I = p(() => typeof n == "number" ? b.value.length * n : b.value[b.value.length - 1]?.sum || 0), A = p(() => {
141
+ let s = x.value.length - o, c = Math.max(s - u, 0);
142
142
  return x.value.slice(c, s);
143
143
  });
144
144
  Z(() => {
145
145
  }), ce(() => cancelAnimationFrame(f)), P(
146
- [o.width, o.height, v],
146
+ [r.width, r.height, v],
147
147
  ([s, c]) => {
148
148
  (s || c) && F();
149
149
  },
150
150
  { deep: !0 }
151
- ), P(p, () => {
151
+ ), P(h, () => {
152
152
  L(), g();
153
153
  });
154
154
  function L() {
@@ -162,25 +162,25 @@ function at(e, t) {
162
162
  }
163
163
  function D() {
164
164
  if (a.value) {
165
- p.value = a.value.scrollTop, u = C();
166
- let s = M(p.value), c = s + u + r;
167
- s = s - r, s = s < 0 ? 0 : s, c = c > v.value.length ? v.value.length : c, i.value = { start: s, end: c }, x.value = v.value.slice(s, c).map((S, _) => ({
165
+ h.value = a.value.scrollTop, u = C();
166
+ let s = M(h.value), c = s + u + o;
167
+ s = s - o, s = s < 0 ? 0 : s, c = c > v.value.length ? v.value.length : c, i.value = { start: s, end: c }, x.value = v.value.slice(s, c).map((S, y) => ({
168
168
  data: S,
169
- index: _ + s
169
+ index: y + s
170
170
  }));
171
171
  }
172
172
  }
173
173
  function M(s) {
174
- let c = 0, S = b.value.length - 1, _ = -1;
174
+ let c = 0, S = b.value.length - 1, y = -1;
175
175
  for (; c <= S; ) {
176
- const y = Math.floor((c + S) / 2);
177
- b.value[y].sum >= s ? (_ = y, S = y - 1) : c = y + 1;
176
+ const _ = Math.floor((c + S) / 2);
177
+ b.value[_].sum >= s ? (y = _, S = _ - 1) : c = _ + 1;
178
178
  }
179
- return Math.max(0, _);
179
+ return Math.max(0, y);
180
180
  }
181
181
  function C() {
182
182
  let s = 0, c = 0, S = Q();
183
- for (let _ = S; _ < b.value.length && (s++, c += b.value[_].height, !(c >= o.height.value)); _++)
183
+ for (let y = S; y < b.value.length && (s++, c += b.value[y].height, !(c >= r.height.value)); y++)
184
184
  ;
185
185
  return s;
186
186
  }
@@ -195,7 +195,7 @@ function at(e, t) {
195
195
  }
196
196
  function Q() {
197
197
  let s = i.value.start;
198
- return s >= r && (s += r), s;
198
+ return s >= o && (s += o), s;
199
199
  }
200
200
  function W(s) {
201
201
  if (a.value) {
@@ -203,13 +203,13 @@ function at(e, t) {
203
203
  a.value.scrollTop = c.sum - c.height, D();
204
204
  }
205
205
  }
206
- const U = h(() => ({
206
+ const U = p(() => ({
207
207
  style: {
208
208
  width: "100%",
209
209
  height: `${I.value}px`,
210
210
  pointerEvents: d.value ? void 0 : "none"
211
211
  }
212
- })), K = h(() => ({
212
+ })), K = p(() => ({
213
213
  style: {
214
214
  transform: `translate3d(0, ${z.value}px, 0)`,
215
215
  "will-change": "transform"
@@ -223,9 +223,9 @@ function at(e, t) {
223
223
  getItemHeightData: k,
224
224
  getoffsetTopIndex: M,
225
225
  totalHeight: I,
226
- clientHeight: o.height,
226
+ clientHeight: r.height,
227
227
  scrollTo: W,
228
- scrollTop: p,
228
+ scrollTop: h,
229
229
  isScrollEnd: d,
230
230
  containerProps: {
231
231
  ref: a,
@@ -238,68 +238,68 @@ function at(e, t) {
238
238
  innerProps: K
239
239
  };
240
240
  }
241
- const ge = Symbol(), me = Symbol(), be = Symbol(), _e = Symbol(), ye = Symbol(), we = Symbol(), Se = Symbol(), Oe = Symbol(), Ee = Symbol();
242
- function _t() {
243
- const { voidFn: e, boolFn: t, boolRef: l, arrayRef: n } = {
241
+ const ge = Symbol(), me = Symbol(), be = Symbol(), ye = Symbol(), _e = Symbol(), we = Symbol(), Se = Symbol(), Oe = Symbol(), Ee = Symbol();
242
+ function yt() {
243
+ const { voidFn: t, boolFn: e, boolRef: l, arrayRef: n } = {
244
244
  voidFn: (u) => {
245
245
  },
246
246
  boolFn: (u) => !1,
247
- boolRef: h(() => !1),
248
- arrayRef: h(() => [])
249
- }, r = H(_e, n), a = H(be, t), o = H(Oe, l), d = H(me, e), g = H(ge, e), f = H(ye, e), v = H(we, e), p = H(Se, e), i = H(Ee, e);
247
+ boolRef: p(() => !1),
248
+ arrayRef: p(() => [])
249
+ }, o = H(ye, n), a = H(be, e), r = H(Oe, l), d = H(me, t), g = H(ge, t), f = H(_e, t), v = H(we, t), h = H(Se, t), i = H(Ee, t);
250
250
  return {
251
- selected: r,
251
+ selected: o,
252
252
  isSelected: a,
253
- isAllSelected: o,
253
+ isAllSelected: r,
254
254
  toggle: d,
255
255
  toggleAll: g,
256
256
  select: f,
257
257
  selectAll: v,
258
- unselect: p,
258
+ unselect: h,
259
259
  unselectAll: i
260
260
  };
261
261
  }
262
- function yt(e, t) {
263
- const l = m({}), n = h(() => e.value.filter((i) => l.value[i[t]])), r = h(() => n.value.length != 0 && Object.keys(l.value).length == e.value.length);
262
+ function _t(t, e) {
263
+ const l = m({}), n = p(() => t.value.filter((i) => l.value[i[e]])), o = p(() => n.value.length != 0 && Object.keys(l.value).length == t.value.length);
264
264
  function a() {
265
- e.value.forEach((i) => {
266
- l.value[i[t]] = !0;
265
+ t.value.forEach((i) => {
266
+ l.value[i[e]] = !0;
267
267
  });
268
268
  }
269
- function o() {
269
+ function r() {
270
270
  l.value = {};
271
271
  }
272
272
  function d(i) {
273
273
  i.forEach((u) => {
274
- l.value[u[t]] || (l.value[u[t]] = !0);
274
+ l.value[u[e]] || (l.value[u[e]] = !0);
275
275
  });
276
276
  }
277
277
  function g(i) {
278
278
  i.forEach((u) => {
279
- l.value[u[t]] && delete l.value[u[t]];
279
+ l.value[u[e]] && delete l.value[u[e]];
280
280
  });
281
281
  }
282
282
  function f(i) {
283
- return !!l.value[i[t]];
283
+ return !!l.value[i[e]];
284
284
  }
285
285
  function v(i) {
286
286
  i.forEach((u) => {
287
- f(u) ? delete l.value[u[t]] : l.value[u[t]] = !0;
287
+ f(u) ? delete l.value[u[e]] : l.value[u[e]] = !0;
288
288
  });
289
289
  }
290
- function p() {
291
- r.value ? o() : a();
290
+ function h() {
291
+ o.value ? r() : a();
292
292
  }
293
- return E(ge, p), E(me, v), E(be, f), E(_e, n), E(ye, d), E(we, a), E(Se, g), E(Oe, r), E(Ee, o), {
293
+ return E(ge, h), E(me, v), E(be, f), E(ye, n), E(_e, d), E(we, a), E(Se, g), E(Oe, o), E(Ee, r), {
294
294
  selected: n,
295
295
  select: d,
296
296
  selectAll: a,
297
297
  unselect: g,
298
- unselectAll: o,
298
+ unselectAll: r,
299
299
  toggle: v,
300
- toggleAll: p,
300
+ toggleAll: h,
301
301
  isSelected: f,
302
- isAllSelected: r
302
+ isAllSelected: o
303
303
  };
304
304
  }
305
305
  const it = Symbol(), ut = /* @__PURE__ */ j({
@@ -310,13 +310,13 @@ const it = Symbol(), ut = /* @__PURE__ */ j({
310
310
  dialogClass: { default: "" }
311
311
  },
312
312
  emits: ["update:visiable"],
313
- setup(e, { emit: t }) {
314
- const l = e, n = () => {
315
- l.closeOnClickOverlay && t("update:visiable", !1);
313
+ setup(t, { emit: e }) {
314
+ const l = t, n = () => {
315
+ l.closeOnClickOverlay && e("update:visiable", !1);
316
316
  };
317
- return E(it, () => t("update:visiable", !1)), (r, a) => (T(), de(ve, { name: "modal" }, {
317
+ return E(it, () => e("update:visiable", !1)), (o, a) => (T(), de(ve, { name: "modal" }, {
318
318
  default: fe(() => [
319
- e.visiable ? (T(), B("div", {
319
+ t.visiable ? (T(), B("div", {
320
320
  key: 0,
321
321
  onClick: n,
322
322
  class: "modal absolute inset-0 bottom-0 z-50 flex bg-stone-900 bg-opacity-50"
@@ -324,9 +324,9 @@ const it = Symbol(), ut = /* @__PURE__ */ j({
324
324
  R("div", {
325
325
  onClick: a[0] || (a[0] = Be(() => {
326
326
  }, ["stop"])),
327
- class: Pe(["dialog m-auto flex flex-col", e.dialogClass])
327
+ class: Pe(["dialog m-auto flex flex-col", t.dialogClass])
328
328
  }, [
329
- ee(r.$slots, "default")
329
+ ee(o.$slots, "default")
330
330
  ], 2)
331
331
  ])) : $e("", !0)
332
332
  ]),
@@ -334,18 +334,18 @@ const it = Symbol(), ut = /* @__PURE__ */ j({
334
334
  }));
335
335
  }
336
336
  });
337
- function wt(e) {
338
- function t(l, n) {
339
- const r = document.createElement("div"), a = {
337
+ function wt(t) {
338
+ function e(l, n) {
339
+ const o = document.createElement("div"), a = {
340
340
  setup() {
341
341
  return () => Y(
342
342
  ut,
343
343
  {
344
344
  visiable: !0,
345
345
  "onUpdate:visiable": () => {
346
- r?.remove();
346
+ o?.remove();
347
347
  },
348
- ...e
348
+ ...t
349
349
  },
350
350
  {
351
351
  default: () => Y(l, n)
@@ -353,12 +353,12 @@ function wt(e) {
353
353
  );
354
354
  }
355
355
  };
356
- return document.body.appendChild(r), Ae(Y(a), r), {
357
- close: () => r?.remove()
356
+ return document.body.appendChild(o), Ae(Y(a), o), {
357
+ close: () => o?.remove()
358
358
  };
359
359
  }
360
360
  return {
361
- create: t
361
+ create: e
362
362
  };
363
363
  }
364
364
  const ct = ["xlink:href", "fill", "color"], St = /* @__PURE__ */ j({
@@ -370,65 +370,68 @@ const ct = ["xlink:href", "fill", "color"], St = /* @__PURE__ */ j({
370
370
  width: null,
371
371
  height: null
372
372
  },
373
- setup(e) {
374
- const t = e, l = h(() => `#${t.prefix}-${t.name}`), n = h(() => ({
375
- width: `${t.width}px`,
376
- height: `${t.height}px`,
377
- aspectRatio: t.width && t.height ? void 0 : "1/1"
378
- }));
379
- return (r, a) => (T(), B("svg", {
373
+ setup(t) {
374
+ const e = t, l = p(() => `#${e.prefix}-${e.name}`), n = p(() => {
375
+ const o = {
376
+ width: `${e.width}px`,
377
+ height: `${e.height}px`,
378
+ color: e.color
379
+ };
380
+ return o.aspectRatio = e.width && e.height ? `${e.width}:${e.height}` : "1/1", o[e.width ? "height" : "width"] = o[e.width ? "width" : "height"], o;
381
+ });
382
+ return (o, a) => (T(), B("svg", {
380
383
  "aria-hidden": "",
381
384
  style: te(w(n))
382
385
  }, [
383
386
  R("use", {
384
387
  "xlink:href": w(l),
385
- fill: e.color,
386
- color: e.color
388
+ fill: t.color,
389
+ color: t.color
387
390
  }, null, 8, ct)
388
391
  ], 4));
389
392
  }
390
393
  });
391
- function dt(e) {
394
+ function dt(t) {
392
395
  const {
393
- containerEl: t,
396
+ containerEl: e,
394
397
  sliderEl: l,
395
398
  autoHeight: n,
396
- performance: r = {},
399
+ performance: o = {},
397
400
  maxHeightRatio: a = 0.9
398
- } = e, o = m(!0), d = pe(V, 100);
401
+ } = t, r = m(!0), d = he(V, 100);
399
402
  let g, f = "";
400
- const v = m(0), p = m(0), i = m(0), u = m({
403
+ const v = m(0), h = m(0), i = m(0), u = m({
401
404
  top: 0,
402
405
  scrollTop: 0,
403
406
  scrollHeight: 0,
404
407
  clientHeight: 0
405
408
  }), x = m({
406
409
  clientHeight: 0
407
- }), b = h(() => !!p.value), z = h(() => u.value.scrollHeight > u.value.clientHeight), I = h(() => u.value.clientHeight - x.value.clientHeight), A = h(() => u.value.scrollHeight - u.value.clientHeight), L = h(() => Math.max(
410
+ }), b = p(() => !!h.value), z = p(() => u.value.scrollHeight > u.value.clientHeight), I = p(() => u.value.clientHeight - x.value.clientHeight), A = p(() => u.value.scrollHeight - u.value.clientHeight), L = p(() => Math.max(
408
411
  u.value.clientHeight / u.value.scrollHeight,
409
412
  0.05
410
- )), N = h(() => L.value > a ? 0 : L.value * u.value.clientHeight), F = h(() => ({
413
+ )), N = p(() => L.value > a ? 0 : L.value * u.value.clientHeight), F = p(() => ({
411
414
  willChange: "transform",
412
415
  transform: `translate3d(0,${i.value}px,0)`,
413
416
  height: n ? `${N.value}px` : void 0
414
417
  }));
415
- function D(y) {
416
- C(), p.value = y.clientY - l.value.getBoundingClientRect().top || 1, f = getComputedStyle(t.value).scrollBehavior, f === "smooth" && (t.value.style.scrollBehavior = "unset");
418
+ function D(_) {
419
+ C(), h.value = _.clientY - l.value.getBoundingClientRect().top || 1, f = getComputedStyle(e.value).scrollBehavior, f === "smooth" && (e.value.style.scrollBehavior = "unset");
417
420
  }
418
421
  function M() {
419
- t.value.style.scrollBehavior = f, p.value = 0, d();
422
+ e.value.style.scrollBehavior = f, h.value = 0, d();
420
423
  }
421
424
  function C() {
422
- o.value = !1;
425
+ r.value = !1;
423
426
  }
424
427
  function V() {
425
- b.value || (o.value = !0);
428
+ b.value || (r.value = !0);
426
429
  }
427
- function k(y) {
430
+ function k(_) {
428
431
  if (!b.value)
429
432
  return;
430
- let O = y.clientY - u.value.top - p.value;
431
- O < 0 ? i.value = 0 : O >= I.value ? i.value = I.value : i.value = O, t.value.scrollTo({
433
+ let O = _.clientY - u.value.top - h.value;
434
+ O < 0 ? i.value = 0 : O >= I.value ? i.value = I.value : i.value = O, e.value.scrollTo({
432
435
  top: i.value / I.value * A.value
433
436
  });
434
437
  }
@@ -439,19 +442,19 @@ function dt(e) {
439
442
  cancelAnimationFrame(g), g = requestAnimationFrame(U);
440
443
  }
441
444
  function U() {
442
- t.value && (v.value = r.scrollTop?.value ?? t.value.scrollTop, i.value = v.value / A.value * I.value);
445
+ e.value && (v.value = o.scrollTop?.value ?? e.value.scrollTop, i.value = v.value / A.value * I.value);
443
446
  }
444
- function K(y) {
447
+ function K(_) {
445
448
  let O = "addEventListener";
446
- y === "add" ? O = "addEventListener" : O = "removeEventListener", l.value?.[O]("pointerdown", D, {
449
+ _ === "add" ? O = "addEventListener" : O = "removeEventListener", l.value?.[O]("pointerdown", D, {
447
450
  passive: !0
448
451
  }), window[O]("pointermove", k, { passive: !0 }), window[O]("pointerup", M, { passive: !0 });
449
452
  }
450
- const q = new MutationObserver((y) => {
451
- y.map((He) => He.oldValue).join().includes("height") && s();
453
+ const q = new MutationObserver((_) => {
454
+ _.map((He) => He.oldValue).join().includes("height") && s();
452
455
  });
453
456
  function s() {
454
- u.value.top = t.value?.getBoundingClientRect().top ?? 0, u.value.scrollHeight = t.value?.scrollHeight ?? 0, u.value.clientHeight = t.value?.clientHeight ?? 0;
457
+ u.value.top = e.value?.getBoundingClientRect().top ?? 0, u.value.scrollHeight = e.value?.scrollHeight ?? 0, u.value.clientHeight = e.value?.clientHeight ?? 0;
455
458
  }
456
459
  function c() {
457
460
  C(), setTimeout(() => {
@@ -465,33 +468,33 @@ function dt(e) {
465
468
  ), document.styleSheets[0].insertRule(
466
469
  ".hide-scrollbar::-webkit-scrollbar{ display: none }",
467
470
  0
468
- ), t.value?.classList.add("hide-scrollbar");
471
+ ), e.value?.classList.add("hide-scrollbar");
469
472
  }
470
- function _() {
471
- t.value && l.value ? (S(), t.value.addEventListener("scroll", Q, {
473
+ function y() {
474
+ e.value && l.value ? (S(), e.value.addEventListener("scroll", Q, {
472
475
  passive: !0
473
- }), K("add"), q.observe(t.value, {
476
+ }), K("add"), q.observe(e.value, {
474
477
  subtree: !0,
475
478
  attributeOldValue: !0,
476
479
  attributeFilter: ["style"]
477
480
  }), setTimeout(() => {
478
481
  s();
479
- }, 100), c()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: t, sliderEl: l });
482
+ }, 100), c()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: e, sliderEl: l });
480
483
  }
481
484
  return P(v, () => {
482
485
  C(), d();
483
486
  }), {
484
- isScrollEnd: o,
487
+ isScrollEnd: r,
485
488
  isDragSlider: b,
486
489
  offsetTop: i,
487
490
  scrollTop: v,
488
491
  scrollable: z,
489
492
  sliderPos: F,
490
- init: _,
493
+ init: y,
491
494
  modifySliderEventListener: K
492
495
  };
493
496
  }
494
- const vt = (e) => (Me("data-v-edec7292"), e = e(), Ve(), e), ft = /* @__PURE__ */ vt(() => /* @__PURE__ */ R("div", { class: "default-slider" }, null, -1)), pt = /* @__PURE__ */ j({
497
+ const vt = (t) => (Me("data-v-edec7292"), t = t(), Ve(), t), ft = /* @__PURE__ */ vt(() => /* @__PURE__ */ R("div", { class: "default-slider" }, null, -1)), ht = /* @__PURE__ */ j({
495
498
  __name: "ScrollBar",
496
499
  props: {
497
500
  containerEl: null,
@@ -499,19 +502,19 @@ const vt = (e) => (Me("data-v-edec7292"), e = e(), Ve(), e), ft = /* @__PURE__ *
499
502
  autoHeight: { type: Boolean },
500
503
  performance: null
501
504
  },
502
- setup(e, { expose: t }) {
503
- const l = e, n = !!Le().default, r = m(null), a = h(() => l.containerEl), o = dt({
505
+ setup(t, { expose: e }) {
506
+ const l = t, n = !!Le().default, o = m(null), a = p(() => l.containerEl), r = dt({
504
507
  containerEl: a,
505
- sliderEl: r,
508
+ sliderEl: o,
506
509
  autoHeight: n ? l.autoHeight : !0,
507
510
  performance: l.performance
508
- }), { scrollable: d, isScrollEnd: g, sliderPos: f } = o, v = m(!1), p = l.autoHide ? h(() => v.value || !g.value) : h(() => d.value);
511
+ }), { scrollable: d, isScrollEnd: g, sliderPos: f } = r, v = m(!1), h = l.autoHide ? p(() => v.value || !g.value) : p(() => d.value);
509
512
  Z(() => {
510
513
  ue(() => {
511
- o.init();
514
+ r.init();
512
515
  });
513
516
  }), ce(() => {
514
- o.modifySliderEventListener("remove");
517
+ r.modifySliderEventListener("remove");
515
518
  });
516
519
  function i() {
517
520
  v.value = !0;
@@ -519,11 +522,11 @@ const vt = (e) => (Me("data-v-edec7292"), e = e(), Ve(), e), ft = /* @__PURE__ *
519
522
  function u() {
520
523
  v.value = !1;
521
524
  }
522
- return t({ uScrollBarReturn: o }), (x, b) => (T(), de(ve, null, {
525
+ return e({ uScrollBarReturn: r }), (x, b) => (T(), de(ve, null, {
523
526
  default: fe(() => [
524
527
  Fe(R("div", {
525
528
  ref_key: "sliderRef",
526
- ref: r,
529
+ ref: o,
527
530
  class: "slider-wrapper",
528
531
  onMouseenter: i,
529
532
  onMouseleave: u,
@@ -533,19 +536,19 @@ const vt = (e) => (Me("data-v-edec7292"), e = e(), Ve(), e), ft = /* @__PURE__ *
533
536
  ft
534
537
  ], !0)
535
538
  ], 36), [
536
- [De, w(p)]
539
+ [De, w(h)]
537
540
  ])
538
541
  ]),
539
542
  _: 3
540
543
  }));
541
544
  }
542
545
  });
543
- const xe = (e, t) => {
544
- const l = e.__vccOpts || e;
545
- for (const [n, r] of t)
546
- l[n] = r;
546
+ const xe = (t, e) => {
547
+ const l = t.__vccOpts || t;
548
+ for (const [n, o] of e)
549
+ l[n] = o;
547
550
  return l;
548
- }, Ot = /* @__PURE__ */ xe(pt, [["__scopeId", "data-v-edec7292"]]), ht = { class: "virtualListWrapper" }, gt = {
551
+ }, Ot = /* @__PURE__ */ xe(ht, [["__scopeId", "data-v-edec7292"]]), pt = { class: "virtualListWrapper" }, gt = {
549
552
  inheritAttrs: !1
550
553
  }, mt = /* @__PURE__ */ j({
551
554
  ...gt,
@@ -556,20 +559,20 @@ const xe = (e, t) => {
556
559
  overscan: { default: 10 }
557
560
  },
558
561
  emits: ["scrollEnd"],
559
- setup(e, { expose: t, emit: l }) {
560
- const n = e, r = at(ke(n, "data"), {
562
+ setup(t, { expose: e, emit: l }) {
563
+ const n = t, o = at(ke(n, "data"), {
561
564
  itemHeight: (v) => n.itemHeight(n.data[v]),
562
565
  overscan: n.overscan,
563
566
  scrollEndHook: () => {
564
567
  l("scrollEnd");
565
568
  }
566
- }), { list: a, containerProps: o, wrapperProps: d, innerProps: g, getItemHeightData: f } = r;
567
- return t({
568
- vListReturn: r
569
- }), (v, p) => (T(), B("div", ht, [
569
+ }), { list: a, containerProps: r, wrapperProps: d, innerProps: g, getItemHeightData: f } = o;
570
+ return e({
571
+ vListReturn: o
572
+ }), (v, h) => (T(), B("div", pt, [
570
573
  R("div", Ke({
571
- onScrollPassive: p[0] || (p[0] = (...i) => w(o).onScroll && w(o).onScroll(...i)),
572
- ref: w(o).ref,
574
+ onScrollPassive: h[0] || (h[0] = (...i) => w(r).onScroll && w(r).onScroll(...i)),
575
+ ref: w(r).ref,
573
576
  class: "virtualList"
574
577
  }, v.$attrs), [
575
578
  R("div", le(ne(w(d))), [
@@ -597,18 +600,18 @@ export {
597
600
  Ot as ScrollBar,
598
601
  St as SvgIcon,
599
602
  Et as VirtualList,
600
- _e as allSelectedKey,
603
+ ye as allSelectedKey,
601
604
  it as closeDialogKey,
602
605
  wt as dialogController,
603
606
  Oe as isAllSelectedKey,
604
607
  be as isSelectedKey,
605
608
  we as selectAllKey,
606
- ye as selectKey,
609
+ _e as selectKey,
607
610
  ge as toggleAllKey,
608
611
  me as toggleKey,
609
612
  Ee as unselectAllKey,
610
613
  Se as unselectKey,
611
- yt as useSelectable,
612
- _t as useSelectableInjectors,
614
+ _t as useSelectable,
615
+ yt as useSelectableInjectors,
613
616
  at as useVirtualList
614
617
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h.ui={},h.Vue))})(this,function(h,e){"use strict";var Z;const B=typeof window<"u";B&&((Z=window?.navigator)==null?void 0:Z.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function L(t){return typeof t=="function"?t():e.unref(t)}function ce(t,l){function n(...o){t(()=>l.apply(this,o),{fn:l,thisArg:this,args:o})}return n}function ue(t,l={}){let n,o;return s=>{const r=L(t),f=L(l.maxWait);if(n&&clearTimeout(n),r<=0||f!==void 0&&f<=0)return o&&(clearTimeout(o),o=null),s();f&&!o&&(o=setTimeout(()=>{n&&clearTimeout(n),o=null,s()},f)),n=setTimeout(()=>{o&&clearTimeout(o),o=null,s()},r)}}function de(t){return t}function fe(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function ee(t,l=200,n={}){return ce(ue(l,n),t)}function pe(t,l=!0){e.getCurrentInstance()?e.onMounted(t):l?t():e.nextTick(t)}function te(t){var l;const n=L(t);return(l=n?.$el)!=null?l:n}const he=B?window:void 0;B&&window.document,B&&window.navigator,B&&window.location;function me(t,l=!1){const n=e.ref(),o=()=>n.value=Boolean(t());return o(),pe(o,l),n}const $=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},j="__vueuse_ssr_handlers__";$[j]=$[j]||{},$[j];var le=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,ye=(t,l)=>{var n={};for(var o in t)ge.call(t,o)&&l.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&le)for(var o of le(t))l.indexOf(o)<0&&ve.call(t,o)&&(n[o]=t[o]);return n};function be(t,l,n={}){const o=n,{window:i=he}=o,s=ye(o,["window"]);let r;const f=me(()=>i&&"ResizeObserver"in i),v=()=>{r&&(r.disconnect(),r=void 0)},m=e.watch(()=>te(t),g=>{v(),f.value&&i&&g&&(r=new ResizeObserver(l),r.observe(g,s))},{immediate:!0,flush:"post"}),p=()=>{v(),m()};return fe(p),{isSupported:f,stop:p}}function _e(t,l={width:0,height:0},n={}){const{box:o="content-box"}=n,i=e.ref(l.width),s=e.ref(l.height);return be(t,([r])=>{const f=o==="border-box"?r.borderBoxSize:o==="content-box"?r.contentBoxSize:r.devicePixelContentBoxSize;f?(i.value=f.reduce((v,{inlineSize:m})=>v+m,0),s.value=f.reduce((v,{blockSize:m})=>v+m,0)):(i.value=r.contentRect.width,s.value=r.contentRect.height)},n),e.watch(()=>te(t),r=>{i.value=r?l.width:0,s.value=r?l.height:0}),{width:i,height:s}}var ne;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(ne||(ne={}));var Se=Object.defineProperty,oe=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,re=(t,l,n)=>l in t?Se(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,Ee=(t,l)=>{for(var n in l||(l={}))we.call(l,n)&&re(t,n,l[n]);if(oe)for(var n of oe(l))Oe.call(l,n)&&re(t,n,l[n]);return t};Ee({linear:de},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function ie(t,l){const{scrollEndHook:n,itemHeight:o,overscan:i=5}=l,s=e.ref(null),r=_e(s),f=e.ref(!0),v=ee(q,100);let m;const p=e.shallowRef(t),g=e.ref(0),c=e.ref({start:0,end:10});let u=0;const O=e.ref([]),y=e.computed(()=>{let{sum:a,height:d}={sum:0,height:0};return p.value.map((S,b)=>(typeof o=="number"?d=o:d=o(b),a+=d,{height:d,sum:a}))}),W=e.computed(()=>x(c.value.start)),E=e.computed(()=>typeof o=="number"?y.value.length*o:y.value[y.value.length-1]?.sum||0),I=e.computed(()=>{let a=O.value.length-i,d=Math.max(a-u,0);return O.value.slice(d,a)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(m)),e.watch([r.width,r.height,p],([a,d])=>{(a||d)&&C()},{deep:!0}),e.watch(g,()=>{T(),v()});function T(){f.value=!1}function q(){f.value=!0,n?.()}function C(){cancelAnimationFrame(m),m=requestAnimationFrame(P)}function P(){if(s.value){g.value=s.value.scrollTop,u=H();let a=R(g.value),d=a+u+i;a=a-i,a=a<0?0:a,d=d>p.value.length?p.value.length:d,c.value={start:a,end:d},O.value=p.value.slice(a,d).map((S,b)=>({data:S,index:b+a}))}}function R(a){let d=0,S=y.value.length-1,b=-1;for(;d<=S;){const _=Math.floor((d+S)/2);y.value[_].sum>=a?(b=_,S=_-1):d=_+1}return Math.max(0,b)}function H(){let a=0,d=0,S=Y();for(let b=S;b<y.value.length&&(a++,d+=y.value[b].height,!(d>=r.height.value));b++);return a}function x(a){if(typeof o=="number")return a*o;let d=y.value[a];return d?d.sum-d.height:0}function A(a){return y.value[a]||{sum:0,height:0}}function Y(){let a=c.value.start;return a>=i&&(a+=i),a}function G(a){if(s.value){const d=A(a);s.value.scrollTop=d.sum-d.height,P()}}const J=e.computed(()=>({style:{width:"100%",height:`${E.value}px`,pointerEvents:f.value?void 0:"none"}})),k=e.computed(()=>({style:{transform:`translate3d(0, ${W.value}px, 0)`,"will-change":"transform"}})),X={overflowY:"auto"};return{list:O,visiableList:I,getItemHeightData:A,getoffsetTopIndex:R,totalHeight:E,clientHeight:r.height,scrollTo:G,scrollTop:g,isScrollEnd:f,containerProps:{ref:s,onScroll:()=>{C()},style:X},wrapperProps:J,innerProps:k}}const K=Symbol(),V=Symbol(),F=Symbol(),D=Symbol(),M=Symbol(),N=Symbol(),z=Symbol(),Q=Symbol(),U=Symbol();function Be(){const{voidFn:t,boolFn:l,boolRef:n,arrayRef:o}={voidFn:u=>{},boolFn:u=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},i=e.inject(D,o),s=e.inject(F,l),r=e.inject(Q,n),f=e.inject(V,t),v=e.inject(K,t),m=e.inject(M,t),p=e.inject(N,t),g=e.inject(z,t),c=e.inject(U,t);return{selected:i,isSelected:s,isAllSelected:r,toggle:f,toggleAll:v,select:m,selectAll:p,unselect:g,unselectAll:c}}function He(t,l){const n=e.ref({}),o=e.computed(()=>t.value.filter(c=>n.value[c[l]])),i=e.computed(()=>o.value.length!=0&&Object.keys(n.value).length==t.value.length);function s(){t.value.forEach(c=>{n.value[c[l]]=!0})}function r(){n.value={}}function f(c){c.forEach(u=>{n.value[u[l]]||(n.value[u[l]]=!0)})}function v(c){c.forEach(u=>{n.value[u[l]]&&delete n.value[u[l]]})}function m(c){return!!n.value[c[l]]}function p(c){c.forEach(u=>{m(u)?delete n.value[u[l]]:n.value[u[l]]=!0})}function g(){i.value?r():s()}return e.provide(K,g),e.provide(V,p),e.provide(F,m),e.provide(D,o),e.provide(M,f),e.provide(N,s),e.provide(z,v),e.provide(Q,i),e.provide(U,r),{selected:o,select:f,selectAll:s,unselect:v,unselectAll:r,toggle:p,toggleAll:g,isSelected:m,isAllSelected:i}}const ae=Symbol(),Ie=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},dialogClass:{default:""}},emits:["update:visiable"],setup(t,{emit:l}){const n=t,o=()=>{n.closeOnClickOverlay&&l("update:visiable",!1)};return e.provide(ae,()=>l("update:visiable",!1)),(i,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.visiable?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:o,class:"modal absolute inset-0 bottom-0 z-50 flex bg-stone-900 bg-opacity-50"},[e.createElementVNode("div",{onClick:s[0]||(s[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["dialog m-auto flex flex-col",t.dialogClass])},[e.renderSlot(i.$slots,"default")],2)])):e.createCommentVNode("",!0)]),_:3}))}});function Te(t){function l(n,o){const i=document.createElement("div"),s={setup(){return()=>e.h(Ie,{visiable:!0,"onUpdate:visiable":()=>{i?.remove()},...t},{default:()=>e.h(n,o)})}};return document.body.appendChild(i),e.render(e.h(s),i),{close:()=>i?.remove()}}return{create:l}}const Ce=["xlink:href","fill","color"],Pe=e.defineComponent({__name:"SvgIcon",props:{name:null,prefix:{default:"icon"},color:{default:"#FFF"},width:null,height:null},setup(t){const l=t,n=e.computed(()=>`#${l.prefix}-${l.name}`),o=e.computed(()=>({width:`${l.width}px`,height:`${l.height}px`,aspectRatio:l.width&&l.height?void 0:"1/1"}));return(i,s)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle(e.unref(o))},[e.createElementVNode("use",{"xlink:href":e.unref(n),fill:t.color,color:t.color},null,8,Ce)],4))}});function Re(t){const{containerEl:l,sliderEl:n,autoHeight:o,performance:i={},maxHeightRatio:s=.9}=t,r=e.ref(!0),f=ee(x,100);let v,m="";const p=e.ref(0),g=e.ref(0),c=e.ref(0),u=e.ref({top:0,scrollTop:0,scrollHeight:0,clientHeight:0}),O=e.ref({clientHeight:0}),y=e.computed(()=>!!g.value),W=e.computed(()=>u.value.scrollHeight>u.value.clientHeight),E=e.computed(()=>u.value.clientHeight-O.value.clientHeight),I=e.computed(()=>u.value.scrollHeight-u.value.clientHeight),T=e.computed(()=>Math.max(u.value.clientHeight/u.value.scrollHeight,.05)),q=e.computed(()=>T.value>s?0:T.value*u.value.clientHeight),C=e.computed(()=>({willChange:"transform",transform:`translate3d(0,${c.value}px,0)`,height:o?`${q.value}px`:void 0}));function P(_){H(),g.value=_.clientY-n.value.getBoundingClientRect().top||1,m=getComputedStyle(l.value).scrollBehavior,m==="smooth"&&(l.value.style.scrollBehavior="unset")}function R(){l.value.style.scrollBehavior=m,g.value=0,f()}function H(){r.value=!1}function x(){y.value||(r.value=!0)}function A(_){if(!y.value)return;let w=_.clientY-u.value.top-g.value;w<0?c.value=0:w>=E.value?c.value=E.value:c.value=w,l.value.scrollTo({top:c.value/E.value*I.value})}function Y(){y.value||G()}function G(){cancelAnimationFrame(v),v=requestAnimationFrame(J)}function J(){l.value&&(p.value=i.scrollTop?.value??l.value.scrollTop,c.value=p.value/I.value*E.value)}function k(_){let w="addEventListener";_==="add"?w="addEventListener":w="removeEventListener",n.value?.[w]("pointerdown",P,{passive:!0}),window[w]("pointermove",A,{passive:!0}),window[w]("pointerup",R,{passive:!0})}const X=new MutationObserver(_=>{_.map(Ve=>Ve.oldValue).join().includes("height")&&a()});function a(){u.value.top=l.value?.getBoundingClientRect().top??0,u.value.scrollHeight=l.value?.scrollHeight??0,u.value.clientHeight=l.value?.clientHeight??0}function d(){H(),setTimeout(()=>{O.value.clientHeight=n.value?.clientHeight??0,x()},150)}function S(){document.styleSheets[0].insertRule(".hide-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }",0),document.styleSheets[0].insertRule(".hide-scrollbar::-webkit-scrollbar{ display: none }",0),l.value?.classList.add("hide-scrollbar")}function b(){l.value&&n.value?(S(),l.value.addEventListener("scroll",Y,{passive:!0}),k("add"),X.observe(l.value,{subtree:!0,attributeOldValue:!0,attributeFilter:["style"]}),setTimeout(()=>{a()},100),d()):console.error("useScrollBar:","\u521D\u59CB\u5316\u5931\u8D25!",{containerEl:l,sliderEl:n})}return e.watch(p,()=>{H(),f()}),{isScrollEnd:r,isDragSlider:y,offsetTop:c,scrollTop:p,scrollable:W,sliderPos:C,init:b,modifySliderEventListener:k}}const xe=(t=>(e.pushScopeId("data-v-edec7292"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"default-slider"},null,-1)),Ae=e.defineComponent({__name:"ScrollBar",props:{containerEl:null,autoHide:{type:Boolean},autoHeight:{type:Boolean},performance:null},setup(t,{expose:l}){const n=t,o=!!e.useSlots().default,i=e.ref(null),s=e.computed(()=>n.containerEl),r=Re({containerEl:s,sliderEl:i,autoHeight:o?n.autoHeight:!0,performance:n.performance}),{scrollable:f,isScrollEnd:v,sliderPos:m}=r,p=e.ref(!1),g=n.autoHide?e.computed(()=>p.value||!v.value):e.computed(()=>f.value);e.onMounted(()=>{e.nextTick(()=>{r.init()})}),e.onUnmounted(()=>{r.modifySliderEventListener("remove")});function c(){p.value=!0}function u(){p.value=!1}return l({uScrollBarReturn:r}),(O,y)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:i,class:"slider-wrapper",onMouseenter:c,onMouseleave:u,style:e.normalizeStyle(e.unref(m))},[e.renderSlot(O.$slots,"default",{},()=>[xe],!0)],36),[[e.vShow,e.unref(g)]])]),_:3}))}}),Me="",se=(t,l)=>{const n=t.__vccOpts||t;for(const[o,i]of l)n[o]=i;return n},ke=se(Ae,[["__scopeId","data-v-edec7292"]]),Le={class:"virtualListWrapper"},$e={inheritAttrs:!1},je=e.defineComponent({...$e,__name:"VirtualList",props:{data:null,itemHeight:null,overscan:{default:10}},emits:["scrollEnd"],setup(t,{expose:l,emit:n}){const o=t,i=ie(e.toRef(o,"data"),{itemHeight:p=>o.itemHeight(o.data[p]),overscan:o.overscan,scrollEndHook:()=>{n("scrollEnd")}}),{list:s,containerProps:r,wrapperProps:f,innerProps:v,getItemHeightData:m}=i;return l({vListReturn:i}),(p,g)=>(e.openBlock(),e.createElementBlock("div",Le,[e.createElementVNode("div",e.mergeProps({onScrollPassive:g[0]||(g[0]=(...c)=>e.unref(r).onScroll&&e.unref(r).onScroll(...c)),ref:e.unref(r).ref,class:"virtualList"},p.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(f))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(v))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),({index:c,data:u})=>(e.openBlock(),e.createElementBlock("div",{key:c,style:e.normalizeStyle({height:`${e.unref(m)(c).height}px`,display:"flex"})},[e.renderSlot(p.$slots,"default",{data:u,index:c},void 0,!0)],4))),128))],16)],16)],16)]))}}),Ne="",Ke=se(je,[["__scopeId","data-v-4ba97cce"]]);h.ScrollBar=ke,h.SvgIcon=Pe,h.VirtualList=Ke,h.allSelectedKey=D,h.closeDialogKey=ae,h.dialogController=Te,h.isAllSelectedKey=Q,h.isSelectedKey=F,h.selectAllKey=N,h.selectKey=M,h.toggleAllKey=K,h.toggleKey=V,h.unselectAllKey=U,h.unselectKey=z,h.useSelectable=He,h.useSelectableInjectors=Be,h.useVirtualList=ie,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h.ui={},h.Vue))})(this,function(h,e){"use strict";var Z;const B=typeof window<"u";B&&((Z=window?.navigator)==null?void 0:Z.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function k(l){return typeof l=="function"?l():e.unref(l)}function ce(l,t){function n(...o){l(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})}return n}function ue(l,t={}){let n,o;return s=>{const i=k(l),f=k(t.maxWait);if(n&&clearTimeout(n),i<=0||f!==void 0&&f<=0)return o&&(clearTimeout(o),o=null),s();f&&!o&&(o=setTimeout(()=>{n&&clearTimeout(n),o=null,s()},f)),n=setTimeout(()=>{o&&clearTimeout(o),o=null,s()},i)}}function de(l){return l}function fe(l){return e.getCurrentScope()?(e.onScopeDispose(l),!0):!1}function ee(l,t=200,n={}){return ce(ue(t,n),l)}function pe(l,t=!0){e.getCurrentInstance()?e.onMounted(l):t?l():e.nextTick(l)}function te(l){var t;const n=k(l);return(t=n?.$el)!=null?t:n}const he=B?window:void 0;B&&window.document,B&&window.navigator,B&&window.location;function me(l,t=!1){const n=e.ref(),o=()=>n.value=Boolean(l());return o(),pe(o,t),n}const L=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},j="__vueuse_ssr_handlers__";L[j]=L[j]||{},L[j];var le=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,ye=(l,t)=>{var n={};for(var o in l)ge.call(l,o)&&t.indexOf(o)<0&&(n[o]=l[o]);if(l!=null&&le)for(var o of le(l))t.indexOf(o)<0&&ve.call(l,o)&&(n[o]=l[o]);return n};function be(l,t,n={}){const o=n,{window:r=he}=o,s=ye(o,["window"]);let i;const f=me(()=>r&&"ResizeObserver"in r),v=()=>{i&&(i.disconnect(),i=void 0)},m=e.watch(()=>te(l),g=>{v(),f.value&&r&&g&&(i=new ResizeObserver(t),i.observe(g,s))},{immediate:!0,flush:"post"}),p=()=>{v(),m()};return fe(p),{isSupported:f,stop:p}}function _e(l,t={width:0,height:0},n={}){const{box:o="content-box"}=n,r=e.ref(t.width),s=e.ref(t.height);return be(l,([i])=>{const f=o==="border-box"?i.borderBoxSize:o==="content-box"?i.contentBoxSize:i.devicePixelContentBoxSize;f?(r.value=f.reduce((v,{inlineSize:m})=>v+m,0),s.value=f.reduce((v,{blockSize:m})=>v+m,0)):(r.value=i.contentRect.width,s.value=i.contentRect.height)},n),e.watch(()=>te(l),i=>{r.value=i?t.width:0,s.value=i?t.height:0}),{width:r,height:s}}var ne;(function(l){l.UP="UP",l.RIGHT="RIGHT",l.DOWN="DOWN",l.LEFT="LEFT",l.NONE="NONE"})(ne||(ne={}));var we=Object.defineProperty,oe=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,re=(l,t,n)=>t in l?we(l,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[t]=n,Ee=(l,t)=>{for(var n in t||(t={}))Se.call(t,n)&&re(l,n,t[n]);if(oe)for(var n of oe(t))Oe.call(t,n)&&re(l,n,t[n]);return l};Ee({linear:de},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function ie(l,t){const{scrollEndHook:n,itemHeight:o,overscan:r=5}=t,s=e.ref(null),i=_e(s),f=e.ref(!0),v=ee(q,100);let m;const p=e.shallowRef(l),g=e.ref(0),c=e.ref({start:0,end:10});let u=0;const O=e.ref([]),y=e.computed(()=>{let{sum:a,height:d}={sum:0,height:0};return p.value.map((w,b)=>(typeof o=="number"?d=o:d=o(b),a+=d,{height:d,sum:a}))}),W=e.computed(()=>x(c.value.start)),E=e.computed(()=>typeof o=="number"?y.value.length*o:y.value[y.value.length-1]?.sum||0),I=e.computed(()=>{let a=O.value.length-r,d=Math.max(a-u,0);return O.value.slice(d,a)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(m)),e.watch([i.width,i.height,p],([a,d])=>{(a||d)&&C()},{deep:!0}),e.watch(g,()=>{T(),v()});function T(){f.value=!1}function q(){f.value=!0,n?.()}function C(){cancelAnimationFrame(m),m=requestAnimationFrame(P)}function P(){if(s.value){g.value=s.value.scrollTop,u=H();let a=R(g.value),d=a+u+r;a=a-r,a=a<0?0:a,d=d>p.value.length?p.value.length:d,c.value={start:a,end:d},O.value=p.value.slice(a,d).map((w,b)=>({data:w,index:b+a}))}}function R(a){let d=0,w=y.value.length-1,b=-1;for(;d<=w;){const _=Math.floor((d+w)/2);y.value[_].sum>=a?(b=_,w=_-1):d=_+1}return Math.max(0,b)}function H(){let a=0,d=0,w=Y();for(let b=w;b<y.value.length&&(a++,d+=y.value[b].height,!(d>=i.height.value));b++);return a}function x(a){if(typeof o=="number")return a*o;let d=y.value[a];return d?d.sum-d.height:0}function A(a){return y.value[a]||{sum:0,height:0}}function Y(){let a=c.value.start;return a>=r&&(a+=r),a}function G(a){if(s.value){const d=A(a);s.value.scrollTop=d.sum-d.height,P()}}const J=e.computed(()=>({style:{width:"100%",height:`${E.value}px`,pointerEvents:f.value?void 0:"none"}})),$=e.computed(()=>({style:{transform:`translate3d(0, ${W.value}px, 0)`,"will-change":"transform"}})),X={overflowY:"auto"};return{list:O,visiableList:I,getItemHeightData:A,getoffsetTopIndex:R,totalHeight:E,clientHeight:i.height,scrollTo:G,scrollTop:g,isScrollEnd:f,containerProps:{ref:s,onScroll:()=>{C()},style:X},wrapperProps:J,innerProps:$}}const K=Symbol(),V=Symbol(),F=Symbol(),D=Symbol(),M=Symbol(),N=Symbol(),z=Symbol(),Q=Symbol(),U=Symbol();function Be(){const{voidFn:l,boolFn:t,boolRef:n,arrayRef:o}={voidFn:u=>{},boolFn:u=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},r=e.inject(D,o),s=e.inject(F,t),i=e.inject(Q,n),f=e.inject(V,l),v=e.inject(K,l),m=e.inject(M,l),p=e.inject(N,l),g=e.inject(z,l),c=e.inject(U,l);return{selected:r,isSelected:s,isAllSelected:i,toggle:f,toggleAll:v,select:m,selectAll:p,unselect:g,unselectAll:c}}function He(l,t){const n=e.ref({}),o=e.computed(()=>l.value.filter(c=>n.value[c[t]])),r=e.computed(()=>o.value.length!=0&&Object.keys(n.value).length==l.value.length);function s(){l.value.forEach(c=>{n.value[c[t]]=!0})}function i(){n.value={}}function f(c){c.forEach(u=>{n.value[u[t]]||(n.value[u[t]]=!0)})}function v(c){c.forEach(u=>{n.value[u[t]]&&delete n.value[u[t]]})}function m(c){return!!n.value[c[t]]}function p(c){c.forEach(u=>{m(u)?delete n.value[u[t]]:n.value[u[t]]=!0})}function g(){r.value?i():s()}return e.provide(K,g),e.provide(V,p),e.provide(F,m),e.provide(D,o),e.provide(M,f),e.provide(N,s),e.provide(z,v),e.provide(Q,r),e.provide(U,i),{selected:o,select:f,selectAll:s,unselect:v,unselectAll:i,toggle:p,toggleAll:g,isSelected:m,isAllSelected:r}}const ae=Symbol(),Ie=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},dialogClass:{default:""}},emits:["update:visiable"],setup(l,{emit:t}){const n=l,o=()=>{n.closeOnClickOverlay&&t("update:visiable",!1)};return e.provide(ae,()=>t("update:visiable",!1)),(r,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[l.visiable?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:o,class:"modal absolute inset-0 bottom-0 z-50 flex bg-stone-900 bg-opacity-50"},[e.createElementVNode("div",{onClick:s[0]||(s[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["dialog m-auto flex flex-col",l.dialogClass])},[e.renderSlot(r.$slots,"default")],2)])):e.createCommentVNode("",!0)]),_:3}))}});function Te(l){function t(n,o){const r=document.createElement("div"),s={setup(){return()=>e.h(Ie,{visiable:!0,"onUpdate:visiable":()=>{r?.remove()},...l},{default:()=>e.h(n,o)})}};return document.body.appendChild(r),e.render(e.h(s),r),{close:()=>r?.remove()}}return{create:t}}const Ce=["xlink:href","fill","color"],Pe=e.defineComponent({__name:"SvgIcon",props:{name:null,prefix:{default:"icon"},color:{default:"#FFF"},width:null,height:null},setup(l){const t=l,n=e.computed(()=>`#${t.prefix}-${t.name}`),o=e.computed(()=>{const r={width:`${t.width}px`,height:`${t.height}px`,color:t.color};return r.aspectRatio=t.width&&t.height?`${t.width}:${t.height}`:"1/1",r[t.width?"height":"width"]=r[t.width?"width":"height"],r});return(r,s)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle(e.unref(o))},[e.createElementVNode("use",{"xlink:href":e.unref(n),fill:l.color,color:l.color},null,8,Ce)],4))}});function Re(l){const{containerEl:t,sliderEl:n,autoHeight:o,performance:r={},maxHeightRatio:s=.9}=l,i=e.ref(!0),f=ee(x,100);let v,m="";const p=e.ref(0),g=e.ref(0),c=e.ref(0),u=e.ref({top:0,scrollTop:0,scrollHeight:0,clientHeight:0}),O=e.ref({clientHeight:0}),y=e.computed(()=>!!g.value),W=e.computed(()=>u.value.scrollHeight>u.value.clientHeight),E=e.computed(()=>u.value.clientHeight-O.value.clientHeight),I=e.computed(()=>u.value.scrollHeight-u.value.clientHeight),T=e.computed(()=>Math.max(u.value.clientHeight/u.value.scrollHeight,.05)),q=e.computed(()=>T.value>s?0:T.value*u.value.clientHeight),C=e.computed(()=>({willChange:"transform",transform:`translate3d(0,${c.value}px,0)`,height:o?`${q.value}px`:void 0}));function P(_){H(),g.value=_.clientY-n.value.getBoundingClientRect().top||1,m=getComputedStyle(t.value).scrollBehavior,m==="smooth"&&(t.value.style.scrollBehavior="unset")}function R(){t.value.style.scrollBehavior=m,g.value=0,f()}function H(){i.value=!1}function x(){y.value||(i.value=!0)}function A(_){if(!y.value)return;let S=_.clientY-u.value.top-g.value;S<0?c.value=0:S>=E.value?c.value=E.value:c.value=S,t.value.scrollTo({top:c.value/E.value*I.value})}function Y(){y.value||G()}function G(){cancelAnimationFrame(v),v=requestAnimationFrame(J)}function J(){t.value&&(p.value=r.scrollTop?.value??t.value.scrollTop,c.value=p.value/I.value*E.value)}function $(_){let S="addEventListener";_==="add"?S="addEventListener":S="removeEventListener",n.value?.[S]("pointerdown",P,{passive:!0}),window[S]("pointermove",A,{passive:!0}),window[S]("pointerup",R,{passive:!0})}const X=new MutationObserver(_=>{_.map(Ve=>Ve.oldValue).join().includes("height")&&a()});function a(){u.value.top=t.value?.getBoundingClientRect().top??0,u.value.scrollHeight=t.value?.scrollHeight??0,u.value.clientHeight=t.value?.clientHeight??0}function d(){H(),setTimeout(()=>{O.value.clientHeight=n.value?.clientHeight??0,x()},150)}function w(){document.styleSheets[0].insertRule(".hide-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }",0),document.styleSheets[0].insertRule(".hide-scrollbar::-webkit-scrollbar{ display: none }",0),t.value?.classList.add("hide-scrollbar")}function b(){t.value&&n.value?(w(),t.value.addEventListener("scroll",Y,{passive:!0}),$("add"),X.observe(t.value,{subtree:!0,attributeOldValue:!0,attributeFilter:["style"]}),setTimeout(()=>{a()},100),d()):console.error("useScrollBar:","\u521D\u59CB\u5316\u5931\u8D25!",{containerEl:t,sliderEl:n})}return e.watch(p,()=>{H(),f()}),{isScrollEnd:i,isDragSlider:y,offsetTop:c,scrollTop:p,scrollable:W,sliderPos:C,init:b,modifySliderEventListener:$}}const xe=(l=>(e.pushScopeId("data-v-edec7292"),l=l(),e.popScopeId(),l))(()=>e.createElementVNode("div",{class:"default-slider"},null,-1)),Ae=e.defineComponent({__name:"ScrollBar",props:{containerEl:null,autoHide:{type:Boolean},autoHeight:{type:Boolean},performance:null},setup(l,{expose:t}){const n=l,o=!!e.useSlots().default,r=e.ref(null),s=e.computed(()=>n.containerEl),i=Re({containerEl:s,sliderEl:r,autoHeight:o?n.autoHeight:!0,performance:n.performance}),{scrollable:f,isScrollEnd:v,sliderPos:m}=i,p=e.ref(!1),g=n.autoHide?e.computed(()=>p.value||!v.value):e.computed(()=>f.value);e.onMounted(()=>{e.nextTick(()=>{i.init()})}),e.onUnmounted(()=>{i.modifySliderEventListener("remove")});function c(){p.value=!0}function u(){p.value=!1}return t({uScrollBarReturn:i}),(O,y)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:r,class:"slider-wrapper",onMouseenter:c,onMouseleave:u,style:e.normalizeStyle(e.unref(m))},[e.renderSlot(O.$slots,"default",{},()=>[xe],!0)],36),[[e.vShow,e.unref(g)]])]),_:3}))}}),Me="",se=(l,t)=>{const n=l.__vccOpts||l;for(const[o,r]of t)n[o]=r;return n},$e=se(Ae,[["__scopeId","data-v-edec7292"]]),ke={class:"virtualListWrapper"},Le={inheritAttrs:!1},je=e.defineComponent({...Le,__name:"VirtualList",props:{data:null,itemHeight:null,overscan:{default:10}},emits:["scrollEnd"],setup(l,{expose:t,emit:n}){const o=l,r=ie(e.toRef(o,"data"),{itemHeight:p=>o.itemHeight(o.data[p]),overscan:o.overscan,scrollEndHook:()=>{n("scrollEnd")}}),{list:s,containerProps:i,wrapperProps:f,innerProps:v,getItemHeightData:m}=r;return t({vListReturn:r}),(p,g)=>(e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("div",e.mergeProps({onScrollPassive:g[0]||(g[0]=(...c)=>e.unref(i).onScroll&&e.unref(i).onScroll(...c)),ref:e.unref(i).ref,class:"virtualList"},p.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(f))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(v))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),({index:c,data:u})=>(e.openBlock(),e.createElementBlock("div",{key:c,style:e.normalizeStyle({height:`${e.unref(m)(c).height}px`,display:"flex"})},[e.renderSlot(p.$slots,"default",{data:u,index:c},void 0,!0)],4))),128))],16)],16)],16)]))}}),Ne="",Ke=se(je,[["__scopeId","data-v-4ba97cce"]]);h.ScrollBar=$e,h.SvgIcon=Pe,h.VirtualList=Ke,h.allSelectedKey=D,h.closeDialogKey=ae,h.dialogController=Te,h.isAllSelectedKey=Q,h.isSelectedKey=F,h.selectAllKey=N,h.selectKey=M,h.toggleAllKey=K,h.toggleKey=V,h.unselectAllKey=U,h.unselectKey=z,h.useSelectable=He,h.useSelectableInjectors=Be,h.useVirtualList=ie,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -46,4 +46,4 @@ export declare function useVirtualList<T = any>(list: Ref<T[]>, options: UseVirt
46
46
  };
47
47
  }>;
48
48
  };
49
- export declare type UseVirtualListReturn<T> = ReturnType<typeof useVirtualList<T>>;
49
+ export declare type UseVirtualListReturn = ReturnType<typeof useVirtualList>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazycatcloud/lzc-toolkit",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "lazycat ui toolkits",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.es.js",