@velkymx/vibeui 0.7.0 → 0.8.1
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 +13 -8
- package/dist/components/VibeAccordion.vue.d.ts +2 -2
- package/dist/components/VibeAlert.vue.d.ts +9 -0
- package/dist/components/VibeBadge.vue.d.ts +9 -0
- package/dist/components/VibeButton.vue.d.ts +9 -0
- package/dist/components/VibeDataTable.vue.d.ts +3 -1
- package/dist/components/VibeDropdown.vue.d.ts +2 -2
- package/dist/components/VibeFormInput.vue.d.ts +19 -1
- package/dist/components/VibeFormWysiwyg.vue.d.ts +9 -0
- package/dist/components/VibeInputGroup.vue.d.ts +60 -0
- package/dist/components/VibeLink.vue.d.ts +112 -0
- package/dist/components/VibeNav.vue.d.ts +11 -2
- package/dist/components/index.d.ts +3 -1
- package/dist/composables/useBackButton.d.ts +9 -0
- package/dist/composables/useBreakpoints.d.ts +13 -0
- package/dist/composables/useColorMode.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/vibeui.css +1 -1
- package/dist/vibeui.es.js +1585 -1416
- package/dist/vibeui.umd.js +1 -1
- package/package.json +2 -1
package/dist/vibeui.es.js
CHANGED
|
@@ -1,82 +1,87 @@
|
|
|
1
|
-
import { defineComponent as M, ref as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as M, ref as L, onMounted as X, onBeforeUnmount as Y, watch as O, computed as h, openBlock as i, createElementBlock as s, normalizeClass as $, renderSlot as T, createTextVNode as I, toDisplayString as k, createCommentVNode as g, createBlock as q, resolveDynamicComponent as A, withCtx as j, createElementVNode as S, normalizeStyle as Z, Fragment as R, renderList as H, nextTick as se, reactive as Ce, provide as ge, unref as xe, inject as J, getCurrentInstance as ke, onUnmounted as Se, Teleport as fe, useModel as oe, withDirectives as he, vModelText as Be, vModelSelect as Le, withModifiers as le, mergeModels as pe } from "vue";
|
|
2
|
+
const Te = /* @__PURE__ */ M({
|
|
3
3
|
__name: "VibeAlert",
|
|
4
4
|
props: {
|
|
5
5
|
variant: { type: String, default: "primary" },
|
|
6
|
+
subtle: { type: Boolean, default: !1 },
|
|
6
7
|
modelValue: { type: Boolean, default: !0 },
|
|
7
8
|
dismissable: { type: Boolean, default: !1 },
|
|
8
9
|
message: { type: String, required: !0 },
|
|
9
10
|
fade: { type: Boolean, default: !0 }
|
|
10
11
|
},
|
|
11
12
|
emits: ["update:modelValue", "close", "closed", "component-error"],
|
|
12
|
-
setup(e, { emit:
|
|
13
|
-
const t = e, a =
|
|
13
|
+
setup(e, { emit: r }) {
|
|
14
|
+
const t = e, a = r, l = L(null), n = L(null), o = L(t.modelValue), d = () => {
|
|
14
15
|
a("close");
|
|
15
|
-
},
|
|
16
|
+
}, v = () => {
|
|
16
17
|
o.value = !1, a("update:modelValue", !1), a("closed");
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
+
X(async () => {
|
|
19
20
|
if (l.value)
|
|
20
21
|
try {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
} catch (
|
|
22
|
+
const V = (await import("bootstrap")).Alert;
|
|
23
|
+
n.value = new V(l.value), l.value.addEventListener("close.bs.alert", d), l.value.addEventListener("closed.bs.alert", v);
|
|
24
|
+
} catch (f) {
|
|
24
25
|
a("component-error", {
|
|
25
26
|
message: "Bootstrap JS not loaded. Alert will use basic Vue logic.",
|
|
26
27
|
componentName: "VibeAlert",
|
|
27
|
-
originalError:
|
|
28
|
+
originalError: f
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
|
-
}),
|
|
31
|
-
l.value && (l.value.removeEventListener("close.bs.alert",
|
|
32
|
-
}), O(() => t.modelValue, (
|
|
33
|
-
|
|
31
|
+
}), Y(() => {
|
|
32
|
+
l.value && (l.value.removeEventListener("close.bs.alert", d), l.value.removeEventListener("closed.bs.alert", v)), n.value && (n.value.dispose(), n.value = null);
|
|
33
|
+
}), O(() => t.modelValue, (f) => {
|
|
34
|
+
f ? o.value = !0 : n.value && o.value ? n.value.close() : o.value = !1;
|
|
34
35
|
});
|
|
35
36
|
const c = () => {
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
37
|
+
n.value ? n.value.close() : (o.value = !1, a("update:modelValue", !1), a("closed"));
|
|
38
|
+
}, m = h(() => {
|
|
39
|
+
const f = ["alert"];
|
|
40
|
+
return t.subtle ? f.push(`bg-${t.variant}-subtle`, `text-${t.variant}-emphasis`, `border-${t.variant}-subtle`) : f.push(`alert-${t.variant}`), t.dismissable && f.push("alert-dismissible"), t.fade && f.push("fade", "show"), f.join(" ");
|
|
41
|
+
});
|
|
42
|
+
return (f, V) => o.value ? (i(), s("div", {
|
|
39
43
|
key: 0,
|
|
40
44
|
ref_key: "alertRef",
|
|
41
45
|
ref: l,
|
|
42
|
-
class: $(
|
|
46
|
+
class: $(m.value),
|
|
43
47
|
role: "alert"
|
|
44
48
|
}, [
|
|
45
|
-
|
|
49
|
+
T(f.$slots, "default", {}, () => [
|
|
46
50
|
I(k(e.message), 1)
|
|
47
51
|
]),
|
|
48
|
-
e.dismissable ? (
|
|
52
|
+
e.dismissable ? (i(), s("button", {
|
|
49
53
|
key: 0,
|
|
50
54
|
type: "button",
|
|
51
55
|
class: "btn-close",
|
|
52
56
|
"aria-label": "Close",
|
|
53
57
|
onClick: c
|
|
54
|
-
})) :
|
|
55
|
-
], 2)) :
|
|
58
|
+
})) : g("", !0)
|
|
59
|
+
], 2)) : g("", !0);
|
|
56
60
|
}
|
|
57
|
-
}),
|
|
61
|
+
}), Ne = /* @__PURE__ */ M({
|
|
58
62
|
__name: "VibeBadge",
|
|
59
63
|
props: {
|
|
60
64
|
variant: { type: String, default: "primary" },
|
|
65
|
+
subtle: { type: Boolean, default: !1 },
|
|
61
66
|
pill: { type: Boolean, default: !1 },
|
|
62
67
|
tag: { type: String, default: "span" }
|
|
63
68
|
},
|
|
64
69
|
emits: ["component-error"],
|
|
65
|
-
setup(e, { emit:
|
|
66
|
-
const t = e, a =
|
|
67
|
-
const l = ["badge"
|
|
68
|
-
return t.pill && l.push("rounded-pill"), l.join(" ");
|
|
70
|
+
setup(e, { emit: r }) {
|
|
71
|
+
const t = e, a = h(() => {
|
|
72
|
+
const l = ["badge"];
|
|
73
|
+
return t.subtle ? l.push(`bg-${t.variant}-subtle`, `text-${t.variant}-emphasis`) : l.push(`bg-${t.variant}`), t.pill && l.push("rounded-pill"), l.join(" ");
|
|
69
74
|
});
|
|
70
|
-
return (l,
|
|
75
|
+
return (l, n) => (i(), q(A(e.tag), {
|
|
71
76
|
class: $(a.value)
|
|
72
77
|
}, {
|
|
73
78
|
default: j(() => [
|
|
74
|
-
|
|
79
|
+
T(l.$slots, "default")
|
|
75
80
|
]),
|
|
76
81
|
_: 3
|
|
77
82
|
}, 8, ["class"]));
|
|
78
83
|
}
|
|
79
|
-
}),
|
|
84
|
+
}), Ee = /* @__PURE__ */ M({
|
|
80
85
|
__name: "VibeButton",
|
|
81
86
|
props: {
|
|
82
87
|
variant: { type: String, default: "primary" },
|
|
@@ -86,18 +91,19 @@ const $e = /* @__PURE__ */ M({
|
|
|
86
91
|
type: { type: String, default: "button" },
|
|
87
92
|
href: { type: String, default: void 0 },
|
|
88
93
|
to: { type: [String, Object], default: void 0 },
|
|
89
|
-
active: { type: Boolean, default: !1 }
|
|
94
|
+
active: { type: Boolean, default: !1 },
|
|
95
|
+
focusRing: { type: Boolean, default: !1 }
|
|
90
96
|
},
|
|
91
97
|
emits: ["click", "component-error"],
|
|
92
|
-
setup(e, { emit:
|
|
93
|
-
const t = e, a =
|
|
94
|
-
const
|
|
95
|
-
return t.outline ?
|
|
96
|
-
}), o = (
|
|
97
|
-
t.disabled || a("click",
|
|
98
|
+
setup(e, { emit: r }) {
|
|
99
|
+
const t = e, a = r, l = h(() => t.href ? "a" : t.to ? "router-link" : "button"), n = h(() => {
|
|
100
|
+
const d = ["btn"];
|
|
101
|
+
return t.outline ? d.push(`btn-outline-${t.variant}`) : d.push(`btn-${t.variant}`), t.size && d.push(`btn-${t.size}`), t.active && d.push("active"), t.focusRing && d.push("focus-ring"), d.join(" ");
|
|
102
|
+
}), o = (d) => {
|
|
103
|
+
t.disabled || a("click", d);
|
|
98
104
|
};
|
|
99
|
-
return (
|
|
100
|
-
class: $(
|
|
105
|
+
return (d, v) => (i(), q(A(l.value), {
|
|
106
|
+
class: $(n.value),
|
|
101
107
|
type: e.href || e.to ? void 0 : e.type,
|
|
102
108
|
href: e.href,
|
|
103
109
|
to: e.to,
|
|
@@ -106,12 +112,12 @@ const $e = /* @__PURE__ */ M({
|
|
|
106
112
|
onClick: o
|
|
107
113
|
}, {
|
|
108
114
|
default: j(() => [
|
|
109
|
-
|
|
115
|
+
T(d.$slots, "default")
|
|
110
116
|
]),
|
|
111
117
|
_: 3
|
|
112
118
|
}, 8, ["class", "type", "href", "to", "disabled", "aria-disabled"]));
|
|
113
119
|
}
|
|
114
|
-
}),
|
|
120
|
+
}), Me = ["role", "aria-label"], Ie = /* @__PURE__ */ M({
|
|
115
121
|
__name: "VibeButtonGroup",
|
|
116
122
|
props: {
|
|
117
123
|
size: { type: String, default: void 0 },
|
|
@@ -120,20 +126,20 @@ const $e = /* @__PURE__ */ M({
|
|
|
120
126
|
ariaLabel: { type: String, default: void 0 }
|
|
121
127
|
},
|
|
122
128
|
emits: ["component-error"],
|
|
123
|
-
setup(e, { emit:
|
|
124
|
-
const t = e, a =
|
|
129
|
+
setup(e, { emit: r }) {
|
|
130
|
+
const t = e, a = h(() => {
|
|
125
131
|
const l = [t.vertical ? "btn-group-vertical" : "btn-group"];
|
|
126
132
|
return t.size && l.push(`btn-group-${t.size}`), l.join(" ");
|
|
127
133
|
});
|
|
128
|
-
return (l,
|
|
134
|
+
return (l, n) => (i(), s("div", {
|
|
129
135
|
class: $(a.value),
|
|
130
136
|
role: e.role,
|
|
131
137
|
"aria-label": e.ariaLabel
|
|
132
138
|
}, [
|
|
133
|
-
|
|
134
|
-
], 10,
|
|
139
|
+
T(l.$slots, "default")
|
|
140
|
+
], 10, Me));
|
|
135
141
|
}
|
|
136
|
-
}),
|
|
142
|
+
}), Re = ["disabled", "aria-label"], Fe = /* @__PURE__ */ M({
|
|
137
143
|
__name: "VibeCloseButton",
|
|
138
144
|
props: {
|
|
139
145
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -141,19 +147,19 @@ const $e = /* @__PURE__ */ M({
|
|
|
141
147
|
ariaLabel: { type: String, default: "Close" }
|
|
142
148
|
},
|
|
143
149
|
emits: ["click", "component-error"],
|
|
144
|
-
setup(e, { emit:
|
|
145
|
-
const t = e, a =
|
|
146
|
-
t.disabled || a("click",
|
|
150
|
+
setup(e, { emit: r }) {
|
|
151
|
+
const t = e, a = r, l = (n) => {
|
|
152
|
+
t.disabled || a("click", n);
|
|
147
153
|
};
|
|
148
|
-
return (
|
|
154
|
+
return (n, o) => (i(), s("button", {
|
|
149
155
|
type: "button",
|
|
150
156
|
class: $(["btn-close", { "btn-close-white": e.white }]),
|
|
151
157
|
disabled: e.disabled,
|
|
152
158
|
"aria-label": e.ariaLabel,
|
|
153
159
|
onClick: l
|
|
154
|
-
}, null, 10,
|
|
160
|
+
}, null, 10, Re));
|
|
155
161
|
}
|
|
156
|
-
}),
|
|
162
|
+
}), Pe = { class: "visually-hidden" }, qe = /* @__PURE__ */ M({
|
|
157
163
|
__name: "VibeSpinner",
|
|
158
164
|
props: {
|
|
159
165
|
variant: { type: String, default: void 0 },
|
|
@@ -163,22 +169,22 @@ const $e = /* @__PURE__ */ M({
|
|
|
163
169
|
tag: { type: String, default: "div" }
|
|
164
170
|
},
|
|
165
171
|
emits: ["component-error"],
|
|
166
|
-
setup(e, { emit:
|
|
167
|
-
const t = e, a =
|
|
172
|
+
setup(e, { emit: r }) {
|
|
173
|
+
const t = e, a = h(() => {
|
|
168
174
|
const l = [`spinner-${t.type}`];
|
|
169
175
|
return t.variant && l.push(`text-${t.variant}`), t.size && l.push(`spinner-${t.type}-${t.size}`), l.join(" ");
|
|
170
176
|
});
|
|
171
|
-
return (l,
|
|
177
|
+
return (l, n) => (i(), q(A(e.tag), {
|
|
172
178
|
class: $(a.value),
|
|
173
179
|
role: "status"
|
|
174
180
|
}, {
|
|
175
181
|
default: j(() => [
|
|
176
|
-
S("span",
|
|
182
|
+
S("span", Pe, k(e.label), 1)
|
|
177
183
|
]),
|
|
178
184
|
_: 1
|
|
179
185
|
}, 8, ["class"]));
|
|
180
186
|
}
|
|
181
|
-
}),
|
|
187
|
+
}), ze = /* @__PURE__ */ M({
|
|
182
188
|
__name: "VibePlaceholder",
|
|
183
189
|
props: {
|
|
184
190
|
variant: { type: String, default: void 0 },
|
|
@@ -188,49 +194,49 @@ const $e = /* @__PURE__ */ M({
|
|
|
188
194
|
tag: { type: String, default: "span" }
|
|
189
195
|
},
|
|
190
196
|
emits: ["component-error"],
|
|
191
|
-
setup(e, { emit:
|
|
192
|
-
const t = e, a =
|
|
197
|
+
setup(e, { emit: r }) {
|
|
198
|
+
const t = e, a = h(() => {
|
|
193
199
|
const o = ["placeholder"];
|
|
194
200
|
return t.variant && o.push(`bg-${t.variant}`), t.size && o.push(`placeholder-${t.size}`), o.join(" ");
|
|
195
|
-
}), l =
|
|
201
|
+
}), l = h(() => {
|
|
196
202
|
if (t.animation) return `placeholder-${t.animation}`;
|
|
197
|
-
}),
|
|
203
|
+
}), n = h(() => {
|
|
198
204
|
if (t.width)
|
|
199
205
|
return { width: typeof t.width == "number" ? `${t.width}%` : t.width };
|
|
200
206
|
});
|
|
201
|
-
return (o,
|
|
207
|
+
return (o, d) => (i(), q(A(e.tag), {
|
|
202
208
|
class: $(l.value)
|
|
203
209
|
}, {
|
|
204
210
|
default: j(() => [
|
|
205
211
|
S("span", {
|
|
206
212
|
class: $(a.value),
|
|
207
|
-
style:
|
|
213
|
+
style: Z(n.value)
|
|
208
214
|
}, [
|
|
209
|
-
|
|
215
|
+
T(o.$slots, "default")
|
|
210
216
|
], 6)
|
|
211
217
|
]),
|
|
212
218
|
_: 3
|
|
213
219
|
}, 8, ["class"]));
|
|
214
220
|
}
|
|
215
|
-
}),
|
|
221
|
+
}), Ae = /* @__PURE__ */ M({
|
|
216
222
|
__name: "VibeContainer",
|
|
217
223
|
props: {
|
|
218
224
|
fluid: { type: [Boolean, String], default: !1 },
|
|
219
225
|
tag: { type: String, default: "div" }
|
|
220
226
|
},
|
|
221
227
|
emits: ["component-error"],
|
|
222
|
-
setup(e, { emit:
|
|
223
|
-
const t = e, a =
|
|
224
|
-
return (l,
|
|
228
|
+
setup(e, { emit: r }) {
|
|
229
|
+
const t = e, a = h(() => t.fluid === !1 ? "container" : t.fluid === !0 ? "container-fluid" : `container-${t.fluid}`);
|
|
230
|
+
return (l, n) => (i(), q(A(e.tag), {
|
|
225
231
|
class: $(a.value)
|
|
226
232
|
}, {
|
|
227
233
|
default: j(() => [
|
|
228
|
-
|
|
234
|
+
T(l.$slots, "default")
|
|
229
235
|
]),
|
|
230
236
|
_: 3
|
|
231
237
|
}, 8, ["class"]));
|
|
232
238
|
}
|
|
233
|
-
}),
|
|
239
|
+
}), je = /* @__PURE__ */ M({
|
|
234
240
|
__name: "VibeRow",
|
|
235
241
|
props: {
|
|
236
242
|
tag: { type: String, default: "div" },
|
|
@@ -266,33 +272,33 @@ const $e = /* @__PURE__ */ M({
|
|
|
266
272
|
justifyContent: { type: String, default: void 0 }
|
|
267
273
|
},
|
|
268
274
|
emits: ["component-error"],
|
|
269
|
-
setup(e, { emit:
|
|
270
|
-
const t = e, a =
|
|
275
|
+
setup(e, { emit: r }) {
|
|
276
|
+
const t = e, a = h(() => {
|
|
271
277
|
const l = ["row"];
|
|
272
278
|
t.gutters !== void 0 && l.push(`g-${t.gutters}`), t.guttersX !== void 0 && l.push(`gx-${t.guttersX}`), t.guttersY !== void 0 && l.push(`gy-${t.guttersY}`);
|
|
273
|
-
const
|
|
274
|
-
return
|
|
275
|
-
const
|
|
276
|
-
t[
|
|
277
|
-
const c = `guttersX${
|
|
279
|
+
const n = ["sm", "md", "lg", "xl", "xxl"];
|
|
280
|
+
return n.forEach((o) => {
|
|
281
|
+
const d = o.charAt(0).toUpperCase() + o.slice(1), v = `gutters${d}`;
|
|
282
|
+
t[v] !== void 0 && l.push(`g-${o}-${t[v]}`);
|
|
283
|
+
const c = `guttersX${d}`;
|
|
278
284
|
t[c] !== void 0 && l.push(`gx-${o}-${t[c]}`);
|
|
279
|
-
const
|
|
280
|
-
t[
|
|
281
|
-
}), t.rowCols !== void 0 && l.push(`row-cols-${t.rowCols}`),
|
|
282
|
-
const
|
|
283
|
-
t[
|
|
285
|
+
const m = `guttersY${d}`;
|
|
286
|
+
t[m] !== void 0 && l.push(`gy-${o}-${t[m]}`);
|
|
287
|
+
}), t.rowCols !== void 0 && l.push(`row-cols-${t.rowCols}`), n.forEach((o) => {
|
|
288
|
+
const d = `rowCols${o.charAt(0).toUpperCase() + o.slice(1)}`;
|
|
289
|
+
t[d] !== void 0 && l.push(`row-cols-${o}-${t[d]}`);
|
|
284
290
|
}), t.alignItems && l.push(`align-items-${t.alignItems}`), t.justifyContent && l.push(`justify-content-${t.justifyContent}`), l.join(" ");
|
|
285
291
|
});
|
|
286
|
-
return (l,
|
|
292
|
+
return (l, n) => (i(), q(A(e.tag), {
|
|
287
293
|
class: $(a.value)
|
|
288
294
|
}, {
|
|
289
295
|
default: j(() => [
|
|
290
|
-
|
|
296
|
+
T(l.$slots, "default")
|
|
291
297
|
]),
|
|
292
298
|
_: 3
|
|
293
299
|
}, 8, ["class"]));
|
|
294
300
|
}
|
|
295
|
-
}),
|
|
301
|
+
}), Oe = /* @__PURE__ */ M({
|
|
296
302
|
__name: "VibeCol",
|
|
297
303
|
props: {
|
|
298
304
|
tag: { type: String, default: "div" },
|
|
@@ -321,8 +327,8 @@ const $e = /* @__PURE__ */ M({
|
|
|
321
327
|
alignSelf: { type: String, default: void 0 }
|
|
322
328
|
},
|
|
323
329
|
emits: ["component-error"],
|
|
324
|
-
setup(e, { emit:
|
|
325
|
-
const t = e, a =
|
|
330
|
+
setup(e, { emit: r }) {
|
|
331
|
+
const t = e, a = h(() => {
|
|
326
332
|
const l = [];
|
|
327
333
|
return t.cols !== void 0 || t.sm !== void 0 || t.md !== void 0 || t.lg !== void 0 || t.xl !== void 0 || t.xxl !== void 0 ? (t.cols === !0 ? l.push("col") : t.cols === "auto" ? l.push("col-auto") : t.cols && l.push(`col-${t.cols}`), [
|
|
328
334
|
{ name: "sm", value: t.sm },
|
|
@@ -330,35 +336,35 @@ const $e = /* @__PURE__ */ M({
|
|
|
330
336
|
{ name: "lg", value: t.lg },
|
|
331
337
|
{ name: "xl", value: t.xl },
|
|
332
338
|
{ name: "xxl", value: t.xxl }
|
|
333
|
-
].forEach(({ name:
|
|
334
|
-
|
|
339
|
+
].forEach(({ name: d, value: v }) => {
|
|
340
|
+
v === !0 ? l.push(`col-${d}`) : v === "auto" ? l.push(`col-${d}-auto`) : v !== void 0 && l.push(`col-${d}-${v}`);
|
|
335
341
|
})) : l.push("col"), t.offset !== void 0 && l.push(`offset-${t.offset}`), t.offsetSm !== void 0 && l.push(`offset-sm-${t.offsetSm}`), t.offsetMd !== void 0 && l.push(`offset-md-${t.offsetMd}`), t.offsetLg !== void 0 && l.push(`offset-lg-${t.offsetLg}`), t.offsetXl !== void 0 && l.push(`offset-xl-${t.offsetXl}`), t.offsetXxl !== void 0 && l.push(`offset-xxl-${t.offsetXxl}`), t.order !== void 0 && l.push(`order-${t.order}`), t.orderSm !== void 0 && l.push(`order-sm-${t.orderSm}`), t.orderMd !== void 0 && l.push(`order-md-${t.orderMd}`), t.orderLg !== void 0 && l.push(`order-lg-${t.orderLg}`), t.orderXl !== void 0 && l.push(`order-xl-${t.orderXl}`), t.orderXxl !== void 0 && l.push(`order-xxl-${t.orderXxl}`), t.alignSelf && l.push(`align-self-${t.alignSelf}`), l.join(" ");
|
|
336
342
|
});
|
|
337
|
-
return (l,
|
|
343
|
+
return (l, n) => (i(), q(A(e.tag), {
|
|
338
344
|
class: $(a.value)
|
|
339
345
|
}, {
|
|
340
346
|
default: j(() => [
|
|
341
|
-
|
|
347
|
+
T(l.$slots, "default")
|
|
342
348
|
]),
|
|
343
349
|
_: 3
|
|
344
350
|
}, 8, ["class"]));
|
|
345
351
|
}
|
|
346
|
-
}),
|
|
352
|
+
}), He = ["src", "alt"], De = {
|
|
347
353
|
key: 1,
|
|
348
354
|
class: "card-header"
|
|
349
|
-
},
|
|
355
|
+
}, Ge = {
|
|
350
356
|
key: 2,
|
|
351
357
|
class: "card-body"
|
|
352
|
-
},
|
|
358
|
+
}, Xe = {
|
|
353
359
|
key: 0,
|
|
354
360
|
class: "card-title"
|
|
355
|
-
},
|
|
361
|
+
}, Ye = {
|
|
356
362
|
key: 1,
|
|
357
363
|
class: "card-text"
|
|
358
|
-
},
|
|
364
|
+
}, Ue = {
|
|
359
365
|
key: 3,
|
|
360
366
|
class: "card-footer"
|
|
361
|
-
},
|
|
367
|
+
}, Je = ["src", "alt"], Ke = /* @__PURE__ */ M({
|
|
362
368
|
__name: "VibeCard",
|
|
363
369
|
props: {
|
|
364
370
|
variant: { type: String, default: void 0 },
|
|
@@ -377,98 +383,98 @@ const $e = /* @__PURE__ */ M({
|
|
|
377
383
|
imgBottom: { type: Boolean, default: !1 }
|
|
378
384
|
},
|
|
379
385
|
emits: ["component-error"],
|
|
380
|
-
setup(e, { emit:
|
|
381
|
-
const t = e, a =
|
|
386
|
+
setup(e, { emit: r }) {
|
|
387
|
+
const t = e, a = h(() => {
|
|
382
388
|
const l = ["card"];
|
|
383
389
|
return t.variant && l.push(`text-bg-${t.variant}`), t.border && l.push(`border-${t.border}`), t.textVariant && l.push(`text-${t.textVariant}`), l.join(" ");
|
|
384
390
|
});
|
|
385
|
-
return (l,
|
|
391
|
+
return (l, n) => (i(), q(A(e.tag), {
|
|
386
392
|
class: $(a.value)
|
|
387
393
|
}, {
|
|
388
394
|
default: j(() => [
|
|
389
|
-
e.imgSrc && e.imgTop ? (
|
|
395
|
+
e.imgSrc && e.imgTop ? (i(), s("img", {
|
|
390
396
|
key: 0,
|
|
391
397
|
src: e.imgSrc,
|
|
392
398
|
alt: e.imgAlt,
|
|
393
399
|
class: "card-img-top"
|
|
394
|
-
}, null, 8,
|
|
395
|
-
e.header || l.$slots.header ? (
|
|
396
|
-
|
|
400
|
+
}, null, 8, He)) : g("", !0),
|
|
401
|
+
e.header || l.$slots.header ? (i(), s("div", De, [
|
|
402
|
+
T(l.$slots, "header", {}, () => [
|
|
397
403
|
I(k(e.header), 1)
|
|
398
404
|
])
|
|
399
|
-
])) :
|
|
400
|
-
e.title || e.body || l.$slots.default || l.$slots.body ? (
|
|
401
|
-
e.title || l.$slots.title ? (
|
|
402
|
-
|
|
405
|
+
])) : g("", !0),
|
|
406
|
+
e.title || e.body || l.$slots.default || l.$slots.body ? (i(), s("div", Ge, [
|
|
407
|
+
e.title || l.$slots.title ? (i(), s("h5", Xe, [
|
|
408
|
+
T(l.$slots, "title", {}, () => [
|
|
403
409
|
I(k(e.title), 1)
|
|
404
410
|
])
|
|
405
|
-
])) :
|
|
406
|
-
e.body || l.$slots.body ? (
|
|
407
|
-
|
|
411
|
+
])) : g("", !0),
|
|
412
|
+
e.body || l.$slots.body ? (i(), s("p", Ye, [
|
|
413
|
+
T(l.$slots, "body", {}, () => [
|
|
408
414
|
I(k(e.body), 1)
|
|
409
415
|
])
|
|
410
|
-
])) :
|
|
411
|
-
|
|
412
|
-
])) :
|
|
413
|
-
e.footer || l.$slots.footer ? (
|
|
414
|
-
|
|
416
|
+
])) : g("", !0),
|
|
417
|
+
T(l.$slots, "default")
|
|
418
|
+
])) : g("", !0),
|
|
419
|
+
e.footer || l.$slots.footer ? (i(), s("div", Ue, [
|
|
420
|
+
T(l.$slots, "footer", {}, () => [
|
|
415
421
|
I(k(e.footer), 1)
|
|
416
422
|
])
|
|
417
|
-
])) :
|
|
418
|
-
e.imgSrc && e.imgBottom ? (
|
|
423
|
+
])) : g("", !0),
|
|
424
|
+
e.imgSrc && e.imgBottom ? (i(), s("img", {
|
|
419
425
|
key: 4,
|
|
420
426
|
src: e.imgSrc,
|
|
421
427
|
alt: e.imgAlt,
|
|
422
428
|
class: "card-img-bottom"
|
|
423
|
-
}, null, 8,
|
|
429
|
+
}, null, 8, Je)) : g("", !0)
|
|
424
430
|
]),
|
|
425
431
|
_: 3
|
|
426
432
|
}, 8, ["class"]));
|
|
427
433
|
}
|
|
428
|
-
}),
|
|
434
|
+
}), We = ["aria-label"], Qe = { class: "breadcrumb" }, Ze = ["aria-current"], _e = /* @__PURE__ */ M({
|
|
429
435
|
__name: "VibeBreadcrumb",
|
|
430
436
|
props: {
|
|
431
437
|
ariaLabel: { type: String, default: "breadcrumb" },
|
|
432
438
|
items: { type: Array, required: !0 }
|
|
433
439
|
},
|
|
434
440
|
emits: ["item-click", "component-error"],
|
|
435
|
-
setup(e, { emit:
|
|
436
|
-
const t =
|
|
437
|
-
l.active || t("item-click", { item: l, index:
|
|
441
|
+
setup(e, { emit: r }) {
|
|
442
|
+
const t = r, a = (l, n, o) => {
|
|
443
|
+
l.active || t("item-click", { item: l, index: n, event: o });
|
|
438
444
|
};
|
|
439
|
-
return (l,
|
|
440
|
-
S("ol",
|
|
441
|
-
(
|
|
442
|
-
key:
|
|
445
|
+
return (l, n) => (i(), s("nav", { "aria-label": e.ariaLabel }, [
|
|
446
|
+
S("ol", Qe, [
|
|
447
|
+
(i(!0), s(R, null, H(e.items, (o, d) => (i(), s("li", {
|
|
448
|
+
key: d,
|
|
443
449
|
class: $(["breadcrumb-item", { active: o.active }]),
|
|
444
450
|
"aria-current": o.active ? "page" : void 0
|
|
445
451
|
}, [
|
|
446
|
-
(
|
|
452
|
+
(i(), q(A(o.href ? "a" : o.to ? "router-link" : "span"), {
|
|
447
453
|
href: o.href,
|
|
448
454
|
to: o.to,
|
|
449
|
-
onClick: (
|
|
455
|
+
onClick: (v) => a(o, d, v)
|
|
450
456
|
}, {
|
|
451
457
|
default: j(() => [
|
|
452
|
-
|
|
458
|
+
T(l.$slots, "item", {
|
|
453
459
|
item: o,
|
|
454
|
-
index:
|
|
460
|
+
index: d
|
|
455
461
|
}, () => [
|
|
456
462
|
I(k(o.text), 1)
|
|
457
463
|
])
|
|
458
464
|
]),
|
|
459
465
|
_: 2
|
|
460
466
|
}, 1032, ["href", "to", "onClick"]))
|
|
461
|
-
], 10,
|
|
467
|
+
], 10, Ze))), 128))
|
|
462
468
|
])
|
|
463
|
-
], 8,
|
|
469
|
+
], 8, We));
|
|
464
470
|
}
|
|
465
|
-
}),
|
|
471
|
+
}), et = { class: "dropdown-menu" }, tt = {
|
|
466
472
|
key: 0,
|
|
467
473
|
class: "dropdown-divider"
|
|
468
|
-
},
|
|
474
|
+
}, at = {
|
|
469
475
|
key: 1,
|
|
470
476
|
class: "dropdown-header"
|
|
471
|
-
},
|
|
477
|
+
}, lt = /* @__PURE__ */ M({
|
|
472
478
|
__name: "VibeNav",
|
|
473
479
|
props: {
|
|
474
480
|
items: { type: Array, required: !0 },
|
|
@@ -477,89 +483,90 @@ const $e = /* @__PURE__ */ M({
|
|
|
477
483
|
vertical: { type: Boolean, default: !1 },
|
|
478
484
|
justified: { type: Boolean, default: !1 },
|
|
479
485
|
fill: { type: Boolean, default: !1 },
|
|
486
|
+
underline: { type: Boolean, default: !1 },
|
|
480
487
|
tag: { type: String, default: "ul" }
|
|
481
488
|
},
|
|
482
489
|
emits: ["item-click", "show", "shown", "hide", "hidden", "component-error"],
|
|
483
|
-
setup(e, { expose:
|
|
484
|
-
const a = e, l = t,
|
|
485
|
-
const
|
|
486
|
-
return a.pills &&
|
|
487
|
-
}),
|
|
488
|
-
if (
|
|
490
|
+
setup(e, { expose: r, emit: t }) {
|
|
491
|
+
const a = e, l = t, n = L(null), o = /* @__PURE__ */ new Map(), d = h(() => {
|
|
492
|
+
const u = ["nav"];
|
|
493
|
+
return a.pills && u.push("nav-pills"), a.tabs && u.push("nav-tabs"), a.vertical && u.push("flex-column"), a.justified && u.push("nav-justified"), a.fill && u.push("nav-fill"), a.underline && u.push("nav-underline"), u.join(" ");
|
|
494
|
+
}), v = (u) => l("show", u), c = (u) => l("shown", u), m = (u) => l("hide", u), f = (u) => l("hidden", u), V = async () => {
|
|
495
|
+
if (n.value)
|
|
489
496
|
try {
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
const
|
|
493
|
-
if (!o.has(
|
|
494
|
-
const
|
|
495
|
-
o.set(
|
|
497
|
+
const b = (await import("bootstrap")).Tab;
|
|
498
|
+
n.value.querySelectorAll('[data-bs-toggle="tab"], [data-bs-toggle="pill"]').forEach((w) => {
|
|
499
|
+
const B = w;
|
|
500
|
+
if (!o.has(B)) {
|
|
501
|
+
const C = new b(B);
|
|
502
|
+
o.set(B, C), B.addEventListener("show.bs.tab", v), B.addEventListener("shown.bs.tab", c), B.addEventListener("hide.bs.tab", m), B.addEventListener("hidden.bs.tab", f);
|
|
496
503
|
}
|
|
497
504
|
});
|
|
498
|
-
} catch (
|
|
505
|
+
} catch (u) {
|
|
499
506
|
l("component-error", {
|
|
500
507
|
message: "Bootstrap JS not loaded. Nav will use basic Vue logic.",
|
|
501
508
|
componentName: "VibeNav",
|
|
502
|
-
originalError:
|
|
509
|
+
originalError: u
|
|
503
510
|
});
|
|
504
511
|
}
|
|
505
512
|
};
|
|
506
|
-
|
|
507
|
-
o.forEach((
|
|
508
|
-
|
|
513
|
+
X(V), Y(() => {
|
|
514
|
+
o.forEach((u, b) => {
|
|
515
|
+
b.removeEventListener("show.bs.tab", v), b.removeEventListener("shown.bs.tab", c), b.removeEventListener("hide.bs.tab", m), b.removeEventListener("hidden.bs.tab", f), u.dispose();
|
|
509
516
|
}), o.clear();
|
|
510
517
|
}), O(() => a.items, async () => {
|
|
511
|
-
await
|
|
518
|
+
await se(), await V();
|
|
512
519
|
}, { deep: !0 });
|
|
513
|
-
const
|
|
514
|
-
|
|
520
|
+
const y = (u, b, p) => {
|
|
521
|
+
u.disabled || l("item-click", { item: u, index: b, event: p });
|
|
515
522
|
};
|
|
516
|
-
return
|
|
523
|
+
return r({ bsInstances: o, refresh: V }), (u, b) => (i(), q(A(e.tag), {
|
|
517
524
|
ref_key: "navRef",
|
|
518
|
-
ref:
|
|
519
|
-
class: $(
|
|
525
|
+
ref: n,
|
|
526
|
+
class: $(d.value)
|
|
520
527
|
}, {
|
|
521
528
|
default: j(() => [
|
|
522
|
-
(
|
|
529
|
+
(i(!0), s(R, null, H(e.items, (p, w) => (i(), s("li", {
|
|
523
530
|
key: w,
|
|
524
|
-
class: $(["nav-item", { dropdown:
|
|
531
|
+
class: $(["nav-item", { dropdown: p.children && p.children.length > 0 }])
|
|
525
532
|
}, [
|
|
526
|
-
|
|
533
|
+
p.children && p.children.length > 0 ? (i(), s(R, { key: 0 }, [
|
|
527
534
|
S("a", {
|
|
528
|
-
class: $(["nav-link dropdown-toggle", { active:
|
|
535
|
+
class: $(["nav-link dropdown-toggle", { active: p.active, disabled: p.disabled }]),
|
|
529
536
|
"data-bs-toggle": "dropdown",
|
|
530
537
|
href: "#",
|
|
531
538
|
role: "button",
|
|
532
539
|
"aria-expanded": "false"
|
|
533
|
-
}, k(
|
|
534
|
-
S("ul",
|
|
535
|
-
(
|
|
536
|
-
|
|
540
|
+
}, k(p.text), 3),
|
|
541
|
+
S("ul", et, [
|
|
542
|
+
(i(!0), s(R, null, H(p.children, (B, C) => (i(), s("li", { key: C }, [
|
|
543
|
+
B.divider ? (i(), s("hr", tt)) : B.header ? (i(), s("h6", at, k(B.text), 1)) : (i(), q(A(B.href ? "a" : B.to ? "router-link" : "button"), {
|
|
537
544
|
key: 2,
|
|
538
|
-
class: $(["dropdown-item", { active:
|
|
539
|
-
href:
|
|
540
|
-
to:
|
|
541
|
-
type: !
|
|
545
|
+
class: $(["dropdown-item", { active: B.active, disabled: B.disabled }]),
|
|
546
|
+
href: B.href,
|
|
547
|
+
to: B.to,
|
|
548
|
+
type: !B.href && !B.to ? "button" : void 0
|
|
542
549
|
}, {
|
|
543
550
|
default: j(() => [
|
|
544
|
-
I(k(
|
|
551
|
+
I(k(B.text), 1)
|
|
545
552
|
]),
|
|
546
553
|
_: 2
|
|
547
554
|
}, 1032, ["class", "href", "to", "type"]))
|
|
548
555
|
]))), 128))
|
|
549
556
|
])
|
|
550
|
-
], 64)) : (
|
|
557
|
+
], 64)) : (i(), q(A(p.href ? "a" : p.to ? "router-link" : "button"), {
|
|
551
558
|
key: 1,
|
|
552
|
-
class: $(["nav-link", { active:
|
|
553
|
-
href:
|
|
554
|
-
to:
|
|
555
|
-
type: !
|
|
556
|
-
"aria-current":
|
|
557
|
-
"data-bs-toggle": (e.tabs || e.pills) &&
|
|
558
|
-
"data-bs-target":
|
|
559
|
-
onClick: (
|
|
559
|
+
class: $(["nav-link", { active: p.active, disabled: p.disabled }]),
|
|
560
|
+
href: p.href,
|
|
561
|
+
to: p.to,
|
|
562
|
+
type: !p.href && !p.to ? "button" : void 0,
|
|
563
|
+
"aria-current": p.active ? "page" : void 0,
|
|
564
|
+
"data-bs-toggle": (e.tabs || e.pills) && p.href && p.href.startsWith("#") ? e.tabs ? "tab" : "pill" : void 0,
|
|
565
|
+
"data-bs-target": p.href && p.href.startsWith("#") ? p.href : void 0,
|
|
566
|
+
onClick: (B) => y(p, w, B)
|
|
560
567
|
}, {
|
|
561
568
|
default: j(() => [
|
|
562
|
-
I(k(
|
|
569
|
+
I(k(p.text), 1)
|
|
563
570
|
]),
|
|
564
571
|
_: 2
|
|
565
572
|
}, 1032, ["class", "href", "to", "type", "aria-current", "data-bs-toggle", "data-bs-target", "onClick"]))
|
|
@@ -568,7 +575,7 @@ const $e = /* @__PURE__ */ M({
|
|
|
568
575
|
_: 1
|
|
569
576
|
}, 8, ["class"]));
|
|
570
577
|
}
|
|
571
|
-
}),
|
|
578
|
+
}), ot = /* @__PURE__ */ M({
|
|
572
579
|
__name: "VibeNavbar",
|
|
573
580
|
props: {
|
|
574
581
|
variant: { type: String, default: "light" },
|
|
@@ -579,66 +586,71 @@ const $e = /* @__PURE__ */ M({
|
|
|
579
586
|
tag: { type: String, default: "nav" }
|
|
580
587
|
},
|
|
581
588
|
emits: ["component-error"],
|
|
582
|
-
setup(e, { emit:
|
|
583
|
-
const t = e, a =
|
|
584
|
-
|
|
585
|
-
a[
|
|
589
|
+
setup(e, { emit: r }) {
|
|
590
|
+
const t = e, a = Ce({});
|
|
591
|
+
ge("vibeNavbarCollapse", { collapseStates: a, toggleCollapse: (v) => {
|
|
592
|
+
a[v] = !a[v];
|
|
586
593
|
} });
|
|
587
|
-
const
|
|
588
|
-
const
|
|
589
|
-
return t.expand === !0 ?
|
|
590
|
-
}), o =
|
|
594
|
+
const n = h(() => {
|
|
595
|
+
const v = ["navbar"];
|
|
596
|
+
return t.expand === !0 ? v.push("navbar-expand") : typeof t.expand == "string" && v.push(`navbar-expand-${t.expand}`), v.push(`bg-${t.variant}`), t.position && v.push(t.position), v.join(" ");
|
|
597
|
+
}), o = h(() => {
|
|
591
598
|
if (t.theme) return t.theme;
|
|
592
599
|
if (t.variant === "dark") return "dark";
|
|
593
600
|
if (t.variant === "light") return "light";
|
|
594
|
-
}),
|
|
601
|
+
}), d = h(() => {
|
|
595
602
|
if (t.container !== !1)
|
|
596
603
|
return t.container === !0 ? "container-fluid" : `container-${t.container}`;
|
|
597
604
|
});
|
|
598
|
-
return (
|
|
599
|
-
class: $(
|
|
605
|
+
return (v, c) => (i(), q(A(e.tag), {
|
|
606
|
+
class: $(n.value),
|
|
600
607
|
"data-bs-theme": o.value
|
|
601
608
|
}, {
|
|
602
609
|
default: j(() => [
|
|
603
|
-
|
|
610
|
+
d.value ? (i(), s("div", {
|
|
604
611
|
key: 0,
|
|
605
|
-
class: $(
|
|
612
|
+
class: $(d.value)
|
|
606
613
|
}, [
|
|
607
|
-
|
|
608
|
-
], 2)) :
|
|
614
|
+
T(v.$slots, "default", {}, void 0, !0)
|
|
615
|
+
], 2)) : T(v.$slots, "default", { key: 1 }, void 0, !0)
|
|
609
616
|
]),
|
|
610
617
|
_: 3
|
|
611
618
|
}, 8, ["class", "data-bs-theme"]));
|
|
612
619
|
}
|
|
613
|
-
}),
|
|
620
|
+
}), ae = (e, r) => {
|
|
621
|
+
const t = e.__vccOpts || e;
|
|
622
|
+
for (const [a, l] of r)
|
|
623
|
+
t[a] = l;
|
|
624
|
+
return t;
|
|
625
|
+
}, nt = /* @__PURE__ */ ae(ot, [["__scopeId", "data-v-8228b170"]]), it = /* @__PURE__ */ M({
|
|
614
626
|
__name: "VibeNavbarBrand",
|
|
615
627
|
props: {
|
|
616
628
|
href: { type: String, default: void 0 },
|
|
617
629
|
to: { type: [String, Object], default: void 0 }
|
|
618
630
|
},
|
|
619
631
|
emits: ["component-error"],
|
|
620
|
-
setup(e, { emit:
|
|
632
|
+
setup(e, { emit: r }) {
|
|
621
633
|
const t = e, a = t.href ? "a" : t.to ? "router-link" : "span";
|
|
622
|
-
return (l,
|
|
634
|
+
return (l, n) => (i(), q(A(xe(a)), {
|
|
623
635
|
class: "navbar-brand",
|
|
624
636
|
href: e.href,
|
|
625
637
|
to: e.to
|
|
626
638
|
}, {
|
|
627
639
|
default: j(() => [
|
|
628
|
-
|
|
640
|
+
T(l.$slots, "default")
|
|
629
641
|
]),
|
|
630
642
|
_: 3
|
|
631
643
|
}, 8, ["href", "to"]));
|
|
632
644
|
}
|
|
633
|
-
}),
|
|
645
|
+
}), st = ["data-bs-target", "aria-controls", "aria-expanded", "aria-label"], rt = /* @__PURE__ */ M({
|
|
634
646
|
__name: "VibeNavbarToggle",
|
|
635
647
|
props: {
|
|
636
648
|
target: { type: String, required: !0 },
|
|
637
649
|
ariaLabel: { type: String, default: "Toggle navigation" }
|
|
638
650
|
},
|
|
639
651
|
emits: ["component-error"],
|
|
640
|
-
setup(e, { emit:
|
|
641
|
-
const t = e, a = J("vibeNavbarCollapse", null), l =
|
|
652
|
+
setup(e, { emit: r }) {
|
|
653
|
+
const t = e, a = J("vibeNavbarCollapse", null), l = h(() => a?.collapseStates[t.target] ?? !1), n = async () => {
|
|
642
654
|
a && a.toggleCollapse(t.target);
|
|
643
655
|
try {
|
|
644
656
|
const o = document.getElementById(t.target);
|
|
@@ -646,7 +658,7 @@ const $e = /* @__PURE__ */ M({
|
|
|
646
658
|
} catch {
|
|
647
659
|
}
|
|
648
660
|
};
|
|
649
|
-
return (o,
|
|
661
|
+
return (o, d) => (i(), s("button", {
|
|
650
662
|
class: "navbar-toggler",
|
|
651
663
|
type: "button",
|
|
652
664
|
"data-bs-target": `#${e.target}`,
|
|
@@ -654,76 +666,76 @@ const $e = /* @__PURE__ */ M({
|
|
|
654
666
|
"aria-controls": e.target,
|
|
655
667
|
"aria-expanded": l.value,
|
|
656
668
|
"aria-label": e.ariaLabel,
|
|
657
|
-
onClick:
|
|
658
|
-
}, [...
|
|
669
|
+
onClick: n
|
|
670
|
+
}, [...d[0] || (d[0] = [
|
|
659
671
|
S("span", { class: "navbar-toggler-icon" }, null, -1)
|
|
660
|
-
])], 8,
|
|
672
|
+
])], 8, st));
|
|
661
673
|
}
|
|
662
|
-
}),
|
|
674
|
+
}), dt = { class: "dropdown-menu" }, ut = { key: 0 }, ct = { key: 1 }, vt = { class: "dropdown-header" }, ft = { key: 2 }, bt = /* @__PURE__ */ M({
|
|
663
675
|
__name: "VibeNavbarNav",
|
|
664
676
|
props: {
|
|
665
677
|
tag: { type: String, default: "ul" },
|
|
666
678
|
items: { type: Array, default: void 0 }
|
|
667
679
|
},
|
|
668
680
|
emits: ["item-click", "dropdown-item-click", "component-error"],
|
|
669
|
-
setup(e, { emit:
|
|
670
|
-
const t =
|
|
671
|
-
const
|
|
672
|
-
return c.children?.length &&
|
|
681
|
+
setup(e, { emit: r }) {
|
|
682
|
+
const t = r, a = (c) => {
|
|
683
|
+
const m = ["nav-item"];
|
|
684
|
+
return c.children?.length && m.push("dropdown"), m.join(" ");
|
|
673
685
|
}, l = (c) => {
|
|
674
|
-
const
|
|
675
|
-
return c.active &&
|
|
676
|
-
},
|
|
677
|
-
const
|
|
678
|
-
return c.active &&
|
|
679
|
-
},
|
|
680
|
-
c.disabled || t("item-click", { item: c, index:
|
|
681
|
-
},
|
|
682
|
-
!
|
|
686
|
+
const m = ["nav-link"];
|
|
687
|
+
return c.active && m.push("active"), c.disabled && m.push("disabled"), c.children?.length && m.push("dropdown-toggle"), m.join(" ");
|
|
688
|
+
}, n = (c) => c.href ? "a" : c.to ? "router-link" : "a", o = (c) => {
|
|
689
|
+
const m = ["dropdown-item"];
|
|
690
|
+
return c.active && m.push("active"), c.disabled && m.push("disabled"), m.join(" ");
|
|
691
|
+
}, d = (c, m, f) => {
|
|
692
|
+
c.disabled || t("item-click", { item: c, index: m, event: f });
|
|
693
|
+
}, v = (c, m, f, V, y) => {
|
|
694
|
+
!f.disabled && !f.divider && !f.header && t("dropdown-item-click", { item: c, itemIndex: m, child: f, childIndex: V, event: y });
|
|
683
695
|
};
|
|
684
|
-
return (c,
|
|
696
|
+
return (c, m) => (i(), q(A(e.tag), { class: "navbar-nav" }, {
|
|
685
697
|
default: j(() => [
|
|
686
|
-
e.items && e.items.length > 0 ? (
|
|
687
|
-
key:
|
|
688
|
-
class: $(a(
|
|
698
|
+
e.items && e.items.length > 0 ? (i(!0), s(R, { key: 0 }, H(e.items, (f, V) => (i(), s("li", {
|
|
699
|
+
key: V,
|
|
700
|
+
class: $(a(f))
|
|
689
701
|
}, [
|
|
690
|
-
|
|
702
|
+
f.children?.length ? (i(), s(R, { key: 0 }, [
|
|
691
703
|
S("a", {
|
|
692
|
-
class: $(l(
|
|
704
|
+
class: $(l(f)),
|
|
693
705
|
href: "#",
|
|
694
706
|
role: "button",
|
|
695
707
|
"data-bs-toggle": "dropdown",
|
|
696
708
|
"aria-expanded": "false"
|
|
697
709
|
}, [
|
|
698
|
-
|
|
699
|
-
item:
|
|
700
|
-
index:
|
|
710
|
+
T(c.$slots, "item", {
|
|
711
|
+
item: f,
|
|
712
|
+
index: V
|
|
701
713
|
}, () => [
|
|
702
|
-
I(k(
|
|
714
|
+
I(k(f.text), 1)
|
|
703
715
|
])
|
|
704
716
|
], 2),
|
|
705
|
-
S("ul",
|
|
706
|
-
(
|
|
707
|
-
|
|
717
|
+
S("ul", dt, [
|
|
718
|
+
(i(!0), s(R, null, H(f.children, (y, u) => (i(), s(R, { key: u }, [
|
|
719
|
+
y.divider ? (i(), s("li", ut, [...m[0] || (m[0] = [
|
|
708
720
|
S("hr", { class: "dropdown-divider" }, null, -1)
|
|
709
|
-
])])) :
|
|
710
|
-
S("h6",
|
|
711
|
-
])) : (
|
|
712
|
-
(
|
|
713
|
-
class: $(o(
|
|
714
|
-
href:
|
|
715
|
-
to:
|
|
716
|
-
type: !
|
|
717
|
-
onClick: (
|
|
721
|
+
])])) : y.header ? (i(), s("li", ct, [
|
|
722
|
+
S("h6", vt, k(y.text), 1)
|
|
723
|
+
])) : (i(), s("li", ft, [
|
|
724
|
+
(i(), q(A(y.href ? "a" : y.to ? "router-link" : "button"), {
|
|
725
|
+
class: $(o(y)),
|
|
726
|
+
href: y.href,
|
|
727
|
+
to: y.to,
|
|
728
|
+
type: !y.href && !y.to ? "button" : void 0,
|
|
729
|
+
onClick: (b) => v(f, V, y, u, b)
|
|
718
730
|
}, {
|
|
719
731
|
default: j(() => [
|
|
720
|
-
|
|
721
|
-
item:
|
|
722
|
-
child:
|
|
723
|
-
index:
|
|
724
|
-
childIndex:
|
|
732
|
+
T(c.$slots, "dropdown-item", {
|
|
733
|
+
item: f,
|
|
734
|
+
child: y,
|
|
735
|
+
index: V,
|
|
736
|
+
childIndex: u
|
|
725
737
|
}, () => [
|
|
726
|
-
I(k(
|
|
738
|
+
I(k(y.text), 1)
|
|
727
739
|
])
|
|
728
740
|
]),
|
|
729
741
|
_: 2
|
|
@@ -731,31 +743,31 @@ const $e = /* @__PURE__ */ M({
|
|
|
731
743
|
]))
|
|
732
744
|
], 64))), 128))
|
|
733
745
|
])
|
|
734
|
-
], 64)) : (
|
|
746
|
+
], 64)) : (i(), q(A(n(f)), {
|
|
735
747
|
key: 1,
|
|
736
|
-
class: $(l(
|
|
737
|
-
href:
|
|
738
|
-
to:
|
|
739
|
-
"aria-current":
|
|
740
|
-
"aria-disabled":
|
|
741
|
-
onClick: (
|
|
748
|
+
class: $(l(f)),
|
|
749
|
+
href: f.href,
|
|
750
|
+
to: f.to,
|
|
751
|
+
"aria-current": f.active ? "page" : void 0,
|
|
752
|
+
"aria-disabled": f.disabled,
|
|
753
|
+
onClick: (y) => d(f, V, y)
|
|
742
754
|
}, {
|
|
743
755
|
default: j(() => [
|
|
744
|
-
|
|
745
|
-
item:
|
|
746
|
-
index:
|
|
756
|
+
T(c.$slots, "item", {
|
|
757
|
+
item: f,
|
|
758
|
+
index: V
|
|
747
759
|
}, () => [
|
|
748
|
-
I(k(
|
|
760
|
+
I(k(f.text), 1)
|
|
749
761
|
])
|
|
750
762
|
]),
|
|
751
763
|
_: 2
|
|
752
764
|
}, 1032, ["class", "href", "to", "aria-current", "aria-disabled", "onClick"]))
|
|
753
|
-
], 2))), 128)) :
|
|
765
|
+
], 2))), 128)) : T(c.$slots, "default", { key: 1 })
|
|
754
766
|
]),
|
|
755
767
|
_: 3
|
|
756
768
|
}));
|
|
757
769
|
}
|
|
758
|
-
}),
|
|
770
|
+
}), ht = ["aria-label"], pt = ["disabled", "aria-disabled"], mt = ["aria-current", "onClick"], yt = ["disabled", "aria-disabled"], gt = /* @__PURE__ */ M({
|
|
759
771
|
__name: "VibePagination",
|
|
760
772
|
props: {
|
|
761
773
|
size: { type: String, default: void 0 },
|
|
@@ -767,71 +779,71 @@ const $e = /* @__PURE__ */ M({
|
|
|
767
779
|
nextText: { type: String, default: "Next" }
|
|
768
780
|
},
|
|
769
781
|
emits: ["update:currentPage", "page-click", "component-error"],
|
|
770
|
-
setup(e, { emit:
|
|
771
|
-
const t = e, a =
|
|
782
|
+
setup(e, { emit: r }) {
|
|
783
|
+
const t = e, a = r, l = h(() => {
|
|
772
784
|
const c = ["pagination"];
|
|
773
785
|
return t.size && c.push(`pagination-${t.size}`), c.join(" ");
|
|
774
|
-
}),
|
|
786
|
+
}), n = h(() => Array.from({ length: t.totalPages }, (c, m) => m + 1)), o = (c) => {
|
|
775
787
|
c >= 1 && c <= t.totalPages && (a("update:currentPage", c), a("page-click", c));
|
|
776
|
-
},
|
|
777
|
-
return (c,
|
|
788
|
+
}, d = h(() => t.currentPage === 1), v = h(() => t.currentPage === t.totalPages);
|
|
789
|
+
return (c, m) => (i(), s("nav", { "aria-label": e.ariaLabel }, [
|
|
778
790
|
S("ul", {
|
|
779
791
|
class: $(l.value)
|
|
780
792
|
}, [
|
|
781
|
-
e.showPrevNext ? (
|
|
793
|
+
e.showPrevNext ? (i(), s("li", {
|
|
782
794
|
key: 0,
|
|
783
|
-
class: $(["page-item", { disabled:
|
|
795
|
+
class: $(["page-item", { disabled: d.value }])
|
|
784
796
|
}, [
|
|
785
797
|
S("button", {
|
|
786
798
|
class: "page-link",
|
|
787
799
|
type: "button",
|
|
788
|
-
disabled:
|
|
789
|
-
"aria-disabled":
|
|
790
|
-
onClick:
|
|
800
|
+
disabled: d.value,
|
|
801
|
+
"aria-disabled": d.value,
|
|
802
|
+
onClick: m[0] || (m[0] = (f) => o(e.currentPage - 1))
|
|
791
803
|
}, [
|
|
792
|
-
|
|
804
|
+
T(c.$slots, "prev", { disabled: d.value }, () => [
|
|
793
805
|
I(k(e.prevText), 1)
|
|
794
806
|
])
|
|
795
|
-
], 8,
|
|
796
|
-
], 2)) :
|
|
797
|
-
(
|
|
798
|
-
key:
|
|
799
|
-
class: $(["page-item", { active:
|
|
807
|
+
], 8, pt)
|
|
808
|
+
], 2)) : g("", !0),
|
|
809
|
+
(i(!0), s(R, null, H(n.value, (f) => (i(), s("li", {
|
|
810
|
+
key: f,
|
|
811
|
+
class: $(["page-item", { active: f === e.currentPage }])
|
|
800
812
|
}, [
|
|
801
813
|
S("button", {
|
|
802
814
|
class: "page-link",
|
|
803
815
|
type: "button",
|
|
804
|
-
"aria-current":
|
|
805
|
-
onClick: (
|
|
816
|
+
"aria-current": f === e.currentPage ? "page" : void 0,
|
|
817
|
+
onClick: (V) => o(f)
|
|
806
818
|
}, [
|
|
807
|
-
|
|
808
|
-
page:
|
|
809
|
-
active:
|
|
819
|
+
T(c.$slots, "page", {
|
|
820
|
+
page: f,
|
|
821
|
+
active: f === e.currentPage
|
|
810
822
|
}, () => [
|
|
811
|
-
I(k(
|
|
823
|
+
I(k(f), 1)
|
|
812
824
|
])
|
|
813
|
-
], 8,
|
|
825
|
+
], 8, mt)
|
|
814
826
|
], 2))), 128)),
|
|
815
|
-
e.showPrevNext ? (
|
|
827
|
+
e.showPrevNext ? (i(), s("li", {
|
|
816
828
|
key: 1,
|
|
817
|
-
class: $(["page-item", { disabled:
|
|
829
|
+
class: $(["page-item", { disabled: v.value }])
|
|
818
830
|
}, [
|
|
819
831
|
S("button", {
|
|
820
832
|
class: "page-link",
|
|
821
833
|
type: "button",
|
|
822
|
-
disabled:
|
|
823
|
-
"aria-disabled":
|
|
824
|
-
onClick:
|
|
834
|
+
disabled: v.value,
|
|
835
|
+
"aria-disabled": v.value,
|
|
836
|
+
onClick: m[1] || (m[1] = (f) => o(e.currentPage + 1))
|
|
825
837
|
}, [
|
|
826
|
-
|
|
838
|
+
T(c.$slots, "next", { disabled: v.value }, () => [
|
|
827
839
|
I(k(e.nextText), 1)
|
|
828
840
|
])
|
|
829
|
-
], 8,
|
|
830
|
-
], 2)) :
|
|
841
|
+
], 8, yt)
|
|
842
|
+
], 2)) : g("", !0)
|
|
831
843
|
], 2)
|
|
832
|
-
], 8,
|
|
844
|
+
], 8, ht));
|
|
833
845
|
}
|
|
834
|
-
}),
|
|
846
|
+
}), kt = ["id", "aria-labelledby"], St = /* @__PURE__ */ M({
|
|
835
847
|
__name: "VibeTabContent",
|
|
836
848
|
props: {
|
|
837
849
|
id: { type: String, default: void 0 },
|
|
@@ -840,46 +852,46 @@ const $e = /* @__PURE__ */ M({
|
|
|
840
852
|
fade: { type: Boolean, default: !0 }
|
|
841
853
|
},
|
|
842
854
|
emits: ["component-error", "shown", "hide", "hidden"],
|
|
843
|
-
setup(e, { emit:
|
|
844
|
-
const t = e, a =
|
|
845
|
-
const
|
|
846
|
-
return t.fade &&
|
|
855
|
+
setup(e, { emit: r }) {
|
|
856
|
+
const t = e, a = L(null), l = /* @__PURE__ */ new Map(), n = (o) => {
|
|
857
|
+
const d = ["tab-pane"];
|
|
858
|
+
return t.fade && d.push("fade"), o.active && d.push("show", "active"), d.join(" ");
|
|
847
859
|
};
|
|
848
|
-
return
|
|
860
|
+
return X(async () => {
|
|
849
861
|
if (a.value)
|
|
850
862
|
try {
|
|
851
|
-
const
|
|
863
|
+
const d = (await import("bootstrap")).Tab;
|
|
852
864
|
} catch {
|
|
853
865
|
}
|
|
854
|
-
}),
|
|
866
|
+
}), Y(() => {
|
|
855
867
|
l.forEach((o) => o.dispose()), l.clear();
|
|
856
|
-
}), (o,
|
|
868
|
+
}), (o, d) => (i(), q(A(e.tag), {
|
|
857
869
|
id: e.id,
|
|
858
870
|
ref_key: "tabContentRef",
|
|
859
871
|
ref: a,
|
|
860
872
|
class: "tab-content"
|
|
861
873
|
}, {
|
|
862
874
|
default: j(() => [
|
|
863
|
-
(
|
|
864
|
-
key:
|
|
865
|
-
id:
|
|
866
|
-
class: $(
|
|
875
|
+
(i(!0), s(R, null, H(e.panes, (v, c) => (i(), s("div", {
|
|
876
|
+
key: v.id,
|
|
877
|
+
id: v.id,
|
|
878
|
+
class: $(n(v)),
|
|
867
879
|
role: "tabpanel",
|
|
868
|
-
"aria-labelledby": `${
|
|
880
|
+
"aria-labelledby": `${v.id}-tab`,
|
|
869
881
|
tabindex: "0"
|
|
870
882
|
}, [
|
|
871
|
-
|
|
872
|
-
pane:
|
|
883
|
+
T(o.$slots, "pane", {
|
|
884
|
+
pane: v,
|
|
873
885
|
index: c
|
|
874
886
|
}, () => [
|
|
875
|
-
I(k(
|
|
887
|
+
I(k(v.content), 1)
|
|
876
888
|
])
|
|
877
|
-
], 10,
|
|
889
|
+
], 10, kt))), 128))
|
|
878
890
|
]),
|
|
879
891
|
_: 3
|
|
880
892
|
}, 8, ["id"]));
|
|
881
893
|
}
|
|
882
|
-
}),
|
|
894
|
+
}), $t = /* @__PURE__ */ M({
|
|
883
895
|
__name: "VibeListGroup",
|
|
884
896
|
props: {
|
|
885
897
|
flush: { type: Boolean, default: !1 },
|
|
@@ -889,35 +901,35 @@ const $e = /* @__PURE__ */ M({
|
|
|
889
901
|
items: { type: Array, required: !0 }
|
|
890
902
|
},
|
|
891
903
|
emits: ["item-click", "component-error"],
|
|
892
|
-
setup(e, { emit:
|
|
893
|
-
const t = e, a =
|
|
894
|
-
const
|
|
895
|
-
return t.flush &&
|
|
896
|
-
}),
|
|
904
|
+
setup(e, { emit: r }) {
|
|
905
|
+
const t = e, a = r, l = h(() => {
|
|
906
|
+
const v = ["list-group"];
|
|
907
|
+
return t.flush && v.push("list-group-flush"), t.numbered && v.push("list-group-numbered"), t.horizontal === !0 ? v.push("list-group-horizontal") : typeof t.horizontal == "string" && v.push(`list-group-horizontal-${t.horizontal}`), v.join(" ");
|
|
908
|
+
}), n = (v) => v.href ? "a" : v.to ? "router-link" : "li", o = (v) => {
|
|
897
909
|
const c = ["list-group-item"];
|
|
898
|
-
return
|
|
899
|
-
},
|
|
900
|
-
|
|
910
|
+
return v.active && c.push("active"), v.disabled && c.push("disabled"), v.variant && c.push(`list-group-item-${v.variant}`), c.join(" ");
|
|
911
|
+
}, d = (v, c, m) => {
|
|
912
|
+
v.disabled || a("item-click", { item: v, index: c, event: m });
|
|
901
913
|
};
|
|
902
|
-
return (
|
|
914
|
+
return (v, c) => (i(), q(A(e.tag), {
|
|
903
915
|
class: $(l.value)
|
|
904
916
|
}, {
|
|
905
917
|
default: j(() => [
|
|
906
|
-
(
|
|
907
|
-
key:
|
|
908
|
-
class: $(o(
|
|
909
|
-
href:
|
|
910
|
-
to:
|
|
911
|
-
"aria-disabled":
|
|
912
|
-
"aria-current":
|
|
913
|
-
onClick: (
|
|
918
|
+
(i(!0), s(R, null, H(e.items, (m, f) => (i(), q(A(n(m)), {
|
|
919
|
+
key: f,
|
|
920
|
+
class: $(o(m)),
|
|
921
|
+
href: m.href,
|
|
922
|
+
to: m.to,
|
|
923
|
+
"aria-disabled": m.disabled,
|
|
924
|
+
"aria-current": m.active,
|
|
925
|
+
onClick: (V) => d(m, f, V)
|
|
914
926
|
}, {
|
|
915
927
|
default: j(() => [
|
|
916
|
-
|
|
917
|
-
item:
|
|
918
|
-
index:
|
|
928
|
+
T(v.$slots, "item", {
|
|
929
|
+
item: m,
|
|
930
|
+
index: f
|
|
919
931
|
}, () => [
|
|
920
|
-
I(k(
|
|
932
|
+
I(k(m.text), 1)
|
|
921
933
|
])
|
|
922
934
|
]),
|
|
923
935
|
_: 2
|
|
@@ -926,53 +938,53 @@ const $e = /* @__PURE__ */ M({
|
|
|
926
938
|
_: 3
|
|
927
939
|
}, 8, ["class"]));
|
|
928
940
|
}
|
|
929
|
-
}),
|
|
941
|
+
}), wt = ["aria-valuenow", "aria-valuemax"], Vt = /* @__PURE__ */ M({
|
|
930
942
|
__name: "VibeProgress",
|
|
931
943
|
props: {
|
|
932
944
|
height: { type: String, default: void 0 },
|
|
933
945
|
bars: { type: Array, required: !0 }
|
|
934
946
|
},
|
|
935
947
|
emits: ["component-error"],
|
|
936
|
-
setup(e, { emit:
|
|
937
|
-
const t = e, a =
|
|
948
|
+
setup(e, { emit: r }) {
|
|
949
|
+
const t = e, a = h(() => {
|
|
938
950
|
if (t.height)
|
|
939
951
|
return { height: t.height };
|
|
940
|
-
}), l = (
|
|
941
|
-
const
|
|
942
|
-
return
|
|
943
|
-
},
|
|
944
|
-
const
|
|
945
|
-
return { width: `${Math.min(100, Math.max(0,
|
|
946
|
-
}, o = (
|
|
947
|
-
return (
|
|
952
|
+
}), l = (d) => {
|
|
953
|
+
const v = ["progress-bar"];
|
|
954
|
+
return d.variant && v.push(`bg-${d.variant}`), (d.striped || d.animated) && v.push("progress-bar-striped"), d.animated && v.push("progress-bar-animated"), v.join(" ");
|
|
955
|
+
}, n = (d) => {
|
|
956
|
+
const v = d.max || 100;
|
|
957
|
+
return { width: `${Math.min(100, Math.max(0, d.value / v * 100))}%` };
|
|
958
|
+
}, o = (d) => d.label ? d.label : d.showValue ? `${d.value}%` : "";
|
|
959
|
+
return (d, v) => (i(), s("div", {
|
|
948
960
|
class: "progress",
|
|
949
|
-
style:
|
|
961
|
+
style: Z(a.value)
|
|
950
962
|
}, [
|
|
951
|
-
(
|
|
952
|
-
key:
|
|
963
|
+
(i(!0), s(R, null, H(e.bars, (c, m) => (i(), s("div", {
|
|
964
|
+
key: m,
|
|
953
965
|
class: $(l(c)),
|
|
954
|
-
style:
|
|
966
|
+
style: Z(n(c)),
|
|
955
967
|
role: "progressbar",
|
|
956
968
|
"aria-valuenow": c.value,
|
|
957
969
|
"aria-valuemin": 0,
|
|
958
970
|
"aria-valuemax": c.max || 100
|
|
959
971
|
}, [
|
|
960
|
-
|
|
972
|
+
T(d.$slots, "label", {
|
|
961
973
|
bar: c,
|
|
962
|
-
index:
|
|
974
|
+
index: m
|
|
963
975
|
}, () => [
|
|
964
976
|
I(k(o(c)), 1)
|
|
965
977
|
])
|
|
966
|
-
], 14,
|
|
978
|
+
], 14, wt))), 128))
|
|
967
979
|
], 4));
|
|
968
980
|
}
|
|
969
981
|
});
|
|
970
|
-
let
|
|
982
|
+
let me = 0;
|
|
971
983
|
function G(e = "vibe") {
|
|
972
|
-
const
|
|
973
|
-
return
|
|
984
|
+
const r = ke(), t = r ? r.uid : "no-instance";
|
|
985
|
+
return me++, `${e}-${t}-${me}`;
|
|
974
986
|
}
|
|
975
|
-
const
|
|
987
|
+
const Ct = ["id"], xt = { class: "accordion-header" }, Bt = ["data-bs-target", "aria-expanded", "aria-controls", "onClick"], Lt = ["id", "data-bs-parent"], Tt = { class: "accordion-body" }, Nt = /* @__PURE__ */ M({
|
|
976
988
|
__name: "VibeAccordion",
|
|
977
989
|
props: {
|
|
978
990
|
id: { type: String, default: () => G("accordion") },
|
|
@@ -981,89 +993,89 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
981
993
|
alwaysOpen: { type: Boolean, default: !1 }
|
|
982
994
|
},
|
|
983
995
|
emits: ["item-click", "show", "shown", "hide", "hidden", "component-error"],
|
|
984
|
-
setup(e, { expose:
|
|
985
|
-
const a = e, l = t,
|
|
986
|
-
if (
|
|
996
|
+
setup(e, { expose: r, emit: t }) {
|
|
997
|
+
const a = e, l = t, n = L(null), o = /* @__PURE__ */ new Map(), d = (y) => l("show", y), v = (y) => l("shown", y), c = (y) => l("hide", y), m = (y) => l("hidden", y), f = async () => {
|
|
998
|
+
if (n.value)
|
|
987
999
|
try {
|
|
988
|
-
const
|
|
989
|
-
|
|
990
|
-
const w =
|
|
1000
|
+
const u = (await import("bootstrap")).Collapse;
|
|
1001
|
+
n.value.querySelectorAll(".accordion-collapse").forEach((p) => {
|
|
1002
|
+
const w = p.id;
|
|
991
1003
|
if (!o.has(w)) {
|
|
992
|
-
const
|
|
1004
|
+
const B = new u(p, {
|
|
993
1005
|
toggle: !1,
|
|
994
1006
|
parent: a.alwaysOpen ? void 0 : `#${a.id}`
|
|
995
1007
|
});
|
|
996
|
-
o.set(w,
|
|
1008
|
+
o.set(w, B), p.addEventListener("show.bs.collapse", () => d(w)), p.addEventListener("shown.bs.collapse", () => v(w)), p.addEventListener("hide.bs.collapse", () => c(w)), p.addEventListener("hidden.bs.collapse", () => m(w)), a.items.find((z) => z.id === w)?.show && B.show();
|
|
997
1009
|
}
|
|
998
1010
|
});
|
|
999
|
-
} catch (
|
|
1011
|
+
} catch (y) {
|
|
1000
1012
|
l("component-error", {
|
|
1001
1013
|
message: "Bootstrap JS not loaded. Accordion will use data attributes only.",
|
|
1002
1014
|
componentName: "VibeAccordion",
|
|
1003
|
-
originalError:
|
|
1015
|
+
originalError: y
|
|
1004
1016
|
});
|
|
1005
1017
|
}
|
|
1006
1018
|
};
|
|
1007
|
-
|
|
1008
|
-
o.forEach((
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1019
|
+
X(f), Y(() => {
|
|
1020
|
+
o.forEach((y, u) => {
|
|
1021
|
+
const b = document.getElementById(u);
|
|
1022
|
+
b && (b.removeEventListener("show.bs.collapse", () => d(u)), b.removeEventListener("shown.bs.collapse", () => v(u)), b.removeEventListener("hide.bs.collapse", () => c(u)), b.removeEventListener("hidden.bs.collapse", () => m(u))), y.dispose();
|
|
1011
1023
|
}), o.clear();
|
|
1012
|
-
}), O(() => a.items, async (
|
|
1013
|
-
|
|
1014
|
-
const
|
|
1015
|
-
|
|
1024
|
+
}), O(() => a.items, async (y, u) => {
|
|
1025
|
+
y.length !== u?.length && (await se(), await f()), y.forEach((b) => {
|
|
1026
|
+
const p = o.get(b.id);
|
|
1027
|
+
p && (b.show ? p.show() : a.alwaysOpen || p.hide());
|
|
1016
1028
|
});
|
|
1017
1029
|
}, { deep: !0 });
|
|
1018
|
-
const
|
|
1019
|
-
l("item-click", { item:
|
|
1030
|
+
const V = (y, u) => {
|
|
1031
|
+
l("item-click", { item: y, index: u });
|
|
1020
1032
|
};
|
|
1021
|
-
return
|
|
1033
|
+
return r({ bsInstances: o, refresh: f }), (y, u) => (i(), s("div", {
|
|
1022
1034
|
ref_key: "accordionRef",
|
|
1023
|
-
ref:
|
|
1035
|
+
ref: n,
|
|
1024
1036
|
id: e.id,
|
|
1025
1037
|
class: $(["accordion", { "accordion-flush": e.flush }])
|
|
1026
1038
|
}, [
|
|
1027
|
-
(
|
|
1028
|
-
key:
|
|
1039
|
+
(i(!0), s(R, null, H(e.items, (b, p) => (i(), s("div", {
|
|
1040
|
+
key: b.id,
|
|
1029
1041
|
class: "accordion-item"
|
|
1030
1042
|
}, [
|
|
1031
|
-
S("h2",
|
|
1043
|
+
S("h2", xt, [
|
|
1032
1044
|
S("button", {
|
|
1033
|
-
class: $(["accordion-button", { collapsed: !
|
|
1045
|
+
class: $(["accordion-button", { collapsed: !b.show }]),
|
|
1034
1046
|
type: "button",
|
|
1035
1047
|
"data-bs-toggle": "collapse",
|
|
1036
|
-
"data-bs-target": `#${
|
|
1037
|
-
"aria-expanded":
|
|
1038
|
-
"aria-controls":
|
|
1039
|
-
onClick: (w) =>
|
|
1048
|
+
"data-bs-target": `#${b.id}`,
|
|
1049
|
+
"aria-expanded": b.show,
|
|
1050
|
+
"aria-controls": b.id,
|
|
1051
|
+
onClick: (w) => V(b, p)
|
|
1040
1052
|
}, [
|
|
1041
|
-
|
|
1042
|
-
item:
|
|
1043
|
-
index:
|
|
1053
|
+
T(y.$slots, "title", {
|
|
1054
|
+
item: b,
|
|
1055
|
+
index: p
|
|
1044
1056
|
}, () => [
|
|
1045
|
-
I(k(
|
|
1057
|
+
I(k(b.title), 1)
|
|
1046
1058
|
])
|
|
1047
|
-
], 10,
|
|
1059
|
+
], 10, Bt)
|
|
1048
1060
|
]),
|
|
1049
1061
|
S("div", {
|
|
1050
|
-
id:
|
|
1051
|
-
class: $(["accordion-collapse", "collapse", { show:
|
|
1062
|
+
id: b.id,
|
|
1063
|
+
class: $(["accordion-collapse", "collapse", { show: b.show }]),
|
|
1052
1064
|
"data-bs-parent": e.alwaysOpen ? void 0 : `#${e.id}`
|
|
1053
1065
|
}, [
|
|
1054
|
-
S("div",
|
|
1055
|
-
|
|
1056
|
-
item:
|
|
1057
|
-
index:
|
|
1066
|
+
S("div", Tt, [
|
|
1067
|
+
T(y.$slots, "content", {
|
|
1068
|
+
item: b,
|
|
1069
|
+
index: p
|
|
1058
1070
|
}, () => [
|
|
1059
|
-
I(k(
|
|
1071
|
+
I(k(b.content), 1)
|
|
1060
1072
|
])
|
|
1061
1073
|
])
|
|
1062
|
-
], 10,
|
|
1074
|
+
], 10, Lt)
|
|
1063
1075
|
]))), 128))
|
|
1064
|
-
], 10,
|
|
1076
|
+
], 10, Ct));
|
|
1065
1077
|
}
|
|
1066
|
-
}),
|
|
1078
|
+
}), Et = /* @__PURE__ */ M({
|
|
1067
1079
|
__name: "VibeCollapse",
|
|
1068
1080
|
props: {
|
|
1069
1081
|
id: { type: String, default: () => G("collapse") },
|
|
@@ -1073,54 +1085,54 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1073
1085
|
isNav: { type: Boolean, default: !1 }
|
|
1074
1086
|
},
|
|
1075
1087
|
emits: ["update:modelValue", "show", "shown", "hide", "hidden", "component-error"],
|
|
1076
|
-
setup(e, { emit:
|
|
1077
|
-
const t = e, a =
|
|
1078
|
-
|
|
1088
|
+
setup(e, { emit: r }) {
|
|
1089
|
+
const t = e, a = r, l = J("vibeNavbarCollapse", null), n = L(null), o = L(null), d = L(!1), v = () => {
|
|
1090
|
+
d.value = !0, a("show");
|
|
1079
1091
|
}, c = () => {
|
|
1080
1092
|
a("shown"), a("update:modelValue", !0);
|
|
1081
|
-
},
|
|
1093
|
+
}, m = () => {
|
|
1082
1094
|
a("hide");
|
|
1083
|
-
},
|
|
1084
|
-
|
|
1095
|
+
}, f = () => {
|
|
1096
|
+
d.value = !1, a("hidden"), a("update:modelValue", !1);
|
|
1085
1097
|
};
|
|
1086
|
-
|
|
1087
|
-
if (
|
|
1098
|
+
X(async () => {
|
|
1099
|
+
if (n.value)
|
|
1088
1100
|
try {
|
|
1089
|
-
const
|
|
1090
|
-
o.value = new
|
|
1101
|
+
const b = (await import("bootstrap")).Collapse;
|
|
1102
|
+
o.value = new b(n.value, {
|
|
1091
1103
|
toggle: !1
|
|
1092
|
-
}),
|
|
1093
|
-
} catch (
|
|
1104
|
+
}), n.value.addEventListener("show.bs.collapse", v), n.value.addEventListener("shown.bs.collapse", c), n.value.addEventListener("hide.bs.collapse", m), n.value.addEventListener("hidden.bs.collapse", f), (l && t.id in l.collapseStates ? l.collapseStates[t.id] : t.modelValue) && o.value.show();
|
|
1105
|
+
} catch (u) {
|
|
1094
1106
|
a("component-error", {
|
|
1095
1107
|
message: "Bootstrap JS not loaded. Collapse will use CSS classes only.",
|
|
1096
1108
|
componentName: "VibeCollapse",
|
|
1097
|
-
originalError:
|
|
1109
|
+
originalError: u
|
|
1098
1110
|
});
|
|
1099
1111
|
}
|
|
1100
|
-
}),
|
|
1101
|
-
|
|
1112
|
+
}), Y(() => {
|
|
1113
|
+
n.value && (n.value.removeEventListener("show.bs.collapse", v), n.value.removeEventListener("shown.bs.collapse", c), n.value.removeEventListener("hide.bs.collapse", m), n.value.removeEventListener("hidden.bs.collapse", f)), o.value && (o.value.dispose(), o.value = null);
|
|
1102
1114
|
});
|
|
1103
|
-
const
|
|
1104
|
-
O(
|
|
1105
|
-
o.value && (
|
|
1115
|
+
const V = h(() => l && t.id in l.collapseStates ? l.collapseStates[t.id] : t.modelValue);
|
|
1116
|
+
O(V, (u) => {
|
|
1117
|
+
o.value && (u && !d.value ? o.value.show() : !u && d.value && o.value.hide());
|
|
1106
1118
|
});
|
|
1107
|
-
const
|
|
1108
|
-
const
|
|
1109
|
-
return t.isNav &&
|
|
1119
|
+
const y = h(() => {
|
|
1120
|
+
const u = ["collapse"];
|
|
1121
|
+
return t.isNav && u.push("navbar-collapse"), t.horizontal && u.push("collapse-horizontal"), !o.value && V.value && u.push("show"), u.join(" ");
|
|
1110
1122
|
});
|
|
1111
|
-
return (
|
|
1123
|
+
return (u, b) => (i(), q(A(e.tag), {
|
|
1112
1124
|
ref_key: "collapseRef",
|
|
1113
|
-
ref:
|
|
1125
|
+
ref: n,
|
|
1114
1126
|
id: e.id,
|
|
1115
|
-
class: $(
|
|
1127
|
+
class: $(y.value)
|
|
1116
1128
|
}, {
|
|
1117
1129
|
default: j(() => [
|
|
1118
|
-
|
|
1130
|
+
T(u.$slots, "default")
|
|
1119
1131
|
]),
|
|
1120
1132
|
_: 3
|
|
1121
1133
|
}, 8, ["id", "class"]));
|
|
1122
1134
|
}
|
|
1123
|
-
}),
|
|
1135
|
+
}), Mt = ["id", "data-bs-auto-close"], It = ["id", "data-bs-auto-close"], Rt = ["aria-labelledby"], Ft = { key: 0 }, Pt = { key: 1 }, qt = { class: "dropdown-header" }, zt = { key: 2 }, At = /* @__PURE__ */ M({
|
|
1124
1136
|
__name: "VibeDropdown",
|
|
1125
1137
|
props: {
|
|
1126
1138
|
id: { type: String, default: () => G("dropdown") },
|
|
@@ -1134,122 +1146,138 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1134
1146
|
autoClose: { type: [Boolean, String], default: !0 }
|
|
1135
1147
|
},
|
|
1136
1148
|
emits: ["item-click", "show", "shown", "hide", "hidden", "component-error"],
|
|
1137
|
-
setup(e, { expose:
|
|
1138
|
-
const a = e, l = t,
|
|
1139
|
-
const
|
|
1140
|
-
return a.size &&
|
|
1141
|
-
}), c =
|
|
1142
|
-
const
|
|
1143
|
-
return a.menuEnd &&
|
|
1144
|
-
}),
|
|
1145
|
-
const
|
|
1146
|
-
return
|
|
1147
|
-
},
|
|
1148
|
-
|
|
1149
|
-
if (
|
|
1149
|
+
setup(e, { expose: r, emit: t }) {
|
|
1150
|
+
const a = e, l = t, n = L(null), o = L(null), d = h(() => a.direction === "up" ? "dropup" : a.direction === "end" ? "dropend" : a.direction === "start" ? "dropstart" : "dropdown"), v = h(() => {
|
|
1151
|
+
const C = ["btn", `btn-${a.variant}`];
|
|
1152
|
+
return a.size && C.push(`btn-${a.size}`), C.join(" ");
|
|
1153
|
+
}), c = h(() => {
|
|
1154
|
+
const C = ["dropdown-menu"];
|
|
1155
|
+
return a.menuEnd && C.push("dropdown-menu-end"), C.join(" ");
|
|
1156
|
+
}), m = (C) => {
|
|
1157
|
+
const z = ["dropdown-item"];
|
|
1158
|
+
return C.active && z.push("active"), C.disabled && z.push("disabled"), z.join(" ");
|
|
1159
|
+
}, f = () => l("show"), V = () => l("shown"), y = () => l("hide"), u = () => l("hidden");
|
|
1160
|
+
X(async () => {
|
|
1161
|
+
if (n.value)
|
|
1150
1162
|
try {
|
|
1151
|
-
const
|
|
1152
|
-
|
|
1163
|
+
const z = (await import("bootstrap")).Dropdown, F = n.value.querySelector(".dropdown-toggle");
|
|
1164
|
+
F && (o.value = new z(F, {
|
|
1153
1165
|
autoClose: a.autoClose
|
|
1154
|
-
}),
|
|
1155
|
-
} catch (
|
|
1166
|
+
}), F.addEventListener("show.bs.dropdown", f), F.addEventListener("shown.bs.dropdown", V), F.addEventListener("hide.bs.dropdown", y), F.addEventListener("hidden.bs.dropdown", u));
|
|
1167
|
+
} catch (C) {
|
|
1156
1168
|
l("component-error", {
|
|
1157
1169
|
message: "Bootstrap JS not loaded. Dropdown will use data attributes only.",
|
|
1158
1170
|
componentName: "VibeDropdown",
|
|
1159
|
-
originalError:
|
|
1171
|
+
originalError: C
|
|
1160
1172
|
});
|
|
1161
1173
|
}
|
|
1162
|
-
}),
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1174
|
+
}), Y(() => {
|
|
1175
|
+
const C = n.value?.querySelector(".dropdown-toggle");
|
|
1176
|
+
C && (C.removeEventListener("show.bs.dropdown", f), C.removeEventListener("shown.bs.dropdown", V), C.removeEventListener("hide.bs.dropdown", y), C.removeEventListener("hidden.bs.dropdown", u)), o.value && (o.value.dispose(), o.value = null);
|
|
1165
1177
|
});
|
|
1166
|
-
const
|
|
1167
|
-
!
|
|
1178
|
+
const b = (C, z, F) => {
|
|
1179
|
+
!C.disabled && !C.divider && !C.header && l("item-click", { item: C, index: z, event: F });
|
|
1168
1180
|
};
|
|
1169
|
-
return
|
|
1181
|
+
return r({ show: () => o.value?.show(), hide: () => o.value?.hide(), toggle: () => o.value?.toggle() }), (C, z) => (i(), s("div", {
|
|
1170
1182
|
ref_key: "dropdownRef",
|
|
1171
|
-
ref:
|
|
1172
|
-
class: $(
|
|
1183
|
+
ref: n,
|
|
1184
|
+
class: $(d.value)
|
|
1173
1185
|
}, [
|
|
1174
|
-
e.split ? (
|
|
1186
|
+
e.split ? (i(), s(R, { key: 1 }, [
|
|
1175
1187
|
S("button", {
|
|
1176
|
-
class: $(
|
|
1188
|
+
class: $(v.value),
|
|
1177
1189
|
type: "button"
|
|
1178
1190
|
}, [
|
|
1179
|
-
|
|
1191
|
+
T(C.$slots, "button", {}, () => [
|
|
1180
1192
|
I(k(e.text), 1)
|
|
1181
1193
|
])
|
|
1182
1194
|
], 2),
|
|
1183
1195
|
S("button", {
|
|
1184
1196
|
id: e.id,
|
|
1185
1197
|
type: "button",
|
|
1186
|
-
class: $([
|
|
1198
|
+
class: $([v.value, "dropdown-toggle", "dropdown-toggle-split"]),
|
|
1187
1199
|
"data-bs-toggle": "dropdown",
|
|
1188
1200
|
"aria-expanded": "false",
|
|
1189
1201
|
"data-bs-auto-close": e.autoClose
|
|
1190
|
-
}, [...
|
|
1202
|
+
}, [...z[0] || (z[0] = [
|
|
1191
1203
|
S("span", { class: "visually-hidden" }, "Toggle Dropdown", -1)
|
|
1192
|
-
])], 10,
|
|
1193
|
-
], 64)) : (
|
|
1204
|
+
])], 10, It)
|
|
1205
|
+
], 64)) : (i(), s("button", {
|
|
1194
1206
|
key: 0,
|
|
1195
1207
|
id: e.id,
|
|
1196
|
-
class: $([
|
|
1208
|
+
class: $([v.value, "dropdown-toggle"]),
|
|
1197
1209
|
type: "button",
|
|
1198
1210
|
"data-bs-toggle": "dropdown",
|
|
1199
1211
|
"aria-expanded": "false",
|
|
1200
1212
|
"data-bs-auto-close": e.autoClose
|
|
1201
1213
|
}, [
|
|
1202
|
-
|
|
1214
|
+
T(C.$slots, "button", {}, () => [
|
|
1203
1215
|
I(k(e.text), 1)
|
|
1204
1216
|
])
|
|
1205
|
-
], 10,
|
|
1217
|
+
], 10, Mt)),
|
|
1206
1218
|
S("ul", {
|
|
1207
1219
|
class: $(c.value),
|
|
1208
1220
|
"aria-labelledby": e.id
|
|
1209
1221
|
}, [
|
|
1210
|
-
(
|
|
1211
|
-
|
|
1222
|
+
(i(!0), s(R, null, H(e.items, (F, K) => (i(), s(R, { key: K }, [
|
|
1223
|
+
F.divider ? (i(), s("li", Ft, [...z[1] || (z[1] = [
|
|
1212
1224
|
S("hr", { class: "dropdown-divider" }, null, -1)
|
|
1213
|
-
])])) :
|
|
1214
|
-
S("h6",
|
|
1215
|
-
|
|
1216
|
-
item:
|
|
1217
|
-
index:
|
|
1225
|
+
])])) : F.header ? (i(), s("li", Pt, [
|
|
1226
|
+
S("h6", qt, [
|
|
1227
|
+
T(C.$slots, "header", {
|
|
1228
|
+
item: F,
|
|
1229
|
+
index: K
|
|
1218
1230
|
}, () => [
|
|
1219
|
-
I(k(
|
|
1231
|
+
I(k(F.text), 1)
|
|
1220
1232
|
])
|
|
1221
1233
|
])
|
|
1222
|
-
])) : (
|
|
1223
|
-
(
|
|
1224
|
-
class: $(
|
|
1225
|
-
href:
|
|
1226
|
-
to:
|
|
1227
|
-
type: !
|
|
1228
|
-
disabled:
|
|
1229
|
-
onClick: (
|
|
1234
|
+
])) : (i(), s("li", zt, [
|
|
1235
|
+
(i(), q(A(F.href ? "a" : F.to ? "router-link" : "button"), {
|
|
1236
|
+
class: $(m(F)),
|
|
1237
|
+
href: F.href,
|
|
1238
|
+
to: F.to,
|
|
1239
|
+
type: !F.href && !F.to ? "button" : void 0,
|
|
1240
|
+
disabled: F.disabled,
|
|
1241
|
+
onClick: (_) => b(F, K, _)
|
|
1230
1242
|
}, {
|
|
1231
1243
|
default: j(() => [
|
|
1232
|
-
|
|
1233
|
-
item:
|
|
1234
|
-
index:
|
|
1244
|
+
T(C.$slots, "item", {
|
|
1245
|
+
item: F,
|
|
1246
|
+
index: K
|
|
1235
1247
|
}, () => [
|
|
1236
|
-
I(k(
|
|
1248
|
+
I(k(F.text), 1)
|
|
1237
1249
|
])
|
|
1238
1250
|
]),
|
|
1239
1251
|
_: 2
|
|
1240
1252
|
}, 1032, ["class", "href", "to", "type", "disabled", "onClick"]))
|
|
1241
1253
|
]))
|
|
1242
1254
|
], 64))), 128))
|
|
1243
|
-
], 10,
|
|
1255
|
+
], 10, Rt)
|
|
1244
1256
|
], 2));
|
|
1245
1257
|
}
|
|
1246
|
-
}),
|
|
1258
|
+
}), ee = [];
|
|
1259
|
+
function ye(e) {
|
|
1260
|
+
if (ee.length > 0) {
|
|
1261
|
+
e.preventDefault();
|
|
1262
|
+
const r = ee.pop();
|
|
1263
|
+
r && r();
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
function $e(e) {
|
|
1267
|
+
X(() => {
|
|
1268
|
+
ee.push(e), ee.length === 1 && typeof document < "u" && document.addEventListener("backbutton", ye);
|
|
1269
|
+
}), Se(() => {
|
|
1270
|
+
const r = ee.indexOf(e);
|
|
1271
|
+
r !== -1 && ee.splice(r, 1), ee.length === 0 && typeof document < "u" && document.removeEventListener("backbutton", ye);
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs-keyboard"], Ot = { class: "modal-content" }, Ht = {
|
|
1247
1275
|
key: 0,
|
|
1248
1276
|
class: "modal-header"
|
|
1249
|
-
},
|
|
1277
|
+
}, Dt = ["id"], Gt = { class: "modal-body" }, Xt = {
|
|
1250
1278
|
key: 1,
|
|
1251
1279
|
class: "modal-footer"
|
|
1252
|
-
},
|
|
1280
|
+
}, Yt = /* @__PURE__ */ M({
|
|
1253
1281
|
__name: "VibeModal",
|
|
1254
1282
|
props: {
|
|
1255
1283
|
id: { type: String, default: () => G("modal") },
|
|
@@ -1265,28 +1293,28 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1265
1293
|
teleport: { type: [String, Boolean], default: "body" }
|
|
1266
1294
|
},
|
|
1267
1295
|
emits: ["update:modelValue", "show", "shown", "hide", "hidden", "component-error"],
|
|
1268
|
-
setup(e, { expose:
|
|
1269
|
-
const a = e, l = t,
|
|
1296
|
+
setup(e, { expose: r, emit: t }) {
|
|
1297
|
+
const a = e, l = t, n = L(null), o = L(null), d = L(!1), v = h(() => {
|
|
1270
1298
|
const w = ["modal-dialog"];
|
|
1271
1299
|
return a.size && w.push(`modal-${a.size}`), a.centered && w.push("modal-dialog-centered"), a.scrollable && w.push("modal-dialog-scrollable"), a.fullscreen === !0 ? w.push("modal-fullscreen") : typeof a.fullscreen == "string" && w.push(`modal-fullscreen-${a.fullscreen}-down`), w.join(" ");
|
|
1272
1300
|
}), c = () => {
|
|
1273
|
-
|
|
1274
|
-
},
|
|
1301
|
+
d.value = !0, l("show");
|
|
1302
|
+
}, m = () => {
|
|
1275
1303
|
l("shown"), l("update:modelValue", !0);
|
|
1276
|
-
},
|
|
1304
|
+
}, f = () => {
|
|
1277
1305
|
l("hide");
|
|
1278
|
-
},
|
|
1279
|
-
|
|
1280
|
-
},
|
|
1281
|
-
if (
|
|
1306
|
+
}, V = () => {
|
|
1307
|
+
d.value = !1, l("hidden"), l("update:modelValue", !1);
|
|
1308
|
+
}, y = async () => {
|
|
1309
|
+
if (n.value) {
|
|
1282
1310
|
o.value && o.value.dispose();
|
|
1283
1311
|
try {
|
|
1284
|
-
const
|
|
1285
|
-
o.value = new
|
|
1312
|
+
const B = (await import("bootstrap")).Modal;
|
|
1313
|
+
o.value = new B(n.value, {
|
|
1286
1314
|
backdrop: a.staticBackdrop ? "static" : !0,
|
|
1287
1315
|
keyboard: !a.staticBackdrop,
|
|
1288
1316
|
focus: !0
|
|
1289
|
-
}),
|
|
1317
|
+
}), n.value.addEventListener("show.bs.modal", c), n.value.addEventListener("shown.bs.modal", m), n.value.addEventListener("hide.bs.modal", f), n.value.addEventListener("hidden.bs.modal", V), a.modelValue && o.value.show();
|
|
1290
1318
|
} catch (w) {
|
|
1291
1319
|
l("component-error", {
|
|
1292
1320
|
message: "Bootstrap JS not loaded. Modal will use data attributes only.",
|
|
@@ -1296,65 +1324,67 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1296
1324
|
}
|
|
1297
1325
|
}
|
|
1298
1326
|
};
|
|
1299
|
-
|
|
1300
|
-
|
|
1327
|
+
X(y), Y(() => {
|
|
1328
|
+
n.value && (n.value.removeEventListener("show.bs.modal", c), n.value.removeEventListener("shown.bs.modal", m), n.value.removeEventListener("hide.bs.modal", f), n.value.removeEventListener("hidden.bs.modal", V)), o.value && (d.value && o.value.hide(), o.value.dispose(), o.value = null);
|
|
1301
1329
|
}), O(() => a.modelValue, (w) => {
|
|
1302
|
-
o.value && (w && !
|
|
1303
|
-
}), O(() => a.staticBackdrop,
|
|
1304
|
-
const
|
|
1305
|
-
return
|
|
1330
|
+
o.value && (w && !d.value ? o.value.show() : !w && d.value && o.value.hide());
|
|
1331
|
+
}), O(() => a.staticBackdrop, y);
|
|
1332
|
+
const u = () => o.value?.show(), b = () => o.value?.hide(), p = () => o.value?.handleUpdate();
|
|
1333
|
+
return $e(() => {
|
|
1334
|
+
d.value && b();
|
|
1335
|
+
}), r({ show: u, hide: b, handleUpdate: p, bsInstance: o }), (w, B) => (i(), q(fe, {
|
|
1306
1336
|
to: e.teleport === !0 ? "body" : e.teleport || void 0,
|
|
1307
1337
|
disabled: !e.teleport
|
|
1308
1338
|
}, [
|
|
1309
1339
|
S("div", {
|
|
1310
1340
|
ref_key: "modalRef",
|
|
1311
|
-
ref:
|
|
1341
|
+
ref: n,
|
|
1312
1342
|
id: e.id,
|
|
1313
|
-
class: $(["modal fade", { show:
|
|
1343
|
+
class: $(["modal fade", { show: d.value }]),
|
|
1314
1344
|
tabindex: "-1",
|
|
1315
1345
|
"aria-labelledby": `${e.id}-label`,
|
|
1316
|
-
"aria-hidden": !
|
|
1346
|
+
"aria-hidden": !d.value,
|
|
1317
1347
|
"data-bs-backdrop": e.staticBackdrop ? "static" : void 0,
|
|
1318
1348
|
"data-bs-keyboard": !e.staticBackdrop
|
|
1319
1349
|
}, [
|
|
1320
1350
|
S("div", {
|
|
1321
|
-
class: $(
|
|
1351
|
+
class: $(v.value)
|
|
1322
1352
|
}, [
|
|
1323
|
-
S("div",
|
|
1324
|
-
e.hideHeader ?
|
|
1353
|
+
S("div", Ot, [
|
|
1354
|
+
e.hideHeader ? g("", !0) : (i(), s("div", Ht, [
|
|
1325
1355
|
S("h5", {
|
|
1326
1356
|
id: `${e.id}-label`,
|
|
1327
1357
|
class: "modal-title"
|
|
1328
1358
|
}, [
|
|
1329
|
-
|
|
1359
|
+
T(w.$slots, "header", {}, () => [
|
|
1330
1360
|
I(k(e.title), 1)
|
|
1331
|
-
])
|
|
1332
|
-
], 8,
|
|
1361
|
+
], !0)
|
|
1362
|
+
], 8, Dt),
|
|
1333
1363
|
S("button", {
|
|
1334
1364
|
type: "button",
|
|
1335
1365
|
class: "btn-close",
|
|
1336
1366
|
"aria-label": "Close",
|
|
1337
|
-
onClick:
|
|
1367
|
+
onClick: b
|
|
1338
1368
|
})
|
|
1339
1369
|
])),
|
|
1340
|
-
S("div",
|
|
1341
|
-
|
|
1370
|
+
S("div", Gt, [
|
|
1371
|
+
T(w.$slots, "default", {}, void 0, !0)
|
|
1342
1372
|
]),
|
|
1343
|
-
e.hideFooter ?
|
|
1344
|
-
|
|
1373
|
+
e.hideFooter ? g("", !0) : (i(), s("div", Xt, [
|
|
1374
|
+
T(w.$slots, "footer", {}, () => [
|
|
1345
1375
|
S("button", {
|
|
1346
1376
|
type: "button",
|
|
1347
1377
|
class: "btn btn-secondary",
|
|
1348
|
-
onClick:
|
|
1378
|
+
onClick: b
|
|
1349
1379
|
}, "Close")
|
|
1350
|
-
])
|
|
1380
|
+
], !0)
|
|
1351
1381
|
]))
|
|
1352
1382
|
])
|
|
1353
1383
|
], 2)
|
|
1354
|
-
], 10,
|
|
1384
|
+
], 10, jt)
|
|
1355
1385
|
], 8, ["to", "disabled"]));
|
|
1356
1386
|
}
|
|
1357
|
-
}),
|
|
1387
|
+
}), Ut = /* @__PURE__ */ ae(Yt, [["__scopeId", "data-v-c11ac690"]]), Jt = ["id", "aria-labelledby", "data-bs-backdrop", "data-bs-scroll"], Kt = { class: "offcanvas-header" }, Wt = ["id"], Qt = { class: "offcanvas-body" }, Zt = /* @__PURE__ */ M({
|
|
1358
1388
|
__name: "VibeOffcanvas",
|
|
1359
1389
|
props: {
|
|
1360
1390
|
id: { type: String, default: () => G("offcanvas") },
|
|
@@ -1366,80 +1396,82 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1366
1396
|
teleport: { type: [String, Boolean], default: "body" }
|
|
1367
1397
|
},
|
|
1368
1398
|
emits: ["update:modelValue", "show", "shown", "hide", "hidden", "component-error"],
|
|
1369
|
-
setup(e, { expose:
|
|
1370
|
-
const a = e, l = t,
|
|
1371
|
-
|
|
1372
|
-
},
|
|
1399
|
+
setup(e, { expose: r, emit: t }) {
|
|
1400
|
+
const a = e, l = t, n = L(null), o = L(null), d = L(!1), v = h(() => `offcanvas offcanvas-${a.placement}`), c = () => {
|
|
1401
|
+
d.value = !0, l("show");
|
|
1402
|
+
}, m = () => {
|
|
1373
1403
|
l("shown"), l("update:modelValue", !0);
|
|
1374
|
-
},
|
|
1404
|
+
}, f = () => {
|
|
1375
1405
|
l("hide");
|
|
1376
|
-
},
|
|
1377
|
-
|
|
1378
|
-
},
|
|
1379
|
-
if (
|
|
1406
|
+
}, V = () => {
|
|
1407
|
+
d.value = !1, l("hidden"), l("update:modelValue", !1);
|
|
1408
|
+
}, y = async () => {
|
|
1409
|
+
if (n.value) {
|
|
1380
1410
|
o.value && o.value.dispose();
|
|
1381
1411
|
try {
|
|
1382
1412
|
const w = (await import("bootstrap")).Offcanvas;
|
|
1383
|
-
o.value = new w(
|
|
1413
|
+
o.value = new w(n.value, {
|
|
1384
1414
|
backdrop: a.backdrop === !1 ? !1 : a.backdrop === "static" ? "static" : !0,
|
|
1385
1415
|
scroll: a.scroll,
|
|
1386
1416
|
keyboard: a.backdrop !== "static"
|
|
1387
|
-
}),
|
|
1388
|
-
} catch (
|
|
1417
|
+
}), n.value.addEventListener("show.bs.offcanvas", c), n.value.addEventListener("shown.bs.offcanvas", m), n.value.addEventListener("hide.bs.offcanvas", f), n.value.addEventListener("hidden.bs.offcanvas", V), a.modelValue && o.value.show();
|
|
1418
|
+
} catch (p) {
|
|
1389
1419
|
l("component-error", {
|
|
1390
1420
|
message: "Bootstrap JS not loaded. Offcanvas will use data attributes only.",
|
|
1391
1421
|
componentName: "VibeOffcanvas",
|
|
1392
|
-
originalError:
|
|
1422
|
+
originalError: p
|
|
1393
1423
|
});
|
|
1394
1424
|
}
|
|
1395
1425
|
}
|
|
1396
1426
|
};
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
}), O(() => a.modelValue, (
|
|
1400
|
-
o.value && (
|
|
1401
|
-
}), O([() => a.placement, () => a.backdrop, () => a.scroll],
|
|
1402
|
-
const
|
|
1403
|
-
return
|
|
1427
|
+
X(y), Y(() => {
|
|
1428
|
+
n.value && (n.value.removeEventListener("show.bs.offcanvas", c), n.value.removeEventListener("shown.bs.offcanvas", m), n.value.removeEventListener("hide.bs.offcanvas", f), n.value.removeEventListener("hidden.bs.offcanvas", V)), o.value && (d.value && o.value.hide(), o.value.dispose(), o.value = null);
|
|
1429
|
+
}), O(() => a.modelValue, (p) => {
|
|
1430
|
+
o.value && (p && !d.value ? o.value.show() : !p && d.value && o.value.hide());
|
|
1431
|
+
}), O([() => a.placement, () => a.backdrop, () => a.scroll], y);
|
|
1432
|
+
const u = () => o.value?.show(), b = () => o.value?.hide();
|
|
1433
|
+
return $e(() => {
|
|
1434
|
+
d.value && b();
|
|
1435
|
+
}), r({ show: u, hide: b, bsInstance: o }), (p, w) => (i(), q(fe, {
|
|
1404
1436
|
to: e.teleport === !0 ? "body" : e.teleport || void 0,
|
|
1405
1437
|
disabled: !e.teleport
|
|
1406
1438
|
}, [
|
|
1407
1439
|
S("div", {
|
|
1408
1440
|
ref_key: "offcanvasRef",
|
|
1409
|
-
ref:
|
|
1441
|
+
ref: n,
|
|
1410
1442
|
id: e.id,
|
|
1411
|
-
class: $(
|
|
1443
|
+
class: $(v.value),
|
|
1412
1444
|
tabindex: "-1",
|
|
1413
1445
|
"aria-labelledby": `${e.id}-label`,
|
|
1414
1446
|
"data-bs-backdrop": e.backdrop === !1 ? "false" : e.backdrop === "static" ? "static" : "true",
|
|
1415
1447
|
"data-bs-scroll": e.scroll
|
|
1416
1448
|
}, [
|
|
1417
|
-
S("div",
|
|
1449
|
+
S("div", Kt, [
|
|
1418
1450
|
S("h5", {
|
|
1419
1451
|
id: `${e.id}-label`,
|
|
1420
1452
|
class: "offcanvas-title"
|
|
1421
1453
|
}, [
|
|
1422
|
-
|
|
1454
|
+
T(p.$slots, "header", {}, () => [
|
|
1423
1455
|
I(k(e.title), 1)
|
|
1424
|
-
])
|
|
1425
|
-
], 8,
|
|
1456
|
+
], !0)
|
|
1457
|
+
], 8, Wt),
|
|
1426
1458
|
S("button", {
|
|
1427
1459
|
type: "button",
|
|
1428
1460
|
class: "btn-close",
|
|
1429
1461
|
"aria-label": "Close",
|
|
1430
|
-
onClick:
|
|
1462
|
+
onClick: b
|
|
1431
1463
|
})
|
|
1432
1464
|
]),
|
|
1433
|
-
S("div",
|
|
1434
|
-
|
|
1465
|
+
S("div", Qt, [
|
|
1466
|
+
T(p.$slots, "default", {}, void 0, !0)
|
|
1435
1467
|
])
|
|
1436
|
-
], 10,
|
|
1468
|
+
], 10, Jt)
|
|
1437
1469
|
], 8, ["to", "disabled"]));
|
|
1438
1470
|
}
|
|
1439
|
-
}),
|
|
1471
|
+
}), _t = /* @__PURE__ */ ae(Zt, [["__scopeId", "data-v-f03bd194"]]), ea = ["id", "data-bs-autohide", "data-bs-delay"], ta = {
|
|
1440
1472
|
key: 0,
|
|
1441
1473
|
class: "toast-header"
|
|
1442
|
-
},
|
|
1474
|
+
}, aa = { class: "me-auto" }, la = { class: "toast-body" }, oa = /* @__PURE__ */ M({
|
|
1443
1475
|
__name: "VibeToast",
|
|
1444
1476
|
props: {
|
|
1445
1477
|
id: { type: String, default: () => G("toast") },
|
|
@@ -1452,30 +1484,30 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1452
1484
|
placement: { type: String, default: "top-end" }
|
|
1453
1485
|
},
|
|
1454
1486
|
emits: ["update:modelValue", "show", "shown", "hide", "hidden", "component-error"],
|
|
1455
|
-
setup(e, { expose:
|
|
1456
|
-
const a = e, l = t,
|
|
1487
|
+
setup(e, { expose: r, emit: t }) {
|
|
1488
|
+
const a = e, l = t, n = L(null), o = L(null), d = L(!1), v = h(() => {
|
|
1457
1489
|
const w = ["toast"];
|
|
1458
1490
|
return a.variant && w.push(`text-bg-${a.variant}`), w.join(" ");
|
|
1459
|
-
}), c =
|
|
1460
|
-
const w = ["toast-container", "position-fixed", "p-3"],
|
|
1461
|
-
return
|
|
1462
|
-
}),
|
|
1463
|
-
|
|
1464
|
-
},
|
|
1491
|
+
}), c = h(() => {
|
|
1492
|
+
const w = ["toast-container", "position-fixed", "p-3"], B = a.placement;
|
|
1493
|
+
return B.includes("top") && w.push("top-0"), B.includes("bottom") && w.push("bottom-0"), B.includes("middle") && w.push("top-50", "start-50", "translate-middle"), B.includes("start") && w.push("start-0"), B.includes("end") && w.push("end-0"), B.includes("center") && !B.includes("middle") && w.push("start-50", "translate-middle-x"), w.join(" ");
|
|
1494
|
+
}), m = () => {
|
|
1495
|
+
d.value = !0, l("show");
|
|
1496
|
+
}, f = () => {
|
|
1465
1497
|
l("shown"), l("update:modelValue", !0);
|
|
1466
|
-
},
|
|
1498
|
+
}, V = () => {
|
|
1467
1499
|
l("hide");
|
|
1468
|
-
},
|
|
1469
|
-
|
|
1470
|
-
},
|
|
1471
|
-
if (
|
|
1500
|
+
}, y = () => {
|
|
1501
|
+
d.value = !1, l("hidden"), l("update:modelValue", !1);
|
|
1502
|
+
}, u = async () => {
|
|
1503
|
+
if (n.value) {
|
|
1472
1504
|
o.value && o.value.dispose();
|
|
1473
1505
|
try {
|
|
1474
|
-
const
|
|
1475
|
-
o.value = new
|
|
1506
|
+
const B = (await import("bootstrap")).Toast;
|
|
1507
|
+
o.value = new B(n.value, {
|
|
1476
1508
|
autohide: a.autohide,
|
|
1477
1509
|
delay: a.delay
|
|
1478
|
-
}),
|
|
1510
|
+
}), n.value.addEventListener("show.bs.toast", m), n.value.addEventListener("shown.bs.toast", f), n.value.addEventListener("hide.bs.toast", V), n.value.addEventListener("hidden.bs.toast", y), a.modelValue && o.value.show();
|
|
1479
1511
|
} catch (w) {
|
|
1480
1512
|
l("component-error", {
|
|
1481
1513
|
message: "Bootstrap JS not loaded. Toast will use data attributes only.",
|
|
@@ -1485,13 +1517,13 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1485
1517
|
}
|
|
1486
1518
|
}
|
|
1487
1519
|
};
|
|
1488
|
-
|
|
1489
|
-
|
|
1520
|
+
X(u), Y(() => {
|
|
1521
|
+
n.value && (n.value.removeEventListener("show.bs.toast", m), n.value.removeEventListener("shown.bs.toast", f), n.value.removeEventListener("hide.bs.toast", V), n.value.removeEventListener("hidden.bs.toast", y)), o.value && (o.value.dispose(), o.value = null);
|
|
1490
1522
|
}), O(() => a.modelValue, (w) => {
|
|
1491
|
-
o.value && (w && !
|
|
1492
|
-
}), O([() => a.autohide, () => a.delay],
|
|
1493
|
-
const
|
|
1494
|
-
return
|
|
1523
|
+
o.value && (w && !d.value ? o.value.show() : !w && d.value && o.value.hide());
|
|
1524
|
+
}), O([() => a.autohide, () => a.delay], u);
|
|
1525
|
+
const b = () => o.value?.show(), p = () => o.value?.hide();
|
|
1526
|
+
return r({ show: b, hide: p, bsInstance: o }), (w, B) => (i(), q(fe, {
|
|
1495
1527
|
to: e.teleport === !0 ? "body" : e.teleport || void 0,
|
|
1496
1528
|
disabled: !e.teleport
|
|
1497
1529
|
}, [
|
|
@@ -1501,40 +1533,40 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1501
1533
|
}, [
|
|
1502
1534
|
S("div", {
|
|
1503
1535
|
ref_key: "toastRef",
|
|
1504
|
-
ref:
|
|
1536
|
+
ref: n,
|
|
1505
1537
|
id: e.id,
|
|
1506
|
-
class: $(
|
|
1538
|
+
class: $(v.value),
|
|
1507
1539
|
role: "alert",
|
|
1508
1540
|
"aria-live": "assertive",
|
|
1509
1541
|
"aria-atomic": "true",
|
|
1510
1542
|
"data-bs-autohide": e.autohide,
|
|
1511
1543
|
"data-bs-delay": e.delay
|
|
1512
1544
|
}, [
|
|
1513
|
-
e.title || w.$slots.header ? (
|
|
1514
|
-
|
|
1515
|
-
S("strong",
|
|
1545
|
+
e.title || w.$slots.header ? (i(), s("div", ta, [
|
|
1546
|
+
T(w.$slots, "header", {}, () => [
|
|
1547
|
+
S("strong", aa, k(e.title), 1)
|
|
1516
1548
|
]),
|
|
1517
1549
|
S("button", {
|
|
1518
1550
|
type: "button",
|
|
1519
1551
|
class: "btn-close",
|
|
1520
1552
|
"aria-label": "Close",
|
|
1521
|
-
onClick:
|
|
1553
|
+
onClick: p
|
|
1522
1554
|
})
|
|
1523
|
-
])) :
|
|
1524
|
-
S("div",
|
|
1525
|
-
|
|
1555
|
+
])) : g("", !0),
|
|
1556
|
+
S("div", la, [
|
|
1557
|
+
T(w.$slots, "default")
|
|
1526
1558
|
])
|
|
1527
|
-
], 10,
|
|
1559
|
+
], 10, ea)
|
|
1528
1560
|
], 2)
|
|
1529
1561
|
], 8, ["to", "disabled"]));
|
|
1530
1562
|
}
|
|
1531
|
-
}),
|
|
1563
|
+
}), na = ["id", "data-bs-ride", "data-bs-interval", "data-bs-keyboard", "data-bs-pause", "data-bs-wrap", "data-bs-touch"], ia = {
|
|
1532
1564
|
key: 0,
|
|
1533
1565
|
class: "carousel-indicators"
|
|
1534
|
-
},
|
|
1566
|
+
}, sa = ["data-bs-target", "data-bs-slide-to", "aria-current", "aria-label"], ra = { class: "carousel-inner" }, da = ["data-bs-interval"], ua = ["src", "alt"], ca = {
|
|
1535
1567
|
key: 0,
|
|
1536
1568
|
class: "carousel-caption d-none d-md-block"
|
|
1537
|
-
},
|
|
1569
|
+
}, va = { key: 0 }, fa = { key: 1 }, ba = ["data-bs-target"], ha = ["data-bs-target"], pa = /* @__PURE__ */ M({
|
|
1538
1570
|
__name: "VibeCarousel",
|
|
1539
1571
|
props: {
|
|
1540
1572
|
id: { type: String, default: () => G("carousel") },
|
|
@@ -1552,49 +1584,49 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1552
1584
|
items: { type: Array, required: !0 }
|
|
1553
1585
|
},
|
|
1554
1586
|
emits: ["update:modelValue", "slide", "slid", "component-error"],
|
|
1555
|
-
setup(e, { expose:
|
|
1556
|
-
const a = e, l = t,
|
|
1557
|
-
const
|
|
1558
|
-
return a.dark &&
|
|
1559
|
-
}), c = (
|
|
1560
|
-
l("slide",
|
|
1561
|
-
},
|
|
1562
|
-
|
|
1563
|
-
},
|
|
1564
|
-
if (
|
|
1587
|
+
setup(e, { expose: r, emit: t }) {
|
|
1588
|
+
const a = e, l = t, n = L(null), o = L(null), d = L(a.modelValue), v = h(() => {
|
|
1589
|
+
const y = ["carousel", "slide"];
|
|
1590
|
+
return a.dark && y.push("carousel-dark"), a.fade && y.push("carousel-fade"), y.join(" ");
|
|
1591
|
+
}), c = (y) => {
|
|
1592
|
+
l("slide", y);
|
|
1593
|
+
}, m = (y) => {
|
|
1594
|
+
d.value = y.to, l("update:modelValue", y.to), l("slid", y);
|
|
1595
|
+
}, f = async () => {
|
|
1596
|
+
if (n.value) {
|
|
1565
1597
|
o.value && o.value.dispose();
|
|
1566
1598
|
try {
|
|
1567
|
-
const
|
|
1568
|
-
o.value = new
|
|
1599
|
+
const u = (await import("bootstrap")).Carousel;
|
|
1600
|
+
o.value = new u(n.value, {
|
|
1569
1601
|
interval: a.interval,
|
|
1570
1602
|
keyboard: a.keyboard,
|
|
1571
1603
|
pause: a.pause,
|
|
1572
1604
|
ride: a.ride === !0 ? "carousel" : a.ride,
|
|
1573
1605
|
wrap: a.wrap,
|
|
1574
1606
|
touch: a.touch
|
|
1575
|
-
}),
|
|
1576
|
-
} catch (
|
|
1607
|
+
}), n.value.addEventListener("slide.bs.carousel", c), n.value.addEventListener("slid.bs.carousel", m), a.modelValue !== 0 && o.value.to(a.modelValue);
|
|
1608
|
+
} catch (y) {
|
|
1577
1609
|
l("component-error", {
|
|
1578
1610
|
message: "Bootstrap JS not loaded. Carousel will use data attributes only.",
|
|
1579
1611
|
componentName: "VibeCarousel",
|
|
1580
|
-
originalError:
|
|
1612
|
+
originalError: y
|
|
1581
1613
|
});
|
|
1582
1614
|
}
|
|
1583
1615
|
}
|
|
1584
1616
|
};
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
}), O(() => a.modelValue, (
|
|
1588
|
-
o.value &&
|
|
1617
|
+
X(f), Y(() => {
|
|
1618
|
+
n.value && (n.value.removeEventListener("slide.bs.carousel", c), n.value.removeEventListener("slid.bs.carousel", m)), o.value && (o.value.dispose(), o.value = null);
|
|
1619
|
+
}), O(() => a.modelValue, (y) => {
|
|
1620
|
+
o.value && y !== d.value && o.value.to(y);
|
|
1589
1621
|
}), O(() => a.items, async () => {
|
|
1590
|
-
await
|
|
1622
|
+
await se(), await f();
|
|
1591
1623
|
}, { deep: !0 });
|
|
1592
|
-
const
|
|
1593
|
-
return
|
|
1624
|
+
const V = (y, u) => y.alt ? y.alt : y.caption ? y.caption : y.captionText ? y.captionText : `Carousel slide ${u + 1}`;
|
|
1625
|
+
return r({ bsInstance: o, refresh: f }), (y, u) => (i(), s("div", {
|
|
1594
1626
|
ref_key: "carouselRef",
|
|
1595
|
-
ref:
|
|
1627
|
+
ref: n,
|
|
1596
1628
|
id: e.id,
|
|
1597
|
-
class: $(
|
|
1629
|
+
class: $(v.value),
|
|
1598
1630
|
"data-bs-ride": e.ride === !0 ? "carousel" : e.ride,
|
|
1599
1631
|
"data-bs-interval": e.interval,
|
|
1600
1632
|
"data-bs-keyboard": e.keyboard,
|
|
@@ -1602,68 +1634,68 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1602
1634
|
"data-bs-wrap": e.wrap,
|
|
1603
1635
|
"data-bs-touch": e.touch
|
|
1604
1636
|
}, [
|
|
1605
|
-
e.indicators ? (
|
|
1606
|
-
(
|
|
1607
|
-
key: `indicator-${
|
|
1637
|
+
e.indicators ? (i(), s("div", ia, [
|
|
1638
|
+
(i(!0), s(R, null, H(e.items, (b, p) => (i(), s("button", {
|
|
1639
|
+
key: `indicator-${p}`,
|
|
1608
1640
|
type: "button",
|
|
1609
1641
|
"data-bs-target": `#${e.id}`,
|
|
1610
|
-
"data-bs-slide-to":
|
|
1611
|
-
class: $({ active:
|
|
1612
|
-
"aria-current":
|
|
1613
|
-
"aria-label": `Slide ${
|
|
1614
|
-
}, null, 10,
|
|
1615
|
-
])) :
|
|
1616
|
-
S("div",
|
|
1617
|
-
(
|
|
1618
|
-
key: `slide-${
|
|
1619
|
-
class: $(["carousel-item", { active:
|
|
1620
|
-
"data-bs-interval":
|
|
1642
|
+
"data-bs-slide-to": p,
|
|
1643
|
+
class: $({ active: p === d.value }),
|
|
1644
|
+
"aria-current": p === d.value,
|
|
1645
|
+
"aria-label": `Slide ${p + 1}`
|
|
1646
|
+
}, null, 10, sa))), 128))
|
|
1647
|
+
])) : g("", !0),
|
|
1648
|
+
S("div", ra, [
|
|
1649
|
+
(i(!0), s(R, null, H(e.items, (b, p) => (i(), s("div", {
|
|
1650
|
+
key: `slide-${p}`,
|
|
1651
|
+
class: $(["carousel-item", { active: p === d.value }]),
|
|
1652
|
+
"data-bs-interval": b.interval
|
|
1621
1653
|
}, [
|
|
1622
1654
|
S("img", {
|
|
1623
|
-
src:
|
|
1624
|
-
alt:
|
|
1655
|
+
src: b.src,
|
|
1656
|
+
alt: V(b, p),
|
|
1625
1657
|
class: "d-block w-100"
|
|
1626
|
-
}, null, 8,
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
item:
|
|
1630
|
-
index:
|
|
1658
|
+
}, null, 8, ua),
|
|
1659
|
+
b.caption || b.captionText || y.$slots.caption ? (i(), s("div", ca, [
|
|
1660
|
+
T(y.$slots, "caption", {
|
|
1661
|
+
item: b,
|
|
1662
|
+
index: p
|
|
1631
1663
|
}, () => [
|
|
1632
|
-
|
|
1633
|
-
|
|
1664
|
+
b.caption ? (i(), s("h5", va, k(b.caption), 1)) : g("", !0),
|
|
1665
|
+
b.captionText ? (i(), s("p", fa, k(b.captionText), 1)) : g("", !0)
|
|
1634
1666
|
])
|
|
1635
|
-
])) :
|
|
1636
|
-
], 10,
|
|
1667
|
+
])) : g("", !0)
|
|
1668
|
+
], 10, da))), 128))
|
|
1637
1669
|
]),
|
|
1638
|
-
e.controls ? (
|
|
1670
|
+
e.controls ? (i(), s(R, { key: 1 }, [
|
|
1639
1671
|
S("button", {
|
|
1640
1672
|
class: "carousel-control-prev",
|
|
1641
1673
|
type: "button",
|
|
1642
1674
|
"data-bs-target": `#${e.id}`,
|
|
1643
1675
|
"data-bs-slide": "prev"
|
|
1644
|
-
}, [...
|
|
1676
|
+
}, [...u[0] || (u[0] = [
|
|
1645
1677
|
S("span", {
|
|
1646
1678
|
class: "carousel-control-prev-icon",
|
|
1647
1679
|
"aria-hidden": "true"
|
|
1648
1680
|
}, null, -1),
|
|
1649
1681
|
S("span", { class: "visually-hidden" }, "Previous", -1)
|
|
1650
|
-
])], 8,
|
|
1682
|
+
])], 8, ba),
|
|
1651
1683
|
S("button", {
|
|
1652
1684
|
class: "carousel-control-next",
|
|
1653
1685
|
type: "button",
|
|
1654
1686
|
"data-bs-target": `#${e.id}`,
|
|
1655
1687
|
"data-bs-slide": "next"
|
|
1656
|
-
}, [...
|
|
1688
|
+
}, [...u[1] || (u[1] = [
|
|
1657
1689
|
S("span", {
|
|
1658
1690
|
class: "carousel-control-next-icon",
|
|
1659
1691
|
"aria-hidden": "true"
|
|
1660
1692
|
}, null, -1),
|
|
1661
1693
|
S("span", { class: "visually-hidden" }, "Next", -1)
|
|
1662
|
-
])], 8,
|
|
1663
|
-
], 64)) :
|
|
1664
|
-
], 10,
|
|
1694
|
+
])], 8, ha)
|
|
1695
|
+
], 64)) : g("", !0)
|
|
1696
|
+
], 10, na));
|
|
1665
1697
|
}
|
|
1666
|
-
}),
|
|
1698
|
+
}), ma = ["data-bs-placement", "data-bs-title", "data-bs-trigger", "data-bs-html"], ya = /* @__PURE__ */ M({
|
|
1667
1699
|
__name: "VibeTooltip",
|
|
1668
1700
|
props: {
|
|
1669
1701
|
content: { type: String, default: void 0 },
|
|
@@ -1673,44 +1705,44 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1673
1705
|
html: { type: Boolean, default: !1 }
|
|
1674
1706
|
},
|
|
1675
1707
|
emits: ["component-error"],
|
|
1676
|
-
setup(e, { expose:
|
|
1677
|
-
const a = e, l = t,
|
|
1678
|
-
if (
|
|
1708
|
+
setup(e, { expose: r, emit: t }) {
|
|
1709
|
+
const a = e, l = t, n = L(null), o = L(null), d = () => typeof window < "u" && ("ontouchstart" in window || navigator.maxTouchPoints > 0), v = h(() => d() && a.trigger === "hover focus" ? "click" : a.trigger), c = async () => {
|
|
1710
|
+
if (n.value) {
|
|
1679
1711
|
o.value && o.value.dispose();
|
|
1680
1712
|
try {
|
|
1681
|
-
const
|
|
1682
|
-
o.value = new
|
|
1713
|
+
const f = (await import("bootstrap")).Tooltip;
|
|
1714
|
+
o.value = new f(n.value, {
|
|
1683
1715
|
title: a.text || a.content || "",
|
|
1684
1716
|
placement: a.placement,
|
|
1685
|
-
trigger:
|
|
1717
|
+
trigger: v.value,
|
|
1686
1718
|
html: a.html
|
|
1687
1719
|
});
|
|
1688
|
-
} catch (
|
|
1720
|
+
} catch (m) {
|
|
1689
1721
|
l("component-error", {
|
|
1690
1722
|
message: "Bootstrap JS not loaded. Tooltip will use data attributes only.",
|
|
1691
1723
|
componentName: "VibeTooltip",
|
|
1692
|
-
originalError:
|
|
1724
|
+
originalError: m
|
|
1693
1725
|
});
|
|
1694
1726
|
}
|
|
1695
1727
|
}
|
|
1696
1728
|
};
|
|
1697
|
-
return
|
|
1729
|
+
return X(c), Y(() => {
|
|
1698
1730
|
o.value && (o.value.dispose(), o.value = null);
|
|
1699
1731
|
}), O([() => a.content, () => a.text], () => {
|
|
1700
1732
|
o.value && o.value.setContent({ ".tooltip-inner": a.text || a.content || "" });
|
|
1701
|
-
}), O([() => a.placement, () => a.trigger, () => a.html],
|
|
1733
|
+
}), O([() => a.placement, () => a.trigger, () => a.html], c), r({ bsInstance: o }), (m, f) => (i(), s("span", {
|
|
1702
1734
|
ref_key: "tooltipRef",
|
|
1703
|
-
ref:
|
|
1735
|
+
ref: n,
|
|
1704
1736
|
"data-bs-toggle": "tooltip",
|
|
1705
1737
|
"data-bs-placement": e.placement,
|
|
1706
1738
|
"data-bs-title": e.text || e.content,
|
|
1707
1739
|
"data-bs-trigger": e.trigger,
|
|
1708
1740
|
"data-bs-html": e.html
|
|
1709
1741
|
}, [
|
|
1710
|
-
|
|
1711
|
-
], 8,
|
|
1742
|
+
T(m.$slots, "default")
|
|
1743
|
+
], 8, ma));
|
|
1712
1744
|
}
|
|
1713
|
-
}),
|
|
1745
|
+
}), ga = ["data-bs-placement", "data-bs-title", "data-bs-content", "data-bs-trigger", "data-bs-html"], ka = /* @__PURE__ */ M({
|
|
1714
1746
|
__name: "VibePopover",
|
|
1715
1747
|
props: {
|
|
1716
1748
|
title: { type: String, default: void 0 },
|
|
@@ -1721,38 +1753,38 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1721
1753
|
html: { type: Boolean, default: !1 }
|
|
1722
1754
|
},
|
|
1723
1755
|
emits: ["component-error"],
|
|
1724
|
-
setup(e, { expose:
|
|
1725
|
-
const a = e, l = t,
|
|
1726
|
-
if (
|
|
1756
|
+
setup(e, { expose: r, emit: t }) {
|
|
1757
|
+
const a = e, l = t, n = L(null), o = L(null), d = () => typeof window < "u" && ("ontouchstart" in window || navigator.maxTouchPoints > 0), v = h(() => d() && a.trigger === "hover focus" ? "click" : a.trigger), c = async () => {
|
|
1758
|
+
if (n.value) {
|
|
1727
1759
|
o.value && o.value.dispose();
|
|
1728
1760
|
try {
|
|
1729
|
-
const
|
|
1730
|
-
o.value = new
|
|
1761
|
+
const f = (await import("bootstrap")).Popover;
|
|
1762
|
+
o.value = new f(n.value, {
|
|
1731
1763
|
title: a.title,
|
|
1732
1764
|
content: a.text || a.content || "",
|
|
1733
1765
|
placement: a.placement,
|
|
1734
|
-
trigger:
|
|
1766
|
+
trigger: v.value,
|
|
1735
1767
|
html: a.html
|
|
1736
1768
|
});
|
|
1737
|
-
} catch (
|
|
1769
|
+
} catch (m) {
|
|
1738
1770
|
l("component-error", {
|
|
1739
1771
|
message: "Bootstrap JS not loaded. Popover will use data attributes only.",
|
|
1740
1772
|
componentName: "VibePopover",
|
|
1741
|
-
originalError:
|
|
1773
|
+
originalError: m
|
|
1742
1774
|
});
|
|
1743
1775
|
}
|
|
1744
1776
|
}
|
|
1745
1777
|
};
|
|
1746
|
-
return
|
|
1778
|
+
return X(c), Y(() => {
|
|
1747
1779
|
o.value && (o.value.dispose(), o.value = null);
|
|
1748
1780
|
}), O([() => a.content, () => a.text, () => a.title], () => {
|
|
1749
1781
|
o.value && o.value.setContent({
|
|
1750
1782
|
".popover-header": a.title || "",
|
|
1751
1783
|
".popover-body": a.text || a.content || ""
|
|
1752
1784
|
});
|
|
1753
|
-
}), O([() => a.placement, () => a.trigger, () => a.html],
|
|
1785
|
+
}), O([() => a.placement, () => a.trigger, () => a.html], c), r({ bsInstance: o }), (m, f) => (i(), s("span", {
|
|
1754
1786
|
ref_key: "popoverRef",
|
|
1755
|
-
ref:
|
|
1787
|
+
ref: n,
|
|
1756
1788
|
"data-bs-toggle": "popover",
|
|
1757
1789
|
"data-bs-placement": e.placement,
|
|
1758
1790
|
"data-bs-title": e.title,
|
|
@@ -1760,10 +1792,10 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1760
1792
|
"data-bs-trigger": e.trigger,
|
|
1761
1793
|
"data-bs-html": e.html
|
|
1762
1794
|
}, [
|
|
1763
|
-
|
|
1764
|
-
], 8,
|
|
1795
|
+
T(m.$slots, "default")
|
|
1796
|
+
], 8, ga));
|
|
1765
1797
|
}
|
|
1766
|
-
}),
|
|
1798
|
+
}), Sa = /* @__PURE__ */ M({
|
|
1767
1799
|
__name: "VibeScrollspy",
|
|
1768
1800
|
props: {
|
|
1769
1801
|
target: { type: String, required: !0 },
|
|
@@ -1773,20 +1805,20 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1773
1805
|
tag: { type: String, default: "div" }
|
|
1774
1806
|
},
|
|
1775
1807
|
emits: ["activate", "component-error"],
|
|
1776
|
-
setup(e, { expose:
|
|
1777
|
-
const a = e, l = t,
|
|
1808
|
+
setup(e, { expose: r, emit: t }) {
|
|
1809
|
+
const a = e, l = t, n = L(null), o = L(null), d = (c) => {
|
|
1778
1810
|
l("activate", c);
|
|
1779
1811
|
};
|
|
1780
|
-
return
|
|
1781
|
-
if (
|
|
1812
|
+
return X(async () => {
|
|
1813
|
+
if (n.value)
|
|
1782
1814
|
try {
|
|
1783
|
-
const
|
|
1784
|
-
o.value = new
|
|
1815
|
+
const m = (await import("bootstrap")).ScrollSpy;
|
|
1816
|
+
o.value = new m(n.value, {
|
|
1785
1817
|
target: a.target,
|
|
1786
1818
|
offset: a.offset,
|
|
1787
1819
|
method: a.method,
|
|
1788
1820
|
smoothScroll: a.smoothScroll
|
|
1789
|
-
}),
|
|
1821
|
+
}), n.value.addEventListener("activate.bs.scrollspy", d);
|
|
1790
1822
|
} catch (c) {
|
|
1791
1823
|
l("component-error", {
|
|
1792
1824
|
message: "Bootstrap JS not loaded. ScrollSpy will use data attributes only.",
|
|
@@ -1794,13 +1826,13 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1794
1826
|
originalError: c
|
|
1795
1827
|
});
|
|
1796
1828
|
}
|
|
1797
|
-
}),
|
|
1798
|
-
|
|
1799
|
-
}),
|
|
1829
|
+
}), Y(() => {
|
|
1830
|
+
n.value && n.value.removeEventListener("activate.bs.scrollspy", d), o.value && (o.value.dispose(), o.value = null);
|
|
1831
|
+
}), r({ refresh: () => {
|
|
1800
1832
|
o.value && o.value.refresh();
|
|
1801
|
-
} }), (c,
|
|
1833
|
+
} }), (c, m) => (i(), q(A(e.tag), {
|
|
1802
1834
|
ref_key: "scrollspyRef",
|
|
1803
|
-
ref:
|
|
1835
|
+
ref: n,
|
|
1804
1836
|
"data-bs-spy": "scroll",
|
|
1805
1837
|
"data-bs-target": e.target,
|
|
1806
1838
|
"data-bs-offset": e.offset,
|
|
@@ -1810,12 +1842,12 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1810
1842
|
style: { position: "relative", height: "100%", overflow: "auto" }
|
|
1811
1843
|
}, {
|
|
1812
1844
|
default: j(() => [
|
|
1813
|
-
|
|
1845
|
+
T(c.$slots, "default")
|
|
1814
1846
|
]),
|
|
1815
1847
|
_: 3
|
|
1816
1848
|
}, 8, ["data-bs-target", "data-bs-offset", "data-bs-method", "data-bs-smooth-scroll"]));
|
|
1817
1849
|
}
|
|
1818
|
-
}),
|
|
1850
|
+
}), $a = /* @__PURE__ */ M({
|
|
1819
1851
|
__name: "VibeIcon",
|
|
1820
1852
|
props: {
|
|
1821
1853
|
// Icon name (e.g., 'house', 'heart-fill', 'star')
|
|
@@ -1834,14 +1866,14 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1834
1866
|
rotate: { type: Number, default: void 0 }
|
|
1835
1867
|
},
|
|
1836
1868
|
emits: ["click", "component-error"],
|
|
1837
|
-
setup(e, { emit:
|
|
1838
|
-
const t = e, a =
|
|
1839
|
-
const
|
|
1840
|
-
return t.size && (["1x", "2x", "3x", "4x", "5x"].includes(t.size) ||
|
|
1841
|
-
}),
|
|
1842
|
-
const
|
|
1869
|
+
setup(e, { emit: r }) {
|
|
1870
|
+
const t = e, a = r, l = h(() => {
|
|
1871
|
+
const d = ["bi", `bi-${t.icon}`];
|
|
1872
|
+
return t.size && (["1x", "2x", "3x", "4x", "5x"].includes(t.size) || d.push(`bi-${t.size}`)), t.customClass && d.push(t.customClass), d.join(" ");
|
|
1873
|
+
}), n = h(() => {
|
|
1874
|
+
const d = {};
|
|
1843
1875
|
if (t.fontSize)
|
|
1844
|
-
|
|
1876
|
+
d.fontSize = t.fontSize;
|
|
1845
1877
|
else if (t.size) {
|
|
1846
1878
|
const c = {
|
|
1847
1879
|
"1x": "1rem",
|
|
@@ -1850,51 +1882,51 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1850
1882
|
"4x": "4rem",
|
|
1851
1883
|
"5x": "5rem"
|
|
1852
1884
|
};
|
|
1853
|
-
c[t.size] && (
|
|
1885
|
+
c[t.size] && (d.fontSize = c[t.size]);
|
|
1854
1886
|
}
|
|
1855
|
-
t.color && (
|
|
1856
|
-
const
|
|
1857
|
-
return t.flipH &&
|
|
1858
|
-
}), o = (
|
|
1859
|
-
a("click",
|
|
1887
|
+
t.color && (d.color = t.color);
|
|
1888
|
+
const v = [];
|
|
1889
|
+
return t.flipH && v.push("scaleX(-1)"), t.flipV && v.push("scaleY(-1)"), t.rotate && v.push(`rotate(${t.rotate}deg)`), v.length > 0 && (d.transform = v.join(" "), d.display = "inline-block"), Object.keys(d).length > 0 ? d : void 0;
|
|
1890
|
+
}), o = (d) => {
|
|
1891
|
+
a("click", d);
|
|
1860
1892
|
};
|
|
1861
|
-
return (
|
|
1893
|
+
return (d, v) => (i(), s("i", {
|
|
1862
1894
|
class: $(l.value),
|
|
1863
|
-
style:
|
|
1895
|
+
style: Z(n.value),
|
|
1864
1896
|
"aria-hidden": !0,
|
|
1865
1897
|
onClick: o
|
|
1866
1898
|
}, null, 6));
|
|
1867
1899
|
}
|
|
1868
|
-
}),
|
|
1900
|
+
}), wa = { class: "vibe-datatable" }, Va = { class: "row mb-3" }, Ca = {
|
|
1869
1901
|
key: 0,
|
|
1870
1902
|
class: "col-md-6 mb-2 mb-md-0"
|
|
1871
|
-
},
|
|
1903
|
+
}, xa = ["placeholder"], Ba = {
|
|
1872
1904
|
key: 1,
|
|
1873
1905
|
class: "col-md-6"
|
|
1874
|
-
},
|
|
1906
|
+
}, La = { class: "d-flex justify-content-md-end align-items-center" }, Ta = ["value"], Na = ["onClick"], Ea = {
|
|
1875
1907
|
key: 0,
|
|
1876
1908
|
class: "ms-1"
|
|
1877
|
-
},
|
|
1909
|
+
}, Ma = ["onClick"], Ia = ["data-label"], Ra = { key: 0 }, Fa = ["colspan"], Pa = { class: "row" }, qa = {
|
|
1878
1910
|
key: 0,
|
|
1879
1911
|
class: "col-md-6 mb-2 mb-md-0"
|
|
1880
|
-
},
|
|
1912
|
+
}, za = { class: "datatable-info" }, Aa = {
|
|
1881
1913
|
key: 1,
|
|
1882
1914
|
class: "col-md-6"
|
|
1883
|
-
},
|
|
1915
|
+
}, ja = { class: "pagination justify-content-md-end mb-0" }, Oa = {
|
|
1884
1916
|
key: 0,
|
|
1885
1917
|
class: "page-item"
|
|
1886
|
-
},
|
|
1918
|
+
}, Ha = {
|
|
1887
1919
|
key: 1,
|
|
1888
1920
|
class: "page-item disabled"
|
|
1889
|
-
},
|
|
1921
|
+
}, Da = ["onClick"], Ga = {
|
|
1890
1922
|
key: 2,
|
|
1891
1923
|
class: "page-item disabled"
|
|
1892
|
-
},
|
|
1924
|
+
}, Xa = {
|
|
1893
1925
|
key: 3,
|
|
1894
1926
|
class: "page-item"
|
|
1895
|
-
},
|
|
1927
|
+
}, Ya = /* @__PURE__ */ M({
|
|
1896
1928
|
__name: "VibeDataTable",
|
|
1897
|
-
props: /* @__PURE__ */
|
|
1929
|
+
props: /* @__PURE__ */ pe({
|
|
1898
1930
|
// Data
|
|
1899
1931
|
items: { type: Array, default: () => [] },
|
|
1900
1932
|
columns: { type: Array, required: !0 },
|
|
@@ -1907,6 +1939,7 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1907
1939
|
hover: { type: Boolean, default: !1 },
|
|
1908
1940
|
small: { type: Boolean, default: !1 },
|
|
1909
1941
|
responsive: { type: Boolean, default: !0 },
|
|
1942
|
+
stack: { type: Boolean, default: !1 },
|
|
1910
1943
|
variant: { type: String, default: void 0 },
|
|
1911
1944
|
// Features
|
|
1912
1945
|
searchable: { type: Boolean, default: !0 },
|
|
@@ -1933,233 +1966,229 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
1933
1966
|
sortDesc: { type: Boolean, default: !1 },
|
|
1934
1967
|
sortDescModifiers: {}
|
|
1935
1968
|
}),
|
|
1936
|
-
emits: /* @__PURE__ */
|
|
1937
|
-
setup(e, { emit:
|
|
1938
|
-
const t = e, a =
|
|
1939
|
-
O(
|
|
1969
|
+
emits: /* @__PURE__ */ pe(["row-clicked", "component-error"], ["update:currentPage", "update:perPage", "update:sortBy", "update:sortDesc"]),
|
|
1970
|
+
setup(e, { emit: r }) {
|
|
1971
|
+
const t = e, a = oe(e, "currentPage"), l = oe(e, "perPage"), n = oe(e, "sortBy"), o = oe(e, "sortDesc"), d = r, v = L(""), c = L(null), m = L(""), f = (x, N) => t.rowKey && x[t.rowKey] !== void 0 ? String(x[t.rowKey]) : N;
|
|
1972
|
+
O(v, (x) => {
|
|
1940
1973
|
c.value !== null && clearTimeout(c.value), c.value = setTimeout(() => {
|
|
1941
|
-
|
|
1974
|
+
m.value = x, a.value = 1, c.value = null;
|
|
1942
1975
|
}, t.searchDebounce);
|
|
1943
|
-
}),
|
|
1976
|
+
}), Y(() => {
|
|
1944
1977
|
c.value !== null && (clearTimeout(c.value), c.value = null);
|
|
1945
1978
|
});
|
|
1946
|
-
const
|
|
1947
|
-
if (!t.searchable || !
|
|
1979
|
+
const V = h(() => {
|
|
1980
|
+
if (!t.searchable || !m.value)
|
|
1948
1981
|
return t.items || [];
|
|
1949
|
-
const
|
|
1950
|
-
return (t.items || []).filter((
|
|
1951
|
-
if (
|
|
1952
|
-
const D =
|
|
1953
|
-
return D == null ? !1 : String(D).toLowerCase().includes(
|
|
1982
|
+
const x = m.value.toLowerCase();
|
|
1983
|
+
return (t.items || []).filter((N) => (t.columns || []).some((E) => {
|
|
1984
|
+
if (E.searchable === !1) return !1;
|
|
1985
|
+
const D = N[E.key];
|
|
1986
|
+
return D == null ? !1 : String(D).toLowerCase().includes(x);
|
|
1954
1987
|
}));
|
|
1955
|
-
}),
|
|
1956
|
-
if (
|
|
1957
|
-
if (
|
|
1958
|
-
if (typeof
|
|
1959
|
-
const D =
|
|
1960
|
-
return D < U ?
|
|
1988
|
+
}), y = (x, N, E) => {
|
|
1989
|
+
if (x == null) return 1;
|
|
1990
|
+
if (N == null) return -1;
|
|
1991
|
+
if (typeof x == "string" && typeof N == "string") {
|
|
1992
|
+
const D = x.toLowerCase(), U = N.toLowerCase();
|
|
1993
|
+
return D < U ? E ? 1 : -1 : D > U ? E ? -1 : 1 : 0;
|
|
1961
1994
|
}
|
|
1962
|
-
if (typeof
|
|
1963
|
-
return
|
|
1964
|
-
if (typeof
|
|
1965
|
-
return
|
|
1966
|
-
if (
|
|
1967
|
-
const D =
|
|
1968
|
-
return D < U ?
|
|
1995
|
+
if (typeof x == "number" && typeof N == "number")
|
|
1996
|
+
return x < N ? E ? 1 : -1 : x > N ? E ? -1 : 1 : 0;
|
|
1997
|
+
if (typeof x == "boolean" && typeof N == "boolean")
|
|
1998
|
+
return x === N ? 0 : (x ? 1 : -1) * (E ? -1 : 1);
|
|
1999
|
+
if (x instanceof Date && N instanceof Date) {
|
|
2000
|
+
const D = x.getTime(), U = N.getTime();
|
|
2001
|
+
return D < U ? E ? 1 : -1 : D > U ? E ? -1 : 1 : 0;
|
|
1969
2002
|
}
|
|
1970
2003
|
return 0;
|
|
1971
|
-
},
|
|
1972
|
-
if (!t.sortable || !
|
|
1973
|
-
return
|
|
1974
|
-
const
|
|
1975
|
-
return
|
|
1976
|
-
}),
|
|
2004
|
+
}, u = h(() => {
|
|
2005
|
+
if (!t.sortable || !n.value)
|
|
2006
|
+
return V.value;
|
|
2007
|
+
const x = [...V.value], N = n.value;
|
|
2008
|
+
return x.sort((E, D) => y(E[N], D[N], o.value)), x;
|
|
2009
|
+
}), b = h(() => {
|
|
1977
2010
|
if (!t.paginated)
|
|
1978
|
-
return
|
|
1979
|
-
const
|
|
1980
|
-
return
|
|
1981
|
-
}),
|
|
1982
|
-
const
|
|
1983
|
-
return Math.min(
|
|
1984
|
-
}),
|
|
1985
|
-
const
|
|
1986
|
-
return t.striped &&
|
|
1987
|
-
}),
|
|
1988
|
-
!t.sortable ||
|
|
1989
|
-
}, W = (
|
|
1990
|
-
|
|
1991
|
-
},
|
|
2011
|
+
return u.value;
|
|
2012
|
+
const x = (a.value - 1) * l.value, N = x + l.value;
|
|
2013
|
+
return u.value.slice(x, N);
|
|
2014
|
+
}), p = h(() => t.items.length), w = h(() => V.value.length), B = h(() => Math.ceil(w.value / l.value)), C = h(() => w.value === 0 ? 0 : (a.value - 1) * l.value + 1), z = h(() => {
|
|
2015
|
+
const x = a.value * l.value;
|
|
2016
|
+
return Math.min(x, w.value);
|
|
2017
|
+
}), F = h(() => (w.value !== p.value ? t.filteredInfoText : t.infoText).replace("{start}", String(C.value)).replace("{end}", String(z.value)).replace("{total}", String(w.value)).replace("{totalRows}", String(p.value))), K = h(() => {
|
|
2018
|
+
const x = ["table"];
|
|
2019
|
+
return t.striped && x.push("table-striped"), t.bordered && x.push("table-bordered"), t.borderless && x.push("table-borderless"), t.hover && x.push("table-hover"), t.small && x.push("table-sm"), t.stack && x.push("vibe-table-stack"), t.variant && x.push(`table-${t.variant}`), x.join(" ");
|
|
2020
|
+
}), _ = (x) => {
|
|
2021
|
+
!t.sortable || x.sortable === !1 || (n.value === x.key ? o.value = !o.value : (n.value = x.key, o.value = !1));
|
|
2022
|
+
}, W = (x) => {
|
|
2023
|
+
x < 1 || x > B.value || (a.value = x);
|
|
2024
|
+
}, P = () => {
|
|
1992
2025
|
a.value = 1;
|
|
1993
|
-
},
|
|
1994
|
-
|
|
1995
|
-
},
|
|
1996
|
-
const
|
|
1997
|
-
return
|
|
1998
|
-
},
|
|
1999
|
-
const
|
|
2000
|
-
return t.sortable &&
|
|
2026
|
+
}, Q = (x, N) => {
|
|
2027
|
+
d("row-clicked", x, N);
|
|
2028
|
+
}, re = (x, N) => {
|
|
2029
|
+
const E = x[N.key];
|
|
2030
|
+
return N.formatter ? N.formatter(E, x) : E;
|
|
2031
|
+
}, de = (x) => !t.sortable || x.sortable === !1 ? "" : n.value !== x.key ? "⇅" : o.value ? "↓" : "↑", Ve = (x) => {
|
|
2032
|
+
const N = { ...x.thStyle };
|
|
2033
|
+
return t.sortable && x.sortable !== !1 && (N.cursor = "pointer"), N;
|
|
2001
2034
|
};
|
|
2002
|
-
return (
|
|
2003
|
-
S("div",
|
|
2004
|
-
e.searchable ? (
|
|
2005
|
-
|
|
2006
|
-
"onUpdate:modelValue":
|
|
2035
|
+
return (x, N) => (i(), s("div", wa, [
|
|
2036
|
+
S("div", Va, [
|
|
2037
|
+
e.searchable ? (i(), s("div", Ca, [
|
|
2038
|
+
he(S("input", {
|
|
2039
|
+
"onUpdate:modelValue": N[0] || (N[0] = (E) => v.value = E),
|
|
2007
2040
|
type: "search",
|
|
2008
2041
|
class: "form-control",
|
|
2009
2042
|
placeholder: e.searchPlaceholder
|
|
2010
|
-
}, null, 8,
|
|
2011
|
-
[
|
|
2043
|
+
}, null, 8, xa), [
|
|
2044
|
+
[Be, v.value]
|
|
2012
2045
|
])
|
|
2013
|
-
])) :
|
|
2014
|
-
e.showPerPage && e.paginated ? (
|
|
2015
|
-
S("div",
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
"onUpdate:modelValue":
|
|
2046
|
+
])) : g("", !0),
|
|
2047
|
+
e.showPerPage && e.paginated ? (i(), s("div", Ba, [
|
|
2048
|
+
S("div", La, [
|
|
2049
|
+
N[6] || (N[6] = S("label", { class: "me-2 mb-0" }, "Show", -1)),
|
|
2050
|
+
he(S("select", {
|
|
2051
|
+
"onUpdate:modelValue": N[1] || (N[1] = (E) => l.value = E),
|
|
2019
2052
|
class: "form-select form-select-sm",
|
|
2020
2053
|
style: { width: "auto" },
|
|
2021
|
-
onChange:
|
|
2054
|
+
onChange: P
|
|
2022
2055
|
}, [
|
|
2023
|
-
(
|
|
2024
|
-
key:
|
|
2025
|
-
value:
|
|
2026
|
-
}, k(
|
|
2056
|
+
(i(!0), s(R, null, H(e.perPageOptions, (E) => (i(), s("option", {
|
|
2057
|
+
key: E,
|
|
2058
|
+
value: E
|
|
2059
|
+
}, k(E), 9, Ta))), 128))
|
|
2027
2060
|
], 544), [
|
|
2028
2061
|
[
|
|
2029
|
-
|
|
2062
|
+
Le,
|
|
2030
2063
|
l.value,
|
|
2031
2064
|
void 0,
|
|
2032
2065
|
{ number: !0 }
|
|
2033
2066
|
]
|
|
2034
2067
|
]),
|
|
2035
|
-
|
|
2068
|
+
N[7] || (N[7] = S("span", { class: "ms-2" }, "entries", -1))
|
|
2036
2069
|
])
|
|
2037
|
-
])) :
|
|
2070
|
+
])) : g("", !0)
|
|
2038
2071
|
]),
|
|
2039
2072
|
S("div", {
|
|
2040
2073
|
class: $({ "table-responsive": e.responsive })
|
|
2041
2074
|
}, [
|
|
2042
2075
|
S("table", {
|
|
2043
|
-
class: $(
|
|
2076
|
+
class: $(K.value)
|
|
2044
2077
|
}, [
|
|
2045
2078
|
S("thead", null, [
|
|
2046
2079
|
S("tr", null, [
|
|
2047
|
-
(
|
|
2048
|
-
key:
|
|
2049
|
-
class: $(
|
|
2050
|
-
style:
|
|
2051
|
-
onClick: (D) =>
|
|
2080
|
+
(i(!0), s(R, null, H(e.columns, (E) => (i(), s("th", {
|
|
2081
|
+
key: E.key,
|
|
2082
|
+
class: $(E.headerClass),
|
|
2083
|
+
style: Z(Ve(E)),
|
|
2084
|
+
onClick: (D) => _(E)
|
|
2052
2085
|
}, [
|
|
2053
|
-
I(k(
|
|
2054
|
-
e.sortable &&
|
|
2055
|
-
], 14,
|
|
2086
|
+
I(k(E.label) + " ", 1),
|
|
2087
|
+
e.sortable && E.sortable !== !1 ? (i(), s("span", Ea, k(de(E)), 1)) : g("", !0)
|
|
2088
|
+
], 14, Na))), 128))
|
|
2056
2089
|
])
|
|
2057
2090
|
]),
|
|
2058
2091
|
S("tbody", null, [
|
|
2059
|
-
(
|
|
2060
|
-
key:
|
|
2061
|
-
onClick: (U) =>
|
|
2092
|
+
(i(!0), s(R, null, H(b.value, (E, D) => (i(), s("tr", {
|
|
2093
|
+
key: f(E, D),
|
|
2094
|
+
onClick: (U) => Q(E, D),
|
|
2062
2095
|
style: { cursor: "pointer" }
|
|
2063
2096
|
}, [
|
|
2064
|
-
(
|
|
2097
|
+
(i(!0), s(R, null, H(e.columns, (U) => (i(), s("td", {
|
|
2065
2098
|
key: U.key,
|
|
2066
2099
|
class: $(U.class),
|
|
2067
|
-
style:
|
|
2100
|
+
style: Z(U.tdStyle),
|
|
2101
|
+
"data-label": U.label
|
|
2068
2102
|
}, [
|
|
2069
|
-
|
|
2070
|
-
item:
|
|
2071
|
-
value:
|
|
2103
|
+
T(x.$slots, `cell(${U.key})`, {
|
|
2104
|
+
item: E,
|
|
2105
|
+
value: E[U.key],
|
|
2072
2106
|
index: D
|
|
2073
2107
|
}, () => [
|
|
2074
|
-
I(k(
|
|
2108
|
+
I(k(re(E, U)), 1)
|
|
2075
2109
|
], !0)
|
|
2076
|
-
],
|
|
2077
|
-
], 8,
|
|
2078
|
-
|
|
2110
|
+
], 14, Ia))), 128))
|
|
2111
|
+
], 8, Ma))), 128)),
|
|
2112
|
+
b.value.length === 0 && e.showEmpty ? (i(), s("tr", Ra, [
|
|
2079
2113
|
S("td", {
|
|
2080
2114
|
colspan: e.columns?.length || 1,
|
|
2081
2115
|
class: "text-center"
|
|
2082
|
-
}, k(e.emptyText), 9,
|
|
2083
|
-
])) :
|
|
2116
|
+
}, k(e.emptyText), 9, Fa)
|
|
2117
|
+
])) : g("", !0)
|
|
2084
2118
|
])
|
|
2085
2119
|
], 2)
|
|
2086
2120
|
], 2),
|
|
2087
|
-
S("div",
|
|
2088
|
-
e.showInfo ? (
|
|
2089
|
-
S("div",
|
|
2090
|
-
])) :
|
|
2091
|
-
e.paginated &&
|
|
2121
|
+
S("div", Pa, [
|
|
2122
|
+
e.showInfo ? (i(), s("div", qa, [
|
|
2123
|
+
S("div", za, k(F.value), 1)
|
|
2124
|
+
])) : g("", !0),
|
|
2125
|
+
e.paginated && B.value > 1 ? (i(), s("div", Aa, [
|
|
2092
2126
|
S("nav", null, [
|
|
2093
|
-
S("ul",
|
|
2127
|
+
S("ul", ja, [
|
|
2094
2128
|
S("li", {
|
|
2095
2129
|
class: $(["page-item", { disabled: a.value === 1 }])
|
|
2096
2130
|
}, [
|
|
2097
2131
|
S("a", {
|
|
2098
2132
|
class: "page-link",
|
|
2099
2133
|
href: "#",
|
|
2100
|
-
onClick:
|
|
2134
|
+
onClick: N[2] || (N[2] = le((E) => W(a.value - 1), ["prevent"]))
|
|
2101
2135
|
}, " Previous ")
|
|
2102
2136
|
], 2),
|
|
2103
|
-
a.value > 3 ? (
|
|
2137
|
+
a.value > 3 ? (i(), s("li", Oa, [
|
|
2104
2138
|
S("a", {
|
|
2105
2139
|
class: "page-link",
|
|
2106
2140
|
href: "#",
|
|
2107
|
-
onClick:
|
|
2141
|
+
onClick: N[3] || (N[3] = le((E) => W(1), ["prevent"]))
|
|
2108
2142
|
}, "1")
|
|
2109
|
-
])) :
|
|
2110
|
-
a.value > 4 ? (
|
|
2143
|
+
])) : g("", !0),
|
|
2144
|
+
a.value > 4 ? (i(), s("li", Ha, [...N[8] || (N[8] = [
|
|
2111
2145
|
S("span", { class: "page-link" }, "...", -1)
|
|
2112
|
-
])])) :
|
|
2113
|
-
(
|
|
2114
|
-
(
|
|
2115
|
-
), (
|
|
2116
|
-
key:
|
|
2117
|
-
class: $(["page-item", { active:
|
|
2146
|
+
])])) : g("", !0),
|
|
2147
|
+
(i(!0), s(R, null, H(Array.from({ length: B.value }, (E, D) => D + 1).filter(
|
|
2148
|
+
(E) => E >= a.value - 2 && E <= a.value + 2
|
|
2149
|
+
), (E) => (i(), s("li", {
|
|
2150
|
+
key: E,
|
|
2151
|
+
class: $(["page-item", { active: E === a.value }])
|
|
2118
2152
|
}, [
|
|
2119
2153
|
S("a", {
|
|
2120
2154
|
class: "page-link",
|
|
2121
2155
|
href: "#",
|
|
2122
|
-
onClick:
|
|
2123
|
-
}, k(
|
|
2156
|
+
onClick: le((D) => W(E), ["prevent"])
|
|
2157
|
+
}, k(E), 9, Da)
|
|
2124
2158
|
], 2))), 128)),
|
|
2125
|
-
a.value <
|
|
2159
|
+
a.value < B.value - 3 ? (i(), s("li", Ga, [...N[9] || (N[9] = [
|
|
2126
2160
|
S("span", { class: "page-link" }, "...", -1)
|
|
2127
|
-
])])) :
|
|
2128
|
-
a.value <
|
|
2161
|
+
])])) : g("", !0),
|
|
2162
|
+
a.value < B.value - 2 ? (i(), s("li", Xa, [
|
|
2129
2163
|
S("a", {
|
|
2130
2164
|
class: "page-link",
|
|
2131
2165
|
href: "#",
|
|
2132
|
-
onClick:
|
|
2133
|
-
}, k(
|
|
2134
|
-
])) :
|
|
2166
|
+
onClick: N[4] || (N[4] = le((E) => W(B.value), ["prevent"]))
|
|
2167
|
+
}, k(B.value), 1)
|
|
2168
|
+
])) : g("", !0),
|
|
2135
2169
|
S("li", {
|
|
2136
|
-
class: $(["page-item", { disabled: a.value ===
|
|
2170
|
+
class: $(["page-item", { disabled: a.value === B.value }])
|
|
2137
2171
|
}, [
|
|
2138
2172
|
S("a", {
|
|
2139
2173
|
class: "page-link",
|
|
2140
2174
|
href: "#",
|
|
2141
|
-
onClick:
|
|
2175
|
+
onClick: N[5] || (N[5] = le((E) => W(a.value + 1), ["prevent"]))
|
|
2142
2176
|
}, " Next ")
|
|
2143
2177
|
], 2)
|
|
2144
2178
|
])
|
|
2145
2179
|
])
|
|
2146
|
-
])) :
|
|
2180
|
+
])) : g("", !0)
|
|
2147
2181
|
])
|
|
2148
2182
|
]));
|
|
2149
2183
|
}
|
|
2150
|
-
}),
|
|
2151
|
-
const t = e.__vccOpts || e;
|
|
2152
|
-
for (const [a, l] of v)
|
|
2153
|
-
t[a] = l;
|
|
2154
|
-
return t;
|
|
2155
|
-
}, Ra = /* @__PURE__ */ re(Pa, [["__scopeId", "data-v-d5aa8072"]]), qa = ["for"], za = {
|
|
2184
|
+
}), Ua = /* @__PURE__ */ ae(Ya, [["__scopeId", "data-v-c496dc70"]]), Ja = ["for"], Ka = {
|
|
2156
2185
|
key: 0,
|
|
2157
2186
|
class: "text-danger"
|
|
2158
|
-
},
|
|
2187
|
+
}, Wa = ["id", "type", "value", "placeholder", "disabled", "readonly", "required", "aria-invalid", "aria-describedby"], Qa = ["id"], Za = {
|
|
2159
2188
|
key: 0,
|
|
2160
2189
|
class: "valid-feedback",
|
|
2161
2190
|
style: { display: "block" }
|
|
2162
|
-
},
|
|
2191
|
+
}, _a = ["id"], el = ["id", "type", "value", "placeholder", "disabled", "readonly", "required", "aria-invalid"], tl = /* @__PURE__ */ M({
|
|
2163
2192
|
__name: "VibeFormInput",
|
|
2164
2193
|
props: {
|
|
2165
2194
|
modelValue: {
|
|
@@ -2179,36 +2208,54 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2179
2208
|
validationRules: { type: [Array, Function], default: void 0 },
|
|
2180
2209
|
validateOn: { type: String, default: "blur" },
|
|
2181
2210
|
helpText: { type: String, default: void 0 },
|
|
2182
|
-
plaintext: { type: Boolean, default: !1 }
|
|
2211
|
+
plaintext: { type: Boolean, default: !1 },
|
|
2212
|
+
noWrapper: { type: Boolean, default: !1 },
|
|
2213
|
+
focusRing: { type: Boolean, default: !1 }
|
|
2183
2214
|
},
|
|
2184
2215
|
emits: ["update:modelValue", "validate", "blur", "focus", "input", "change"],
|
|
2185
|
-
setup(e, { emit:
|
|
2186
|
-
const t = e, a =
|
|
2187
|
-
const
|
|
2188
|
-
return t.plaintext ?
|
|
2189
|
-
}),
|
|
2190
|
-
const
|
|
2191
|
-
a("update:modelValue",
|
|
2192
|
-
},
|
|
2193
|
-
a("change",
|
|
2194
|
-
},
|
|
2195
|
-
a("blur",
|
|
2196
|
-
},
|
|
2197
|
-
a("focus",
|
|
2216
|
+
setup(e, { emit: r }) {
|
|
2217
|
+
const t = e, a = r, l = J("vibeFormGroup", null), n = h(() => t.id || l?.consumeId() || G("input")), o = h(() => !!t.label && !l?.hasLabel.value), d = h(() => !!t.validationState && !l?.hasValidation.value), v = h(() => !!t.helpText && !l?.hasHelp.value), c = h(() => {
|
|
2218
|
+
const u = [];
|
|
2219
|
+
return t.plaintext ? u.push("form-control-plaintext") : (u.push("form-control"), t.size && u.push(`form-control-${t.size}`)), t.validationState === "valid" && u.push("is-valid"), t.validationState === "invalid" && u.push("is-invalid"), t.focusRing && u.push("focus-ring"), u.join(" ");
|
|
2220
|
+
}), m = (u) => {
|
|
2221
|
+
const b = u.target, p = t.type === "number" ? b.value === "" ? "" : Number(b.value) : b.value;
|
|
2222
|
+
a("update:modelValue", p), a("input", u), t.validateOn === "input" && a("validate");
|
|
2223
|
+
}, f = (u) => {
|
|
2224
|
+
a("change", u), t.validateOn === "change" && a("validate");
|
|
2225
|
+
}, V = (u) => {
|
|
2226
|
+
a("blur", u), t.validateOn === "blur" && a("validate");
|
|
2227
|
+
}, y = (u) => {
|
|
2228
|
+
a("focus", u);
|
|
2198
2229
|
};
|
|
2199
|
-
return (
|
|
2200
|
-
|
|
2230
|
+
return (u, b) => e.noWrapper ? (i(), s("input", {
|
|
2231
|
+
key: 1,
|
|
2232
|
+
id: n.value,
|
|
2233
|
+
type: e.type,
|
|
2234
|
+
class: $(c.value),
|
|
2235
|
+
value: e.modelValue,
|
|
2236
|
+
placeholder: e.placeholder,
|
|
2237
|
+
disabled: e.disabled,
|
|
2238
|
+
readonly: e.readonly || e.plaintext,
|
|
2239
|
+
required: e.required,
|
|
2240
|
+
"aria-invalid": e.validationState === "invalid",
|
|
2241
|
+
onInput: m,
|
|
2242
|
+
onChange: f,
|
|
2243
|
+
onBlur: V,
|
|
2244
|
+
onFocus: y
|
|
2245
|
+
}, null, 42, el)) : (i(), s("div", {
|
|
2246
|
+
key: 0,
|
|
2247
|
+
class: $({ "mb-3": o.value || v.value || d.value })
|
|
2201
2248
|
}, [
|
|
2202
|
-
o.value ? (
|
|
2249
|
+
o.value ? (i(), s("label", {
|
|
2203
2250
|
key: 0,
|
|
2204
|
-
for:
|
|
2251
|
+
for: n.value,
|
|
2205
2252
|
class: "form-label"
|
|
2206
2253
|
}, [
|
|
2207
2254
|
I(k(e.label) + " ", 1),
|
|
2208
|
-
e.required ? (
|
|
2209
|
-
], 8,
|
|
2255
|
+
e.required ? (i(), s("span", Ka, "*")) : g("", !0)
|
|
2256
|
+
], 8, Ja)) : g("", !0),
|
|
2210
2257
|
S("input", {
|
|
2211
|
-
id:
|
|
2258
|
+
id: n.value,
|
|
2212
2259
|
type: e.type,
|
|
2213
2260
|
class: $(c.value),
|
|
2214
2261
|
value: e.modelValue,
|
|
@@ -2217,41 +2264,41 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2217
2264
|
readonly: e.readonly || e.plaintext,
|
|
2218
2265
|
required: e.required,
|
|
2219
2266
|
"aria-invalid": e.validationState === "invalid",
|
|
2220
|
-
"aria-describedby": e.validationMessage || e.helpText ? `${
|
|
2221
|
-
onInput:
|
|
2222
|
-
onChange:
|
|
2223
|
-
onBlur:
|
|
2224
|
-
onFocus:
|
|
2225
|
-
}, null, 42,
|
|
2226
|
-
|
|
2267
|
+
"aria-describedby": e.validationMessage || e.helpText ? `${n.value}-feedback` : void 0,
|
|
2268
|
+
onInput: m,
|
|
2269
|
+
onChange: f,
|
|
2270
|
+
onBlur: V,
|
|
2271
|
+
onFocus: y
|
|
2272
|
+
}, null, 42, Wa),
|
|
2273
|
+
v.value ? (i(), s("div", {
|
|
2227
2274
|
key: 1,
|
|
2228
|
-
id: `${
|
|
2275
|
+
id: `${n.value}-feedback`,
|
|
2229
2276
|
class: "form-text"
|
|
2230
|
-
}, k(e.helpText), 9,
|
|
2231
|
-
|
|
2232
|
-
e.validationState === "valid" ? (
|
|
2233
|
-
e.validationState === "invalid" ? (
|
|
2277
|
+
}, k(e.helpText), 9, Qa)) : g("", !0),
|
|
2278
|
+
d.value ? (i(), s(R, { key: 2 }, [
|
|
2279
|
+
e.validationState === "valid" ? (i(), s("div", Za, k(e.validationMessage || "Looks good!"), 1)) : g("", !0),
|
|
2280
|
+
e.validationState === "invalid" ? (i(), s("div", {
|
|
2234
2281
|
key: 1,
|
|
2235
|
-
id: `${
|
|
2282
|
+
id: `${n.value}-feedback`,
|
|
2236
2283
|
class: "invalid-feedback",
|
|
2237
2284
|
style: { display: "block" }
|
|
2238
|
-
}, k(e.validationMessage || "Please provide a valid value."), 9,
|
|
2239
|
-
], 64)) :
|
|
2285
|
+
}, k(e.validationMessage || "Please provide a valid value."), 9, _a)) : g("", !0)
|
|
2286
|
+
], 64)) : g("", !0)
|
|
2240
2287
|
], 2));
|
|
2241
2288
|
}
|
|
2242
|
-
}),
|
|
2289
|
+
}), al = ["for"], ll = {
|
|
2243
2290
|
key: 0,
|
|
2244
2291
|
class: "text-danger"
|
|
2245
|
-
},
|
|
2292
|
+
}, ol = ["id", "value", "multiple", "size", "disabled", "required", "aria-invalid", "aria-describedby"], nl = {
|
|
2246
2293
|
key: 0,
|
|
2247
2294
|
value: "",
|
|
2248
2295
|
disabled: "",
|
|
2249
2296
|
selected: ""
|
|
2250
|
-
},
|
|
2297
|
+
}, il = ["value", "disabled"], sl = ["id"], rl = {
|
|
2251
2298
|
key: 0,
|
|
2252
2299
|
class: "valid-feedback",
|
|
2253
2300
|
style: { display: "block" }
|
|
2254
|
-
},
|
|
2301
|
+
}, dl = ["id"], ul = /* @__PURE__ */ M({
|
|
2255
2302
|
__name: "VibeFormSelect",
|
|
2256
2303
|
props: {
|
|
2257
2304
|
modelValue: {
|
|
@@ -2275,34 +2322,34 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2275
2322
|
helpText: { type: String, default: void 0 }
|
|
2276
2323
|
},
|
|
2277
2324
|
emits: ["update:modelValue", "validate", "blur", "focus", "change"],
|
|
2278
|
-
setup(e, { emit:
|
|
2279
|
-
const t = e, a =
|
|
2280
|
-
const
|
|
2281
|
-
return t.size &&
|
|
2282
|
-
}),
|
|
2283
|
-
const
|
|
2284
|
-
let
|
|
2285
|
-
t.multiple ?
|
|
2286
|
-
},
|
|
2287
|
-
a("change",
|
|
2288
|
-
},
|
|
2289
|
-
a("blur",
|
|
2290
|
-
},
|
|
2291
|
-
a("focus",
|
|
2325
|
+
setup(e, { emit: r }) {
|
|
2326
|
+
const t = e, a = r, l = J("vibeFormGroup", null), n = h(() => t.id || l?.consumeId() || G("select")), o = h(() => !!t.label && !l?.hasLabel.value), d = h(() => !!t.validationState && !l?.hasValidation.value), v = h(() => !!t.helpText && !l?.hasHelp.value), c = h(() => {
|
|
2327
|
+
const u = ["form-select"];
|
|
2328
|
+
return t.size && u.push(`form-select-${t.size}`), t.validationState === "valid" && u.push("is-valid"), t.validationState === "invalid" && u.push("is-invalid"), u.join(" ");
|
|
2329
|
+
}), m = (u) => {
|
|
2330
|
+
const b = u.target;
|
|
2331
|
+
let p;
|
|
2332
|
+
t.multiple ? p = Array.from(b.selectedOptions).map((w) => w.value) : p = b.value, a("update:modelValue", p);
|
|
2333
|
+
}, f = (u) => {
|
|
2334
|
+
a("change", u), t.validateOn === "change" && a("validate");
|
|
2335
|
+
}, V = (u) => {
|
|
2336
|
+
a("blur", u), t.validateOn === "blur" && a("validate");
|
|
2337
|
+
}, y = (u) => {
|
|
2338
|
+
a("focus", u);
|
|
2292
2339
|
};
|
|
2293
|
-
return (
|
|
2294
|
-
class: $({ "mb-3": o.value ||
|
|
2340
|
+
return (u, b) => (i(), s("div", {
|
|
2341
|
+
class: $({ "mb-3": o.value || v.value || d.value })
|
|
2295
2342
|
}, [
|
|
2296
|
-
o.value ? (
|
|
2343
|
+
o.value ? (i(), s("label", {
|
|
2297
2344
|
key: 0,
|
|
2298
|
-
for:
|
|
2345
|
+
for: n.value,
|
|
2299
2346
|
class: "form-label"
|
|
2300
2347
|
}, [
|
|
2301
2348
|
I(k(e.label) + " ", 1),
|
|
2302
|
-
e.required ? (
|
|
2303
|
-
], 8,
|
|
2349
|
+
e.required ? (i(), s("span", ll, "*")) : g("", !0)
|
|
2350
|
+
], 8, al)) : g("", !0),
|
|
2304
2351
|
S("select", {
|
|
2305
|
-
id:
|
|
2352
|
+
id: n.value,
|
|
2306
2353
|
class: $(c.value),
|
|
2307
2354
|
value: e.modelValue,
|
|
2308
2355
|
multiple: e.multiple,
|
|
@@ -2310,48 +2357,48 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2310
2357
|
disabled: e.disabled,
|
|
2311
2358
|
required: e.required,
|
|
2312
2359
|
"aria-invalid": e.validationState === "invalid",
|
|
2313
|
-
"aria-describedby": e.validationMessage || e.helpText ? `${
|
|
2314
|
-
onInput:
|
|
2315
|
-
onChange:
|
|
2316
|
-
onBlur:
|
|
2317
|
-
onFocus:
|
|
2360
|
+
"aria-describedby": e.validationMessage || e.helpText ? `${n.value}-feedback` : void 0,
|
|
2361
|
+
onInput: m,
|
|
2362
|
+
onChange: f,
|
|
2363
|
+
onBlur: V,
|
|
2364
|
+
onFocus: y
|
|
2318
2365
|
}, [
|
|
2319
|
-
e.placeholder ? (
|
|
2320
|
-
|
|
2321
|
-
(
|
|
2322
|
-
key: String(
|
|
2323
|
-
value:
|
|
2324
|
-
disabled:
|
|
2325
|
-
}, k(
|
|
2366
|
+
e.placeholder ? (i(), s("option", nl, k(e.placeholder), 1)) : g("", !0),
|
|
2367
|
+
T(u.$slots, "default", {}, () => [
|
|
2368
|
+
(i(!0), s(R, null, H(e.options, (p) => (i(), s("option", {
|
|
2369
|
+
key: String(p.value),
|
|
2370
|
+
value: p.value,
|
|
2371
|
+
disabled: p.disabled
|
|
2372
|
+
}, k(p.text), 9, il))), 128))
|
|
2326
2373
|
])
|
|
2327
|
-
], 42,
|
|
2328
|
-
|
|
2374
|
+
], 42, ol),
|
|
2375
|
+
v.value ? (i(), s("div", {
|
|
2329
2376
|
key: 1,
|
|
2330
|
-
id: `${
|
|
2377
|
+
id: `${n.value}-feedback`,
|
|
2331
2378
|
class: "form-text"
|
|
2332
|
-
}, k(e.helpText), 9,
|
|
2333
|
-
|
|
2334
|
-
e.validationState === "valid" ? (
|
|
2335
|
-
e.validationState === "invalid" ? (
|
|
2379
|
+
}, k(e.helpText), 9, sl)) : g("", !0),
|
|
2380
|
+
d.value ? (i(), s(R, { key: 2 }, [
|
|
2381
|
+
e.validationState === "valid" ? (i(), s("div", rl, k(e.validationMessage || "Looks good!"), 1)) : g("", !0),
|
|
2382
|
+
e.validationState === "invalid" ? (i(), s("div", {
|
|
2336
2383
|
key: 1,
|
|
2337
|
-
id: `${
|
|
2384
|
+
id: `${n.value}-feedback`,
|
|
2338
2385
|
class: "invalid-feedback",
|
|
2339
2386
|
style: { display: "block" }
|
|
2340
|
-
}, k(e.validationMessage || "Please select an option."), 9,
|
|
2341
|
-
], 64)) :
|
|
2387
|
+
}, k(e.validationMessage || "Please select an option."), 9, dl)) : g("", !0)
|
|
2388
|
+
], 64)) : g("", !0)
|
|
2342
2389
|
], 2));
|
|
2343
2390
|
}
|
|
2344
|
-
}),
|
|
2391
|
+
}), cl = ["for"], vl = {
|
|
2345
2392
|
key: 0,
|
|
2346
2393
|
class: "text-danger"
|
|
2347
|
-
},
|
|
2394
|
+
}, fl = ["id", "value", "placeholder", "rows", "maxlength", "disabled", "readonly", "required", "aria-invalid", "aria-describedby"], bl = ["id"], hl = {
|
|
2348
2395
|
key: 0,
|
|
2349
2396
|
class: "ms-auto"
|
|
2350
|
-
},
|
|
2397
|
+
}, pl = {
|
|
2351
2398
|
key: 0,
|
|
2352
2399
|
class: "valid-feedback",
|
|
2353
2400
|
style: { display: "block" }
|
|
2354
|
-
},
|
|
2401
|
+
}, ml = ["id"], yl = /* @__PURE__ */ M({
|
|
2355
2402
|
__name: "VibeFormTextarea",
|
|
2356
2403
|
props: {
|
|
2357
2404
|
modelValue: {
|
|
@@ -2376,37 +2423,37 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2376
2423
|
showCharCount: { type: Boolean, default: !1 }
|
|
2377
2424
|
},
|
|
2378
2425
|
emits: ["update:modelValue", "validate", "blur", "focus", "input", "change"],
|
|
2379
|
-
setup(e, { emit:
|
|
2380
|
-
const t = e, a =
|
|
2381
|
-
const
|
|
2382
|
-
return t.size &&
|
|
2383
|
-
}),
|
|
2426
|
+
setup(e, { emit: r }) {
|
|
2427
|
+
const t = e, a = r, l = J("vibeFormGroup", null), n = h(() => t.id || l?.consumeId() || G("textarea")), o = h(() => !!t.label && !l?.hasLabel.value), d = h(() => !!t.validationState && !l?.hasValidation.value), v = h(() => (!!t.helpText || t.showCharCount) && !l?.hasHelp.value), c = h(() => {
|
|
2428
|
+
const p = ["form-control"];
|
|
2429
|
+
return t.size && p.push(`form-control-${t.size}`), t.validationState === "valid" && p.push("is-valid"), t.validationState === "invalid" && p.push("is-invalid"), p.join(" ");
|
|
2430
|
+
}), m = h(() => {
|
|
2384
2431
|
if (t.noResize) return { resize: "none" };
|
|
2385
|
-
}),
|
|
2386
|
-
const w =
|
|
2387
|
-
a("update:modelValue", w.value), a("input",
|
|
2388
|
-
},
|
|
2389
|
-
a("change",
|
|
2390
|
-
},
|
|
2391
|
-
a("blur",
|
|
2392
|
-
},
|
|
2393
|
-
a("focus",
|
|
2432
|
+
}), f = h(() => t.modelValue?.length || 0), V = (p) => {
|
|
2433
|
+
const w = p.target;
|
|
2434
|
+
a("update:modelValue", w.value), a("input", p), t.validateOn === "input" && a("validate");
|
|
2435
|
+
}, y = (p) => {
|
|
2436
|
+
a("change", p), t.validateOn === "change" && a("validate");
|
|
2437
|
+
}, u = (p) => {
|
|
2438
|
+
a("blur", p), t.validateOn === "blur" && a("validate");
|
|
2439
|
+
}, b = (p) => {
|
|
2440
|
+
a("focus", p);
|
|
2394
2441
|
};
|
|
2395
|
-
return (
|
|
2396
|
-
class: $({ "mb-3": o.value ||
|
|
2442
|
+
return (p, w) => (i(), s("div", {
|
|
2443
|
+
class: $({ "mb-3": o.value || v.value || d.value })
|
|
2397
2444
|
}, [
|
|
2398
|
-
o.value ? (
|
|
2445
|
+
o.value ? (i(), s("label", {
|
|
2399
2446
|
key: 0,
|
|
2400
|
-
for:
|
|
2447
|
+
for: n.value,
|
|
2401
2448
|
class: "form-label"
|
|
2402
2449
|
}, [
|
|
2403
2450
|
I(k(e.label) + " ", 1),
|
|
2404
|
-
e.required ? (
|
|
2405
|
-
], 8,
|
|
2451
|
+
e.required ? (i(), s("span", vl, "*")) : g("", !0)
|
|
2452
|
+
], 8, cl)) : g("", !0),
|
|
2406
2453
|
S("textarea", {
|
|
2407
|
-
id:
|
|
2454
|
+
id: n.value,
|
|
2408
2455
|
class: $(c.value),
|
|
2409
|
-
style:
|
|
2456
|
+
style: Z(m.value),
|
|
2410
2457
|
value: e.modelValue,
|
|
2411
2458
|
placeholder: e.placeholder,
|
|
2412
2459
|
rows: e.rows,
|
|
@@ -2415,45 +2462,45 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2415
2462
|
readonly: e.readonly,
|
|
2416
2463
|
required: e.required,
|
|
2417
2464
|
"aria-invalid": e.validationState === "invalid",
|
|
2418
|
-
"aria-describedby": e.validationMessage || e.helpText || e.showCharCount ? `${
|
|
2419
|
-
onInput:
|
|
2420
|
-
onChange:
|
|
2421
|
-
onBlur:
|
|
2422
|
-
onFocus:
|
|
2423
|
-
}, null, 46,
|
|
2424
|
-
|
|
2465
|
+
"aria-describedby": e.validationMessage || e.helpText || e.showCharCount ? `${n.value}-feedback` : void 0,
|
|
2466
|
+
onInput: V,
|
|
2467
|
+
onChange: y,
|
|
2468
|
+
onBlur: u,
|
|
2469
|
+
onFocus: b
|
|
2470
|
+
}, null, 46, fl),
|
|
2471
|
+
v.value ? (i(), s("div", {
|
|
2425
2472
|
key: 1,
|
|
2426
|
-
id: `${
|
|
2473
|
+
id: `${n.value}-feedback`,
|
|
2427
2474
|
class: "form-text d-flex justify-content-between"
|
|
2428
2475
|
}, [
|
|
2429
2476
|
S("span", null, k(e.helpText), 1),
|
|
2430
|
-
e.showCharCount ? (
|
|
2431
|
-
e.maxlength ? (
|
|
2432
|
-
I(k(
|
|
2433
|
-
], 64)) : (
|
|
2434
|
-
I(k(
|
|
2477
|
+
e.showCharCount ? (i(), s("span", hl, [
|
|
2478
|
+
e.maxlength ? (i(), s(R, { key: 0 }, [
|
|
2479
|
+
I(k(f.value) + " / " + k(e.maxlength), 1)
|
|
2480
|
+
], 64)) : (i(), s(R, { key: 1 }, [
|
|
2481
|
+
I(k(f.value), 1)
|
|
2435
2482
|
], 64))
|
|
2436
|
-
])) :
|
|
2437
|
-
], 8,
|
|
2438
|
-
|
|
2439
|
-
e.validationState === "valid" ? (
|
|
2440
|
-
e.validationState === "invalid" ? (
|
|
2483
|
+
])) : g("", !0)
|
|
2484
|
+
], 8, bl)) : g("", !0),
|
|
2485
|
+
d.value ? (i(), s(R, { key: 2 }, [
|
|
2486
|
+
e.validationState === "valid" ? (i(), s("div", pl, k(e.validationMessage || "Looks good!"), 1)) : g("", !0),
|
|
2487
|
+
e.validationState === "invalid" ? (i(), s("div", {
|
|
2441
2488
|
key: 1,
|
|
2442
|
-
id: `${
|
|
2489
|
+
id: `${n.value}-feedback`,
|
|
2443
2490
|
class: "invalid-feedback",
|
|
2444
2491
|
style: { display: "block" }
|
|
2445
|
-
}, k(e.validationMessage || "Please provide a valid value."), 9,
|
|
2446
|
-
], 64)) :
|
|
2492
|
+
}, k(e.validationMessage || "Please provide a valid value."), 9, ml)) : g("", !0)
|
|
2493
|
+
], 64)) : g("", !0)
|
|
2447
2494
|
], 2));
|
|
2448
2495
|
}
|
|
2449
|
-
}),
|
|
2496
|
+
}), gl = ["for"], kl = {
|
|
2450
2497
|
key: 0,
|
|
2451
2498
|
class: "text-danger"
|
|
2452
|
-
},
|
|
2499
|
+
}, Sl = ["disabled"], $l = ["id", "value", "disabled", "readonly", "required", "min", "max", "step", "aria-invalid", "aria-describedby"], wl = ["disabled"], Vl = ["id"], Cl = {
|
|
2453
2500
|
key: 0,
|
|
2454
2501
|
class: "valid-feedback",
|
|
2455
2502
|
style: { display: "block" }
|
|
2456
|
-
},
|
|
2503
|
+
}, xl = ["id"], Bl = /* @__PURE__ */ M({
|
|
2457
2504
|
__name: "VibeFormSpinbutton",
|
|
2458
2505
|
props: {
|
|
2459
2506
|
modelValue: {
|
|
@@ -2479,57 +2526,57 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2479
2526
|
vertical: { type: Boolean, default: !1 }
|
|
2480
2527
|
},
|
|
2481
2528
|
emits: ["update:modelValue", "validate", "blur", "focus", "input", "change", "increment", "decrement"],
|
|
2482
|
-
setup(e, { emit:
|
|
2483
|
-
const t = e, a =
|
|
2484
|
-
const
|
|
2485
|
-
return t.size &&
|
|
2486
|
-
}),
|
|
2487
|
-
const
|
|
2488
|
-
return t.size &&
|
|
2489
|
-
}),
|
|
2490
|
-
const
|
|
2491
|
-
let
|
|
2492
|
-
t.min !== void 0 &&
|
|
2493
|
-
},
|
|
2494
|
-
a("change",
|
|
2495
|
-
},
|
|
2496
|
-
a("blur",
|
|
2497
|
-
},
|
|
2498
|
-
a("focus",
|
|
2529
|
+
setup(e, { emit: r }) {
|
|
2530
|
+
const t = e, a = r, l = J("vibeFormGroup", null), n = h(() => t.id || l?.consumeId() || G("spinbutton")), o = h(() => !!t.label && !l?.hasLabel.value), d = h(() => !!t.validationState && !l?.hasValidation.value), v = h(() => !!t.helpText && !l?.hasHelp.value), c = h(() => {
|
|
2531
|
+
const C = ["form-control"];
|
|
2532
|
+
return t.size && C.push(`form-control-${t.size}`), t.validationState === "valid" && C.push("is-valid"), t.validationState === "invalid" && C.push("is-invalid"), C.join(" ");
|
|
2533
|
+
}), m = h(() => {
|
|
2534
|
+
const C = ["input-group"];
|
|
2535
|
+
return t.size && C.push(`input-group-${t.size}`), t.vertical && C.push("input-group-vertical"), C.join(" ");
|
|
2536
|
+
}), f = h(() => t.disabled || t.readonly ? !1 : t.min === void 0 || t.wrap ? !0 : t.modelValue > t.min), V = h(() => t.disabled || t.readonly ? !1 : t.max === void 0 || t.wrap ? !0 : t.modelValue < t.max), y = (C) => {
|
|
2537
|
+
const z = C.target;
|
|
2538
|
+
let F = z.value === "" ? 0 : Number(z.value);
|
|
2539
|
+
t.min !== void 0 && F < t.min && (F = t.min), t.max !== void 0 && F > t.max && (F = t.max), a("update:modelValue", F), a("input", C), t.validateOn === "input" && a("validate");
|
|
2540
|
+
}, u = (C) => {
|
|
2541
|
+
a("change", C), t.validateOn === "change" && a("validate");
|
|
2542
|
+
}, b = (C) => {
|
|
2543
|
+
a("blur", C), t.validateOn === "blur" && a("validate");
|
|
2544
|
+
}, p = (C) => {
|
|
2545
|
+
a("focus", C);
|
|
2499
2546
|
}, w = () => {
|
|
2500
|
-
if (!
|
|
2501
|
-
let
|
|
2502
|
-
t.max !== void 0 &&
|
|
2503
|
-
},
|
|
2504
|
-
if (!
|
|
2505
|
-
let
|
|
2506
|
-
t.min !== void 0 &&
|
|
2547
|
+
if (!V.value) return;
|
|
2548
|
+
let C = t.modelValue + t.step;
|
|
2549
|
+
t.max !== void 0 && C > t.max && (C = t.wrap ? t.min ?? 0 : t.max), a("update:modelValue", C), a("increment", C), t.validateOn === "change" && a("validate");
|
|
2550
|
+
}, B = () => {
|
|
2551
|
+
if (!f.value) return;
|
|
2552
|
+
let C = t.modelValue - t.step;
|
|
2553
|
+
t.min !== void 0 && C < t.min && (C = t.wrap ? t.max ?? 0 : t.min), a("update:modelValue", C), a("decrement", C), t.validateOn === "change" && a("validate");
|
|
2507
2554
|
};
|
|
2508
|
-
return (
|
|
2509
|
-
class: $({ "mb-3": o.value ||
|
|
2555
|
+
return (C, z) => (i(), s("div", {
|
|
2556
|
+
class: $({ "mb-3": o.value || v.value || d.value })
|
|
2510
2557
|
}, [
|
|
2511
|
-
o.value ? (
|
|
2558
|
+
o.value ? (i(), s("label", {
|
|
2512
2559
|
key: 0,
|
|
2513
|
-
for:
|
|
2560
|
+
for: n.value,
|
|
2514
2561
|
class: "form-label"
|
|
2515
2562
|
}, [
|
|
2516
2563
|
I(k(e.label) + " ", 1),
|
|
2517
|
-
e.required ? (
|
|
2518
|
-
], 8,
|
|
2564
|
+
e.required ? (i(), s("span", kl, "*")) : g("", !0)
|
|
2565
|
+
], 8, gl)) : g("", !0),
|
|
2519
2566
|
S("div", {
|
|
2520
|
-
class: $(
|
|
2567
|
+
class: $(m.value)
|
|
2521
2568
|
}, [
|
|
2522
2569
|
S("button", {
|
|
2523
2570
|
class: "btn btn-outline-secondary",
|
|
2524
2571
|
type: "button",
|
|
2525
|
-
disabled: !
|
|
2526
|
-
onClick:
|
|
2572
|
+
disabled: !f.value,
|
|
2573
|
+
onClick: B,
|
|
2527
2574
|
"aria-label": "Decrement"
|
|
2528
|
-
}, [...
|
|
2575
|
+
}, [...z[0] || (z[0] = [
|
|
2529
2576
|
S("span", { "aria-hidden": "true" }, "−", -1)
|
|
2530
|
-
])], 8,
|
|
2577
|
+
])], 8, Sl),
|
|
2531
2578
|
S("input", {
|
|
2532
|
-
id:
|
|
2579
|
+
id: n.value,
|
|
2533
2580
|
type: "number",
|
|
2534
2581
|
class: $(c.value),
|
|
2535
2582
|
value: e.modelValue,
|
|
@@ -2540,46 +2587,46 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2540
2587
|
max: e.max,
|
|
2541
2588
|
step: e.step,
|
|
2542
2589
|
"aria-invalid": e.validationState === "invalid",
|
|
2543
|
-
"aria-describedby": e.validationMessage || e.helpText ? `${
|
|
2544
|
-
onInput:
|
|
2545
|
-
onChange:
|
|
2546
|
-
onBlur:
|
|
2547
|
-
onFocus:
|
|
2548
|
-
}, null, 42,
|
|
2590
|
+
"aria-describedby": e.validationMessage || e.helpText ? `${n.value}-feedback` : void 0,
|
|
2591
|
+
onInput: y,
|
|
2592
|
+
onChange: u,
|
|
2593
|
+
onBlur: b,
|
|
2594
|
+
onFocus: p
|
|
2595
|
+
}, null, 42, $l),
|
|
2549
2596
|
S("button", {
|
|
2550
2597
|
class: "btn btn-outline-secondary",
|
|
2551
2598
|
type: "button",
|
|
2552
|
-
disabled: !
|
|
2599
|
+
disabled: !V.value,
|
|
2553
2600
|
onClick: w,
|
|
2554
2601
|
"aria-label": "Increment"
|
|
2555
|
-
}, [...
|
|
2602
|
+
}, [...z[1] || (z[1] = [
|
|
2556
2603
|
S("span", { "aria-hidden": "true" }, "+", -1)
|
|
2557
|
-
])], 8,
|
|
2604
|
+
])], 8, wl)
|
|
2558
2605
|
], 2),
|
|
2559
|
-
|
|
2606
|
+
v.value ? (i(), s("div", {
|
|
2560
2607
|
key: 1,
|
|
2561
|
-
id: `${
|
|
2608
|
+
id: `${n.value}-feedback`,
|
|
2562
2609
|
class: "form-text"
|
|
2563
|
-
}, k(e.helpText), 9,
|
|
2564
|
-
|
|
2565
|
-
e.validationState === "valid" ? (
|
|
2566
|
-
e.validationState === "invalid" ? (
|
|
2610
|
+
}, k(e.helpText), 9, Vl)) : g("", !0),
|
|
2611
|
+
d.value ? (i(), s(R, { key: 2 }, [
|
|
2612
|
+
e.validationState === "valid" ? (i(), s("div", Cl, k(e.validationMessage || "Looks good!"), 1)) : g("", !0),
|
|
2613
|
+
e.validationState === "invalid" ? (i(), s("div", {
|
|
2567
2614
|
key: 1,
|
|
2568
|
-
id: `${
|
|
2615
|
+
id: `${n.value}-feedback`,
|
|
2569
2616
|
class: "invalid-feedback",
|
|
2570
2617
|
style: { display: "block" }
|
|
2571
|
-
}, k(e.validationMessage || "Please provide a valid value."), 9,
|
|
2572
|
-
], 64)) :
|
|
2618
|
+
}, k(e.validationMessage || "Please provide a valid value."), 9, xl)) : g("", !0)
|
|
2619
|
+
], 64)) : g("", !0)
|
|
2573
2620
|
], 2));
|
|
2574
2621
|
}
|
|
2575
|
-
}),
|
|
2622
|
+
}), Ll = /* @__PURE__ */ ae(Bl, [["__scopeId", "data-v-49746a62"]]), Tl = ["for"], Nl = {
|
|
2576
2623
|
key: 0,
|
|
2577
2624
|
class: "text-danger"
|
|
2578
|
-
},
|
|
2625
|
+
}, El = ["id", "type", "value", "disabled", "readonly", "required", "min", "max", "aria-invalid", "aria-describedby"], Ml = ["id"], Il = {
|
|
2579
2626
|
key: 0,
|
|
2580
2627
|
class: "valid-feedback",
|
|
2581
2628
|
style: { display: "block" }
|
|
2582
|
-
},
|
|
2629
|
+
}, Rl = ["id"], Fl = /* @__PURE__ */ M({
|
|
2583
2630
|
__name: "VibeFormDatepicker",
|
|
2584
2631
|
props: {
|
|
2585
2632
|
modelValue: {
|
|
@@ -2603,33 +2650,33 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2603
2650
|
type: { type: String, default: "date" }
|
|
2604
2651
|
},
|
|
2605
2652
|
emits: ["update:modelValue", "validate", "blur", "focus", "input", "change"],
|
|
2606
|
-
setup(e, { emit:
|
|
2607
|
-
const t = e, a =
|
|
2608
|
-
const
|
|
2609
|
-
return t.size &&
|
|
2610
|
-
}),
|
|
2611
|
-
const
|
|
2612
|
-
a("update:modelValue",
|
|
2613
|
-
},
|
|
2614
|
-
a("change",
|
|
2615
|
-
},
|
|
2616
|
-
a("blur",
|
|
2617
|
-
},
|
|
2618
|
-
a("focus",
|
|
2653
|
+
setup(e, { emit: r }) {
|
|
2654
|
+
const t = e, a = r, l = J("vibeFormGroup", null), n = h(() => t.id || l?.consumeId() || G("datepicker")), o = h(() => !!t.label && !l?.hasLabel.value), d = h(() => !!t.validationState && !l?.hasValidation.value), v = h(() => !!t.helpText && !l?.hasHelp.value), c = h(() => {
|
|
2655
|
+
const u = ["form-control"];
|
|
2656
|
+
return t.size && u.push(`form-control-${t.size}`), t.validationState === "valid" && u.push("is-valid"), t.validationState === "invalid" && u.push("is-invalid"), u.join(" ");
|
|
2657
|
+
}), m = (u) => {
|
|
2658
|
+
const b = u.target;
|
|
2659
|
+
a("update:modelValue", b.value), a("input", u), t.validateOn === "input" && a("validate");
|
|
2660
|
+
}, f = (u) => {
|
|
2661
|
+
a("change", u), t.validateOn === "change" && a("validate");
|
|
2662
|
+
}, V = (u) => {
|
|
2663
|
+
a("blur", u), t.validateOn === "blur" && a("validate");
|
|
2664
|
+
}, y = (u) => {
|
|
2665
|
+
a("focus", u);
|
|
2619
2666
|
};
|
|
2620
|
-
return (
|
|
2621
|
-
class: $({ "mb-3": o.value ||
|
|
2667
|
+
return (u, b) => (i(), s("div", {
|
|
2668
|
+
class: $({ "mb-3": o.value || v.value || d.value })
|
|
2622
2669
|
}, [
|
|
2623
|
-
o.value ? (
|
|
2670
|
+
o.value ? (i(), s("label", {
|
|
2624
2671
|
key: 0,
|
|
2625
|
-
for:
|
|
2672
|
+
for: n.value,
|
|
2626
2673
|
class: "form-label"
|
|
2627
2674
|
}, [
|
|
2628
2675
|
I(k(e.label) + " ", 1),
|
|
2629
|
-
e.required ? (
|
|
2630
|
-
], 8,
|
|
2676
|
+
e.required ? (i(), s("span", Nl, "*")) : g("", !0)
|
|
2677
|
+
], 8, Tl)) : g("", !0),
|
|
2631
2678
|
S("input", {
|
|
2632
|
-
id:
|
|
2679
|
+
id: n.value,
|
|
2633
2680
|
type: e.type,
|
|
2634
2681
|
class: $(c.value),
|
|
2635
2682
|
value: e.modelValue,
|
|
@@ -2639,36 +2686,36 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2639
2686
|
min: e.min,
|
|
2640
2687
|
max: e.max,
|
|
2641
2688
|
"aria-invalid": e.validationState === "invalid",
|
|
2642
|
-
"aria-describedby": e.validationMessage || e.helpText ? `${
|
|
2643
|
-
onInput:
|
|
2644
|
-
onChange:
|
|
2645
|
-
onBlur:
|
|
2646
|
-
onFocus:
|
|
2647
|
-
}, null, 42,
|
|
2648
|
-
|
|
2689
|
+
"aria-describedby": e.validationMessage || e.helpText ? `${n.value}-feedback` : void 0,
|
|
2690
|
+
onInput: m,
|
|
2691
|
+
onChange: f,
|
|
2692
|
+
onBlur: V,
|
|
2693
|
+
onFocus: y
|
|
2694
|
+
}, null, 42, El),
|
|
2695
|
+
v.value ? (i(), s("div", {
|
|
2649
2696
|
key: 1,
|
|
2650
|
-
id: `${
|
|
2697
|
+
id: `${n.value}-feedback`,
|
|
2651
2698
|
class: "form-text"
|
|
2652
|
-
}, k(e.helpText), 9,
|
|
2653
|
-
|
|
2654
|
-
e.validationState === "valid" ? (
|
|
2655
|
-
e.validationState === "invalid" ? (
|
|
2699
|
+
}, k(e.helpText), 9, Ml)) : g("", !0),
|
|
2700
|
+
d.value ? (i(), s(R, { key: 2 }, [
|
|
2701
|
+
e.validationState === "valid" ? (i(), s("div", Il, k(e.validationMessage || "Looks good!"), 1)) : g("", !0),
|
|
2702
|
+
e.validationState === "invalid" ? (i(), s("div", {
|
|
2656
2703
|
key: 1,
|
|
2657
|
-
id: `${
|
|
2704
|
+
id: `${n.value}-feedback`,
|
|
2658
2705
|
class: "invalid-feedback",
|
|
2659
2706
|
style: { display: "block" }
|
|
2660
|
-
}, k(e.validationMessage || "Please provide a valid date."), 9,
|
|
2661
|
-
], 64)) :
|
|
2707
|
+
}, k(e.validationMessage || "Please provide a valid date."), 9, Rl)) : g("", !0)
|
|
2708
|
+
], 64)) : g("", !0)
|
|
2662
2709
|
], 2));
|
|
2663
2710
|
}
|
|
2664
|
-
}),
|
|
2711
|
+
}), Pl = ["id", "checked", "disabled", "required", "indeterminate", "aria-invalid", "aria-describedby"], ql = ["for"], zl = {
|
|
2665
2712
|
key: 0,
|
|
2666
2713
|
class: "text-danger"
|
|
2667
|
-
},
|
|
2714
|
+
}, Al = ["id"], jl = {
|
|
2668
2715
|
key: 0,
|
|
2669
2716
|
class: "valid-feedback",
|
|
2670
2717
|
style: { display: "block" }
|
|
2671
|
-
},
|
|
2718
|
+
}, Ol = ["id"], Hl = /* @__PURE__ */ M({
|
|
2672
2719
|
__name: "VibeFormCheckbox",
|
|
2673
2720
|
props: {
|
|
2674
2721
|
modelValue: {
|
|
@@ -2690,80 +2737,80 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2690
2737
|
reverse: { type: Boolean, default: !1 }
|
|
2691
2738
|
},
|
|
2692
2739
|
emits: ["update:modelValue", "validate", "blur", "focus", "change"],
|
|
2693
|
-
setup(e, { emit:
|
|
2694
|
-
const t = e, a =
|
|
2695
|
-
const
|
|
2696
|
-
return t.inline &&
|
|
2697
|
-
}),
|
|
2698
|
-
const
|
|
2699
|
-
return t.validationState === "valid" &&
|
|
2700
|
-
}),
|
|
2701
|
-
const
|
|
2740
|
+
setup(e, { emit: r }) {
|
|
2741
|
+
const t = e, a = r, l = J("vibeFormGroup", null), n = h(() => t.id || l?.consumeId() || G("checkbox")), o = h(() => !!t.label && !l?.hasLabel.value), d = h(() => !!t.validationState && !l?.hasValidation.value), v = h(() => !!t.helpText && !l?.hasHelp.value), c = h(() => {
|
|
2742
|
+
const b = ["form-check"];
|
|
2743
|
+
return t.inline && b.push("form-check-inline"), t.reverse && b.push("form-check-reverse"), b.join(" ");
|
|
2744
|
+
}), m = h(() => {
|
|
2745
|
+
const b = ["form-check-input"];
|
|
2746
|
+
return t.validationState === "valid" && b.push("is-valid"), t.validationState === "invalid" && b.push("is-invalid"), b.join(" ");
|
|
2747
|
+
}), f = h(() => Array.isArray(t.modelValue) ? t.modelValue.includes(t.value) : t.modelValue === t.value), V = (b) => {
|
|
2748
|
+
const p = b.target;
|
|
2702
2749
|
let w;
|
|
2703
2750
|
if (Array.isArray(t.modelValue))
|
|
2704
|
-
if (w = [...t.modelValue],
|
|
2751
|
+
if (w = [...t.modelValue], p.checked)
|
|
2705
2752
|
w.push(t.value);
|
|
2706
2753
|
else {
|
|
2707
|
-
const
|
|
2708
|
-
|
|
2754
|
+
const B = w.indexOf(t.value);
|
|
2755
|
+
B > -1 && w.splice(B, 1);
|
|
2709
2756
|
}
|
|
2710
2757
|
else
|
|
2711
|
-
w =
|
|
2712
|
-
a("update:modelValue", w), a("change",
|
|
2713
|
-
},
|
|
2714
|
-
a("blur",
|
|
2715
|
-
},
|
|
2716
|
-
a("focus",
|
|
2758
|
+
w = p.checked ? t.value : t.value === !0 ? !1 : null;
|
|
2759
|
+
a("update:modelValue", w), a("change", b), t.validateOn === "change" && a("validate");
|
|
2760
|
+
}, y = (b) => {
|
|
2761
|
+
a("blur", b), t.validateOn === "blur" && a("validate");
|
|
2762
|
+
}, u = (b) => {
|
|
2763
|
+
a("focus", b);
|
|
2717
2764
|
};
|
|
2718
|
-
return (
|
|
2719
|
-
class: $([c.value, { "mb-3": o.value ||
|
|
2765
|
+
return (b, p) => (i(), s("div", {
|
|
2766
|
+
class: $([c.value, { "mb-3": o.value || v.value || d.value }])
|
|
2720
2767
|
}, [
|
|
2721
2768
|
S("input", {
|
|
2722
|
-
id:
|
|
2769
|
+
id: n.value,
|
|
2723
2770
|
type: "checkbox",
|
|
2724
|
-
class: $(
|
|
2725
|
-
checked:
|
|
2771
|
+
class: $(m.value),
|
|
2772
|
+
checked: f.value,
|
|
2726
2773
|
disabled: e.disabled,
|
|
2727
2774
|
required: e.required,
|
|
2728
2775
|
indeterminate: e.indeterminate,
|
|
2729
2776
|
"aria-invalid": e.validationState === "invalid",
|
|
2730
|
-
"aria-describedby": e.validationMessage || e.helpText ? `${
|
|
2731
|
-
onChange:
|
|
2732
|
-
onBlur:
|
|
2733
|
-
onFocus:
|
|
2734
|
-
}, null, 42,
|
|
2735
|
-
o.value ? (
|
|
2777
|
+
"aria-describedby": e.validationMessage || e.helpText ? `${n.value}-feedback` : void 0,
|
|
2778
|
+
onChange: V,
|
|
2779
|
+
onBlur: y,
|
|
2780
|
+
onFocus: u
|
|
2781
|
+
}, null, 42, Pl),
|
|
2782
|
+
o.value ? (i(), s("label", {
|
|
2736
2783
|
key: 0,
|
|
2737
|
-
for:
|
|
2784
|
+
for: n.value,
|
|
2738
2785
|
class: "form-check-label"
|
|
2739
2786
|
}, [
|
|
2740
2787
|
I(k(e.label) + " ", 1),
|
|
2741
|
-
e.required ? (
|
|
2742
|
-
], 8,
|
|
2743
|
-
|
|
2788
|
+
e.required ? (i(), s("span", zl, "*")) : g("", !0)
|
|
2789
|
+
], 8, ql)) : g("", !0),
|
|
2790
|
+
v.value ? (i(), s("div", {
|
|
2744
2791
|
key: 1,
|
|
2745
|
-
id: `${
|
|
2792
|
+
id: `${n.value}-feedback`,
|
|
2746
2793
|
class: "form-text"
|
|
2747
|
-
}, k(e.helpText), 9,
|
|
2748
|
-
|
|
2749
|
-
e.validationState === "valid" ? (
|
|
2750
|
-
e.validationState === "invalid" ? (
|
|
2794
|
+
}, k(e.helpText), 9, Al)) : g("", !0),
|
|
2795
|
+
d.value ? (i(), s(R, { key: 2 }, [
|
|
2796
|
+
e.validationState === "valid" ? (i(), s("div", jl, k(e.validationMessage || "Looks good!"), 1)) : g("", !0),
|
|
2797
|
+
e.validationState === "invalid" ? (i(), s("div", {
|
|
2751
2798
|
key: 1,
|
|
2752
|
-
id: `${
|
|
2799
|
+
id: `${n.value}-feedback`,
|
|
2753
2800
|
class: "invalid-feedback",
|
|
2754
2801
|
style: { display: "block" }
|
|
2755
|
-
}, k(e.validationMessage || "Please check this box."), 9,
|
|
2756
|
-
], 64)) :
|
|
2802
|
+
}, k(e.validationMessage || "Please check this box."), 9, Ol)) : g("", !0)
|
|
2803
|
+
], 64)) : g("", !0)
|
|
2757
2804
|
], 2));
|
|
2758
2805
|
}
|
|
2759
|
-
}),
|
|
2806
|
+
}), Dl = ["id", "name", "value", "checked", "disabled", "required", "aria-invalid", "aria-describedby"], Gl = ["for"], Xl = {
|
|
2760
2807
|
key: 0,
|
|
2761
2808
|
class: "text-danger"
|
|
2762
|
-
},
|
|
2809
|
+
}, Yl = ["id"], Ul = {
|
|
2763
2810
|
key: 0,
|
|
2764
2811
|
class: "valid-feedback",
|
|
2765
2812
|
style: { display: "block" }
|
|
2766
|
-
},
|
|
2813
|
+
}, Jl = ["id"], Kl = /* @__PURE__ */ M({
|
|
2767
2814
|
__name: "VibeFormRadio",
|
|
2768
2815
|
props: {
|
|
2769
2816
|
modelValue: {
|
|
@@ -2785,70 +2832,70 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2785
2832
|
reverse: { type: Boolean, default: !1 }
|
|
2786
2833
|
},
|
|
2787
2834
|
emits: ["update:modelValue", "validate", "blur", "focus", "change"],
|
|
2788
|
-
setup(e, { emit:
|
|
2789
|
-
const t = e, a =
|
|
2790
|
-
const
|
|
2791
|
-
return t.inline &&
|
|
2792
|
-
}),
|
|
2793
|
-
const
|
|
2794
|
-
return t.validationState === "valid" &&
|
|
2795
|
-
}),
|
|
2796
|
-
a("update:modelValue", t.value), a("change",
|
|
2797
|
-
},
|
|
2798
|
-
a("blur",
|
|
2799
|
-
},
|
|
2800
|
-
a("focus",
|
|
2835
|
+
setup(e, { emit: r }) {
|
|
2836
|
+
const t = e, a = r, l = J("vibeFormGroup", null), n = h(() => t.id || l?.consumeId() || G("radio")), o = h(() => !!t.label && !l?.hasLabel.value), d = h(() => !!t.validationState && !l?.hasValidation.value), v = h(() => !!t.helpText && !l?.hasHelp.value), c = h(() => {
|
|
2837
|
+
const b = ["form-check"];
|
|
2838
|
+
return t.inline && b.push("form-check-inline"), t.reverse && b.push("form-check-reverse"), b.join(" ");
|
|
2839
|
+
}), m = h(() => {
|
|
2840
|
+
const b = ["form-check-input"];
|
|
2841
|
+
return t.validationState === "valid" && b.push("is-valid"), t.validationState === "invalid" && b.push("is-invalid"), b.join(" ");
|
|
2842
|
+
}), f = h(() => t.modelValue === t.value), V = (b) => {
|
|
2843
|
+
a("update:modelValue", t.value), a("change", b), t.validateOn === "change" && a("validate");
|
|
2844
|
+
}, y = (b) => {
|
|
2845
|
+
a("blur", b), t.validateOn === "blur" && a("validate");
|
|
2846
|
+
}, u = (b) => {
|
|
2847
|
+
a("focus", b);
|
|
2801
2848
|
};
|
|
2802
|
-
return (
|
|
2803
|
-
class: $([c.value, { "mb-3": o.value ||
|
|
2849
|
+
return (b, p) => (i(), s("div", {
|
|
2850
|
+
class: $([c.value, { "mb-3": o.value || v.value || d.value }])
|
|
2804
2851
|
}, [
|
|
2805
2852
|
S("input", {
|
|
2806
|
-
id:
|
|
2853
|
+
id: n.value,
|
|
2807
2854
|
type: "radio",
|
|
2808
|
-
class: $(
|
|
2855
|
+
class: $(m.value),
|
|
2809
2856
|
name: e.name,
|
|
2810
2857
|
value: e.value,
|
|
2811
|
-
checked:
|
|
2858
|
+
checked: f.value,
|
|
2812
2859
|
disabled: e.disabled,
|
|
2813
2860
|
required: e.required,
|
|
2814
2861
|
"aria-invalid": e.validationState === "invalid",
|
|
2815
|
-
"aria-describedby": e.validationMessage || e.helpText ? `${
|
|
2816
|
-
onChange:
|
|
2817
|
-
onBlur:
|
|
2818
|
-
onFocus:
|
|
2819
|
-
}, null, 42,
|
|
2820
|
-
o.value ? (
|
|
2862
|
+
"aria-describedby": e.validationMessage || e.helpText ? `${n.value}-feedback` : void 0,
|
|
2863
|
+
onChange: V,
|
|
2864
|
+
onBlur: y,
|
|
2865
|
+
onFocus: u
|
|
2866
|
+
}, null, 42, Dl),
|
|
2867
|
+
o.value ? (i(), s("label", {
|
|
2821
2868
|
key: 0,
|
|
2822
|
-
for:
|
|
2869
|
+
for: n.value,
|
|
2823
2870
|
class: "form-check-label"
|
|
2824
2871
|
}, [
|
|
2825
2872
|
I(k(e.label) + " ", 1),
|
|
2826
|
-
e.required ? (
|
|
2827
|
-
], 8,
|
|
2828
|
-
|
|
2873
|
+
e.required ? (i(), s("span", Xl, "*")) : g("", !0)
|
|
2874
|
+
], 8, Gl)) : g("", !0),
|
|
2875
|
+
v.value ? (i(), s("div", {
|
|
2829
2876
|
key: 1,
|
|
2830
|
-
id: `${
|
|
2877
|
+
id: `${n.value}-feedback`,
|
|
2831
2878
|
class: "form-text"
|
|
2832
|
-
}, k(e.helpText), 9,
|
|
2833
|
-
|
|
2834
|
-
e.validationState === "valid" ? (
|
|
2835
|
-
e.validationState === "invalid" ? (
|
|
2879
|
+
}, k(e.helpText), 9, Yl)) : g("", !0),
|
|
2880
|
+
d.value ? (i(), s(R, { key: 2 }, [
|
|
2881
|
+
e.validationState === "valid" ? (i(), s("div", Ul, k(e.validationMessage || "Looks good!"), 1)) : g("", !0),
|
|
2882
|
+
e.validationState === "invalid" ? (i(), s("div", {
|
|
2836
2883
|
key: 1,
|
|
2837
|
-
id: `${
|
|
2884
|
+
id: `${n.value}-feedback`,
|
|
2838
2885
|
class: "invalid-feedback",
|
|
2839
2886
|
style: { display: "block" }
|
|
2840
|
-
}, k(e.validationMessage || "Please select an option."), 9,
|
|
2841
|
-
], 64)) :
|
|
2887
|
+
}, k(e.validationMessage || "Please select an option."), 9, Jl)) : g("", !0)
|
|
2888
|
+
], 64)) : g("", !0)
|
|
2842
2889
|
], 2));
|
|
2843
2890
|
}
|
|
2844
|
-
}),
|
|
2891
|
+
}), Wl = ["id", "checked", "disabled", "required", "aria-invalid", "aria-describedby"], Ql = ["for"], Zl = {
|
|
2845
2892
|
key: 0,
|
|
2846
2893
|
class: "text-danger"
|
|
2847
|
-
},
|
|
2894
|
+
}, _l = ["id"], eo = {
|
|
2848
2895
|
key: 0,
|
|
2849
2896
|
class: "valid-feedback",
|
|
2850
2897
|
style: { display: "block" }
|
|
2851
|
-
},
|
|
2898
|
+
}, to = ["id"], ao = /* @__PURE__ */ M({
|
|
2852
2899
|
__name: "VibeFormSwitch",
|
|
2853
2900
|
props: {
|
|
2854
2901
|
modelValue: {
|
|
@@ -2867,77 +2914,77 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2867
2914
|
helpText: { type: String, default: void 0 }
|
|
2868
2915
|
},
|
|
2869
2916
|
emits: ["update:modelValue", "validate", "blur", "focus", "change"],
|
|
2870
|
-
setup(e, { emit:
|
|
2871
|
-
const t = e, a =
|
|
2872
|
-
const
|
|
2873
|
-
return t.inline &&
|
|
2874
|
-
}),
|
|
2875
|
-
const
|
|
2876
|
-
return t.validationState === "valid" &&
|
|
2877
|
-
}),
|
|
2878
|
-
const
|
|
2879
|
-
a("update:modelValue",
|
|
2880
|
-
},
|
|
2881
|
-
a("blur",
|
|
2882
|
-
},
|
|
2883
|
-
a("focus",
|
|
2917
|
+
setup(e, { emit: r }) {
|
|
2918
|
+
const t = e, a = r, l = J("vibeFormGroup", null), n = h(() => t.id || l?.consumeId() || G("switch")), o = h(() => !!t.label && !l?.hasLabel.value), d = h(() => !!t.validationState && !l?.hasValidation.value), v = h(() => !!t.helpText && !l?.hasHelp.value), c = h(() => {
|
|
2919
|
+
const u = ["form-check", "form-switch"];
|
|
2920
|
+
return t.inline && u.push("form-check-inline"), u.join(" ");
|
|
2921
|
+
}), m = h(() => {
|
|
2922
|
+
const u = ["form-check-input"];
|
|
2923
|
+
return t.validationState === "valid" && u.push("is-valid"), t.validationState === "invalid" && u.push("is-invalid"), u.join(" ");
|
|
2924
|
+
}), f = (u) => {
|
|
2925
|
+
const b = u.target;
|
|
2926
|
+
a("update:modelValue", b.checked), a("change", u), t.validateOn === "change" && a("validate");
|
|
2927
|
+
}, V = (u) => {
|
|
2928
|
+
a("blur", u), t.validateOn === "blur" && a("validate");
|
|
2929
|
+
}, y = (u) => {
|
|
2930
|
+
a("focus", u);
|
|
2884
2931
|
};
|
|
2885
|
-
return (
|
|
2886
|
-
class: $([c.value, { "mb-3": o.value ||
|
|
2932
|
+
return (u, b) => (i(), s("div", {
|
|
2933
|
+
class: $([c.value, { "mb-3": o.value || v.value || d.value }])
|
|
2887
2934
|
}, [
|
|
2888
2935
|
S("input", {
|
|
2889
|
-
id:
|
|
2936
|
+
id: n.value,
|
|
2890
2937
|
type: "checkbox",
|
|
2891
2938
|
role: "switch",
|
|
2892
|
-
class: $(
|
|
2939
|
+
class: $(m.value),
|
|
2893
2940
|
checked: e.modelValue,
|
|
2894
2941
|
disabled: e.disabled,
|
|
2895
2942
|
required: e.required,
|
|
2896
2943
|
"aria-invalid": e.validationState === "invalid",
|
|
2897
|
-
"aria-describedby": e.validationMessage || e.helpText ? `${
|
|
2898
|
-
onChange:
|
|
2899
|
-
onBlur:
|
|
2900
|
-
onFocus:
|
|
2901
|
-
}, null, 42,
|
|
2902
|
-
o.value ? (
|
|
2944
|
+
"aria-describedby": e.validationMessage || e.helpText ? `${n.value}-feedback` : void 0,
|
|
2945
|
+
onChange: f,
|
|
2946
|
+
onBlur: V,
|
|
2947
|
+
onFocus: y
|
|
2948
|
+
}, null, 42, Wl),
|
|
2949
|
+
o.value ? (i(), s("label", {
|
|
2903
2950
|
key: 0,
|
|
2904
|
-
for:
|
|
2951
|
+
for: n.value,
|
|
2905
2952
|
class: "form-check-label"
|
|
2906
2953
|
}, [
|
|
2907
2954
|
I(k(e.label) + " ", 1),
|
|
2908
|
-
e.required ? (
|
|
2909
|
-
], 8,
|
|
2910
|
-
|
|
2955
|
+
e.required ? (i(), s("span", Zl, "*")) : g("", !0)
|
|
2956
|
+
], 8, Ql)) : g("", !0),
|
|
2957
|
+
v.value ? (i(), s("div", {
|
|
2911
2958
|
key: 1,
|
|
2912
|
-
id: `${
|
|
2959
|
+
id: `${n.value}-feedback`,
|
|
2913
2960
|
class: "form-text"
|
|
2914
|
-
}, k(e.helpText), 9,
|
|
2915
|
-
|
|
2916
|
-
e.validationState === "valid" ? (
|
|
2917
|
-
e.validationState === "invalid" ? (
|
|
2961
|
+
}, k(e.helpText), 9, _l)) : g("", !0),
|
|
2962
|
+
d.value ? (i(), s(R, { key: 2 }, [
|
|
2963
|
+
e.validationState === "valid" ? (i(), s("div", eo, k(e.validationMessage || "Looks good!"), 1)) : g("", !0),
|
|
2964
|
+
e.validationState === "invalid" ? (i(), s("div", {
|
|
2918
2965
|
key: 1,
|
|
2919
|
-
id: `${
|
|
2966
|
+
id: `${n.value}-feedback`,
|
|
2920
2967
|
class: "invalid-feedback",
|
|
2921
2968
|
style: { display: "block" }
|
|
2922
|
-
}, k(e.validationMessage || "Please toggle this switch."), 9,
|
|
2923
|
-
], 64)) :
|
|
2969
|
+
}, k(e.validationMessage || "Please toggle this switch."), 9, to)) : g("", !0)
|
|
2970
|
+
], 64)) : g("", !0)
|
|
2924
2971
|
], 2));
|
|
2925
2972
|
}
|
|
2926
|
-
}),
|
|
2973
|
+
}), lo = ["for"], oo = {
|
|
2927
2974
|
key: 0,
|
|
2928
2975
|
class: "text-danger"
|
|
2929
|
-
},
|
|
2976
|
+
}, no = ["id"], io = {
|
|
2930
2977
|
key: 1,
|
|
2931
2978
|
class: "valid-feedback",
|
|
2932
2979
|
style: { display: "block" }
|
|
2933
|
-
},
|
|
2980
|
+
}, so = ["id"], ro = ["for"], uo = {
|
|
2934
2981
|
key: 0,
|
|
2935
2982
|
class: "text-danger"
|
|
2936
|
-
},
|
|
2983
|
+
}, co = ["id"], vo = {
|
|
2937
2984
|
key: 2,
|
|
2938
2985
|
class: "valid-feedback",
|
|
2939
2986
|
style: { display: "block" }
|
|
2940
|
-
},
|
|
2987
|
+
}, fo = ["id"], bo = /* @__PURE__ */ M({
|
|
2941
2988
|
__name: "VibeFormGroup",
|
|
2942
2989
|
props: {
|
|
2943
2990
|
label: { type: String, default: void 0 },
|
|
@@ -2952,86 +2999,115 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
2952
2999
|
labelAlign: { type: String, default: void 0 }
|
|
2953
3000
|
},
|
|
2954
3001
|
setup(e) {
|
|
2955
|
-
const
|
|
2956
|
-
|
|
3002
|
+
const r = e, t = h(() => r.labelFor || G("form-group")), a = L(!1);
|
|
3003
|
+
ge("vibeFormGroup", {
|
|
2957
3004
|
id: t,
|
|
2958
3005
|
consumeId: () => a.value ? null : (a.value = !0, t.value),
|
|
2959
|
-
hasLabel:
|
|
2960
|
-
hasValidation:
|
|
2961
|
-
hasHelp:
|
|
3006
|
+
hasLabel: h(() => !!r.label),
|
|
3007
|
+
hasValidation: h(() => !!r.validationState),
|
|
3008
|
+
hasHelp: h(() => !!r.helpText)
|
|
2962
3009
|
});
|
|
2963
|
-
const
|
|
3010
|
+
const n = h(() => {
|
|
2964
3011
|
const c = [];
|
|
2965
|
-
return
|
|
2966
|
-
}), o =
|
|
3012
|
+
return r.floating ? c.push("form-floating") : r.row ? c.push("row", "mb-3") : c.push("mb-3"), c.join(" ");
|
|
3013
|
+
}), o = h(() => {
|
|
2967
3014
|
const c = [];
|
|
2968
|
-
return
|
|
2969
|
-
}),
|
|
2970
|
-
return (c,
|
|
2971
|
-
class: $(
|
|
3015
|
+
return r.floating ? c.push("form-label") : r.row ? (c.push("col-form-label"), r.labelCols && c.push(`col-sm-${r.labelCols}`), r.labelAlign && c.push(`text-${r.labelAlign}`)) : c.push("form-label"), c.join(" ");
|
|
3016
|
+
}), d = h(() => r.row && r.labelCols ? `col-sm-${12 - Number(r.labelCols)}` : ""), v = h(() => `${t.value}-feedback`);
|
|
3017
|
+
return (c, m) => (i(), s("div", {
|
|
3018
|
+
class: $(n.value)
|
|
2972
3019
|
}, [
|
|
2973
|
-
e.label && !e.floating ? (
|
|
3020
|
+
e.label && !e.floating ? (i(), s("label", {
|
|
2974
3021
|
key: 0,
|
|
2975
3022
|
for: t.value,
|
|
2976
3023
|
class: $(o.value)
|
|
2977
3024
|
}, [
|
|
2978
3025
|
I(k(e.label) + " ", 1),
|
|
2979
|
-
e.required ? (
|
|
2980
|
-
], 10,
|
|
2981
|
-
e.row && e.labelCols ? (
|
|
3026
|
+
e.required ? (i(), s("span", oo, "*")) : g("", !0)
|
|
3027
|
+
], 10, lo)) : g("", !0),
|
|
3028
|
+
e.row && e.labelCols ? (i(), s("div", {
|
|
2982
3029
|
key: 1,
|
|
2983
|
-
class: $(
|
|
3030
|
+
class: $(d.value)
|
|
2984
3031
|
}, [
|
|
2985
|
-
|
|
2986
|
-
e.helpText && !e.validationMessage ? (
|
|
3032
|
+
T(c.$slots, "default"),
|
|
3033
|
+
e.helpText && !e.validationMessage ? (i(), s("div", {
|
|
2987
3034
|
key: 0,
|
|
2988
|
-
id:
|
|
3035
|
+
id: v.value,
|
|
2989
3036
|
class: "form-text"
|
|
2990
|
-
}, k(e.helpText), 9,
|
|
2991
|
-
e.validationState === "valid" ? (
|
|
2992
|
-
e.validationState === "invalid" ? (
|
|
3037
|
+
}, k(e.helpText), 9, no)) : g("", !0),
|
|
3038
|
+
e.validationState === "valid" ? (i(), s("div", io, k(e.validationMessage || "Looks good!"), 1)) : g("", !0),
|
|
3039
|
+
e.validationState === "invalid" ? (i(), s("div", {
|
|
2993
3040
|
key: 2,
|
|
2994
|
-
id:
|
|
3041
|
+
id: v.value,
|
|
2995
3042
|
class: "invalid-feedback",
|
|
2996
3043
|
style: { display: "block" }
|
|
2997
|
-
}, k(e.validationMessage || "Please provide a valid value."), 9,
|
|
2998
|
-
], 2)) : (
|
|
2999
|
-
|
|
3000
|
-
e.label && e.floating ? (
|
|
3044
|
+
}, k(e.validationMessage || "Please provide a valid value."), 9, so)) : g("", !0)
|
|
3045
|
+
], 2)) : (i(), s(R, { key: 2 }, [
|
|
3046
|
+
T(c.$slots, "default"),
|
|
3047
|
+
e.label && e.floating ? (i(), s("label", {
|
|
3001
3048
|
key: 0,
|
|
3002
3049
|
for: t.value,
|
|
3003
3050
|
class: $(o.value)
|
|
3004
3051
|
}, [
|
|
3005
3052
|
I(k(e.label) + " ", 1),
|
|
3006
|
-
e.required ? (
|
|
3007
|
-
], 10,
|
|
3008
|
-
e.helpText && !e.validationMessage ? (
|
|
3053
|
+
e.required ? (i(), s("span", uo, "*")) : g("", !0)
|
|
3054
|
+
], 10, ro)) : g("", !0),
|
|
3055
|
+
e.helpText && !e.validationMessage ? (i(), s("div", {
|
|
3009
3056
|
key: 1,
|
|
3010
|
-
id:
|
|
3057
|
+
id: v.value,
|
|
3011
3058
|
class: "form-text"
|
|
3012
|
-
}, k(e.helpText), 9,
|
|
3013
|
-
e.validationState === "valid" ? (
|
|
3014
|
-
e.validationState === "invalid" ? (
|
|
3059
|
+
}, k(e.helpText), 9, co)) : g("", !0),
|
|
3060
|
+
e.validationState === "valid" ? (i(), s("div", vo, k(e.validationMessage || "Looks good!"), 1)) : g("", !0),
|
|
3061
|
+
e.validationState === "invalid" ? (i(), s("div", {
|
|
3015
3062
|
key: 3,
|
|
3016
|
-
id:
|
|
3063
|
+
id: v.value,
|
|
3017
3064
|
class: "invalid-feedback",
|
|
3018
3065
|
style: { display: "block" }
|
|
3019
|
-
}, k(e.validationMessage || "Please provide a valid value."), 9,
|
|
3066
|
+
}, k(e.validationMessage || "Please provide a valid value."), 9, fo)) : g("", !0)
|
|
3020
3067
|
], 64))
|
|
3021
3068
|
], 2));
|
|
3022
3069
|
}
|
|
3023
|
-
}),
|
|
3070
|
+
}), te = {
|
|
3071
|
+
sm: 576,
|
|
3072
|
+
md: 768,
|
|
3073
|
+
lg: 992,
|
|
3074
|
+
xl: 1200,
|
|
3075
|
+
xxl: 1400
|
|
3076
|
+
};
|
|
3077
|
+
function ho() {
|
|
3078
|
+
const e = L(!1), r = L(!1), t = L(!1), a = L(!1), l = L(!1), n = () => {
|
|
3079
|
+
typeof window > "u" || (e.value = window.matchMedia(`(min-width: ${te.sm}px)`).matches, r.value = window.matchMedia(`(min-width: ${te.md}px)`).matches, t.value = window.matchMedia(`(min-width: ${te.lg}px)`).matches, a.value = window.matchMedia(`(min-width: ${te.xl}px)`).matches, l.value = window.matchMedia(`(min-width: ${te.xxl}px)`).matches);
|
|
3080
|
+
};
|
|
3081
|
+
n();
|
|
3082
|
+
const o = h(() => !e.value), d = h(() => !r.value), v = h(() => r.value && !t.value);
|
|
3083
|
+
return typeof window < "u" && Object.entries(te).forEach(([c, m]) => {
|
|
3084
|
+
const f = window.matchMedia(`(min-width: ${m}px)`), V = () => {
|
|
3085
|
+
n();
|
|
3086
|
+
};
|
|
3087
|
+
f.addEventListener("change", V), ke() && Se(() => f.removeEventListener("change", V));
|
|
3088
|
+
}), {
|
|
3089
|
+
isXs: o,
|
|
3090
|
+
isSm: e,
|
|
3091
|
+
isMd: r,
|
|
3092
|
+
isLg: t,
|
|
3093
|
+
isXl: a,
|
|
3094
|
+
isXxl: l,
|
|
3095
|
+
isMobile: d,
|
|
3096
|
+
isTablet: v
|
|
3097
|
+
};
|
|
3098
|
+
}
|
|
3099
|
+
const po = ["for"], mo = {
|
|
3024
3100
|
key: 0,
|
|
3025
3101
|
class: "text-danger"
|
|
3026
|
-
},
|
|
3102
|
+
}, yo = {
|
|
3027
3103
|
key: 1,
|
|
3028
3104
|
class: "alert alert-warning",
|
|
3029
3105
|
role: "alert"
|
|
3030
|
-
},
|
|
3106
|
+
}, go = ["id"], ko = ["id"], So = {
|
|
3031
3107
|
key: 0,
|
|
3032
3108
|
class: "valid-feedback",
|
|
3033
3109
|
style: { display: "block" }
|
|
3034
|
-
},
|
|
3110
|
+
}, $o = ["id"], wo = /* @__PURE__ */ M({
|
|
3035
3111
|
__name: "VibeFormWysiwyg",
|
|
3036
3112
|
props: {
|
|
3037
3113
|
modelValue: {
|
|
@@ -3046,6 +3122,7 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
3046
3122
|
required: { type: Boolean, default: !1 },
|
|
3047
3123
|
theme: { type: String, default: "snow" },
|
|
3048
3124
|
toolbar: { type: [Array, String, Boolean], default: void 0 },
|
|
3125
|
+
mobileToolbar: { type: [Array, String, Boolean], default: void 0 },
|
|
3049
3126
|
validationState: { type: String, default: null },
|
|
3050
3127
|
validationMessage: { type: String, default: void 0 },
|
|
3051
3128
|
validationRules: { type: [Array, Function], default: void 0 },
|
|
@@ -3054,183 +3131,258 @@ const pt = ["id"], yt = { class: "accordion-header" }, gt = ["data-bs-target", "
|
|
|
3054
3131
|
height: { type: String, default: "200px" }
|
|
3055
3132
|
},
|
|
3056
3133
|
emits: ["update:modelValue", "validate", "blur", "focus", "change", "ready"],
|
|
3057
|
-
setup(e, { emit:
|
|
3058
|
-
const t = e, a =
|
|
3059
|
-
const
|
|
3060
|
-
return t.validationState === "valid" &&
|
|
3061
|
-
}),
|
|
3134
|
+
setup(e, { emit: r }) {
|
|
3135
|
+
const t = e, a = r, l = J("vibeFormGroup", null), n = h(() => t.id || l?.id.value || G("wysiwyg")), { isMobile: o } = ho(), d = h(() => !!t.label && !l?.hasLabel.value), v = h(() => !!t.validationState && !l?.hasValidation.value), c = h(() => !!t.helpText && !l?.hasHelp.value), m = L(null), f = L(null), V = L(!1), y = L(null), u = L(!1), b = L(null), p = L(null), w = L(null), B = h(() => {
|
|
3136
|
+
const P = ["vibe-wysiwyg-container"];
|
|
3137
|
+
return t.validationState === "valid" && P.push("is-valid"), t.validationState === "invalid" && P.push("is-invalid"), t.disabled && P.push("disabled"), P.join(" ");
|
|
3138
|
+
}), C = [
|
|
3062
3139
|
[{ header: [1, 2, 3, !1] }],
|
|
3063
3140
|
["bold", "italic", "underline", "strike"],
|
|
3064
3141
|
[{ list: "ordered" }, { list: "bullet" }],
|
|
3065
3142
|
[{ color: [] }, { background: [] }],
|
|
3066
3143
|
["link", "image"],
|
|
3067
3144
|
["clean"]
|
|
3068
|
-
],
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3145
|
+
], z = [
|
|
3146
|
+
["bold", "italic", "underline"],
|
|
3147
|
+
[{ list: "ordered" }, { list: "bullet" }],
|
|
3148
|
+
["link", "clean"]
|
|
3149
|
+
], F = () => t.toolbar === !1 ? !1 : o.value ? t.mobileToolbar === !1 ? !1 : t.mobileToolbar !== void 0 ? t.mobileToolbar : z : t.toolbar === !0 || t.toolbar === void 0 ? C : t.toolbar, K = (P) => {
|
|
3150
|
+
f.value && (u.value = !0, f.value.setContents([], "silent"), P && f.value.clipboard.dangerouslyPasteHTML(P, "silent"), u.value = !1);
|
|
3151
|
+
}, _ = () => !f.value || f.value.getText().trim().length === 0 ? "" : f.value.getSemanticHTML(), W = async () => {
|
|
3072
3152
|
try {
|
|
3073
|
-
const
|
|
3074
|
-
if (await import("quill/dist/quill.snow.css"),
|
|
3075
|
-
const
|
|
3153
|
+
const P = await import("quill"), Q = P.default || P;
|
|
3154
|
+
if (await import("quill/dist/quill.snow.css"), m.value) {
|
|
3155
|
+
const re = {
|
|
3076
3156
|
theme: t.theme,
|
|
3077
3157
|
placeholder: t.placeholder,
|
|
3078
3158
|
readOnly: t.readonly || t.disabled,
|
|
3079
3159
|
modules: {
|
|
3080
|
-
toolbar:
|
|
3160
|
+
toolbar: F()
|
|
3081
3161
|
}
|
|
3082
3162
|
};
|
|
3083
|
-
|
|
3084
|
-
if (
|
|
3085
|
-
const
|
|
3086
|
-
a("update:modelValue",
|
|
3087
|
-
},
|
|
3163
|
+
f.value = new Q(m.value, re), t.modelValue && K(t.modelValue), w.value = () => {
|
|
3164
|
+
if (u.value) return;
|
|
3165
|
+
const de = _();
|
|
3166
|
+
a("update:modelValue", de), a("change"), t.validateOn === "change" && a("validate");
|
|
3167
|
+
}, f.value.on("text-change", w.value), b.value = () => {
|
|
3088
3168
|
a("blur"), t.validateOn === "blur" && a("validate");
|
|
3089
|
-
},
|
|
3169
|
+
}, f.value.root.addEventListener("blur", b.value), p.value = () => {
|
|
3090
3170
|
a("focus");
|
|
3091
|
-
},
|
|
3171
|
+
}, f.value.root.addEventListener("focus", p.value), V.value = !0, a("ready", f.value);
|
|
3092
3172
|
}
|
|
3093
|
-
} catch (
|
|
3094
|
-
console.error("Failed to load Quill editor:",
|
|
3173
|
+
} catch (P) {
|
|
3174
|
+
console.error("Failed to load Quill editor:", P), y.value = "Failed to load WYSIWYG editor. Please install quill: npm install quill", V.value = !1;
|
|
3095
3175
|
}
|
|
3096
|
-
}
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3176
|
+
};
|
|
3177
|
+
return X(W), Y(() => {
|
|
3178
|
+
if (f.value) {
|
|
3179
|
+
if (w.value && (f.value.off("text-change", w.value), w.value = null), b.value && (f.value.root.removeEventListener("blur", b.value), b.value = null), p.value && (f.value.root.removeEventListener("focus", p.value), p.value = null), m.value) {
|
|
3180
|
+
const P = m.value.parentElement?.querySelector(".ql-toolbar");
|
|
3181
|
+
P && P.remove();
|
|
3101
3182
|
}
|
|
3102
|
-
|
|
3183
|
+
f.value = null;
|
|
3184
|
+
}
|
|
3185
|
+
}), O(() => t.modelValue, (P) => {
|
|
3186
|
+
if (!f.value) return;
|
|
3187
|
+
_() !== (P || "") && K(P || "");
|
|
3188
|
+
}), O(() => t.disabled, (P) => {
|
|
3189
|
+
f.value && f.value.enable(!P);
|
|
3190
|
+
}), O(() => t.readonly, (P) => {
|
|
3191
|
+
f.value && f.value.enable(!P);
|
|
3192
|
+
}), O(o, async () => {
|
|
3193
|
+
if (f.value) {
|
|
3194
|
+
const P = _();
|
|
3195
|
+
w.value && f.value.off("text-change", w.value), b.value && f.value.root.removeEventListener("blur", b.value), p.value && f.value.root.removeEventListener("focus", p.value);
|
|
3196
|
+
const Q = m.value?.parentElement?.querySelector(".ql-toolbar");
|
|
3197
|
+
Q && Q.remove(), m.value && (m.value.innerHTML = ""), await se(), await W(), P && K(P);
|
|
3103
3198
|
}
|
|
3104
|
-
}),
|
|
3105
|
-
|
|
3106
|
-
P() !== (R || "") && q(R || "");
|
|
3107
|
-
}), O(() => t.disabled, (R) => {
|
|
3108
|
-
b.value && b.value.enable(!R);
|
|
3109
|
-
}), O(() => t.readonly, (R) => {
|
|
3110
|
-
b.value && b.value.enable(!R);
|
|
3111
|
-
}), (R, Q) => (n(), i("div", {
|
|
3112
|
-
class: $({ "mb-3": o.value || u.value || r.value })
|
|
3199
|
+
}), (P, Q) => (i(), s("div", {
|
|
3200
|
+
class: $({ "mb-3": d.value || c.value || v.value })
|
|
3113
3201
|
}, [
|
|
3114
|
-
|
|
3202
|
+
d.value ? (i(), s("label", {
|
|
3115
3203
|
key: 0,
|
|
3116
|
-
for:
|
|
3204
|
+
for: n.value,
|
|
3117
3205
|
class: "form-label"
|
|
3118
3206
|
}, [
|
|
3119
3207
|
I(k(e.label) + " ", 1),
|
|
3120
|
-
e.required ? (
|
|
3121
|
-
], 8,
|
|
3122
|
-
|
|
3208
|
+
e.required ? (i(), s("span", mo, "*")) : g("", !0)
|
|
3209
|
+
], 8, po)) : g("", !0),
|
|
3210
|
+
y.value ? (i(), s("div", yo, k(y.value), 1)) : (i(), s("div", {
|
|
3123
3211
|
key: 2,
|
|
3124
|
-
class: $(
|
|
3125
|
-
style:
|
|
3212
|
+
class: $(B.value),
|
|
3213
|
+
style: Z({ minHeight: e.height })
|
|
3126
3214
|
}, [
|
|
3127
3215
|
S("div", {
|
|
3128
3216
|
ref_key: "editorContainer",
|
|
3129
|
-
ref:
|
|
3130
|
-
id:
|
|
3131
|
-
}, null, 8,
|
|
3217
|
+
ref: m,
|
|
3218
|
+
id: n.value
|
|
3219
|
+
}, null, 8, go)
|
|
3132
3220
|
], 6)),
|
|
3133
|
-
|
|
3221
|
+
c.value ? (i(), s("div", {
|
|
3134
3222
|
key: 3,
|
|
3135
|
-
id: `${
|
|
3223
|
+
id: `${n.value}-feedback`,
|
|
3136
3224
|
class: "form-text"
|
|
3137
|
-
}, k(e.helpText), 9,
|
|
3138
|
-
|
|
3139
|
-
e.validationState === "valid" ? (
|
|
3140
|
-
e.validationState === "invalid" ? (
|
|
3225
|
+
}, k(e.helpText), 9, ko)) : g("", !0),
|
|
3226
|
+
v.value ? (i(), s(R, { key: 4 }, [
|
|
3227
|
+
e.validationState === "valid" ? (i(), s("div", So, k(e.validationMessage || "Looks good!"), 1)) : g("", !0),
|
|
3228
|
+
e.validationState === "invalid" ? (i(), s("div", {
|
|
3141
3229
|
key: 1,
|
|
3142
|
-
id: `${
|
|
3230
|
+
id: `${n.value}-feedback`,
|
|
3143
3231
|
class: "invalid-feedback",
|
|
3144
3232
|
style: { display: "block" }
|
|
3145
|
-
}, k(e.validationMessage || "Please provide valid content."), 9,
|
|
3146
|
-
], 64)) :
|
|
3233
|
+
}, k(e.validationMessage || "Please provide valid content."), 9, $o)) : g("", !0)
|
|
3234
|
+
], 64)) : g("", !0)
|
|
3147
3235
|
], 2));
|
|
3148
3236
|
}
|
|
3149
|
-
}),
|
|
3237
|
+
}), Vo = /* @__PURE__ */ ae(wo, [["__scopeId", "data-v-952f7269"]]), Co = {
|
|
3238
|
+
key: 0,
|
|
3239
|
+
class: "input-group-text"
|
|
3240
|
+
}, xo = {
|
|
3241
|
+
key: 0,
|
|
3242
|
+
class: "input-group-text"
|
|
3243
|
+
}, Bo = /* @__PURE__ */ M({
|
|
3244
|
+
__name: "VibeInputGroup",
|
|
3245
|
+
props: {
|
|
3246
|
+
size: { type: String, default: void 0 },
|
|
3247
|
+
prepend: { type: String, default: void 0 },
|
|
3248
|
+
append: { type: String, default: void 0 },
|
|
3249
|
+
tag: { type: String, default: "div" }
|
|
3250
|
+
},
|
|
3251
|
+
setup(e) {
|
|
3252
|
+
const r = e, t = h(() => {
|
|
3253
|
+
const a = ["input-group"];
|
|
3254
|
+
return r.size && a.push(`input-group-${r.size}`), a.join(" ");
|
|
3255
|
+
});
|
|
3256
|
+
return (a, l) => (i(), q(A(e.tag), {
|
|
3257
|
+
class: $(t.value)
|
|
3258
|
+
}, {
|
|
3259
|
+
default: j(() => [
|
|
3260
|
+
T(a.$slots, "prepend", {}, () => [
|
|
3261
|
+
e.prepend ? (i(), s("span", Co, k(e.prepend), 1)) : g("", !0)
|
|
3262
|
+
]),
|
|
3263
|
+
T(a.$slots, "default"),
|
|
3264
|
+
T(a.$slots, "append", {}, () => [
|
|
3265
|
+
e.append ? (i(), s("span", xo, k(e.append), 1)) : g("", !0)
|
|
3266
|
+
])
|
|
3267
|
+
]),
|
|
3268
|
+
_: 3
|
|
3269
|
+
}, 8, ["class"]));
|
|
3270
|
+
}
|
|
3271
|
+
}), Lo = /* @__PURE__ */ M({
|
|
3272
|
+
__name: "VibeLink",
|
|
3273
|
+
props: {
|
|
3274
|
+
tag: { type: String, default: "a" },
|
|
3275
|
+
href: { type: String, default: void 0 },
|
|
3276
|
+
to: { type: [String, Object], default: void 0 },
|
|
3277
|
+
variant: { type: String, default: void 0 },
|
|
3278
|
+
underline: { type: [Boolean, String], default: !0 },
|
|
3279
|
+
underlineVariant: { type: String, default: void 0 },
|
|
3280
|
+
underlineOpacity: { type: [String, Number], default: void 0 },
|
|
3281
|
+
offset: { type: [String, Number], default: void 0 },
|
|
3282
|
+
opacity: { type: [String, Number], default: void 0 },
|
|
3283
|
+
focusRing: { type: Boolean, default: !1 }
|
|
3284
|
+
},
|
|
3285
|
+
setup(e) {
|
|
3286
|
+
const r = e, t = h(() => !!r.to), a = h(() => t.value ? "router-link" : r.tag), l = h(() => {
|
|
3287
|
+
const n = [];
|
|
3288
|
+
return r.variant && n.push(`link-${r.variant}`), r.underline === !1 || r.underline === "0" ? n.push("link-underline-0") : typeof r.underline == "string" && ["1", "2", "3"].includes(r.underline) && n.push("link-underline", `link-underline-opacity-${r.underline}`), r.underlineVariant && n.push(`link-underline-${r.underlineVariant}`), r.underlineOpacity !== void 0 && n.push(`link-underline-opacity-${r.underlineOpacity}`), r.offset !== void 0 && n.push(`link-offset-${r.offset}`), r.opacity !== void 0 && n.push(`link-opacity-${r.opacity}`), r.focusRing && n.push("focus-ring"), n.join(" ");
|
|
3289
|
+
});
|
|
3290
|
+
return (n, o) => (i(), q(A(a.value), {
|
|
3291
|
+
class: $(l.value),
|
|
3292
|
+
href: e.href,
|
|
3293
|
+
to: e.to
|
|
3294
|
+
}, {
|
|
3295
|
+
default: j(() => [
|
|
3296
|
+
T(n.$slots, "default")
|
|
3297
|
+
]),
|
|
3298
|
+
_: 3
|
|
3299
|
+
}, 8, ["class", "href", "to"]));
|
|
3300
|
+
}
|
|
3301
|
+
}), Eo = {
|
|
3150
3302
|
install(e) {
|
|
3151
|
-
e.component("VibeAlert",
|
|
3303
|
+
e.component("VibeAlert", Te), e.component("VibeBadge", Ne), e.component("VibeButton", Ee), e.component("VibeButtonGroup", Ie), e.component("VibeCloseButton", Fe), e.component("VibeSpinner", qe), e.component("VibePlaceholder", ze), e.component("VibeContainer", Ae), e.component("VibeRow", je), e.component("VibeCol", Oe), e.component("VibeCard", Ke), e.component("VibeBreadcrumb", _e), e.component("VibeNav", lt), e.component("VibeNavbar", nt), e.component("VibeNavbarBrand", it), e.component("VibeNavbarToggle", rt), e.component("VibeNavbarNav", bt), e.component("VibePagination", gt), e.component("VibeTabContent", St), e.component("VibeListGroup", $t), e.component("VibeProgress", Vt), e.component("VibeAccordion", Nt), e.component("VibeCollapse", Et), e.component("VibeDropdown", At), e.component("VibeModal", Ut), e.component("VibeOffcanvas", _t), e.component("VibeToast", oa), e.component("VibeCarousel", pa), e.component("VibeTooltip", ya), e.component("VibePopover", ka), e.component("VibeScrollspy", Sa), e.component("VibeIcon", $a), e.component("VibeDataTable", Ua), e.component("VibeFormInput", tl), e.component("VibeFormSelect", ul), e.component("VibeFormTextarea", yl), e.component("VibeFormSpinbutton", Ll), e.component("VibeFormDatepicker", Fl), e.component("VibeFormCheckbox", Hl), e.component("VibeFormRadio", Kl), e.component("VibeFormSwitch", ao), e.component("VibeFormGroup", bo), e.component("VibeFormWysiwyg", Vo), e.component("VibeInputGroup", Bo), e.component("VibeLink", Lo);
|
|
3152
3304
|
}
|
|
3153
3305
|
};
|
|
3154
|
-
function
|
|
3155
|
-
const
|
|
3156
|
-
if (!
|
|
3306
|
+
function Mo(e = "") {
|
|
3307
|
+
const r = L(e), t = L(null), a = L(""), l = L(!1), n = L(!1), o = L(!1), d = async (y) => {
|
|
3308
|
+
if (!y)
|
|
3157
3309
|
return t.value = null, a.value = "", { valid: !0 };
|
|
3158
3310
|
o.value = !0;
|
|
3159
3311
|
try {
|
|
3160
|
-
const
|
|
3161
|
-
for (const
|
|
3162
|
-
const
|
|
3163
|
-
if (
|
|
3164
|
-
return t.value = "invalid", a.value = typeof
|
|
3312
|
+
const u = Array.isArray(y) ? y : [{ validator: y }];
|
|
3313
|
+
for (const b of u) {
|
|
3314
|
+
const p = await b.validator(r.value);
|
|
3315
|
+
if (p === !1 || typeof p == "string")
|
|
3316
|
+
return t.value = "invalid", a.value = typeof p == "string" ? p : b.message || "Invalid value", o.value = !1, { valid: !1, message: a.value };
|
|
3165
3317
|
}
|
|
3166
3318
|
return t.value = "valid", a.value = "", o.value = !1, { valid: !0 };
|
|
3167
3319
|
} catch {
|
|
3168
3320
|
return t.value = "invalid", a.value = "Validation error occurred", o.value = !1, { valid: !1, message: a.value };
|
|
3169
3321
|
}
|
|
3170
|
-
},
|
|
3171
|
-
|
|
3322
|
+
}, v = () => {
|
|
3323
|
+
r.value = e, t.value = null, a.value = "", l.value = !1, n.value = !1, o.value = !1;
|
|
3172
3324
|
}, c = () => {
|
|
3173
|
-
|
|
3174
|
-
},
|
|
3325
|
+
n.value = !0;
|
|
3326
|
+
}, m = () => {
|
|
3175
3327
|
l.value = !0;
|
|
3176
|
-
},
|
|
3328
|
+
}, f = h(() => t.value === "valid"), V = h(() => t.value === "invalid");
|
|
3177
3329
|
return {
|
|
3178
|
-
value:
|
|
3330
|
+
value: r,
|
|
3179
3331
|
validationState: t,
|
|
3180
3332
|
validationMessage: a,
|
|
3181
3333
|
isDirty: l,
|
|
3182
|
-
isTouched:
|
|
3334
|
+
isTouched: n,
|
|
3183
3335
|
isValidating: o,
|
|
3184
|
-
isValid:
|
|
3185
|
-
isInvalid:
|
|
3186
|
-
validate:
|
|
3187
|
-
reset:
|
|
3336
|
+
isValid: f,
|
|
3337
|
+
isInvalid: V,
|
|
3338
|
+
validate: d,
|
|
3339
|
+
reset: v,
|
|
3188
3340
|
markAsTouched: c,
|
|
3189
|
-
markAsDirty:
|
|
3341
|
+
markAsDirty: m
|
|
3190
3342
|
};
|
|
3191
3343
|
}
|
|
3192
|
-
const
|
|
3344
|
+
const Io = {
|
|
3193
3345
|
required: (e = "This field is required") => ({
|
|
3194
|
-
validator: (
|
|
3346
|
+
validator: (r) => Array.isArray(r) ? r.length > 0 || e : typeof r == "string" ? r.trim().length > 0 || e : r != null && r !== "" || e,
|
|
3195
3347
|
message: e
|
|
3196
3348
|
}),
|
|
3197
3349
|
email: (e = "Please enter a valid email address") => ({
|
|
3198
|
-
validator: (
|
|
3350
|
+
validator: (r) => r ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r) || e : !0,
|
|
3199
3351
|
message: e
|
|
3200
3352
|
}),
|
|
3201
|
-
minLength: (e,
|
|
3202
|
-
validator: (t) => t ? t.length >= e ||
|
|
3203
|
-
message:
|
|
3353
|
+
minLength: (e, r) => ({
|
|
3354
|
+
validator: (t) => t ? t.length >= e || r || `Minimum length is ${e} characters` : !0,
|
|
3355
|
+
message: r
|
|
3204
3356
|
}),
|
|
3205
|
-
maxLength: (e,
|
|
3206
|
-
validator: (t) => t ? t.length <= e ||
|
|
3207
|
-
message:
|
|
3357
|
+
maxLength: (e, r) => ({
|
|
3358
|
+
validator: (t) => t ? t.length <= e || r || `Maximum length is ${e} characters` : !0,
|
|
3359
|
+
message: r
|
|
3208
3360
|
}),
|
|
3209
|
-
min: (e,
|
|
3361
|
+
min: (e, r) => ({
|
|
3210
3362
|
validator: (t) => {
|
|
3211
3363
|
if (t == null || t === "") return !0;
|
|
3212
3364
|
const a = Number(t);
|
|
3213
|
-
return Number.isNaN(a) ?
|
|
3365
|
+
return Number.isNaN(a) ? r || "Value must be a number" : a >= e || r || `Minimum value is ${e}`;
|
|
3214
3366
|
},
|
|
3215
|
-
message:
|
|
3367
|
+
message: r
|
|
3216
3368
|
}),
|
|
3217
|
-
max: (e,
|
|
3369
|
+
max: (e, r) => ({
|
|
3218
3370
|
validator: (t) => {
|
|
3219
3371
|
if (t == null || t === "") return !0;
|
|
3220
3372
|
const a = Number(t);
|
|
3221
|
-
return Number.isNaN(a) ?
|
|
3373
|
+
return Number.isNaN(a) ? r || "Value must be a number" : a <= e || r || `Maximum value is ${e}`;
|
|
3222
3374
|
},
|
|
3223
|
-
message:
|
|
3375
|
+
message: r
|
|
3224
3376
|
}),
|
|
3225
|
-
pattern: (e,
|
|
3226
|
-
validator: (t) => t ? e.test(t) ||
|
|
3227
|
-
message:
|
|
3377
|
+
pattern: (e, r = "Invalid format") => ({
|
|
3378
|
+
validator: (t) => t ? e.test(t) || r : !0,
|
|
3379
|
+
message: r
|
|
3228
3380
|
}),
|
|
3229
3381
|
url: (e = "Please enter a valid URL") => ({
|
|
3230
|
-
validator: (
|
|
3231
|
-
if (!
|
|
3382
|
+
validator: (r) => {
|
|
3383
|
+
if (!r) return !0;
|
|
3232
3384
|
try {
|
|
3233
|
-
return new URL(
|
|
3385
|
+
return new URL(r), !0;
|
|
3234
3386
|
} catch {
|
|
3235
3387
|
return e;
|
|
3236
3388
|
}
|
|
@@ -3241,104 +3393,121 @@ const mo = {
|
|
|
3241
3393
|
async: (e) => ({
|
|
3242
3394
|
validator: e
|
|
3243
3395
|
})
|
|
3244
|
-
},
|
|
3396
|
+
}, ue = "vibe-color-mode", ce = {
|
|
3245
3397
|
light: "dark",
|
|
3246
3398
|
dark: "auto",
|
|
3247
3399
|
auto: "light"
|
|
3248
|
-
},
|
|
3249
|
-
let
|
|
3250
|
-
|
|
3251
|
-
|
|
3400
|
+
}, ie = L("auto");
|
|
3401
|
+
let ve = !1;
|
|
3402
|
+
const be = [];
|
|
3403
|
+
function To() {
|
|
3404
|
+
return typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
3405
|
+
}
|
|
3406
|
+
function we(e) {
|
|
3407
|
+
if (typeof document > "u") return;
|
|
3408
|
+
const r = e === "auto" ? To() : e;
|
|
3409
|
+
document.documentElement.setAttribute("data-bs-theme", r);
|
|
3252
3410
|
}
|
|
3253
|
-
function
|
|
3254
|
-
|
|
3411
|
+
function ne(e) {
|
|
3412
|
+
ie.value = e, we(e), be.forEach((r) => r(e));
|
|
3255
3413
|
}
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3414
|
+
ne("auto");
|
|
3415
|
+
typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
|
3416
|
+
ie.value === "auto" && (we("auto"), be.forEach((e) => e("auto")));
|
|
3417
|
+
});
|
|
3418
|
+
function Ro() {
|
|
3419
|
+
function e(n) {
|
|
3420
|
+
if (n in ce) {
|
|
3260
3421
|
try {
|
|
3261
|
-
localStorage.setItem(
|
|
3422
|
+
localStorage.setItem(ue, n);
|
|
3262
3423
|
} catch {
|
|
3263
3424
|
}
|
|
3264
|
-
|
|
3425
|
+
ne(n);
|
|
3265
3426
|
}
|
|
3266
3427
|
}
|
|
3267
|
-
function
|
|
3268
|
-
if (
|
|
3269
|
-
let
|
|
3428
|
+
function r() {
|
|
3429
|
+
if (ve) return;
|
|
3430
|
+
let n = "auto";
|
|
3270
3431
|
try {
|
|
3271
|
-
const
|
|
3272
|
-
|
|
3432
|
+
const o = localStorage.getItem(ue);
|
|
3433
|
+
o !== null && o in ce && (n = o);
|
|
3273
3434
|
} catch {
|
|
3274
3435
|
}
|
|
3275
|
-
|
|
3436
|
+
ne(n), ve = !0;
|
|
3276
3437
|
}
|
|
3277
3438
|
function t() {
|
|
3278
3439
|
try {
|
|
3279
|
-
localStorage.removeItem(
|
|
3440
|
+
localStorage.removeItem(ue);
|
|
3280
3441
|
} catch {
|
|
3281
3442
|
}
|
|
3282
|
-
|
|
3443
|
+
ve = !1, ne("auto");
|
|
3283
3444
|
}
|
|
3284
3445
|
function a() {
|
|
3285
|
-
e(
|
|
3446
|
+
e(ce[ie.value] ?? "auto");
|
|
3447
|
+
}
|
|
3448
|
+
function l(n) {
|
|
3449
|
+
be.push(n);
|
|
3286
3450
|
}
|
|
3287
3451
|
return {
|
|
3288
|
-
colorMode:
|
|
3452
|
+
colorMode: ie,
|
|
3289
3453
|
setColorMode: e,
|
|
3290
3454
|
toggleColorMode: a,
|
|
3291
|
-
initColorMode:
|
|
3292
|
-
clearColorMode: t
|
|
3455
|
+
initColorMode: r,
|
|
3456
|
+
clearColorMode: t,
|
|
3457
|
+
onColorModeChange: l
|
|
3293
3458
|
};
|
|
3294
3459
|
}
|
|
3295
3460
|
export {
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
nt as
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3461
|
+
Nt as VibeAccordion,
|
|
3462
|
+
Te as VibeAlert,
|
|
3463
|
+
Ne as VibeBadge,
|
|
3464
|
+
_e as VibeBreadcrumb,
|
|
3465
|
+
Ee as VibeButton,
|
|
3466
|
+
Ie as VibeButtonGroup,
|
|
3467
|
+
Ke as VibeCard,
|
|
3468
|
+
pa as VibeCarousel,
|
|
3469
|
+
Fe as VibeCloseButton,
|
|
3470
|
+
Oe as VibeCol,
|
|
3471
|
+
Et as VibeCollapse,
|
|
3472
|
+
Ae as VibeContainer,
|
|
3473
|
+
Ua as VibeDataTable,
|
|
3474
|
+
At as VibeDropdown,
|
|
3475
|
+
Hl as VibeFormCheckbox,
|
|
3476
|
+
Fl as VibeFormDatepicker,
|
|
3477
|
+
bo as VibeFormGroup,
|
|
3478
|
+
tl as VibeFormInput,
|
|
3479
|
+
Kl as VibeFormRadio,
|
|
3480
|
+
ul as VibeFormSelect,
|
|
3481
|
+
Ll as VibeFormSpinbutton,
|
|
3482
|
+
ao as VibeFormSwitch,
|
|
3483
|
+
yl as VibeFormTextarea,
|
|
3484
|
+
Vo as VibeFormWysiwyg,
|
|
3485
|
+
$a as VibeIcon,
|
|
3486
|
+
Bo as VibeInputGroup,
|
|
3487
|
+
Lo as VibeLink,
|
|
3488
|
+
$t as VibeListGroup,
|
|
3489
|
+
Ut as VibeModal,
|
|
3490
|
+
lt as VibeNav,
|
|
3491
|
+
nt as VibeNavbar,
|
|
3492
|
+
it as VibeNavbarBrand,
|
|
3493
|
+
bt as VibeNavbarNav,
|
|
3494
|
+
rt as VibeNavbarToggle,
|
|
3495
|
+
_t as VibeOffcanvas,
|
|
3496
|
+
gt as VibePagination,
|
|
3497
|
+
ze as VibePlaceholder,
|
|
3498
|
+
ka as VibePopover,
|
|
3499
|
+
Vt as VibeProgress,
|
|
3500
|
+
je as VibeRow,
|
|
3501
|
+
Sa as VibeScrollspy,
|
|
3502
|
+
qe as VibeSpinner,
|
|
3503
|
+
St as VibeTabContent,
|
|
3504
|
+
oa as VibeToast,
|
|
3505
|
+
ya as VibeTooltip,
|
|
3506
|
+
Eo as default,
|
|
3507
|
+
$e as useBackButton,
|
|
3508
|
+
ho as useBreakpoints,
|
|
3509
|
+
Ro as useColorMode,
|
|
3510
|
+
Mo as useFormValidation,
|
|
3342
3511
|
G as useId,
|
|
3343
|
-
|
|
3512
|
+
Io as validators
|
|
3344
3513
|
};
|