veload 0.0.0-stage → 0.1.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.
Files changed (31) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +699 -3
  3. package/dist/components/VLoader/index.vue.d.ts +12 -0
  4. package/dist/components/VLoader/loaders.d.ts +38 -0
  5. package/dist/components/VLoader/types.d.ts +28 -0
  6. package/dist/components/VLoading/index.vue.d.ts +21 -0
  7. package/dist/components/VLoading/types.d.ts +27 -0
  8. package/dist/components/VLoadingButton/index.vue.d.ts +21 -0
  9. package/dist/components/VLoadingButton/types.d.ts +29 -0
  10. package/dist/components/VPatternSkeleton/index.vue.d.ts +18 -0
  11. package/dist/components/VPatternSkeleton/presets.d.ts +26 -0
  12. package/dist/components/VPatternSkeleton/types.d.ts +48 -0
  13. package/dist/components/VProgress/index.vue.d.ts +10 -0
  14. package/dist/components/VProgress/types.d.ts +45 -0
  15. package/dist/components/VSkeleton/index.vue.d.ts +7 -0
  16. package/dist/components/VSkeleton/types.d.ts +37 -0
  17. package/dist/components/VSkeletonGroup/index.vue.d.ts +17 -0
  18. package/dist/components/VSkeletonGroup/types.d.ts +8 -0
  19. package/dist/components/VSkeletonSwitch/index.vue.d.ts +31 -0
  20. package/dist/components/VSkeletonSwitch/types.d.ts +5 -0
  21. package/dist/components/VSpinner/index.vue.d.ts +9 -0
  22. package/dist/components/VSpinner/types.d.ts +29 -0
  23. package/dist/composables/useDelayedLoading.d.ts +32 -0
  24. package/dist/composables/useLoading.d.ts +28 -0
  25. package/dist/composables/useLoadingGroup.d.ts +25 -0
  26. package/dist/index.cjs +1 -0
  27. package/dist/index.d.ts +24 -0
  28. package/dist/index.js +851 -0
  29. package/dist/style.css +2 -0
  30. package/dist/utils/css.d.ts +7 -0
  31. package/package.json +56 -6
package/dist/index.js ADDED
@@ -0,0 +1,851 @@
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, getCurrentScope as c, guardReactiveProps as l, h as u, mergeProps as d, normalizeClass as f, normalizeProps as p, normalizeStyle as m, onScopeDispose as h, openBlock as g, readonly as _, ref as v, renderList as y, renderSlot as b, toDisplayString as x } from "vue";
2
+ //#region src/components/VSpinner/index.vue?vue&type=script&setup=true&lang.ts
3
+ var S = /*@__PURE__*/ s({
4
+ __name: "index",
5
+ props: {
6
+ size: { default: 24 },
7
+ color: { default: "currentColor" },
8
+ label: { default: "Loading" },
9
+ decorative: {
10
+ type: Boolean,
11
+ default: !1
12
+ }
13
+ },
14
+ setup(e) {
15
+ let n = e, r = t(() => Number.isFinite(n.size) ? Math.max(0, n.size) : 24), o = t(() => {
16
+ let e = typeof n.color == "string" ? n.color.trim() : "";
17
+ return e.length > 0 ? e : "currentColor";
18
+ }), s = t(() => typeof n.label == "string" ? n.label.trim() : ""), c = t(() => n.decorative || s.value.length === 0), l = t(() => c.value ? { "aria-hidden": "true" } : {
19
+ role: "status",
20
+ "aria-label": s.value
21
+ });
22
+ return (e, t) => (g(), i("span", d({ class: "v-spinner" }, l.value), [a("span", {
23
+ class: "v-spinner__indicator",
24
+ "aria-hidden": "true",
25
+ style: m({
26
+ width: `${r.value}px`,
27
+ height: `${r.value}px`,
28
+ borderTopColor: o.value
29
+ })
30
+ }, null, 4)], 16));
31
+ }
32
+ }), C = (e, t) => {
33
+ let n = e.__vccOpts || e;
34
+ for (let [e, r] of t) n[e] = r;
35
+ return n;
36
+ }, w = /*#__PURE__*/ C(S, [["__scopeId", "data-v-fc2fa43e"]]);
37
+ //#endregion
38
+ //#region src/utils/css.ts
39
+ function T(e, t) {
40
+ if (typeof e == "number") return Number.isFinite(e) ? `${Math.max(0, e)}px` : t;
41
+ if (typeof e == "string") {
42
+ let n = e.trim();
43
+ return n.length > 0 ? n : t;
44
+ }
45
+ return t;
46
+ }
47
+ //#endregion
48
+ //#region src/components/VSkeleton/index.vue
49
+ var E = /*#__PURE__*/ C(/* @__PURE__ */ s({
50
+ __name: "index",
51
+ props: {
52
+ variant: { default: "text" },
53
+ width: {},
54
+ height: {},
55
+ borderRadius: {},
56
+ animated: {
57
+ type: Boolean,
58
+ default: !0
59
+ },
60
+ label: {}
61
+ },
62
+ setup(e) {
63
+ let n = e, r = t(() => {
64
+ let e = n.variant;
65
+ return e === "rect" || e === "circle" ? e : "text";
66
+ }), a = t(() => T(n.width, r.value === "circle" ? "40px" : "100%")), o = t(() => {
67
+ if (n.height !== void 0) return T(n.height, r.value === "text" ? "1em" : "6rem");
68
+ if (r.value !== "circle") return r.value === "text" ? "1em" : "6rem";
69
+ }), s = t(() => {
70
+ if (n.borderRadius === void 0) return;
71
+ if (typeof n.borderRadius == "number") return Number.isFinite(n.borderRadius) ? `${Math.max(0, n.borderRadius)}px` : void 0;
72
+ let e = n.borderRadius.trim();
73
+ return e.length > 0 ? e : void 0;
74
+ }), c = t(() => ({
75
+ width: a.value,
76
+ height: o.value,
77
+ borderRadius: s.value,
78
+ aspectRatio: r.value === "circle" && n.height === void 0 ? "1 / 1" : void 0
79
+ })), l = t(() => typeof n.label == "string" ? n.label.trim() : ""), u = t(() => l.value.length > 0 ? {
80
+ role: "status",
81
+ "aria-label": l.value,
82
+ "aria-busy": "true"
83
+ } : { "aria-hidden": "true" });
84
+ return (t, n) => (g(), i("span", d({
85
+ class: ["v-skeleton", [`v-skeleton--${r.value}`, { "v-skeleton--animated": e.animated }]],
86
+ style: c.value
87
+ }, u.value), null, 16));
88
+ }
89
+ }), [["__scopeId", "data-v-0ae45ca2"]]), D = [
90
+ "aria-label",
91
+ "aria-valuemin",
92
+ "aria-valuemax",
93
+ "aria-valuenow",
94
+ "aria-valuetext"
95
+ ], O = /*#__PURE__*/ C(/* @__PURE__ */ s({
96
+ __name: "index",
97
+ props: {
98
+ value: { default: null },
99
+ min: { default: 0 },
100
+ max: { default: 100 },
101
+ label: { default: "Progress" },
102
+ valueText: {},
103
+ height: { default: 8 },
104
+ color: {},
105
+ trackColor: {}
106
+ },
107
+ setup(e) {
108
+ let n = e;
109
+ function r(e) {
110
+ if (typeof e != "string") return;
111
+ let t = e.trim();
112
+ return t.length > 0 ? t : void 0;
113
+ }
114
+ let o = t(() => Number.isFinite(n.min) && Number.isFinite(n.max) && n.max > n.min), s = t(() => o.value ? n.min : 0), c = t(() => o.value ? n.max : 100), l = t(() => typeof n.value == "number" && Number.isFinite(n.value) && o.value), u = t(() => !l.value || typeof n.value != "number" ? s.value : Math.min(c.value, Math.max(s.value, n.value))), d = t(() => {
115
+ if (!l.value) return 0;
116
+ let e = c.value - s.value;
117
+ return (u.value - s.value) / e * 100;
118
+ }), p = t(() => typeof n.label == "string" ? n.label.trim() : ""), h = t(() => {
119
+ if (!l.value) return;
120
+ let e = typeof n.valueText == "string" ? n.valueText.trim() : "";
121
+ return e.length > 0 ? e : void 0;
122
+ }), _ = t(() => ({
123
+ height: T(n.height, "8px"),
124
+ backgroundColor: r(n.trackColor)
125
+ })), v = t(() => ({
126
+ width: l.value ? `${d.value}%` : void 0,
127
+ backgroundColor: r(n.color)
128
+ }));
129
+ return (e, t) => (g(), i("div", {
130
+ class: f(["v-progress", {
131
+ "v-progress--indeterminate": !l.value,
132
+ "v-progress--determinate": l.value
133
+ }]),
134
+ role: "progressbar",
135
+ "aria-label": p.value.length > 0 ? p.value : void 0,
136
+ "aria-valuemin": l.value ? s.value : void 0,
137
+ "aria-valuemax": l.value ? c.value : void 0,
138
+ "aria-valuenow": l.value ? u.value : void 0,
139
+ "aria-valuetext": h.value,
140
+ style: m(_.value)
141
+ }, [a("div", {
142
+ class: "v-progress__bar",
143
+ "aria-hidden": "true",
144
+ style: m(v.value)
145
+ }, null, 4)], 14, D));
146
+ }
147
+ }), [["__scopeId", "data-v-86aeb0f3"]]), ee = ["aria-busy"], te = ["inert"], ne = {
148
+ key: 0,
149
+ class: "v-loading__label"
150
+ }, re = /*#__PURE__*/ C(/* @__PURE__ */ s({
151
+ __name: "index",
152
+ props: {
153
+ loading: {
154
+ type: Boolean,
155
+ default: !1
156
+ },
157
+ label: { default: "Loading" },
158
+ inertContent: {
159
+ type: Boolean,
160
+ default: !0
161
+ },
162
+ indicatorSize: { default: 28 }
163
+ },
164
+ setup(e) {
165
+ let n = e, s = t(() => typeof n.label == "string" ? n.label.trim() : ""), c = t(() => Number.isFinite(n.indicatorSize) ? Math.max(0, n.indicatorSize) : 28), l = t(() => n.loading && n.inertContent), u = t(() => s.value.length > 0 ? { role: "status" } : { "aria-hidden": "true" });
166
+ return (t, n) => (g(), i("div", {
167
+ class: f(["v-loading", {
168
+ "v-loading--active": e.loading,
169
+ "v-loading--blocking": l.value
170
+ }]),
171
+ "aria-busy": e.loading ? "true" : void 0
172
+ }, [a("div", {
173
+ class: "v-loading__content",
174
+ inert: l.value || void 0
175
+ }, [b(t.$slots, "default", {}, void 0, !0)], 8, te), e.loading ? (g(), i("div", d({
176
+ key: 0,
177
+ class: "v-loading__overlay"
178
+ }, u.value), [b(t.$slots, "indicator", {}, () => [o(w, {
179
+ size: c.value,
180
+ decorative: ""
181
+ }, null, 8, ["size"])], !0), s.value.length > 0 ? (g(), i("span", ne, x(s.value), 1)) : r("", !0)], 16)) : r("", !0)], 10, ee));
182
+ }
183
+ }), [["__scopeId", "data-v-ac332306"]]), ie = [
184
+ "type",
185
+ "disabled",
186
+ "aria-busy"
187
+ ], ae = {
188
+ key: 0,
189
+ class: "v-loading-button__indicator",
190
+ "aria-hidden": "true"
191
+ }, k = /*#__PURE__*/ C(/* @__PURE__ */ s({
192
+ __name: "index",
193
+ props: {
194
+ loading: {
195
+ type: Boolean,
196
+ default: !1
197
+ },
198
+ disabled: {
199
+ type: Boolean,
200
+ default: !1
201
+ },
202
+ type: { default: "button" },
203
+ indicatorSize: { default: 16 }
204
+ },
205
+ setup(e) {
206
+ let n = e, s = t(() => n.disabled || n.loading), c = t(() => {
207
+ let e = n.type;
208
+ return e === "submit" || e === "reset" ? e : "button";
209
+ }), l = t(() => Number.isFinite(n.indicatorSize) ? Math.max(0, n.indicatorSize) : 16);
210
+ return (t, n) => (g(), i("button", {
211
+ class: f(["v-loading-button", { "v-loading-button--loading": e.loading }]),
212
+ type: c.value,
213
+ disabled: s.value,
214
+ "aria-busy": e.loading ? "true" : void 0
215
+ }, [a("span", { class: f(["v-loading-button__content", { "v-loading-button__content--hidden": e.loading }]) }, [b(t.$slots, "default", {}, void 0, !0)], 2), e.loading ? (g(), i("span", ae, [b(t.$slots, "indicator", {}, () => [o(w, {
216
+ size: l.value,
217
+ decorative: ""
218
+ }, null, 8, ["size"])], !0)])) : r("", !0)], 10, ie));
219
+ }
220
+ }), [["__scopeId", "data-v-323480f1"]]), A = /* @__PURE__ */ "bars.blob.bounce.breathing.card-flip.dot-sweep.dots.dual-arc.element.equalizer.fallback.flow.gradient-ring.grid.hashtag.heatmap.liquid.logo-spin.morph.orbit-dots.orbit.plane.progress-ring.pulse.ring.ripple.rotate.signal.sliding-bars.snake.spin-dots.spin.squares.stair.typing.wave".split("."), j = {
221
+ class: "v-loader__visual",
222
+ "aria-hidden": "true"
223
+ }, M = {
224
+ key: 0,
225
+ class: "v-loader__value"
226
+ }, N = /*#__PURE__*/ C(/* @__PURE__ */ s({
227
+ __name: "index",
228
+ props: {
229
+ variant: { default: "spin" },
230
+ color: { default: "currentColor" },
231
+ size: { default: 40 },
232
+ duration: { default: 1e3 },
233
+ label: { default: "Loading" },
234
+ decorative: {
235
+ type: Boolean,
236
+ default: !1
237
+ },
238
+ count: {},
239
+ value: { default: null }
240
+ },
241
+ setup(n) {
242
+ let o = n, s = {
243
+ breathing: 2,
244
+ "dual-arc": 2
245
+ }, c = {
246
+ grid: 4,
247
+ heatmap: 9,
248
+ squares: 9
249
+ };
250
+ function l(e, t = "") {
251
+ return typeof e == "string" && e.trim().length > 0 ? e.trim() : t;
252
+ }
253
+ function u(e, t, n, r) {
254
+ if (typeof e != "number" || !Number.isFinite(e)) return t;
255
+ let i = Math.max(n, e);
256
+ return r === void 0 ? i : Math.min(r, i);
257
+ }
258
+ let f = t(() => {
259
+ let e = typeof o.variant == "string" ? o.variant : "";
260
+ return A.find((t) => t === e) ?? "spin";
261
+ }), p = t(() => u(o.size, 40, 12)), h = t(() => u(o.duration, 1e3, 100)), _ = t(() => s[f.value] ?? Math.round(u(o.count, c[f.value] ?? 4, 1, 12))), v = t(() => l(o.color, "currentColor")), b = t(() => l(o.label)), S = t(() => !!o.decorative || b.value.length === 0), C = t(() => typeof o.value == "number" && Number.isFinite(o.value) ? Math.min(100, Math.max(0, o.value)) : null), w = t(() => S.value ? { "aria-hidden": "true" } : {
262
+ role: "status",
263
+ "aria-label": b.value
264
+ }), T = t(() => ({
265
+ "--vl-size": `${p.value}px`,
266
+ "--vl-color": v.value,
267
+ "--vl-duration": `${h.value}ms`,
268
+ "--vl-value": `${C.value ?? 72}%`,
269
+ "--vl-total": String(_.value)
270
+ })), E = t(() => Array.from({ length: _.value }));
271
+ return (t, n) => (g(), i("span", d({
272
+ class: ["v-loader", `v-loader--${f.value}`],
273
+ style: T.value
274
+ }, w.value), [a("span", j, [(g(!0), i(e, null, y(E.value, (e, t) => (g(), i("span", {
275
+ key: t,
276
+ class: "v-loader__mark",
277
+ style: m({ "--vl-index": t })
278
+ }, null, 4))), 128)), f.value === "progress-ring" && C.value !== null ? (g(), i("span", M, x(Math.round(C.value)) + "%", 1)) : r("", !0)])], 16));
279
+ }
280
+ }), [["__scopeId", "data-v-f38f76f8"]]);
281
+ //#endregion
282
+ //#region src/components/VLoader/loaders.ts
283
+ function P(e, t) {
284
+ return s({
285
+ name: e,
286
+ inheritAttrs: !1,
287
+ setup(e, { attrs: n, slots: r }) {
288
+ return () => u(N, {
289
+ ...n,
290
+ variant: t
291
+ }, r);
292
+ }
293
+ });
294
+ }
295
+ var F = /*#__PURE__*/ P("VBarsLoader", "bars"), I = /*#__PURE__*/ P("VBlobLoader", "blob"), L = /*#__PURE__*/ P("VBounceLoader", "bounce"), R = /*#__PURE__*/ P("VBreathingLoader", "breathing"), z = /*#__PURE__*/ P("VCardFlipLoader", "card-flip"), B = /*#__PURE__*/ P("VDotSweepLoader", "dot-sweep"), V = /*#__PURE__*/ P("VDotsLoader", "dots"), H = /*#__PURE__*/ P("VDualArcLoader", "dual-arc"), U = /*#__PURE__*/ P("VElementLoader", "element"), W = /*#__PURE__*/ P("VEqualizerLoader", "equalizer"), G = /*#__PURE__*/ P("VFallbackLoader", "fallback"), K = /*#__PURE__*/ P("VFlowLoader", "flow"), q = /*#__PURE__*/ P("VGradientRingLoader", "gradient-ring"), J = /*#__PURE__*/ P("VGridLoader", "grid"), oe = /*#__PURE__*/ P("VHashtagLoader", "hashtag"), se = /*#__PURE__*/ P("VHeatmapLoader", "heatmap"), ce = /*#__PURE__*/ P("VLiquidLoader", "liquid"), le = /*#__PURE__*/ P("VLogoSpinLoader", "logo-spin"), ue = /*#__PURE__*/ P("VMorphLoader", "morph"), de = /*#__PURE__*/ P("VOrbitDotsLoader", "orbit-dots"), fe = /*#__PURE__*/ P("VOrbitLoader", "orbit"), pe = /*#__PURE__*/ P("VPlaneLoader", "plane"), me = /*#__PURE__*/ P("VProgressRingLoader", "progress-ring"), he = /*#__PURE__*/ P("VPulseLoader", "pulse"), ge = /*#__PURE__*/ P("VRingLoader", "ring"), _e = /*#__PURE__*/ P("VRippleLoader", "ripple"), ve = /*#__PURE__*/ P("VRotateLoader", "rotate"), ye = /*#__PURE__*/ P("VSignalLoader", "signal"), be = /*#__PURE__*/ P("VSlidingBarsLoader", "sliding-bars"), xe = /*#__PURE__*/ P("VSnakeLoader", "snake"), Se = /*#__PURE__*/ P("VSpinDotsLoader", "spin-dots"), Ce = /*#__PURE__*/ P("VSpinLoader", "spin"), we = /*#__PURE__*/ P("VSquaresLoader", "squares"), Te = /*#__PURE__*/ P("VStairLoader", "stair"), Ee = /*#__PURE__*/ P("VTypingLoader", "typing"), De = /*#__PURE__*/ P("VWaveLoader", "wave"), Oe = { class: "v-pattern-skeleton__body" }, ke = {
296
+ key: 1,
297
+ class: "v-pattern-skeleton__stats"
298
+ }, Ae = { class: "v-pattern-skeleton__body" }, je = { class: "v-pattern-skeleton__body" }, Me = {
299
+ key: 1,
300
+ class: "v-pattern-skeleton__inline"
301
+ }, Ne = {
302
+ key: 0,
303
+ class: "v-pattern-skeleton__stats"
304
+ }, Pe = { class: "v-pattern-skeleton__body" }, Y = /*#__PURE__*/ C(/* @__PURE__ */ s({
305
+ __name: "index",
306
+ props: {
307
+ pattern: { default: "lines" },
308
+ rows: { default: 3 },
309
+ columns: { default: 3 },
310
+ mediaHeight: {},
311
+ avatarSize: {},
312
+ showMedia: {
313
+ type: Boolean,
314
+ default: !0
315
+ },
316
+ showAvatar: {
317
+ type: Boolean,
318
+ default: !0
319
+ },
320
+ showHeader: {
321
+ type: Boolean,
322
+ default: !0
323
+ },
324
+ showChart: {
325
+ type: Boolean,
326
+ default: !0
327
+ },
328
+ showStats: {
329
+ type: Boolean,
330
+ default: !0
331
+ },
332
+ showSubmit: {
333
+ type: Boolean,
334
+ default: !0
335
+ },
336
+ showRating: {
337
+ type: Boolean,
338
+ default: !0
339
+ },
340
+ showPrice: {
341
+ type: Boolean,
342
+ default: !0
343
+ },
344
+ showCta: {
345
+ type: Boolean,
346
+ default: !0
347
+ },
348
+ color: {},
349
+ highlightColor: {},
350
+ animated: {
351
+ type: Boolean,
352
+ default: !0
353
+ },
354
+ label: {}
355
+ },
356
+ setup(s) {
357
+ let c = s, l = [
358
+ "lines",
359
+ "article",
360
+ "card",
361
+ "profile",
362
+ "list",
363
+ "table",
364
+ "media",
365
+ "form",
366
+ "dashboard",
367
+ "feed",
368
+ "product"
369
+ ];
370
+ function u(e, t, n = 12) {
371
+ return typeof e == "number" && Number.isFinite(e) ? Math.min(n, Math.max(1, Math.round(e))) : t;
372
+ }
373
+ function f(e) {
374
+ return typeof e == "string" && e.trim() ? e.trim() : void 0;
375
+ }
376
+ let p = t(() => l.includes(c.pattern) ? c.pattern : "lines"), h = t(() => u(c.rows, 3)), _ = t(() => u(c.columns, 3, 6)), v = t(() => u(c.avatarSize, 48, 160)), b = t(() => f(c.label) ?? ""), x = t(() => b.value ? {
377
+ role: "status",
378
+ "aria-label": b.value,
379
+ "aria-busy": "true"
380
+ } : { "aria-hidden": "true" }), S = t(() => ({
381
+ "--v-skeleton-base-color": f(c.color),
382
+ "--v-skeleton-highlight-color": f(c.highlightColor)
383
+ })), C = t(() => ({ gridTemplateColumns: `repeat(${_.value}, minmax(0, 1fr))` }));
384
+ return (t, c) => (g(), i("div", d({
385
+ class: ["v-pattern-skeleton", `v-pattern-skeleton--${p.value}`],
386
+ style: S.value
387
+ }, x.value), [p.value === "profile" ? (g(), i(e, { key: 0 }, [
388
+ s.showAvatar ? (g(), n(E, {
389
+ key: 0,
390
+ variant: "circle",
391
+ animated: s.animated,
392
+ width: v.value
393
+ }, null, 8, ["animated", "width"])) : r("", !0),
394
+ a("div", Oe, [
395
+ o(E, {
396
+ animated: s.animated,
397
+ width: "42%",
398
+ height: "1rem"
399
+ }, null, 8, ["animated"]),
400
+ o(E, {
401
+ animated: s.animated,
402
+ width: "64%",
403
+ height: ".75rem"
404
+ }, null, 8, ["animated"]),
405
+ (g(!0), i(e, null, y(h.value, (e) => (g(), n(E, {
406
+ key: e,
407
+ animated: s.animated,
408
+ width: e === h.value ? "62%" : "100%",
409
+ height: ".7rem"
410
+ }, null, 8, ["animated", "width"]))), 128))
411
+ ]),
412
+ s.showStats ? (g(), i("div", ke, [(g(), i(e, null, y(3, (e) => o(E, {
413
+ key: e,
414
+ variant: "rect",
415
+ animated: s.animated,
416
+ height: "2.5rem"
417
+ }, null, 8, ["animated"])), 64))])) : r("", !0)
418
+ ], 64)) : p.value === "feed" ? (g(!0), i(e, { key: 1 }, y(h.value, (e) => (g(), i("div", {
419
+ key: e,
420
+ class: "v-pattern-skeleton__feed-item"
421
+ }, [s.showAvatar ? (g(), n(E, {
422
+ key: 0,
423
+ variant: "circle",
424
+ animated: s.animated,
425
+ width: v.value
426
+ }, null, 8, ["animated", "width"])) : r("", !0), a("div", Ae, [
427
+ o(E, {
428
+ animated: s.animated,
429
+ width: "40%",
430
+ height: ".85rem"
431
+ }, null, 8, ["animated"]),
432
+ o(E, {
433
+ animated: s.animated,
434
+ width: "100%",
435
+ height: ".75rem"
436
+ }, null, 8, ["animated"]),
437
+ o(E, {
438
+ animated: s.animated,
439
+ width: "72%",
440
+ height: ".75rem"
441
+ }, null, 8, ["animated"])
442
+ ])]))), 128)) : p.value === "media" ? (g(), i(e, { key: 2 }, [o(E, {
443
+ variant: "rect",
444
+ animated: s.animated,
445
+ width: s.mediaHeight ? s.mediaHeight : "7.5rem",
446
+ height: "5.5rem"
447
+ }, null, 8, ["animated", "width"]), a("div", je, [
448
+ o(E, {
449
+ animated: s.animated,
450
+ width: "36%",
451
+ height: ".7rem"
452
+ }, null, 8, ["animated"]),
453
+ o(E, {
454
+ animated: s.animated,
455
+ width: "100%",
456
+ height: "1rem"
457
+ }, null, 8, ["animated"]),
458
+ (g(!0), i(e, null, y(h.value, (e) => (g(), n(E, {
459
+ key: e,
460
+ animated: s.animated,
461
+ width: e === h.value ? "62%" : "86%",
462
+ height: ".7rem"
463
+ }, null, 8, ["animated", "width"]))), 128))
464
+ ])], 64)) : p.value === "product" ? (g(), i(e, { key: 3 }, [
465
+ o(E, {
466
+ variant: "rect",
467
+ animated: s.animated,
468
+ width: "100%",
469
+ height: s.mediaHeight ?? "10rem"
470
+ }, null, 8, ["animated", "height"]),
471
+ o(E, {
472
+ animated: s.animated,
473
+ width: "74%",
474
+ height: "1rem"
475
+ }, null, 8, ["animated"]),
476
+ s.showRating ? (g(), n(E, {
477
+ key: 0,
478
+ variant: "rect",
479
+ animated: s.animated,
480
+ width: "4.5rem",
481
+ height: "1.25rem"
482
+ }, null, 8, ["animated"])) : r("", !0),
483
+ s.showPrice ? (g(), n(E, {
484
+ key: 1,
485
+ animated: s.animated,
486
+ width: "35%",
487
+ height: "1.15rem"
488
+ }, null, 8, ["animated"])) : r("", !0),
489
+ s.showCta ? (g(), n(E, {
490
+ key: 2,
491
+ variant: "rect",
492
+ animated: s.animated,
493
+ width: "46%",
494
+ height: "2.25rem"
495
+ }, null, 8, ["animated"])) : r("", !0)
496
+ ], 64)) : p.value === "card" ? (g(), i(e, { key: 4 }, [
497
+ s.showMedia ? (g(), n(E, {
498
+ key: 0,
499
+ variant: "rect",
500
+ animated: s.animated,
501
+ width: "100%",
502
+ height: s.mediaHeight ?? "6rem"
503
+ }, null, 8, ["animated", "height"])) : r("", !0),
504
+ s.showAvatar ? (g(), i("div", Me, [o(E, {
505
+ variant: "circle",
506
+ animated: s.animated,
507
+ width: v.value
508
+ }, null, 8, ["animated", "width"]), o(E, {
509
+ animated: s.animated,
510
+ width: "45%",
511
+ height: ".8rem"
512
+ }, null, 8, ["animated"])])) : r("", !0),
513
+ (g(!0), i(e, null, y(h.value, (e) => (g(), n(E, {
514
+ key: e,
515
+ animated: s.animated,
516
+ width: e === h.value ? "72%" : "100%",
517
+ height: ".75rem"
518
+ }, null, 8, ["animated", "width"]))), 128))
519
+ ], 64)) : p.value === "table" ? (g(), i(e, { key: 5 }, [s.showHeader ? (g(), i("div", {
520
+ key: 0,
521
+ class: "v-pattern-skeleton__table-row v-pattern-skeleton__table-header",
522
+ style: m(C.value)
523
+ }, [(g(!0), i(e, null, y(_.value, (e) => (g(), n(E, {
524
+ key: e,
525
+ animated: s.animated,
526
+ height: ".9rem"
527
+ }, null, 8, ["animated"]))), 128))], 4)) : r("", !0), (g(!0), i(e, null, y(h.value, (t) => (g(), i("div", {
528
+ key: t,
529
+ class: "v-pattern-skeleton__table-row v-pattern-skeleton__data-row",
530
+ style: m(C.value)
531
+ }, [(g(!0), i(e, null, y(_.value, (e) => (g(), n(E, {
532
+ key: e,
533
+ animated: s.animated,
534
+ height: ".75rem"
535
+ }, null, 8, ["animated"]))), 128))], 4))), 128))], 64)) : p.value === "dashboard" ? (g(), i(e, { key: 6 }, [
536
+ s.showStats ? (g(), i("div", Ne, [(g(!0), i(e, null, y(_.value, (e) => (g(), n(E, {
537
+ key: e,
538
+ variant: "rect",
539
+ animated: s.animated,
540
+ height: "4.5rem"
541
+ }, null, 8, ["animated"]))), 128))])) : r("", !0),
542
+ s.showChart ? (g(), n(E, {
543
+ key: 1,
544
+ variant: "rect",
545
+ animated: s.animated,
546
+ width: "100%",
547
+ height: s.mediaHeight ?? "9rem"
548
+ }, null, 8, ["animated", "height"])) : r("", !0),
549
+ a("div", {
550
+ class: "v-pattern-skeleton__table-row v-pattern-skeleton__table-header",
551
+ style: m(C.value)
552
+ }, [(g(!0), i(e, null, y(_.value, (e) => (g(), n(E, {
553
+ key: e,
554
+ animated: s.animated,
555
+ height: ".7rem"
556
+ }, null, 8, ["animated"]))), 128))], 4),
557
+ (g(!0), i(e, null, y(h.value, (t) => (g(), i("div", {
558
+ key: t,
559
+ class: "v-pattern-skeleton__table-row v-pattern-skeleton__data-row",
560
+ style: m(C.value)
561
+ }, [(g(!0), i(e, null, y(_.value, (e) => (g(), n(E, {
562
+ key: e,
563
+ animated: s.animated,
564
+ height: ".65rem"
565
+ }, null, 8, ["animated"]))), 128))], 4))), 128))
566
+ ], 64)) : p.value === "form" ? (g(), i(e, { key: 7 }, [(g(!0), i(e, null, y(h.value, (e) => (g(), i("div", {
567
+ key: e,
568
+ class: "v-pattern-skeleton__field"
569
+ }, [o(E, {
570
+ animated: s.animated,
571
+ width: "30%",
572
+ height: ".7rem"
573
+ }, null, 8, ["animated"]), o(E, {
574
+ variant: "rect",
575
+ animated: s.animated,
576
+ width: "100%",
577
+ height: "2.5rem"
578
+ }, null, 8, ["animated"])]))), 128)), s.showSubmit ? (g(), n(E, {
579
+ key: 0,
580
+ variant: "rect",
581
+ animated: s.animated,
582
+ width: "8rem",
583
+ height: "2.5rem"
584
+ }, null, 8, ["animated"])) : r("", !0)], 64)) : p.value === "list" ? (g(!0), i(e, { key: 8 }, y(h.value, (e) => (g(), i("div", {
585
+ key: e,
586
+ class: "v-pattern-skeleton__feed-item"
587
+ }, [s.showAvatar ? (g(), n(E, {
588
+ key: 0,
589
+ variant: "circle",
590
+ animated: s.animated,
591
+ width: v.value
592
+ }, null, 8, ["animated", "width"])) : r("", !0), a("div", Pe, [o(E, {
593
+ animated: s.animated,
594
+ width: "76%",
595
+ height: ".85rem"
596
+ }, null, 8, ["animated"]), o(E, {
597
+ animated: s.animated,
598
+ width: "54%",
599
+ height: ".7rem"
600
+ }, null, 8, ["animated"])])]))), 128)) : (g(), i(e, { key: 9 }, [
601
+ p.value === "article" && s.showMedia ? (g(), n(E, {
602
+ key: 0,
603
+ variant: "rect",
604
+ animated: s.animated,
605
+ width: "100%",
606
+ height: s.mediaHeight ?? "10rem"
607
+ }, null, 8, ["animated", "height"])) : r("", !0),
608
+ p.value === "article" ? (g(), n(E, {
609
+ key: 1,
610
+ animated: s.animated,
611
+ width: "72%",
612
+ height: "1.35rem"
613
+ }, null, 8, ["animated"])) : r("", !0),
614
+ (g(!0), i(e, null, y(h.value, (e) => (g(), n(E, {
615
+ key: e,
616
+ animated: s.animated,
617
+ width: e === h.value ? "62%" : "100%",
618
+ height: ".8rem"
619
+ }, null, 8, ["animated", "width"]))), 128))
620
+ ], 64))], 16));
621
+ }
622
+ }), [["__scopeId", "data-v-e1a021e1"]]), Fe = /*#__PURE__*/ C(/* @__PURE__ */ s({
623
+ __name: "index",
624
+ props: {
625
+ label: {},
626
+ gap: { default: "0.75rem" },
627
+ decorative: {
628
+ type: Boolean,
629
+ default: !1
630
+ }
631
+ },
632
+ setup(e) {
633
+ let n = e, r = t(() => typeof n.label == "string" ? n.label.trim() : ""), a = t(() => n.decorative ? { "aria-hidden": "true" } : r.value ? {
634
+ role: "status",
635
+ "aria-label": r.value,
636
+ "aria-busy": "true"
637
+ } : {});
638
+ return (t, n) => (g(), i("div", d({
639
+ class: "v-skeleton-group",
640
+ style: { gap: e.gap }
641
+ }, a.value), [b(t.$slots, "default", {}, void 0, !0)], 16));
642
+ }
643
+ }), [["__scopeId", "data-v-6a86d8c9"]]), X = /* @__PURE__ */ s({
644
+ __name: "index",
645
+ props: {
646
+ loading: {
647
+ type: Boolean,
648
+ default: !0
649
+ },
650
+ pattern: { default: "lines" },
651
+ rows: { default: 3 },
652
+ columns: {},
653
+ mediaHeight: {},
654
+ avatarSize: {},
655
+ showMedia: {
656
+ type: Boolean,
657
+ default: !0
658
+ },
659
+ showAvatar: {
660
+ type: Boolean,
661
+ default: !0
662
+ },
663
+ showHeader: {
664
+ type: Boolean,
665
+ default: !0
666
+ },
667
+ showChart: {
668
+ type: Boolean,
669
+ default: !0
670
+ },
671
+ showStats: {
672
+ type: Boolean,
673
+ default: !0
674
+ },
675
+ showSubmit: {
676
+ type: Boolean,
677
+ default: !0
678
+ },
679
+ showRating: {
680
+ type: Boolean,
681
+ default: !0
682
+ },
683
+ showPrice: {
684
+ type: Boolean,
685
+ default: !0
686
+ },
687
+ showCta: {
688
+ type: Boolean,
689
+ default: !0
690
+ },
691
+ color: {},
692
+ highlightColor: {},
693
+ animated: {
694
+ type: Boolean,
695
+ default: !0
696
+ },
697
+ label: { default: "Loading content" }
698
+ },
699
+ setup(e) {
700
+ let n = e, r = t(() => ({
701
+ pattern: n.pattern,
702
+ rows: n.rows,
703
+ columns: n.columns,
704
+ color: n.color,
705
+ highlightColor: n.highlightColor,
706
+ animated: n.animated,
707
+ label: n.label,
708
+ mediaHeight: n.mediaHeight,
709
+ avatarSize: n.avatarSize,
710
+ showMedia: n.showMedia,
711
+ showAvatar: n.showAvatar,
712
+ showHeader: n.showHeader,
713
+ showChart: n.showChart,
714
+ showStats: n.showStats,
715
+ showSubmit: n.showSubmit,
716
+ showRating: n.showRating,
717
+ showPrice: n.showPrice,
718
+ showCta: n.showCta
719
+ }));
720
+ return (t, n) => e.loading ? b(t.$slots, "skeleton", {}, () => [o(Y, p(l(r.value)), null, 16)], void 0, 1) : b(t.$slots, "default", {}, void 0, void 0, 0);
721
+ }
722
+ }), Ie = E;
723
+ function Z(e, t) {
724
+ return s({
725
+ name: e,
726
+ inheritAttrs: !1,
727
+ setup(e, { attrs: n }) {
728
+ return () => u(Y, {
729
+ ...n,
730
+ pattern: t
731
+ });
732
+ }
733
+ });
734
+ }
735
+ var Le = /*#__PURE__*/ Z("VArticleSkeleton", "article"), Re = /*#__PURE__*/ Z("VCardSkeleton", "card"), ze = /*#__PURE__*/ Z("VDashboardSkeleton", "dashboard"), Be = /*#__PURE__*/ Z("VFeedSkeleton", "feed"), Ve = /*#__PURE__*/ Z("VFormSkeleton", "form"), He = /*#__PURE__*/ Z("VListSkeleton", "list"), Q = /*#__PURE__*/ Z("VMediaCardSkeleton", "media"), Ue = /*#__PURE__*/ Z("VProductCardSkeleton", "product"), We = /*#__PURE__*/ Z("VProfileSkeleton", "profile"), Ge = /*#__PURE__*/ Z("VTableSkeleton", "table"), Ke = /*#__PURE__*/ s({
736
+ name: "VAutoSkeleton",
737
+ inheritAttrs: !1,
738
+ props: [
739
+ "loading",
740
+ "pattern",
741
+ "rows",
742
+ "columns",
743
+ "color",
744
+ "highlightColor",
745
+ "animated",
746
+ "label",
747
+ "mediaHeight",
748
+ "avatarSize",
749
+ "showMedia",
750
+ "showAvatar",
751
+ "showHeader",
752
+ "showChart",
753
+ "showStats",
754
+ "showSubmit",
755
+ "showRating",
756
+ "showPrice",
757
+ "showCta"
758
+ ],
759
+ setup(e, { attrs: t, slots: n }) {
760
+ return () => u(X, {
761
+ ...t,
762
+ ...e
763
+ }, n);
764
+ }
765
+ });
766
+ //#endregion
767
+ //#region src/composables/useLoading.ts
768
+ function qe() {
769
+ let e = v(0), n = t(() => e.value > 0), r = _(e);
770
+ async function i(t) {
771
+ e.value++;
772
+ try {
773
+ return await t();
774
+ } finally {
775
+ e.value = Math.max(0, e.value - 1);
776
+ }
777
+ }
778
+ return {
779
+ isLoading: n,
780
+ pendingCount: r,
781
+ execute: i
782
+ };
783
+ }
784
+ //#endregion
785
+ //#region src/composables/useDelayedLoading.ts
786
+ var Je = 200;
787
+ function $(e, t) {
788
+ return e === void 0 || !Number.isFinite(e) ? t : Math.max(0, e);
789
+ }
790
+ function Ye(e) {
791
+ let t = typeof e == "number" ? e : e?.delay, n = typeof e == "number" ? 0 : e?.minVisibleDuration, r = $(t, Je), i = $(n, 0), a = v(0), o = v(!1), s = _(o), l = _(a), u = null, d = null, f = null, p = !1;
792
+ function m() {
793
+ u !== null && (clearTimeout(u), u = null);
794
+ }
795
+ function g() {
796
+ d !== null && (clearTimeout(d), d = null);
797
+ }
798
+ function y() {
799
+ o.value = !0, f = Date.now();
800
+ }
801
+ function b() {
802
+ p || o.value || u !== null || a.value === 0 || (r <= 0 ? y() : u = setTimeout(() => {
803
+ u = null, !p && a.value > 0 && y();
804
+ }, r));
805
+ }
806
+ function x() {
807
+ if (m(), g(), !o.value) {
808
+ f = null;
809
+ return;
810
+ }
811
+ if (i <= 0 || f === null) {
812
+ o.value = !1, f = null;
813
+ return;
814
+ }
815
+ let e = i - (Date.now() - f);
816
+ e <= 0 ? (o.value = !1, f = null) : d = setTimeout(() => {
817
+ d = null, !p && a.value === 0 && (o.value = !1, f = null);
818
+ }, e);
819
+ }
820
+ c() && h(() => {
821
+ p = !0, m(), g(), o.value = !1, f = null;
822
+ });
823
+ async function S(e) {
824
+ a.value++, g(), b();
825
+ try {
826
+ return await e();
827
+ } finally {
828
+ a.value = Math.max(0, a.value - 1), a.value === 0 && x();
829
+ }
830
+ }
831
+ return {
832
+ isLoading: s,
833
+ pendingCount: l,
834
+ execute: S
835
+ };
836
+ }
837
+ //#endregion
838
+ //#region src/composables/useLoadingGroup.ts
839
+ function Xe(e) {
840
+ let n = typeof e == "function" ? e : () => e, r = t(() => {
841
+ let e = 0;
842
+ for (let t of n()) (typeof t == "function" ? t() : t.value) && e++;
843
+ return e;
844
+ });
845
+ return {
846
+ isLoading: t(() => r.value > 0),
847
+ activeCount: r
848
+ };
849
+ }
850
+ //#endregion
851
+ export { Le as VArticleSkeleton, Ke as VAutoSkeleton, F as VBarsLoader, I as VBlobLoader, L as VBounceLoader, R as VBreathingLoader, z as VCardFlipLoader, Re as VCardSkeleton, ze as VDashboardSkeleton, B as VDotSweepLoader, V as VDotsLoader, H as VDualArcLoader, U as VElementLoader, W as VEqualizerLoader, G as VFallbackLoader, Be as VFeedSkeleton, K as VFlowLoader, Ve as VFormSkeleton, q as VGradientRingLoader, J as VGridLoader, oe as VHashtagLoader, se as VHeatmapLoader, ce as VLiquidLoader, He as VListSkeleton, N as VLoader, re as VLoading, k as VLoadingButton, le as VLogoSpinLoader, Q as VMediaCardSkeleton, ue as VMorphLoader, de as VOrbitDotsLoader, fe as VOrbitLoader, Y as VPatternSkeleton, pe as VPlaneLoader, Ue as VProductCardSkeleton, We as VProfileSkeleton, O as VProgress, me as VProgressRingLoader, he as VPulseLoader, ge as VRingLoader, _e as VRippleLoader, ve as VRotateLoader, ye as VSignalLoader, E as VSkeleton, Fe as VSkeletonGroup, Ie as VSkeletonLoader, X as VSkeletonSwitch, be as VSlidingBarsLoader, xe as VSnakeLoader, Se as VSpinDotsLoader, Ce as VSpinLoader, w as VSpinner, we as VSquaresLoader, Te as VStairLoader, Ge as VTableSkeleton, Ee as VTypingLoader, De as VWaveLoader, Ye as useDelayedLoading, qe as useLoading, Xe as useLoadingGroup };