@velkymx/vibeui 0.5.2 → 0.5.4
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/components/VibeFormCheckbox.vue.d.ts +1 -1
- package/dist/components/VibeFormRadio.vue.d.ts +1 -1
- package/dist/components/VibeFormWysiwyg.vue.d.ts +1 -1
- package/dist/components/VibeNavbar.vue.d.ts +9 -0
- package/dist/components/VibeNavbarNav.vue.d.ts +13 -1
- package/dist/types.d.ts +1 -0
- package/dist/vibeui.css +1 -1
- package/dist/vibeui.es.js +947 -882
- package/dist/vibeui.umd.js +1 -1
- package/package.json +1 -1
package/dist/vibeui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const fe = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as x, computed as y, openBlock as i, createElementBlock as s, normalizeClass as g, renderSlot as C, createTextVNode as w, toDisplayString as m, createCommentVNode as b, createBlock as q, resolveDynamicComponent as P, withCtx as F, createElementVNode as h, normalizeStyle as D, Fragment as M, renderList as A, reactive as oe, provide as de, unref as re, inject as Z, ref as T, watch as E, onMounted as G, onBeforeUnmount as H, useModel as Y, withDirectives as W, vModelText as ue, vModelSelect as ce, withModifiers as X, mergeModels as J } from "vue";
|
|
2
|
+
const fe = /* @__PURE__ */ x({
|
|
3
3
|
__name: "VibeAlert",
|
|
4
4
|
props: {
|
|
5
5
|
variant: { type: String, default: "primary" },
|
|
@@ -11,35 +11,35 @@ const fe = /* @__PURE__ */ C({
|
|
|
11
11
|
setup(e, { emit: f }) {
|
|
12
12
|
const t = e, a = f, l = y({
|
|
13
13
|
get: () => t.modelValue,
|
|
14
|
-
set: (
|
|
14
|
+
set: (d) => a("update:modelValue", d)
|
|
15
15
|
}), r = () => {
|
|
16
16
|
try {
|
|
17
17
|
l.value = !1;
|
|
18
|
-
} catch (
|
|
18
|
+
} catch (d) {
|
|
19
19
|
a("component-error", {
|
|
20
20
|
message: "Dismiss failed",
|
|
21
21
|
componentName: "VibeAlert",
|
|
22
|
-
originalError:
|
|
22
|
+
originalError: d
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
return (
|
|
26
|
+
return (d, u) => l.value ? (i(), s("div", {
|
|
27
27
|
key: 0,
|
|
28
28
|
class: g(`alert alert-${e.variant}`),
|
|
29
29
|
role: "alert"
|
|
30
30
|
}, [
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
C(d.$slots, "default", {}, () => [
|
|
32
|
+
w(m(e.message), 1)
|
|
33
33
|
]),
|
|
34
34
|
e.dismissable ? (i(), s("button", {
|
|
35
35
|
key: 0,
|
|
36
36
|
class: "btn-close",
|
|
37
37
|
onClick: r,
|
|
38
38
|
"aria-label": "Close"
|
|
39
|
-
})) :
|
|
40
|
-
], 2)) :
|
|
39
|
+
})) : b("", !0)
|
|
40
|
+
], 2)) : b("", !0);
|
|
41
41
|
}
|
|
42
|
-
}), ve = /* @__PURE__ */
|
|
42
|
+
}), ve = /* @__PURE__ */ x({
|
|
43
43
|
__name: "VibeBadge",
|
|
44
44
|
props: {
|
|
45
45
|
variant: { type: String, default: "primary" },
|
|
@@ -52,16 +52,16 @@ const fe = /* @__PURE__ */ C({
|
|
|
52
52
|
const l = ["badge", `bg-${t.variant}`];
|
|
53
53
|
return t.pill && l.push("rounded-pill"), l.join(" ");
|
|
54
54
|
});
|
|
55
|
-
return (l, r) => (i(),
|
|
55
|
+
return (l, r) => (i(), q(P(e.tag), {
|
|
56
56
|
class: g(a.value)
|
|
57
57
|
}, {
|
|
58
|
-
default:
|
|
59
|
-
|
|
58
|
+
default: F(() => [
|
|
59
|
+
C(l.$slots, "default")
|
|
60
60
|
]),
|
|
61
61
|
_: 3
|
|
62
62
|
}, 8, ["class"]));
|
|
63
63
|
}
|
|
64
|
-
}), be = /* @__PURE__ */
|
|
64
|
+
}), be = /* @__PURE__ */ x({
|
|
65
65
|
__name: "VibeButton",
|
|
66
66
|
props: {
|
|
67
67
|
variant: { type: String, default: "primary" },
|
|
@@ -76,27 +76,27 @@ const fe = /* @__PURE__ */ C({
|
|
|
76
76
|
emits: ["click", "component-error"],
|
|
77
77
|
setup(e, { emit: f }) {
|
|
78
78
|
const t = e, a = f, l = y(() => t.href ? "a" : t.to ? "router-link" : "button"), r = y(() => {
|
|
79
|
-
const
|
|
80
|
-
return t.outline ?
|
|
81
|
-
}),
|
|
82
|
-
t.disabled || a("click",
|
|
79
|
+
const u = ["btn"];
|
|
80
|
+
return t.outline ? u.push(`btn-outline-${t.variant}`) : u.push(`btn-${t.variant}`), t.size && u.push(`btn-${t.size}`), t.active && u.push("active"), u.join(" ");
|
|
81
|
+
}), d = (u) => {
|
|
82
|
+
t.disabled || a("click", u);
|
|
83
83
|
};
|
|
84
|
-
return (
|
|
84
|
+
return (u, o) => (i(), q(P(l.value), {
|
|
85
85
|
class: g(r.value),
|
|
86
86
|
type: e.href || e.to ? void 0 : e.type,
|
|
87
87
|
href: e.href,
|
|
88
88
|
to: e.to,
|
|
89
89
|
disabled: e.disabled,
|
|
90
90
|
"aria-disabled": e.disabled,
|
|
91
|
-
onClick:
|
|
91
|
+
onClick: d
|
|
92
92
|
}, {
|
|
93
|
-
default:
|
|
94
|
-
|
|
93
|
+
default: F(() => [
|
|
94
|
+
C(u.$slots, "default")
|
|
95
95
|
]),
|
|
96
96
|
_: 3
|
|
97
97
|
}, 8, ["class", "type", "href", "to", "disabled", "aria-disabled"]));
|
|
98
98
|
}
|
|
99
|
-
}), me = ["role", "aria-label"], he = /* @__PURE__ */
|
|
99
|
+
}), me = ["role", "aria-label"], he = /* @__PURE__ */ x({
|
|
100
100
|
__name: "VibeButtonGroup",
|
|
101
101
|
props: {
|
|
102
102
|
size: { type: String, default: void 0 },
|
|
@@ -115,10 +115,10 @@ const fe = /* @__PURE__ */ C({
|
|
|
115
115
|
role: e.role,
|
|
116
116
|
"aria-label": e.ariaLabel
|
|
117
117
|
}, [
|
|
118
|
-
|
|
118
|
+
C(l.$slots, "default")
|
|
119
119
|
], 10, me));
|
|
120
120
|
}
|
|
121
|
-
}), ye = ["disabled", "aria-label"], ge = /* @__PURE__ */
|
|
121
|
+
}), ye = ["disabled", "aria-label"], ge = /* @__PURE__ */ x({
|
|
122
122
|
__name: "VibeCloseButton",
|
|
123
123
|
props: {
|
|
124
124
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -130,7 +130,7 @@ const fe = /* @__PURE__ */ C({
|
|
|
130
130
|
const t = e, a = f, l = (r) => {
|
|
131
131
|
t.disabled || a("click", r);
|
|
132
132
|
};
|
|
133
|
-
return (r,
|
|
133
|
+
return (r, d) => (i(), s("button", {
|
|
134
134
|
type: "button",
|
|
135
135
|
class: g(["btn-close", { "btn-close-white": e.white }]),
|
|
136
136
|
disabled: e.disabled,
|
|
@@ -138,7 +138,7 @@ const fe = /* @__PURE__ */ C({
|
|
|
138
138
|
onClick: l
|
|
139
139
|
}, null, 10, ye));
|
|
140
140
|
}
|
|
141
|
-
}), pe = { class: "visually-hidden" },
|
|
141
|
+
}), pe = { class: "visually-hidden" }, ke = /* @__PURE__ */ x({
|
|
142
142
|
__name: "VibeSpinner",
|
|
143
143
|
props: {
|
|
144
144
|
variant: { type: String, default: void 0 },
|
|
@@ -153,17 +153,17 @@ const fe = /* @__PURE__ */ C({
|
|
|
153
153
|
const l = [`spinner-${t.type}`];
|
|
154
154
|
return t.variant && l.push(`text-${t.variant}`), t.size && l.push(`spinner-${t.type}-${t.size}`), l.join(" ");
|
|
155
155
|
});
|
|
156
|
-
return (l, r) => (i(),
|
|
156
|
+
return (l, r) => (i(), q(P(e.tag), {
|
|
157
157
|
class: g(a.value),
|
|
158
158
|
role: "status"
|
|
159
159
|
}, {
|
|
160
|
-
default:
|
|
161
|
-
h("span", pe,
|
|
160
|
+
default: F(() => [
|
|
161
|
+
h("span", pe, m(e.label), 1)
|
|
162
162
|
]),
|
|
163
163
|
_: 1
|
|
164
164
|
}, 8, ["class"]));
|
|
165
165
|
}
|
|
166
|
-
}),
|
|
166
|
+
}), $e = /* @__PURE__ */ x({
|
|
167
167
|
__name: "VibePlaceholder",
|
|
168
168
|
props: {
|
|
169
169
|
variant: { type: String, default: void 0 },
|
|
@@ -175,29 +175,29 @@ const fe = /* @__PURE__ */ C({
|
|
|
175
175
|
emits: ["component-error"],
|
|
176
176
|
setup(e, { emit: f }) {
|
|
177
177
|
const t = e, a = y(() => {
|
|
178
|
-
const
|
|
179
|
-
return t.variant &&
|
|
178
|
+
const d = ["placeholder"];
|
|
179
|
+
return t.variant && d.push(`bg-${t.variant}`), t.size && d.push(`placeholder-${t.size}`), d.join(" ");
|
|
180
180
|
}), l = y(() => {
|
|
181
181
|
if (t.animation) return `placeholder-${t.animation}`;
|
|
182
182
|
}), r = y(() => {
|
|
183
183
|
if (t.width)
|
|
184
184
|
return { width: typeof t.width == "number" ? `${t.width}%` : t.width };
|
|
185
185
|
});
|
|
186
|
-
return (
|
|
186
|
+
return (d, u) => (i(), q(P(e.tag), {
|
|
187
187
|
class: g(l.value)
|
|
188
188
|
}, {
|
|
189
|
-
default:
|
|
189
|
+
default: F(() => [
|
|
190
190
|
h("span", {
|
|
191
191
|
class: g(a.value),
|
|
192
192
|
style: D(r.value)
|
|
193
193
|
}, [
|
|
194
|
-
|
|
194
|
+
C(d.$slots, "default")
|
|
195
195
|
], 6)
|
|
196
196
|
]),
|
|
197
197
|
_: 3
|
|
198
198
|
}, 8, ["class"]));
|
|
199
199
|
}
|
|
200
|
-
}), Se = /* @__PURE__ */
|
|
200
|
+
}), Se = /* @__PURE__ */ x({
|
|
201
201
|
__name: "VibeContainer",
|
|
202
202
|
props: {
|
|
203
203
|
fluid: { type: [Boolean, String], default: !1 },
|
|
@@ -206,16 +206,16 @@ const fe = /* @__PURE__ */ C({
|
|
|
206
206
|
emits: ["component-error"],
|
|
207
207
|
setup(e, { emit: f }) {
|
|
208
208
|
const t = e, a = y(() => t.fluid === !1 ? "container" : t.fluid === !0 ? "container-fluid" : `container-${t.fluid}`);
|
|
209
|
-
return (l, r) => (i(),
|
|
209
|
+
return (l, r) => (i(), q(P(e.tag), {
|
|
210
210
|
class: g(a.value)
|
|
211
211
|
}, {
|
|
212
|
-
default:
|
|
213
|
-
|
|
212
|
+
default: F(() => [
|
|
213
|
+
C(l.$slots, "default")
|
|
214
214
|
]),
|
|
215
215
|
_: 3
|
|
216
216
|
}, 8, ["class"]));
|
|
217
217
|
}
|
|
218
|
-
}), Ve = /* @__PURE__ */
|
|
218
|
+
}), Ve = /* @__PURE__ */ x({
|
|
219
219
|
__name: "VibeRow",
|
|
220
220
|
props: {
|
|
221
221
|
tag: { type: String, default: "div" },
|
|
@@ -256,28 +256,28 @@ const fe = /* @__PURE__ */ C({
|
|
|
256
256
|
const l = ["row"];
|
|
257
257
|
t.gutters !== void 0 && l.push(`g-${t.gutters}`), t.guttersX !== void 0 && l.push(`gx-${t.guttersX}`), t.guttersY !== void 0 && l.push(`gy-${t.guttersY}`);
|
|
258
258
|
const r = ["sm", "md", "lg", "xl", "xxl"];
|
|
259
|
-
return r.forEach((
|
|
260
|
-
const
|
|
261
|
-
t[
|
|
262
|
-
const
|
|
263
|
-
t[
|
|
264
|
-
const c = `guttersY${
|
|
265
|
-
t[c] !== void 0 && l.push(`gy-${
|
|
266
|
-
}), t.rowCols !== void 0 && l.push(`row-cols-${t.rowCols}`), r.forEach((
|
|
267
|
-
const
|
|
268
|
-
t[
|
|
259
|
+
return r.forEach((d) => {
|
|
260
|
+
const u = d.charAt(0).toUpperCase() + d.slice(1), o = `gutters${u}`;
|
|
261
|
+
t[o] !== void 0 && l.push(`g-${d}-${t[o]}`);
|
|
262
|
+
const n = `guttersX${u}`;
|
|
263
|
+
t[n] !== void 0 && l.push(`gx-${d}-${t[n]}`);
|
|
264
|
+
const c = `guttersY${u}`;
|
|
265
|
+
t[c] !== void 0 && l.push(`gy-${d}-${t[c]}`);
|
|
266
|
+
}), t.rowCols !== void 0 && l.push(`row-cols-${t.rowCols}`), r.forEach((d) => {
|
|
267
|
+
const u = `rowCols${d.charAt(0).toUpperCase() + d.slice(1)}`;
|
|
268
|
+
t[u] !== void 0 && l.push(`row-cols-${d}-${t[u]}`);
|
|
269
269
|
}), t.alignItems && l.push(`align-items-${t.alignItems}`), t.justifyContent && l.push(`justify-content-${t.justifyContent}`), l.join(" ");
|
|
270
270
|
});
|
|
271
|
-
return (l, r) => (i(),
|
|
271
|
+
return (l, r) => (i(), q(P(e.tag), {
|
|
272
272
|
class: g(a.value)
|
|
273
273
|
}, {
|
|
274
|
-
default:
|
|
275
|
-
|
|
274
|
+
default: F(() => [
|
|
275
|
+
C(l.$slots, "default")
|
|
276
276
|
]),
|
|
277
277
|
_: 3
|
|
278
278
|
}, 8, ["class"]));
|
|
279
279
|
}
|
|
280
|
-
}), Ce = /* @__PURE__ */
|
|
280
|
+
}), Ce = /* @__PURE__ */ x({
|
|
281
281
|
__name: "VibeCol",
|
|
282
282
|
props: {
|
|
283
283
|
tag: { type: String, default: "div" },
|
|
@@ -315,23 +315,23 @@ const fe = /* @__PURE__ */ C({
|
|
|
315
315
|
{ name: "lg", value: t.lg },
|
|
316
316
|
{ name: "xl", value: t.xl },
|
|
317
317
|
{ name: "xxl", value: t.xxl }
|
|
318
|
-
].forEach(({ name:
|
|
319
|
-
|
|
318
|
+
].forEach(({ name: u, value: o }) => {
|
|
319
|
+
o === !0 ? l.push(`col-${u}`) : o === "auto" ? l.push(`col-${u}-auto`) : o !== void 0 && l.push(`col-${u}-${o}`);
|
|
320
320
|
})) : l.push("col"), t.offset !== void 0 && l.push(`offset-${t.offset}`), t.offsetSm !== void 0 && l.push(`offset-sm-${t.offsetSm}`), t.offsetMd !== void 0 && l.push(`offset-md-${t.offsetMd}`), t.offsetLg !== void 0 && l.push(`offset-lg-${t.offsetLg}`), t.offsetXl !== void 0 && l.push(`offset-xl-${t.offsetXl}`), t.offsetXxl !== void 0 && l.push(`offset-xxl-${t.offsetXxl}`), t.order !== void 0 && l.push(`order-${t.order}`), t.orderSm !== void 0 && l.push(`order-sm-${t.orderSm}`), t.orderMd !== void 0 && l.push(`order-md-${t.orderMd}`), t.orderLg !== void 0 && l.push(`order-lg-${t.orderLg}`), t.orderXl !== void 0 && l.push(`order-xl-${t.orderXl}`), t.orderXxl !== void 0 && l.push(`order-xxl-${t.orderXxl}`), t.alignSelf && l.push(`align-self-${t.alignSelf}`), l.join(" ");
|
|
321
321
|
});
|
|
322
|
-
return (l, r) => (i(),
|
|
322
|
+
return (l, r) => (i(), q(P(e.tag), {
|
|
323
323
|
class: g(a.value)
|
|
324
324
|
}, {
|
|
325
|
-
default:
|
|
326
|
-
|
|
325
|
+
default: F(() => [
|
|
326
|
+
C(l.$slots, "default")
|
|
327
327
|
]),
|
|
328
328
|
_: 3
|
|
329
329
|
}, 8, ["class"]));
|
|
330
330
|
}
|
|
331
|
-
}), xe = ["src", "alt"],
|
|
331
|
+
}), xe = ["src", "alt"], we = {
|
|
332
332
|
key: 1,
|
|
333
333
|
class: "card-header"
|
|
334
|
-
},
|
|
334
|
+
}, Be = {
|
|
335
335
|
key: 2,
|
|
336
336
|
class: "card-body"
|
|
337
337
|
}, Ne = {
|
|
@@ -343,7 +343,7 @@ const fe = /* @__PURE__ */ C({
|
|
|
343
343
|
}, Me = {
|
|
344
344
|
key: 3,
|
|
345
345
|
class: "card-footer"
|
|
346
|
-
}, qe = ["src", "alt"], Pe = /* @__PURE__ */
|
|
346
|
+
}, qe = ["src", "alt"], Pe = /* @__PURE__ */ x({
|
|
347
347
|
__name: "VibeCard",
|
|
348
348
|
props: {
|
|
349
349
|
variant: { type: String, default: void 0 },
|
|
@@ -365,52 +365,52 @@ const fe = /* @__PURE__ */ C({
|
|
|
365
365
|
setup(e, { emit: f }) {
|
|
366
366
|
const t = e, a = y(() => {
|
|
367
367
|
const l = ["card"];
|
|
368
|
-
return t.variant && l.push(`bg-${t.variant}`), t.border && l.push(`border-${t.border}`), t.textVariant && l.push(`text-${t.textVariant}`), l.join(" ");
|
|
368
|
+
return t.variant && l.push(`text-bg-${t.variant}`), t.border && l.push(`border-${t.border}`), t.textVariant && l.push(`text-${t.textVariant}`), l.join(" ");
|
|
369
369
|
});
|
|
370
|
-
return (l, r) => (i(),
|
|
370
|
+
return (l, r) => (i(), q(P(e.tag), {
|
|
371
371
|
class: g(a.value)
|
|
372
372
|
}, {
|
|
373
|
-
default:
|
|
373
|
+
default: F(() => [
|
|
374
374
|
e.imgSrc && e.imgTop ? (i(), s("img", {
|
|
375
375
|
key: 0,
|
|
376
376
|
src: e.imgSrc,
|
|
377
377
|
alt: e.imgAlt,
|
|
378
378
|
class: "card-img-top"
|
|
379
|
-
}, null, 8, xe)) :
|
|
380
|
-
e.header || l.$slots.header ? (i(), s("div",
|
|
381
|
-
|
|
382
|
-
|
|
379
|
+
}, null, 8, xe)) : b("", !0),
|
|
380
|
+
e.header || l.$slots.header ? (i(), s("div", we, [
|
|
381
|
+
C(l.$slots, "header", {}, () => [
|
|
382
|
+
w(m(e.header), 1)
|
|
383
383
|
])
|
|
384
|
-
])) :
|
|
385
|
-
e.title || e.body || l.$slots.default || l.$slots.body ? (i(), s("div",
|
|
384
|
+
])) : b("", !0),
|
|
385
|
+
e.title || e.body || l.$slots.default || l.$slots.body ? (i(), s("div", Be, [
|
|
386
386
|
e.title || l.$slots.title ? (i(), s("h5", Ne, [
|
|
387
|
-
|
|
388
|
-
|
|
387
|
+
C(l.$slots, "title", {}, () => [
|
|
388
|
+
w(m(e.title), 1)
|
|
389
389
|
])
|
|
390
|
-
])) :
|
|
390
|
+
])) : b("", !0),
|
|
391
391
|
e.body || l.$slots.body ? (i(), s("p", Te, [
|
|
392
|
-
|
|
393
|
-
|
|
392
|
+
C(l.$slots, "body", {}, () => [
|
|
393
|
+
w(m(e.body), 1)
|
|
394
394
|
])
|
|
395
|
-
])) :
|
|
396
|
-
|
|
397
|
-
])) :
|
|
395
|
+
])) : b("", !0),
|
|
396
|
+
C(l.$slots, "default")
|
|
397
|
+
])) : b("", !0),
|
|
398
398
|
e.footer || l.$slots.footer ? (i(), s("div", Me, [
|
|
399
|
-
|
|
400
|
-
|
|
399
|
+
C(l.$slots, "footer", {}, () => [
|
|
400
|
+
w(m(e.footer), 1)
|
|
401
401
|
])
|
|
402
|
-
])) :
|
|
402
|
+
])) : b("", !0),
|
|
403
403
|
e.imgSrc && e.imgBottom ? (i(), s("img", {
|
|
404
404
|
key: 4,
|
|
405
405
|
src: e.imgSrc,
|
|
406
406
|
alt: e.imgAlt,
|
|
407
407
|
class: "card-img-bottom"
|
|
408
|
-
}, null, 8, qe)) :
|
|
408
|
+
}, null, 8, qe)) : b("", !0)
|
|
409
409
|
]),
|
|
410
410
|
_: 3
|
|
411
411
|
}, 8, ["class"]));
|
|
412
412
|
}
|
|
413
|
-
}), Fe = ["aria-label"], Le = { class: "breadcrumb" }, ze = ["aria-current"], je = /* @__PURE__ */
|
|
413
|
+
}), Fe = ["aria-label"], Le = { class: "breadcrumb" }, ze = ["aria-current"], je = /* @__PURE__ */ x({
|
|
414
414
|
__name: "VibeBreadcrumb",
|
|
415
415
|
props: {
|
|
416
416
|
ariaLabel: { type: String, default: "breadcrumb" },
|
|
@@ -418,27 +418,27 @@ const fe = /* @__PURE__ */ C({
|
|
|
418
418
|
},
|
|
419
419
|
emits: ["item-click", "component-error"],
|
|
420
420
|
setup(e, { emit: f }) {
|
|
421
|
-
const t = f, a = (l, r,
|
|
422
|
-
l.active || t("item-click", { item: l, index: r, event:
|
|
421
|
+
const t = f, a = (l, r, d) => {
|
|
422
|
+
l.active || t("item-click", { item: l, index: r, event: d });
|
|
423
423
|
};
|
|
424
424
|
return (l, r) => (i(), s("nav", { "aria-label": e.ariaLabel }, [
|
|
425
425
|
h("ol", Le, [
|
|
426
|
-
(i(!0), s(
|
|
427
|
-
key:
|
|
428
|
-
class: g(["breadcrumb-item", { active:
|
|
429
|
-
"aria-current":
|
|
426
|
+
(i(!0), s(M, null, A(e.items, (d, u) => (i(), s("li", {
|
|
427
|
+
key: u,
|
|
428
|
+
class: g(["breadcrumb-item", { active: d.active }]),
|
|
429
|
+
"aria-current": d.active ? "page" : void 0
|
|
430
430
|
}, [
|
|
431
|
-
(i(),
|
|
432
|
-
href:
|
|
433
|
-
to:
|
|
434
|
-
onClick: (
|
|
431
|
+
(i(), q(P(d.href ? "a" : d.to ? "router-link" : "span"), {
|
|
432
|
+
href: d.href,
|
|
433
|
+
to: d.to,
|
|
434
|
+
onClick: (o) => a(d, u, o)
|
|
435
435
|
}, {
|
|
436
|
-
default:
|
|
437
|
-
|
|
438
|
-
item:
|
|
439
|
-
index:
|
|
436
|
+
default: F(() => [
|
|
437
|
+
C(l.$slots, "item", {
|
|
438
|
+
item: d,
|
|
439
|
+
index: u
|
|
440
440
|
}, () => [
|
|
441
|
-
|
|
441
|
+
w(m(d.text), 1)
|
|
442
442
|
])
|
|
443
443
|
]),
|
|
444
444
|
_: 2
|
|
@@ -447,7 +447,7 @@ const fe = /* @__PURE__ */ C({
|
|
|
447
447
|
])
|
|
448
448
|
], 8, Fe));
|
|
449
449
|
}
|
|
450
|
-
}), Ae = /* @__PURE__ */
|
|
450
|
+
}), Ae = /* @__PURE__ */ x({
|
|
451
451
|
__name: "VibeNav",
|
|
452
452
|
props: {
|
|
453
453
|
tabs: { type: Boolean, default: !1 },
|
|
@@ -461,36 +461,36 @@ const fe = /* @__PURE__ */ C({
|
|
|
461
461
|
emits: ["item-click", "component-error"],
|
|
462
462
|
setup(e, { emit: f }) {
|
|
463
463
|
const t = e, a = f, l = y(() => {
|
|
464
|
-
const
|
|
465
|
-
return t.tabs &&
|
|
466
|
-
}), r = (
|
|
467
|
-
const
|
|
468
|
-
return
|
|
469
|
-
},
|
|
470
|
-
|
|
464
|
+
const o = ["nav"];
|
|
465
|
+
return t.tabs && o.push("nav-tabs"), t.pills && o.push("nav-pills"), t.fill && o.push("nav-fill"), t.justified && o.push("nav-justified"), t.vertical && o.push("flex-column"), o.join(" ");
|
|
466
|
+
}), r = (o) => {
|
|
467
|
+
const n = ["nav-link"];
|
|
468
|
+
return o.active && n.push("active"), o.disabled && n.push("disabled"), n.join(" ");
|
|
469
|
+
}, d = (o) => o.href ? "a" : o.to ? "router-link" : "a", u = (o, n, c) => {
|
|
470
|
+
o.disabled || a("item-click", { item: o, index: n, event: c });
|
|
471
471
|
};
|
|
472
|
-
return (
|
|
472
|
+
return (o, n) => (i(), q(P(e.tag), {
|
|
473
473
|
class: g(l.value)
|
|
474
474
|
}, {
|
|
475
|
-
default:
|
|
476
|
-
(i(!0), s(
|
|
477
|
-
key:
|
|
475
|
+
default: F(() => [
|
|
476
|
+
(i(!0), s(M, null, A(e.items, (c, v) => (i(), s("li", {
|
|
477
|
+
key: v,
|
|
478
478
|
class: "nav-item"
|
|
479
479
|
}, [
|
|
480
|
-
(i(),
|
|
480
|
+
(i(), q(P(d(c)), {
|
|
481
481
|
class: g(r(c)),
|
|
482
482
|
href: c.href,
|
|
483
483
|
to: c.to,
|
|
484
484
|
"aria-current": c.active ? "page" : void 0,
|
|
485
485
|
"aria-disabled": c.disabled,
|
|
486
|
-
onClick: (p) =>
|
|
486
|
+
onClick: (p) => u(c, v, p)
|
|
487
487
|
}, {
|
|
488
|
-
default:
|
|
489
|
-
|
|
488
|
+
default: F(() => [
|
|
489
|
+
C(o.$slots, "item", {
|
|
490
490
|
item: c,
|
|
491
|
-
index:
|
|
491
|
+
index: v
|
|
492
492
|
}, () => [
|
|
493
|
-
|
|
493
|
+
w(m(c.text), 1)
|
|
494
494
|
])
|
|
495
495
|
]),
|
|
496
496
|
_: 2
|
|
@@ -500,10 +500,11 @@ const fe = /* @__PURE__ */ C({
|
|
|
500
500
|
_: 3
|
|
501
501
|
}, 8, ["class"]));
|
|
502
502
|
}
|
|
503
|
-
}), Ie = /* @__PURE__ */
|
|
503
|
+
}), Ie = /* @__PURE__ */ x({
|
|
504
504
|
__name: "VibeNavbar",
|
|
505
505
|
props: {
|
|
506
506
|
variant: { type: String, default: "light" },
|
|
507
|
+
theme: { type: String, default: void 0 },
|
|
507
508
|
expand: { type: [Boolean, String], default: "lg" },
|
|
508
509
|
container: { type: [Boolean, String], default: !0 },
|
|
509
510
|
position: { type: String, default: void 0 },
|
|
@@ -517,26 +518,31 @@ const fe = /* @__PURE__ */ C({
|
|
|
517
518
|
} });
|
|
518
519
|
const r = y(() => {
|
|
519
520
|
const o = ["navbar"];
|
|
520
|
-
return t.expand === !0 ? o.push("navbar-expand") : typeof t.expand == "string" && o.push(`navbar-expand-${t.expand}`),
|
|
521
|
-
}),
|
|
521
|
+
return t.expand === !0 ? o.push("navbar-expand") : typeof t.expand == "string" && o.push(`navbar-expand-${t.expand}`), o.push(`bg-${t.variant}`), t.position && o.push(t.position), o.join(" ");
|
|
522
|
+
}), d = y(() => {
|
|
523
|
+
if (t.theme) return t.theme;
|
|
524
|
+
if (t.variant === "dark") return "dark";
|
|
525
|
+
if (t.variant === "light") return "light";
|
|
526
|
+
}), u = y(() => {
|
|
522
527
|
if (t.container !== !1)
|
|
523
528
|
return t.container === !0 ? "container-fluid" : `container-${t.container}`;
|
|
524
529
|
});
|
|
525
|
-
return (o,
|
|
526
|
-
class: g(r.value)
|
|
530
|
+
return (o, n) => (i(), q(P(e.tag), {
|
|
531
|
+
class: g(r.value),
|
|
532
|
+
"data-bs-theme": d.value
|
|
527
533
|
}, {
|
|
528
|
-
default:
|
|
529
|
-
|
|
534
|
+
default: F(() => [
|
|
535
|
+
u.value ? (i(), s("div", {
|
|
530
536
|
key: 0,
|
|
531
|
-
class: g(
|
|
537
|
+
class: g(u.value)
|
|
532
538
|
}, [
|
|
533
|
-
|
|
534
|
-
], 2)) :
|
|
539
|
+
C(o.$slots, "default")
|
|
540
|
+
], 2)) : C(o.$slots, "default", { key: 1 })
|
|
535
541
|
]),
|
|
536
542
|
_: 3
|
|
537
|
-
}, 8, ["class"]));
|
|
543
|
+
}, 8, ["class", "data-bs-theme"]));
|
|
538
544
|
}
|
|
539
|
-
}), Oe = /* @__PURE__ */
|
|
545
|
+
}), Oe = /* @__PURE__ */ x({
|
|
540
546
|
__name: "VibeNavbarBrand",
|
|
541
547
|
props: {
|
|
542
548
|
href: { type: String, default: void 0 },
|
|
@@ -545,18 +551,18 @@ const fe = /* @__PURE__ */ C({
|
|
|
545
551
|
emits: ["component-error"],
|
|
546
552
|
setup(e, { emit: f }) {
|
|
547
553
|
const t = e, a = t.href ? "a" : t.to ? "router-link" : "span";
|
|
548
|
-
return (l, r) => (i(),
|
|
554
|
+
return (l, r) => (i(), q(P(re(a)), {
|
|
549
555
|
class: "navbar-brand",
|
|
550
556
|
href: e.href,
|
|
551
557
|
to: e.to
|
|
552
558
|
}, {
|
|
553
|
-
default:
|
|
554
|
-
|
|
559
|
+
default: F(() => [
|
|
560
|
+
C(l.$slots, "default")
|
|
555
561
|
]),
|
|
556
562
|
_: 3
|
|
557
563
|
}, 8, ["href", "to"]));
|
|
558
564
|
}
|
|
559
|
-
}),
|
|
565
|
+
}), De = ["aria-controls", "aria-expanded", "aria-label"], Ee = /* @__PURE__ */ x({
|
|
560
566
|
__name: "VibeNavbarToggle",
|
|
561
567
|
props: {
|
|
562
568
|
target: { type: String, required: !0 },
|
|
@@ -567,61 +573,119 @@ const fe = /* @__PURE__ */ C({
|
|
|
567
573
|
const t = e, a = Z("vibeNavbarCollapse", null), l = y(() => (a == null ? void 0 : a.collapseStates[t.target]) ?? !1), r = () => {
|
|
568
574
|
a && a.toggleCollapse(t.target);
|
|
569
575
|
};
|
|
570
|
-
return (
|
|
576
|
+
return (d, u) => (i(), s("button", {
|
|
571
577
|
class: "navbar-toggler",
|
|
572
578
|
type: "button",
|
|
573
579
|
"aria-controls": e.target,
|
|
574
580
|
"aria-expanded": l.value,
|
|
575
581
|
"aria-label": e.ariaLabel,
|
|
576
582
|
onClick: r
|
|
577
|
-
}, [...
|
|
583
|
+
}, [...u[0] || (u[0] = [
|
|
578
584
|
h("span", { class: "navbar-toggler-icon" }, null, -1)
|
|
579
|
-
])], 8,
|
|
585
|
+
])], 8, De));
|
|
580
586
|
}
|
|
581
|
-
}), Re = /* @__PURE__ */
|
|
587
|
+
}), Re = { class: "dropdown-menu" }, Xe = { key: 0 }, Ye = { key: 1 }, Ge = { class: "dropdown-header" }, He = { key: 2 }, Ke = /* @__PURE__ */ x({
|
|
582
588
|
__name: "VibeNavbarNav",
|
|
583
589
|
props: {
|
|
584
590
|
tag: { type: String, default: "ul" },
|
|
585
591
|
items: { type: Array, default: void 0 }
|
|
586
592
|
},
|
|
587
|
-
emits: ["item-click", "component-error"],
|
|
593
|
+
emits: ["item-click", "dropdown-item-click", "component-error"],
|
|
588
594
|
setup(e, { emit: f }) {
|
|
589
595
|
const t = f, a = (n) => {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
596
|
+
var v;
|
|
597
|
+
const c = ["nav-item"];
|
|
598
|
+
return (v = n.children) != null && v.length && c.push("dropdown"), c.join(" ");
|
|
599
|
+
}, l = (n) => {
|
|
600
|
+
var v;
|
|
601
|
+
const c = ["nav-link"];
|
|
602
|
+
return n.active && c.push("active"), n.disabled && c.push("disabled"), (v = n.children) != null && v.length && c.push("dropdown-toggle"), c.join(" ");
|
|
603
|
+
}, r = (n) => n.href ? "a" : n.to ? "router-link" : "a", d = (n) => {
|
|
604
|
+
const c = ["dropdown-item"];
|
|
605
|
+
return n.active && c.push("active"), n.disabled && c.push("disabled"), c.join(" ");
|
|
606
|
+
}, u = (n, c, v) => {
|
|
607
|
+
n.disabled || t("item-click", { item: n, index: c, event: v });
|
|
608
|
+
}, o = (n, c, v, p, B) => {
|
|
609
|
+
!v.disabled && !v.divider && !v.header && t("dropdown-item-click", { item: n, itemIndex: c, child: v, childIndex: p, event: B });
|
|
594
610
|
};
|
|
595
|
-
return (n,
|
|
596
|
-
default:
|
|
597
|
-
e.items && e.items.length > 0 ? (i(!0), s(
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
item
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
611
|
+
return (n, c) => (i(), q(P(e.tag), { class: "navbar-nav" }, {
|
|
612
|
+
default: F(() => [
|
|
613
|
+
e.items && e.items.length > 0 ? (i(!0), s(M, { key: 0 }, A(e.items, (v, p) => {
|
|
614
|
+
var B;
|
|
615
|
+
return i(), s("li", {
|
|
616
|
+
key: p,
|
|
617
|
+
class: g(a(v))
|
|
618
|
+
}, [
|
|
619
|
+
(B = v.children) != null && B.length ? (i(), s(M, { key: 0 }, [
|
|
620
|
+
h("a", {
|
|
621
|
+
class: g(l(v)),
|
|
622
|
+
href: "#",
|
|
623
|
+
role: "button",
|
|
624
|
+
"data-bs-toggle": "dropdown",
|
|
625
|
+
"aria-expanded": "false"
|
|
626
|
+
}, [
|
|
627
|
+
C(n.$slots, "item", {
|
|
628
|
+
item: v,
|
|
629
|
+
index: p
|
|
630
|
+
}, () => [
|
|
631
|
+
w(m(v.text), 1)
|
|
632
|
+
])
|
|
633
|
+
], 2),
|
|
634
|
+
h("ul", Re, [
|
|
635
|
+
(i(!0), s(M, null, A(v.children, ($, L) => (i(), s(M, { key: L }, [
|
|
636
|
+
$.divider ? (i(), s("li", Xe, [...c[0] || (c[0] = [
|
|
637
|
+
h("hr", { class: "dropdown-divider" }, null, -1)
|
|
638
|
+
])])) : $.header ? (i(), s("li", Ye, [
|
|
639
|
+
h("h6", Ge, m($.text), 1)
|
|
640
|
+
])) : (i(), s("li", He, [
|
|
641
|
+
(i(), q(P($.href ? "a" : $.to ? "router-link" : "button"), {
|
|
642
|
+
class: g(d($)),
|
|
643
|
+
href: $.href,
|
|
644
|
+
to: $.to,
|
|
645
|
+
type: !$.href && !$.to ? "button" : void 0,
|
|
646
|
+
onClick: (z) => o(v, p, $, L, z)
|
|
647
|
+
}, {
|
|
648
|
+
default: F(() => [
|
|
649
|
+
C(n.$slots, "dropdown-item", {
|
|
650
|
+
item: v,
|
|
651
|
+
child: $,
|
|
652
|
+
index: p,
|
|
653
|
+
childIndex: L
|
|
654
|
+
}, () => [
|
|
655
|
+
w(m($.text), 1)
|
|
656
|
+
])
|
|
657
|
+
]),
|
|
658
|
+
_: 2
|
|
659
|
+
}, 1032, ["class", "href", "to", "type", "onClick"]))
|
|
660
|
+
]))
|
|
661
|
+
], 64))), 128))
|
|
615
662
|
])
|
|
616
|
-
]),
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
663
|
+
], 64)) : (i(), q(P(r(v)), {
|
|
664
|
+
key: 1,
|
|
665
|
+
class: g(l(v)),
|
|
666
|
+
href: v.href,
|
|
667
|
+
to: v.to,
|
|
668
|
+
"aria-current": v.active ? "page" : void 0,
|
|
669
|
+
"aria-disabled": v.disabled,
|
|
670
|
+
onClick: ($) => u(v, p, $)
|
|
671
|
+
}, {
|
|
672
|
+
default: F(() => [
|
|
673
|
+
C(n.$slots, "item", {
|
|
674
|
+
item: v,
|
|
675
|
+
index: p
|
|
676
|
+
}, () => [
|
|
677
|
+
w(m(v.text), 1)
|
|
678
|
+
])
|
|
679
|
+
]),
|
|
680
|
+
_: 2
|
|
681
|
+
}, 1032, ["class", "href", "to", "aria-current", "aria-disabled", "onClick"]))
|
|
682
|
+
], 2);
|
|
683
|
+
}), 128)) : C(n.$slots, "default", { key: 1 })
|
|
620
684
|
]),
|
|
621
685
|
_: 3
|
|
622
686
|
}));
|
|
623
687
|
}
|
|
624
|
-
}),
|
|
688
|
+
}), Ue = ["aria-label"], Qe = ["disabled", "aria-disabled"], We = ["aria-current", "onClick"], Je = ["disabled", "aria-disabled"], Ze = /* @__PURE__ */ x({
|
|
625
689
|
__name: "VibePagination",
|
|
626
690
|
props: {
|
|
627
691
|
size: { type: String, default: void 0 },
|
|
@@ -635,69 +699,69 @@ const fe = /* @__PURE__ */ C({
|
|
|
635
699
|
emits: ["update:currentPage", "page-click", "component-error"],
|
|
636
700
|
setup(e, { emit: f }) {
|
|
637
701
|
const t = e, a = f, l = y(() => {
|
|
638
|
-
const
|
|
639
|
-
return t.size &&
|
|
640
|
-
}), r = y(() => Array.from({ length: t.totalPages }, (
|
|
641
|
-
|
|
642
|
-
},
|
|
643
|
-
return (
|
|
702
|
+
const n = ["pagination"];
|
|
703
|
+
return t.size && n.push(`pagination-${t.size}`), n.join(" ");
|
|
704
|
+
}), r = y(() => Array.from({ length: t.totalPages }, (n, c) => c + 1)), d = (n) => {
|
|
705
|
+
n >= 1 && n <= t.totalPages && (a("update:currentPage", n), a("page-click", n));
|
|
706
|
+
}, u = y(() => t.currentPage === 1), o = y(() => t.currentPage === t.totalPages);
|
|
707
|
+
return (n, c) => (i(), s("nav", { "aria-label": e.ariaLabel }, [
|
|
644
708
|
h("ul", {
|
|
645
709
|
class: g(l.value)
|
|
646
710
|
}, [
|
|
647
711
|
e.showPrevNext ? (i(), s("li", {
|
|
648
712
|
key: 0,
|
|
649
|
-
class: g(["page-item", { disabled:
|
|
713
|
+
class: g(["page-item", { disabled: u.value }])
|
|
650
714
|
}, [
|
|
651
715
|
h("button", {
|
|
652
716
|
class: "page-link",
|
|
653
717
|
type: "button",
|
|
654
|
-
disabled:
|
|
655
|
-
"aria-disabled":
|
|
656
|
-
onClick: c[0] || (c[0] = (
|
|
718
|
+
disabled: u.value,
|
|
719
|
+
"aria-disabled": u.value,
|
|
720
|
+
onClick: c[0] || (c[0] = (v) => d(e.currentPage - 1))
|
|
657
721
|
}, [
|
|
658
|
-
|
|
659
|
-
|
|
722
|
+
C(n.$slots, "prev", { disabled: u.value }, () => [
|
|
723
|
+
w(m(e.prevText), 1)
|
|
660
724
|
])
|
|
661
|
-
], 8,
|
|
662
|
-
], 2)) :
|
|
663
|
-
(i(!0), s(
|
|
664
|
-
key:
|
|
665
|
-
class: g(["page-item", { active:
|
|
725
|
+
], 8, Qe)
|
|
726
|
+
], 2)) : b("", !0),
|
|
727
|
+
(i(!0), s(M, null, A(r.value, (v) => (i(), s("li", {
|
|
728
|
+
key: v,
|
|
729
|
+
class: g(["page-item", { active: v === e.currentPage }])
|
|
666
730
|
}, [
|
|
667
731
|
h("button", {
|
|
668
732
|
class: "page-link",
|
|
669
733
|
type: "button",
|
|
670
|
-
"aria-current":
|
|
671
|
-
onClick: (p) =>
|
|
734
|
+
"aria-current": v === e.currentPage ? "page" : void 0,
|
|
735
|
+
onClick: (p) => d(v)
|
|
672
736
|
}, [
|
|
673
|
-
|
|
674
|
-
page:
|
|
675
|
-
active:
|
|
737
|
+
C(n.$slots, "page", {
|
|
738
|
+
page: v,
|
|
739
|
+
active: v === e.currentPage
|
|
676
740
|
}, () => [
|
|
677
|
-
|
|
741
|
+
w(m(v), 1)
|
|
678
742
|
])
|
|
679
|
-
], 8,
|
|
743
|
+
], 8, We)
|
|
680
744
|
], 2))), 128)),
|
|
681
745
|
e.showPrevNext ? (i(), s("li", {
|
|
682
746
|
key: 1,
|
|
683
|
-
class: g(["page-item", { disabled:
|
|
747
|
+
class: g(["page-item", { disabled: o.value }])
|
|
684
748
|
}, [
|
|
685
749
|
h("button", {
|
|
686
750
|
class: "page-link",
|
|
687
751
|
type: "button",
|
|
688
|
-
disabled:
|
|
689
|
-
"aria-disabled":
|
|
690
|
-
onClick: c[1] || (c[1] = (
|
|
752
|
+
disabled: o.value,
|
|
753
|
+
"aria-disabled": o.value,
|
|
754
|
+
onClick: c[1] || (c[1] = (v) => d(e.currentPage + 1))
|
|
691
755
|
}, [
|
|
692
|
-
|
|
693
|
-
|
|
756
|
+
C(n.$slots, "next", { disabled: o.value }, () => [
|
|
757
|
+
w(m(e.nextText), 1)
|
|
694
758
|
])
|
|
695
|
-
], 8,
|
|
696
|
-
], 2)) :
|
|
759
|
+
], 8, Je)
|
|
760
|
+
], 2)) : b("", !0)
|
|
697
761
|
], 2)
|
|
698
|
-
], 8,
|
|
762
|
+
], 8, Ue));
|
|
699
763
|
}
|
|
700
|
-
}),
|
|
764
|
+
}), _e = ["id", "aria-labelledby"], et = /* @__PURE__ */ x({
|
|
701
765
|
__name: "VibeTabContent",
|
|
702
766
|
props: {
|
|
703
767
|
id: { type: String, default: void 0 },
|
|
@@ -711,31 +775,31 @@ const fe = /* @__PURE__ */ C({
|
|
|
711
775
|
const r = ["tab-pane"];
|
|
712
776
|
return t.fade && r.push("fade"), l.active && r.push("show", "active"), r.join(" ");
|
|
713
777
|
};
|
|
714
|
-
return (l, r) => (i(),
|
|
778
|
+
return (l, r) => (i(), q(P(e.tag), {
|
|
715
779
|
id: e.id,
|
|
716
780
|
class: "tab-content"
|
|
717
781
|
}, {
|
|
718
|
-
default:
|
|
719
|
-
(i(!0), s(
|
|
720
|
-
key:
|
|
721
|
-
id:
|
|
722
|
-
class: g(a(
|
|
782
|
+
default: F(() => [
|
|
783
|
+
(i(!0), s(M, null, A(e.panes, (d, u) => (i(), s("div", {
|
|
784
|
+
key: d.id,
|
|
785
|
+
id: d.id,
|
|
786
|
+
class: g(a(d)),
|
|
723
787
|
role: "tabpanel",
|
|
724
|
-
"aria-labelledby": `${
|
|
788
|
+
"aria-labelledby": `${d.id}-tab`,
|
|
725
789
|
tabindex: "0"
|
|
726
790
|
}, [
|
|
727
|
-
|
|
728
|
-
pane:
|
|
729
|
-
index:
|
|
791
|
+
C(l.$slots, "pane", {
|
|
792
|
+
pane: d,
|
|
793
|
+
index: u
|
|
730
794
|
}, () => [
|
|
731
|
-
|
|
795
|
+
w(m(d.content), 1)
|
|
732
796
|
])
|
|
733
|
-
], 10,
|
|
797
|
+
], 10, _e))), 128))
|
|
734
798
|
]),
|
|
735
799
|
_: 3
|
|
736
800
|
}, 8, ["id"]));
|
|
737
801
|
}
|
|
738
|
-
}),
|
|
802
|
+
}), tt = /* @__PURE__ */ x({
|
|
739
803
|
__name: "VibeListGroup",
|
|
740
804
|
props: {
|
|
741
805
|
flush: { type: Boolean, default: !1 },
|
|
@@ -747,33 +811,33 @@ const fe = /* @__PURE__ */ C({
|
|
|
747
811
|
emits: ["item-click", "component-error"],
|
|
748
812
|
setup(e, { emit: f }) {
|
|
749
813
|
const t = e, a = f, l = y(() => {
|
|
750
|
-
const
|
|
751
|
-
return t.flush &&
|
|
752
|
-
}), r = (
|
|
753
|
-
const
|
|
754
|
-
return
|
|
755
|
-
},
|
|
756
|
-
|
|
814
|
+
const o = ["list-group"];
|
|
815
|
+
return t.flush && o.push("list-group-flush"), t.numbered && o.push("list-group-numbered"), t.horizontal === !0 ? o.push("list-group-horizontal") : typeof t.horizontal == "string" && o.push(`list-group-horizontal-${t.horizontal}`), o.join(" ");
|
|
816
|
+
}), r = (o) => o.href ? "a" : o.to ? "router-link" : "li", d = (o) => {
|
|
817
|
+
const n = ["list-group-item"];
|
|
818
|
+
return o.active && n.push("active"), o.disabled && n.push("disabled"), o.variant && n.push(`list-group-item-${o.variant}`), n.join(" ");
|
|
819
|
+
}, u = (o, n, c) => {
|
|
820
|
+
o.disabled || a("item-click", { item: o, index: n, event: c });
|
|
757
821
|
};
|
|
758
|
-
return (
|
|
822
|
+
return (o, n) => (i(), q(P(e.tag), {
|
|
759
823
|
class: g(l.value)
|
|
760
824
|
}, {
|
|
761
|
-
default:
|
|
762
|
-
(i(!0), s(
|
|
763
|
-
key:
|
|
764
|
-
class: g(
|
|
825
|
+
default: F(() => [
|
|
826
|
+
(i(!0), s(M, null, A(e.items, (c, v) => (i(), q(P(r(c)), {
|
|
827
|
+
key: v,
|
|
828
|
+
class: g(d(c)),
|
|
765
829
|
href: c.href,
|
|
766
830
|
to: c.to,
|
|
767
831
|
"aria-disabled": c.disabled,
|
|
768
832
|
"aria-current": c.active,
|
|
769
|
-
onClick: (p) =>
|
|
833
|
+
onClick: (p) => u(c, v, p)
|
|
770
834
|
}, {
|
|
771
|
-
default:
|
|
772
|
-
|
|
835
|
+
default: F(() => [
|
|
836
|
+
C(o.$slots, "item", {
|
|
773
837
|
item: c,
|
|
774
|
-
index:
|
|
838
|
+
index: v
|
|
775
839
|
}, () => [
|
|
776
|
-
|
|
840
|
+
w(m(c.text), 1)
|
|
777
841
|
])
|
|
778
842
|
]),
|
|
779
843
|
_: 2
|
|
@@ -782,7 +846,7 @@ const fe = /* @__PURE__ */ C({
|
|
|
782
846
|
_: 3
|
|
783
847
|
}, 8, ["class"]));
|
|
784
848
|
}
|
|
785
|
-
}),
|
|
849
|
+
}), at = ["aria-valuenow", "aria-valuemax"], lt = /* @__PURE__ */ x({
|
|
786
850
|
__name: "VibeProgress",
|
|
787
851
|
props: {
|
|
788
852
|
height: { type: String, default: void 0 },
|
|
@@ -793,36 +857,36 @@ const fe = /* @__PURE__ */ C({
|
|
|
793
857
|
const t = e, a = y(() => {
|
|
794
858
|
if (t.height)
|
|
795
859
|
return { height: t.height };
|
|
796
|
-
}), l = (
|
|
797
|
-
const
|
|
798
|
-
return
|
|
799
|
-
}, r = (
|
|
800
|
-
const
|
|
801
|
-
return { width: `${Math.min(100, Math.max(0,
|
|
802
|
-
},
|
|
803
|
-
return (
|
|
860
|
+
}), l = (u) => {
|
|
861
|
+
const o = ["progress-bar"];
|
|
862
|
+
return u.variant && o.push(`bg-${u.variant}`), (u.striped || u.animated) && o.push("progress-bar-striped"), u.animated && o.push("progress-bar-animated"), o.join(" ");
|
|
863
|
+
}, r = (u) => {
|
|
864
|
+
const o = u.max || 100;
|
|
865
|
+
return { width: `${Math.min(100, Math.max(0, u.value / o * 100))}%` };
|
|
866
|
+
}, d = (u) => u.label ? u.label : u.showValue ? `${u.value}%` : "";
|
|
867
|
+
return (u, o) => (i(), s("div", {
|
|
804
868
|
class: "progress",
|
|
805
869
|
style: D(a.value)
|
|
806
870
|
}, [
|
|
807
|
-
(i(!0), s(
|
|
871
|
+
(i(!0), s(M, null, A(e.bars, (n, c) => (i(), s("div", {
|
|
808
872
|
key: c,
|
|
809
|
-
class: g(l(
|
|
810
|
-
style: D(r(
|
|
873
|
+
class: g(l(n)),
|
|
874
|
+
style: D(r(n)),
|
|
811
875
|
role: "progressbar",
|
|
812
|
-
"aria-valuenow":
|
|
876
|
+
"aria-valuenow": n.value,
|
|
813
877
|
"aria-valuemin": 0,
|
|
814
|
-
"aria-valuemax":
|
|
878
|
+
"aria-valuemax": n.max || 100
|
|
815
879
|
}, [
|
|
816
|
-
|
|
817
|
-
bar:
|
|
880
|
+
C(u.$slots, "label", {
|
|
881
|
+
bar: n,
|
|
818
882
|
index: c
|
|
819
883
|
}, () => [
|
|
820
|
-
|
|
884
|
+
w(m(d(n)), 1)
|
|
821
885
|
])
|
|
822
|
-
], 14,
|
|
886
|
+
], 14, at))), 128))
|
|
823
887
|
], 4));
|
|
824
888
|
}
|
|
825
|
-
}),
|
|
889
|
+
}), it = ["id"], st = { class: "accordion-header" }, nt = ["data-bs-target", "aria-expanded", "aria-controls", "onClick"], ot = ["id", "data-bs-parent"], dt = { class: "accordion-body" }, rt = /* @__PURE__ */ x({
|
|
826
890
|
__name: "VibeAccordion",
|
|
827
891
|
props: {
|
|
828
892
|
id: { type: String, required: !0 },
|
|
@@ -838,46 +902,46 @@ const fe = /* @__PURE__ */ C({
|
|
|
838
902
|
id: e.id,
|
|
839
903
|
class: g(["accordion", { "accordion-flush": e.flush }])
|
|
840
904
|
}, [
|
|
841
|
-
(i(!0), s(
|
|
842
|
-
key:
|
|
905
|
+
(i(!0), s(M, null, A(e.items, (d, u) => (i(), s("div", {
|
|
906
|
+
key: d.id,
|
|
843
907
|
class: "accordion-item"
|
|
844
908
|
}, [
|
|
845
|
-
h("h2",
|
|
909
|
+
h("h2", st, [
|
|
846
910
|
h("button", {
|
|
847
|
-
class: g(["accordion-button", { collapsed: !
|
|
911
|
+
class: g(["accordion-button", { collapsed: !d.show }]),
|
|
848
912
|
type: "button",
|
|
849
913
|
"data-bs-toggle": "collapse",
|
|
850
|
-
"data-bs-target": `#${
|
|
851
|
-
"aria-expanded":
|
|
852
|
-
"aria-controls":
|
|
853
|
-
onClick: (
|
|
914
|
+
"data-bs-target": `#${d.id}`,
|
|
915
|
+
"aria-expanded": d.show,
|
|
916
|
+
"aria-controls": d.id,
|
|
917
|
+
onClick: (o) => a(d, u)
|
|
854
918
|
}, [
|
|
855
|
-
|
|
856
|
-
item:
|
|
857
|
-
index:
|
|
919
|
+
C(l.$slots, "title", {
|
|
920
|
+
item: d,
|
|
921
|
+
index: u
|
|
858
922
|
}, () => [
|
|
859
|
-
|
|
923
|
+
w(m(d.title), 1)
|
|
860
924
|
])
|
|
861
|
-
], 10,
|
|
925
|
+
], 10, nt)
|
|
862
926
|
]),
|
|
863
927
|
h("div", {
|
|
864
|
-
id:
|
|
865
|
-
class: g(["accordion-collapse", "collapse", { show:
|
|
928
|
+
id: d.id,
|
|
929
|
+
class: g(["accordion-collapse", "collapse", { show: d.show }]),
|
|
866
930
|
"data-bs-parent": `#${e.id}`
|
|
867
931
|
}, [
|
|
868
|
-
h("div",
|
|
869
|
-
|
|
870
|
-
item:
|
|
871
|
-
index:
|
|
932
|
+
h("div", dt, [
|
|
933
|
+
C(l.$slots, "content", {
|
|
934
|
+
item: d,
|
|
935
|
+
index: u
|
|
872
936
|
}, () => [
|
|
873
|
-
|
|
937
|
+
w(m(d.content), 1)
|
|
874
938
|
])
|
|
875
939
|
])
|
|
876
|
-
], 10,
|
|
940
|
+
], 10, ot)
|
|
877
941
|
]))), 128))
|
|
878
|
-
], 10,
|
|
942
|
+
], 10, it));
|
|
879
943
|
}
|
|
880
|
-
}),
|
|
944
|
+
}), ut = /* @__PURE__ */ x({
|
|
881
945
|
__name: "VibeCollapse",
|
|
882
946
|
props: {
|
|
883
947
|
id: { type: String, required: !0 },
|
|
@@ -889,24 +953,24 @@ const fe = /* @__PURE__ */ C({
|
|
|
889
953
|
emits: ["update:modelValue", "show", "shown", "hide", "hidden", "component-error"],
|
|
890
954
|
setup(e, { emit: f }) {
|
|
891
955
|
const t = e, a = Z("vibeNavbarCollapse", null), l = T(t.modelValue);
|
|
892
|
-
E(() => t.modelValue, (
|
|
893
|
-
l.value =
|
|
956
|
+
E(() => t.modelValue, (u) => {
|
|
957
|
+
l.value = u;
|
|
894
958
|
});
|
|
895
|
-
const r = y(() => a && t.id in a.collapseStates ? a.collapseStates[t.id] : l.value),
|
|
896
|
-
const
|
|
897
|
-
return t.isNav &&
|
|
959
|
+
const r = y(() => a && t.id in a.collapseStates ? a.collapseStates[t.id] : l.value), d = y(() => {
|
|
960
|
+
const u = ["collapse"];
|
|
961
|
+
return t.isNav && u.push("navbar-collapse"), t.horizontal && u.push("collapse-horizontal"), r.value && u.push("show"), u.join(" ");
|
|
898
962
|
});
|
|
899
|
-
return (
|
|
963
|
+
return (u, o) => (i(), q(P(e.tag), {
|
|
900
964
|
id: e.id,
|
|
901
|
-
class: g(
|
|
965
|
+
class: g(d.value)
|
|
902
966
|
}, {
|
|
903
|
-
default:
|
|
904
|
-
|
|
967
|
+
default: F(() => [
|
|
968
|
+
C(u.$slots, "default")
|
|
905
969
|
]),
|
|
906
970
|
_: 3
|
|
907
971
|
}, 8, ["id", "class"]));
|
|
908
972
|
}
|
|
909
|
-
}),
|
|
973
|
+
}), ct = ["id"], ft = ["aria-labelledby"], vt = { key: 0 }, bt = { key: 1 }, mt = { class: "dropdown-header" }, ht = { key: 2 }, yt = /* @__PURE__ */ x({
|
|
910
974
|
__name: "VibeDropdown",
|
|
911
975
|
props: {
|
|
912
976
|
id: { type: String, required: !0 },
|
|
@@ -921,18 +985,18 @@ const fe = /* @__PURE__ */ C({
|
|
|
921
985
|
emits: ["item-click", "component-error"],
|
|
922
986
|
setup(e, { emit: f }) {
|
|
923
987
|
const t = e, a = f, l = y(() => t.direction === "up" ? "dropup" : t.direction === "end" ? "dropend" : t.direction === "start" ? "dropstart" : "dropdown"), r = y(() => {
|
|
924
|
-
const
|
|
925
|
-
return t.size &&
|
|
926
|
-
}),
|
|
927
|
-
const
|
|
928
|
-
return t.menuEnd &&
|
|
929
|
-
}),
|
|
988
|
+
const n = ["btn", `btn-${t.variant}`];
|
|
989
|
+
return t.size && n.push(`btn-${t.size}`), n.join(" ");
|
|
990
|
+
}), d = y(() => {
|
|
991
|
+
const n = ["dropdown-menu"];
|
|
992
|
+
return t.menuEnd && n.push("dropdown-menu-end"), n.join(" ");
|
|
993
|
+
}), u = (n) => {
|
|
930
994
|
const c = ["dropdown-item"];
|
|
931
|
-
return
|
|
932
|
-
},
|
|
933
|
-
!
|
|
995
|
+
return n.active && c.push("active"), n.disabled && c.push("disabled"), c.join(" ");
|
|
996
|
+
}, o = (n, c, v) => {
|
|
997
|
+
!n.disabled && !n.divider && !n.header && a("item-click", { item: n, index: c, event: v });
|
|
934
998
|
};
|
|
935
|
-
return (
|
|
999
|
+
return (n, c) => (i(), s("div", {
|
|
936
1000
|
class: g(l.value)
|
|
937
1001
|
}, [
|
|
938
1002
|
h("button", {
|
|
@@ -942,57 +1006,57 @@ const fe = /* @__PURE__ */ C({
|
|
|
942
1006
|
"data-bs-toggle": "dropdown",
|
|
943
1007
|
"aria-expanded": "false"
|
|
944
1008
|
}, [
|
|
945
|
-
|
|
946
|
-
|
|
1009
|
+
C(n.$slots, "button", {}, () => [
|
|
1010
|
+
w(m(e.text), 1)
|
|
947
1011
|
])
|
|
948
|
-
], 10,
|
|
1012
|
+
], 10, ct),
|
|
949
1013
|
h("ul", {
|
|
950
|
-
class: g(
|
|
1014
|
+
class: g(d.value),
|
|
951
1015
|
"aria-labelledby": e.id
|
|
952
1016
|
}, [
|
|
953
|
-
(i(!0), s(
|
|
954
|
-
|
|
1017
|
+
(i(!0), s(M, null, A(e.items, (v, p) => (i(), s(M, { key: p }, [
|
|
1018
|
+
v.divider ? (i(), s("li", vt, [...c[0] || (c[0] = [
|
|
955
1019
|
h("hr", { class: "dropdown-divider" }, null, -1)
|
|
956
|
-
])])) :
|
|
957
|
-
h("h6",
|
|
958
|
-
|
|
959
|
-
item:
|
|
1020
|
+
])])) : v.header ? (i(), s("li", bt, [
|
|
1021
|
+
h("h6", mt, [
|
|
1022
|
+
C(n.$slots, "header", {
|
|
1023
|
+
item: v,
|
|
960
1024
|
index: p
|
|
961
1025
|
}, () => [
|
|
962
|
-
|
|
1026
|
+
w(m(v.text), 1)
|
|
963
1027
|
])
|
|
964
1028
|
])
|
|
965
|
-
])) : (i(), s("li",
|
|
966
|
-
(i(),
|
|
967
|
-
class: g(
|
|
968
|
-
href:
|
|
969
|
-
to:
|
|
970
|
-
type: !
|
|
971
|
-
disabled:
|
|
972
|
-
onClick: (
|
|
1029
|
+
])) : (i(), s("li", ht, [
|
|
1030
|
+
(i(), q(P(v.href ? "a" : v.to ? "router-link" : "button"), {
|
|
1031
|
+
class: g(u(v)),
|
|
1032
|
+
href: v.href,
|
|
1033
|
+
to: v.to,
|
|
1034
|
+
type: !v.href && !v.to ? "button" : void 0,
|
|
1035
|
+
disabled: v.disabled,
|
|
1036
|
+
onClick: (B) => o(v, p, B)
|
|
973
1037
|
}, {
|
|
974
|
-
default:
|
|
975
|
-
|
|
976
|
-
item:
|
|
1038
|
+
default: F(() => [
|
|
1039
|
+
C(n.$slots, "item", {
|
|
1040
|
+
item: v,
|
|
977
1041
|
index: p
|
|
978
1042
|
}, () => [
|
|
979
|
-
|
|
1043
|
+
w(m(v.text), 1)
|
|
980
1044
|
])
|
|
981
1045
|
]),
|
|
982
1046
|
_: 2
|
|
983
1047
|
}, 1032, ["class", "href", "to", "type", "disabled", "onClick"]))
|
|
984
1048
|
]))
|
|
985
1049
|
], 64))), 128))
|
|
986
|
-
], 10,
|
|
1050
|
+
], 10, ft)
|
|
987
1051
|
], 2));
|
|
988
1052
|
}
|
|
989
|
-
}),
|
|
1053
|
+
}), gt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs-keyboard"], pt = { class: "modal-content" }, kt = {
|
|
990
1054
|
key: 0,
|
|
991
1055
|
class: "modal-header"
|
|
992
|
-
},
|
|
1056
|
+
}, $t = ["id"], St = { class: "modal-body" }, Vt = {
|
|
993
1057
|
key: 1,
|
|
994
1058
|
class: "modal-footer"
|
|
995
|
-
},
|
|
1059
|
+
}, Ct = /* @__PURE__ */ x({
|
|
996
1060
|
__name: "VibeModal",
|
|
997
1061
|
props: {
|
|
998
1062
|
id: { type: String, required: !0 },
|
|
@@ -1008,70 +1072,71 @@ const fe = /* @__PURE__ */ C({
|
|
|
1008
1072
|
},
|
|
1009
1073
|
emits: ["update:modelValue", "show", "shown", "hide", "hidden", "component-error"],
|
|
1010
1074
|
setup(e, { emit: f }) {
|
|
1011
|
-
const t = e, a = f, l = T(null), r = T(null),
|
|
1075
|
+
const t = e, a = f, l = T(null), r = T(null), d = T(!1), u = y(() => {
|
|
1012
1076
|
const p = ["modal-dialog"];
|
|
1013
1077
|
return t.size && p.push(`modal-${t.size}`), t.centered && p.push("modal-dialog-centered"), t.scrollable && p.push("modal-dialog-scrollable"), t.fullscreen === !0 ? p.push("modal-fullscreen") : typeof t.fullscreen == "string" && p.push(`modal-fullscreen-${t.fullscreen}-down`), p.join(" ");
|
|
1014
|
-
}),
|
|
1015
|
-
|
|
1016
|
-
},
|
|
1078
|
+
}), o = () => {
|
|
1079
|
+
d.value = !0, a("show");
|
|
1080
|
+
}, n = () => {
|
|
1017
1081
|
a("shown"), a("update:modelValue", !0);
|
|
1018
1082
|
}, c = () => {
|
|
1019
1083
|
a("hide");
|
|
1020
|
-
},
|
|
1021
|
-
|
|
1084
|
+
}, v = () => {
|
|
1085
|
+
d.value = !1, a("hidden"), a("update:modelValue", !1);
|
|
1022
1086
|
};
|
|
1023
1087
|
return G(async () => {
|
|
1024
1088
|
if (l.value)
|
|
1025
1089
|
try {
|
|
1026
|
-
const
|
|
1027
|
-
r.value = new
|
|
1090
|
+
const B = (await import("bootstrap")).Modal;
|
|
1091
|
+
r.value = new B(l.value, {
|
|
1028
1092
|
backdrop: t.staticBackdrop ? "static" : !0,
|
|
1029
1093
|
keyboard: !t.staticBackdrop
|
|
1030
|
-
}), l.value.addEventListener("show.bs.modal",
|
|
1094
|
+
}), l.value.addEventListener("show.bs.modal", o), l.value.addEventListener("shown.bs.modal", n), l.value.addEventListener("hide.bs.modal", c), l.value.addEventListener("hidden.bs.modal", v), t.modelValue && r.value.show();
|
|
1031
1095
|
} catch {
|
|
1032
1096
|
a("component-error", "Bootstrap JS not loaded. Modal will use data attributes only.");
|
|
1033
1097
|
}
|
|
1034
1098
|
}), H(() => {
|
|
1035
|
-
l.value && (l.value.removeEventListener("show.bs.modal",
|
|
1099
|
+
l.value && (l.value.removeEventListener("show.bs.modal", o), l.value.removeEventListener("shown.bs.modal", n), l.value.removeEventListener("hide.bs.modal", c), l.value.removeEventListener("hidden.bs.modal", v)), r.value && (r.value.dispose(), r.value = null);
|
|
1036
1100
|
}), E(() => t.modelValue, (p) => {
|
|
1037
|
-
r.value && (p && !
|
|
1038
|
-
}), (p,
|
|
1101
|
+
r.value && (p && !d.value ? r.value.show() : !p && d.value && r.value.hide());
|
|
1102
|
+
}), (p, B) => (i(), s("div", {
|
|
1039
1103
|
ref_key: "modalRef",
|
|
1040
1104
|
ref: l,
|
|
1041
1105
|
id: e.id,
|
|
1042
|
-
class: "modal fade",
|
|
1106
|
+
class: g(["modal fade", { show: d.value }]),
|
|
1107
|
+
style: D(d.value ? { display: "block" } : {}),
|
|
1043
1108
|
tabindex: "-1",
|
|
1044
1109
|
"aria-labelledby": `${e.id}-label`,
|
|
1045
|
-
"aria-hidden": !
|
|
1110
|
+
"aria-hidden": !d.value,
|
|
1046
1111
|
"data-bs-backdrop": e.staticBackdrop ? "static" : void 0,
|
|
1047
1112
|
"data-bs-keyboard": !e.staticBackdrop
|
|
1048
1113
|
}, [
|
|
1049
1114
|
h("div", {
|
|
1050
|
-
class: g(
|
|
1115
|
+
class: g(u.value)
|
|
1051
1116
|
}, [
|
|
1052
|
-
h("div",
|
|
1053
|
-
e.hideHeader ?
|
|
1117
|
+
h("div", pt, [
|
|
1118
|
+
e.hideHeader ? b("", !0) : (i(), s("div", kt, [
|
|
1054
1119
|
h("h5", {
|
|
1055
1120
|
id: `${e.id}-label`,
|
|
1056
1121
|
class: "modal-title"
|
|
1057
1122
|
}, [
|
|
1058
|
-
|
|
1059
|
-
|
|
1123
|
+
C(p.$slots, "header", {}, () => [
|
|
1124
|
+
w(m(e.title), 1)
|
|
1060
1125
|
])
|
|
1061
|
-
], 8,
|
|
1062
|
-
|
|
1126
|
+
], 8, $t),
|
|
1127
|
+
B[0] || (B[0] = h("button", {
|
|
1063
1128
|
type: "button",
|
|
1064
1129
|
class: "btn-close",
|
|
1065
1130
|
"data-bs-dismiss": "modal",
|
|
1066
1131
|
"aria-label": "Close"
|
|
1067
1132
|
}, null, -1))
|
|
1068
1133
|
])),
|
|
1069
|
-
h("div",
|
|
1070
|
-
|
|
1134
|
+
h("div", St, [
|
|
1135
|
+
C(p.$slots, "default")
|
|
1071
1136
|
]),
|
|
1072
|
-
e.hideFooter ?
|
|
1073
|
-
|
|
1074
|
-
|
|
1137
|
+
e.hideFooter ? b("", !0) : (i(), s("div", Vt, [
|
|
1138
|
+
C(p.$slots, "footer", {}, () => [
|
|
1139
|
+
B[1] || (B[1] = h("button", {
|
|
1075
1140
|
type: "button",
|
|
1076
1141
|
class: "btn btn-secondary",
|
|
1077
1142
|
"data-bs-dismiss": "modal"
|
|
@@ -1080,9 +1145,9 @@ const fe = /* @__PURE__ */ C({
|
|
|
1080
1145
|
]))
|
|
1081
1146
|
])
|
|
1082
1147
|
], 2)
|
|
1083
|
-
],
|
|
1148
|
+
], 14, gt));
|
|
1084
1149
|
}
|
|
1085
|
-
}),
|
|
1150
|
+
}), xt = ["id", "aria-labelledby", "data-bs-backdrop", "data-bs-scroll"], wt = { class: "offcanvas-header" }, Bt = ["id"], Nt = { class: "offcanvas-body" }, Tt = /* @__PURE__ */ x({
|
|
1086
1151
|
__name: "VibeOffcanvas",
|
|
1087
1152
|
props: {
|
|
1088
1153
|
id: { type: String, required: !0 },
|
|
@@ -1103,15 +1168,15 @@ const fe = /* @__PURE__ */ C({
|
|
|
1103
1168
|
"data-bs-backdrop": e.backdrop === !1 ? "false" : e.backdrop === "static" ? "static" : "true",
|
|
1104
1169
|
"data-bs-scroll": e.scroll
|
|
1105
1170
|
}, [
|
|
1106
|
-
h("div",
|
|
1171
|
+
h("div", wt, [
|
|
1107
1172
|
h("h5", {
|
|
1108
1173
|
id: `${e.id}-label`,
|
|
1109
1174
|
class: "offcanvas-title"
|
|
1110
1175
|
}, [
|
|
1111
|
-
|
|
1112
|
-
|
|
1176
|
+
C(l.$slots, "header", {}, () => [
|
|
1177
|
+
w(m(e.title), 1)
|
|
1113
1178
|
])
|
|
1114
|
-
], 8,
|
|
1179
|
+
], 8, Bt),
|
|
1115
1180
|
r[0] || (r[0] = h("button", {
|
|
1116
1181
|
type: "button",
|
|
1117
1182
|
class: "btn-close",
|
|
@@ -1119,15 +1184,15 @@ const fe = /* @__PURE__ */ C({
|
|
|
1119
1184
|
"aria-label": "Close"
|
|
1120
1185
|
}, null, -1))
|
|
1121
1186
|
]),
|
|
1122
|
-
h("div",
|
|
1123
|
-
|
|
1187
|
+
h("div", Nt, [
|
|
1188
|
+
C(l.$slots, "default")
|
|
1124
1189
|
])
|
|
1125
|
-
], 10,
|
|
1190
|
+
], 10, xt));
|
|
1126
1191
|
}
|
|
1127
|
-
}),
|
|
1192
|
+
}), Mt = ["id", "data-bs-autohide", "data-bs-delay"], qt = {
|
|
1128
1193
|
key: 0,
|
|
1129
1194
|
class: "toast-header"
|
|
1130
|
-
},
|
|
1195
|
+
}, Pt = { class: "me-auto" }, Ft = { class: "toast-body" }, Lt = /* @__PURE__ */ x({
|
|
1131
1196
|
__name: "VibeToast",
|
|
1132
1197
|
props: {
|
|
1133
1198
|
id: { type: String, default: void 0 },
|
|
@@ -1139,67 +1204,67 @@ const fe = /* @__PURE__ */ C({
|
|
|
1139
1204
|
},
|
|
1140
1205
|
emits: ["update:modelValue", "show", "shown", "hide", "hidden", "component-error"],
|
|
1141
1206
|
setup(e, { emit: f }) {
|
|
1142
|
-
const t = e, a = f, l = T(null), r = T(null),
|
|
1207
|
+
const t = e, a = f, l = T(null), r = T(null), d = T(!1), u = y(() => {
|
|
1143
1208
|
const p = ["toast"];
|
|
1144
1209
|
return t.variant && p.push(`text-bg-${t.variant}`), p.join(" ");
|
|
1145
|
-
}),
|
|
1146
|
-
|
|
1147
|
-
},
|
|
1210
|
+
}), o = () => {
|
|
1211
|
+
d.value = !0, a("show");
|
|
1212
|
+
}, n = () => {
|
|
1148
1213
|
a("shown"), a("update:modelValue", !0);
|
|
1149
1214
|
}, c = () => {
|
|
1150
1215
|
a("hide");
|
|
1151
|
-
},
|
|
1152
|
-
|
|
1216
|
+
}, v = () => {
|
|
1217
|
+
d.value = !1, a("hidden"), a("update:modelValue", !1);
|
|
1153
1218
|
};
|
|
1154
1219
|
return G(async () => {
|
|
1155
1220
|
if (l.value)
|
|
1156
1221
|
try {
|
|
1157
|
-
const
|
|
1158
|
-
r.value = new
|
|
1222
|
+
const B = (await import("bootstrap")).Toast;
|
|
1223
|
+
r.value = new B(l.value, {
|
|
1159
1224
|
autohide: t.autohide,
|
|
1160
1225
|
delay: t.delay
|
|
1161
|
-
}), l.value.addEventListener("show.bs.toast",
|
|
1226
|
+
}), l.value.addEventListener("show.bs.toast", o), l.value.addEventListener("shown.bs.toast", n), l.value.addEventListener("hide.bs.toast", c), l.value.addEventListener("hidden.bs.toast", v), t.modelValue && r.value.show();
|
|
1162
1227
|
} catch {
|
|
1163
1228
|
a("component-error", "Bootstrap JS not loaded. Toast will use data attributes only.");
|
|
1164
1229
|
}
|
|
1165
1230
|
}), H(() => {
|
|
1166
|
-
l.value && (l.value.removeEventListener("show.bs.toast",
|
|
1231
|
+
l.value && (l.value.removeEventListener("show.bs.toast", o), l.value.removeEventListener("shown.bs.toast", n), l.value.removeEventListener("hide.bs.toast", c), l.value.removeEventListener("hidden.bs.toast", v)), r.value && (r.value.dispose(), r.value = null);
|
|
1167
1232
|
}), E(() => t.modelValue, (p) => {
|
|
1168
|
-
r.value && (p && !
|
|
1169
|
-
}), (p,
|
|
1233
|
+
r.value && (p && !d.value ? r.value.show() : !p && d.value && r.value.hide());
|
|
1234
|
+
}), (p, B) => (i(), s("div", {
|
|
1170
1235
|
ref_key: "toastRef",
|
|
1171
1236
|
ref: l,
|
|
1172
1237
|
id: e.id,
|
|
1173
|
-
class: g(
|
|
1238
|
+
class: g(u.value),
|
|
1174
1239
|
role: "alert",
|
|
1175
1240
|
"aria-live": "assertive",
|
|
1176
1241
|
"aria-atomic": "true",
|
|
1177
1242
|
"data-bs-autohide": e.autohide,
|
|
1178
1243
|
"data-bs-delay": e.delay
|
|
1179
1244
|
}, [
|
|
1180
|
-
e.title || p.$slots.header ? (i(), s("div",
|
|
1181
|
-
|
|
1182
|
-
h("strong",
|
|
1245
|
+
e.title || p.$slots.header ? (i(), s("div", qt, [
|
|
1246
|
+
C(p.$slots, "header", {}, () => [
|
|
1247
|
+
h("strong", Pt, m(e.title), 1)
|
|
1183
1248
|
]),
|
|
1184
|
-
|
|
1249
|
+
B[0] || (B[0] = h("button", {
|
|
1185
1250
|
type: "button",
|
|
1186
1251
|
class: "btn-close",
|
|
1187
1252
|
"data-bs-dismiss": "toast",
|
|
1188
1253
|
"aria-label": "Close"
|
|
1189
1254
|
}, null, -1))
|
|
1190
|
-
])) :
|
|
1191
|
-
h("div",
|
|
1192
|
-
|
|
1255
|
+
])) : b("", !0),
|
|
1256
|
+
h("div", Ft, [
|
|
1257
|
+
C(p.$slots, "default")
|
|
1193
1258
|
])
|
|
1194
|
-
], 10,
|
|
1259
|
+
], 10, Mt));
|
|
1195
1260
|
}
|
|
1196
|
-
}),
|
|
1261
|
+
}), zt = ["id", "data-bs-ride", "data-bs-interval", "data-bs-keyboard", "data-bs-pause", "data-bs-wrap", "data-bs-touch"], jt = {
|
|
1197
1262
|
key: 0,
|
|
1198
1263
|
class: "carousel-indicators"
|
|
1199
|
-
},
|
|
1264
|
+
}, At = ["data-bs-target", "data-bs-slide-to", "aria-current", "aria-label"], It = { class: "carousel-inner" }, Ot = ["data-bs-interval"], Dt = ["src", "alt"], Et = {
|
|
1200
1265
|
key: 0,
|
|
1201
1266
|
class: "carousel-caption d-none d-md-block"
|
|
1202
|
-
},
|
|
1267
|
+
}, Rt = { key: 0 }, Xt = { key: 1 }, Yt = ["data-bs-target"], Gt = ["data-bs-target"], Ht = /* @__PURE__ */ x({
|
|
1203
1268
|
__name: "VibeCarousel",
|
|
1204
1269
|
props: {
|
|
1205
1270
|
id: { type: String, required: !0 },
|
|
@@ -1220,9 +1285,9 @@ const fe = /* @__PURE__ */ C({
|
|
|
1220
1285
|
const t = e, a = y(() => {
|
|
1221
1286
|
const r = ["carousel", "slide"];
|
|
1222
1287
|
return t.dark && r.push("carousel-dark"), t.fade && r.push("carousel-fade"), r.join(" ");
|
|
1223
|
-
}), l = (r,
|
|
1288
|
+
}), l = (r, d) => r.alt ? r.alt : r.caption ? r.caption : r.captionText ? r.captionText : `Carousel slide ${d + 1}`;
|
|
1224
1289
|
return G(() => {
|
|
1225
|
-
}), (r,
|
|
1290
|
+
}), (r, d) => (i(), s("div", {
|
|
1226
1291
|
id: e.id,
|
|
1227
1292
|
class: g(a.value),
|
|
1228
1293
|
"data-bs-ride": e.ride === !0 ? "carousel" : e.ride,
|
|
@@ -1232,38 +1297,38 @@ const fe = /* @__PURE__ */ C({
|
|
|
1232
1297
|
"data-bs-wrap": e.wrap,
|
|
1233
1298
|
"data-bs-touch": e.touch
|
|
1234
1299
|
}, [
|
|
1235
|
-
e.indicators ? (i(), s("div",
|
|
1236
|
-
(i(!0), s(
|
|
1237
|
-
key: `indicator-${
|
|
1300
|
+
e.indicators ? (i(), s("div", jt, [
|
|
1301
|
+
(i(!0), s(M, null, A(e.items, (u, o) => (i(), s("button", {
|
|
1302
|
+
key: `indicator-${u.src}-${o}`,
|
|
1238
1303
|
type: "button",
|
|
1239
1304
|
"data-bs-target": `#${e.id}`,
|
|
1240
|
-
"data-bs-slide-to":
|
|
1241
|
-
class: g({ active:
|
|
1242
|
-
"aria-current":
|
|
1243
|
-
"aria-label": `Slide ${
|
|
1244
|
-
}, null, 10,
|
|
1245
|
-
])) :
|
|
1246
|
-
h("div",
|
|
1247
|
-
(i(!0), s(
|
|
1248
|
-
key: `slide-${
|
|
1249
|
-
class: g(["carousel-item", { active:
|
|
1250
|
-
"data-bs-interval":
|
|
1305
|
+
"data-bs-slide-to": o,
|
|
1306
|
+
class: g({ active: u.active || o === 0 }),
|
|
1307
|
+
"aria-current": u.active || o === 0,
|
|
1308
|
+
"aria-label": `Slide ${o + 1}`
|
|
1309
|
+
}, null, 10, At))), 128))
|
|
1310
|
+
])) : b("", !0),
|
|
1311
|
+
h("div", It, [
|
|
1312
|
+
(i(!0), s(M, null, A(e.items, (u, o) => (i(), s("div", {
|
|
1313
|
+
key: `slide-${u.src}-${o}`,
|
|
1314
|
+
class: g(["carousel-item", { active: u.active || o === 0 }]),
|
|
1315
|
+
"data-bs-interval": u.interval
|
|
1251
1316
|
}, [
|
|
1252
1317
|
h("img", {
|
|
1253
|
-
src:
|
|
1254
|
-
alt: l(
|
|
1318
|
+
src: u.src,
|
|
1319
|
+
alt: l(u, o),
|
|
1255
1320
|
class: "d-block w-100"
|
|
1256
|
-
}, null, 8,
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
item:
|
|
1260
|
-
index:
|
|
1321
|
+
}, null, 8, Dt),
|
|
1322
|
+
u.caption || u.captionText || r.$slots.caption ? (i(), s("div", Et, [
|
|
1323
|
+
C(r.$slots, "caption", {
|
|
1324
|
+
item: u,
|
|
1325
|
+
index: o
|
|
1261
1326
|
}, () => [
|
|
1262
|
-
|
|
1263
|
-
|
|
1327
|
+
u.caption ? (i(), s("h5", Rt, m(u.caption), 1)) : b("", !0),
|
|
1328
|
+
u.captionText ? (i(), s("p", Xt, m(u.captionText), 1)) : b("", !0)
|
|
1264
1329
|
])
|
|
1265
|
-
])) :
|
|
1266
|
-
], 10,
|
|
1330
|
+
])) : b("", !0)
|
|
1331
|
+
], 10, Ot))), 128))
|
|
1267
1332
|
]),
|
|
1268
1333
|
e.controls ? (i(), s("button", {
|
|
1269
1334
|
key: 1,
|
|
@@ -1271,29 +1336,29 @@ const fe = /* @__PURE__ */ C({
|
|
|
1271
1336
|
type: "button",
|
|
1272
1337
|
"data-bs-target": `#${e.id}`,
|
|
1273
1338
|
"data-bs-slide": "prev"
|
|
1274
|
-
}, [...
|
|
1339
|
+
}, [...d[0] || (d[0] = [
|
|
1275
1340
|
h("span", {
|
|
1276
1341
|
class: "carousel-control-prev-icon",
|
|
1277
1342
|
"aria-hidden": "true"
|
|
1278
1343
|
}, null, -1),
|
|
1279
1344
|
h("span", { class: "visually-hidden" }, "Previous", -1)
|
|
1280
|
-
])], 8,
|
|
1345
|
+
])], 8, Yt)) : b("", !0),
|
|
1281
1346
|
e.controls ? (i(), s("button", {
|
|
1282
1347
|
key: 2,
|
|
1283
1348
|
class: "carousel-control-next",
|
|
1284
1349
|
type: "button",
|
|
1285
1350
|
"data-bs-target": `#${e.id}`,
|
|
1286
1351
|
"data-bs-slide": "next"
|
|
1287
|
-
}, [...
|
|
1352
|
+
}, [...d[1] || (d[1] = [
|
|
1288
1353
|
h("span", {
|
|
1289
1354
|
class: "carousel-control-next-icon",
|
|
1290
1355
|
"aria-hidden": "true"
|
|
1291
1356
|
}, null, -1),
|
|
1292
1357
|
h("span", { class: "visually-hidden" }, "Next", -1)
|
|
1293
|
-
])], 8,
|
|
1294
|
-
], 10,
|
|
1358
|
+
])], 8, Gt)) : b("", !0)
|
|
1359
|
+
], 10, zt));
|
|
1295
1360
|
}
|
|
1296
|
-
}),
|
|
1361
|
+
}), Kt = ["data-bs-placement", "data-bs-title", "data-bs-trigger", "data-bs-html"], Ut = /* @__PURE__ */ x({
|
|
1297
1362
|
__name: "VibeTooltip",
|
|
1298
1363
|
props: {
|
|
1299
1364
|
content: { type: String, required: !0 },
|
|
@@ -1310,10 +1375,10 @@ const fe = /* @__PURE__ */ C({
|
|
|
1310
1375
|
"data-bs-trigger": e.trigger,
|
|
1311
1376
|
"data-bs-html": e.html
|
|
1312
1377
|
}, [
|
|
1313
|
-
|
|
1314
|
-
], 8,
|
|
1378
|
+
C(t.$slots, "default")
|
|
1379
|
+
], 8, Kt));
|
|
1315
1380
|
}
|
|
1316
|
-
}),
|
|
1381
|
+
}), Qt = ["data-bs-placement", "data-bs-title", "data-bs-content", "data-bs-trigger", "data-bs-html"], Wt = /* @__PURE__ */ x({
|
|
1317
1382
|
__name: "VibePopover",
|
|
1318
1383
|
props: {
|
|
1319
1384
|
title: { type: String, default: void 0 },
|
|
@@ -1332,10 +1397,10 @@ const fe = /* @__PURE__ */ C({
|
|
|
1332
1397
|
"data-bs-trigger": e.trigger,
|
|
1333
1398
|
"data-bs-html": e.html
|
|
1334
1399
|
}, [
|
|
1335
|
-
|
|
1336
|
-
], 8,
|
|
1400
|
+
C(t.$slots, "default")
|
|
1401
|
+
], 8, Qt));
|
|
1337
1402
|
}
|
|
1338
|
-
}),
|
|
1403
|
+
}), Jt = /* @__PURE__ */ x({
|
|
1339
1404
|
__name: "VibeScrollspy",
|
|
1340
1405
|
props: {
|
|
1341
1406
|
target: { type: String, required: !0 },
|
|
@@ -1346,7 +1411,7 @@ const fe = /* @__PURE__ */ C({
|
|
|
1346
1411
|
},
|
|
1347
1412
|
emits: ["activate", "component-error"],
|
|
1348
1413
|
setup(e, { emit: f }) {
|
|
1349
|
-
return (t, a) => (i(),
|
|
1414
|
+
return (t, a) => (i(), q(P(e.tag), {
|
|
1350
1415
|
"data-bs-spy": "scroll",
|
|
1351
1416
|
"data-bs-target": e.target,
|
|
1352
1417
|
"data-bs-offset": e.offset,
|
|
@@ -1354,13 +1419,13 @@ const fe = /* @__PURE__ */ C({
|
|
|
1354
1419
|
"data-bs-smooth-scroll": e.smoothScroll,
|
|
1355
1420
|
tabindex: "0"
|
|
1356
1421
|
}, {
|
|
1357
|
-
default:
|
|
1358
|
-
|
|
1422
|
+
default: F(() => [
|
|
1423
|
+
C(t.$slots, "default")
|
|
1359
1424
|
]),
|
|
1360
1425
|
_: 3
|
|
1361
1426
|
}, 8, ["data-bs-target", "data-bs-offset", "data-bs-method", "data-bs-smooth-scroll"]));
|
|
1362
1427
|
}
|
|
1363
|
-
}),
|
|
1428
|
+
}), Zt = /* @__PURE__ */ x({
|
|
1364
1429
|
__name: "VibeIcon",
|
|
1365
1430
|
props: {
|
|
1366
1431
|
// Icon name (e.g., 'house', 'heart-fill', 'star')
|
|
@@ -1381,63 +1446,63 @@ const fe = /* @__PURE__ */ C({
|
|
|
1381
1446
|
emits: ["click", "component-error"],
|
|
1382
1447
|
setup(e, { emit: f }) {
|
|
1383
1448
|
const t = e, a = f, l = y(() => {
|
|
1384
|
-
const
|
|
1385
|
-
return t.size && (["1x", "2x", "3x", "4x", "5x"].includes(t.size) ||
|
|
1449
|
+
const u = ["bi", `bi-${t.icon}`];
|
|
1450
|
+
return t.size && (["1x", "2x", "3x", "4x", "5x"].includes(t.size) || u.push(`bi-${t.size}`)), t.customClass && u.push(t.customClass), u.join(" ");
|
|
1386
1451
|
}), r = y(() => {
|
|
1387
|
-
const
|
|
1452
|
+
const u = {};
|
|
1388
1453
|
if (t.fontSize)
|
|
1389
|
-
|
|
1454
|
+
u.fontSize = t.fontSize;
|
|
1390
1455
|
else if (t.size) {
|
|
1391
|
-
const
|
|
1456
|
+
const n = {
|
|
1392
1457
|
"1x": "1rem",
|
|
1393
1458
|
"2x": "2rem",
|
|
1394
1459
|
"3x": "3rem",
|
|
1395
1460
|
"4x": "4rem",
|
|
1396
1461
|
"5x": "5rem"
|
|
1397
1462
|
};
|
|
1398
|
-
|
|
1463
|
+
n[t.size] && (u.fontSize = n[t.size]);
|
|
1399
1464
|
}
|
|
1400
|
-
t.color && (
|
|
1401
|
-
const
|
|
1402
|
-
return t.flipH &&
|
|
1403
|
-
}),
|
|
1404
|
-
a("click",
|
|
1465
|
+
t.color && (u.color = t.color);
|
|
1466
|
+
const o = [];
|
|
1467
|
+
return t.flipH && o.push("scaleX(-1)"), t.flipV && o.push("scaleY(-1)"), t.rotate && o.push(`rotate(${t.rotate}deg)`), o.length > 0 && (u.transform = o.join(" "), u.display = "inline-block"), Object.keys(u).length > 0 ? u : void 0;
|
|
1468
|
+
}), d = (u) => {
|
|
1469
|
+
a("click", u);
|
|
1405
1470
|
};
|
|
1406
|
-
return (
|
|
1471
|
+
return (u, o) => (i(), s("i", {
|
|
1407
1472
|
class: g(l.value),
|
|
1408
1473
|
style: D(r.value),
|
|
1409
1474
|
"aria-hidden": !0,
|
|
1410
|
-
onClick:
|
|
1475
|
+
onClick: d
|
|
1411
1476
|
}, null, 6));
|
|
1412
1477
|
}
|
|
1413
|
-
}),
|
|
1478
|
+
}), _t = { class: "vibe-datatable" }, ea = { class: "row mb-3" }, ta = {
|
|
1414
1479
|
key: 0,
|
|
1415
1480
|
class: "col-md-6 mb-2 mb-md-0"
|
|
1416
|
-
},
|
|
1481
|
+
}, aa = ["placeholder"], la = {
|
|
1417
1482
|
key: 1,
|
|
1418
1483
|
class: "col-md-6"
|
|
1419
|
-
},
|
|
1484
|
+
}, ia = { class: "d-flex justify-content-md-end align-items-center" }, sa = ["value"], na = ["onClick"], oa = {
|
|
1420
1485
|
key: 0,
|
|
1421
1486
|
class: "ms-1"
|
|
1422
|
-
},
|
|
1487
|
+
}, da = ["onClick"], ra = { key: 0 }, ua = ["colspan"], ca = { class: "row" }, fa = {
|
|
1423
1488
|
key: 0,
|
|
1424
1489
|
class: "col-md-6 mb-2 mb-md-0"
|
|
1425
|
-
},
|
|
1490
|
+
}, va = { class: "datatable-info" }, ba = {
|
|
1426
1491
|
key: 1,
|
|
1427
1492
|
class: "col-md-6"
|
|
1428
|
-
},
|
|
1493
|
+
}, ma = { class: "pagination justify-content-md-end mb-0" }, ha = {
|
|
1429
1494
|
key: 0,
|
|
1430
1495
|
class: "page-item"
|
|
1431
|
-
},
|
|
1496
|
+
}, ya = {
|
|
1432
1497
|
key: 1,
|
|
1433
1498
|
class: "page-item disabled"
|
|
1434
|
-
},
|
|
1499
|
+
}, ga = ["onClick"], pa = {
|
|
1435
1500
|
key: 2,
|
|
1436
1501
|
class: "page-item disabled"
|
|
1437
|
-
},
|
|
1502
|
+
}, ka = {
|
|
1438
1503
|
key: 3,
|
|
1439
1504
|
class: "page-item"
|
|
1440
|
-
},
|
|
1505
|
+
}, $a = /* @__PURE__ */ x({
|
|
1441
1506
|
__name: "VibeDataTable",
|
|
1442
1507
|
props: /* @__PURE__ */ J({
|
|
1443
1508
|
// Data
|
|
@@ -1480,95 +1545,95 @@ const fe = /* @__PURE__ */ C({
|
|
|
1480
1545
|
}),
|
|
1481
1546
|
emits: /* @__PURE__ */ J(["row-clicked", "component-error"], ["update:currentPage", "update:perPage", "update:sortBy", "update:sortDesc"]),
|
|
1482
1547
|
setup(e, { emit: f }) {
|
|
1483
|
-
const t = e, a = Y(e, "currentPage"), l = Y(e, "perPage"), r = Y(e, "sortBy"),
|
|
1484
|
-
E(
|
|
1485
|
-
|
|
1486
|
-
c.value =
|
|
1548
|
+
const t = e, a = Y(e, "currentPage"), l = Y(e, "perPage"), r = Y(e, "sortBy"), d = Y(e, "sortDesc"), u = f, o = T(""), n = T(null), c = T(""), v = (k, S) => t.rowKey && k[t.rowKey] !== void 0 ? String(k[t.rowKey]) : S;
|
|
1549
|
+
E(o, (k) => {
|
|
1550
|
+
n.value !== null && clearTimeout(n.value), n.value = setTimeout(() => {
|
|
1551
|
+
c.value = k, a.value = 1, n.value = null;
|
|
1487
1552
|
}, t.searchDebounce);
|
|
1488
1553
|
}), H(() => {
|
|
1489
|
-
|
|
1554
|
+
n.value !== null && (clearTimeout(n.value), n.value = null);
|
|
1490
1555
|
});
|
|
1491
1556
|
const p = y(() => {
|
|
1492
1557
|
if (!t.searchable || !c.value)
|
|
1493
|
-
return t.items;
|
|
1494
|
-
const
|
|
1495
|
-
return t.items.filter((
|
|
1496
|
-
if (
|
|
1497
|
-
const
|
|
1498
|
-
return
|
|
1558
|
+
return t.items || [];
|
|
1559
|
+
const k = c.value.toLowerCase();
|
|
1560
|
+
return (t.items || []).filter((S) => (t.columns || []).some((V) => {
|
|
1561
|
+
if (V.searchable === !1) return !1;
|
|
1562
|
+
const j = S[V.key];
|
|
1563
|
+
return j == null ? !1 : String(j).toLowerCase().includes(k);
|
|
1499
1564
|
}));
|
|
1500
|
-
}),
|
|
1501
|
-
if (
|
|
1502
|
-
if (
|
|
1503
|
-
if (typeof
|
|
1504
|
-
const
|
|
1505
|
-
return
|
|
1565
|
+
}), B = (k, S, V) => {
|
|
1566
|
+
if (k == null) return 1;
|
|
1567
|
+
if (S == null) return -1;
|
|
1568
|
+
if (typeof k == "string" && typeof S == "string") {
|
|
1569
|
+
const j = k.toLowerCase(), I = S.toLowerCase();
|
|
1570
|
+
return j < I ? V ? 1 : -1 : j > I ? V ? -1 : 1 : 0;
|
|
1506
1571
|
}
|
|
1507
|
-
if (typeof
|
|
1508
|
-
return
|
|
1509
|
-
if (typeof
|
|
1510
|
-
return
|
|
1511
|
-
if (
|
|
1512
|
-
const
|
|
1513
|
-
return
|
|
1572
|
+
if (typeof k == "number" && typeof S == "number")
|
|
1573
|
+
return k < S ? V ? 1 : -1 : k > S ? V ? -1 : 1 : 0;
|
|
1574
|
+
if (typeof k == "boolean" && typeof S == "boolean")
|
|
1575
|
+
return k === S ? 0 : (k ? 1 : -1) * (V ? -1 : 1);
|
|
1576
|
+
if (k instanceof Date && S instanceof Date) {
|
|
1577
|
+
const j = k.getTime(), I = S.getTime();
|
|
1578
|
+
return j < I ? V ? 1 : -1 : j > I ? V ? -1 : 1 : 0;
|
|
1514
1579
|
}
|
|
1515
1580
|
return 0;
|
|
1516
|
-
},
|
|
1581
|
+
}, $ = y(() => {
|
|
1517
1582
|
if (!t.sortable || !r.value)
|
|
1518
1583
|
return p.value;
|
|
1519
|
-
const
|
|
1520
|
-
return
|
|
1521
|
-
}),
|
|
1584
|
+
const k = [...p.value], S = r.value;
|
|
1585
|
+
return k.sort((V, j) => B(V[S], j[S], d.value)), k;
|
|
1586
|
+
}), L = y(() => {
|
|
1522
1587
|
if (!t.paginated)
|
|
1523
|
-
return
|
|
1524
|
-
const
|
|
1525
|
-
return
|
|
1526
|
-
}),
|
|
1527
|
-
const
|
|
1528
|
-
return Math.min(
|
|
1529
|
-
}), _ = y(() => (N.value !==
|
|
1530
|
-
const
|
|
1531
|
-
return t.striped &&
|
|
1532
|
-
}), te = (
|
|
1533
|
-
!t.sortable ||
|
|
1534
|
-
}, R = (
|
|
1535
|
-
|
|
1588
|
+
return $.value;
|
|
1589
|
+
const k = (a.value - 1) * l.value, S = k + l.value;
|
|
1590
|
+
return $.value.slice(k, S);
|
|
1591
|
+
}), z = y(() => t.items.length), N = y(() => p.value.length), O = y(() => Math.ceil(N.value / l.value)), K = y(() => N.value === 0 ? 0 : (a.value - 1) * l.value + 1), U = y(() => {
|
|
1592
|
+
const k = a.value * l.value;
|
|
1593
|
+
return Math.min(k, N.value);
|
|
1594
|
+
}), _ = y(() => (N.value !== z.value ? t.filteredInfoText : t.infoText).replace("{start}", String(K.value)).replace("{end}", String(U.value)).replace("{total}", String(N.value)).replace("{totalRows}", String(z.value))), ee = y(() => {
|
|
1595
|
+
const k = ["table"];
|
|
1596
|
+
return t.striped && k.push("table-striped"), t.bordered && k.push("table-bordered"), t.borderless && k.push("table-borderless"), t.hover && k.push("table-hover"), t.small && k.push("table-sm"), t.variant && k.push(`table-${t.variant}`), k.join(" ");
|
|
1597
|
+
}), te = (k) => {
|
|
1598
|
+
!t.sortable || k.sortable === !1 || (r.value === k.key ? d.value = !d.value : (r.value = k.key, d.value = !1));
|
|
1599
|
+
}, R = (k) => {
|
|
1600
|
+
k < 1 || k > O.value || (a.value = k);
|
|
1536
1601
|
}, ae = () => {
|
|
1537
1602
|
a.value = 1;
|
|
1538
|
-
}, le = (
|
|
1539
|
-
|
|
1540
|
-
}, ie = (
|
|
1541
|
-
const
|
|
1542
|
-
return
|
|
1543
|
-
},
|
|
1544
|
-
const
|
|
1545
|
-
return t.sortable &&
|
|
1603
|
+
}, le = (k, S) => {
|
|
1604
|
+
u("row-clicked", k, S);
|
|
1605
|
+
}, ie = (k, S) => {
|
|
1606
|
+
const V = k[S.key];
|
|
1607
|
+
return S.formatter ? S.formatter(V, k) : V;
|
|
1608
|
+
}, se = (k) => !t.sortable || k.sortable === !1 ? "" : r.value !== k.key ? "⇅" : d.value ? "↓" : "↑", ne = (k) => {
|
|
1609
|
+
const S = { ...k.thStyle };
|
|
1610
|
+
return t.sortable && k.sortable !== !1 && (S.cursor = "pointer"), S;
|
|
1546
1611
|
};
|
|
1547
|
-
return (
|
|
1548
|
-
h("div",
|
|
1549
|
-
e.searchable ? (i(), s("div",
|
|
1612
|
+
return (k, S) => (i(), s("div", _t, [
|
|
1613
|
+
h("div", ea, [
|
|
1614
|
+
e.searchable ? (i(), s("div", ta, [
|
|
1550
1615
|
W(h("input", {
|
|
1551
|
-
"onUpdate:modelValue":
|
|
1616
|
+
"onUpdate:modelValue": S[0] || (S[0] = (V) => o.value = V),
|
|
1552
1617
|
type: "search",
|
|
1553
1618
|
class: "form-control",
|
|
1554
1619
|
placeholder: e.searchPlaceholder
|
|
1555
|
-
}, null, 8,
|
|
1556
|
-
[ue,
|
|
1620
|
+
}, null, 8, aa), [
|
|
1621
|
+
[ue, o.value]
|
|
1557
1622
|
])
|
|
1558
|
-
])) :
|
|
1559
|
-
e.showPerPage && e.paginated ? (i(), s("div",
|
|
1560
|
-
h("div",
|
|
1561
|
-
|
|
1623
|
+
])) : b("", !0),
|
|
1624
|
+
e.showPerPage && e.paginated ? (i(), s("div", la, [
|
|
1625
|
+
h("div", ia, [
|
|
1626
|
+
S[6] || (S[6] = h("label", { class: "me-2 mb-0" }, "Show", -1)),
|
|
1562
1627
|
W(h("select", {
|
|
1563
|
-
"onUpdate:modelValue":
|
|
1628
|
+
"onUpdate:modelValue": S[1] || (S[1] = (V) => l.value = V),
|
|
1564
1629
|
class: "form-select form-select-sm",
|
|
1565
1630
|
style: { width: "auto" },
|
|
1566
1631
|
onChange: ae
|
|
1567
1632
|
}, [
|
|
1568
|
-
(i(!0), s(
|
|
1569
|
-
key:
|
|
1570
|
-
value:
|
|
1571
|
-
},
|
|
1633
|
+
(i(!0), s(M, null, A(e.perPageOptions, (V) => (i(), s("option", {
|
|
1634
|
+
key: V,
|
|
1635
|
+
value: V
|
|
1636
|
+
}, m(V), 9, sa))), 128))
|
|
1572
1637
|
], 544), [
|
|
1573
1638
|
[
|
|
1574
1639
|
ce,
|
|
@@ -1577,9 +1642,9 @@ const fe = /* @__PURE__ */ C({
|
|
|
1577
1642
|
{ number: !0 }
|
|
1578
1643
|
]
|
|
1579
1644
|
]),
|
|
1580
|
-
|
|
1645
|
+
S[7] || (S[7] = h("span", { class: "ms-2" }, "entries", -1))
|
|
1581
1646
|
])
|
|
1582
|
-
])) :
|
|
1647
|
+
])) : b("", !0)
|
|
1583
1648
|
]),
|
|
1584
1649
|
h("div", {
|
|
1585
1650
|
class: g({ "table-responsive": e.responsive })
|
|
@@ -1589,106 +1654,106 @@ const fe = /* @__PURE__ */ C({
|
|
|
1589
1654
|
}, [
|
|
1590
1655
|
h("thead", null, [
|
|
1591
1656
|
h("tr", null, [
|
|
1592
|
-
(i(!0), s(
|
|
1593
|
-
key:
|
|
1594
|
-
class: g(
|
|
1595
|
-
style: D(
|
|
1596
|
-
onClick: (
|
|
1657
|
+
(i(!0), s(M, null, A(e.columns, (V) => (i(), s("th", {
|
|
1658
|
+
key: V.key,
|
|
1659
|
+
class: g(V.headerClass),
|
|
1660
|
+
style: D(ne(V)),
|
|
1661
|
+
onClick: (j) => te(V)
|
|
1597
1662
|
}, [
|
|
1598
|
-
|
|
1599
|
-
e.sortable &&
|
|
1600
|
-
], 14,
|
|
1663
|
+
w(m(V.label) + " ", 1),
|
|
1664
|
+
e.sortable && V.sortable !== !1 ? (i(), s("span", oa, m(se(V)), 1)) : b("", !0)
|
|
1665
|
+
], 14, na))), 128))
|
|
1601
1666
|
])
|
|
1602
1667
|
]),
|
|
1603
1668
|
h("tbody", null, [
|
|
1604
|
-
(i(!0), s(
|
|
1605
|
-
key:
|
|
1606
|
-
onClick: (I) => le(
|
|
1669
|
+
(i(!0), s(M, null, A(L.value, (V, j) => (i(), s("tr", {
|
|
1670
|
+
key: v(V, j),
|
|
1671
|
+
onClick: (I) => le(V, j),
|
|
1607
1672
|
style: { cursor: "pointer" }
|
|
1608
1673
|
}, [
|
|
1609
|
-
(i(!0), s(
|
|
1674
|
+
(i(!0), s(M, null, A(e.columns, (I) => (i(), s("td", {
|
|
1610
1675
|
key: I.key,
|
|
1611
1676
|
class: g(I.class),
|
|
1612
1677
|
style: D(I.tdStyle)
|
|
1613
1678
|
}, [
|
|
1614
|
-
|
|
1615
|
-
item:
|
|
1616
|
-
value:
|
|
1617
|
-
index:
|
|
1679
|
+
C(k.$slots, `cell(${I.key})`, {
|
|
1680
|
+
item: V,
|
|
1681
|
+
value: V[I.key],
|
|
1682
|
+
index: j
|
|
1618
1683
|
}, () => [
|
|
1619
|
-
|
|
1684
|
+
w(m(ie(V, I)), 1)
|
|
1620
1685
|
], !0)
|
|
1621
1686
|
], 6))), 128))
|
|
1622
|
-
], 8,
|
|
1623
|
-
|
|
1687
|
+
], 8, da))), 128)),
|
|
1688
|
+
L.value.length === 0 && e.showEmpty ? (i(), s("tr", ra, [
|
|
1624
1689
|
h("td", {
|
|
1625
1690
|
colspan: e.columns.length,
|
|
1626
1691
|
class: "text-center"
|
|
1627
|
-
},
|
|
1628
|
-
])) :
|
|
1692
|
+
}, m(e.emptyText), 9, ua)
|
|
1693
|
+
])) : b("", !0)
|
|
1629
1694
|
])
|
|
1630
1695
|
], 2)
|
|
1631
1696
|
], 2),
|
|
1632
|
-
h("div",
|
|
1633
|
-
e.showInfo ? (i(), s("div",
|
|
1634
|
-
h("div",
|
|
1635
|
-
])) :
|
|
1636
|
-
e.paginated && O.value > 1 ? (i(), s("div",
|
|
1697
|
+
h("div", ca, [
|
|
1698
|
+
e.showInfo ? (i(), s("div", fa, [
|
|
1699
|
+
h("div", va, m(_.value), 1)
|
|
1700
|
+
])) : b("", !0),
|
|
1701
|
+
e.paginated && O.value > 1 ? (i(), s("div", ba, [
|
|
1637
1702
|
h("nav", null, [
|
|
1638
|
-
h("ul",
|
|
1703
|
+
h("ul", ma, [
|
|
1639
1704
|
h("li", {
|
|
1640
1705
|
class: g(["page-item", { disabled: a.value === 1 }])
|
|
1641
1706
|
}, [
|
|
1642
1707
|
h("a", {
|
|
1643
1708
|
class: "page-link",
|
|
1644
1709
|
href: "#",
|
|
1645
|
-
onClick:
|
|
1710
|
+
onClick: S[2] || (S[2] = X((V) => R(a.value - 1), ["prevent"]))
|
|
1646
1711
|
}, " Previous ")
|
|
1647
1712
|
], 2),
|
|
1648
|
-
a.value > 3 ? (i(), s("li",
|
|
1713
|
+
a.value > 3 ? (i(), s("li", ha, [
|
|
1649
1714
|
h("a", {
|
|
1650
1715
|
class: "page-link",
|
|
1651
1716
|
href: "#",
|
|
1652
|
-
onClick:
|
|
1717
|
+
onClick: S[3] || (S[3] = X((V) => R(1), ["prevent"]))
|
|
1653
1718
|
}, "1")
|
|
1654
|
-
])) :
|
|
1655
|
-
a.value > 4 ? (i(), s("li",
|
|
1719
|
+
])) : b("", !0),
|
|
1720
|
+
a.value > 4 ? (i(), s("li", ya, [...S[8] || (S[8] = [
|
|
1656
1721
|
h("span", { class: "page-link" }, "...", -1)
|
|
1657
|
-
])])) :
|
|
1658
|
-
(i(!0), s(
|
|
1659
|
-
(
|
|
1660
|
-
), (
|
|
1661
|
-
key:
|
|
1662
|
-
class: g(["page-item", { active:
|
|
1722
|
+
])])) : b("", !0),
|
|
1723
|
+
(i(!0), s(M, null, A(Array.from({ length: O.value }, (V, j) => j + 1).filter(
|
|
1724
|
+
(V) => V >= a.value - 2 && V <= a.value + 2
|
|
1725
|
+
), (V) => (i(), s("li", {
|
|
1726
|
+
key: V,
|
|
1727
|
+
class: g(["page-item", { active: V === a.value }])
|
|
1663
1728
|
}, [
|
|
1664
1729
|
h("a", {
|
|
1665
1730
|
class: "page-link",
|
|
1666
1731
|
href: "#",
|
|
1667
|
-
onClick: X((
|
|
1668
|
-
},
|
|
1732
|
+
onClick: X((j) => R(V), ["prevent"])
|
|
1733
|
+
}, m(V), 9, ga)
|
|
1669
1734
|
], 2))), 128)),
|
|
1670
|
-
a.value < O.value - 3 ? (i(), s("li",
|
|
1735
|
+
a.value < O.value - 3 ? (i(), s("li", pa, [...S[9] || (S[9] = [
|
|
1671
1736
|
h("span", { class: "page-link" }, "...", -1)
|
|
1672
|
-
])])) :
|
|
1673
|
-
a.value < O.value - 2 ? (i(), s("li",
|
|
1737
|
+
])])) : b("", !0),
|
|
1738
|
+
a.value < O.value - 2 ? (i(), s("li", ka, [
|
|
1674
1739
|
h("a", {
|
|
1675
1740
|
class: "page-link",
|
|
1676
1741
|
href: "#",
|
|
1677
|
-
onClick:
|
|
1678
|
-
},
|
|
1679
|
-
])) :
|
|
1742
|
+
onClick: S[4] || (S[4] = X((V) => R(O.value), ["prevent"]))
|
|
1743
|
+
}, m(O.value), 1)
|
|
1744
|
+
])) : b("", !0),
|
|
1680
1745
|
h("li", {
|
|
1681
1746
|
class: g(["page-item", { disabled: a.value === O.value }])
|
|
1682
1747
|
}, [
|
|
1683
1748
|
h("a", {
|
|
1684
1749
|
class: "page-link",
|
|
1685
1750
|
href: "#",
|
|
1686
|
-
onClick:
|
|
1751
|
+
onClick: S[5] || (S[5] = X((V) => R(a.value + 1), ["prevent"]))
|
|
1687
1752
|
}, " Next ")
|
|
1688
1753
|
], 2)
|
|
1689
1754
|
])
|
|
1690
1755
|
])
|
|
1691
|
-
])) :
|
|
1756
|
+
])) : b("", !0)
|
|
1692
1757
|
])
|
|
1693
1758
|
]));
|
|
1694
1759
|
}
|
|
@@ -1697,14 +1762,14 @@ const fe = /* @__PURE__ */ C({
|
|
|
1697
1762
|
for (const [a, l] of f)
|
|
1698
1763
|
t[a] = l;
|
|
1699
1764
|
return t;
|
|
1700
|
-
},
|
|
1765
|
+
}, Sa = /* @__PURE__ */ Q($a, [["__scopeId", "data-v-25bff6a6"]]), Va = { class: "mb-3" }, Ca = ["for"], xa = {
|
|
1701
1766
|
key: 0,
|
|
1702
1767
|
class: "text-danger"
|
|
1703
|
-
},
|
|
1768
|
+
}, wa = ["id", "type", "value", "placeholder", "disabled", "readonly", "required", "aria-invalid", "aria-describedby"], Ba = ["id"], Na = {
|
|
1704
1769
|
key: 2,
|
|
1705
1770
|
class: "valid-feedback",
|
|
1706
1771
|
style: { display: "block" }
|
|
1707
|
-
},
|
|
1772
|
+
}, Ta = ["id"], Ma = /* @__PURE__ */ x({
|
|
1708
1773
|
__name: "VibeFormInput",
|
|
1709
1774
|
props: {
|
|
1710
1775
|
modelValue: {
|
|
@@ -1729,27 +1794,27 @@ const fe = /* @__PURE__ */ C({
|
|
|
1729
1794
|
emits: ["update:modelValue", "validate", "blur", "focus", "input", "change"],
|
|
1730
1795
|
setup(e, { emit: f }) {
|
|
1731
1796
|
const t = e, a = f, l = y(() => {
|
|
1732
|
-
const
|
|
1733
|
-
return t.plaintext ?
|
|
1734
|
-
}), r = (
|
|
1735
|
-
const c =
|
|
1736
|
-
a("update:modelValue",
|
|
1737
|
-
},
|
|
1738
|
-
a("change",
|
|
1739
|
-
},
|
|
1740
|
-
a("blur",
|
|
1741
|
-
},
|
|
1742
|
-
a("focus",
|
|
1797
|
+
const n = [];
|
|
1798
|
+
return t.plaintext ? n.push("form-control-plaintext") : (n.push("form-control"), t.size && n.push(`form-control-${t.size}`)), t.validationState === "valid" && n.push("is-valid"), t.validationState === "invalid" && n.push("is-invalid"), n.join(" ");
|
|
1799
|
+
}), r = (n) => {
|
|
1800
|
+
const c = n.target, v = t.type === "number" ? c.value === "" ? "" : Number(c.value) : c.value;
|
|
1801
|
+
a("update:modelValue", v), a("input", n), t.validateOn === "input" && a("validate");
|
|
1802
|
+
}, d = (n) => {
|
|
1803
|
+
a("change", n), t.validateOn === "change" && a("validate");
|
|
1804
|
+
}, u = (n) => {
|
|
1805
|
+
a("blur", n), t.validateOn === "blur" && a("validate");
|
|
1806
|
+
}, o = (n) => {
|
|
1807
|
+
a("focus", n);
|
|
1743
1808
|
};
|
|
1744
|
-
return (
|
|
1809
|
+
return (n, c) => (i(), s("div", Va, [
|
|
1745
1810
|
e.label ? (i(), s("label", {
|
|
1746
1811
|
key: 0,
|
|
1747
1812
|
for: e.id,
|
|
1748
1813
|
class: "form-label"
|
|
1749
1814
|
}, [
|
|
1750
|
-
|
|
1751
|
-
e.required ? (i(), s("span",
|
|
1752
|
-
], 8,
|
|
1815
|
+
w(m(e.label) + " ", 1),
|
|
1816
|
+
e.required ? (i(), s("span", xa, "*")) : b("", !0)
|
|
1817
|
+
], 8, Ca)) : b("", !0),
|
|
1753
1818
|
h("input", {
|
|
1754
1819
|
id: e.id,
|
|
1755
1820
|
type: e.type,
|
|
@@ -1762,32 +1827,32 @@ const fe = /* @__PURE__ */ C({
|
|
|
1762
1827
|
"aria-invalid": e.validationState === "invalid",
|
|
1763
1828
|
"aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
|
|
1764
1829
|
onInput: r,
|
|
1765
|
-
onChange:
|
|
1766
|
-
onBlur:
|
|
1767
|
-
onFocus:
|
|
1768
|
-
}, null, 42,
|
|
1830
|
+
onChange: d,
|
|
1831
|
+
onBlur: u,
|
|
1832
|
+
onFocus: o
|
|
1833
|
+
}, null, 42, wa),
|
|
1769
1834
|
e.helpText && !e.validationMessage ? (i(), s("div", {
|
|
1770
1835
|
key: 1,
|
|
1771
1836
|
id: `${e.id}-feedback`,
|
|
1772
1837
|
class: "form-text"
|
|
1773
|
-
},
|
|
1774
|
-
e.validationState === "valid" ? (i(), s("div",
|
|
1838
|
+
}, m(e.helpText), 9, Ba)) : b("", !0),
|
|
1839
|
+
e.validationState === "valid" ? (i(), s("div", Na, m(e.validationMessage || "Looks good!"), 1)) : b("", !0),
|
|
1775
1840
|
e.validationState === "invalid" ? (i(), s("div", {
|
|
1776
1841
|
key: 3,
|
|
1777
1842
|
id: `${e.id}-feedback`,
|
|
1778
1843
|
class: "invalid-feedback",
|
|
1779
1844
|
style: { display: "block" }
|
|
1780
|
-
},
|
|
1845
|
+
}, m(e.validationMessage || "Please provide a valid value."), 9, Ta)) : b("", !0)
|
|
1781
1846
|
]));
|
|
1782
1847
|
}
|
|
1783
|
-
}),
|
|
1848
|
+
}), qa = { class: "mb-3" }, Pa = ["for"], Fa = {
|
|
1784
1849
|
key: 0,
|
|
1785
1850
|
class: "text-danger"
|
|
1786
|
-
},
|
|
1851
|
+
}, La = ["id", "value", "disabled", "required", "multiple", "size", "aria-invalid", "aria-describedby"], za = ["selected"], ja = ["value", "disabled"], Aa = ["id"], Ia = {
|
|
1787
1852
|
key: 2,
|
|
1788
1853
|
class: "valid-feedback",
|
|
1789
1854
|
style: { display: "block" }
|
|
1790
|
-
},
|
|
1855
|
+
}, Oa = ["id"], Da = /* @__PURE__ */ x({
|
|
1791
1856
|
__name: "VibeFormSelect",
|
|
1792
1857
|
props: {
|
|
1793
1858
|
modelValue: {
|
|
@@ -1813,26 +1878,26 @@ const fe = /* @__PURE__ */ C({
|
|
|
1813
1878
|
emits: ["update:modelValue", "validate", "blur", "focus", "change"],
|
|
1814
1879
|
setup(e, { emit: f }) {
|
|
1815
1880
|
const t = e, a = f, l = y(() => {
|
|
1816
|
-
const
|
|
1817
|
-
return t.size &&
|
|
1818
|
-
}), r = (
|
|
1819
|
-
const
|
|
1881
|
+
const o = ["form-select"];
|
|
1882
|
+
return t.size && o.push(`form-select-${t.size}`), t.validationState === "valid" && o.push("is-valid"), t.validationState === "invalid" && o.push("is-invalid"), o.join(" ");
|
|
1883
|
+
}), r = (o) => {
|
|
1884
|
+
const n = o.target;
|
|
1820
1885
|
let c;
|
|
1821
|
-
t.multiple ? c = Array.from(
|
|
1822
|
-
},
|
|
1823
|
-
a("blur",
|
|
1824
|
-
},
|
|
1825
|
-
a("focus",
|
|
1886
|
+
t.multiple ? c = Array.from(n.selectedOptions).map((p) => p.value) : c = n.value, a("update:modelValue", c), a("change", o), t.validateOn === "change" && a("validate");
|
|
1887
|
+
}, d = (o) => {
|
|
1888
|
+
a("blur", o), t.validateOn === "blur" && a("validate");
|
|
1889
|
+
}, u = (o) => {
|
|
1890
|
+
a("focus", o);
|
|
1826
1891
|
};
|
|
1827
|
-
return (
|
|
1892
|
+
return (o, n) => (i(), s("div", qa, [
|
|
1828
1893
|
e.label ? (i(), s("label", {
|
|
1829
1894
|
key: 0,
|
|
1830
1895
|
for: e.id,
|
|
1831
1896
|
class: "form-label"
|
|
1832
1897
|
}, [
|
|
1833
|
-
|
|
1834
|
-
e.required ? (i(), s("span",
|
|
1835
|
-
], 8,
|
|
1898
|
+
w(m(e.label) + " ", 1),
|
|
1899
|
+
e.required ? (i(), s("span", Fa, "*")) : b("", !0)
|
|
1900
|
+
], 8, Pa)) : b("", !0),
|
|
1836
1901
|
h("select", {
|
|
1837
1902
|
id: e.id,
|
|
1838
1903
|
class: g(l.value),
|
|
@@ -1844,47 +1909,47 @@ const fe = /* @__PURE__ */ C({
|
|
|
1844
1909
|
"aria-invalid": e.validationState === "invalid",
|
|
1845
1910
|
"aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
|
|
1846
1911
|
onChange: r,
|
|
1847
|
-
onBlur:
|
|
1848
|
-
onFocus:
|
|
1912
|
+
onBlur: d,
|
|
1913
|
+
onFocus: u
|
|
1849
1914
|
}, [
|
|
1850
1915
|
e.placeholder && !e.multiple ? (i(), s("option", {
|
|
1851
1916
|
key: 0,
|
|
1852
1917
|
value: "",
|
|
1853
1918
|
disabled: "",
|
|
1854
1919
|
selected: !e.modelValue
|
|
1855
|
-
},
|
|
1856
|
-
(i(!0), s(
|
|
1920
|
+
}, m(e.placeholder), 9, za)) : b("", !0),
|
|
1921
|
+
(i(!0), s(M, null, A(e.options, (c) => (i(), s("option", {
|
|
1857
1922
|
key: c.value,
|
|
1858
1923
|
value: c.value,
|
|
1859
1924
|
disabled: c.disabled
|
|
1860
|
-
},
|
|
1861
|
-
|
|
1862
|
-
], 42,
|
|
1925
|
+
}, m(c.text), 9, ja))), 128)),
|
|
1926
|
+
C(o.$slots, "default")
|
|
1927
|
+
], 42, La),
|
|
1863
1928
|
e.helpText && !e.validationMessage ? (i(), s("div", {
|
|
1864
1929
|
key: 1,
|
|
1865
1930
|
id: `${e.id}-feedback`,
|
|
1866
1931
|
class: "form-text"
|
|
1867
|
-
},
|
|
1868
|
-
e.validationState === "valid" ? (i(), s("div",
|
|
1932
|
+
}, m(e.helpText), 9, Aa)) : b("", !0),
|
|
1933
|
+
e.validationState === "valid" ? (i(), s("div", Ia, m(e.validationMessage || "Looks good!"), 1)) : b("", !0),
|
|
1869
1934
|
e.validationState === "invalid" ? (i(), s("div", {
|
|
1870
1935
|
key: 3,
|
|
1871
1936
|
id: `${e.id}-feedback`,
|
|
1872
1937
|
class: "invalid-feedback",
|
|
1873
1938
|
style: { display: "block" }
|
|
1874
|
-
},
|
|
1939
|
+
}, m(e.validationMessage || "Please select a valid option."), 9, Oa)) : b("", !0)
|
|
1875
1940
|
]));
|
|
1876
1941
|
}
|
|
1877
|
-
}),
|
|
1942
|
+
}), Ea = { class: "mb-3" }, Ra = ["for"], Xa = {
|
|
1878
1943
|
key: 0,
|
|
1879
1944
|
class: "text-danger"
|
|
1880
|
-
},
|
|
1945
|
+
}, Ya = ["id", "value", "placeholder", "disabled", "readonly", "required", "rows", "maxlength", "aria-invalid", "aria-describedby"], Ga = {
|
|
1881
1946
|
key: 1,
|
|
1882
1947
|
class: "form-text"
|
|
1883
|
-
},
|
|
1948
|
+
}, Ha = ["id"], Ka = {
|
|
1884
1949
|
key: 3,
|
|
1885
1950
|
class: "valid-feedback",
|
|
1886
1951
|
style: { display: "block" }
|
|
1887
|
-
},
|
|
1952
|
+
}, Ua = ["id"], Qa = /* @__PURE__ */ x({
|
|
1888
1953
|
__name: "VibeFormTextarea",
|
|
1889
1954
|
props: {
|
|
1890
1955
|
modelValue: {
|
|
@@ -1911,30 +1976,30 @@ const fe = /* @__PURE__ */ C({
|
|
|
1911
1976
|
emits: ["update:modelValue", "validate", "blur", "focus", "input", "change"],
|
|
1912
1977
|
setup(e, { emit: f }) {
|
|
1913
1978
|
const t = e, a = f, l = y(() => {
|
|
1914
|
-
const
|
|
1915
|
-
return t.size &&
|
|
1979
|
+
const v = ["form-control"];
|
|
1980
|
+
return t.size && v.push(`form-control-${t.size}`), t.validationState === "valid" && v.push("is-valid"), t.validationState === "invalid" && v.push("is-invalid"), v.join(" ");
|
|
1916
1981
|
}), r = y(() => {
|
|
1917
|
-
const
|
|
1918
|
-
return
|
|
1919
|
-
}),
|
|
1920
|
-
const p =
|
|
1921
|
-
a("update:modelValue", p.value), a("input",
|
|
1922
|
-
},
|
|
1923
|
-
a("change",
|
|
1924
|
-
},
|
|
1925
|
-
a("blur",
|
|
1926
|
-
}, c = (
|
|
1927
|
-
a("focus",
|
|
1982
|
+
const v = typeof t.modelValue == "string" ? t.modelValue : "";
|
|
1983
|
+
return v ? v.length : 0;
|
|
1984
|
+
}), d = y(() => t.maxlength ? `${r.value} / ${t.maxlength}` : `${r.value}`), u = (v) => {
|
|
1985
|
+
const p = v.target;
|
|
1986
|
+
a("update:modelValue", p.value), a("input", v), t.validateOn === "input" && a("validate");
|
|
1987
|
+
}, o = (v) => {
|
|
1988
|
+
a("change", v), t.validateOn === "change" && a("validate");
|
|
1989
|
+
}, n = (v) => {
|
|
1990
|
+
a("blur", v), t.validateOn === "blur" && a("validate");
|
|
1991
|
+
}, c = (v) => {
|
|
1992
|
+
a("focus", v);
|
|
1928
1993
|
};
|
|
1929
|
-
return (
|
|
1994
|
+
return (v, p) => (i(), s("div", Ea, [
|
|
1930
1995
|
e.label ? (i(), s("label", {
|
|
1931
1996
|
key: 0,
|
|
1932
1997
|
for: e.id,
|
|
1933
1998
|
class: "form-label"
|
|
1934
1999
|
}, [
|
|
1935
|
-
|
|
1936
|
-
e.required ? (i(), s("span",
|
|
1937
|
-
], 8,
|
|
2000
|
+
w(m(e.label) + " ", 1),
|
|
2001
|
+
e.required ? (i(), s("span", Xa, "*")) : b("", !0)
|
|
2002
|
+
], 8, Ra)) : b("", !0),
|
|
1938
2003
|
h("textarea", {
|
|
1939
2004
|
id: e.id,
|
|
1940
2005
|
class: g(l.value),
|
|
@@ -1947,34 +2012,34 @@ const fe = /* @__PURE__ */ C({
|
|
|
1947
2012
|
maxlength: e.maxlength,
|
|
1948
2013
|
"aria-invalid": e.validationState === "invalid",
|
|
1949
2014
|
"aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
|
|
1950
|
-
onInput:
|
|
1951
|
-
onChange:
|
|
1952
|
-
onBlur:
|
|
2015
|
+
onInput: u,
|
|
2016
|
+
onChange: o,
|
|
2017
|
+
onBlur: n,
|
|
1953
2018
|
onFocus: c
|
|
1954
|
-
}, null, 42,
|
|
1955
|
-
e.showCharCount ? (i(), s("div",
|
|
2019
|
+
}, null, 42, Ya),
|
|
2020
|
+
e.showCharCount ? (i(), s("div", Ga, m(d.value), 1)) : b("", !0),
|
|
1956
2021
|
e.helpText && !e.validationMessage && !e.showCharCount ? (i(), s("div", {
|
|
1957
2022
|
key: 2,
|
|
1958
2023
|
id: `${e.id}-feedback`,
|
|
1959
2024
|
class: "form-text"
|
|
1960
|
-
},
|
|
1961
|
-
e.validationState === "valid" ? (i(), s("div",
|
|
2025
|
+
}, m(e.helpText), 9, Ha)) : b("", !0),
|
|
2026
|
+
e.validationState === "valid" ? (i(), s("div", Ka, m(e.validationMessage || "Looks good!"), 1)) : b("", !0),
|
|
1962
2027
|
e.validationState === "invalid" ? (i(), s("div", {
|
|
1963
2028
|
key: 4,
|
|
1964
2029
|
id: `${e.id}-feedback`,
|
|
1965
2030
|
class: "invalid-feedback",
|
|
1966
2031
|
style: { display: "block" }
|
|
1967
|
-
},
|
|
2032
|
+
}, m(e.validationMessage || "Please provide a valid value."), 9, Ua)) : b("", !0)
|
|
1968
2033
|
]));
|
|
1969
2034
|
}
|
|
1970
|
-
}),
|
|
2035
|
+
}), Wa = { class: "mb-3" }, Ja = ["for"], Za = {
|
|
1971
2036
|
key: 0,
|
|
1972
2037
|
class: "text-danger"
|
|
1973
|
-
},
|
|
2038
|
+
}, _a = ["disabled"], el = ["id", "value", "disabled", "readonly", "required", "min", "max", "step", "aria-invalid", "aria-describedby"], tl = ["disabled"], al = ["id"], ll = {
|
|
1974
2039
|
key: 2,
|
|
1975
2040
|
class: "valid-feedback",
|
|
1976
2041
|
style: { display: "block" }
|
|
1977
|
-
},
|
|
2042
|
+
}, il = ["id"], sl = /* @__PURE__ */ x({
|
|
1978
2043
|
__name: "VibeFormSpinbutton",
|
|
1979
2044
|
props: {
|
|
1980
2045
|
modelValue: {
|
|
@@ -2002,51 +2067,51 @@ const fe = /* @__PURE__ */ C({
|
|
|
2002
2067
|
emits: ["update:modelValue", "validate", "blur", "focus", "input", "change", "increment", "decrement"],
|
|
2003
2068
|
setup(e, { emit: f }) {
|
|
2004
2069
|
const t = e, a = f, l = y(() => {
|
|
2005
|
-
const
|
|
2006
|
-
return t.size &&
|
|
2070
|
+
const $ = ["form-control"];
|
|
2071
|
+
return t.size && $.push(`form-control-${t.size}`), t.validationState === "valid" && $.push("is-valid"), t.validationState === "invalid" && $.push("is-invalid"), $.join(" ");
|
|
2007
2072
|
}), r = y(() => {
|
|
2008
|
-
const
|
|
2009
|
-
return t.size &&
|
|
2010
|
-
}),
|
|
2011
|
-
const
|
|
2012
|
-
let
|
|
2013
|
-
t.min !== void 0 &&
|
|
2014
|
-
},
|
|
2015
|
-
a("change",
|
|
2016
|
-
}, c = (
|
|
2017
|
-
a("blur",
|
|
2018
|
-
},
|
|
2019
|
-
a("focus",
|
|
2073
|
+
const $ = ["input-group"];
|
|
2074
|
+
return t.size && $.push(`input-group-${t.size}`), t.vertical && $.push("input-group-vertical"), $.join(" ");
|
|
2075
|
+
}), d = y(() => t.disabled || t.readonly ? !1 : t.min === void 0 || t.wrap ? !0 : t.modelValue > t.min), u = y(() => t.disabled || t.readonly ? !1 : t.max === void 0 || t.wrap ? !0 : t.modelValue < t.max), o = ($) => {
|
|
2076
|
+
const L = $.target;
|
|
2077
|
+
let z = L.value === "" ? 0 : Number(L.value);
|
|
2078
|
+
t.min !== void 0 && z < t.min && (z = t.min), t.max !== void 0 && z > t.max && (z = t.max), a("update:modelValue", z), a("input", $), t.validateOn === "input" && a("validate");
|
|
2079
|
+
}, n = ($) => {
|
|
2080
|
+
a("change", $), t.validateOn === "change" && a("validate");
|
|
2081
|
+
}, c = ($) => {
|
|
2082
|
+
a("blur", $), t.validateOn === "blur" && a("validate");
|
|
2083
|
+
}, v = ($) => {
|
|
2084
|
+
a("focus", $);
|
|
2020
2085
|
}, p = () => {
|
|
2021
|
-
if (!
|
|
2022
|
-
let
|
|
2023
|
-
t.max !== void 0 &&
|
|
2024
|
-
},
|
|
2025
|
-
if (!
|
|
2026
|
-
let
|
|
2027
|
-
t.min !== void 0 &&
|
|
2086
|
+
if (!u.value) return;
|
|
2087
|
+
let $ = t.modelValue + t.step;
|
|
2088
|
+
t.max !== void 0 && $ > t.max && ($ = t.wrap ? t.min ?? 0 : t.max), a("update:modelValue", $), a("increment", $), t.validateOn === "change" && a("validate");
|
|
2089
|
+
}, B = () => {
|
|
2090
|
+
if (!d.value) return;
|
|
2091
|
+
let $ = t.modelValue - t.step;
|
|
2092
|
+
t.min !== void 0 && $ < t.min && ($ = t.wrap ? t.max ?? 0 : t.min), a("update:modelValue", $), a("decrement", $), t.validateOn === "change" && a("validate");
|
|
2028
2093
|
};
|
|
2029
|
-
return (
|
|
2094
|
+
return ($, L) => (i(), s("div", Wa, [
|
|
2030
2095
|
e.label ? (i(), s("label", {
|
|
2031
2096
|
key: 0,
|
|
2032
2097
|
for: e.id,
|
|
2033
2098
|
class: "form-label"
|
|
2034
2099
|
}, [
|
|
2035
|
-
|
|
2036
|
-
e.required ? (i(), s("span",
|
|
2037
|
-
], 8,
|
|
2100
|
+
w(m(e.label) + " ", 1),
|
|
2101
|
+
e.required ? (i(), s("span", Za, "*")) : b("", !0)
|
|
2102
|
+
], 8, Ja)) : b("", !0),
|
|
2038
2103
|
h("div", {
|
|
2039
2104
|
class: g(r.value)
|
|
2040
2105
|
}, [
|
|
2041
2106
|
h("button", {
|
|
2042
2107
|
class: "btn btn-outline-secondary",
|
|
2043
2108
|
type: "button",
|
|
2044
|
-
disabled: !
|
|
2045
|
-
onClick:
|
|
2109
|
+
disabled: !d.value,
|
|
2110
|
+
onClick: B,
|
|
2046
2111
|
"aria-label": "Decrement"
|
|
2047
|
-
}, [...
|
|
2112
|
+
}, [...L[0] || (L[0] = [
|
|
2048
2113
|
h("span", { "aria-hidden": "true" }, "−", -1)
|
|
2049
|
-
])], 8,
|
|
2114
|
+
])], 8, _a),
|
|
2050
2115
|
h("input", {
|
|
2051
2116
|
id: e.id,
|
|
2052
2117
|
type: "number",
|
|
@@ -2060,43 +2125,43 @@ const fe = /* @__PURE__ */ C({
|
|
|
2060
2125
|
step: e.step,
|
|
2061
2126
|
"aria-invalid": e.validationState === "invalid",
|
|
2062
2127
|
"aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
|
|
2063
|
-
onInput:
|
|
2064
|
-
onChange:
|
|
2128
|
+
onInput: o,
|
|
2129
|
+
onChange: n,
|
|
2065
2130
|
onBlur: c,
|
|
2066
|
-
onFocus:
|
|
2067
|
-
}, null, 42,
|
|
2131
|
+
onFocus: v
|
|
2132
|
+
}, null, 42, el),
|
|
2068
2133
|
h("button", {
|
|
2069
2134
|
class: "btn btn-outline-secondary",
|
|
2070
2135
|
type: "button",
|
|
2071
|
-
disabled: !
|
|
2136
|
+
disabled: !u.value,
|
|
2072
2137
|
onClick: p,
|
|
2073
2138
|
"aria-label": "Increment"
|
|
2074
|
-
}, [...
|
|
2139
|
+
}, [...L[1] || (L[1] = [
|
|
2075
2140
|
h("span", { "aria-hidden": "true" }, "+", -1)
|
|
2076
|
-
])], 8,
|
|
2141
|
+
])], 8, tl)
|
|
2077
2142
|
], 2),
|
|
2078
2143
|
e.helpText && !e.validationMessage ? (i(), s("div", {
|
|
2079
2144
|
key: 1,
|
|
2080
2145
|
id: `${e.id}-feedback`,
|
|
2081
2146
|
class: "form-text"
|
|
2082
|
-
},
|
|
2083
|
-
e.validationState === "valid" ? (i(), s("div",
|
|
2147
|
+
}, m(e.helpText), 9, al)) : b("", !0),
|
|
2148
|
+
e.validationState === "valid" ? (i(), s("div", ll, m(e.validationMessage || "Looks good!"), 1)) : b("", !0),
|
|
2084
2149
|
e.validationState === "invalid" ? (i(), s("div", {
|
|
2085
2150
|
key: 3,
|
|
2086
2151
|
id: `${e.id}-feedback`,
|
|
2087
2152
|
class: "invalid-feedback",
|
|
2088
2153
|
style: { display: "block" }
|
|
2089
|
-
},
|
|
2154
|
+
}, m(e.validationMessage || "Please provide a valid value."), 9, il)) : b("", !0)
|
|
2090
2155
|
]));
|
|
2091
2156
|
}
|
|
2092
|
-
}),
|
|
2157
|
+
}), nl = /* @__PURE__ */ Q(sl, [["__scopeId", "data-v-fbee244e"]]), ol = { class: "mb-3" }, dl = ["for"], rl = {
|
|
2093
2158
|
key: 0,
|
|
2094
2159
|
class: "text-danger"
|
|
2095
|
-
},
|
|
2160
|
+
}, ul = ["id", "type", "value", "disabled", "readonly", "required", "min", "max", "aria-invalid", "aria-describedby"], cl = ["id"], fl = {
|
|
2096
2161
|
key: 2,
|
|
2097
2162
|
class: "valid-feedback",
|
|
2098
2163
|
style: { display: "block" }
|
|
2099
|
-
},
|
|
2164
|
+
}, vl = ["id"], bl = /* @__PURE__ */ x({
|
|
2100
2165
|
__name: "VibeFormDatepicker",
|
|
2101
2166
|
props: {
|
|
2102
2167
|
modelValue: {
|
|
@@ -2122,27 +2187,27 @@ const fe = /* @__PURE__ */ C({
|
|
|
2122
2187
|
emits: ["update:modelValue", "validate", "blur", "focus", "input", "change"],
|
|
2123
2188
|
setup(e, { emit: f }) {
|
|
2124
2189
|
const t = e, a = f, l = y(() => {
|
|
2125
|
-
const
|
|
2126
|
-
return t.size &&
|
|
2127
|
-
}), r = (
|
|
2128
|
-
const c =
|
|
2129
|
-
a("update:modelValue", c.value), a("input",
|
|
2130
|
-
},
|
|
2131
|
-
a("change",
|
|
2132
|
-
},
|
|
2133
|
-
a("blur",
|
|
2134
|
-
},
|
|
2135
|
-
a("focus",
|
|
2190
|
+
const n = ["form-control"];
|
|
2191
|
+
return t.size && n.push(`form-control-${t.size}`), t.validationState === "valid" && n.push("is-valid"), t.validationState === "invalid" && n.push("is-invalid"), n.join(" ");
|
|
2192
|
+
}), r = (n) => {
|
|
2193
|
+
const c = n.target;
|
|
2194
|
+
a("update:modelValue", c.value), a("input", n), t.validateOn === "input" && a("validate");
|
|
2195
|
+
}, d = (n) => {
|
|
2196
|
+
a("change", n), t.validateOn === "change" && a("validate");
|
|
2197
|
+
}, u = (n) => {
|
|
2198
|
+
a("blur", n), t.validateOn === "blur" && a("validate");
|
|
2199
|
+
}, o = (n) => {
|
|
2200
|
+
a("focus", n);
|
|
2136
2201
|
};
|
|
2137
|
-
return (
|
|
2202
|
+
return (n, c) => (i(), s("div", ol, [
|
|
2138
2203
|
e.label ? (i(), s("label", {
|
|
2139
2204
|
key: 0,
|
|
2140
2205
|
for: e.id,
|
|
2141
2206
|
class: "form-label"
|
|
2142
2207
|
}, [
|
|
2143
|
-
|
|
2144
|
-
e.required ? (i(), s("span",
|
|
2145
|
-
], 8,
|
|
2208
|
+
w(m(e.label) + " ", 1),
|
|
2209
|
+
e.required ? (i(), s("span", rl, "*")) : b("", !0)
|
|
2210
|
+
], 8, dl)) : b("", !0),
|
|
2146
2211
|
h("input", {
|
|
2147
2212
|
id: e.id,
|
|
2148
2213
|
type: e.type,
|
|
@@ -2156,32 +2221,32 @@ const fe = /* @__PURE__ */ C({
|
|
|
2156
2221
|
"aria-invalid": e.validationState === "invalid",
|
|
2157
2222
|
"aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
|
|
2158
2223
|
onInput: r,
|
|
2159
|
-
onChange:
|
|
2160
|
-
onBlur:
|
|
2161
|
-
onFocus:
|
|
2162
|
-
}, null, 42,
|
|
2224
|
+
onChange: d,
|
|
2225
|
+
onBlur: u,
|
|
2226
|
+
onFocus: o
|
|
2227
|
+
}, null, 42, ul),
|
|
2163
2228
|
e.helpText && !e.validationMessage ? (i(), s("div", {
|
|
2164
2229
|
key: 1,
|
|
2165
2230
|
id: `${e.id}-feedback`,
|
|
2166
2231
|
class: "form-text"
|
|
2167
|
-
},
|
|
2168
|
-
e.validationState === "valid" ? (i(), s("div",
|
|
2232
|
+
}, m(e.helpText), 9, cl)) : b("", !0),
|
|
2233
|
+
e.validationState === "valid" ? (i(), s("div", fl, m(e.validationMessage || "Looks good!"), 1)) : b("", !0),
|
|
2169
2234
|
e.validationState === "invalid" ? (i(), s("div", {
|
|
2170
2235
|
key: 3,
|
|
2171
2236
|
id: `${e.id}-feedback`,
|
|
2172
2237
|
class: "invalid-feedback",
|
|
2173
2238
|
style: { display: "block" }
|
|
2174
|
-
},
|
|
2239
|
+
}, m(e.validationMessage || "Please provide a valid date."), 9, vl)) : b("", !0)
|
|
2175
2240
|
]));
|
|
2176
2241
|
}
|
|
2177
|
-
}),
|
|
2242
|
+
}), ml = ["id", "checked", "value", "disabled", "required", "indeterminate", "aria-invalid", "aria-describedby"], hl = ["for"], yl = {
|
|
2178
2243
|
key: 0,
|
|
2179
2244
|
class: "text-danger"
|
|
2180
|
-
},
|
|
2245
|
+
}, gl = ["id"], pl = {
|
|
2181
2246
|
key: 2,
|
|
2182
2247
|
class: "valid-feedback",
|
|
2183
2248
|
style: { display: "block" }
|
|
2184
|
-
},
|
|
2249
|
+
}, kl = ["id"], $l = /* @__PURE__ */ x({
|
|
2185
2250
|
__name: "VibeFormCheckbox",
|
|
2186
2251
|
props: {
|
|
2187
2252
|
modelValue: {
|
|
@@ -2210,72 +2275,72 @@ const fe = /* @__PURE__ */ C({
|
|
|
2210
2275
|
}), r = y(() => {
|
|
2211
2276
|
const c = ["form-check"];
|
|
2212
2277
|
return t.inline && c.push("form-check-inline"), c.join(" ");
|
|
2213
|
-
}),
|
|
2214
|
-
const
|
|
2278
|
+
}), d = y(() => Array.isArray(t.modelValue) ? t.modelValue.includes(t.value) : t.modelValue === t.value || t.modelValue === !0), u = (c) => {
|
|
2279
|
+
const v = c.target;
|
|
2215
2280
|
let p;
|
|
2216
2281
|
if (Array.isArray(t.modelValue))
|
|
2217
|
-
if (p = [...t.modelValue],
|
|
2282
|
+
if (p = [...t.modelValue], v.checked)
|
|
2218
2283
|
p.includes(t.value) || p.push(t.value);
|
|
2219
2284
|
else {
|
|
2220
|
-
const
|
|
2221
|
-
|
|
2285
|
+
const B = p.indexOf(t.value);
|
|
2286
|
+
B > -1 && p.splice(B, 1);
|
|
2222
2287
|
}
|
|
2223
2288
|
else
|
|
2224
|
-
p =
|
|
2289
|
+
p = v.checked;
|
|
2225
2290
|
a("update:modelValue", p), a("change", c), t.validateOn === "change" && a("validate");
|
|
2226
|
-
},
|
|
2291
|
+
}, o = (c) => {
|
|
2227
2292
|
a("blur", c), t.validateOn === "blur" && a("validate");
|
|
2228
|
-
},
|
|
2293
|
+
}, n = (c) => {
|
|
2229
2294
|
a("focus", c);
|
|
2230
2295
|
};
|
|
2231
|
-
return (c,
|
|
2296
|
+
return (c, v) => (i(), s("div", {
|
|
2232
2297
|
class: g(r.value)
|
|
2233
2298
|
}, [
|
|
2234
2299
|
h("input", {
|
|
2235
2300
|
id: e.id,
|
|
2236
2301
|
type: "checkbox",
|
|
2237
2302
|
class: g(l.value),
|
|
2238
|
-
checked:
|
|
2303
|
+
checked: d.value,
|
|
2239
2304
|
value: e.value,
|
|
2240
2305
|
disabled: e.disabled,
|
|
2241
2306
|
required: e.required,
|
|
2242
2307
|
indeterminate: e.indeterminate,
|
|
2243
2308
|
"aria-invalid": e.validationState === "invalid",
|
|
2244
2309
|
"aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
|
|
2245
|
-
onChange:
|
|
2246
|
-
onBlur:
|
|
2247
|
-
onFocus:
|
|
2248
|
-
}, null, 42,
|
|
2310
|
+
onChange: u,
|
|
2311
|
+
onBlur: o,
|
|
2312
|
+
onFocus: n
|
|
2313
|
+
}, null, 42, ml),
|
|
2249
2314
|
e.label ? (i(), s("label", {
|
|
2250
2315
|
key: 0,
|
|
2251
2316
|
for: e.id,
|
|
2252
2317
|
class: "form-check-label"
|
|
2253
2318
|
}, [
|
|
2254
|
-
|
|
2255
|
-
e.required ? (i(), s("span",
|
|
2256
|
-
], 8,
|
|
2319
|
+
w(m(e.label) + " ", 1),
|
|
2320
|
+
e.required ? (i(), s("span", yl, "*")) : b("", !0)
|
|
2321
|
+
], 8, hl)) : b("", !0),
|
|
2257
2322
|
e.helpText && !e.validationMessage ? (i(), s("div", {
|
|
2258
2323
|
key: 1,
|
|
2259
2324
|
id: `${e.id}-feedback`,
|
|
2260
2325
|
class: "form-text"
|
|
2261
|
-
},
|
|
2262
|
-
e.validationState === "valid" ? (i(), s("div",
|
|
2326
|
+
}, m(e.helpText), 9, gl)) : b("", !0),
|
|
2327
|
+
e.validationState === "valid" ? (i(), s("div", pl, m(e.validationMessage || "Looks good!"), 1)) : b("", !0),
|
|
2263
2328
|
e.validationState === "invalid" ? (i(), s("div", {
|
|
2264
2329
|
key: 3,
|
|
2265
2330
|
id: `${e.id}-feedback`,
|
|
2266
2331
|
class: "invalid-feedback",
|
|
2267
2332
|
style: { display: "block" }
|
|
2268
|
-
},
|
|
2333
|
+
}, m(e.validationMessage || "You must check this box."), 9, kl)) : b("", !0)
|
|
2269
2334
|
], 2));
|
|
2270
2335
|
}
|
|
2271
|
-
}),
|
|
2336
|
+
}), Sl = ["id", "checked", "value", "name", "disabled", "required", "aria-invalid", "aria-describedby"], Vl = ["for"], Cl = {
|
|
2272
2337
|
key: 0,
|
|
2273
2338
|
class: "text-danger"
|
|
2274
|
-
},
|
|
2339
|
+
}, xl = ["id"], wl = {
|
|
2275
2340
|
key: 2,
|
|
2276
2341
|
class: "valid-feedback",
|
|
2277
2342
|
style: { display: "block" }
|
|
2278
|
-
},
|
|
2343
|
+
}, Bl = ["id"], Nl = /* @__PURE__ */ x({
|
|
2279
2344
|
__name: "VibeFormRadio",
|
|
2280
2345
|
props: {
|
|
2281
2346
|
modelValue: {
|
|
@@ -2304,61 +2369,61 @@ const fe = /* @__PURE__ */ C({
|
|
|
2304
2369
|
}), r = y(() => {
|
|
2305
2370
|
const c = ["form-check"];
|
|
2306
2371
|
return t.inline && c.push("form-check-inline"), c.join(" ");
|
|
2307
|
-
}),
|
|
2372
|
+
}), d = y(() => t.modelValue === t.value), u = (c) => {
|
|
2308
2373
|
c.target.checked && a("update:modelValue", t.value), a("change", c), t.validateOn === "change" && a("validate");
|
|
2309
|
-
},
|
|
2374
|
+
}, o = (c) => {
|
|
2310
2375
|
a("blur", c), t.validateOn === "blur" && a("validate");
|
|
2311
|
-
},
|
|
2376
|
+
}, n = (c) => {
|
|
2312
2377
|
a("focus", c);
|
|
2313
2378
|
};
|
|
2314
|
-
return (c,
|
|
2379
|
+
return (c, v) => (i(), s("div", {
|
|
2315
2380
|
class: g(r.value)
|
|
2316
2381
|
}, [
|
|
2317
2382
|
h("input", {
|
|
2318
2383
|
id: e.id,
|
|
2319
2384
|
type: "radio",
|
|
2320
2385
|
class: g(l.value),
|
|
2321
|
-
checked:
|
|
2386
|
+
checked: d.value,
|
|
2322
2387
|
value: e.value,
|
|
2323
2388
|
name: e.name,
|
|
2324
2389
|
disabled: e.disabled,
|
|
2325
2390
|
required: e.required,
|
|
2326
2391
|
"aria-invalid": e.validationState === "invalid",
|
|
2327
2392
|
"aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
|
|
2328
|
-
onChange:
|
|
2329
|
-
onBlur:
|
|
2330
|
-
onFocus:
|
|
2331
|
-
}, null, 42,
|
|
2393
|
+
onChange: u,
|
|
2394
|
+
onBlur: o,
|
|
2395
|
+
onFocus: n
|
|
2396
|
+
}, null, 42, Sl),
|
|
2332
2397
|
e.label ? (i(), s("label", {
|
|
2333
2398
|
key: 0,
|
|
2334
2399
|
for: e.id,
|
|
2335
2400
|
class: "form-check-label"
|
|
2336
2401
|
}, [
|
|
2337
|
-
|
|
2338
|
-
e.required ? (i(), s("span",
|
|
2339
|
-
], 8,
|
|
2402
|
+
w(m(e.label) + " ", 1),
|
|
2403
|
+
e.required ? (i(), s("span", Cl, "*")) : b("", !0)
|
|
2404
|
+
], 8, Vl)) : b("", !0),
|
|
2340
2405
|
e.helpText && !e.validationMessage ? (i(), s("div", {
|
|
2341
2406
|
key: 1,
|
|
2342
2407
|
id: `${e.id}-feedback`,
|
|
2343
2408
|
class: "form-text"
|
|
2344
|
-
},
|
|
2345
|
-
e.validationState === "valid" ? (i(), s("div",
|
|
2409
|
+
}, m(e.helpText), 9, xl)) : b("", !0),
|
|
2410
|
+
e.validationState === "valid" ? (i(), s("div", wl, m(e.validationMessage || "Looks good!"), 1)) : b("", !0),
|
|
2346
2411
|
e.validationState === "invalid" ? (i(), s("div", {
|
|
2347
2412
|
key: 3,
|
|
2348
2413
|
id: `${e.id}-feedback`,
|
|
2349
2414
|
class: "invalid-feedback",
|
|
2350
2415
|
style: { display: "block" }
|
|
2351
|
-
},
|
|
2416
|
+
}, m(e.validationMessage || "Please select an option."), 9, Bl)) : b("", !0)
|
|
2352
2417
|
], 2));
|
|
2353
2418
|
}
|
|
2354
|
-
}),
|
|
2419
|
+
}), Tl = { class: "form-check form-switch" }, Ml = ["id", "checked", "disabled", "required", "aria-invalid", "aria-describedby"], ql = ["for"], Pl = {
|
|
2355
2420
|
key: 0,
|
|
2356
2421
|
class: "text-danger"
|
|
2357
|
-
},
|
|
2422
|
+
}, Fl = ["id"], Ll = {
|
|
2358
2423
|
key: 2,
|
|
2359
2424
|
class: "valid-feedback",
|
|
2360
2425
|
style: { display: "block" }
|
|
2361
|
-
},
|
|
2426
|
+
}, zl = ["id"], jl = /* @__PURE__ */ x({
|
|
2362
2427
|
__name: "VibeFormSwitch",
|
|
2363
2428
|
props: {
|
|
2364
2429
|
modelValue: {
|
|
@@ -2379,17 +2444,17 @@ const fe = /* @__PURE__ */ C({
|
|
|
2379
2444
|
emits: ["update:modelValue", "validate", "blur", "focus", "change"],
|
|
2380
2445
|
setup(e, { emit: f }) {
|
|
2381
2446
|
const t = e, a = f, l = y(() => {
|
|
2382
|
-
const
|
|
2383
|
-
return t.validationState === "valid" &&
|
|
2384
|
-
}), r = (
|
|
2385
|
-
const
|
|
2386
|
-
a("update:modelValue",
|
|
2387
|
-
},
|
|
2388
|
-
a("blur",
|
|
2389
|
-
},
|
|
2390
|
-
a("focus",
|
|
2447
|
+
const o = ["form-check-input"];
|
|
2448
|
+
return t.validationState === "valid" && o.push("is-valid"), t.validationState === "invalid" && o.push("is-invalid"), o.join(" ");
|
|
2449
|
+
}), r = (o) => {
|
|
2450
|
+
const n = o.target;
|
|
2451
|
+
a("update:modelValue", n.checked), a("change", o), t.validateOn === "change" && a("validate");
|
|
2452
|
+
}, d = (o) => {
|
|
2453
|
+
a("blur", o), t.validateOn === "blur" && a("validate");
|
|
2454
|
+
}, u = (o) => {
|
|
2455
|
+
a("focus", o);
|
|
2391
2456
|
};
|
|
2392
|
-
return (
|
|
2457
|
+
return (o, n) => (i(), s("div", Tl, [
|
|
2393
2458
|
h("input", {
|
|
2394
2459
|
id: e.id,
|
|
2395
2460
|
type: "checkbox",
|
|
@@ -2401,46 +2466,46 @@ const fe = /* @__PURE__ */ C({
|
|
|
2401
2466
|
"aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
|
|
2402
2467
|
role: "switch",
|
|
2403
2468
|
onChange: r,
|
|
2404
|
-
onBlur:
|
|
2405
|
-
onFocus:
|
|
2406
|
-
}, null, 42,
|
|
2469
|
+
onBlur: d,
|
|
2470
|
+
onFocus: u
|
|
2471
|
+
}, null, 42, Ml),
|
|
2407
2472
|
e.label ? (i(), s("label", {
|
|
2408
2473
|
key: 0,
|
|
2409
2474
|
for: e.id,
|
|
2410
2475
|
class: "form-check-label"
|
|
2411
2476
|
}, [
|
|
2412
|
-
|
|
2413
|
-
e.required ? (i(), s("span",
|
|
2414
|
-
], 8,
|
|
2477
|
+
w(m(e.label) + " ", 1),
|
|
2478
|
+
e.required ? (i(), s("span", Pl, "*")) : b("", !0)
|
|
2479
|
+
], 8, ql)) : b("", !0),
|
|
2415
2480
|
e.helpText && !e.validationMessage ? (i(), s("div", {
|
|
2416
2481
|
key: 1,
|
|
2417
2482
|
id: `${e.id}-feedback`,
|
|
2418
2483
|
class: "form-text"
|
|
2419
|
-
},
|
|
2420
|
-
e.validationState === "valid" ? (i(), s("div",
|
|
2484
|
+
}, m(e.helpText), 9, Fl)) : b("", !0),
|
|
2485
|
+
e.validationState === "valid" ? (i(), s("div", Ll, m(e.validationMessage || "Looks good!"), 1)) : b("", !0),
|
|
2421
2486
|
e.validationState === "invalid" ? (i(), s("div", {
|
|
2422
2487
|
key: 3,
|
|
2423
2488
|
id: `${e.id}-feedback`,
|
|
2424
2489
|
class: "invalid-feedback",
|
|
2425
2490
|
style: { display: "block" }
|
|
2426
|
-
},
|
|
2491
|
+
}, m(e.validationMessage || "You must toggle this switch."), 9, zl)) : b("", !0)
|
|
2427
2492
|
]));
|
|
2428
2493
|
}
|
|
2429
|
-
}),
|
|
2494
|
+
}), Al = ["for"], Il = {
|
|
2430
2495
|
key: 0,
|
|
2431
2496
|
class: "text-danger"
|
|
2432
|
-
},
|
|
2497
|
+
}, Ol = ["id"], Dl = {
|
|
2433
2498
|
key: 1,
|
|
2434
2499
|
class: "valid-feedback",
|
|
2435
2500
|
style: { display: "block" }
|
|
2436
|
-
},
|
|
2501
|
+
}, El = ["id"], Rl = ["for"], Xl = {
|
|
2437
2502
|
key: 0,
|
|
2438
2503
|
class: "text-danger"
|
|
2439
|
-
},
|
|
2504
|
+
}, Yl = ["id"], Gl = {
|
|
2440
2505
|
key: 2,
|
|
2441
2506
|
class: "valid-feedback",
|
|
2442
2507
|
style: { display: "block" }
|
|
2443
|
-
},
|
|
2508
|
+
}, Hl = ["id"], Kl = /* @__PURE__ */ x({
|
|
2444
2509
|
__name: "VibeFormGroup",
|
|
2445
2510
|
props: {
|
|
2446
2511
|
label: { type: String, default: void 0 },
|
|
@@ -2456,13 +2521,13 @@ const fe = /* @__PURE__ */ C({
|
|
|
2456
2521
|
},
|
|
2457
2522
|
setup(e) {
|
|
2458
2523
|
const f = e, t = y(() => {
|
|
2459
|
-
const
|
|
2460
|
-
return f.floating ?
|
|
2524
|
+
const d = [];
|
|
2525
|
+
return f.floating ? d.push("form-floating") : f.row ? d.push("row", "mb-3") : d.push("mb-3"), d.join(" ");
|
|
2461
2526
|
}), a = y(() => {
|
|
2462
|
-
const
|
|
2463
|
-
return f.floating ?
|
|
2527
|
+
const d = [];
|
|
2528
|
+
return f.floating ? d.push("form-label") : f.row ? (d.push("col-form-label"), f.labelCols && d.push(`col-sm-${f.labelCols}`), f.labelAlign && d.push(`text-${f.labelAlign}`)) : d.push("form-label"), d.join(" ");
|
|
2464
2529
|
}), l = y(() => f.row && f.labelCols ? `col-sm-${12 - Number(f.labelCols)}` : ""), r = y(() => f.labelFor ? `${f.labelFor}-feedback` : void 0);
|
|
2465
|
-
return (
|
|
2530
|
+
return (d, u) => (i(), s("div", {
|
|
2466
2531
|
class: g(t.value)
|
|
2467
2532
|
}, [
|
|
2468
2533
|
e.label && !e.floating ? (i(), s("label", {
|
|
@@ -2470,63 +2535,63 @@ const fe = /* @__PURE__ */ C({
|
|
|
2470
2535
|
for: e.labelFor,
|
|
2471
2536
|
class: g(a.value)
|
|
2472
2537
|
}, [
|
|
2473
|
-
|
|
2474
|
-
e.required ? (i(), s("span",
|
|
2475
|
-
], 10,
|
|
2538
|
+
w(m(e.label) + " ", 1),
|
|
2539
|
+
e.required ? (i(), s("span", Il, "*")) : b("", !0)
|
|
2540
|
+
], 10, Al)) : b("", !0),
|
|
2476
2541
|
e.row && e.labelCols ? (i(), s("div", {
|
|
2477
2542
|
key: 1,
|
|
2478
2543
|
class: g(l.value)
|
|
2479
2544
|
}, [
|
|
2480
|
-
|
|
2545
|
+
C(d.$slots, "default"),
|
|
2481
2546
|
e.helpText && !e.validationMessage ? (i(), s("div", {
|
|
2482
2547
|
key: 0,
|
|
2483
2548
|
id: r.value,
|
|
2484
2549
|
class: "form-text"
|
|
2485
|
-
},
|
|
2486
|
-
e.validationState === "valid" ? (i(), s("div",
|
|
2550
|
+
}, m(e.helpText), 9, Ol)) : b("", !0),
|
|
2551
|
+
e.validationState === "valid" ? (i(), s("div", Dl, m(e.validationMessage || "Looks good!"), 1)) : b("", !0),
|
|
2487
2552
|
e.validationState === "invalid" ? (i(), s("div", {
|
|
2488
2553
|
key: 2,
|
|
2489
2554
|
id: r.value,
|
|
2490
2555
|
class: "invalid-feedback",
|
|
2491
2556
|
style: { display: "block" }
|
|
2492
|
-
},
|
|
2493
|
-
], 2)) : (i(), s(
|
|
2494
|
-
|
|
2557
|
+
}, m(e.validationMessage || "Please provide a valid value."), 9, El)) : b("", !0)
|
|
2558
|
+
], 2)) : (i(), s(M, { key: 2 }, [
|
|
2559
|
+
C(d.$slots, "default"),
|
|
2495
2560
|
e.label && e.floating ? (i(), s("label", {
|
|
2496
2561
|
key: 0,
|
|
2497
2562
|
for: e.labelFor,
|
|
2498
2563
|
class: g(a.value)
|
|
2499
2564
|
}, [
|
|
2500
|
-
|
|
2501
|
-
e.required ? (i(), s("span",
|
|
2502
|
-
], 10,
|
|
2565
|
+
w(m(e.label) + " ", 1),
|
|
2566
|
+
e.required ? (i(), s("span", Xl, "*")) : b("", !0)
|
|
2567
|
+
], 10, Rl)) : b("", !0),
|
|
2503
2568
|
e.helpText && !e.validationMessage ? (i(), s("div", {
|
|
2504
2569
|
key: 1,
|
|
2505
2570
|
id: r.value,
|
|
2506
2571
|
class: "form-text"
|
|
2507
|
-
},
|
|
2508
|
-
e.validationState === "valid" ? (i(), s("div",
|
|
2572
|
+
}, m(e.helpText), 9, Yl)) : b("", !0),
|
|
2573
|
+
e.validationState === "valid" ? (i(), s("div", Gl, m(e.validationMessage || "Looks good!"), 1)) : b("", !0),
|
|
2509
2574
|
e.validationState === "invalid" ? (i(), s("div", {
|
|
2510
2575
|
key: 3,
|
|
2511
2576
|
id: r.value,
|
|
2512
2577
|
class: "invalid-feedback",
|
|
2513
2578
|
style: { display: "block" }
|
|
2514
|
-
},
|
|
2579
|
+
}, m(e.validationMessage || "Please provide a valid value."), 9, Hl)) : b("", !0)
|
|
2515
2580
|
], 64))
|
|
2516
2581
|
], 2));
|
|
2517
2582
|
}
|
|
2518
|
-
}),
|
|
2583
|
+
}), Ul = { class: "mb-3" }, Ql = ["for"], Wl = {
|
|
2519
2584
|
key: 0,
|
|
2520
2585
|
class: "text-danger"
|
|
2521
|
-
},
|
|
2586
|
+
}, Jl = {
|
|
2522
2587
|
key: 1,
|
|
2523
2588
|
class: "alert alert-warning",
|
|
2524
2589
|
role: "alert"
|
|
2525
|
-
},
|
|
2590
|
+
}, Zl = ["id"], _l = ["id"], ei = {
|
|
2526
2591
|
key: 4,
|
|
2527
2592
|
class: "valid-feedback",
|
|
2528
2593
|
style: { display: "block" }
|
|
2529
|
-
},
|
|
2594
|
+
}, ti = ["id"], ai = /* @__PURE__ */ x({
|
|
2530
2595
|
__name: "VibeFormWysiwyg",
|
|
2531
2596
|
props: {
|
|
2532
2597
|
modelValue: {
|
|
@@ -2550,19 +2615,19 @@ const fe = /* @__PURE__ */ C({
|
|
|
2550
2615
|
},
|
|
2551
2616
|
emits: ["update:modelValue", "validate", "blur", "focus", "change", "ready"],
|
|
2552
2617
|
setup(e, { emit: f }) {
|
|
2553
|
-
const t = e, a = f, l = T(null), r = T(null),
|
|
2618
|
+
const t = e, a = f, l = T(null), r = T(null), d = T(!1), u = T(null), o = T(!1), n = T(null), c = T(null), v = T(null), p = y(() => {
|
|
2554
2619
|
const N = ["vibe-wysiwyg-container"];
|
|
2555
2620
|
return t.validationState === "valid" && N.push("is-valid"), t.validationState === "invalid" && N.push("is-invalid"), t.disabled && N.push("disabled"), N.join(" ");
|
|
2556
|
-
}),
|
|
2621
|
+
}), B = [
|
|
2557
2622
|
[{ header: [1, 2, 3, !1] }],
|
|
2558
2623
|
["bold", "italic", "underline", "strike"],
|
|
2559
2624
|
[{ list: "ordered" }, { list: "bullet" }],
|
|
2560
2625
|
[{ color: [] }, { background: [] }],
|
|
2561
2626
|
["link", "image"],
|
|
2562
2627
|
["clean"]
|
|
2563
|
-
],
|
|
2564
|
-
r.value && (
|
|
2565
|
-
},
|
|
2628
|
+
], $ = () => t.toolbar === !1 ? !1 : t.toolbar === !0 || t.toolbar === void 0 ? B : t.toolbar, L = (N) => {
|
|
2629
|
+
r.value && (o.value = !0, r.value.setContents([], "silent"), N && r.value.clipboard.dangerouslyPasteHTML(N, "silent"), o.value = !1);
|
|
2630
|
+
}, z = () => !r.value || r.value.getText().trim().length === 0 ? "" : r.value.getSemanticHTML();
|
|
2566
2631
|
return G(async () => {
|
|
2567
2632
|
try {
|
|
2568
2633
|
const N = await import("quill"), O = N.default || N;
|
|
@@ -2572,41 +2637,41 @@ const fe = /* @__PURE__ */ C({
|
|
|
2572
2637
|
placeholder: t.placeholder,
|
|
2573
2638
|
readOnly: t.readonly || t.disabled,
|
|
2574
2639
|
modules: {
|
|
2575
|
-
toolbar:
|
|
2640
|
+
toolbar: $()
|
|
2576
2641
|
}
|
|
2577
2642
|
};
|
|
2578
|
-
r.value = new O(l.value, K), t.modelValue &&
|
|
2579
|
-
if (
|
|
2580
|
-
const U =
|
|
2643
|
+
r.value = new O(l.value, K), t.modelValue && L(t.modelValue), v.value = () => {
|
|
2644
|
+
if (o.value) return;
|
|
2645
|
+
const U = z();
|
|
2581
2646
|
a("update:modelValue", U), a("change"), t.validateOn === "change" && a("validate");
|
|
2582
|
-
}, r.value.on("text-change",
|
|
2647
|
+
}, r.value.on("text-change", v.value), n.value = () => {
|
|
2583
2648
|
a("blur"), t.validateOn === "blur" && a("validate");
|
|
2584
|
-
}, r.value.root.addEventListener("blur",
|
|
2649
|
+
}, r.value.root.addEventListener("blur", n.value), c.value = () => {
|
|
2585
2650
|
a("focus");
|
|
2586
|
-
}, r.value.root.addEventListener("focus", c.value),
|
|
2651
|
+
}, r.value.root.addEventListener("focus", c.value), d.value = !0, a("ready", r.value);
|
|
2587
2652
|
}
|
|
2588
2653
|
} catch (N) {
|
|
2589
|
-
console.error("Failed to load Quill editor:", N),
|
|
2654
|
+
console.error("Failed to load Quill editor:", N), u.value = "Failed to load WYSIWYG editor. Please install quill: npm install quill", d.value = !1;
|
|
2590
2655
|
}
|
|
2591
2656
|
}), H(() => {
|
|
2592
|
-
r.value && (
|
|
2657
|
+
r.value && (v.value && (r.value.off("text-change", v.value), v.value = null), n.value && (r.value.root.removeEventListener("blur", n.value), n.value = null), c.value && (r.value.root.removeEventListener("focus", c.value), c.value = null), r.value = null);
|
|
2593
2658
|
}), E(() => t.modelValue, (N) => {
|
|
2594
2659
|
if (!r.value) return;
|
|
2595
|
-
|
|
2660
|
+
z() !== (N || "") && L(N || "");
|
|
2596
2661
|
}), E(() => t.disabled, (N) => {
|
|
2597
2662
|
r.value && r.value.enable(!N);
|
|
2598
2663
|
}), E(() => t.readonly, (N) => {
|
|
2599
2664
|
r.value && r.value.enable(!N);
|
|
2600
|
-
}), (N, O) => (i(), s("div",
|
|
2665
|
+
}), (N, O) => (i(), s("div", Ul, [
|
|
2601
2666
|
e.label ? (i(), s("label", {
|
|
2602
2667
|
key: 0,
|
|
2603
2668
|
for: e.id,
|
|
2604
2669
|
class: "form-label"
|
|
2605
2670
|
}, [
|
|
2606
|
-
|
|
2607
|
-
e.required ? (i(), s("span",
|
|
2608
|
-
], 8,
|
|
2609
|
-
|
|
2671
|
+
w(m(e.label) + " ", 1),
|
|
2672
|
+
e.required ? (i(), s("span", Wl, "*")) : b("", !0)
|
|
2673
|
+
], 8, Ql)) : b("", !0),
|
|
2674
|
+
u.value ? (i(), s("div", Jl, m(u.value), 1)) : (i(), s("div", {
|
|
2610
2675
|
key: 2,
|
|
2611
2676
|
class: g(p.value),
|
|
2612
2677
|
style: D({ minHeight: e.height })
|
|
@@ -2615,66 +2680,66 @@ const fe = /* @__PURE__ */ C({
|
|
|
2615
2680
|
ref_key: "editorContainer",
|
|
2616
2681
|
ref: l,
|
|
2617
2682
|
id: e.id
|
|
2618
|
-
}, null, 8,
|
|
2683
|
+
}, null, 8, Zl)
|
|
2619
2684
|
], 6)),
|
|
2620
2685
|
e.helpText && !e.validationMessage ? (i(), s("div", {
|
|
2621
2686
|
key: 3,
|
|
2622
2687
|
id: `${e.id}-feedback`,
|
|
2623
2688
|
class: "form-text"
|
|
2624
|
-
},
|
|
2625
|
-
e.validationState === "valid" ? (i(), s("div",
|
|
2689
|
+
}, m(e.helpText), 9, _l)) : b("", !0),
|
|
2690
|
+
e.validationState === "valid" ? (i(), s("div", ei, m(e.validationMessage || "Looks good!"), 1)) : b("", !0),
|
|
2626
2691
|
e.validationState === "invalid" ? (i(), s("div", {
|
|
2627
2692
|
key: 5,
|
|
2628
2693
|
id: `${e.id}-feedback`,
|
|
2629
2694
|
class: "invalid-feedback",
|
|
2630
2695
|
style: { display: "block" }
|
|
2631
|
-
},
|
|
2696
|
+
}, m(e.validationMessage || "Please provide valid content."), 9, ti)) : b("", !0)
|
|
2632
2697
|
]));
|
|
2633
2698
|
}
|
|
2634
|
-
}),
|
|
2699
|
+
}), li = /* @__PURE__ */ Q(ai, [["__scopeId", "data-v-8e6e81b0"]]), si = {
|
|
2635
2700
|
install(e) {
|
|
2636
|
-
e.component("VibeAlert", fe), e.component("VibeBadge", ve), e.component("VibeButton", be), e.component("VibeButtonGroup", he), e.component("VibeCloseButton", ge), e.component("VibeSpinner",
|
|
2701
|
+
e.component("VibeAlert", fe), e.component("VibeBadge", ve), e.component("VibeButton", be), e.component("VibeButtonGroup", he), e.component("VibeCloseButton", ge), e.component("VibeSpinner", ke), e.component("VibePlaceholder", $e), e.component("VibeContainer", Se), e.component("VibeRow", Ve), e.component("VibeCol", Ce), e.component("VibeCard", Pe), e.component("VibeBreadcrumb", je), e.component("VibeNav", Ae), e.component("VibeNavbar", Ie), e.component("VibeNavbarBrand", Oe), e.component("VibeNavbarToggle", Ee), e.component("VibeNavbarNav", Ke), e.component("VibePagination", Ze), e.component("VibeTabContent", et), e.component("VibeListGroup", tt), e.component("VibeProgress", lt), e.component("VibeAccordion", rt), e.component("VibeCollapse", ut), e.component("VibeDropdown", yt), e.component("VibeModal", Ct), e.component("VibeOffcanvas", Tt), e.component("VibeToast", Lt), e.component("VibeCarousel", Ht), e.component("VibeTooltip", Ut), e.component("VibePopover", Wt), e.component("VibeScrollspy", Jt), e.component("VibeIcon", Zt), e.component("VibeDataTable", Sa), e.component("VibeFormInput", Ma), e.component("VibeFormSelect", Da), e.component("VibeFormTextarea", Qa), e.component("VibeFormSpinbutton", nl), e.component("VibeFormDatepicker", bl), e.component("VibeFormCheckbox", $l), e.component("VibeFormRadio", Nl), e.component("VibeFormSwitch", jl), e.component("VibeFormGroup", Kl), e.component("VibeFormWysiwyg", li);
|
|
2637
2702
|
}
|
|
2638
2703
|
};
|
|
2639
|
-
function
|
|
2640
|
-
const f = T(e), t = T(null), a = T(""), l = T(!1), r = T(!1),
|
|
2641
|
-
if (!
|
|
2704
|
+
function ni(e = "") {
|
|
2705
|
+
const f = T(e), t = T(null), a = T(""), l = T(!1), r = T(!1), d = T(!1), u = async (B) => {
|
|
2706
|
+
if (!B)
|
|
2642
2707
|
return t.value = null, a.value = "", { valid: !0 };
|
|
2643
|
-
|
|
2708
|
+
d.value = !0;
|
|
2644
2709
|
try {
|
|
2645
|
-
const
|
|
2646
|
-
for (const
|
|
2647
|
-
const
|
|
2648
|
-
if (
|
|
2649
|
-
return t.value = "invalid", a.value = typeof
|
|
2710
|
+
const $ = Array.isArray(B) ? B : [{ validator: B }];
|
|
2711
|
+
for (const L of $) {
|
|
2712
|
+
const z = await L.validator(f.value);
|
|
2713
|
+
if (z === !1 || typeof z == "string")
|
|
2714
|
+
return t.value = "invalid", a.value = typeof z == "string" ? z : L.message || "Invalid value", d.value = !1, { valid: !1, message: a.value };
|
|
2650
2715
|
}
|
|
2651
|
-
return t.value = "valid", a.value = "",
|
|
2716
|
+
return t.value = "valid", a.value = "", d.value = !1, { valid: !0 };
|
|
2652
2717
|
} catch {
|
|
2653
|
-
return t.value = "invalid", a.value = "Validation error occurred",
|
|
2718
|
+
return t.value = "invalid", a.value = "Validation error occurred", d.value = !1, { valid: !1, message: a.value };
|
|
2654
2719
|
}
|
|
2655
|
-
},
|
|
2656
|
-
f.value = e, t.value = null, a.value = "", l.value = !1, r.value = !1,
|
|
2657
|
-
},
|
|
2720
|
+
}, o = () => {
|
|
2721
|
+
f.value = e, t.value = null, a.value = "", l.value = !1, r.value = !1, d.value = !1;
|
|
2722
|
+
}, n = () => {
|
|
2658
2723
|
r.value = !0;
|
|
2659
2724
|
}, c = () => {
|
|
2660
2725
|
l.value = !0;
|
|
2661
|
-
},
|
|
2726
|
+
}, v = y(() => t.value === "valid"), p = y(() => t.value === "invalid");
|
|
2662
2727
|
return {
|
|
2663
2728
|
value: f,
|
|
2664
2729
|
validationState: t,
|
|
2665
2730
|
validationMessage: a,
|
|
2666
2731
|
isDirty: l,
|
|
2667
2732
|
isTouched: r,
|
|
2668
|
-
isValidating:
|
|
2669
|
-
isValid:
|
|
2733
|
+
isValidating: d,
|
|
2734
|
+
isValid: v,
|
|
2670
2735
|
isInvalid: p,
|
|
2671
|
-
validate:
|
|
2672
|
-
reset:
|
|
2673
|
-
markAsTouched:
|
|
2736
|
+
validate: u,
|
|
2737
|
+
reset: o,
|
|
2738
|
+
markAsTouched: n,
|
|
2674
2739
|
markAsDirty: c
|
|
2675
2740
|
};
|
|
2676
2741
|
}
|
|
2677
|
-
const
|
|
2742
|
+
const oi = {
|
|
2678
2743
|
required: (e = "This field is required") => ({
|
|
2679
2744
|
validator: (f) => Array.isArray(f) ? f.length > 0 || e : typeof f == "string" ? f.trim().length > 0 || e : f != null && f !== "" || e,
|
|
2680
2745
|
message: e
|
|
@@ -2728,50 +2793,50 @@ const ai = {
|
|
|
2728
2793
|
})
|
|
2729
2794
|
};
|
|
2730
2795
|
export {
|
|
2731
|
-
|
|
2796
|
+
rt as VibeAccordion,
|
|
2732
2797
|
fe as VibeAlert,
|
|
2733
2798
|
ve as VibeBadge,
|
|
2734
2799
|
je as VibeBreadcrumb,
|
|
2735
2800
|
be as VibeButton,
|
|
2736
2801
|
he as VibeButtonGroup,
|
|
2737
2802
|
Pe as VibeCard,
|
|
2738
|
-
|
|
2803
|
+
Ht as VibeCarousel,
|
|
2739
2804
|
ge as VibeCloseButton,
|
|
2740
2805
|
Ce as VibeCol,
|
|
2741
|
-
|
|
2806
|
+
ut as VibeCollapse,
|
|
2742
2807
|
Se as VibeContainer,
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2808
|
+
Sa as VibeDataTable,
|
|
2809
|
+
yt as VibeDropdown,
|
|
2810
|
+
$l as VibeFormCheckbox,
|
|
2811
|
+
bl as VibeFormDatepicker,
|
|
2812
|
+
Kl as VibeFormGroup,
|
|
2813
|
+
Ma as VibeFormInput,
|
|
2814
|
+
Nl as VibeFormRadio,
|
|
2815
|
+
Da as VibeFormSelect,
|
|
2816
|
+
nl as VibeFormSpinbutton,
|
|
2817
|
+
jl as VibeFormSwitch,
|
|
2818
|
+
Qa as VibeFormTextarea,
|
|
2819
|
+
li as VibeFormWysiwyg,
|
|
2820
|
+
Zt as VibeIcon,
|
|
2821
|
+
tt as VibeListGroup,
|
|
2822
|
+
Ct as VibeModal,
|
|
2758
2823
|
Ae as VibeNav,
|
|
2759
2824
|
Ie as VibeNavbar,
|
|
2760
2825
|
Oe as VibeNavbarBrand,
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2826
|
+
Ke as VibeNavbarNav,
|
|
2827
|
+
Ee as VibeNavbarToggle,
|
|
2828
|
+
Tt as VibeOffcanvas,
|
|
2829
|
+
Ze as VibePagination,
|
|
2830
|
+
$e as VibePlaceholder,
|
|
2831
|
+
Wt as VibePopover,
|
|
2832
|
+
lt as VibeProgress,
|
|
2768
2833
|
Ve as VibeRow,
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2834
|
+
Jt as VibeScrollspy,
|
|
2835
|
+
ke as VibeSpinner,
|
|
2836
|
+
et as VibeTabContent,
|
|
2837
|
+
Lt as VibeToast,
|
|
2838
|
+
Ut as VibeTooltip,
|
|
2839
|
+
si as default,
|
|
2840
|
+
ni as useFormValidation,
|
|
2841
|
+
oi as validators
|
|
2777
2842
|
};
|