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