vuesp-components 2.5.1 → 3.0.0
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/README.md +1 -1
- package/THIRD_PARTY_LICENSES.md +238 -0
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/VDialog.vue_vue_type_script_setup_true_lang-C_akEjfi.js +900 -0
- package/dist/components/app/AppHeader.vue.d.ts.map +1 -1
- package/dist/components/app/AppNav.vue.d.ts.map +1 -1
- package/dist/components/app/AppProgress.vue.d.ts.map +1 -1
- package/dist/components/block/breadcrumb/BlockBreadcrumb.vue.d.ts.map +1 -1
- package/dist/components/block/data/BlockDataSettings.vue.d.ts.map +1 -1
- package/dist/components/block/data/BlockFieldCard.vue.d.ts.map +1 -1
- package/dist/components/block/data/BlockMetricCard.vue.d.ts.map +1 -1
- package/dist/components/block/data/BlockPicker.vue.d.ts.map +1 -1
- package/dist/components/block/data/context.d.ts +0 -4
- package/dist/components/block/data/context.d.ts.map +1 -1
- package/dist/components/block/data/deviceStorage.d.ts +0 -4
- package/dist/components/block/data/deviceStorage.d.ts.map +1 -1
- package/dist/components/block/data/useBlock.d.ts +7 -7
- package/dist/components/block/info/types.d.ts +1 -1
- package/dist/components/block/info/types.d.ts.map +1 -1
- package/dist/components/block/presets/energy-flow/EnergyFlowCard.vue.d.ts +1 -1
- package/dist/components/block/presets/energy-flow/EnergyFlowCard.vue.d.ts.map +1 -1
- package/dist/components/block/status/types.d.ts +1 -1
- package/dist/components/block/status/types.d.ts.map +1 -1
- package/dist/components/card/index.d.ts +1 -2
- package/dist/components/card/index.d.ts.map +1 -1
- package/dist/components/card/notification/CardNotification.vue.d.ts.map +1 -1
- package/dist/components/card/notification/types.d.ts +1 -1
- package/dist/components/card/notification/types.d.ts.map +1 -1
- package/dist/components/card/types.d.ts +0 -1
- package/dist/components/card/types.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardBase.vue.d.ts +2 -2
- package/dist/components/dashboard/cards/CardBase.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardButton.vue.d.ts +2 -2
- package/dist/components/dashboard/cards/CardButton.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardDate.vue.d.ts +10 -6
- package/dist/components/dashboard/cards/CardDate.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardDimmer.vue.d.ts +2 -2
- package/dist/components/dashboard/cards/CardInfo.vue.d.ts +2 -2
- package/dist/components/dashboard/cards/CardInput.vue.d.ts +2 -2
- package/dist/components/dashboard/cards/CardInput.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardList.vue.d.ts +2 -2
- package/dist/components/dashboard/cards/CardList.vue.d.ts.map +1 -1
- package/dist/components/dashboard/edit/ItemEdit.vue.d.ts.map +1 -1
- package/dist/components/dashboard/edit/ItemOptions.vue.d.ts +3 -3
- package/dist/components/dashboard/edit/ItemOptions.vue.d.ts.map +1 -1
- package/dist/components/index.es.js +2919 -3041
- package/dist/components/script/editor/ScriptEditor.vue.d.ts.map +1 -1
- package/dist/components/script/editor/plugins/autocomplete.d.ts.map +1 -1
- package/dist/components/script/viewDocs/ScriptViewDocs.vue.d.ts +1 -1
- package/dist/components/script/viewDocs/ScriptViewDocs.vue.d.ts.map +1 -1
- package/dist/components/ui/accordion/VAccordion.vue.d.ts +26 -0
- package/dist/components/ui/accordion/VAccordion.vue.d.ts.map +1 -0
- package/dist/components/ui/accordion/VAccordionItem.vue.d.ts +24 -0
- package/dist/components/ui/accordion/VAccordionItem.vue.d.ts.map +1 -0
- package/dist/components/ui/button/VButton.vue.d.ts.map +1 -1
- package/dist/components/ui/button/types.d.ts +3 -3
- package/dist/components/ui/button/types.d.ts.map +1 -1
- package/dist/components/{card/main/CardMain.vue.d.ts → ui/card/VCard.vue.d.ts} +5 -4
- package/dist/components/ui/card/VCard.vue.d.ts.map +1 -0
- package/dist/components/ui/card/types.d.ts +14 -0
- package/dist/components/ui/card/types.d.ts.map +1 -0
- package/dist/components/ui/checkbox/VCheckbox.vue.d.ts.map +1 -1
- package/dist/components/ui/dialog/VDialog.vue.d.ts +6 -2
- package/dist/components/ui/dialog/VDialog.vue.d.ts.map +1 -1
- package/dist/components/ui/dialog/VPopup.vue.d.ts.map +1 -1
- package/dist/components/ui/dialog/types.d.ts +2 -0
- package/dist/components/ui/dialog/types.d.ts.map +1 -1
- package/dist/components/ui/expansion/VExpansion.vue.d.ts.map +1 -1
- package/dist/components/ui/file/VFile.vue.d.ts.map +1 -1
- package/dist/components/ui/func/VFunc.vue.d.ts.map +1 -1
- package/dist/components/ui/{vision/VisionIcon.vue.d.ts → icon/VIcon.vue.d.ts} +3 -1
- package/dist/components/ui/icon/VIcon.vue.d.ts.map +1 -0
- package/dist/components/ui/icon/icons.d.ts +4 -0
- package/dist/components/ui/icon/icons.d.ts.map +1 -0
- package/dist/components/ui/icon/types.d.ts +8 -3
- package/dist/components/ui/icon/types.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +6 -3
- package/dist/components/ui/index.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/select/VSelect.vue.d.ts.map +1 -1
- package/dist/components/ui/text-field/VTextField.vue.d.ts +6 -2
- package/dist/components/ui/text-field/VTextField.vue.d.ts.map +1 -1
- package/dist/components/ui/text-field/VTextWrapper.vue.d.ts.map +1 -0
- package/dist/components/ui/text-field/types.d.ts +30 -2
- package/dist/components/ui/text-field/types.d.ts.map +1 -1
- package/dist/components/ui/text-field/useTextField.d.ts +11 -0
- package/dist/components/ui/text-field/useTextField.d.ts.map +1 -0
- package/dist/components/ui/wifiIcon/VWifiIcon.vue.d.ts.map +1 -1
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/composables/index.es.js +31 -30
- package/dist/composables/useFocusTrap.d.ts +3 -0
- package/dist/composables/useFocusTrap.d.ts.map +1 -0
- package/dist/dashboard/index.d.ts +1 -1
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/types.d.ts +1 -2
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +14 -15
- package/dist/main.d.ts.map +1 -1
- package/dist/pages/kit/KitRow.vue.d.ts +21 -0
- package/dist/pages/kit/KitRow.vue.d.ts.map +1 -0
- package/dist/pages/kit/KitSection.vue.d.ts +22 -0
- package/dist/pages/kit/KitSection.vue.d.ts.map +1 -0
- package/dist/pages/kit/KitShowcase.vue.d.ts +3 -0
- package/dist/pages/kit/KitShowcase.vue.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/dist/theme.css +182 -39
- package/dist/useDialog-Buvn63AR.js +599 -0
- package/package.json +3 -4
- package/dist/CardMain.vue_vue_type_style_index_0_lang-CCrFdlnW.js +0 -823
- package/dist/components/card/main/CardMain.vue.d.ts.map +0 -1
- package/dist/components/card/main/types.d.ts +0 -7
- package/dist/components/card/main/types.d.ts.map +0 -1
- package/dist/components/ui/text-wrapper/VTextWrapper.vue.d.ts.map +0 -1
- package/dist/components/ui/text-wrapper/types.d.ts +0 -12
- package/dist/components/ui/text-wrapper/types.d.ts.map +0 -1
- package/dist/components/ui/vision/VisionIcon.vue.d.ts.map +0 -1
- package/dist/useDialog-BdpYSys6.js +0 -567
- /package/dist/components/ui/{text-wrapper → text-field}/VTextWrapper.vue.d.ts +0 -0
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
import { shallowRef as x, shallowReadonly as z, onMounted as K, nextTick as G, toValue as S, getCurrentScope as Z, onScopeDispose as ee, watch as B, getCurrentInstance as U, hasInjectionContext as V, inject as te, computed as T, reactive as $, watchEffect as ne, unref as oe, toRaw as re, onBeforeUnmount as ie, ref as _ } from "vue";
|
|
2
|
+
function X(e) {
|
|
3
|
+
return Z() ? (ee(e), !0) : !1;
|
|
4
|
+
}
|
|
5
|
+
const F = /* @__PURE__ */ new WeakMap(), se = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
|
|
6
|
+
var o;
|
|
7
|
+
const t = e[0], n = (o = U()) == null ? void 0 : o.proxy;
|
|
8
|
+
if (n == null && !V())
|
|
9
|
+
throw new Error("injectLocal must be called in setup");
|
|
10
|
+
return n && F.has(n) && t in F.get(n) ? F.get(n)[t] : te(...e);
|
|
11
|
+
}, D = typeof window < "u" && typeof document < "u";
|
|
12
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
13
|
+
const ae = Object.prototype.toString, ue = (e) => ae.call(e) === "[object Object]", C = () => {
|
|
14
|
+
}, le = /* @__PURE__ */ ce();
|
|
15
|
+
function ce() {
|
|
16
|
+
var e, o;
|
|
17
|
+
return D && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((o = window == null ? void 0 : window.navigator) == null ? void 0 : o.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
18
|
+
}
|
|
19
|
+
function fe(e, o) {
|
|
20
|
+
function t(...n) {
|
|
21
|
+
return new Promise((d, r) => {
|
|
22
|
+
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(d).catch(r);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
}
|
|
27
|
+
function de(e, o = {}) {
|
|
28
|
+
let t, n, d = C;
|
|
29
|
+
const r = (i) => {
|
|
30
|
+
clearTimeout(i), d(), d = C;
|
|
31
|
+
};
|
|
32
|
+
let a;
|
|
33
|
+
return (i) => {
|
|
34
|
+
const u = S(e), v = S(o.maxWait);
|
|
35
|
+
return t && r(t), u <= 0 || v !== void 0 && v <= 0 ? (n && (r(n), n = void 0), Promise.resolve(i())) : new Promise((g, y) => {
|
|
36
|
+
d = o.rejectOnCancel ? y : g, a = i, v && !n && (n = setTimeout(() => {
|
|
37
|
+
t && r(t), n = void 0, g(a());
|
|
38
|
+
}, v)), t = setTimeout(() => {
|
|
39
|
+
n && r(n), n = void 0, g(i());
|
|
40
|
+
}, u);
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function me(e) {
|
|
45
|
+
let o;
|
|
46
|
+
function t() {
|
|
47
|
+
return o || (o = e()), o;
|
|
48
|
+
}
|
|
49
|
+
return t.reset = async () => {
|
|
50
|
+
const n = o;
|
|
51
|
+
o = void 0, n && await n;
|
|
52
|
+
}, t;
|
|
53
|
+
}
|
|
54
|
+
function ve(e, o) {
|
|
55
|
+
var t;
|
|
56
|
+
if (typeof e == "number")
|
|
57
|
+
return e + o;
|
|
58
|
+
const n = ((t = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : t[0]) || "", d = e.slice(n.length), r = Number.parseFloat(n) + o;
|
|
59
|
+
return Number.isNaN(r) ? e : r + d;
|
|
60
|
+
}
|
|
61
|
+
function W(e) {
|
|
62
|
+
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
63
|
+
}
|
|
64
|
+
function I(e) {
|
|
65
|
+
return Array.isArray(e) ? e : [e];
|
|
66
|
+
}
|
|
67
|
+
function pe(e) {
|
|
68
|
+
return U();
|
|
69
|
+
}
|
|
70
|
+
// @__NO_SIDE_EFFECTS__
|
|
71
|
+
function Ce(e, o = 200, t = {}) {
|
|
72
|
+
return fe(
|
|
73
|
+
de(o, t),
|
|
74
|
+
e
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
function he(e, o = !0, t) {
|
|
78
|
+
pe() ? K(e, t) : o ? e() : G(e);
|
|
79
|
+
}
|
|
80
|
+
function we(e, o, t = {}) {
|
|
81
|
+
const {
|
|
82
|
+
immediate: n = !0,
|
|
83
|
+
immediateCallback: d = !1
|
|
84
|
+
} = t, r = x(!1);
|
|
85
|
+
let a;
|
|
86
|
+
function l() {
|
|
87
|
+
a && (clearTimeout(a), a = void 0);
|
|
88
|
+
}
|
|
89
|
+
function i() {
|
|
90
|
+
r.value = !1, l();
|
|
91
|
+
}
|
|
92
|
+
function u(...v) {
|
|
93
|
+
d && e(), l(), r.value = !0, a = setTimeout(() => {
|
|
94
|
+
r.value = !1, a = void 0, e(...v);
|
|
95
|
+
}, S(o));
|
|
96
|
+
}
|
|
97
|
+
return n && (r.value = !0, D && u()), X(i), {
|
|
98
|
+
isPending: z(r),
|
|
99
|
+
start: u,
|
|
100
|
+
stop: i
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function ye(e, o, t) {
|
|
104
|
+
return B(
|
|
105
|
+
e,
|
|
106
|
+
o,
|
|
107
|
+
{
|
|
108
|
+
...t,
|
|
109
|
+
immediate: !0
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
const R = D ? window : void 0, H = D ? window.navigator : void 0;
|
|
114
|
+
function k(e) {
|
|
115
|
+
var o;
|
|
116
|
+
const t = S(e);
|
|
117
|
+
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
118
|
+
}
|
|
119
|
+
function M(...e) {
|
|
120
|
+
const o = [], t = () => {
|
|
121
|
+
o.forEach((l) => l()), o.length = 0;
|
|
122
|
+
}, n = (l, i, u, v) => (l.addEventListener(i, u, v), () => l.removeEventListener(i, u, v)), d = T(() => {
|
|
123
|
+
const l = I(S(e[0])).filter((i) => i != null);
|
|
124
|
+
return l.every((i) => typeof i != "string") ? l : void 0;
|
|
125
|
+
}), r = ye(
|
|
126
|
+
() => {
|
|
127
|
+
var l, i;
|
|
128
|
+
return [
|
|
129
|
+
(i = (l = d.value) == null ? void 0 : l.map((u) => k(u))) != null ? i : [R].filter((u) => u != null),
|
|
130
|
+
I(S(d.value ? e[1] : e[0])),
|
|
131
|
+
I(oe(d.value ? e[2] : e[1])),
|
|
132
|
+
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
133
|
+
S(d.value ? e[3] : e[2])
|
|
134
|
+
];
|
|
135
|
+
},
|
|
136
|
+
([l, i, u, v]) => {
|
|
137
|
+
if (t(), !(l != null && l.length) || !(i != null && i.length) || !(u != null && u.length))
|
|
138
|
+
return;
|
|
139
|
+
const g = ue(v) ? { ...v } : v;
|
|
140
|
+
o.push(
|
|
141
|
+
...l.flatMap(
|
|
142
|
+
(y) => i.flatMap(
|
|
143
|
+
(f) => u.map((m) => n(y, f, m, g))
|
|
144
|
+
)
|
|
145
|
+
)
|
|
146
|
+
);
|
|
147
|
+
},
|
|
148
|
+
{ flush: "post" }
|
|
149
|
+
), a = () => {
|
|
150
|
+
r(), t();
|
|
151
|
+
};
|
|
152
|
+
return X(t), a;
|
|
153
|
+
}
|
|
154
|
+
let Y = !1;
|
|
155
|
+
function Pe(e, o, t = {}) {
|
|
156
|
+
const { window: n = R, ignore: d = [], capture: r = !0, detectIframe: a = !1, controls: l = !1 } = t;
|
|
157
|
+
if (!n)
|
|
158
|
+
return l ? { stop: C, cancel: C, trigger: C } : C;
|
|
159
|
+
if (le && !Y) {
|
|
160
|
+
Y = !0;
|
|
161
|
+
const s = { passive: !0 };
|
|
162
|
+
Array.from(n.document.body.children).forEach((c) => c.addEventListener("click", C, s)), n.document.documentElement.addEventListener("click", C, s);
|
|
163
|
+
}
|
|
164
|
+
let i = !0;
|
|
165
|
+
const u = (s) => S(d).some((c) => {
|
|
166
|
+
if (typeof c == "string")
|
|
167
|
+
return Array.from(n.document.querySelectorAll(c)).some((p) => p === s.target || s.composedPath().includes(p));
|
|
168
|
+
{
|
|
169
|
+
const p = k(c);
|
|
170
|
+
return p && (s.target === p || s.composedPath().includes(p));
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
function v(s) {
|
|
174
|
+
const c = S(s);
|
|
175
|
+
return c && c.$.subTree.shapeFlag === 16;
|
|
176
|
+
}
|
|
177
|
+
function g(s, c) {
|
|
178
|
+
const p = S(s), w = p.$.subTree && p.$.subTree.children;
|
|
179
|
+
return w == null || !Array.isArray(w) ? !1 : w.some((E) => E.el === c.target || c.composedPath().includes(E.el));
|
|
180
|
+
}
|
|
181
|
+
const y = (s) => {
|
|
182
|
+
const c = k(e);
|
|
183
|
+
if (s.target != null && !(!(c instanceof Element) && v(e) && g(e, s)) && !(!c || c === s.target || s.composedPath().includes(c))) {
|
|
184
|
+
if ("detail" in s && s.detail === 0 && (i = !u(s)), !i) {
|
|
185
|
+
i = !0;
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
o(s);
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
let f = !1;
|
|
192
|
+
const m = [
|
|
193
|
+
M(n, "click", (s) => {
|
|
194
|
+
f || (f = !0, setTimeout(() => {
|
|
195
|
+
f = !1;
|
|
196
|
+
}, 0), y(s));
|
|
197
|
+
}, { passive: !0, capture: r }),
|
|
198
|
+
M(n, "pointerdown", (s) => {
|
|
199
|
+
const c = k(e);
|
|
200
|
+
i = !u(s) && !!(c && !s.composedPath().includes(c));
|
|
201
|
+
}, { passive: !0 }),
|
|
202
|
+
a && M(n, "blur", (s) => {
|
|
203
|
+
setTimeout(() => {
|
|
204
|
+
var c;
|
|
205
|
+
const p = k(e);
|
|
206
|
+
((c = n.document.activeElement) == null ? void 0 : c.tagName) === "IFRAME" && !(p != null && p.contains(n.document.activeElement)) && o(s);
|
|
207
|
+
}, 0);
|
|
208
|
+
}, { passive: !0 })
|
|
209
|
+
].filter(Boolean), b = () => m.forEach((s) => s());
|
|
210
|
+
return l ? {
|
|
211
|
+
stop: b,
|
|
212
|
+
cancel: () => {
|
|
213
|
+
i = !1;
|
|
214
|
+
},
|
|
215
|
+
trigger: (s) => {
|
|
216
|
+
i = !0, y(s), i = !1;
|
|
217
|
+
}
|
|
218
|
+
} : b;
|
|
219
|
+
}
|
|
220
|
+
// @__NO_SIDE_EFFECTS__
|
|
221
|
+
function N(e) {
|
|
222
|
+
return T(() => !!e());
|
|
223
|
+
}
|
|
224
|
+
const ge = Symbol("vueuse-ssr-width");
|
|
225
|
+
// @__NO_SIDE_EFFECTS__
|
|
226
|
+
function Q() {
|
|
227
|
+
const e = V() ? /* @__PURE__ */ se(ge, null) : null;
|
|
228
|
+
return typeof e == "number" ? e : void 0;
|
|
229
|
+
}
|
|
230
|
+
function L(e, o = {}) {
|
|
231
|
+
const { window: t = R, ssrWidth: n = /* @__PURE__ */ Q() } = o, d = /* @__PURE__ */ N(() => t && "matchMedia" in t && typeof t.matchMedia == "function"), r = x(typeof n == "number"), a = x(), l = x(!1), i = (u) => {
|
|
232
|
+
l.value = u.matches;
|
|
233
|
+
};
|
|
234
|
+
return ne(() => {
|
|
235
|
+
if (r.value) {
|
|
236
|
+
r.value = !d.value;
|
|
237
|
+
const u = S(e).split(",");
|
|
238
|
+
l.value = u.some((v) => {
|
|
239
|
+
const g = v.includes("not all"), y = v.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), f = v.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
240
|
+
let m = !!(y || f);
|
|
241
|
+
return y && m && (m = n >= W(y[1])), f && m && (m = n <= W(f[1])), g ? !m : m;
|
|
242
|
+
});
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
d.value && (a.value = t.matchMedia(S(e)), l.value = a.value.matches);
|
|
246
|
+
}), M(a, "change", i, { passive: !0 }), T(() => l.value);
|
|
247
|
+
}
|
|
248
|
+
const be = {
|
|
249
|
+
sm: 640,
|
|
250
|
+
md: 768,
|
|
251
|
+
lg: 1024,
|
|
252
|
+
xl: 1280,
|
|
253
|
+
"2xl": 1536
|
|
254
|
+
};
|
|
255
|
+
// @__NO_SIDE_EFFECTS__
|
|
256
|
+
function Se(e, o = {}) {
|
|
257
|
+
function t(f, m) {
|
|
258
|
+
let b = S(e[S(f)]);
|
|
259
|
+
return m != null && (b = ve(b, m)), typeof b == "number" && (b = `${b}px`), b;
|
|
260
|
+
}
|
|
261
|
+
const { window: n = R, strategy: d = "min-width", ssrWidth: r = /* @__PURE__ */ Q() } = o, a = typeof r == "number", l = a ? x(!1) : { value: !0 };
|
|
262
|
+
a && he(() => l.value = !!n);
|
|
263
|
+
function i(f, m) {
|
|
264
|
+
return !l.value && a ? f === "min" ? r >= W(m) : r <= W(m) : n ? n.matchMedia(`(${f}-width: ${m})`).matches : !1;
|
|
265
|
+
}
|
|
266
|
+
const u = (f) => L(() => `(min-width: ${t(f)})`, o), v = (f) => L(() => `(max-width: ${t(f)})`, o), g = Object.keys(e).reduce((f, m) => (Object.defineProperty(f, m, {
|
|
267
|
+
get: () => d === "min-width" ? u(m) : v(m),
|
|
268
|
+
enumerable: !0,
|
|
269
|
+
configurable: !0
|
|
270
|
+
}), f), {});
|
|
271
|
+
function y() {
|
|
272
|
+
const f = Object.keys(e).map((m) => [m, g[m], W(t(m))]).sort((m, b) => m[2] - b[2]);
|
|
273
|
+
return T(() => f.filter(([, m]) => m.value).map(([m]) => m));
|
|
274
|
+
}
|
|
275
|
+
return Object.assign(g, {
|
|
276
|
+
greaterOrEqual: u,
|
|
277
|
+
smallerOrEqual: v,
|
|
278
|
+
greater(f) {
|
|
279
|
+
return L(() => `(min-width: ${t(f, 0.1)})`, o);
|
|
280
|
+
},
|
|
281
|
+
smaller(f) {
|
|
282
|
+
return L(() => `(max-width: ${t(f, -0.1)})`, o);
|
|
283
|
+
},
|
|
284
|
+
between(f, m) {
|
|
285
|
+
return L(() => `(min-width: ${t(f)}) and (max-width: ${t(m, -0.1)})`, o);
|
|
286
|
+
},
|
|
287
|
+
isGreater(f) {
|
|
288
|
+
return i("min", t(f, 0.1));
|
|
289
|
+
},
|
|
290
|
+
isGreaterOrEqual(f) {
|
|
291
|
+
return i("min", t(f));
|
|
292
|
+
},
|
|
293
|
+
isSmaller(f) {
|
|
294
|
+
return i("max", t(f, -0.1));
|
|
295
|
+
},
|
|
296
|
+
isSmallerOrEqual(f) {
|
|
297
|
+
return i("max", t(f));
|
|
298
|
+
},
|
|
299
|
+
isInBetween(f, m) {
|
|
300
|
+
return i("min", t(f)) && i("max", t(m, -0.1));
|
|
301
|
+
},
|
|
302
|
+
current: y,
|
|
303
|
+
active() {
|
|
304
|
+
const f = y();
|
|
305
|
+
return T(() => f.value.length === 0 ? "" : f.value.at(d === "min-width" ? -1 : 0));
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
// @__NO_SIDE_EFFECTS__
|
|
310
|
+
function q(e, o = {}) {
|
|
311
|
+
const {
|
|
312
|
+
controls: t = !1,
|
|
313
|
+
navigator: n = H
|
|
314
|
+
} = o, d = /* @__PURE__ */ N(() => n && "permissions" in n), r = x(), a = typeof e == "string" ? { name: e } : e, l = x(), i = () => {
|
|
315
|
+
var v, g;
|
|
316
|
+
l.value = (g = (v = r.value) == null ? void 0 : v.state) != null ? g : "prompt";
|
|
317
|
+
};
|
|
318
|
+
M(r, "change", i, { passive: !0 });
|
|
319
|
+
const u = me(async () => {
|
|
320
|
+
if (d.value) {
|
|
321
|
+
if (!r.value)
|
|
322
|
+
try {
|
|
323
|
+
r.value = await n.permissions.query(a);
|
|
324
|
+
} catch {
|
|
325
|
+
r.value = void 0;
|
|
326
|
+
} finally {
|
|
327
|
+
i();
|
|
328
|
+
}
|
|
329
|
+
if (t)
|
|
330
|
+
return re(r.value);
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
return u(), t ? {
|
|
334
|
+
state: l,
|
|
335
|
+
isSupported: d,
|
|
336
|
+
query: u
|
|
337
|
+
} : l;
|
|
338
|
+
}
|
|
339
|
+
function Ae(e = {}) {
|
|
340
|
+
const {
|
|
341
|
+
navigator: o = H,
|
|
342
|
+
read: t = !1,
|
|
343
|
+
source: n,
|
|
344
|
+
copiedDuring: d = 1500,
|
|
345
|
+
legacy: r = !1
|
|
346
|
+
} = e, a = /* @__PURE__ */ N(() => o && "clipboard" in o), l = /* @__PURE__ */ q("clipboard-read"), i = /* @__PURE__ */ q("clipboard-write"), u = T(() => a.value || r), v = x(""), g = x(!1), y = we(() => g.value = !1, d, { immediate: !1 });
|
|
347
|
+
async function f() {
|
|
348
|
+
let p = !(a.value && c(l.value));
|
|
349
|
+
if (!p)
|
|
350
|
+
try {
|
|
351
|
+
v.value = await o.clipboard.readText();
|
|
352
|
+
} catch {
|
|
353
|
+
p = !0;
|
|
354
|
+
}
|
|
355
|
+
p && (v.value = s());
|
|
356
|
+
}
|
|
357
|
+
u.value && t && M(["copy", "cut"], f, { passive: !0 });
|
|
358
|
+
async function m(p = S(n)) {
|
|
359
|
+
if (u.value && p != null) {
|
|
360
|
+
let w = !(a.value && c(i.value));
|
|
361
|
+
if (!w)
|
|
362
|
+
try {
|
|
363
|
+
await o.clipboard.writeText(p);
|
|
364
|
+
} catch {
|
|
365
|
+
w = !0;
|
|
366
|
+
}
|
|
367
|
+
w && b(p), v.value = p, g.value = !0, y.start();
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
function b(p) {
|
|
371
|
+
const w = document.createElement("textarea");
|
|
372
|
+
w.value = p ?? "", w.style.position = "absolute", w.style.opacity = "0", document.body.appendChild(w), w.select(), document.execCommand("copy"), w.remove();
|
|
373
|
+
}
|
|
374
|
+
function s() {
|
|
375
|
+
var p, w, E;
|
|
376
|
+
return (E = (w = (p = document == null ? void 0 : document.getSelection) == null ? void 0 : p.call(document)) == null ? void 0 : w.toString()) != null ? E : "";
|
|
377
|
+
}
|
|
378
|
+
function c(p) {
|
|
379
|
+
return p === "granted" || p === "prompt";
|
|
380
|
+
}
|
|
381
|
+
return {
|
|
382
|
+
isSupported: u,
|
|
383
|
+
text: v,
|
|
384
|
+
copied: g,
|
|
385
|
+
copy: m
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
const Ee = {
|
|
389
|
+
ctrl: "control",
|
|
390
|
+
command: "meta",
|
|
391
|
+
cmd: "meta",
|
|
392
|
+
option: "alt",
|
|
393
|
+
up: "arrowup",
|
|
394
|
+
down: "arrowdown",
|
|
395
|
+
left: "arrowleft",
|
|
396
|
+
right: "arrowright"
|
|
397
|
+
};
|
|
398
|
+
function xe(e = {}) {
|
|
399
|
+
const {
|
|
400
|
+
reactive: o = !1,
|
|
401
|
+
target: t = R,
|
|
402
|
+
aliasMap: n = Ee,
|
|
403
|
+
passive: d = !0,
|
|
404
|
+
onEventFired: r = C
|
|
405
|
+
} = e, a = $(/* @__PURE__ */ new Set()), l = {
|
|
406
|
+
toJSON() {
|
|
407
|
+
return {};
|
|
408
|
+
},
|
|
409
|
+
current: a
|
|
410
|
+
}, i = o ? $(l) : l, u = /* @__PURE__ */ new Set(), v = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set();
|
|
411
|
+
function y(s, c) {
|
|
412
|
+
s in i && (o ? i[s] = c : i[s].value = c);
|
|
413
|
+
}
|
|
414
|
+
function f() {
|
|
415
|
+
a.clear();
|
|
416
|
+
for (const s of g)
|
|
417
|
+
y(s, !1);
|
|
418
|
+
}
|
|
419
|
+
function m(s, c) {
|
|
420
|
+
var p, w;
|
|
421
|
+
const E = (p = s.key) == null ? void 0 : p.toLowerCase(), j = [(w = s.code) == null ? void 0 : w.toLowerCase(), E].filter(Boolean);
|
|
422
|
+
E && (c ? a.add(E) : a.delete(E));
|
|
423
|
+
for (const h of j)
|
|
424
|
+
g.add(h), y(h, c);
|
|
425
|
+
if (E === "shift" && !c) {
|
|
426
|
+
const h = Array.from(v), O = h.indexOf("shift");
|
|
427
|
+
h.forEach((P, J) => {
|
|
428
|
+
J >= O && (a.delete(P), y(P, !1));
|
|
429
|
+
}), v.clear();
|
|
430
|
+
} else typeof s.getModifierState == "function" && s.getModifierState("Shift") && c && [...a, ...j].forEach((h) => v.add(h));
|
|
431
|
+
E === "meta" && !c ? (u.forEach((h) => {
|
|
432
|
+
a.delete(h), y(h, !1);
|
|
433
|
+
}), u.clear()) : typeof s.getModifierState == "function" && s.getModifierState("Meta") && c && [...a, ...j].forEach((h) => u.add(h));
|
|
434
|
+
}
|
|
435
|
+
M(t, "keydown", (s) => (m(s, !0), r(s)), { passive: d }), M(t, "keyup", (s) => (m(s, !1), r(s)), { passive: d }), M("blur", f, { passive: d }), M("focus", f, { passive: d });
|
|
436
|
+
const b = new Proxy(
|
|
437
|
+
i,
|
|
438
|
+
{
|
|
439
|
+
get(s, c, p) {
|
|
440
|
+
if (typeof c != "string")
|
|
441
|
+
return Reflect.get(s, c, p);
|
|
442
|
+
if (c = c.toLowerCase(), c in n && (c = n[c]), !(c in i))
|
|
443
|
+
if (/[+_-]/.test(c)) {
|
|
444
|
+
const E = c.split(/[+_-]/g).map((A) => A.trim());
|
|
445
|
+
i[c] = T(() => E.map((A) => S(b[A])).every(Boolean));
|
|
446
|
+
} else
|
|
447
|
+
i[c] = x(!1);
|
|
448
|
+
const w = Reflect.get(s, c, p);
|
|
449
|
+
return o ? S(w) : w;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
);
|
|
453
|
+
return b;
|
|
454
|
+
}
|
|
455
|
+
// @__NO_SIDE_EFFECTS__
|
|
456
|
+
function Le(e) {
|
|
457
|
+
const o = L("(prefers-reduced-motion: reduce)", e);
|
|
458
|
+
return T(() => o.value ? "reduce" : "no-preference");
|
|
459
|
+
}
|
|
460
|
+
function Te(e, o = {}) {
|
|
461
|
+
const {
|
|
462
|
+
threshold: t = 50,
|
|
463
|
+
onSwipe: n,
|
|
464
|
+
onSwipeEnd: d,
|
|
465
|
+
onSwipeStart: r,
|
|
466
|
+
passive: a = !0
|
|
467
|
+
} = o, l = $({ x: 0, y: 0 }), i = $({ x: 0, y: 0 }), u = T(() => l.x - i.x), v = T(() => l.y - i.y), { max: g, abs: y } = Math, f = T(() => g(y(u.value), y(v.value)) >= t), m = x(!1), b = T(() => f.value ? y(u.value) > y(v.value) ? u.value > 0 ? "left" : "right" : v.value > 0 ? "up" : "down" : "none"), s = (h) => [h.touches[0].clientX, h.touches[0].clientY], c = (h, O) => {
|
|
468
|
+
l.x = h, l.y = O;
|
|
469
|
+
}, p = (h, O) => {
|
|
470
|
+
i.x = h, i.y = O;
|
|
471
|
+
}, w = { passive: a, capture: !a }, E = (h) => {
|
|
472
|
+
m.value && (d == null || d(h, b.value)), m.value = !1;
|
|
473
|
+
}, A = [
|
|
474
|
+
M(e, "touchstart", (h) => {
|
|
475
|
+
if (h.touches.length !== 1)
|
|
476
|
+
return;
|
|
477
|
+
const [O, P] = s(h);
|
|
478
|
+
c(O, P), p(O, P), r == null || r(h);
|
|
479
|
+
}, w),
|
|
480
|
+
M(e, "touchmove", (h) => {
|
|
481
|
+
if (h.touches.length !== 1)
|
|
482
|
+
return;
|
|
483
|
+
const [O, P] = s(h);
|
|
484
|
+
p(O, P), w.capture && !w.passive && Math.abs(u.value) > Math.abs(v.value) && h.preventDefault(), !m.value && f.value && (m.value = !0), m.value && (n == null || n(h));
|
|
485
|
+
}, w),
|
|
486
|
+
M(e, ["touchend", "touchcancel"], E, w)
|
|
487
|
+
];
|
|
488
|
+
return {
|
|
489
|
+
isSwiping: m,
|
|
490
|
+
direction: b,
|
|
491
|
+
coordsStart: l,
|
|
492
|
+
coordsEnd: i,
|
|
493
|
+
lengthX: u,
|
|
494
|
+
lengthY: v,
|
|
495
|
+
stop: () => A.forEach((h) => h()),
|
|
496
|
+
// TODO: Remove in the next major version
|
|
497
|
+
isPassiveEventSupported: !0
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
const Me = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
501
|
+
function ke(e, o) {
|
|
502
|
+
let t = null;
|
|
503
|
+
const n = () => {
|
|
504
|
+
const r = e.value;
|
|
505
|
+
return r ? Array.from(r.querySelectorAll(Me)).filter((a) => a.hasAttribute("disabled") ? !1 : a.offsetParent !== null || a === document.activeElement) : [];
|
|
506
|
+
}, d = (r) => {
|
|
507
|
+
if (r.key !== "Tab") return;
|
|
508
|
+
const a = e.value;
|
|
509
|
+
if (!a) return;
|
|
510
|
+
const l = n();
|
|
511
|
+
if (!l.length) {
|
|
512
|
+
r.preventDefault(), a.focus();
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
const i = l[0], u = l[l.length - 1];
|
|
516
|
+
if (r.shiftKey && (document.activeElement === i || document.activeElement === a)) {
|
|
517
|
+
r.preventDefault(), u.focus();
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
!r.shiftKey && document.activeElement === u && (r.preventDefault(), i.focus());
|
|
521
|
+
};
|
|
522
|
+
B(
|
|
523
|
+
() => S(o),
|
|
524
|
+
async (r) => {
|
|
525
|
+
var a;
|
|
526
|
+
r ? (t = document.activeElement, document.addEventListener("keydown", d), await G(), (a = e.value) == null || a.focus()) : (document.removeEventListener("keydown", d), t == null || t.focus(), t = null);
|
|
527
|
+
},
|
|
528
|
+
{ immediate: !0 }
|
|
529
|
+
), ie(() => document.removeEventListener("keydown", d));
|
|
530
|
+
}
|
|
531
|
+
const We = (e, o, t) => {
|
|
532
|
+
const n = T(() => {
|
|
533
|
+
var u;
|
|
534
|
+
return (u = o.value) == null ? void 0 : u.clientHeight;
|
|
535
|
+
}), d = x("translateY(0)"), r = x(1), a = x(!1);
|
|
536
|
+
if ((/* @__PURE__ */ Se(be)).greaterOrEqual("lg")) {
|
|
537
|
+
const { lengthY: u } = Te(e, {
|
|
538
|
+
passive: !1,
|
|
539
|
+
onSwipeStart() {
|
|
540
|
+
a.value = !0;
|
|
541
|
+
},
|
|
542
|
+
onSwipe() {
|
|
543
|
+
if (n.value)
|
|
544
|
+
if (u.value < 0) {
|
|
545
|
+
const v = Math.abs(u.value);
|
|
546
|
+
d.value = `translateY(${v}px)`, r.value = 1.1 - v / n.value, r.value < 0.3 && (r.value = 0);
|
|
547
|
+
} else
|
|
548
|
+
d.value = "translateY(0)", r.value = 1;
|
|
549
|
+
},
|
|
550
|
+
onSwipeEnd(v) {
|
|
551
|
+
a.value = !1, u.value < 0 && n.value && Math.abs(u.value) / n.value >= 0.5 ? (r.value = 0, setTimeout(() => {
|
|
552
|
+
t(v);
|
|
553
|
+
}, 100)) : (d.value = "translateY(0)", r.value = 1);
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
return {
|
|
558
|
+
isSwiping: a,
|
|
559
|
+
transform: d,
|
|
560
|
+
opacity: r
|
|
561
|
+
};
|
|
562
|
+
}, Re = (e, o) => {
|
|
563
|
+
const t = _(!1), n = _(!1), d = _(null), r = xe();
|
|
564
|
+
r != null && r.escape && B(r.escape, () => {
|
|
565
|
+
t.value && a(new Event("close"));
|
|
566
|
+
});
|
|
567
|
+
const a = (i) => {
|
|
568
|
+
n.value = !1, setTimeout(() => {
|
|
569
|
+
t.value = !1;
|
|
570
|
+
}, 50), setTimeout(() => {
|
|
571
|
+
e("close", i || new Event("close"));
|
|
572
|
+
}, 300), d.value && clearTimeout(d.value);
|
|
573
|
+
}, l = () => e("open", t.value);
|
|
574
|
+
return K(() => {
|
|
575
|
+
setTimeout(() => {
|
|
576
|
+
t.value = !0;
|
|
577
|
+
}, 300), setTimeout(() => {
|
|
578
|
+
n.value = !0;
|
|
579
|
+
}, 500), o && (d.value = setTimeout(() => {
|
|
580
|
+
a();
|
|
581
|
+
}, o * 1e3));
|
|
582
|
+
}), {
|
|
583
|
+
show: t,
|
|
584
|
+
overlay: n,
|
|
585
|
+
onClose: a,
|
|
586
|
+
onOpen: l
|
|
587
|
+
};
|
|
588
|
+
};
|
|
589
|
+
export {
|
|
590
|
+
We as a,
|
|
591
|
+
ke as b,
|
|
592
|
+
Se as c,
|
|
593
|
+
be as d,
|
|
594
|
+
Ce as e,
|
|
595
|
+
Ae as f,
|
|
596
|
+
Le as g,
|
|
597
|
+
Pe as o,
|
|
598
|
+
Re as u
|
|
599
|
+
};
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "3.0.0",
|
|
3
3
|
"name": "vuesp-components",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
@@ -62,7 +62,8 @@
|
|
|
62
62
|
"url": "https://github.com/bondrogeen/vuesp-components"
|
|
63
63
|
},
|
|
64
64
|
"files": [
|
|
65
|
-
"dist"
|
|
65
|
+
"dist",
|
|
66
|
+
"THIRD_PARTY_LICENSES.md"
|
|
66
67
|
],
|
|
67
68
|
"scripts": {
|
|
68
69
|
"dev": "vite",
|
|
@@ -85,7 +86,6 @@
|
|
|
85
86
|
},
|
|
86
87
|
"devDependencies": {
|
|
87
88
|
"@eslint/js": "^9.39.1",
|
|
88
|
-
"@iconify-json/ri": "^1.2.10",
|
|
89
89
|
"@tailwindcss/vite": "4.1.6",
|
|
90
90
|
"@types/node": "^18.11.18",
|
|
91
91
|
"@typescript-eslint/parser": "^8.46.3",
|
|
@@ -99,7 +99,6 @@
|
|
|
99
99
|
"tsconfig-paths": "^4.2.0",
|
|
100
100
|
"typescript": "~5.9.2",
|
|
101
101
|
"typescript-eslint": "^8.46.3",
|
|
102
|
-
"unplugin-icons": "^23.0.1",
|
|
103
102
|
"unplugin-vue-components": "^32.1.0",
|
|
104
103
|
"vite": "^5.0.0",
|
|
105
104
|
"vite-plugin-dts": "~4.5.0",
|