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