@schwarzdavid/ui-kit 0.0.1-alpha.2 → 0.0.1-alpha.21

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/ui-kit.js DELETED
@@ -1,691 +0,0 @@
1
- import { ref as b, readonly as J, markRaw as le, defineComponent as A, openBlock as m, createElementBlock as L, Fragment as R, renderList as Y, unref as u, createBlock as g, resolveDynamicComponent as B, mergeProps as G, onMounted as fe, withCtx as c, createTextVNode as H, toDisplayString as K, getCurrentInstance as ve, inject as ge, computed as f, TransitionGroup as _e, normalizeClass as re, isRef as ye, createVNode as s, createElementVNode as Q, createCommentVNode as k, normalizeProps as ue, toValue as X } from "vue";
2
- import { VAlert as Ce, VOverlay as Te, VProgressCircular as be, VDialog as Z, VCard as ee, VCardTitle as se, VBtn as x, VCardText as ie, VCardActions as te, VToolbar as he, VToolbarTitle as we, VSpacer as ae, VDivider as xe } from "vuetify/components";
3
- import { merge as $ } from "lodash";
4
- import { useI18n as Ae } from "vue-i18n";
5
- const v = [];
6
- for (let e = 0; e < 256; ++e)
7
- v.push((e + 256).toString(16).slice(1));
8
- function Ve(e, n = 0) {
9
- return (v[e[n + 0]] + v[e[n + 1]] + v[e[n + 2]] + v[e[n + 3]] + "-" + v[e[n + 4]] + v[e[n + 5]] + "-" + v[e[n + 6]] + v[e[n + 7]] + "-" + v[e[n + 8]] + v[e[n + 9]] + "-" + v[e[n + 10]] + v[e[n + 11]] + v[e[n + 12]] + v[e[n + 13]] + v[e[n + 14]] + v[e[n + 15]]).toLowerCase();
10
- }
11
- let q;
12
- const De = new Uint8Array(16);
13
- function ke() {
14
- if (!q) {
15
- if (typeof crypto > "u" || !crypto.getRandomValues)
16
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
17
- q = crypto.getRandomValues.bind(crypto);
18
- }
19
- return q(De);
20
- }
21
- const Ee = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), oe = { randomUUID: Ee };
22
- function ce(e, n, t) {
23
- if (oe.randomUUID && !n && !e)
24
- return oe.randomUUID();
25
- e = e || {};
26
- const a = e.random || (e.rng || ke)();
27
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ve(a);
28
- }
29
- const U = b([]);
30
- function de() {
31
- function e() {
32
- let a;
33
- for (; ; )
34
- if (a = ce(), !U.value.some((o) => o.id === a))
35
- return a;
36
- }
37
- function n(a) {
38
- const o = e(), i = le({ ...a, id: o, resolve: (d) => {
39
- t(o), a.resolve(d);
40
- }, reject: (d) => {
41
- t(o), a.reject(d);
42
- } });
43
- return U.value.push(i), i;
44
- }
45
- function t(a) {
46
- const o = typeof a == "string" ? a : a.id, l = U.value.findIndex((r) => r.id === o);
47
- l >= 0 && U.value.splice(l, 1);
48
- }
49
- return {
50
- queue: J(U),
51
- addToQueue: n,
52
- removeFromQueue: t
53
- };
54
- }
55
- const Ie = /* @__PURE__ */ A({
56
- __name: "DialogOutlet",
57
- setup(e) {
58
- const { queue: n } = de();
59
- return (t, a) => (m(!0), L(R, null, Y(u(n), (o) => (m(), g(B(o.component), G({
60
- key: o.id,
61
- ref_for: !0
62
- }, o.props, {
63
- onResolve: o.resolve,
64
- onReject: o.reject
65
- }), null, 16, ["onResolve", "onReject"]))), 128));
66
- }
67
- }), P = b([]);
68
- function ne() {
69
- function e() {
70
- let a;
71
- for (; ; )
72
- if (a = ce(), !P.value.some((o) => o.id === a))
73
- return a;
74
- }
75
- function n(a) {
76
- const o = e(), r = le({ ...a, id: o, resolve: () => {
77
- t(o), a.resolve();
78
- } });
79
- return P.value.unshift(r), r;
80
- }
81
- function t(a) {
82
- const o = typeof a == "string" ? a : a.id, l = P.value.findIndex((r) => r.id === o);
83
- l >= 0 && P.value.splice(l, 1);
84
- }
85
- return {
86
- queue: J(P),
87
- addToQueue: n,
88
- removeFromQueue: t
89
- };
90
- }
91
- const Le = /* @__PURE__ */ A({
92
- __name: "ToastEntry",
93
- props: {
94
- entry: {}
95
- },
96
- setup(e) {
97
- const n = e, t = ne(), a = b(-1);
98
- function o() {
99
- window.clearTimeout(a.value), t.removeFromQueue(n.entry.id);
100
- }
101
- return fe(() => {
102
- a.value = window.setTimeout(() => {
103
- o();
104
- }, n.entry.timeout);
105
- }), (l, r) => (m(), g(u(Ce), {
106
- theme: "dark",
107
- class: "toast-entry",
108
- closable: "",
109
- "onClick:close": o
110
- }, {
111
- default: c(() => [
112
- H(K(l.entry.message), 1)
113
- ]),
114
- _: 1
115
- }));
116
- }
117
- }), N = (e, n) => {
118
- const t = e.__vccOpts || e;
119
- for (const [a, o] of n)
120
- t[a] = o;
121
- return t;
122
- }, Re = /* @__PURE__ */ N(Le, [["__scopeId", "data-v-419b7d95"]]);
123
- function S() {
124
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
125
- if (S.cache.has(e)) return S.cache.get(e);
126
- const n = e.replace(/[^a-z]/gi, "-").replace(/\B([A-Z])/g, "-$1").toLowerCase();
127
- return S.cache.set(e, n), n;
128
- }
129
- S.cache = /* @__PURE__ */ new Map();
130
- function je(e, n) {
131
- const t = ve();
132
- if (!t)
133
- throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);
134
- return t;
135
- }
136
- function Ue() {
137
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "composables";
138
- const n = je(e).type;
139
- return S((n == null ? void 0 : n.aliasName) || (n == null ? void 0 : n.name));
140
- }
141
- const Pe = Symbol.for("vuetify:display");
142
- function me() {
143
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ue();
144
- const t = ge(Pe);
145
- if (!t) throw new Error("Could not find Vuetify display injection");
146
- const a = f(() => {
147
- if (e.mobile != null) return e.mobile;
148
- if (!e.mobileBreakpoint) return t.mobile.value;
149
- const l = typeof e.mobileBreakpoint == "number" ? e.mobileBreakpoint : t.thresholds.value[e.mobileBreakpoint];
150
- return t.width.value < l;
151
- }), o = f(() => n ? {
152
- [`${n}--mobile`]: a.value
153
- } : {});
154
- return {
155
- ...t,
156
- displayClasses: o,
157
- mobile: a
158
- };
159
- }
160
- const Oe = /* @__PURE__ */ A({
161
- __name: "ToastOutlet",
162
- setup(e) {
163
- const { queue: n } = ne(), { mobile: t } = me(), a = f(() => t.value ? "" : "toast-outlet--desktop");
164
- function o(l) {
165
- const { width: r } = l.getBoundingClientRect();
166
- l instanceof HTMLElement && (l.style.width = `${r.toFixed()}px`);
167
- }
168
- return (l, r) => (m(), g(_e, {
169
- name: "fade",
170
- tag: "div",
171
- class: re(["toast-outlet", a.value]),
172
- onBeforeLeave: o
173
- }, {
174
- default: c(() => [
175
- (m(!0), L(R, null, Y(u(n), (i) => (m(), g(Re, {
176
- key: i.id,
177
- entry: i
178
- }, null, 8, ["entry"]))), 128))
179
- ]),
180
- _: 1
181
- }, 8, ["class"]));
182
- }
183
- }), Se = /* @__PURE__ */ N(Oe, [["__scopeId", "data-v-93b5ec8a"]]), Qe = b(!1);
184
- function pe() {
185
- return Qe;
186
- }
187
- const $e = /* @__PURE__ */ A({
188
- __name: "LoadingOverlay",
189
- setup(e) {
190
- const n = pe();
191
- return (t, a) => (m(), g(u(Te), {
192
- modelValue: u(n),
193
- "onUpdate:modelValue": a[0] || (a[0] = (o) => ye(n) ? n.value = o : null),
194
- persistent: "",
195
- class: "d-flex align-center justify-center"
196
- }, {
197
- default: c(() => [
198
- s(u(be), {
199
- indeterminate: "",
200
- color: "primary",
201
- size: "100"
202
- })
203
- ]),
204
- _: 1
205
- }, 8, ["modelValue"]));
206
- }
207
- }), tt = /* @__PURE__ */ A({
208
- __name: "UiKitOutlet",
209
- setup(e) {
210
- return (n, t) => (m(), L(R, null, [
211
- s(Ie),
212
- s(Se),
213
- s($e)
214
- ], 64));
215
- }
216
- }), C = /* @__PURE__ */ A({
217
- __name: "MaybeTranslation",
218
- props: {
219
- content: {},
220
- translate: { type: Boolean, default: !0 }
221
- },
222
- setup(e) {
223
- const { t: n } = Ae({ useScope: "global" });
224
- return (t, a) => t.translate ? (m(), L(R, { key: 0 }, [
225
- H(K(u(n)(t.content)), 1)
226
- ], 64)) : (m(), L(R, { key: 1 }, [
227
- H(K(t.content), 1)
228
- ], 64));
229
- }
230
- }), Ne = { class: "d-flex justify-space-between pr-2 py-2" }, Fe = 650, Me = /* @__PURE__ */ A({
231
- __name: "InfoDialog",
232
- props: {
233
- data: {}
234
- },
235
- emits: ["resolve", "reject"],
236
- setup(e, { emit: n }) {
237
- const t = e, a = n, o = {
238
- text: "APP.CLOSE",
239
- translateText: !0,
240
- value: null
241
- };
242
- let l = null;
243
- const r = b(!0), i = f(() => Object.hasOwn(t.data, "content") ? {
244
- content: t.data.content,
245
- translateContent: t.data.translateContent
246
- } : null), d = f(() => Object.hasOwn(t.data, "component") ? {
247
- component: t.data.component,
248
- props: t.data.props
249
- } : null), _ = f(() => t.data.defaultCta === !1 ? null : $({}, o, t.data.defaultCta));
250
- function V(p) {
251
- E(p) ? p.action() : h(p.value);
252
- }
253
- function E(p) {
254
- return Object.hasOwn(p, "action");
255
- }
256
- function h(p = null) {
257
- l = p, r.value = !1;
258
- }
259
- function I() {
260
- a("resolve", l);
261
- }
262
- return (p, w) => (m(), g(u(Z), {
263
- modelValue: r.value,
264
- "onUpdate:modelValue": w[1] || (w[1] = (y) => r.value = y),
265
- "max-width": p.data.width ?? Fe,
266
- onAfterLeave: I
267
- }, {
268
- default: c(() => [
269
- s(u(ee), { class: "info-dialog-card" }, {
270
- default: c(() => [
271
- Q("div", Ne, [
272
- s(u(se), null, {
273
- default: c(() => [
274
- s(C, {
275
- translate: p.data.translateTitle,
276
- content: p.data.title
277
- }, null, 8, ["translate", "content"])
278
- ]),
279
- _: 1
280
- }),
281
- s(u(x), {
282
- icon: "$close",
283
- variant: "text",
284
- onClick: w[0] || (w[0] = (y) => h(null))
285
- })
286
- ]),
287
- i.value ? (m(), g(u(ie), { key: 0 }, {
288
- default: c(() => [
289
- Q("p", null, [
290
- s(C, {
291
- translate: i.value.translateContent,
292
- content: i.value.content
293
- }, null, 8, ["translate", "content"])
294
- ])
295
- ]),
296
- _: 1
297
- })) : k("", !0),
298
- d.value ? (m(), g(B(d.value.component), ue(G({ key: 1 }, d.value.props)), null, 16)) : k("", !0),
299
- s(u(te), { class: "justify-end" }, {
300
- default: c(() => [
301
- (m(!0), L(R, null, Y(p.data.additionalCta ?? [], (y, T) => (m(), g(u(x), {
302
- key: T,
303
- color: "primary",
304
- variant: "text",
305
- onClick: () => V(y)
306
- }, {
307
- default: c(() => [
308
- s(C, {
309
- translate: y.translateText,
310
- content: y.text
311
- }, null, 8, ["translate", "content"])
312
- ]),
313
- _: 2
314
- }, 1032, ["onClick"]))), 128)),
315
- _.value ? (m(), g(u(x), {
316
- key: 0,
317
- color: "primary",
318
- variant: "elevated",
319
- onClick: h
320
- }, {
321
- default: c(() => [
322
- s(C, {
323
- translate: _.value.translateText,
324
- content: _.value.text
325
- }, null, 8, ["translate", "content"])
326
- ]),
327
- _: 1
328
- })) : k("", !0)
329
- ]),
330
- _: 1
331
- })
332
- ]),
333
- _: 1
334
- })
335
- ]),
336
- _: 1
337
- }, 8, ["modelValue", "max-width"]));
338
- }
339
- }), Be = /* @__PURE__ */ N(Me, [["__scopeId", "data-v-ab153f63"]]);
340
- var D = /* @__PURE__ */ ((e) => (e.SMALL = "sm", e.LARGE = "lg", e))(D || {});
341
- const Ge = /* @__PURE__ */ A({
342
- __name: "PromptDialog",
343
- props: {
344
- data: {}
345
- },
346
- emits: ["resolve", "reject"],
347
- setup(e, { emit: n }) {
348
- const t = e, a = n, o = {
349
- [D.SMALL]: 650,
350
- [D.LARGE]: 1200
351
- }, l = {
352
- text: "APP.CANCEL",
353
- translateText: !0
354
- }, r = {
355
- text: "APP.SAVE",
356
- translateText: !0
357
- }, i = b(!0), d = b(X(t.data.initialValue) ?? null), _ = b(null), { mobile: V } = me(), E = f(() => t.data.required && !d.value), h = f(() => o[t.data.size ?? D.SMALL]), I = f(() => t.data.size === D.LARGE ? V.value : !1), p = f(() => $({}, l, t.data.abortCta)), w = f(() => $({}, r, t.data.saveCta)), y = f(() => t.data.size === D.LARGE ? "secondary" : "primary");
358
- function T() {
359
- d.value = X(t.data.initialValue) ?? null, i.value = !1;
360
- }
361
- function F() {
362
- i.value = !1;
363
- }
364
- function W() {
365
- if (t.data.required && !d.value) {
366
- a("reject");
367
- return;
368
- }
369
- a("resolve", d.value);
370
- }
371
- return (j, M) => (m(), g(u(Z), {
372
- modelValue: i.value,
373
- "onUpdate:modelValue": M[1] || (M[1] = (z) => i.value = z),
374
- "max-width": h.value,
375
- fullscreen: I.value,
376
- scrollable: j.data.size === u(D).LARGE,
377
- onAfterLeave: W
378
- }, {
379
- default: c(() => [
380
- s(u(ee), { class: "prompt-dialog-card" }, {
381
- default: c(() => [
382
- s(u(he), { color: "primary" }, {
383
- default: c(() => [
384
- s(u(we), null, {
385
- default: c(() => [
386
- s(C, {
387
- translate: j.data.translateTitle,
388
- content: j.data.title
389
- }, null, 8, ["translate", "content"])
390
- ]),
391
- _: 1
392
- }),
393
- s(u(ae)),
394
- Q("div", {
395
- ref_key: "toolbar",
396
- ref: _,
397
- class: "prompt-dialog-toolbar-slot"
398
- }, null, 512),
399
- s(u(x), {
400
- icon: "mdi-close",
401
- onClick: T
402
- })
403
- ]),
404
- _: 1
405
- }),
406
- _.value ? (m(), g(B(j.data.component), G({ key: 0 }, j.data.props, {
407
- modelValue: d.value,
408
- "onUpdate:modelValue": M[0] || (M[0] = (z) => d.value = z),
409
- toolbar: _.value
410
- }), null, 16, ["modelValue", "toolbar"])) : k("", !0),
411
- s(u(xe)),
412
- s(u(te), null, {
413
- default: c(() => [
414
- s(u(ae)),
415
- s(u(x), {
416
- color: y.value,
417
- onClick: T
418
- }, {
419
- default: c(() => [
420
- s(C, {
421
- translate: p.value.translateText,
422
- content: p.value.text
423
- }, null, 8, ["translate", "content"])
424
- ]),
425
- _: 1
426
- }, 8, ["color"]),
427
- s(u(x), {
428
- variant: "elevated",
429
- color: y.value,
430
- disabled: E.value,
431
- onClick: F
432
- }, {
433
- default: c(() => [
434
- s(C, {
435
- translate: w.value.translateText,
436
- content: w.value.text
437
- }, null, 8, ["translate", "content"])
438
- ]),
439
- _: 1
440
- }, 8, ["color", "disabled"])
441
- ]),
442
- _: 1
443
- })
444
- ]),
445
- _: 1
446
- })
447
- ]),
448
- _: 1
449
- }, 8, ["modelValue", "max-width", "fullscreen", "scrollable"]));
450
- }
451
- }), We = /* @__PURE__ */ N(Ge, [["__scopeId", "data-v-1f5a0caf"]]), ze = { class: "d-flex justify-space-between pr-2 py-2" }, qe = 550, He = /* @__PURE__ */ A({
452
- __name: "ConfirmDialog",
453
- props: {
454
- data: {}
455
- },
456
- emits: ["resolve", "reject"],
457
- setup(e, { emit: n }) {
458
- const t = e, a = n, o = {
459
- text: "APP.YES",
460
- translateText: !0
461
- }, l = {
462
- text: "APP.NO",
463
- translateText: !0
464
- };
465
- let r = !1;
466
- const i = b(!0), d = f(() => Object.hasOwn(t.data, "content") ? {
467
- content: t.data.content,
468
- translateContent: t.data.translateContent
469
- } : null), _ = f(() => Object.hasOwn(t.data, "component") ? {
470
- component: t.data.component,
471
- props: t.data.props
472
- } : null), V = f(() => $({}, o, t.data.confirmCta)), E = f(() => $({}, l, t.data.rejectCta)), h = f(() => t.data.highlightCta ?? "confirm"), I = f(() => t.data.level ?? "primary");
473
- function p() {
474
- i.value = !1;
475
- }
476
- function w() {
477
- r = !0, i.value = !1;
478
- }
479
- function y() {
480
- if (t.data.throwOnReject && !r) {
481
- a("reject");
482
- return;
483
- }
484
- a("resolve", r);
485
- }
486
- return (T, F) => (m(), g(u(Z), {
487
- modelValue: i.value,
488
- "onUpdate:modelValue": F[0] || (F[0] = (W) => i.value = W),
489
- persistent: !!T.data.permanent,
490
- "max-width": T.data.maxWidth ?? qe,
491
- onAfterLeave: y
492
- }, {
493
- default: c(() => [
494
- s(u(ee), { class: "confirm-dialog-card" }, {
495
- default: c(() => [
496
- Q("div", ze, [
497
- s(u(se), null, {
498
- default: c(() => [
499
- s(C, {
500
- translate: T.data.translateTitle,
501
- content: T.data.title
502
- }, null, 8, ["translate", "content"])
503
- ]),
504
- _: 1
505
- }),
506
- T.data.permanent ? k("", !0) : (m(), g(u(x), {
507
- key: 0,
508
- icon: "$close",
509
- variant: "text",
510
- onClick: p
511
- }))
512
- ]),
513
- d.value ? (m(), g(u(ie), { key: 0 }, {
514
- default: c(() => [
515
- s(C, {
516
- translate: d.value.translateContent,
517
- content: d.value.content
518
- }, null, 8, ["translate", "content"])
519
- ]),
520
- _: 1
521
- })) : k("", !0),
522
- _.value ? (m(), g(B(_.value.component), ue(G({ key: 1 }, _.value.props)), null, 16)) : k("", !0),
523
- s(u(te), { class: "justify-end" }, {
524
- default: c(() => [
525
- Q("div", {
526
- class: re(["d-flex align-center", h.value === "confirm" ? "" : "flex-row-reverse"])
527
- }, [
528
- s(u(x), {
529
- variant: h.value === "reject" ? "elevated" : "text",
530
- color: I.value,
531
- onClick: p
532
- }, {
533
- default: c(() => [
534
- s(C, {
535
- translate: E.value.translateText,
536
- content: E.value.text
537
- }, null, 8, ["translate", "content"])
538
- ]),
539
- _: 1
540
- }, 8, ["variant", "color"]),
541
- s(u(x), {
542
- variant: h.value === "confirm" ? "elevated" : "text",
543
- color: I.value,
544
- onClick: w
545
- }, {
546
- default: c(() => [
547
- s(C, {
548
- translate: V.value.translateText,
549
- content: V.value.text
550
- }, null, 8, ["translate", "content"])
551
- ]),
552
- _: 1
553
- }, 8, ["variant", "color"])
554
- ], 2)
555
- ]),
556
- _: 1
557
- })
558
- ]),
559
- _: 1
560
- })
561
- ]),
562
- _: 1
563
- }, 8, ["modelValue", "persistent", "max-width"]));
564
- }
565
- }), Ke = /* @__PURE__ */ N(He, [["__scopeId", "data-v-634f1f39"]]);
566
- function nt() {
567
- const e = de();
568
- function n(o, l) {
569
- let r;
570
- return typeof o == "string" ? r = {
571
- title: o,
572
- content: l ?? ""
573
- } : r = o, new Promise((i) => {
574
- const d = {
575
- component: Be,
576
- props: { data: r },
577
- resolve: i,
578
- reject: () => {
579
- i(null);
580
- }
581
- };
582
- e.addToQueue(d);
583
- });
584
- }
585
- function t(o) {
586
- return new Promise((l, r) => {
587
- const i = {
588
- component: We,
589
- props: { data: o },
590
- resolve: l,
591
- reject: r
592
- };
593
- e.addToQueue(i);
594
- });
595
- }
596
- function a(o, l, r) {
597
- let i = o;
598
- return typeof o == "string" && typeof l == "string" && (i = {
599
- title: o,
600
- content: l,
601
- level: r
602
- }), new Promise((d, _) => {
603
- const V = {
604
- component: Ke,
605
- props: { data: i },
606
- resolve: d,
607
- reject: _
608
- };
609
- e.addToQueue(V);
610
- });
611
- }
612
- return {
613
- info: n,
614
- prompt: t,
615
- confirm: a
616
- };
617
- }
618
- var Xe = /* @__PURE__ */ ((e) => (e.DEFAULT = "primary", e.WARNING = "warning", e.DANGER = "error", e))(Xe || {}), O = /* @__PURE__ */ ((e) => (e.SUCCESS = "success", e.INFO = "info", e.WARNING = "warning", e.ERROR = "error", e))(O || {});
619
- function at() {
620
- const e = ne();
621
- function n(l) {
622
- return new Promise((r) => {
623
- e.addToQueue({
624
- message: l,
625
- resolve: r,
626
- timeout: 4e3,
627
- type: O.INFO
628
- });
629
- });
630
- }
631
- function t(l) {
632
- return new Promise((r) => {
633
- e.addToQueue({
634
- message: l,
635
- resolve: r,
636
- timeout: 4e3,
637
- type: O.WARNING
638
- });
639
- });
640
- }
641
- function a(l) {
642
- return new Promise((r) => {
643
- e.addToQueue({
644
- message: l,
645
- resolve: r,
646
- timeout: 4e3,
647
- type: O.ERROR
648
- });
649
- });
650
- }
651
- function o(l) {
652
- return new Promise((r) => {
653
- e.addToQueue({
654
- message: l,
655
- resolve: r,
656
- timeout: 4e3,
657
- type: O.SUCCESS
658
- });
659
- });
660
- }
661
- return {
662
- info: n,
663
- warn: t,
664
- error: a,
665
- success: o
666
- };
667
- }
668
- function ot(e, { overlay: n } = {}) {
669
- const t = b(!1), a = pe();
670
- async function o(...l) {
671
- const r = X(n);
672
- t.value = !0, r && (a.value = !0);
673
- try {
674
- return await e(...l);
675
- } catch (i) {
676
- throw i;
677
- } finally {
678
- t.value = !1, r && (a.value = !1);
679
- }
680
- }
681
- return { loading: J(t), action: o };
682
- }
683
- export {
684
- Xe as ConfirmDialogLevel,
685
- D as PromptDialogSize,
686
- tt as UiKitOutlet,
687
- nt as useDialog,
688
- ot as useLoading,
689
- pe as useLoadingOverlay,
690
- at as useToast
691
- };