@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.
Files changed (46) hide show
  1. package/README.md +96 -78
  2. package/dist/components/VibeAccordion.vue.d.ts +12 -4
  3. package/dist/components/VibeBreadcrumb.vue.d.ts +8 -4
  4. package/dist/components/VibeCard.vue.d.ts +32 -21
  5. package/dist/components/VibeCarousel.vue.d.ts +7 -6
  6. package/dist/components/VibeDataTable.vue.d.ts +68 -255
  7. package/dist/components/VibeDropdown.vue.d.ts +13 -4
  8. package/dist/components/VibeFormCheckbox.vue.d.ts +4 -3
  9. package/dist/components/VibeFormDatepicker.vue.d.ts +5 -4
  10. package/dist/components/VibeFormInput.vue.d.ts +14 -15
  11. package/dist/components/VibeFormRadio.vue.d.ts +4 -3
  12. package/dist/components/VibeFormSelect.vue.d.ts +4 -3
  13. package/dist/components/VibeFormSpinbutton.vue.d.ts +5 -4
  14. package/dist/components/VibeFormSwitch.vue.d.ts +4 -3
  15. package/dist/components/VibeFormTextarea.vue.d.ts +4 -3
  16. package/dist/components/VibeFormWysiwyg.vue.d.ts +12 -13
  17. package/dist/components/VibeListGroup.vue.d.ts +15 -4
  18. package/dist/components/VibeModal.vue.d.ts +6 -2
  19. package/dist/components/VibeNav.vue.d.ts +15 -4
  20. package/dist/components/VibeNavbarNav.vue.d.ts +14 -1
  21. package/dist/components/VibePagination.vue.d.ts +32 -4
  22. package/dist/components/VibeProgress.vue.d.ts +13 -1
  23. package/dist/components/VibeTabContent.vue.d.ts +22 -2
  24. package/dist/components/VibeToast.vue.d.ts +6 -2
  25. package/dist/components/index.d.ts +4 -20
  26. package/dist/composables/useFormValidation.d.ts +10 -8
  27. package/dist/types.d.ts +16 -0
  28. package/dist/vibeui.css +1 -1
  29. package/dist/vibeui.es.js +1477 -1627
  30. package/dist/vibeui.umd.js +1 -1
  31. package/package.json +10 -1
  32. package/dist/components/VibeAccordionItem.vue.d.ts +0 -57
  33. package/dist/components/VibeBreadcrumbItem.vue.d.ts +0 -51
  34. package/dist/components/VibeCardBody.vue.d.ts +0 -34
  35. package/dist/components/VibeCardFooter.vue.d.ts +0 -34
  36. package/dist/components/VibeCardHeader.vue.d.ts +0 -34
  37. package/dist/components/VibeCardImg.vue.d.ts +0 -44
  38. package/dist/components/VibeCardText.vue.d.ts +0 -33
  39. package/dist/components/VibeCardTitle.vue.d.ts +0 -33
  40. package/dist/components/VibeCarouselSlide.vue.d.ts +0 -80
  41. package/dist/components/VibeDropdownItem.vue.d.ts +0 -81
  42. package/dist/components/VibeListGroupItem.vue.d.ts +0 -90
  43. package/dist/components/VibeNavItem.vue.d.ts +0 -80
  44. package/dist/components/VibePaginationItem.vue.d.ts +0 -62
  45. package/dist/components/VibeProgressBar.vue.d.ts +0 -88
  46. package/dist/components/VibeTabPane.vue.d.ts +0 -70
package/dist/vibeui.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent as p, computed as c, createElementBlock as o, createCommentVNode as u, openBlock as l, normalizeClass as h, renderSlot as $, createTextVNode as N, toDisplayString as f, createBlock as V, resolveDynamicComponent as T, withCtx as x, createElementVNode as m, normalizeStyle as R, unref as L, useSlots as D, Fragment as q, renderList as I, ref as F, watch as O, withDirectives as W, vModelText as ye, vModelSelect as he, withModifiers as Y, onMounted as ge, onBeforeUnmount as pe } from "vue";
2
- const $e = /* @__PURE__ */ p({
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: d }) {
12
- const t = e, i = d, a = c({
11
+ setup(e, { emit: f }) {
12
+ const t = e, a = f, l = y({
13
13
  get: () => t.modelValue,
14
- set: (r) => i("update:modelValue", r)
15
- }), n = () => {
14
+ set: (s) => a("update:modelValue", s)
15
+ }), o = () => {
16
16
  try {
17
- a.value = !1;
18
- } catch (r) {
19
- i("component-error", {
17
+ l.value = !1;
18
+ } catch (s) {
19
+ a("component-error", {
20
20
  message: "Dismiss failed",
21
21
  componentName: "VibeAlert",
22
- originalError: r
22
+ originalError: s
23
23
  });
24
24
  }
25
25
  };
26
- return (r, s) => a.value ? (l(), o("div", {
26
+ return (s, u) => l.value ? (i(), n("div", {
27
27
  key: 0,
28
- class: h(`alert alert-${e.variant}`),
28
+ class: g(`alert alert-${e.variant}`),
29
29
  role: "alert"
30
30
  }, [
31
- $(r.$slots, "default", {}, () => [
32
- N(f(e.message), 1)
31
+ V(s.$slots, "default", {}, () => [
32
+ w(b(e.message), 1)
33
33
  ]),
34
- e.dismissable ? (l(), o("button", {
34
+ e.dismissable ? (i(), n("button", {
35
35
  key: 0,
36
36
  class: "btn-close",
37
- onClick: n,
37
+ onClick: o,
38
38
  "aria-label": "Close"
39
- })) : u("", !0)
40
- ], 2)) : u("", !0);
39
+ })) : v("", !0)
40
+ ], 2)) : v("", !0);
41
41
  }
42
- }), ke = /* @__PURE__ */ p({
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: d }) {
51
- const t = e, i = c(() => {
52
- const a = ["badge", `bg-${t.variant}`];
53
- return t.pill && a.push("rounded-pill"), a.join(" ");
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 (a, n) => (l(), V(T(e.tag), {
56
- class: h(i.value)
55
+ return (l, o) => (i(), M(q(e.tag), {
56
+ class: g(a.value)
57
57
  }, {
58
- default: x(() => [
59
- $(a.$slots, "default")
58
+ default: P(() => [
59
+ V(l.$slots, "default")
60
60
  ]),
61
61
  _: 3
62
62
  }, 8, ["class"]));
63
63
  }
64
- }), Se = /* @__PURE__ */ p({
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: d }) {
78
- const t = e, i = d, a = c(() => t.href ? "a" : t.to ? "router-link" : "button"), n = c(() => {
79
- const s = ["btn"];
80
- return t.outline ? s.push(`btn-outline-${t.variant}`) : s.push(`btn-${t.variant}`), t.size && s.push(`btn-${t.size}`), t.active && s.push("active"), s.join(" ");
81
- }), r = (s) => {
82
- t.disabled || i("click", s);
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 (s, y) => (l(), V(T(a.value), {
85
- class: h(n.value),
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: r
91
+ onClick: s
92
92
  }, {
93
- default: x(() => [
94
- $(s.$slots, "default")
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
- }), Ve = ["role", "aria-label"], xe = /* @__PURE__ */ p({
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: d }) {
109
- const t = e, i = c(() => {
110
- const a = [t.vertical ? "btn-group-vertical" : "btn-group"];
111
- return t.size && a.push(`btn-group-${t.size}`), a.join(" ");
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 (a, n) => (l(), o("div", {
114
- class: h(i.value),
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
- $(a.$slots, "default")
119
- ], 10, Ve));
118
+ V(l.$slots, "default")
119
+ ], 10, fe));
120
120
  }
121
- }), Ce = ["disabled", "aria-label"], Be = /* @__PURE__ */ p({
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: d }) {
130
- const t = e, i = d, a = (n) => {
131
- t.disabled || i("click", n);
129
+ setup(e, { emit: f }) {
130
+ const t = e, a = f, l = (o) => {
131
+ t.disabled || a("click", o);
132
132
  };
133
- return (n, r) => (l(), o("button", {
133
+ return (o, s) => (i(), n("button", {
134
134
  type: "button",
135
- class: h(["btn-close", { "btn-close-white": e.white }]),
135
+ class: g(["btn-close", { "btn-close-white": e.white }]),
136
136
  disabled: e.disabled,
137
137
  "aria-label": e.ariaLabel,
138
- onClick: a
139
- }, null, 10, Ce));
138
+ onClick: l
139
+ }, null, 10, be));
140
140
  }
141
- }), we = { class: "visually-hidden" }, Ne = /* @__PURE__ */ p({
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: d }) {
152
- const t = e, i = c(() => {
153
- const a = [`spinner-${t.type}`];
154
- return t.variant && a.push(`text-${t.variant}`), t.size && a.push(`spinner-${t.type}-${t.size}`), a.join(" ");
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 (a, n) => (l(), V(T(e.tag), {
157
- class: h(i.value),
156
+ return (l, o) => (i(), M(q(e.tag), {
157
+ class: g(a.value),
158
158
  role: "status"
159
159
  }, {
160
- default: x(() => [
161
- m("span", we, f(e.label), 1)
160
+ default: P(() => [
161
+ h("span", he, b(e.label), 1)
162
162
  ]),
163
163
  _: 1
164
164
  }, 8, ["class"]));
165
165
  }
166
- }), Te = /* @__PURE__ */ p({
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: d }) {
177
- const t = e, i = c(() => {
178
- const r = ["placeholder"];
179
- return t.variant && r.push(`bg-${t.variant}`), t.size && r.push(`placeholder-${t.size}`), r.join(" ");
180
- }), a = c(() => {
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
- }), n = c(() => {
182
+ }), o = y(() => {
183
183
  if (t.width)
184
184
  return { width: typeof t.width == "number" ? `${t.width}%` : t.width };
185
185
  });
186
- return (r, s) => (l(), V(T(e.tag), {
187
- class: h(a.value)
186
+ return (s, u) => (i(), M(q(e.tag), {
187
+ class: g(l.value)
188
188
  }, {
189
- default: x(() => [
190
- m("span", {
191
- class: h(i.value),
192
- style: R(n.value)
189
+ default: P(() => [
190
+ h("span", {
191
+ class: g(a.value),
192
+ style: D(o.value)
193
193
  }, [
194
- $(r.$slots, "default")
194
+ V(s.$slots, "default")
195
195
  ], 6)
196
196
  ]),
197
197
  _: 3
198
198
  }, 8, ["class"]));
199
199
  }
200
- }), Me = /* @__PURE__ */ p({
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: d }) {
208
- const t = e, i = c(() => t.fluid === !1 ? "container" : t.fluid === !0 ? "container-fluid" : `container-${t.fluid}`);
209
- return (a, n) => (l(), V(T(e.tag), {
210
- class: h(i.value)
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: x(() => [
213
- $(a.$slots, "default")
212
+ default: P(() => [
213
+ V(l.$slots, "default")
214
214
  ]),
215
215
  _: 3
216
216
  }, 8, ["class"]));
217
217
  }
218
- }), Pe = /* @__PURE__ */ p({
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: d }) {
255
- const t = e, i = c(() => {
256
- const a = ["row"];
257
- t.gutters !== void 0 && a.push(`g-${t.gutters}`), t.guttersX !== void 0 && a.push(`gx-${t.guttersX}`), t.guttersY !== void 0 && a.push(`gy-${t.guttersY}`);
258
- const n = ["sm", "md", "lg", "xl", "xxl"];
259
- return n.forEach((r) => {
260
- const s = r.charAt(0).toUpperCase() + r.slice(1), y = `gutters${s}`;
261
- t[y] !== void 0 && a.push(`g-${r}-${t[y]}`);
262
- const v = `guttersX${s}`;
263
- t[v] !== void 0 && a.push(`gx-${r}-${t[v]}`);
264
- const b = `guttersY${s}`;
265
- t[b] !== void 0 && a.push(`gy-${r}-${t[b]}`);
266
- }), t.rowCols !== void 0 && a.push(`row-cols-${t.rowCols}`), n.forEach((r) => {
267
- const s = `rowCols${r.charAt(0).toUpperCase() + r.slice(1)}`;
268
- t[s] !== void 0 && a.push(`row-cols-${r}-${t[s]}`);
269
- }), t.alignItems && a.push(`align-items-${t.alignItems}`), t.justifyContent && a.push(`justify-content-${t.justifyContent}`), a.join(" ");
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 (a, n) => (l(), V(T(e.tag), {
272
- class: h(i.value)
271
+ return (l, o) => (i(), M(q(e.tag), {
272
+ class: g(a.value)
273
273
  }, {
274
- default: x(() => [
275
- $(a.$slots, "default")
274
+ default: P(() => [
275
+ V(l.$slots, "default")
276
276
  ]),
277
277
  _: 3
278
278
  }, 8, ["class"]));
279
279
  }
280
- }), qe = /* @__PURE__ */ p({
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: d }) {
310
- const t = e, i = c(() => {
311
- const a = [];
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 ? a.push("col") : t.cols === "auto" ? a.push("col-auto") : t.cols && a.push(`col-${t.cols}`), [
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: s, value: y }) => {
319
- y === !0 ? a.push(`col-${s}`) : y === "auto" ? a.push(`col-${s}-auto`) : y !== void 0 && a.push(`col-${s}-${y}`);
320
- })) : a.push("col"), t.offset !== void 0 && a.push(`offset-${t.offset}`), t.offsetSm !== void 0 && a.push(`offset-sm-${t.offsetSm}`), t.offsetMd !== void 0 && a.push(`offset-md-${t.offsetMd}`), t.offsetLg !== void 0 && a.push(`offset-lg-${t.offsetLg}`), t.offsetXl !== void 0 && a.push(`offset-xl-${t.offsetXl}`), t.offsetXxl !== void 0 && a.push(`offset-xxl-${t.offsetXxl}`), t.order !== void 0 && a.push(`order-${t.order}`), t.orderSm !== void 0 && a.push(`order-sm-${t.orderSm}`), t.orderMd !== void 0 && a.push(`order-md-${t.orderMd}`), t.orderLg !== void 0 && a.push(`order-lg-${t.orderLg}`), t.orderXl !== void 0 && a.push(`order-xl-${t.orderXl}`), t.orderXxl !== void 0 && a.push(`order-xxl-${t.orderXxl}`), t.alignSelf && a.push(`align-self-${t.alignSelf}`), a.join(" ");
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 (a, n) => (l(), V(T(e.tag), {
323
- class: h(i.value)
322
+ return (l, o) => (i(), M(q(e.tag), {
323
+ class: g(a.value)
324
324
  }, {
325
- default: x(() => [
326
- $(a.$slots, "default")
325
+ default: P(() => [
326
+ V(l.$slots, "default")
327
327
  ]),
328
328
  _: 3
329
329
  }, 8, ["class"]));
330
330
  }
331
- }), J = /* @__PURE__ */ p({
332
- __name: "VibeCardHeader",
333
- props: {
334
- tag: { type: String, default: "div" }
335
- },
336
- emits: ["component-error"],
337
- setup(e, { emit: d }) {
338
- return (t, i) => (l(), V(T(e.tag), { class: "card-header" }, {
339
- default: x(() => [
340
- $(t.$slots, "default")
341
- ]),
342
- _: 3
343
- }));
344
- }
345
- }), Z = /* @__PURE__ */ p({
346
- __name: "VibeCardBody",
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
- // Shorthand props for quick card creation
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
- headerImage: { type: String, default: void 0 },
431
- headerImageAlt: { type: String, default: "" },
432
- footerImage: { type: String, default: void 0 },
433
- footerImageAlt: { type: String, default: "" }
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: d }) {
437
- const t = e, i = D(), a = c(() => {
438
- const s = ["card"];
439
- return t.variant && s.push(`bg-${t.variant}`), t.border && s.push(`border-${t.border}`), t.textVariant && s.push(`text-${t.textVariant}`), s.join(" ");
440
- }), n = c(() => !!(t.title || t.body || t.header || t.footer || t.headerImage || t.footerImage)), r = c(() => !!(i.default || i.header || i.footer || i.body));
441
- return (s, y) => (l(), V(T(e.tag), {
442
- class: h(a.value)
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: x(() => [
445
- n.value && !r.value ? (l(), o(q, { key: 0 }, [
446
- e.headerImage ? (l(), V(U, {
447
- key: 0,
448
- top: "",
449
- src: e.headerImage,
450
- alt: e.headerImageAlt
451
- }, null, 8, ["src", "alt"])) : u("", !0),
452
- e.header ? (l(), V(J, { key: 1 }, {
453
- default: x(() => [
454
- N(f(e.header), 1)
455
- ]),
456
- _: 1
457
- })) : u("", !0),
458
- e.title || e.body ? (l(), V(Z, { key: 2 }, {
459
- default: x(() => [
460
- e.title ? (l(), V(ee, { key: 0 }, {
461
- default: x(() => [
462
- N(f(e.title), 1)
463
- ]),
464
- _: 1
465
- })) : u("", !0),
466
- e.body ? (l(), V(te, { key: 1 }, {
467
- default: x(() => [
468
- N(f(e.body), 1)
469
- ]),
470
- _: 1
471
- })) : u("", !0)
472
- ]),
473
- _: 1
474
- })) : u("", !0),
475
- e.footer ? (l(), V(_, { key: 3 }, {
476
- default: x(() => [
477
- N(f(e.footer), 1)
478
- ]),
479
- _: 1
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
- }), ze = ["aria-current"], ae = /* @__PURE__ */ p({
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, default: void 0 }
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: d }) {
555
- const t = e, i = d, a = c(() => t.tab && !t.href && !t.to ? "button" : t.href ? "a" : t.to ? "router-link" : "a"), n = c(() => {
556
- const s = ["nav-link"];
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 (s, y) => (l(), o("li", {
562
- class: "nav-item",
563
- role: e.tab ? "presentation" : void 0
564
- }, [
565
- (l(), V(T(a.value), {
566
- class: h(n.value),
567
- href: e.href,
568
- to: e.to,
569
- type: a.value === "button" ? "button" : void 0,
570
- "data-bs-toggle": e.tab ? "tab" : void 0,
571
- "data-bs-target": e.tab && e.target ? e.target : void 0,
572
- role: e.tab ? "tab" : void 0,
573
- "aria-current": e.active ? "page" : void 0,
574
- "aria-disabled": e.disabled,
575
- "aria-selected": e.tab ? e.active : void 0,
576
- onClick: r
577
- }, {
578
- default: x(() => [
579
- $(s.$slots, "default")
580
- ]),
581
- _: 3
582
- }, 8, ["class", "href", "to", "type", "data-bs-toggle", "data-bs-target", "role", "aria-current", "aria-disabled", "aria-selected"]))
583
- ], 8, Oe));
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
- }), De = /* @__PURE__ */ p({
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, default: void 0 }
459
+ items: { type: Array, required: !0 }
595
460
  },
596
- emits: ["component-error"],
597
- setup(e, { emit: d }) {
598
- const t = e, i = D(), a = c(() => {
599
- const n = ["nav"];
600
- return t.tabs && n.push("nav-tabs"), t.pills && n.push("nav-pills"), t.fill && n.push("nav-fill"), t.justified && n.push("nav-justified"), t.vertical && n.push("flex-column"), n.join(" ");
601
- });
602
- return (n, r) => (l(), V(T(e.tag), {
603
- class: h(a.value)
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: x(() => [
606
- e.items && e.items.length > 0 && !L(i).default ? (l(!0), o(q, { key: 0 }, I(e.items, (s, y) => (l(), V(Q, {
607
- key: y,
608
- href: s.href,
609
- to: s.to,
610
- active: s.active,
611
- disabled: s.disabled
612
- }, {
613
- default: x(() => [
614
- N(f(s.text), 1)
615
- ]),
616
- _: 2
617
- }, 1032, ["href", "to", "active", "disabled"]))), 128)) : $(n.$slots, "default", { key: 1 })
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
- }), Xe = /* @__PURE__ */ p({
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: d }) {
633
- const t = e, i = c(() => {
634
- const n = ["navbar"];
635
- return t.expand === !0 ? n.push("navbar-expand") : typeof t.expand == "string" && n.push(`navbar-expand-${t.expand}`), t.variant === "dark" || t.variant === "light" ? n.push(`navbar-${t.variant}`) : n.push(`bg-${t.variant}`), t.position && n.push(t.position), n.join(" ");
636
- }), a = c(() => {
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 (n, r) => (l(), V(T(e.tag), {
641
- class: h(i.value)
521
+ return (o, s) => (i(), M(q(e.tag), {
522
+ class: g(a.value)
642
523
  }, {
643
- default: x(() => [
644
- a.value ? (l(), o("div", {
524
+ default: P(() => [
525
+ l.value ? (i(), n("div", {
645
526
  key: 0,
646
- class: h(a.value)
527
+ class: g(l.value)
647
528
  }, [
648
- $(n.$slots, "default")
649
- ], 2)) : $(n.$slots, "default", { key: 1 })
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
- }), Re = /* @__PURE__ */ p({
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: d }) {
662
- const t = e, i = t.href ? "a" : t.to ? "router-link" : "span";
663
- return (a, n) => (l(), V(T(L(i)), {
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: x(() => [
669
- $(a.$slots, "default")
549
+ default: P(() => [
550
+ V(l.$slots, "default")
670
551
  ]),
671
552
  _: 3
672
553
  }, 8, ["href", "to"]));
673
554
  }
674
- }), Ge = ["data-bs-target", "aria-controls", "aria-label"], Ee = /* @__PURE__ */ p({
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: d }) {
682
- return (t, i) => (l(), o("button", {
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
- }, [...i[0] || (i[0] = [
691
- m("span", { class: "navbar-toggler-icon" }, null, -1)
692
- ])], 8, Ge));
571
+ }, [...a[0] || (a[0] = [
572
+ h("span", { class: "navbar-toggler-icon" }, null, -1)
573
+ ])], 8, je));
693
574
  }
694
- }), Ye = /* @__PURE__ */ p({
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: d }) {
702
- const t = D();
703
- return (i, a) => (l(), V(T(e.tag), { class: "navbar-nav" }, {
704
- default: x(() => [
705
- e.items && e.items.length > 0 && !L(t).default ? (l(!0), o(q, { key: 0 }, I(e.items, (n, r) => (l(), V(Q, {
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
- href: n.href,
708
- to: n.to,
709
- active: n.active,
710
- disabled: n.disabled
711
- }, {
712
- default: x(() => [
713
- N(f(n.text), 1)
714
- ]),
715
- _: 2
716
- }, 1032, ["href", "to", "active", "disabled"]))), 128)) : $(i.$slots, "default", { key: 1 })
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
- }), H = /* @__PURE__ */ p({
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
- // Shorthand props
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: d }) {
766
- const t = e, i = d, a = D(), n = c(() => {
767
- const y = ["pagination"];
768
- return t.size && y.push(`pagination-${t.size}`), y.join(" ");
769
- }), r = c(() => t.totalPages ? Array.from({ length: t.totalPages }, (y, v) => v + 1) : []), s = (y) => {
770
- y >= 1 && y <= t.totalPages && i("page-click", y);
771
- };
772
- return (y, v) => (l(), o("nav", { "aria-label": e.ariaLabel }, [
773
- m("ul", {
774
- class: h(n.value)
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.totalPages && !L(a).default ? (l(), o(q, { key: 0 }, [
777
- e.showPrevNext ? (l(), V(H, {
778
- key: 0,
779
- disabled: e.currentPage === 1,
780
- onClick: v[0] || (v[0] = (b) => s(e.currentPage - 1))
781
- }, {
782
- default: x(() => [...v[2] || (v[2] = [
783
- N(" Previous ", -1)
784
- ])]),
785
- _: 1
786
- }, 8, ["disabled"])) : u("", !0),
787
- (l(!0), o(q, null, I(r.value, (b) => (l(), V(H, {
788
- key: b,
789
- active: b === e.currentPage,
790
- onClick: (g) => s(b)
791
- }, {
792
- default: x(() => [
793
- N(f(b), 1)
794
- ]),
795
- _: 2
796
- }, 1032, ["active", "onClick"]))), 128)),
797
- e.showPrevNext ? (l(), V(H, {
798
- key: 1,
799
- disabled: e.currentPage === e.totalPages,
800
- onClick: v[1] || (v[1] = (b) => s(e.currentPage + 1))
801
- }, {
802
- default: x(() => [...v[3] || (v[3] = [
803
- N(" Next ", -1)
804
- ])]),
805
- _: 1
806
- }, 8, ["disabled"])) : u("", !0)
807
- ], 64)) : $(y.$slots, "default", { key: 1 })
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, He));
692
+ ], 8, Ee));
810
693
  }
811
- }), Qe = /* @__PURE__ */ p({
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: d }) {
819
- return (t, i) => (l(), V(T(e.tag), {
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: x(() => [
824
- $(t.$slots, "default")
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__ */ p({
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, default: void 0 }
739
+ items: { type: Array, required: !0 }
900
740
  },
901
- emits: ["component-error"],
902
- setup(e, { emit: d }) {
903
- const t = e, i = D(), a = c(() => {
904
- const n = ["list-group"];
905
- return t.flush && n.push("list-group-flush"), t.numbered && n.push("list-group-numbered"), t.horizontal === !0 ? n.push("list-group-horizontal") : typeof t.horizontal == "string" && n.push(`list-group-horizontal-${t.horizontal}`), n.join(" ");
906
- });
907
- return (n, r) => (l(), V(T(e.tag), {
908
- class: h(a.value)
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: x(() => [
911
- e.items && e.items.length > 0 && !L(i).default ? (l(!0), o(q, { key: 0 }, I(e.items, (s, y) => (l(), V(le, {
912
- key: y,
913
- href: s.href,
914
- to: s.to,
915
- active: s.active,
916
- disabled: s.disabled,
917
- variant: s.variant
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: x(() => [
920
- N(f(s.text), 1)
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", "active", "disabled", "variant"]))), 128)) : $(n.$slots, "default", { key: 1 })
774
+ }, 1032, ["class", "href", "to", "aria-disabled", "aria-current", "onClick"]))), 128))
924
775
  ]),
925
776
  _: 3
926
777
  }, 8, ["class"]));
927
778
  }
928
- }), Je = /* @__PURE__ */ p({
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: d }) {
935
- const t = e, i = c(() => {
786
+ setup(e, { emit: f }) {
787
+ const t = e, a = y(() => {
936
788
  if (t.height)
937
789
  return { height: t.height };
938
- });
939
- return (a, n) => (l(), o("div", {
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: R(i.value)
799
+ style: D(a.value)
942
800
  }, [
943
- $(a.$slots, "default")
944
- ], 4));
945
- }
946
- }), Ze = ["aria-valuenow", "aria-valuemax"], _e = /* @__PURE__ */ p({
947
- __name: "VibeProgressBar",
948
- props: {
949
- value: { type: Number, default: 0 },
950
- max: { type: Number, default: 100 },
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
- m("div", it, [
1003
- $(a.$slots, "default")
810
+ V(u.$slots, "label", {
811
+ bar: r,
812
+ index: c
813
+ }, () => [
814
+ w(b(s(r)), 1)
1004
815
  ])
1005
- ], 10, lt)
1006
- ]));
816
+ ], 14, Ue))), 128))
817
+ ], 4));
1007
818
  }
1008
- }), nt = ["id"], ot = /* @__PURE__ */ p({
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, default: void 0 }
824
+ items: { type: Array, required: !0 }
1014
825
  },
1015
- emits: ["component-error"],
1016
- setup(e, { emit: d }) {
1017
- const t = D();
1018
- return (i, a) => (l(), o("div", {
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: h(["accordion", { "accordion-flush": e.flush }])
833
+ class: g(["accordion", { "accordion-flush": e.flush }])
1021
834
  }, [
1022
- e.items && e.items.length > 0 && !L(t).default ? (l(!0), o(q, { key: 0 }, I(e.items, (n, r) => (l(), V(ie, {
1023
- key: r,
1024
- id: n.id,
1025
- "parent-id": e.id,
1026
- title: n.title,
1027
- show: n.show
1028
- }, {
1029
- default: x(() => [
1030
- N(f(n.content), 1)
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
- _: 2
1033
- }, 1032, ["id", "parent-id", "title", "show"]))), 128)) : $(i.$slots, "default", { key: 1 })
1034
- ], 10, nt));
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
- }), st = /* @__PURE__ */ p({
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: d }) {
1046
- const t = e, i = F(t.modelValue);
1047
- O(() => t.modelValue, (n) => {
1048
- i.value = n;
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 a = c(() => {
1051
- const n = ["collapse"];
1052
- return t.horizontal && n.push("collapse-horizontal"), i.value && n.push("show"), n.join(" ");
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 (n, r) => (l(), V(T(e.tag), {
892
+ return (o, s) => (i(), M(q(e.tag), {
1055
893
  id: e.id,
1056
- class: h(a.value)
894
+ class: g(l.value)
1057
895
  }, {
1058
- default: x(() => [
1059
- $(n.$slots, "default")
896
+ default: P(() => [
897
+ V(o.$slots, "default")
1060
898
  ]),
1061
899
  _: 3
1062
900
  }, 8, ["id", "class"]));
1063
901
  }
1064
- }), dt = { key: 0 }, ne = /* @__PURE__ */ p({
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, default: void 0 }
912
+ items: { type: Array, required: !0 }
1119
913
  },
1120
- emits: ["component-error"],
1121
- setup(e, { emit: d }) {
1122
- const t = e, i = D(), a = c(() => t.direction === "up" ? "dropup" : t.direction === "end" ? "dropend" : t.direction === "start" ? "dropstart" : "dropdown"), n = c(() => {
1123
- const s = ["btn", `btn-${t.variant}`];
1124
- return t.size && s.push(`btn-${t.size}`), s.join(" ");
1125
- }), r = c(() => {
1126
- const s = ["dropdown-menu"];
1127
- return t.menuEnd && s.push("dropdown-menu-end"), s.join(" ");
1128
- });
1129
- return (s, y) => (l(), o("div", {
1130
- class: h(a.value)
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
- m("button", {
931
+ h("button", {
1133
932
  id: e.id,
1134
- class: h([n.value, "dropdown-toggle"]),
933
+ class: g([o.value, "dropdown-toggle"]),
1135
934
  type: "button",
1136
935
  "data-bs-toggle": "dropdown",
1137
936
  "aria-expanded": "false"
1138
- }, f(e.text), 11, rt),
1139
- m("ul", {
1140
- class: h(r.value),
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
- e.items && e.items.length > 0 && !L(i).default ? (l(!0), o(q, { key: 0 }, I(e.items, (v, b) => (l(), V(ne, {
1144
- key: b,
1145
- href: v.href,
1146
- to: v.to,
1147
- active: v.active,
1148
- disabled: v.disabled,
1149
- divider: v.divider,
1150
- header: v.header
1151
- }, {
1152
- default: x(() => [
1153
- N(f(v.text), 1)
1154
- ]),
1155
- _: 2
1156
- }, 1032, ["href", "to", "active", "disabled", "divider", "header"]))), 128)) : $(s.$slots, "default", { key: 1 })
1157
- ], 10, ut)
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
- }), ft = ["id", "aria-labelledby", "data-bs-backdrop", "data-bs-keyboard"], vt = { class: "modal-content" }, bt = {
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
- }, mt = ["id"], yt = { class: "modal-body" }, ht = {
985
+ }, vt = ["id"], bt = { class: "modal-body" }, mt = {
1164
986
  key: 1,
1165
987
  class: "modal-footer"
1166
- }, gt = /* @__PURE__ */ p({
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: d }) {
1182
- const t = e, i = c(() => {
1183
- const a = ["modal-dialog"];
1184
- return t.size && a.push(`modal-${t.size}`), t.centered && a.push("modal-dialog-centered"), t.scrollable && a.push("modal-dialog-scrollable"), t.fullscreen === !0 ? a.push("modal-fullscreen") : typeof t.fullscreen == "string" && a.push(`modal-fullscreen-${t.fullscreen}-down`), a.join(" ");
1185
- });
1186
- return (a, n) => (l(), o("div", {
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": "true",
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
- m("div", {
1196
- class: h(i.value)
1042
+ h("div", {
1043
+ class: g(u.value)
1197
1044
  }, [
1198
- m("div", vt, [
1199
- e.hideHeader ? u("", !0) : (l(), o("div", bt, [
1200
- m("h5", {
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
- $(a.$slots, "header", {}, () => [
1205
- N(f(e.title), 1)
1051
+ V(p.$slots, "header", {}, () => [
1052
+ w(b(e.title), 1)
1206
1053
  ])
1207
- ], 8, mt),
1208
- n[0] || (n[0] = m("button", {
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
- m("div", yt, [
1216
- $(a.$slots, "default")
1062
+ h("div", bt, [
1063
+ V(p.$slots, "default")
1217
1064
  ]),
1218
- e.hideFooter ? u("", !0) : (l(), o("div", ht, [
1219
- $(a.$slots, "footer", {}, () => [
1220
- n[1] || (n[1] = m("button", {
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, ft));
1076
+ ], 8, ut));
1230
1077
  }
1231
- }), pt = ["id", "aria-labelledby", "data-bs-backdrop", "data-bs-scroll"], $t = { class: "offcanvas-header" }, kt = ["id"], St = { class: "offcanvas-body" }, Vt = /* @__PURE__ */ p({
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: d }) {
1243
- const t = e, i = c(() => `offcanvas offcanvas-${t.placement}`);
1244
- return (a, n) => (l(), o("div", {
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: h(i.value),
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
- m("div", $t, [
1253
- m("h5", {
1099
+ h("div", gt, [
1100
+ h("h5", {
1254
1101
  id: `${e.id}-label`,
1255
1102
  class: "offcanvas-title"
1256
1103
  }, [
1257
- $(a.$slots, "header", {}, () => [
1258
- N(f(e.title), 1)
1104
+ V(l.$slots, "header", {}, () => [
1105
+ w(b(e.title), 1)
1259
1106
  ])
1260
- ], 8, kt),
1261
- n[0] || (n[0] = m("button", {
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
- m("div", St, [
1269
- $(a.$slots, "default")
1115
+ h("div", $t, [
1116
+ V(l.$slots, "default")
1270
1117
  ])
1271
- ], 10, pt));
1118
+ ], 10, yt));
1272
1119
  }
1273
- }), xt = ["id", "data-bs-autohide", "data-bs-delay"], Ct = {
1120
+ }), St = ["id", "data-bs-autohide", "data-bs-delay"], Vt = {
1274
1121
  key: 0,
1275
1122
  class: "toast-header"
1276
- }, Bt = { class: "me-auto" }, wt = { class: "toast-body" }, Nt = /* @__PURE__ */ p({
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: d }) {
1288
- const t = e, i = c(() => {
1289
- const a = ["toast"];
1290
- return t.variant && a.push(`text-bg-${t.variant}`), a.join(" ");
1291
- });
1292
- return (a, n) => (l(), o("div", {
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: h(i.value),
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 || a.$slots.header ? (l(), o("div", Ct, [
1302
- $(a.$slots, "header", {}, () => [
1303
- m("strong", Bt, f(e.title), 1)
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
- n[0] || (n[0] = m("button", {
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
- ])) : u("", !0),
1312
- m("div", wt, [
1313
- $(a.$slots, "default")
1183
+ ])) : v("", !0),
1184
+ h("div", xt, [
1185
+ V(p.$slots, "default")
1314
1186
  ])
1315
- ], 10, xt));
1187
+ ], 10, St));
1316
1188
  }
1317
- }), Tt = ["data-bs-interval"], Mt = ["src", "alt"], Pt = {
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
- }, At = ["data-bs-target", "data-bs-slide-to", "aria-current", "aria-label"], jt = { class: "carousel-inner" }, Lt = {
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-indicators"
1358
- }, Ot = { class: "carousel-inner" }, Dt = ["data-bs-target"], Xt = ["data-bs-target"], Rt = /* @__PURE__ */ p({
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, default: void 0 }
1209
+ items: { type: Array, required: !0 }
1373
1210
  },
1374
1211
  emits: ["slide", "slid", "component-error"],
1375
- setup(e, { emit: d }) {
1376
- const t = D();
1377
- return (i, a) => (l(), o("div", {
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: h(["carousel", "slide", { "carousel-dark": e.dark, "carousel-fade": e.fade }]),
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.items && e.items.length > 0 && !L(t).default ? (l(), o(q, { key: 0 }, [
1388
- e.indicators ? (l(), o("div", zt, [
1389
- (l(!0), o(q, null, I(e.items, (n, r) => (l(), o("button", {
1390
- key: `indicator-${r}`,
1391
- type: "button",
1392
- "data-bs-target": `#${e.id}`,
1393
- "data-bs-slide-to": r,
1394
- class: h({ active: n.active || r === 0 }),
1395
- "aria-current": n.active || r === 0,
1396
- "aria-label": `Slide ${r + 1}`
1397
- }, null, 10, At))), 128))
1398
- ])) : u("", !0),
1399
- m("div", jt, [
1400
- (l(!0), o(q, null, I(e.items, (n, r) => (l(), V(oe, {
1401
- key: r,
1402
- active: n.active || r === 0,
1403
- interval: n.interval,
1404
- "img-src": n.src,
1405
- "img-alt": n.alt,
1406
- caption: n.caption,
1407
- "caption-text": n.captionText
1408
- }, null, 8, ["active", "interval", "img-src", "img-alt", "caption", "caption-text"]))), 128))
1409
- ])
1410
- ], 64)) : (l(), o(q, { key: 1 }, [
1411
- e.indicators ? (l(), o("div", Lt, [
1412
- $(i.$slots, "indicators")
1413
- ])) : u("", !0),
1414
- m("div", Ot, [
1415
- $(i.$slots, "default")
1416
- ])
1417
- ], 64)),
1418
- e.controls ? (l(), o("button", {
1419
- key: 2,
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
- }, [...a[0] || (a[0] = [
1425
- m("span", {
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
- m("span", { class: "visually-hidden" }, "Previous", -1)
1430
- ])], 8, Dt)) : u("", !0),
1431
- e.controls ? (l(), o("button", {
1432
- key: 3,
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
- }, [...a[1] || (a[1] = [
1438
- m("span", {
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
- m("span", { class: "visually-hidden" }, "Next", -1)
1443
- ])], 8, Xt)) : u("", !0)
1444
- ], 10, It));
1285
+ h("span", { class: "visually-hidden" }, "Next", -1)
1286
+ ])], 8, jt)) : v("", !0)
1287
+ ], 10, Bt));
1445
1288
  }
1446
- }), Gt = ["data-bs-placement", "data-bs-title", "data-bs-trigger", "data-bs-html"], Et = /* @__PURE__ */ p({
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: d }) {
1456
- return (t, i) => (l(), o("span", {
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
- $(t.$slots, "default")
1464
- ], 8, Gt));
1306
+ V(t.$slots, "default")
1307
+ ], 8, Ot));
1465
1308
  }
1466
- }), Yt = ["data-bs-placement", "data-bs-title", "data-bs-content", "data-bs-trigger", "data-bs-html"], Ht = /* @__PURE__ */ p({
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: d }) {
1477
- return (t, i) => (l(), o("span", {
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
- $(t.$slots, "default")
1486
- ], 8, Yt));
1328
+ V(t.$slots, "default")
1329
+ ], 8, Dt));
1487
1330
  }
1488
- }), Ut = /* @__PURE__ */ p({
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: d }) {
1499
- return (t, i) => (l(), V(T(e.tag), {
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: x(() => [
1508
- $(t.$slots, "default")
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
- }), Qt = /* @__PURE__ */ p({
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: d }) {
1533
- const t = e, i = d, a = c(() => {
1534
- const s = ["bi", `bi-${t.icon}`];
1535
- return t.size && (["1x", "2x", "3x", "4x", "5x"].includes(t.size) || s.push(`bi-${t.size}`)), t.customClass && s.push(t.customClass), s.join(" ");
1536
- }), n = c(() => {
1537
- const s = {};
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
- s.fontSize = t.fontSize;
1382
+ u.fontSize = t.fontSize;
1540
1383
  else if (t.size) {
1541
- const v = {
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
- v[t.size] && (s.fontSize = v[t.size]);
1391
+ r[t.size] && (u.fontSize = r[t.size]);
1549
1392
  }
1550
- t.color && (s.color = t.color);
1551
- const y = [];
1552
- return t.flipH && y.push("scaleX(-1)"), t.flipV && y.push("scaleY(-1)"), t.rotate && y.push(`rotate(${t.rotate}deg)`), y.length > 0 && (s.transform = y.join(" "), s.display = "inline-block"), Object.keys(s).length > 0 ? s : void 0;
1553
- }), r = (s) => {
1554
- i("click", s);
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 (s, y) => (l(), o("i", {
1557
- class: h(a.value),
1558
- style: R(n.value),
1399
+ return (u, d) => (i(), n("i", {
1400
+ class: g(l.value),
1401
+ style: D(o.value),
1559
1402
  "aria-hidden": !0,
1560
- onClick: r
1403
+ onClick: s
1561
1404
  }, null, 6));
1562
1405
  }
1563
- }), Kt = { class: "vibe-datatable" }, Wt = { class: "row mb-3" }, Jt = {
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
- }, Zt = ["placeholder"], _t = {
1409
+ }, Ut = ["placeholder"], Qt = {
1567
1410
  key: 1,
1568
1411
  class: "col-md-6"
1569
- }, ea = { class: "d-flex justify-content-md-end align-items-center" }, ta = ["value"], aa = ["onClick"], la = {
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
- }, ia = ["onClick"], na = { key: 0 }, oa = ["colspan"], sa = { class: "row" }, da = {
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
- }, ra = { class: "datatable-info" }, ua = {
1418
+ }, na = { class: "datatable-info" }, sa = {
1576
1419
  key: 1,
1577
1420
  class: "col-md-6"
1578
- }, ca = { class: "pagination justify-content-md-end mb-0" }, fa = {
1421
+ }, oa = { class: "pagination justify-content-md-end mb-0" }, da = {
1579
1422
  key: 0,
1580
1423
  class: "page-item"
1581
- }, va = {
1424
+ }, ra = {
1582
1425
  key: 1,
1583
1426
  class: "page-item disabled"
1584
- }, ba = ["onClick"], ma = {
1427
+ }, ua = ["onClick"], ca = {
1585
1428
  key: 2,
1586
1429
  class: "page-item disabled"
1587
- }, ya = {
1430
+ }, fa = {
1588
1431
  key: 3,
1589
1432
  class: "page-item"
1590
- }, ha = /* @__PURE__ */ p({
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
- emits: ["update:currentPage", "update:perPage", "update:sortBy", "update:sortDesc", "row-clicked", "component-error"],
1627
- setup(e, { emit: d }) {
1628
- const t = e, i = d, a = F(""), n = F(null), r = F(""), s = F(t.currentPage), y = F(t.perPage), v = F(t.sortBy), b = F(t.sortDesc);
1629
- O(() => t.currentPage, (S) => {
1630
- s.value = S;
1631
- }), O(() => t.perPage, (S) => {
1632
- y.value = S;
1633
- }), O(() => t.sortBy, (S) => {
1634
- v.value = S;
1635
- }), O(() => t.sortDesc, (S) => {
1636
- b.value = S;
1637
- }), O(a, (S) => {
1638
- n.value && clearTimeout(n.value), n.value = window.setTimeout(() => {
1639
- r.value = S, s.value = 1;
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 g = c(() => {
1643
- if (!t.searchable || !r.value)
1484
+ const p = y(() => {
1485
+ if (!t.searchable || !c.value)
1644
1486
  return t.items;
1645
- const S = r.value.toLowerCase();
1646
- return t.items.filter((w) => t.columns.some((C) => {
1647
- if (C.searchable === !1) return !1;
1648
- const j = w[C.key];
1649
- return j == null ? !1 : String(j).toLowerCase().includes(S);
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
- }), k = c(() => {
1652
- if (!t.sortable || !v.value)
1653
- return g.value;
1654
- const S = [...g.value], w = v.value;
1655
- return S.sort((C, j) => {
1656
- let z = C[w], G = j[w];
1657
- return z == null ? 1 : G == null ? -1 : (typeof z == "string" && (z = z.toLowerCase()), typeof G == "string" && (G = G.toLowerCase()), z < G ? b.value ? 1 : -1 : z > G ? b.value ? -1 : 1 : 0);
1658
- }), S;
1659
- }), M = c(() => {
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 k.value;
1662
- const S = (s.value - 1) * y.value, w = S + y.value;
1663
- return k.value.slice(S, w);
1664
- }), A = c(() => t.items.length), B = c(() => g.value.length), P = c(() => Math.ceil(B.value / y.value)), X = c(() => B.value === 0 ? 0 : (s.value - 1) * y.value + 1), se = c(() => {
1665
- const S = s.value * y.value;
1666
- return Math.min(S, B.value);
1667
- }), de = c(() => (B.value !== A.value ? t.filteredInfoText : t.infoText).replace("{start}", String(X.value)).replace("{end}", String(se.value)).replace("{total}", String(B.value)).replace("{totalRows}", String(A.value))), re = c(() => {
1668
- const S = ["table"];
1669
- return t.striped && S.push("table-striped"), t.bordered && S.push("table-bordered"), t.borderless && S.push("table-borderless"), t.hover && S.push("table-hover"), t.small && S.push("table-sm"), t.variant && S.push(`table-${t.variant}`), S.join(" ");
1670
- }), ue = (S) => {
1671
- !t.sortable || S.sortable === !1 || (v.value === S.key ? b.value = !b.value : (v.value = S.key, b.value = !1), i("update:sortBy", v.value), i("update:sortDesc", b.value));
1672
- }, E = (S) => {
1673
- S < 1 || S > P.value || (s.value = S, i("update:currentPage", S));
1674
- }, ce = () => {
1675
- s.value = 1, i("update:perPage", y.value), i("update:currentPage", 1);
1676
- }, fe = (S, w) => {
1677
- i("row-clicked", S, w);
1678
- }, ve = (S, w) => {
1679
- const C = S[w.key];
1680
- return w.formatter ? w.formatter(C, S) : C;
1681
- }, be = (S) => !t.sortable || S.sortable === !1 ? "" : v.value !== S.key ? "⇅" : b.value ? "↓" : "↑", me = (S) => {
1682
- const w = { ...S.thStyle };
1683
- return t.sortable && S.sortable !== !1 && (w.cursor = "pointer"), w;
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 (S, w) => (l(), o("div", Kt, [
1686
- m("div", Wt, [
1687
- e.searchable ? (l(), o("div", Jt, [
1688
- W(m("input", {
1689
- "onUpdate:modelValue": w[0] || (w[0] = (C) => a.value = C),
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, Zt), [
1694
- [ye, a.value]
1548
+ }, null, 8, Ut), [
1549
+ [oe, d.value]
1695
1550
  ])
1696
- ])) : u("", !0),
1697
- e.showPerPage && e.paginated ? (l(), o("div", _t, [
1698
- m("div", ea, [
1699
- w[6] || (w[6] = m("label", { class: "me-2 mb-0" }, "Show", -1)),
1700
- W(m("select", {
1701
- "onUpdate:modelValue": w[1] || (w[1] = (C) => y.value = C),
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: ce
1559
+ onChange: te
1705
1560
  }, [
1706
- (l(!0), o(q, null, I(e.perPageOptions, (C) => (l(), o("option", {
1707
- key: C,
1708
- value: C
1709
- }, f(C), 9, ta))), 128))
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
- he,
1713
- y.value,
1567
+ de,
1568
+ l.value,
1714
1569
  void 0,
1715
1570
  { number: !0 }
1716
1571
  ]
1717
1572
  ]),
1718
- w[7] || (w[7] = m("span", { class: "ms-2" }, "entries", -1))
1573
+ k[7] || (k[7] = h("span", { class: "ms-2" }, "entries", -1))
1719
1574
  ])
1720
- ])) : u("", !0)
1575
+ ])) : v("", !0)
1721
1576
  ]),
1722
- m("div", {
1723
- class: h({ "table-responsive": e.responsive })
1577
+ h("div", {
1578
+ class: g({ "table-responsive": e.responsive })
1724
1579
  }, [
1725
- m("table", {
1726
- class: h(re.value)
1580
+ h("table", {
1581
+ class: g(_.value)
1727
1582
  }, [
1728
- m("thead", null, [
1729
- m("tr", null, [
1730
- (l(!0), o(q, null, I(e.columns, (C) => (l(), o("th", {
1731
- key: C.key,
1732
- class: h(C.headerClass),
1733
- style: R(me(C)),
1734
- onClick: (j) => ue(C)
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
- N(f(C.label) + " ", 1),
1737
- e.sortable && C.sortable !== !1 ? (l(), o("span", la, f(be(C)), 1)) : u("", !0)
1738
- ], 14, aa))), 128))
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
- m("tbody", null, [
1742
- (l(!0), o(q, null, I(M.value, (C, j) => (l(), o("tr", {
1743
- key: j,
1744
- onClick: (z) => fe(C, j),
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
- (l(!0), o(q, null, I(e.columns, (z) => (l(), o("td", {
1748
- key: z.key,
1749
- class: h(z.class),
1750
- style: R(z.tdStyle)
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
- $(S.$slots, `cell(${z.key})`, {
1753
- item: C,
1754
- value: C[z.key],
1755
- index: j
1607
+ V($.$slots, `cell(${I.key})`, {
1608
+ item: S,
1609
+ value: S[I.key],
1610
+ index: L
1756
1611
  }, () => [
1757
- N(f(ve(C, z)), 1)
1612
+ w(b(le(S, I)), 1)
1758
1613
  ], !0)
1759
1614
  ], 6))), 128))
1760
- ], 8, ia))), 128)),
1761
- M.value.length === 0 && e.showEmpty ? (l(), o("tr", na, [
1762
- m("td", {
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
- }, f(e.emptyText), 9, oa)
1766
- ])) : u("", !0)
1620
+ }, b(e.emptyText), 9, aa)
1621
+ ])) : v("", !0)
1767
1622
  ])
1768
1623
  ], 2)
1769
1624
  ], 2),
1770
- m("div", sa, [
1771
- e.showInfo ? (l(), o("div", da, [
1772
- m("div", ra, f(de.value), 1)
1773
- ])) : u("", !0),
1774
- e.paginated && P.value > 1 ? (l(), o("div", ua, [
1775
- m("nav", null, [
1776
- m("ul", ca, [
1777
- m("li", {
1778
- class: h(["page-item", { disabled: s.value === 1 }])
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
- m("a", {
1635
+ h("a", {
1781
1636
  class: "page-link",
1782
1637
  href: "#",
1783
- onClick: w[2] || (w[2] = Y((C) => E(s.value - 1), ["prevent"]))
1638
+ onClick: k[2] || (k[2] = X((S) => R(a.value - 1), ["prevent"]))
1784
1639
  }, " Previous ")
1785
1640
  ], 2),
1786
- s.value > 3 ? (l(), o("li", fa, [
1787
- m("a", {
1641
+ a.value > 3 ? (i(), n("li", da, [
1642
+ h("a", {
1788
1643
  class: "page-link",
1789
1644
  href: "#",
1790
- onClick: w[3] || (w[3] = Y((C) => E(1), ["prevent"]))
1645
+ onClick: k[3] || (k[3] = X((S) => R(1), ["prevent"]))
1791
1646
  }, "1")
1792
- ])) : u("", !0),
1793
- s.value > 4 ? (l(), o("li", va, [...w[8] || (w[8] = [
1794
- m("span", { class: "page-link" }, "...", -1)
1795
- ])])) : u("", !0),
1796
- (l(!0), o(q, null, I(Array.from({ length: P.value }, (C, j) => j + 1).filter(
1797
- (C) => C >= s.value - 2 && C <= s.value + 2
1798
- ), (C) => (l(), o("li", {
1799
- key: C,
1800
- class: h(["page-item", { active: C === s.value }])
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
- m("a", {
1657
+ h("a", {
1803
1658
  class: "page-link",
1804
1659
  href: "#",
1805
- onClick: Y((j) => E(C), ["prevent"])
1806
- }, f(C), 9, ba)
1660
+ onClick: X((L) => R(S), ["prevent"])
1661
+ }, b(S), 9, ua)
1807
1662
  ], 2))), 128)),
1808
- s.value < P.value - 3 ? (l(), o("li", ma, [...w[9] || (w[9] = [
1809
- m("span", { class: "page-link" }, "...", -1)
1810
- ])])) : u("", !0),
1811
- s.value < P.value - 2 ? (l(), o("li", ya, [
1812
- m("a", {
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: w[4] || (w[4] = Y((C) => E(P.value), ["prevent"]))
1816
- }, f(P.value), 1)
1817
- ])) : u("", !0),
1818
- m("li", {
1819
- class: h(["page-item", { disabled: s.value === P.value }])
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
- m("a", {
1676
+ h("a", {
1822
1677
  class: "page-link",
1823
1678
  href: "#",
1824
- onClick: w[5] || (w[5] = Y((C) => E(s.value + 1), ["prevent"]))
1679
+ onClick: k[5] || (k[5] = X((S) => R(a.value + 1), ["prevent"]))
1825
1680
  }, " Next ")
1826
1681
  ], 2)
1827
1682
  ])
1828
1683
  ])
1829
- ])) : u("", !0)
1684
+ ])) : v("", !0)
1830
1685
  ])
1831
1686
  ]));
1832
1687
  }
1833
- }), K = (e, d) => {
1688
+ }), Q = (e, f) => {
1834
1689
  const t = e.__vccOpts || e;
1835
- for (const [i, a] of d)
1836
- t[i] = a;
1690
+ for (const [a, l] of f)
1691
+ t[a] = l;
1837
1692
  return t;
1838
- }, ga = /* @__PURE__ */ K(ha, [["__scopeId", "data-v-48221c7b"]]), pa = { class: "mb-3" }, $a = ["for"], ka = {
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
- }, Sa = ["id", "type", "value", "placeholder", "disabled", "readonly", "required", "aria-invalid", "aria-describedby"], Va = ["id"], xa = {
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
- }, Ca = ["id"], Ba = /* @__PURE__ */ p({
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: d }) {
1870
- const t = e, i = d, a = c(() => t.validationState), n = c(() => {
1871
- const b = [];
1872
- return t.plaintext ? b.push("form-control-plaintext") : (b.push("form-control"), t.size && b.push(`form-control-${t.size}`)), a.value === "valid" && b.push("is-valid"), a.value === "invalid" && b.push("is-invalid"), b.join(" ");
1873
- }), r = (b) => {
1874
- const g = b.target, k = t.type === "number" ? g.value === "" ? "" : Number(g.value) : g.value;
1875
- i("update:modelValue", k), i("input", b), t.validateOn === "input" && i("validate");
1876
- }, s = (b) => {
1877
- i("change", b), t.validateOn === "change" && i("validate");
1878
- }, y = (b) => {
1879
- i("blur", b), t.validateOn === "blur" && i("validate");
1880
- }, v = (b) => {
1881
- i("focus", b);
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 (b, g) => (l(), o("div", pa, [
1884
- e.label ? (l(), o("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
- N(f(e.label) + " ", 1),
1890
- e.required ? (l(), o("span", ka, "*")) : u("", !0)
1891
- ], 8, $a)) : u("", !0),
1892
- m("input", {
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: h(n.value),
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": a.value === "invalid",
1755
+ "aria-invalid": e.validationState === "invalid",
1902
1756
  "aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
1903
- onInput: r,
1757
+ onInput: o,
1904
1758
  onChange: s,
1905
- onBlur: y,
1906
- onFocus: v
1907
- }, null, 42, Sa),
1908
- e.helpText && !e.validationMessage ? (l(), o("div", {
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
- }, f(e.helpText), 9, Va)) : u("", !0),
1913
- a.value === "valid" ? (l(), o("div", xa, f(e.validationMessage || "Looks good!"), 1)) : u("", !0),
1914
- a.value === "invalid" ? (l(), o("div", {
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
- }, f(e.validationMessage || "Please provide a valid value."), 9, Ca)) : u("", !0)
1773
+ }, b(e.validationMessage || "Please provide a valid value."), 9, ka)) : v("", !0)
1920
1774
  ]));
1921
1775
  }
1922
- }), wa = { class: "mb-3" }, Na = ["for"], Ta = {
1776
+ }), Va = { class: "mb-3" }, Ca = ["for"], xa = {
1923
1777
  key: 0,
1924
1778
  class: "text-danger"
1925
- }, Ma = ["id", "value", "disabled", "required", "multiple", "size", "aria-invalid", "aria-describedby"], Pa = ["selected"], qa = ["value", "disabled"], Fa = ["id"], Ia = {
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
- }, za = ["id"], Aa = /* @__PURE__ */ p({
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: d }) {
1954
- const t = e, i = d, a = c(() => t.validationState), n = c(() => {
1955
- const v = ["form-select"];
1956
- return t.size && v.push(`form-select-${t.size}`), a.value === "valid" && v.push("is-valid"), a.value === "invalid" && v.push("is-invalid"), v.join(" ");
1957
- }), r = (v) => {
1958
- const b = v.target;
1959
- let g;
1960
- t.multiple ? g = Array.from(b.selectedOptions).map((M) => M.value) : g = b.value, i("update:modelValue", g), i("change", v), t.validateOn === "change" && i("validate");
1961
- }, s = (v) => {
1962
- i("blur", v), t.validateOn === "blur" && i("validate");
1963
- }, y = (v) => {
1964
- i("focus", v);
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 (v, b) => (l(), o("div", wa, [
1967
- e.label ? (l(), o("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
- N(f(e.label) + " ", 1),
1973
- e.required ? (l(), o("span", Ta, "*")) : u("", !0)
1974
- ], 8, Na)) : u("", !0),
1975
- m("select", {
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: h(n.value),
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": a.value === "invalid",
1837
+ "aria-invalid": e.validationState === "invalid",
1984
1838
  "aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
1985
- onChange: r,
1839
+ onChange: o,
1986
1840
  onBlur: s,
1987
- onFocus: y
1841
+ onFocus: u
1988
1842
  }, [
1989
- e.placeholder && !e.multiple ? (l(), o("option", {
1843
+ e.placeholder && !e.multiple ? (i(), n("option", {
1990
1844
  key: 0,
1991
1845
  value: "",
1992
1846
  disabled: "",
1993
1847
  selected: !e.modelValue
1994
- }, f(e.placeholder), 9, Pa)) : u("", !0),
1995
- (l(!0), o(q, null, I(e.options, (g) => (l(), o("option", {
1996
- key: g.value,
1997
- value: g.value,
1998
- disabled: g.disabled
1999
- }, f(g.text), 9, qa))), 128)),
2000
- $(v.$slots, "default")
2001
- ], 42, Ma),
2002
- e.helpText && !e.validationMessage ? (l(), o("div", {
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
- }, f(e.helpText), 9, Fa)) : u("", !0),
2007
- a.value === "valid" ? (l(), o("div", Ia, f(e.validationMessage || "Looks good!"), 1)) : u("", !0),
2008
- a.value === "invalid" ? (l(), o("div", {
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
- }, f(e.validationMessage || "Please select a valid option."), 9, za)) : u("", !0)
1867
+ }, b(e.validationMessage || "Please select a valid option."), 9, qa)) : v("", !0)
2014
1868
  ]));
2015
1869
  }
2016
- }), ja = { class: "mb-3" }, La = ["for"], Oa = {
1870
+ }), Fa = { class: "mb-3" }, La = ["for"], za = {
2017
1871
  key: 0,
2018
1872
  class: "text-danger"
2019
- }, Da = ["id", "value", "placeholder", "disabled", "readonly", "required", "rows", "maxlength", "aria-invalid", "aria-describedby"], Xa = {
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
- }, Ra = ["id"], Ga = {
1876
+ }, Ia = ["id"], Oa = {
2023
1877
  key: 3,
2024
1878
  class: "valid-feedback",
2025
1879
  style: { display: "block" }
2026
- }, Ea = ["id"], Ya = /* @__PURE__ */ p({
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: d }) {
2052
- const t = e, i = d, a = c(() => t.validationState), n = c(() => {
2053
- const k = ["form-control"];
2054
- return t.size && k.push(`form-control-${t.size}`), a.value === "valid" && k.push("is-valid"), a.value === "invalid" && k.push("is-invalid"), k.join(" ");
2055
- }), r = c(() => {
2056
- const k = typeof t.modelValue == "string" ? t.modelValue : "";
2057
- return k ? k.length : 0;
2058
- }), s = c(() => t.maxlength ? `${r.value} / ${t.maxlength}` : `${r.value}`), y = (k) => {
2059
- const M = k.target;
2060
- i("update:modelValue", M.value), i("input", k), t.validateOn === "input" && i("validate");
2061
- }, v = (k) => {
2062
- i("change", k), t.validateOn === "change" && i("validate");
2063
- }, b = (k) => {
2064
- i("blur", k), t.validateOn === "blur" && i("validate");
2065
- }, g = (k) => {
2066
- i("focus", k);
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 (k, M) => (l(), o("div", ja, [
2069
- e.label ? (l(), o("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
- N(f(e.label) + " ", 1),
2075
- e.required ? (l(), o("span", Oa, "*")) : u("", !0)
2076
- ], 8, La)) : u("", !0),
2077
- m("textarea", {
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: h(n.value),
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": a.value === "invalid",
1941
+ "aria-invalid": e.validationState === "invalid",
2088
1942
  "aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
2089
- onInput: y,
2090
- onChange: v,
2091
- onBlur: b,
2092
- onFocus: g
2093
- }, null, 42, Da),
2094
- e.showCharCount ? (l(), o("div", Xa, f(s.value), 1)) : u("", !0),
2095
- e.helpText && !e.validationMessage && !e.showCharCount ? (l(), o("div", {
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
- }, f(e.helpText), 9, Ra)) : u("", !0),
2100
- a.value === "valid" ? (l(), o("div", Ga, f(e.validationMessage || "Looks good!"), 1)) : u("", !0),
2101
- a.value === "invalid" ? (l(), o("div", {
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
- }, f(e.validationMessage || "Please provide a valid value."), 9, Ea)) : u("", !0)
1960
+ }, b(e.validationMessage || "Please provide a valid value."), 9, Ea)) : v("", !0)
2107
1961
  ]));
2108
1962
  }
2109
- }), Ha = { class: "mb-3" }, Ua = ["for"], Qa = {
1963
+ }), Ra = { class: "mb-3" }, Xa = ["for"], Ya = {
2110
1964
  key: 0,
2111
1965
  class: "text-danger"
2112
- }, Ka = ["disabled"], Wa = ["id", "value", "disabled", "readonly", "required", "min", "max", "step", "aria-invalid", "aria-describedby"], Ja = ["disabled"], Za = ["id"], _a = {
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
- }, el = ["id"], tl = /* @__PURE__ */ p({
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: d }) {
2143
- const t = e, i = d, a = c(() => t.validationState), n = c(() => {
2144
- const B = ["form-control"];
2145
- return t.size && B.push(`form-control-${t.size}`), a.value === "valid" && B.push("is-valid"), a.value === "invalid" && B.push("is-invalid"), B.join(" ");
2146
- }), r = c(() => {
2147
- const B = ["input-group"];
2148
- return t.size && B.push(`input-group-${t.size}`), t.vertical && B.push("input-group-vertical"), B.join(" ");
2149
- }), s = c(() => t.disabled || t.readonly ? !1 : t.min === void 0 || t.wrap ? !0 : t.modelValue > t.min), y = c(() => t.disabled || t.readonly ? !1 : t.max === void 0 || t.wrap ? !0 : t.modelValue < t.max), v = (B) => {
2150
- const P = B.target;
2151
- let X = P.value === "" ? 0 : Number(P.value);
2152
- t.min !== void 0 && X < t.min && (X = t.min), t.max !== void 0 && X > t.max && (X = t.max), i("update:modelValue", X), i("input", B), t.validateOn === "input" && i("validate");
2153
- }, b = (B) => {
2154
- i("change", B), t.validateOn === "change" && i("validate");
2155
- }, g = (B) => {
2156
- i("blur", B), t.validateOn === "blur" && i("validate");
2157
- }, k = (B) => {
2158
- i("focus", B);
2159
- }, M = () => {
2160
- if (!y.value) return;
2161
- let B = t.modelValue + t.step;
2162
- t.max !== void 0 && B > t.max && (B = t.wrap ? t.min ?? 0 : t.max), i("update:modelValue", B), i("increment", B), t.validateOn === "change" && i("validate");
2163
- }, A = () => {
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 B = t.modelValue - t.step;
2166
- t.min !== void 0 && B < t.min && (B = t.wrap ? t.max ?? 0 : t.min), i("update:modelValue", B), i("decrement", B), t.validateOn === "change" && i("validate");
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 (B, P) => (l(), o("div", Ha, [
2169
- e.label ? (l(), o("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
- N(f(e.label) + " ", 1),
2175
- e.required ? (l(), o("span", Qa, "*")) : u("", !0)
2176
- ], 8, Ua)) : u("", !0),
2177
- m("div", {
2178
- class: h(r.value)
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
- m("button", {
2034
+ h("button", {
2181
2035
  class: "btn btn-outline-secondary",
2182
2036
  type: "button",
2183
2037
  disabled: !s.value,
2184
- onClick: A,
2038
+ onClick: B,
2185
2039
  "aria-label": "Decrement"
2186
- }, [...P[0] || (P[0] = [
2187
- m("span", { "aria-hidden": "true" }, "−", -1)
2188
- ])], 8, Ka),
2189
- m("input", {
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: h(n.value),
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": a.value === "invalid",
2054
+ "aria-invalid": e.validationState === "invalid",
2201
2055
  "aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
2202
- onInput: v,
2203
- onChange: b,
2204
- onBlur: g,
2205
- onFocus: k
2206
- }, null, 42, Wa),
2207
- m("button", {
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: !y.value,
2211
- onClick: M,
2064
+ disabled: !u.value,
2065
+ onClick: p,
2212
2066
  "aria-label": "Increment"
2213
- }, [...P[1] || (P[1] = [
2214
- m("span", { "aria-hidden": "true" }, "+", -1)
2215
- ])], 8, Ja)
2067
+ }, [...A[1] || (A[1] = [
2068
+ h("span", { "aria-hidden": "true" }, "+", -1)
2069
+ ])], 8, Ka)
2216
2070
  ], 2),
2217
- e.helpText && !e.validationMessage ? (l(), o("div", {
2071
+ e.helpText && !e.validationMessage ? (i(), n("div", {
2218
2072
  key: 1,
2219
2073
  id: `${e.id}-feedback`,
2220
2074
  class: "form-text"
2221
- }, f(e.helpText), 9, Za)) : u("", !0),
2222
- a.value === "valid" ? (l(), o("div", _a, f(e.validationMessage || "Looks good!"), 1)) : u("", !0),
2223
- a.value === "invalid" ? (l(), o("div", {
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
- }, f(e.validationMessage || "Please provide a valid value."), 9, el)) : u("", !0)
2082
+ }, b(e.validationMessage || "Please provide a valid value."), 9, Wa)) : v("", !0)
2229
2083
  ]));
2230
2084
  }
2231
- }), al = /* @__PURE__ */ K(tl, [["__scopeId", "data-v-f7aee3b4"]]), ll = { class: "mb-3" }, il = ["for"], nl = {
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
- }, ol = ["id", "type", "value", "disabled", "readonly", "required", "min", "max", "aria-invalid", "aria-describedby"], sl = ["id"], dl = {
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
- }, rl = ["id"], ul = /* @__PURE__ */ p({
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: d }) {
2263
- const t = e, i = d, a = c(() => t.validationState), n = c(() => {
2264
- const b = ["form-control"];
2265
- return t.size && b.push(`form-control-${t.size}`), a.value === "valid" && b.push("is-valid"), a.value === "invalid" && b.push("is-invalid"), b.join(" ");
2266
- }), r = (b) => {
2267
- const g = b.target;
2268
- i("update:modelValue", g.value), i("input", b), t.validateOn === "input" && i("validate");
2269
- }, s = (b) => {
2270
- i("change", b), t.validateOn === "change" && i("validate");
2271
- }, y = (b) => {
2272
- i("blur", b), t.validateOn === "blur" && i("validate");
2273
- }, v = (b) => {
2274
- i("focus", b);
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 (b, g) => (l(), o("div", ll, [
2277
- e.label ? (l(), o("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
- N(f(e.label) + " ", 1),
2283
- e.required ? (l(), o("span", nl, "*")) : u("", !0)
2284
- ], 8, il)) : u("", !0),
2285
- m("input", {
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: h(n.value),
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": a.value === "invalid",
2149
+ "aria-invalid": e.validationState === "invalid",
2296
2150
  "aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
2297
- onInput: r,
2151
+ onInput: o,
2298
2152
  onChange: s,
2299
- onBlur: y,
2300
- onFocus: v
2301
- }, null, 42, ol),
2302
- e.helpText && !e.validationMessage ? (l(), o("div", {
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
- }, f(e.helpText), 9, sl)) : u("", !0),
2307
- a.value === "valid" ? (l(), o("div", dl, f(e.validationMessage || "Looks good!"), 1)) : u("", !0),
2308
- a.value === "invalid" ? (l(), o("div", {
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
- }, f(e.validationMessage || "Please provide a valid date."), 9, rl)) : u("", !0)
2167
+ }, b(e.validationMessage || "Please provide a valid date."), 9, nl)) : v("", !0)
2314
2168
  ]));
2315
2169
  }
2316
- }), cl = ["id", "checked", "value", "disabled", "required", "indeterminate", "aria-invalid", "aria-describedby"], fl = ["for"], vl = {
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
- }, bl = ["id"], ml = {
2173
+ }, ul = ["id"], cl = {
2320
2174
  key: 2,
2321
2175
  class: "valid-feedback",
2322
2176
  style: { display: "block" }
2323
- }, yl = ["id"], hl = /* @__PURE__ */ p({
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: d }) {
2346
- const t = e, i = d, a = c(() => t.validationState), n = c(() => {
2347
- const g = ["form-check-input"];
2348
- return a.value === "valid" && g.push("is-valid"), a.value === "invalid" && g.push("is-invalid"), g.join(" ");
2349
- }), r = c(() => {
2350
- const g = ["form-check"];
2351
- return t.inline && g.push("form-check-inline"), g.join(" ");
2352
- }), s = c(() => Array.isArray(t.modelValue) ? t.modelValue.includes(t.value) : t.modelValue === t.value || t.modelValue === !0), y = (g) => {
2353
- const k = g.target;
2354
- let M;
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 (M = [...t.modelValue], k.checked)
2357
- M.includes(t.value) || M.push(t.value);
2210
+ if (p = [...t.modelValue], m.checked)
2211
+ p.includes(t.value) || p.push(t.value);
2358
2212
  else {
2359
- const A = M.indexOf(t.value);
2360
- A > -1 && M.splice(A, 1);
2213
+ const B = p.indexOf(t.value);
2214
+ B > -1 && p.splice(B, 1);
2361
2215
  }
2362
2216
  else
2363
- M = k.checked;
2364
- i("update:modelValue", M), i("change", g), t.validateOn === "change" && i("validate");
2365
- }, v = (g) => {
2366
- i("blur", g), t.validateOn === "blur" && i("validate");
2367
- }, b = (g) => {
2368
- i("focus", g);
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 (g, k) => (l(), o("div", {
2371
- class: h(r.value)
2224
+ return (c, m) => (i(), n("div", {
2225
+ class: g(o.value)
2372
2226
  }, [
2373
- m("input", {
2227
+ h("input", {
2374
2228
  id: e.id,
2375
2229
  type: "checkbox",
2376
- class: h(n.value),
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": a.value === "invalid",
2236
+ "aria-invalid": e.validationState === "invalid",
2383
2237
  "aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
2384
- onChange: y,
2385
- onBlur: v,
2386
- onFocus: b
2387
- }, null, 42, cl),
2388
- e.label ? (l(), o("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
- N(f(e.label) + " ", 1),
2394
- e.required ? (l(), o("span", vl, "*")) : u("", !0)
2395
- ], 8, fl)) : u("", !0),
2396
- e.helpText && !e.validationMessage ? (l(), o("div", {
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
- }, f(e.helpText), 9, bl)) : u("", !0),
2401
- a.value === "valid" ? (l(), o("div", ml, f(e.validationMessage || "Looks good!"), 1)) : u("", !0),
2402
- a.value === "invalid" ? (l(), o("div", {
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
- }, f(e.validationMessage || "You must check this box."), 9, yl)) : u("", !0)
2261
+ }, b(e.validationMessage || "You must check this box."), 9, fl)) : v("", !0)
2408
2262
  ], 2));
2409
2263
  }
2410
- }), gl = ["id", "checked", "value", "name", "disabled", "required", "aria-invalid", "aria-describedby"], pl = ["for"], $l = {
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
- }, kl = ["id"], Sl = {
2267
+ }, yl = ["id"], gl = {
2414
2268
  key: 2,
2415
2269
  class: "valid-feedback",
2416
2270
  style: { display: "block" }
2417
- }, Vl = ["id"], xl = /* @__PURE__ */ p({
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: d }) {
2440
- const t = e, i = d, a = c(() => t.validationState), n = c(() => {
2441
- const g = ["form-check-input"];
2442
- return a.value === "valid" && g.push("is-valid"), a.value === "invalid" && g.push("is-invalid"), g.join(" ");
2443
- }), r = c(() => {
2444
- const g = ["form-check"];
2445
- return t.inline && g.push("form-check-inline"), g.join(" ");
2446
- }), s = c(() => t.modelValue === t.value), y = (g) => {
2447
- g.target.checked && i("update:modelValue", t.value), i("change", g), t.validateOn === "change" && i("validate");
2448
- }, v = (g) => {
2449
- i("blur", g), t.validateOn === "blur" && i("validate");
2450
- }, b = (g) => {
2451
- i("focus", g);
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 (g, k) => (l(), o("div", {
2454
- class: h(r.value)
2307
+ return (c, m) => (i(), n("div", {
2308
+ class: g(o.value)
2455
2309
  }, [
2456
- m("input", {
2310
+ h("input", {
2457
2311
  id: e.id,
2458
2312
  type: "radio",
2459
- class: h(n.value),
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": a.value === "invalid",
2319
+ "aria-invalid": e.validationState === "invalid",
2466
2320
  "aria-describedby": e.validationMessage || e.helpText ? `${e.id}-feedback` : void 0,
2467
- onChange: y,
2468
- onBlur: v,
2469
- onFocus: b
2470
- }, null, 42, gl),
2471
- e.label ? (l(), o("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
- N(f(e.label) + " ", 1),
2477
- e.required ? (l(), o("span", $l, "*")) : u("", !0)
2478
- ], 8, pl)) : u("", !0),
2479
- e.helpText && !e.validationMessage ? (l(), o("div", {
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
- }, f(e.helpText), 9, kl)) : u("", !0),
2484
- a.value === "valid" ? (l(), o("div", Sl, f(e.validationMessage || "Looks good!"), 1)) : u("", !0),
2485
- a.value === "invalid" ? (l(), o("div", {
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
- }, f(e.validationMessage || "Please select an option."), 9, Vl)) : u("", !0)
2344
+ }, b(e.validationMessage || "Please select an option."), 9, pl)) : v("", !0)
2491
2345
  ], 2));
2492
2346
  }
2493
- }), Cl = { class: "form-check form-switch" }, Bl = ["id", "checked", "disabled", "required", "aria-invalid", "aria-describedby"], wl = ["for"], Nl = {
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
- }, Tl = ["id"], Ml = {
2350
+ }, xl = ["id"], wl = {
2497
2351
  key: 2,
2498
2352
  class: "valid-feedback",
2499
2353
  style: { display: "block" }
2500
- }, Pl = ["id"], ql = /* @__PURE__ */ p({
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: d }) {
2520
- const t = e, i = d, a = c(() => t.validationState), n = c(() => {
2521
- const v = ["form-check-input"];
2522
- return a.value === "valid" && v.push("is-valid"), a.value === "invalid" && v.push("is-invalid"), v.join(" ");
2523
- }), r = (v) => {
2524
- const b = v.target;
2525
- i("update:modelValue", b.checked), i("change", v), t.validateOn === "change" && i("validate");
2526
- }, s = (v) => {
2527
- i("blur", v), t.validateOn === "blur" && i("validate");
2528
- }, y = (v) => {
2529
- i("focus", v);
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 (v, b) => (l(), o("div", Cl, [
2532
- m("input", {
2385
+ return (d, r) => (i(), n("div", kl, [
2386
+ h("input", {
2533
2387
  id: e.id,
2534
2388
  type: "checkbox",
2535
- class: h(n.value),
2389
+ class: g(l.value),
2536
2390
  checked: e.modelValue,
2537
2391
  disabled: e.disabled,
2538
2392
  required: e.required,
2539
- "aria-invalid": a.value === "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: r,
2396
+ onChange: o,
2543
2397
  onBlur: s,
2544
- onFocus: y
2545
- }, null, 42, Bl),
2546
- e.label ? (l(), o("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
- N(f(e.label) + " ", 1),
2552
- e.required ? (l(), o("span", Nl, "*")) : u("", !0)
2553
- ], 8, wl)) : u("", !0),
2554
- e.helpText && !e.validationMessage ? (l(), o("div", {
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
- }, f(e.helpText), 9, Tl)) : u("", !0),
2559
- a.value === "valid" ? (l(), o("div", Ml, f(e.validationMessage || "Looks good!"), 1)) : u("", !0),
2560
- a.value === "invalid" ? (l(), o("div", {
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
- }, f(e.validationMessage || "You must toggle this switch."), 9, Pl)) : u("", !0)
2419
+ }, b(e.validationMessage || "You must toggle this switch."), 9, Bl)) : v("", !0)
2566
2420
  ]));
2567
2421
  }
2568
- }), Fl = ["for"], Il = {
2422
+ }), Tl = ["for"], Ml = {
2569
2423
  key: 0,
2570
2424
  class: "text-danger"
2571
- }, zl = ["id"], Al = {
2425
+ }, ql = ["id"], Pl = {
2572
2426
  key: 1,
2573
2427
  class: "valid-feedback",
2574
2428
  style: { display: "block" }
2575
- }, jl = ["id"], Ll = ["for"], Ol = {
2429
+ }, Fl = ["id"], Ll = ["for"], zl = {
2576
2430
  key: 0,
2577
2431
  class: "text-danger"
2578
- }, Dl = ["id"], Xl = {
2432
+ }, Al = ["id"], jl = {
2579
2433
  key: 2,
2580
2434
  class: "valid-feedback",
2581
2435
  style: { display: "block" }
2582
- }, Rl = ["id"], Gl = /* @__PURE__ */ p({
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 d = e, t = c(() => {
2598
- const r = [];
2599
- return d.floating ? r.push("form-floating") : d.row ? r.push("row", "mb-3") : r.push("mb-3"), r.join(" ");
2600
- }), i = c(() => {
2601
- const r = [];
2602
- return d.floating ? r.push("form-label") : d.row ? (r.push("col-form-label"), d.labelCols && r.push(`col-sm-${d.labelCols}`), d.labelAlign && r.push(`text-${d.labelAlign}`)) : r.push("form-label"), r.join(" ");
2603
- }), a = c(() => d.row && d.labelCols ? `col-sm-${12 - Number(d.labelCols)}` : ""), n = c(() => d.labelFor ? `${d.labelFor}-feedback` : void 0);
2604
- return (r, s) => (l(), o("div", {
2605
- class: h(t.value)
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 ? (l(), o("label", {
2461
+ e.label && !e.floating ? (i(), n("label", {
2608
2462
  key: 0,
2609
2463
  for: e.labelFor,
2610
- class: h(i.value)
2464
+ class: g(a.value)
2611
2465
  }, [
2612
- N(f(e.label) + " ", 1),
2613
- e.required ? (l(), o("span", Il, "*")) : u("", !0)
2614
- ], 10, Fl)) : u("", !0),
2615
- e.row && e.labelCols ? (l(), o("div", {
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: h(a.value)
2471
+ class: g(l.value)
2618
2472
  }, [
2619
- $(r.$slots, "default"),
2620
- e.helpText && !e.validationMessage ? (l(), o("div", {
2473
+ V(s.$slots, "default"),
2474
+ e.helpText && !e.validationMessage ? (i(), n("div", {
2621
2475
  key: 0,
2622
- id: n.value,
2476
+ id: o.value,
2623
2477
  class: "form-text"
2624
- }, f(e.helpText), 9, zl)) : u("", !0),
2625
- e.validationState === "valid" ? (l(), o("div", Al, f(e.validationMessage || "Looks good!"), 1)) : u("", !0),
2626
- e.validationState === "invalid" ? (l(), o("div", {
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: n.value,
2482
+ id: o.value,
2629
2483
  class: "invalid-feedback",
2630
2484
  style: { display: "block" }
2631
- }, f(e.validationMessage || "Please provide a valid value."), 9, jl)) : u("", !0)
2632
- ], 2)) : (l(), o(q, { key: 2 }, [
2633
- $(r.$slots, "default"),
2634
- e.label && e.floating ? (l(), o("label", {
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: h(i.value)
2491
+ class: g(a.value)
2638
2492
  }, [
2639
- N(f(e.label) + " ", 1),
2640
- e.required ? (l(), o("span", Ol, "*")) : u("", !0)
2641
- ], 10, Ll)) : u("", !0),
2642
- e.helpText && !e.validationMessage ? (l(), o("div", {
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: n.value,
2498
+ id: o.value,
2645
2499
  class: "form-text"
2646
- }, f(e.helpText), 9, Dl)) : u("", !0),
2647
- e.validationState === "valid" ? (l(), o("div", Xl, f(e.validationMessage || "Looks good!"), 1)) : u("", !0),
2648
- e.validationState === "invalid" ? (l(), o("div", {
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: n.value,
2504
+ id: o.value,
2651
2505
  class: "invalid-feedback",
2652
2506
  style: { display: "block" }
2653
- }, f(e.validationMessage || "Please provide a valid value."), 9, Rl)) : u("", !0)
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" }, Yl = ["for"], Hl = {
2511
+ }), El = { class: "mb-3" }, Dl = ["for"], Rl = {
2658
2512
  key: 0,
2659
2513
  class: "text-danger"
2660
- }, Ul = {
2514
+ }, Xl = {
2661
2515
  key: 1,
2662
2516
  class: "alert alert-warning",
2663
2517
  role: "alert"
2664
- }, Ql = ["id"], Kl = ["id"], Wl = {
2518
+ }, Yl = ["id"], Gl = ["id"], Hl = {
2665
2519
  key: 4,
2666
2520
  class: "valid-feedback",
2667
2521
  style: { display: "block" }
2668
- }, Jl = ["id"], Zl = /* @__PURE__ */ p({
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: d }) {
2693
- const t = e, i = d, a = F(null), n = F(null), r = F(!1), s = F(null), y = c(() => t.validationState), v = c(() => {
2694
- const k = ["vibe-wysiwyg-container"];
2695
- return y.value === "valid" && k.push("is-valid"), y.value === "invalid" && k.push("is-invalid"), t.disabled && k.push("disabled"), k.join(" ");
2696
- }), b = [
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
- ], g = () => t.toolbar === !1 ? !1 : t.toolbar === !0 || t.toolbar === void 0 ? b : t.toolbar;
2704
- return ge(async () => {
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 k = await import("quill"), M = k.default || k;
2707
- if (await import("quill/dist/quill.snow.css"), a.value) {
2708
- const A = {
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: g()
2568
+ toolbar: x()
2714
2569
  }
2715
2570
  };
2716
- n.value = new M(a.value, A), t.modelValue && (n.value.root.innerHTML = t.modelValue), n.value.on("text-change", () => {
2717
- const B = n.value.root.innerHTML, P = n.value.getText().trim().length === 0;
2718
- i("update:modelValue", P ? "" : B), i("change"), t.validateOn === "change" && i("validate");
2719
- }), n.value.root.addEventListener("blur", () => {
2720
- i("blur"), t.validateOn === "blur" && i("validate");
2721
- }), n.value.root.addEventListener("focus", () => {
2722
- i("focus");
2723
- }), r.value = !0, i("ready", n.value);
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 (k) {
2726
- console.error("Failed to load Quill editor:", k), s.value = "Failed to load WYSIWYG editor. Please install quill: npm install quill", r.value = !1;
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
- }), pe(() => {
2729
- n.value && (n.value = null);
2730
- }), O(() => t.modelValue, (k) => {
2731
- n.value && n.value.root.innerHTML !== k && (n.value.root.innerHTML = k || "");
2732
- }), O(() => t.disabled, (k) => {
2733
- n.value && n.value.enable(!k);
2734
- }), O(() => t.readonly, (k) => {
2735
- n.value && n.value.enable(!k);
2736
- }), (k, M) => (l(), o("div", El, [
2737
- e.label ? (l(), o("label", {
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
- N(f(e.label) + " ", 1),
2743
- e.required ? (l(), o("span", Hl, "*")) : u("", !0)
2744
- ], 8, Yl)) : u("", !0),
2745
- s.value ? (l(), o("div", Ul, f(s.value), 1)) : (l(), o("div", {
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: h(v.value),
2748
- style: R({ minHeight: e.height })
2604
+ class: g(p.value),
2605
+ style: D({ minHeight: e.height })
2749
2606
  }, [
2750
- m("div", {
2607
+ h("div", {
2751
2608
  ref_key: "editorContainer",
2752
- ref: a,
2609
+ ref: l,
2753
2610
  id: e.id
2754
- }, null, 8, Ql)
2611
+ }, null, 8, Yl)
2755
2612
  ], 6)),
2756
- e.helpText && !e.validationMessage ? (l(), o("div", {
2613
+ e.helpText && !e.validationMessage ? (i(), n("div", {
2757
2614
  key: 3,
2758
2615
  id: `${e.id}-feedback`,
2759
2616
  class: "form-text"
2760
- }, f(e.helpText), 9, Kl)) : u("", !0),
2761
- y.value === "valid" ? (l(), o("div", Wl, f(e.validationMessage || "Looks good!"), 1)) : u("", !0),
2762
- y.value === "invalid" ? (l(), o("div", {
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
- }, f(e.validationMessage || "Please provide valid content."), 9, Jl)) : u("", !0)
2624
+ }, b(e.validationMessage || "Please provide valid content."), 9, Kl)) : v("", !0)
2768
2625
  ]));
2769
2626
  }
2770
- }), _l = /* @__PURE__ */ K(Zl, [["__scopeId", "data-v-792a0bda"]]), ti = {
2627
+ }), Ql = /* @__PURE__ */ Q(Ul, [["__scopeId", "data-v-8e6e81b0"]]), Jl = {
2771
2628
  install(e) {
2772
- e.component("VibeAlert", $e), e.component("VibeBadge", ke), e.component("VibeButton", Se), e.component("VibeButtonGroup", xe), e.component("VibeCloseButton", Be), e.component("VibeSpinner", Ne), e.component("VibePlaceholder", Te), e.component("VibeContainer", Me), e.component("VibeRow", Pe), e.component("VibeCol", qe), e.component("VibeCard", Ie), e.component("VibeCardHeader", J), e.component("VibeCardBody", Z), e.component("VibeCardFooter", _), e.component("VibeCardImg", U), e.component("VibeCardTitle", ee), e.component("VibeCardText", te), e.component("VibeBreadcrumb", Le), e.component("VibeBreadcrumbItem", ae), e.component("VibeNav", De), e.component("VibeNavItem", Q), e.component("VibeNavbar", Xe), e.component("VibeNavbarBrand", Re), e.component("VibeNavbarToggle", Ee), e.component("VibeNavbarNav", Ye), e.component("VibePagination", Ue), e.component("VibePaginationItem", H), e.component("VibeTabContent", Qe), e.component("VibeTabPane", Ke), e.component("VibeListGroup", We), e.component("VibeListGroupItem", le), e.component("VibeProgress", Je), e.component("VibeProgressBar", _e), e.component("VibeAccordion", ot), e.component("VibeAccordionItem", ie), e.component("VibeCollapse", st), e.component("VibeDropdown", ct), e.component("VibeDropdownItem", ne), e.component("VibeModal", gt), e.component("VibeOffcanvas", Vt), e.component("VibeToast", Nt), e.component("VibeCarousel", Rt), e.component("VibeCarouselSlide", oe), e.component("VibeTooltip", Et), e.component("VibePopover", Ht), e.component("VibeScrollspy", Ut), e.component("VibeIcon", Qt), e.component("VibeDataTable", ga), e.component("VibeFormInput", Ba), e.component("VibeFormSelect", Aa), e.component("VibeFormTextarea", Ya), e.component("VibeFormSpinbutton", al), e.component("VibeFormDatepicker", ul), e.component("VibeFormCheckbox", hl), e.component("VibeFormRadio", xl), e.component("VibeFormSwitch", ql), e.component("VibeFormGroup", Gl), e.component("VibeFormWysiwyg", _l);
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 ai(e = "") {
2776
- const d = F(e), t = F(null), i = F(""), a = F(!1), n = F(!1), r = F(!1), s = async (M) => {
2777
- if (!M)
2778
- return t.value = null, i.value = "", { valid: !0 };
2779
- r.value = !0;
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 A = Array.isArray(M) ? M : [{ validator: M }];
2782
- for (const B of A) {
2783
- const P = await B.validator(d.value);
2784
- if (P === !1 || typeof P == "string")
2785
- return t.value = "invalid", i.value = typeof P == "string" ? P : B.message || "Invalid value", r.value = !1, { valid: !1, message: i.value };
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", i.value = "", r.value = !1, { valid: !0 };
2644
+ return t.value = "valid", a.value = "", s.value = !1, { valid: !0 };
2788
2645
  } catch {
2789
- return t.value = "invalid", i.value = "Validation error occurred", r.value = !1, { valid: !1, message: i.value };
2646
+ return t.value = "invalid", a.value = "Validation error occurred", s.value = !1, { valid: !1, message: a.value };
2790
2647
  }
2791
- }, y = () => {
2792
- d.value = e, t.value = null, i.value = "", a.value = !1, n.value = !1, r.value = !1;
2793
- }, v = () => {
2794
- n.value = !0;
2795
- }, b = () => {
2796
- a.value = !0;
2797
- }, g = c(() => t.value === "valid"), k = c(() => t.value === "invalid");
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: d,
2656
+ value: f,
2800
2657
  validationState: t,
2801
- validationMessage: i,
2802
- isDirty: a,
2803
- isTouched: n,
2804
- isValidating: r,
2805
- isValid: g,
2806
- isInvalid: k,
2807
- validate: s,
2808
- reset: y,
2809
- markAsTouched: v,
2810
- markAsDirty: b
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 li = {
2670
+ const _l = {
2814
2671
  required: (e = "This field is required") => ({
2815
- validator: (d) => Array.isArray(d) ? d.length > 0 || e : typeof d == "string" ? d.trim().length > 0 || e : d != null && d !== "" || e,
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: (d) => d ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(d) || e : !0,
2676
+ validator: (f) => f ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f) || e : !0,
2820
2677
  message: e
2821
2678
  }),
2822
- minLength: (e, d) => ({
2823
- validator: (t) => t ? t.length >= e || d || `Minimum length is ${e} characters` : !0,
2824
- message: d
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, d) => ({
2827
- validator: (t) => t ? t.length <= e || d || `Maximum length is ${e} characters` : !0,
2828
- message: d
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, d) => ({
2831
- validator: (t) => t == null || t === "" ? !0 : Number(t) >= e || d || `Minimum value is ${e}`,
2832
- message: d
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, d) => ({
2835
- validator: (t) => t == null || t === "" ? !0 : Number(t) <= e || d || `Maximum value is ${e}`,
2836
- message: d
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, d = "Invalid format") => ({
2839
- validator: (t) => t ? e.test(t) || d : !0,
2840
- message: d
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: (d) => {
2844
- if (!d) return !0;
2708
+ validator: (f) => {
2709
+ if (!f) return !0;
2845
2710
  try {
2846
- return new URL(d), !0;
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 example for API validation
2718
+ // Async validator for API validation
2854
2719
  async: (e) => ({
2855
2720
  validator: e
2856
2721
  })
2857
2722
  };
2858
2723
  export {
2859
- ot as VibeAccordion,
2860
- ie as VibeAccordionItem,
2861
- $e as VibeAlert,
2862
- ke as VibeBadge,
2863
- Le as VibeBreadcrumb,
2864
- ae as VibeBreadcrumbItem,
2865
- Se as VibeButton,
2866
- xe as VibeButtonGroup,
2867
- Ie as VibeCard,
2868
- Z as VibeCardBody,
2869
- _ as VibeCardFooter,
2870
- J as VibeCardHeader,
2871
- U as VibeCardImg,
2872
- te as VibeCardText,
2873
- ee as VibeCardTitle,
2874
- Rt as VibeCarousel,
2875
- oe as VibeCarouselSlide,
2876
- Be as VibeCloseButton,
2877
- qe as VibeCol,
2878
- st as VibeCollapse,
2879
- Me as VibeContainer,
2880
- ga as VibeDataTable,
2881
- ct as VibeDropdown,
2882
- ne as VibeDropdownItem,
2883
- hl as VibeFormCheckbox,
2884
- ul as VibeFormDatepicker,
2885
- Gl as VibeFormGroup,
2886
- Ba as VibeFormInput,
2887
- xl as VibeFormRadio,
2888
- Aa as VibeFormSelect,
2889
- al as VibeFormSpinbutton,
2890
- ql as VibeFormSwitch,
2891
- Ya as VibeFormTextarea,
2892
- _l as VibeFormWysiwyg,
2893
- Qt as VibeIcon,
2894
- We as VibeListGroup,
2895
- le as VibeListGroupItem,
2896
- gt as VibeModal,
2897
- De as VibeNav,
2898
- Q as VibeNavItem,
2899
- Xe as VibeNavbar,
2900
- Re as VibeNavbarBrand,
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
- ti as default,
2918
- ai as useFormValidation,
2919
- li as validators
2767
+ Jl as default,
2768
+ Zl as useFormValidation,
2769
+ _l as validators
2920
2770
  };