vuesp-components 2.1.0 → 2.1.1
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/App.vue.d.ts +1 -1
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/components/app/AppHeader.vue.d.ts.map +1 -1
- package/dist/components/card/notification/CardNotification.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardBase.vue.d.ts +9 -9
- package/dist/components/dashboard/cards/CardBase.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardButton.vue.d.ts +1 -1
- package/dist/components/dashboard/cards/CardDate.vue.d.ts +163 -3
- package/dist/components/dashboard/cards/CardDate.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardDimmer.vue.d.ts +1 -1
- package/dist/components/dashboard/cards/CardDimmer.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardInfo.vue.d.ts +1 -1
- package/dist/components/dashboard/cards/CardInput.vue.d.ts +1 -1
- package/dist/components/dashboard/cards/CardInput.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardList.vue.d.ts +1 -1
- package/dist/components/dashboard/cards/CardList.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/types.d.ts +1 -1
- package/dist/components/dashboard/cards/types.d.ts.map +1 -1
- package/dist/components/dashboard/edit/ItemOptions.vue.d.ts.map +1 -1
- package/dist/components/dashboard/edit/types.d.ts +1 -1
- package/dist/components/dashboard/edit/types.d.ts.map +1 -1
- package/dist/components/ui/button/VButton.vue.d.ts.map +1 -1
- package/dist/components/ui/button/types.d.ts +0 -2
- package/dist/components/ui/button/types.d.ts.map +1 -1
- package/dist/components/ui/dialog/VDialog.vue.d.ts +9 -9
- package/dist/components/ui/dialog/VPopup.vue.d.ts +6 -6
- package/dist/components/ui/dialog/types.d.ts +1 -1
- package/dist/components/ui/dialog/types.d.ts.map +1 -1
- package/dist/components/ui/dropdown/types.d.ts +1 -0
- package/dist/components/ui/dropdown/types.d.ts.map +1 -1
- package/dist/components/ui/func/VFunc.vue.d.ts +1 -3
- package/dist/components/ui/func/VFunc.vue.d.ts.map +1 -1
- package/dist/components/ui/list/VList.vue.d.ts.map +1 -1
- package/dist/components/ui/list/VListObject.vue.d.ts.map +1 -1
- package/dist/components/ui/list/types.d.ts +0 -1
- package/dist/components/ui/list/types.d.ts.map +1 -1
- package/dist/components/ui/text-field/VTextField.vue.d.ts +2 -0
- package/dist/components/ui/text-field/VTextField.vue.d.ts.map +1 -1
- package/dist/components/ui/text-field/types.d.ts +1 -1
- package/dist/components/ui/text-field/types.d.ts.map +1 -1
- package/dist/composables/index.es.js +1 -1
- package/dist/composables/useDialog.d.ts +1 -1
- package/dist/composables/useDialog.d.ts.map +1 -1
- package/dist/index.es.js +1115 -1030
- package/dist/style.css +1 -1
- package/dist/useSwipeDown-BLxS7593.js +375 -0
- package/package.json +1 -1
- package/dist/useSwipeDown-E8KeNvRa.js +0 -436
|
@@ -1,436 +0,0 @@
|
|
|
1
|
-
import { toRef as G, readonly as Q, customRef as J, ref as D, onMounted as B, nextTick as I, getCurrentScope as U, onScopeDispose as Z, watch as C, getCurrentInstance as q, toValue as g, hasInjectionContext as k, inject as ee, shallowRef as x, reactive as P, computed as b, watchEffect as te, unref as ne } from "vue";
|
|
2
|
-
function H(e) {
|
|
3
|
-
return U() ? (Z(e), !0) : !1;
|
|
4
|
-
}
|
|
5
|
-
const _ = /* @__PURE__ */ new WeakMap(), re = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
|
|
6
|
-
var n;
|
|
7
|
-
const t = e[0], r = (n = q()) == null ? void 0 : n.proxy;
|
|
8
|
-
if (r == null && !k())
|
|
9
|
-
throw new Error("injectLocal must be called in setup");
|
|
10
|
-
return r && _.has(r) && t in _.get(r) ? _.get(r)[t] : ee(...e);
|
|
11
|
-
}, oe = typeof window < "u" && typeof document < "u", se = Object.prototype.toString, ae = (e) => se.call(e) === "[object Object]", F = () => {
|
|
12
|
-
};
|
|
13
|
-
function z(...e) {
|
|
14
|
-
if (e.length !== 1)
|
|
15
|
-
return G(...e);
|
|
16
|
-
const n = e[0];
|
|
17
|
-
return typeof n == "function" ? Q(J(() => ({ get: n, set: F }))) : D(n);
|
|
18
|
-
}
|
|
19
|
-
function ue(e, n) {
|
|
20
|
-
function t(...r) {
|
|
21
|
-
return new Promise((a, s) => {
|
|
22
|
-
Promise.resolve(e(() => n.apply(this, r), { fn: n, thisArg: this, args: r })).then(a).catch(s);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return t;
|
|
26
|
-
}
|
|
27
|
-
function ie(e, n = {}) {
|
|
28
|
-
let t, r, a = F;
|
|
29
|
-
const s = (o) => {
|
|
30
|
-
clearTimeout(o), a(), a = F;
|
|
31
|
-
};
|
|
32
|
-
let d;
|
|
33
|
-
return (o) => {
|
|
34
|
-
const u = g(e), i = g(n.maxWait);
|
|
35
|
-
return t && s(t), u <= 0 || i !== void 0 && i <= 0 ? (r && (s(r), r = void 0), Promise.resolve(o())) : new Promise((p, m) => {
|
|
36
|
-
a = n.rejectOnCancel ? m : p, d = o, i && !r && (r = setTimeout(() => {
|
|
37
|
-
t && s(t), r = void 0, p(d());
|
|
38
|
-
}, i)), t = setTimeout(() => {
|
|
39
|
-
r && s(r), r = void 0, p(o());
|
|
40
|
-
}, u);
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
function le(e, n) {
|
|
45
|
-
var t;
|
|
46
|
-
if (typeof e == "number")
|
|
47
|
-
return e + n;
|
|
48
|
-
const r = ((t = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : t[0]) || "", a = e.slice(r.length), s = Number.parseFloat(r) + n;
|
|
49
|
-
return Number.isNaN(s) ? e : s + a;
|
|
50
|
-
}
|
|
51
|
-
function A(e) {
|
|
52
|
-
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
53
|
-
}
|
|
54
|
-
function Y(e) {
|
|
55
|
-
return Array.isArray(e) ? e : [e];
|
|
56
|
-
}
|
|
57
|
-
function ce(e) {
|
|
58
|
-
return q();
|
|
59
|
-
}
|
|
60
|
-
// @__NO_SIDE_EFFECTS__
|
|
61
|
-
function xe(e, n = 200, t = {}) {
|
|
62
|
-
return ue(
|
|
63
|
-
ie(n, t),
|
|
64
|
-
e
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
function fe(e, n = !0, t) {
|
|
68
|
-
ce() ? B(e, t) : n ? e() : I(e);
|
|
69
|
-
}
|
|
70
|
-
function de(e, n, t) {
|
|
71
|
-
return C(
|
|
72
|
-
e,
|
|
73
|
-
n,
|
|
74
|
-
{
|
|
75
|
-
...t,
|
|
76
|
-
immediate: !0
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
const W = oe ? window : void 0;
|
|
81
|
-
function N(e) {
|
|
82
|
-
var n;
|
|
83
|
-
const t = g(e);
|
|
84
|
-
return (n = t == null ? void 0 : t.$el) != null ? n : t;
|
|
85
|
-
}
|
|
86
|
-
function T(...e) {
|
|
87
|
-
const n = [], t = () => {
|
|
88
|
-
n.forEach((c) => c()), n.length = 0;
|
|
89
|
-
}, r = (c, o, u, i) => (c.addEventListener(o, u, i), () => c.removeEventListener(o, u, i)), a = b(() => {
|
|
90
|
-
const c = Y(g(e[0])).filter((o) => o != null);
|
|
91
|
-
return c.every((o) => typeof o != "string") ? c : void 0;
|
|
92
|
-
}), s = de(
|
|
93
|
-
() => {
|
|
94
|
-
var c, o;
|
|
95
|
-
return [
|
|
96
|
-
(o = (c = a.value) == null ? void 0 : c.map((u) => N(u))) != null ? o : [W].filter((u) => u != null),
|
|
97
|
-
Y(g(a.value ? e[1] : e[0])),
|
|
98
|
-
Y(ne(a.value ? e[2] : e[1])),
|
|
99
|
-
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
100
|
-
g(a.value ? e[3] : e[2])
|
|
101
|
-
];
|
|
102
|
-
},
|
|
103
|
-
([c, o, u, i]) => {
|
|
104
|
-
if (t(), !(c != null && c.length) || !(o != null && o.length) || !(u != null && u.length))
|
|
105
|
-
return;
|
|
106
|
-
const p = ae(i) ? { ...i } : i;
|
|
107
|
-
n.push(
|
|
108
|
-
...c.flatMap(
|
|
109
|
-
(m) => o.flatMap(
|
|
110
|
-
(l) => u.map((f) => r(m, l, f, p))
|
|
111
|
-
)
|
|
112
|
-
)
|
|
113
|
-
);
|
|
114
|
-
},
|
|
115
|
-
{ flush: "post" }
|
|
116
|
-
), d = () => {
|
|
117
|
-
s(), t();
|
|
118
|
-
};
|
|
119
|
-
return H(t), d;
|
|
120
|
-
}
|
|
121
|
-
// @__NO_SIDE_EFFECTS__
|
|
122
|
-
function K(e) {
|
|
123
|
-
return b(() => !!e());
|
|
124
|
-
}
|
|
125
|
-
const ve = Symbol("vueuse-ssr-width");
|
|
126
|
-
// @__NO_SIDE_EFFECTS__
|
|
127
|
-
function V() {
|
|
128
|
-
const e = k() ? /* @__PURE__ */ re(ve, null) : null;
|
|
129
|
-
return typeof e == "number" ? e : void 0;
|
|
130
|
-
}
|
|
131
|
-
function $(e, n = {}) {
|
|
132
|
-
const { window: t = W, ssrWidth: r = /* @__PURE__ */ V() } = n, a = /* @__PURE__ */ K(() => t && "matchMedia" in t && typeof t.matchMedia == "function"), s = x(typeof r == "number"), d = x(), c = x(!1), o = (u) => {
|
|
133
|
-
c.value = u.matches;
|
|
134
|
-
};
|
|
135
|
-
return te(() => {
|
|
136
|
-
if (s.value) {
|
|
137
|
-
s.value = !a.value;
|
|
138
|
-
const u = g(e).split(",");
|
|
139
|
-
c.value = u.some((i) => {
|
|
140
|
-
const p = i.includes("not all"), m = i.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), l = i.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
141
|
-
let f = !!(m || l);
|
|
142
|
-
return m && f && (f = r >= A(m[1])), l && f && (f = r <= A(l[1])), p ? !f : f;
|
|
143
|
-
});
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
a.value && (d.value = t.matchMedia(g(e)), c.value = d.value.matches);
|
|
147
|
-
}), T(d, "change", o, { passive: !0 }), b(() => c.value);
|
|
148
|
-
}
|
|
149
|
-
const me = {
|
|
150
|
-
sm: 640,
|
|
151
|
-
md: 768,
|
|
152
|
-
lg: 1024,
|
|
153
|
-
xl: 1280,
|
|
154
|
-
"2xl": 1536
|
|
155
|
-
};
|
|
156
|
-
// @__NO_SIDE_EFFECTS__
|
|
157
|
-
function he(e, n = {}) {
|
|
158
|
-
function t(l, f) {
|
|
159
|
-
let y = g(e[g(l)]);
|
|
160
|
-
return f != null && (y = le(y, f)), typeof y == "number" && (y = `${y}px`), y;
|
|
161
|
-
}
|
|
162
|
-
const { window: r = W, strategy: a = "min-width", ssrWidth: s = /* @__PURE__ */ V() } = n, d = typeof s == "number", c = d ? x(!1) : { value: !0 };
|
|
163
|
-
d && fe(() => c.value = !!r);
|
|
164
|
-
function o(l, f) {
|
|
165
|
-
return !c.value && d ? l === "min" ? s >= A(f) : s <= A(f) : r ? r.matchMedia(`(${l}-width: ${f})`).matches : !1;
|
|
166
|
-
}
|
|
167
|
-
const u = (l) => $(() => `(min-width: ${t(l)})`, n), i = (l) => $(() => `(max-width: ${t(l)})`, n), p = Object.keys(e).reduce((l, f) => (Object.defineProperty(l, f, {
|
|
168
|
-
get: () => a === "min-width" ? u(f) : i(f),
|
|
169
|
-
enumerable: !0,
|
|
170
|
-
configurable: !0
|
|
171
|
-
}), l), {});
|
|
172
|
-
function m() {
|
|
173
|
-
const l = Object.keys(e).map((f) => [f, p[f], A(t(f))]).sort((f, y) => f[2] - y[2]);
|
|
174
|
-
return b(() => l.filter(([, f]) => f.value).map(([f]) => f));
|
|
175
|
-
}
|
|
176
|
-
return Object.assign(p, {
|
|
177
|
-
greaterOrEqual: u,
|
|
178
|
-
smallerOrEqual: i,
|
|
179
|
-
greater(l) {
|
|
180
|
-
return $(() => `(min-width: ${t(l, 0.1)})`, n);
|
|
181
|
-
},
|
|
182
|
-
smaller(l) {
|
|
183
|
-
return $(() => `(max-width: ${t(l, -0.1)})`, n);
|
|
184
|
-
},
|
|
185
|
-
between(l, f) {
|
|
186
|
-
return $(() => `(min-width: ${t(l)}) and (max-width: ${t(f, -0.1)})`, n);
|
|
187
|
-
},
|
|
188
|
-
isGreater(l) {
|
|
189
|
-
return o("min", t(l, 0.1));
|
|
190
|
-
},
|
|
191
|
-
isGreaterOrEqual(l) {
|
|
192
|
-
return o("min", t(l));
|
|
193
|
-
},
|
|
194
|
-
isSmaller(l) {
|
|
195
|
-
return o("max", t(l, -0.1));
|
|
196
|
-
},
|
|
197
|
-
isSmallerOrEqual(l) {
|
|
198
|
-
return o("max", t(l));
|
|
199
|
-
},
|
|
200
|
-
isInBetween(l, f) {
|
|
201
|
-
return o("min", t(l)) && o("max", t(f, -0.1));
|
|
202
|
-
},
|
|
203
|
-
current: m,
|
|
204
|
-
active() {
|
|
205
|
-
const l = m();
|
|
206
|
-
return b(() => l.value.length === 0 ? "" : l.value.at(a === "min-width" ? -1 : 0));
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
function pe(e, n, t = {}) {
|
|
211
|
-
const { window: r = W, ...a } = t;
|
|
212
|
-
let s;
|
|
213
|
-
const d = /* @__PURE__ */ K(() => r && "ResizeObserver" in r), c = () => {
|
|
214
|
-
s && (s.disconnect(), s = void 0);
|
|
215
|
-
}, o = b(() => {
|
|
216
|
-
const p = g(e);
|
|
217
|
-
return Array.isArray(p) ? p.map((m) => N(m)) : [N(p)];
|
|
218
|
-
}), u = C(
|
|
219
|
-
o,
|
|
220
|
-
(p) => {
|
|
221
|
-
if (c(), d.value && r) {
|
|
222
|
-
s = new ResizeObserver(n);
|
|
223
|
-
for (const m of p)
|
|
224
|
-
m && s.observe(m, a);
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
{ immediate: !0, flush: "post" }
|
|
228
|
-
), i = () => {
|
|
229
|
-
c(), u();
|
|
230
|
-
};
|
|
231
|
-
return H(i), {
|
|
232
|
-
isSupported: d,
|
|
233
|
-
stop: i
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
const we = {
|
|
237
|
-
ctrl: "control",
|
|
238
|
-
command: "meta",
|
|
239
|
-
cmd: "meta",
|
|
240
|
-
option: "alt",
|
|
241
|
-
up: "arrowup",
|
|
242
|
-
down: "arrowdown",
|
|
243
|
-
left: "arrowleft",
|
|
244
|
-
right: "arrowright"
|
|
245
|
-
};
|
|
246
|
-
function ye(e = {}) {
|
|
247
|
-
const {
|
|
248
|
-
reactive: n = !1,
|
|
249
|
-
target: t = W,
|
|
250
|
-
aliasMap: r = we,
|
|
251
|
-
passive: a = !0,
|
|
252
|
-
onEventFired: s = F
|
|
253
|
-
} = e, d = P(/* @__PURE__ */ new Set()), c = {
|
|
254
|
-
toJSON() {
|
|
255
|
-
return {};
|
|
256
|
-
},
|
|
257
|
-
current: d
|
|
258
|
-
}, o = n ? P(c) : c, u = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Set();
|
|
259
|
-
function m(w, h) {
|
|
260
|
-
w in o && (n ? o[w] = h : o[w].value = h);
|
|
261
|
-
}
|
|
262
|
-
function l() {
|
|
263
|
-
d.clear();
|
|
264
|
-
for (const w of p)
|
|
265
|
-
m(w, !1);
|
|
266
|
-
}
|
|
267
|
-
function f(w, h) {
|
|
268
|
-
var O, S;
|
|
269
|
-
const E = (O = w.key) == null ? void 0 : O.toLowerCase(), L = [(S = w.code) == null ? void 0 : S.toLowerCase(), E].filter(Boolean);
|
|
270
|
-
E && (h ? d.add(E) : d.delete(E));
|
|
271
|
-
for (const v of L)
|
|
272
|
-
p.add(v), m(v, h);
|
|
273
|
-
if (E === "shift" && !h) {
|
|
274
|
-
const v = Array.from(i), M = v.indexOf("shift");
|
|
275
|
-
v.forEach((R, X) => {
|
|
276
|
-
X >= M && (d.delete(R), m(R, !1));
|
|
277
|
-
}), i.clear();
|
|
278
|
-
} else typeof w.getModifierState == "function" && w.getModifierState("Shift") && h && [...d, ...L].forEach((v) => i.add(v));
|
|
279
|
-
E === "meta" && !h ? (u.forEach((v) => {
|
|
280
|
-
d.delete(v), m(v, !1);
|
|
281
|
-
}), u.clear()) : typeof w.getModifierState == "function" && w.getModifierState("Meta") && h && [...d, ...L].forEach((v) => u.add(v));
|
|
282
|
-
}
|
|
283
|
-
T(t, "keydown", (w) => (f(w, !0), s(w)), { passive: a }), T(t, "keyup", (w) => (f(w, !1), s(w)), { passive: a }), T("blur", l, { passive: a }), T("focus", l, { passive: a });
|
|
284
|
-
const y = new Proxy(
|
|
285
|
-
o,
|
|
286
|
-
{
|
|
287
|
-
get(w, h, O) {
|
|
288
|
-
if (typeof h != "string")
|
|
289
|
-
return Reflect.get(w, h, O);
|
|
290
|
-
if (h = h.toLowerCase(), h in r && (h = r[h]), !(h in o))
|
|
291
|
-
if (/[+_-]/.test(h)) {
|
|
292
|
-
const E = h.split(/[+_-]/g).map((j) => j.trim());
|
|
293
|
-
o[h] = b(() => E.map((j) => g(y[j])).every(Boolean));
|
|
294
|
-
} else
|
|
295
|
-
o[h] = x(!1);
|
|
296
|
-
const S = Reflect.get(w, h, O);
|
|
297
|
-
return n ? g(S) : S;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
);
|
|
301
|
-
return y;
|
|
302
|
-
}
|
|
303
|
-
function ge(e, n = {}) {
|
|
304
|
-
const {
|
|
305
|
-
threshold: t = 50,
|
|
306
|
-
onSwipe: r,
|
|
307
|
-
onSwipeEnd: a,
|
|
308
|
-
onSwipeStart: s,
|
|
309
|
-
passive: d = !0
|
|
310
|
-
} = n, c = P({ x: 0, y: 0 }), o = P({ x: 0, y: 0 }), u = b(() => c.x - o.x), i = b(() => c.y - o.y), { max: p, abs: m } = Math, l = b(() => p(m(u.value), m(i.value)) >= t), f = x(!1), y = b(() => l.value ? m(u.value) > m(i.value) ? u.value > 0 ? "left" : "right" : i.value > 0 ? "up" : "down" : "none"), w = (v) => [v.touches[0].clientX, v.touches[0].clientY], h = (v, M) => {
|
|
311
|
-
c.x = v, c.y = M;
|
|
312
|
-
}, O = (v, M) => {
|
|
313
|
-
o.x = v, o.y = M;
|
|
314
|
-
}, S = { passive: d, capture: !d }, E = (v) => {
|
|
315
|
-
f.value && (a == null || a(v, y.value)), f.value = !1;
|
|
316
|
-
}, j = [
|
|
317
|
-
T(e, "touchstart", (v) => {
|
|
318
|
-
if (v.touches.length !== 1)
|
|
319
|
-
return;
|
|
320
|
-
const [M, R] = w(v);
|
|
321
|
-
h(M, R), O(M, R), s == null || s(v);
|
|
322
|
-
}, S),
|
|
323
|
-
T(e, "touchmove", (v) => {
|
|
324
|
-
if (v.touches.length !== 1)
|
|
325
|
-
return;
|
|
326
|
-
const [M, R] = w(v);
|
|
327
|
-
O(M, R), S.capture && !S.passive && Math.abs(u.value) > Math.abs(i.value) && v.preventDefault(), !f.value && l.value && (f.value = !0), f.value && (r == null || r(v));
|
|
328
|
-
}, S),
|
|
329
|
-
T(e, ["touchend", "touchcancel"], E, S)
|
|
330
|
-
];
|
|
331
|
-
return {
|
|
332
|
-
isSwiping: f,
|
|
333
|
-
direction: y,
|
|
334
|
-
coordsStart: c,
|
|
335
|
-
coordsEnd: o,
|
|
336
|
-
lengthX: u,
|
|
337
|
-
lengthY: i,
|
|
338
|
-
stop: () => j.forEach((v) => v()),
|
|
339
|
-
// TODO: Remove in the next major version
|
|
340
|
-
isPassiveEventSupported: !0
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
function be(e = W, n) {
|
|
344
|
-
e && typeof e.requestAnimationFrame == "function" ? e.requestAnimationFrame(n) : n();
|
|
345
|
-
}
|
|
346
|
-
function Ee(e = {}) {
|
|
347
|
-
var n, t;
|
|
348
|
-
const { window: r = W } = e, a = z(e == null ? void 0 : e.element), s = z((n = e == null ? void 0 : e.input) != null ? n : ""), d = (t = e == null ? void 0 : e.styleProp) != null ? t : "height", c = x(1), o = x(0);
|
|
349
|
-
function u() {
|
|
350
|
-
var i;
|
|
351
|
-
if (!a.value)
|
|
352
|
-
return;
|
|
353
|
-
let p = "";
|
|
354
|
-
a.value.style[d] = "1px", c.value = (i = a.value) == null ? void 0 : i.scrollHeight;
|
|
355
|
-
const m = g(e == null ? void 0 : e.styleTarget);
|
|
356
|
-
m ? m.style[d] = `${c.value}px` : p = `${c.value}px`, a.value.style[d] = p;
|
|
357
|
-
}
|
|
358
|
-
return C([s, a], () => I(u), { immediate: !0 }), C(c, () => {
|
|
359
|
-
var i;
|
|
360
|
-
return (i = e == null ? void 0 : e.onResize) == null ? void 0 : i.call(e);
|
|
361
|
-
}), pe(a, ([{ contentRect: i }]) => {
|
|
362
|
-
o.value !== i.width && be(r, () => {
|
|
363
|
-
o.value = i.width, u();
|
|
364
|
-
});
|
|
365
|
-
}), e != null && e.watch && C(e.watch, u, { immediate: !0, deep: !0 }), {
|
|
366
|
-
textarea: a,
|
|
367
|
-
input: s,
|
|
368
|
-
triggerResize: u
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
const Me = (e, n) => {
|
|
372
|
-
const t = D(!1), r = D(!1), a = D(null), s = ye();
|
|
373
|
-
s != null && s.escape && C(s.escape, (o) => {
|
|
374
|
-
d(o);
|
|
375
|
-
});
|
|
376
|
-
const d = (o) => {
|
|
377
|
-
r.value = !1, setTimeout(() => {
|
|
378
|
-
t.value = !1;
|
|
379
|
-
}, 50), setTimeout(() => {
|
|
380
|
-
e("close", o || new Event("close"));
|
|
381
|
-
}, 300), a.value && clearTimeout(a.value);
|
|
382
|
-
}, c = () => e("open", t.value);
|
|
383
|
-
return B(() => {
|
|
384
|
-
setTimeout(() => {
|
|
385
|
-
t.value = !0;
|
|
386
|
-
}, 300), setTimeout(() => {
|
|
387
|
-
r.value = !0;
|
|
388
|
-
}, 500), n && (a.value = setTimeout(() => {
|
|
389
|
-
d();
|
|
390
|
-
}, n * 1e3));
|
|
391
|
-
}), {
|
|
392
|
-
show: t,
|
|
393
|
-
overlay: r,
|
|
394
|
-
onClose: d,
|
|
395
|
-
onOpen: c
|
|
396
|
-
};
|
|
397
|
-
}, Oe = (e, n, t) => {
|
|
398
|
-
const r = b(() => {
|
|
399
|
-
var u;
|
|
400
|
-
return (u = n.value) == null ? void 0 : u.clientHeight;
|
|
401
|
-
}), a = x("translateY(0)"), s = x(1), d = x(!1);
|
|
402
|
-
if ((/* @__PURE__ */ he(me)).greaterOrEqual("lg")) {
|
|
403
|
-
const { lengthY: u } = ge(e, {
|
|
404
|
-
passive: !1,
|
|
405
|
-
onSwipeStart() {
|
|
406
|
-
d.value = !0;
|
|
407
|
-
},
|
|
408
|
-
onSwipe() {
|
|
409
|
-
if (r.value)
|
|
410
|
-
if (u.value < 0) {
|
|
411
|
-
const i = Math.abs(u.value);
|
|
412
|
-
a.value = `translateY(${i}px)`, s.value = 1.1 - i / r.value, s.value < 0.3 && (s.value = 0);
|
|
413
|
-
} else
|
|
414
|
-
a.value = "translateY(0)", s.value = 1;
|
|
415
|
-
},
|
|
416
|
-
onSwipeEnd(i) {
|
|
417
|
-
d.value = !1, u.value < 0 && r.value && Math.abs(u.value) / r.value >= 0.5 ? (s.value = 0, setTimeout(() => {
|
|
418
|
-
t(i);
|
|
419
|
-
}, 100)) : (a.value = "translateY(0)", s.value = 1);
|
|
420
|
-
}
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
return {
|
|
424
|
-
isSwiping: d,
|
|
425
|
-
transform: a,
|
|
426
|
-
opacity: s
|
|
427
|
-
};
|
|
428
|
-
};
|
|
429
|
-
export {
|
|
430
|
-
Oe as a,
|
|
431
|
-
he as b,
|
|
432
|
-
me as c,
|
|
433
|
-
xe as d,
|
|
434
|
-
Ee as e,
|
|
435
|
-
Me as u
|
|
436
|
-
};
|