@velkymx/vibeui 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +48 -0
- package/dist/vibeui.css +1 -1
- package/dist/vibeui.es.js +149 -148
- package/dist/vibeui.umd.js +1 -1
- package/docs/README.md +153 -0
- package/docs/components/advanced/popover.md +150 -0
- package/docs/components/advanced/scrollspy.md +64 -0
- package/docs/components/advanced/tooltip.md +111 -0
- package/docs/components/card/card.md +215 -0
- package/docs/components/core/alert.md +72 -0
- package/docs/components/core/badge.md +81 -0
- package/docs/components/core/button-group.md +105 -0
- package/docs/components/core/button.md +127 -0
- package/docs/components/core/close-button.md +82 -0
- package/docs/components/core/link.md +36 -0
- package/docs/components/core/placeholder.md +135 -0
- package/docs/components/core/spinner.md +109 -0
- package/docs/components/data/datatable.md +416 -0
- package/docs/components/interactive/accordion.md +92 -0
- package/docs/components/interactive/carousel.md +97 -0
- package/docs/components/interactive/collapse.md +105 -0
- package/docs/components/interactive/dropdown.md +93 -0
- package/docs/components/interactive/modal.md +148 -0
- package/docs/components/interactive/offcanvas.md +89 -0
- package/docs/components/interactive/toast.md +114 -0
- package/docs/components/layout/col.md +123 -0
- package/docs/components/layout/container.md +59 -0
- package/docs/components/layout/row.md +113 -0
- package/docs/components/list/list-group.md +221 -0
- package/docs/components/navigation/breadcrumb.md +116 -0
- package/docs/components/navigation/nav.md +88 -0
- package/docs/components/navigation/navbar.md +106 -0
- package/docs/components/navigation/pagination.md +146 -0
- package/docs/components/progress/progress.md +182 -0
- package/docs/composables/back-button.md +28 -0
- package/docs/composables/breakpoints.md +54 -0
- package/docs/composables/color-mode.md +141 -0
- package/docs/forms/README.md +88 -0
- package/docs/forms/form-checkbox.md +50 -0
- package/docs/forms/form-datepicker.md +50 -0
- package/docs/forms/form-group.md +80 -0
- package/docs/forms/form-input.md +55 -0
- package/docs/forms/form-radio.md +58 -0
- package/docs/forms/form-select.md +54 -0
- package/docs/forms/form-spinbutton.md +55 -0
- package/docs/forms/form-switch.md +47 -0
- package/docs/forms/form-textarea.md +51 -0
- package/docs/forms/form-wysiwyg.md +64 -0
- package/docs/forms/input-group.md +51 -0
- package/docs/forms/validation.md +599 -0
- package/llms.txt +422 -0
- package/package.json +5 -2
package/dist/vibeui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as M, ref as L, onMounted as X, onBeforeUnmount as Y, watch as O, computed as h, openBlock as i, createElementBlock as s, normalizeClass as $, renderSlot as T, createTextVNode as I, toDisplayString as k, createCommentVNode as g, createBlock as q, resolveDynamicComponent as A, withCtx as j, createElementVNode as S, normalizeStyle as Z, Fragment as R, renderList as H, nextTick as
|
|
1
|
+
import { defineComponent as M, ref as L, onMounted as X, onBeforeUnmount as Y, watch as O, computed as h, openBlock as i, createElementBlock as s, normalizeClass as $, renderSlot as T, createTextVNode as I, toDisplayString as k, createCommentVNode as g, createBlock as q, resolveDynamicComponent as A, withCtx as j, createElementVNode as S, normalizeStyle as Z, Fragment as R, renderList as H, nextTick as re, reactive as Ce, provide as ke, unref as xe, inject as J, getCurrentInstance as Se, onUnmounted as $e, Teleport as be, useModel as ne, withDirectives as pe, vModelText as Be, vModelSelect as Le, withModifiers as le, mergeModels as me } from "vue";
|
|
2
2
|
const Te = /* @__PURE__ */ M({
|
|
3
3
|
__name: "VibeAlert",
|
|
4
4
|
props: {
|
|
@@ -496,10 +496,10 @@ const Te = /* @__PURE__ */ M({
|
|
|
496
496
|
try {
|
|
497
497
|
const b = (await import("bootstrap")).Tab;
|
|
498
498
|
n.value.querySelectorAll('[data-bs-toggle="tab"], [data-bs-toggle="pill"]').forEach((w) => {
|
|
499
|
-
const
|
|
500
|
-
if (!o.has(
|
|
501
|
-
const C = new b(
|
|
502
|
-
o.set(
|
|
499
|
+
const x = w;
|
|
500
|
+
if (!o.has(x)) {
|
|
501
|
+
const C = new b(x);
|
|
502
|
+
o.set(x, C), x.addEventListener("show.bs.tab", v), x.addEventListener("shown.bs.tab", c), x.addEventListener("hide.bs.tab", m), x.addEventListener("hidden.bs.tab", f);
|
|
503
503
|
}
|
|
504
504
|
});
|
|
505
505
|
} catch (u) {
|
|
@@ -515,7 +515,7 @@ const Te = /* @__PURE__ */ M({
|
|
|
515
515
|
b.removeEventListener("show.bs.tab", v), b.removeEventListener("shown.bs.tab", c), b.removeEventListener("hide.bs.tab", m), b.removeEventListener("hidden.bs.tab", f), u.dispose();
|
|
516
516
|
}), o.clear();
|
|
517
517
|
}), O(() => a.items, async () => {
|
|
518
|
-
await
|
|
518
|
+
await re(), await V();
|
|
519
519
|
}, { deep: !0 });
|
|
520
520
|
const y = (u, b, p) => {
|
|
521
521
|
u.disabled || l("item-click", { item: u, index: b, event: p });
|
|
@@ -539,16 +539,16 @@ const Te = /* @__PURE__ */ M({
|
|
|
539
539
|
"aria-expanded": "false"
|
|
540
540
|
}, k(p.text), 3),
|
|
541
541
|
S("ul", et, [
|
|
542
|
-
(i(!0), s(R, null, H(p.children, (
|
|
543
|
-
|
|
542
|
+
(i(!0), s(R, null, H(p.children, (x, C) => (i(), s("li", { key: C }, [
|
|
543
|
+
x.divider ? (i(), s("hr", tt)) : x.header ? (i(), s("h6", at, k(x.text), 1)) : (i(), q(A(x.href ? "a" : x.to ? "router-link" : "button"), {
|
|
544
544
|
key: 2,
|
|
545
|
-
class: $(["dropdown-item", { active:
|
|
546
|
-
href:
|
|
547
|
-
to:
|
|
548
|
-
type: !
|
|
545
|
+
class: $(["dropdown-item", { active: x.active, disabled: x.disabled }]),
|
|
546
|
+
href: x.href,
|
|
547
|
+
to: x.to,
|
|
548
|
+
type: !x.href && !x.to ? "button" : void 0
|
|
549
549
|
}, {
|
|
550
550
|
default: j(() => [
|
|
551
|
-
I(k(
|
|
551
|
+
I(k(x.text), 1)
|
|
552
552
|
]),
|
|
553
553
|
_: 2
|
|
554
554
|
}, 1032, ["class", "href", "to", "type"]))
|
|
@@ -563,7 +563,7 @@ const Te = /* @__PURE__ */ M({
|
|
|
563
563
|
"aria-current": p.active ? "page" : void 0,
|
|
564
564
|
"data-bs-toggle": (e.tabs || e.pills) && p.href && p.href.startsWith("#") ? e.tabs ? "tab" : "pill" : void 0,
|
|
565
565
|
"data-bs-target": p.href && p.href.startsWith("#") ? p.href : void 0,
|
|
566
|
-
onClick: (
|
|
566
|
+
onClick: (x) => y(p, w, x)
|
|
567
567
|
}, {
|
|
568
568
|
default: j(() => [
|
|
569
569
|
I(k(p.text), 1)
|
|
@@ -588,7 +588,7 @@ const Te = /* @__PURE__ */ M({
|
|
|
588
588
|
emits: ["component-error"],
|
|
589
589
|
setup(e, { emit: r }) {
|
|
590
590
|
const t = e, a = Ce({});
|
|
591
|
-
|
|
591
|
+
ke("vibeNavbarCollapse", { collapseStates: a, toggleCollapse: (v) => {
|
|
592
592
|
a[v] = !a[v];
|
|
593
593
|
} });
|
|
594
594
|
const n = h(() => {
|
|
@@ -979,10 +979,10 @@ const Te = /* @__PURE__ */ M({
|
|
|
979
979
|
], 4));
|
|
980
980
|
}
|
|
981
981
|
});
|
|
982
|
-
let
|
|
982
|
+
let ye = 0;
|
|
983
983
|
function G(e = "vibe") {
|
|
984
|
-
const r =
|
|
985
|
-
return
|
|
984
|
+
const r = Se(), t = r ? r.uid : "no-instance";
|
|
985
|
+
return ye++, `${e}-${t}-${ye}`;
|
|
986
986
|
}
|
|
987
987
|
const Ct = ["id"], xt = { class: "accordion-header" }, Bt = ["data-bs-target", "aria-expanded", "aria-controls", "onClick"], Lt = ["id", "data-bs-parent"], Tt = { class: "accordion-body" }, Nt = /* @__PURE__ */ M({
|
|
988
988
|
__name: "VibeAccordion",
|
|
@@ -1001,11 +1001,11 @@ const Ct = ["id"], xt = { class: "accordion-header" }, Bt = ["data-bs-target", "
|
|
|
1001
1001
|
n.value.querySelectorAll(".accordion-collapse").forEach((p) => {
|
|
1002
1002
|
const w = p.id;
|
|
1003
1003
|
if (!o.has(w)) {
|
|
1004
|
-
const
|
|
1004
|
+
const x = new u(p, {
|
|
1005
1005
|
toggle: !1,
|
|
1006
1006
|
parent: a.alwaysOpen ? void 0 : `#${a.id}`
|
|
1007
1007
|
});
|
|
1008
|
-
o.set(w,
|
|
1008
|
+
o.set(w, x), p.addEventListener("show.bs.collapse", () => d(w)), p.addEventListener("shown.bs.collapse", () => v(w)), p.addEventListener("hide.bs.collapse", () => c(w)), p.addEventListener("hidden.bs.collapse", () => m(w)), a.items.find((z) => z.id === w)?.show && x.show();
|
|
1009
1009
|
}
|
|
1010
1010
|
});
|
|
1011
1011
|
} catch (y) {
|
|
@@ -1022,7 +1022,7 @@ const Ct = ["id"], xt = { class: "accordion-header" }, Bt = ["data-bs-target", "
|
|
|
1022
1022
|
b && (b.removeEventListener("show.bs.collapse", () => d(u)), b.removeEventListener("shown.bs.collapse", () => v(u)), b.removeEventListener("hide.bs.collapse", () => c(u)), b.removeEventListener("hidden.bs.collapse", () => m(u))), y.dispose();
|
|
1023
1023
|
}), o.clear();
|
|
1024
1024
|
}), O(() => a.items, async (y, u) => {
|
|
1025
|
-
y.length !== u?.length && (await
|
|
1025
|
+
y.length !== u?.length && (await re(), await f()), y.forEach((b) => {
|
|
1026
1026
|
const p = o.get(b.id);
|
|
1027
1027
|
p && (b.show ? p.show() : a.alwaysOpen || p.hide());
|
|
1028
1028
|
});
|
|
@@ -1219,14 +1219,14 @@ const Ct = ["id"], xt = { class: "accordion-header" }, Bt = ["data-bs-target", "
|
|
|
1219
1219
|
class: $(c.value),
|
|
1220
1220
|
"aria-labelledby": e.id
|
|
1221
1221
|
}, [
|
|
1222
|
-
(i(!0), s(R, null, H(e.items, (F,
|
|
1222
|
+
(i(!0), s(R, null, H(e.items, (F, W) => (i(), s(R, { key: W }, [
|
|
1223
1223
|
F.divider ? (i(), s("li", Ft, [...z[1] || (z[1] = [
|
|
1224
1224
|
S("hr", { class: "dropdown-divider" }, null, -1)
|
|
1225
1225
|
])])) : F.header ? (i(), s("li", Pt, [
|
|
1226
1226
|
S("h6", qt, [
|
|
1227
1227
|
T(C.$slots, "header", {
|
|
1228
1228
|
item: F,
|
|
1229
|
-
index:
|
|
1229
|
+
index: W
|
|
1230
1230
|
}, () => [
|
|
1231
1231
|
I(k(F.text), 1)
|
|
1232
1232
|
])
|
|
@@ -1238,12 +1238,12 @@ const Ct = ["id"], xt = { class: "accordion-header" }, Bt = ["data-bs-target", "
|
|
|
1238
1238
|
to: F.to,
|
|
1239
1239
|
type: !F.href && !F.to ? "button" : void 0,
|
|
1240
1240
|
disabled: F.disabled,
|
|
1241
|
-
onClick: (_) => b(F,
|
|
1241
|
+
onClick: (_) => b(F, W, _)
|
|
1242
1242
|
}, {
|
|
1243
1243
|
default: j(() => [
|
|
1244
1244
|
T(C.$slots, "item", {
|
|
1245
1245
|
item: F,
|
|
1246
|
-
index:
|
|
1246
|
+
index: W
|
|
1247
1247
|
}, () => [
|
|
1248
1248
|
I(k(F.text), 1)
|
|
1249
1249
|
])
|
|
@@ -1256,19 +1256,19 @@ const Ct = ["id"], xt = { class: "accordion-header" }, Bt = ["data-bs-target", "
|
|
|
1256
1256
|
], 2));
|
|
1257
1257
|
}
|
|
1258
1258
|
}), ee = [];
|
|
1259
|
-
function
|
|
1259
|
+
function ge(e) {
|
|
1260
1260
|
if (ee.length > 0) {
|
|
1261
1261
|
e.preventDefault();
|
|
1262
1262
|
const r = ee.pop();
|
|
1263
1263
|
r && r();
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1266
|
+
function we(e) {
|
|
1267
1267
|
X(() => {
|
|
1268
|
-
ee.push(e), ee.length === 1 && typeof document < "u" && document.addEventListener("backbutton",
|
|
1269
|
-
}),
|
|
1268
|
+
ee.push(e), ee.length === 1 && typeof document < "u" && document.addEventListener("backbutton", ge);
|
|
1269
|
+
}), $e(() => {
|
|
1270
1270
|
const r = ee.indexOf(e);
|
|
1271
|
-
r !== -1 && ee.splice(r, 1), ee.length === 0 && typeof document < "u" && document.removeEventListener("backbutton",
|
|
1271
|
+
r !== -1 && ee.splice(r, 1), ee.length === 0 && typeof document < "u" && document.removeEventListener("backbutton", ge);
|
|
1272
1272
|
});
|
|
1273
1273
|
}
|
|
1274
1274
|
const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs-keyboard"], Ot = { class: "modal-content" }, Ht = {
|
|
@@ -1309,8 +1309,8 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
1309
1309
|
if (n.value) {
|
|
1310
1310
|
o.value && o.value.dispose();
|
|
1311
1311
|
try {
|
|
1312
|
-
const
|
|
1313
|
-
o.value = new
|
|
1312
|
+
const x = (await import("bootstrap")).Modal;
|
|
1313
|
+
o.value = new x(n.value, {
|
|
1314
1314
|
backdrop: a.staticBackdrop ? "static" : !0,
|
|
1315
1315
|
keyboard: !a.staticBackdrop,
|
|
1316
1316
|
focus: !0
|
|
@@ -1330,9 +1330,9 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
1330
1330
|
o.value && (w && !d.value ? o.value.show() : !w && d.value && o.value.hide());
|
|
1331
1331
|
}), O(() => a.staticBackdrop, y);
|
|
1332
1332
|
const u = () => o.value?.show(), b = () => o.value?.hide(), p = () => o.value?.handleUpdate();
|
|
1333
|
-
return
|
|
1333
|
+
return we(() => {
|
|
1334
1334
|
d.value && b();
|
|
1335
|
-
}), r({ show: u, hide: b, handleUpdate: p, bsInstance: o }), (w,
|
|
1335
|
+
}), r({ show: u, hide: b, handleUpdate: p, bsInstance: o }), (w, x) => (i(), q(be, {
|
|
1336
1336
|
to: e.teleport === !0 ? "body" : e.teleport || void 0,
|
|
1337
1337
|
disabled: !e.teleport
|
|
1338
1338
|
}, [
|
|
@@ -1430,9 +1430,9 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
1430
1430
|
o.value && (p && !d.value ? o.value.show() : !p && d.value && o.value.hide());
|
|
1431
1431
|
}), O([() => a.placement, () => a.backdrop, () => a.scroll], y);
|
|
1432
1432
|
const u = () => o.value?.show(), b = () => o.value?.hide();
|
|
1433
|
-
return
|
|
1433
|
+
return we(() => {
|
|
1434
1434
|
d.value && b();
|
|
1435
|
-
}), r({ show: u, hide: b, bsInstance: o }), (p, w) => (i(), q(
|
|
1435
|
+
}), r({ show: u, hide: b, bsInstance: o }), (p, w) => (i(), q(be, {
|
|
1436
1436
|
to: e.teleport === !0 ? "body" : e.teleport || void 0,
|
|
1437
1437
|
disabled: !e.teleport
|
|
1438
1438
|
}, [
|
|
@@ -1489,8 +1489,8 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
1489
1489
|
const w = ["toast"];
|
|
1490
1490
|
return a.variant && w.push(`text-bg-${a.variant}`), w.join(" ");
|
|
1491
1491
|
}), c = h(() => {
|
|
1492
|
-
const w = ["toast-container", "position-fixed", "p-3"],
|
|
1493
|
-
return
|
|
1492
|
+
const w = ["toast-container", "position-fixed", "p-3"], x = a.placement;
|
|
1493
|
+
return x.includes("top") && w.push("top-0"), x.includes("bottom") && w.push("bottom-0"), x.includes("middle") && w.push("top-50", "start-50", "translate-middle"), x.includes("start") && w.push("start-0"), x.includes("end") && w.push("end-0"), x.includes("center") && !x.includes("middle") && w.push("start-50", "translate-middle-x"), w.join(" ");
|
|
1494
1494
|
}), m = () => {
|
|
1495
1495
|
d.value = !0, l("show");
|
|
1496
1496
|
}, f = () => {
|
|
@@ -1503,8 +1503,8 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
1503
1503
|
if (n.value) {
|
|
1504
1504
|
o.value && o.value.dispose();
|
|
1505
1505
|
try {
|
|
1506
|
-
const
|
|
1507
|
-
o.value = new
|
|
1506
|
+
const x = (await import("bootstrap")).Toast;
|
|
1507
|
+
o.value = new x(n.value, {
|
|
1508
1508
|
autohide: a.autohide,
|
|
1509
1509
|
delay: a.delay
|
|
1510
1510
|
}), n.value.addEventListener("show.bs.toast", m), n.value.addEventListener("shown.bs.toast", f), n.value.addEventListener("hide.bs.toast", V), n.value.addEventListener("hidden.bs.toast", y), a.modelValue && o.value.show();
|
|
@@ -1523,7 +1523,7 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
1523
1523
|
o.value && (w && !d.value ? o.value.show() : !w && d.value && o.value.hide());
|
|
1524
1524
|
}), O([() => a.autohide, () => a.delay], u);
|
|
1525
1525
|
const b = () => o.value?.show(), p = () => o.value?.hide();
|
|
1526
|
-
return r({ show: b, hide: p, bsInstance: o }), (w,
|
|
1526
|
+
return r({ show: b, hide: p, bsInstance: o }), (w, x) => (i(), q(be, {
|
|
1527
1527
|
to: e.teleport === !0 ? "body" : e.teleport || void 0,
|
|
1528
1528
|
disabled: !e.teleport
|
|
1529
1529
|
}, [
|
|
@@ -1619,7 +1619,7 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
1619
1619
|
}), O(() => a.modelValue, (y) => {
|
|
1620
1620
|
o.value && y !== d.value && o.value.to(y);
|
|
1621
1621
|
}), O(() => a.items, async () => {
|
|
1622
|
-
await
|
|
1622
|
+
await re(), await f();
|
|
1623
1623
|
}, { deep: !0 });
|
|
1624
1624
|
const V = (y, u) => y.alt ? y.alt : y.caption ? y.caption : y.captionText ? y.captionText : `Carousel slide ${u + 1}`;
|
|
1625
1625
|
return r({ bsInstance: o, refresh: f }), (y, u) => (i(), s("div", {
|
|
@@ -1926,7 +1926,7 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
1926
1926
|
class: "page-item"
|
|
1927
1927
|
}, Ya = /* @__PURE__ */ M({
|
|
1928
1928
|
__name: "VibeDataTable",
|
|
1929
|
-
props: /* @__PURE__ */
|
|
1929
|
+
props: /* @__PURE__ */ me({
|
|
1930
1930
|
// Data
|
|
1931
1931
|
items: { type: Array, default: () => [] },
|
|
1932
1932
|
columns: { type: Array, required: !0 },
|
|
@@ -1966,12 +1966,12 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
1966
1966
|
sortDesc: { type: Boolean, default: !1 },
|
|
1967
1967
|
sortDescModifiers: {}
|
|
1968
1968
|
}),
|
|
1969
|
-
emits: /* @__PURE__ */
|
|
1969
|
+
emits: /* @__PURE__ */ me(["row-clicked", "component-error"], ["update:currentPage", "update:perPage", "update:sortBy", "update:sortDesc"]),
|
|
1970
1970
|
setup(e, { emit: r }) {
|
|
1971
|
-
const t = e, a =
|
|
1972
|
-
O(v, (
|
|
1971
|
+
const t = e, a = ne(e, "currentPage"), l = ne(e, "perPage"), n = ne(e, "sortBy"), o = ne(e, "sortDesc"), d = r, v = L(""), c = L(null), m = L(""), f = (B, N) => t.rowKey && B[t.rowKey] !== void 0 ? String(B[t.rowKey]) : N;
|
|
1972
|
+
O(v, (B) => {
|
|
1973
1973
|
c.value !== null && clearTimeout(c.value), c.value = setTimeout(() => {
|
|
1974
|
-
m.value =
|
|
1974
|
+
m.value = B, a.value = 1, c.value = null;
|
|
1975
1975
|
}, t.searchDebounce);
|
|
1976
1976
|
}), Y(() => {
|
|
1977
1977
|
c.value !== null && (clearTimeout(c.value), c.value = null);
|
|
@@ -1979,63 +1979,63 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
1979
1979
|
const V = h(() => {
|
|
1980
1980
|
if (!t.searchable || !m.value)
|
|
1981
1981
|
return t.items || [];
|
|
1982
|
-
const
|
|
1982
|
+
const B = m.value.toLowerCase();
|
|
1983
1983
|
return (t.items || []).filter((N) => (t.columns || []).some((E) => {
|
|
1984
1984
|
if (E.searchable === !1) return !1;
|
|
1985
1985
|
const D = N[E.key];
|
|
1986
|
-
return D == null ? !1 : String(D).toLowerCase().includes(
|
|
1986
|
+
return D == null ? !1 : String(D).toLowerCase().includes(B);
|
|
1987
1987
|
}));
|
|
1988
|
-
}), y = (
|
|
1989
|
-
if (
|
|
1988
|
+
}), y = (B, N, E) => {
|
|
1989
|
+
if (B == null) return 1;
|
|
1990
1990
|
if (N == null) return -1;
|
|
1991
|
-
if (typeof
|
|
1992
|
-
const D =
|
|
1991
|
+
if (typeof B == "string" && typeof N == "string") {
|
|
1992
|
+
const D = B.toLowerCase(), U = N.toLowerCase();
|
|
1993
1993
|
return D < U ? E ? 1 : -1 : D > U ? E ? -1 : 1 : 0;
|
|
1994
1994
|
}
|
|
1995
|
-
if (typeof
|
|
1996
|
-
return
|
|
1997
|
-
if (typeof
|
|
1998
|
-
return
|
|
1999
|
-
if (
|
|
2000
|
-
const D =
|
|
1995
|
+
if (typeof B == "number" && typeof N == "number")
|
|
1996
|
+
return B < N ? E ? 1 : -1 : B > N ? E ? -1 : 1 : 0;
|
|
1997
|
+
if (typeof B == "boolean" && typeof N == "boolean")
|
|
1998
|
+
return B === N ? 0 : (B ? 1 : -1) * (E ? -1 : 1);
|
|
1999
|
+
if (B instanceof Date && N instanceof Date) {
|
|
2000
|
+
const D = B.getTime(), U = N.getTime();
|
|
2001
2001
|
return D < U ? E ? 1 : -1 : D > U ? E ? -1 : 1 : 0;
|
|
2002
2002
|
}
|
|
2003
2003
|
return 0;
|
|
2004
2004
|
}, u = h(() => {
|
|
2005
2005
|
if (!t.sortable || !n.value)
|
|
2006
2006
|
return V.value;
|
|
2007
|
-
const
|
|
2008
|
-
return
|
|
2007
|
+
const B = [...V.value], N = n.value;
|
|
2008
|
+
return B.sort((E, D) => y(E[N], D[N], o.value)), B;
|
|
2009
2009
|
}), b = h(() => {
|
|
2010
2010
|
if (!t.paginated)
|
|
2011
2011
|
return u.value;
|
|
2012
|
-
const
|
|
2013
|
-
return u.value.slice(
|
|
2014
|
-
}), p = h(() => t.items.length), w = h(() => V.value.length),
|
|
2015
|
-
const
|
|
2016
|
-
return Math.min(
|
|
2017
|
-
}), F = h(() => (w.value !== p.value ? t.filteredInfoText : t.infoText).replace("{start}", String(C.value)).replace("{end}", String(z.value)).replace("{total}", String(w.value)).replace("{totalRows}", String(p.value))),
|
|
2018
|
-
const
|
|
2019
|
-
return t.striped &&
|
|
2020
|
-
}), _ = (
|
|
2021
|
-
!t.sortable ||
|
|
2022
|
-
},
|
|
2023
|
-
|
|
2024
|
-
},
|
|
2012
|
+
const B = (a.value - 1) * l.value, N = B + l.value;
|
|
2013
|
+
return u.value.slice(B, N);
|
|
2014
|
+
}), p = h(() => t.items.length), w = h(() => V.value.length), x = h(() => Math.ceil(w.value / l.value)), C = h(() => w.value === 0 ? 0 : (a.value - 1) * l.value + 1), z = h(() => {
|
|
2015
|
+
const B = a.value * l.value;
|
|
2016
|
+
return Math.min(B, w.value);
|
|
2017
|
+
}), F = h(() => (w.value !== p.value ? t.filteredInfoText : t.infoText).replace("{start}", String(C.value)).replace("{end}", String(z.value)).replace("{total}", String(w.value)).replace("{totalRows}", String(p.value))), W = h(() => {
|
|
2018
|
+
const B = ["table"];
|
|
2019
|
+
return t.striped && B.push("table-striped"), t.bordered && B.push("table-bordered"), t.borderless && B.push("table-borderless"), t.hover && B.push("table-hover"), t.small && B.push("table-sm"), t.stack && B.push("vibe-table-stack"), t.variant && B.push(`table-${t.variant}`), B.join(" ");
|
|
2020
|
+
}), _ = (B) => {
|
|
2021
|
+
!t.sortable || B.sortable === !1 || (n.value === B.key ? o.value = !o.value : (n.value = B.key, o.value = !1));
|
|
2022
|
+
}, K = (B) => {
|
|
2023
|
+
B < 1 || B > x.value || (a.value = B);
|
|
2024
|
+
}, oe = () => {
|
|
2025
2025
|
a.value = 1;
|
|
2026
|
-
},
|
|
2027
|
-
d("row-clicked",
|
|
2028
|
-
},
|
|
2029
|
-
const E =
|
|
2030
|
-
return N.formatter ? N.formatter(E,
|
|
2031
|
-
}, de = (
|
|
2032
|
-
const N = { ...
|
|
2033
|
-
return t.sortable &&
|
|
2026
|
+
}, P = (B, N) => {
|
|
2027
|
+
d("row-clicked", B, N);
|
|
2028
|
+
}, Q = (B, N) => {
|
|
2029
|
+
const E = B[N.key];
|
|
2030
|
+
return N.formatter ? N.formatter(E, B) : E;
|
|
2031
|
+
}, de = (B) => !t.sortable || B.sortable === !1 ? "" : n.value !== B.key ? "⇅" : o.value ? "↓" : "↑", ue = (B) => {
|
|
2032
|
+
const N = { ...B.thStyle };
|
|
2033
|
+
return t.sortable && B.sortable !== !1 && (N.cursor = "pointer"), N;
|
|
2034
2034
|
};
|
|
2035
|
-
return (
|
|
2035
|
+
return (B, N) => (i(), s("div", wa, [
|
|
2036
2036
|
S("div", Va, [
|
|
2037
2037
|
e.searchable ? (i(), s("div", Ca, [
|
|
2038
|
-
|
|
2038
|
+
pe(S("input", {
|
|
2039
2039
|
"onUpdate:modelValue": N[0] || (N[0] = (E) => v.value = E),
|
|
2040
2040
|
type: "search",
|
|
2041
2041
|
class: "form-control",
|
|
@@ -2047,11 +2047,11 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
2047
2047
|
e.showPerPage && e.paginated ? (i(), s("div", Ba, [
|
|
2048
2048
|
S("div", La, [
|
|
2049
2049
|
N[6] || (N[6] = S("label", { class: "me-2 mb-0" }, "Show", -1)),
|
|
2050
|
-
|
|
2050
|
+
pe(S("select", {
|
|
2051
2051
|
"onUpdate:modelValue": N[1] || (N[1] = (E) => l.value = E),
|
|
2052
2052
|
class: "form-select form-select-sm",
|
|
2053
2053
|
style: { width: "auto" },
|
|
2054
|
-
onChange:
|
|
2054
|
+
onChange: oe
|
|
2055
2055
|
}, [
|
|
2056
2056
|
(i(!0), s(R, null, H(e.perPageOptions, (E) => (i(), s("option", {
|
|
2057
2057
|
key: E,
|
|
@@ -2073,14 +2073,14 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
2073
2073
|
class: $({ "table-responsive": e.responsive })
|
|
2074
2074
|
}, [
|
|
2075
2075
|
S("table", {
|
|
2076
|
-
class: $(
|
|
2076
|
+
class: $(W.value)
|
|
2077
2077
|
}, [
|
|
2078
2078
|
S("thead", null, [
|
|
2079
2079
|
S("tr", null, [
|
|
2080
2080
|
(i(!0), s(R, null, H(e.columns, (E) => (i(), s("th", {
|
|
2081
2081
|
key: E.key,
|
|
2082
2082
|
class: $(E.headerClass),
|
|
2083
|
-
style: Z(
|
|
2083
|
+
style: Z(ue(E)),
|
|
2084
2084
|
onClick: (D) => _(E)
|
|
2085
2085
|
}, [
|
|
2086
2086
|
I(k(E.label) + " ", 1),
|
|
@@ -2091,7 +2091,7 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
2091
2091
|
S("tbody", null, [
|
|
2092
2092
|
(i(!0), s(R, null, H(b.value, (E, D) => (i(), s("tr", {
|
|
2093
2093
|
key: f(E, D),
|
|
2094
|
-
onClick: (U) =>
|
|
2094
|
+
onClick: (U) => P(E, D),
|
|
2095
2095
|
style: { cursor: "pointer" }
|
|
2096
2096
|
}, [
|
|
2097
2097
|
(i(!0), s(R, null, H(e.columns, (U) => (i(), s("td", {
|
|
@@ -2100,12 +2100,12 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
2100
2100
|
style: Z(U.tdStyle),
|
|
2101
2101
|
"data-label": U.label
|
|
2102
2102
|
}, [
|
|
2103
|
-
T(
|
|
2103
|
+
T(B.$slots, `cell(${U.key})`, {
|
|
2104
2104
|
item: E,
|
|
2105
2105
|
value: E[U.key],
|
|
2106
2106
|
index: D
|
|
2107
2107
|
}, () => [
|
|
2108
|
-
I(k(
|
|
2108
|
+
I(k(Q(E, U)), 1)
|
|
2109
2109
|
], !0)
|
|
2110
2110
|
], 14, Ia))), 128))
|
|
2111
2111
|
], 8, Ma))), 128)),
|
|
@@ -2122,7 +2122,7 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
2122
2122
|
e.showInfo ? (i(), s("div", qa, [
|
|
2123
2123
|
S("div", za, k(F.value), 1)
|
|
2124
2124
|
])) : g("", !0),
|
|
2125
|
-
e.paginated &&
|
|
2125
|
+
e.paginated && x.value > 1 ? (i(), s("div", Aa, [
|
|
2126
2126
|
S("nav", null, [
|
|
2127
2127
|
S("ul", ja, [
|
|
2128
2128
|
S("li", {
|
|
@@ -2131,20 +2131,20 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
2131
2131
|
S("a", {
|
|
2132
2132
|
class: "page-link",
|
|
2133
2133
|
href: "#",
|
|
2134
|
-
onClick: N[2] || (N[2] = le((E) =>
|
|
2134
|
+
onClick: N[2] || (N[2] = le((E) => K(a.value - 1), ["prevent"]))
|
|
2135
2135
|
}, " Previous ")
|
|
2136
2136
|
], 2),
|
|
2137
2137
|
a.value > 3 ? (i(), s("li", Oa, [
|
|
2138
2138
|
S("a", {
|
|
2139
2139
|
class: "page-link",
|
|
2140
2140
|
href: "#",
|
|
2141
|
-
onClick: N[3] || (N[3] = le((E) =>
|
|
2141
|
+
onClick: N[3] || (N[3] = le((E) => K(1), ["prevent"]))
|
|
2142
2142
|
}, "1")
|
|
2143
2143
|
])) : g("", !0),
|
|
2144
2144
|
a.value > 4 ? (i(), s("li", Ha, [...N[8] || (N[8] = [
|
|
2145
2145
|
S("span", { class: "page-link" }, "...", -1)
|
|
2146
2146
|
])])) : g("", !0),
|
|
2147
|
-
(i(!0), s(R, null, H(Array.from({ length:
|
|
2147
|
+
(i(!0), s(R, null, H(Array.from({ length: x.value }, (E, D) => D + 1).filter(
|
|
2148
2148
|
(E) => E >= a.value - 2 && E <= a.value + 2
|
|
2149
2149
|
), (E) => (i(), s("li", {
|
|
2150
2150
|
key: E,
|
|
@@ -2153,26 +2153,26 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
2153
2153
|
S("a", {
|
|
2154
2154
|
class: "page-link",
|
|
2155
2155
|
href: "#",
|
|
2156
|
-
onClick: le((D) =>
|
|
2156
|
+
onClick: le((D) => K(E), ["prevent"])
|
|
2157
2157
|
}, k(E), 9, Da)
|
|
2158
2158
|
], 2))), 128)),
|
|
2159
|
-
a.value <
|
|
2159
|
+
a.value < x.value - 3 ? (i(), s("li", Ga, [...N[9] || (N[9] = [
|
|
2160
2160
|
S("span", { class: "page-link" }, "...", -1)
|
|
2161
2161
|
])])) : g("", !0),
|
|
2162
|
-
a.value <
|
|
2162
|
+
a.value < x.value - 2 ? (i(), s("li", Xa, [
|
|
2163
2163
|
S("a", {
|
|
2164
2164
|
class: "page-link",
|
|
2165
2165
|
href: "#",
|
|
2166
|
-
onClick: N[4] || (N[4] = le((E) =>
|
|
2167
|
-
}, k(
|
|
2166
|
+
onClick: N[4] || (N[4] = le((E) => K(x.value), ["prevent"]))
|
|
2167
|
+
}, k(x.value), 1)
|
|
2168
2168
|
])) : g("", !0),
|
|
2169
2169
|
S("li", {
|
|
2170
|
-
class: $(["page-item", { disabled: a.value ===
|
|
2170
|
+
class: $(["page-item", { disabled: a.value === x.value }])
|
|
2171
2171
|
}, [
|
|
2172
2172
|
S("a", {
|
|
2173
2173
|
class: "page-link",
|
|
2174
2174
|
href: "#",
|
|
2175
|
-
onClick: N[5] || (N[5] = le((E) =>
|
|
2175
|
+
onClick: N[5] || (N[5] = le((E) => K(a.value + 1), ["prevent"]))
|
|
2176
2176
|
}, " Next ")
|
|
2177
2177
|
], 2)
|
|
2178
2178
|
])
|
|
@@ -2547,7 +2547,7 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
2547
2547
|
if (!V.value) return;
|
|
2548
2548
|
let C = t.modelValue + t.step;
|
|
2549
2549
|
t.max !== void 0 && C > t.max && (C = t.wrap ? t.min ?? 0 : t.max), a("update:modelValue", C), a("increment", C), t.validateOn === "change" && a("validate");
|
|
2550
|
-
},
|
|
2550
|
+
}, x = () => {
|
|
2551
2551
|
if (!f.value) return;
|
|
2552
2552
|
let C = t.modelValue - t.step;
|
|
2553
2553
|
t.min !== void 0 && C < t.min && (C = t.wrap ? t.max ?? 0 : t.min), a("update:modelValue", C), a("decrement", C), t.validateOn === "change" && a("validate");
|
|
@@ -2570,7 +2570,7 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
2570
2570
|
class: "btn btn-outline-secondary",
|
|
2571
2571
|
type: "button",
|
|
2572
2572
|
disabled: !f.value,
|
|
2573
|
-
onClick:
|
|
2573
|
+
onClick: x,
|
|
2574
2574
|
"aria-label": "Decrement"
|
|
2575
2575
|
}, [...z[0] || (z[0] = [
|
|
2576
2576
|
S("span", { "aria-hidden": "true" }, "−", -1)
|
|
@@ -2751,8 +2751,8 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
2751
2751
|
if (w = [...t.modelValue], p.checked)
|
|
2752
2752
|
w.push(t.value);
|
|
2753
2753
|
else {
|
|
2754
|
-
const
|
|
2755
|
-
|
|
2754
|
+
const x = w.indexOf(t.value);
|
|
2755
|
+
x > -1 && w.splice(x, 1);
|
|
2756
2756
|
}
|
|
2757
2757
|
else
|
|
2758
2758
|
w = p.checked ? t.value : t.value === !0 ? !1 : null;
|
|
@@ -3000,7 +3000,7 @@ const jt = ["id", "aria-labelledby", "aria-hidden", "data-bs-backdrop", "data-bs
|
|
|
3000
3000
|
},
|
|
3001
3001
|
setup(e) {
|
|
3002
3002
|
const r = e, t = h(() => r.labelFor || G("form-group")), a = L(!1);
|
|
3003
|
-
|
|
3003
|
+
ke("vibeFormGroup", {
|
|
3004
3004
|
id: t,
|
|
3005
3005
|
consumeId: () => a.value ? null : (a.value = !0, t.value),
|
|
3006
3006
|
hasLabel: h(() => !!r.label),
|
|
@@ -3084,7 +3084,7 @@ function ho() {
|
|
|
3084
3084
|
const f = window.matchMedia(`(min-width: ${m}px)`), V = () => {
|
|
3085
3085
|
n();
|
|
3086
3086
|
};
|
|
3087
|
-
f.addEventListener("change", V),
|
|
3087
|
+
f.addEventListener("change", V), Se() && $e(() => f.removeEventListener("change", V));
|
|
3088
3088
|
}), {
|
|
3089
3089
|
isXs: o,
|
|
3090
3090
|
isSm: e,
|
|
@@ -3132,51 +3132,52 @@ const po = ["for"], mo = {
|
|
|
3132
3132
|
},
|
|
3133
3133
|
emits: ["update:modelValue", "validate", "blur", "focus", "change", "ready"],
|
|
3134
3134
|
setup(e, { emit: r }) {
|
|
3135
|
-
const t = e, a = r, l = J("vibeFormGroup", null), n = h(() => t.id || l?.id.value || G("wysiwyg")), { isMobile: o } = ho(), d = h(() => !!t.label && !l?.hasLabel.value), v = h(() => !!t.validationState && !l?.hasValidation.value), c = h(() => !!t.helpText && !l?.hasHelp.value), m = L(null), f = L(null), V = L(!1), y = L(null), u = L(!1), b = L(null), p = L(null), w = L(null),
|
|
3135
|
+
const t = e, a = r, l = J("vibeFormGroup", null), n = h(() => t.id || l?.id.value || G("wysiwyg")), { isMobile: o } = ho(), d = h(() => !!t.label && !l?.hasLabel.value), v = h(() => !!t.validationState && !l?.hasValidation.value), c = h(() => !!t.helpText && !l?.hasHelp.value), m = L(null), f = L(null), V = L(!1), y = L(null), u = L(!1), b = L(null), p = L(null), w = L(null), x = L(null), C = h(() => {
|
|
3136
3136
|
const P = ["vibe-wysiwyg-container"];
|
|
3137
3137
|
return t.validationState === "valid" && P.push("is-valid"), t.validationState === "invalid" && P.push("is-invalid"), t.disabled && P.push("disabled"), P.join(" ");
|
|
3138
|
-
}),
|
|
3138
|
+
}), z = [
|
|
3139
3139
|
[{ header: [1, 2, 3, !1] }],
|
|
3140
3140
|
["bold", "italic", "underline", "strike"],
|
|
3141
3141
|
[{ list: "ordered" }, { list: "bullet" }],
|
|
3142
3142
|
[{ color: [] }, { background: [] }],
|
|
3143
3143
|
["link", "image"],
|
|
3144
3144
|
["clean"]
|
|
3145
|
-
],
|
|
3145
|
+
], F = [
|
|
3146
3146
|
["bold", "italic", "underline"],
|
|
3147
3147
|
[{ list: "ordered" }, { list: "bullet" }],
|
|
3148
3148
|
["link", "clean"]
|
|
3149
|
-
],
|
|
3149
|
+
], W = () => t.toolbar === !1 ? !1 : o.value ? t.mobileToolbar === !1 ? !1 : t.mobileToolbar !== void 0 ? t.mobileToolbar : F : t.toolbar === !0 || t.toolbar === void 0 ? z : t.toolbar, _ = (P) => {
|
|
3150
3150
|
f.value && (u.value = !0, f.value.setContents([], "silent"), P && f.value.clipboard.dangerouslyPasteHTML(P, "silent"), u.value = !1);
|
|
3151
|
-
},
|
|
3151
|
+
}, K = () => !f.value || f.value.getText().trim().length === 0 ? "" : f.value.getSemanticHTML(), oe = async () => {
|
|
3152
3152
|
try {
|
|
3153
3153
|
const P = await import("quill"), Q = P.default || P;
|
|
3154
3154
|
if (await import("quill/dist/quill.snow.css"), m.value) {
|
|
3155
|
-
const
|
|
3155
|
+
const de = {
|
|
3156
3156
|
theme: t.theme,
|
|
3157
3157
|
placeholder: t.placeholder,
|
|
3158
3158
|
readOnly: t.readonly || t.disabled,
|
|
3159
3159
|
modules: {
|
|
3160
|
-
toolbar:
|
|
3160
|
+
toolbar: W()
|
|
3161
3161
|
}
|
|
3162
3162
|
};
|
|
3163
|
-
f.value = new Q(m.value,
|
|
3163
|
+
f.value = new Q(m.value, de), t.modelValue && _(t.modelValue), w.value = () => {
|
|
3164
3164
|
if (u.value) return;
|
|
3165
|
-
const
|
|
3166
|
-
a("update:modelValue",
|
|
3165
|
+
const ue = K();
|
|
3166
|
+
a("update:modelValue", ue), a("change"), t.validateOn === "change" && a("validate");
|
|
3167
3167
|
}, f.value.on("text-change", w.value), b.value = () => {
|
|
3168
3168
|
a("blur"), t.validateOn === "blur" && a("validate");
|
|
3169
3169
|
}, f.value.root.addEventListener("blur", b.value), p.value = () => {
|
|
3170
3170
|
a("focus");
|
|
3171
|
-
}, f.value.root.addEventListener("focus", p.value),
|
|
3171
|
+
}, f.value.root.addEventListener("focus", p.value), x.value = () => {
|
|
3172
|
+
}, f.value.on("selection-change", x.value), V.value = !0, a("ready", f.value);
|
|
3172
3173
|
}
|
|
3173
3174
|
} catch (P) {
|
|
3174
3175
|
console.error("Failed to load Quill editor:", P), y.value = "Failed to load WYSIWYG editor. Please install quill: npm install quill", V.value = !1;
|
|
3175
3176
|
}
|
|
3176
3177
|
};
|
|
3177
|
-
return X(
|
|
3178
|
+
return X(oe), Y(() => {
|
|
3178
3179
|
if (f.value) {
|
|
3179
|
-
if (w.value && (f.value.off("text-change", w.value), w.value = null), b.value && (f.value.root.removeEventListener("blur", b.value), b.value = null), p.value && (f.value.root.removeEventListener("focus", p.value), p.value = null), m.value) {
|
|
3180
|
+
if (f.value.enable(!1), w.value && (f.value.off("text-change", w.value), w.value = null), x.value && (f.value.off("selection-change", x.value), x.value = null), b.value && (f.value.root.removeEventListener("blur", b.value), b.value = null), p.value && (f.value.root.removeEventListener("focus", p.value), p.value = null), f.value.selection = null, m.value) {
|
|
3180
3181
|
const P = m.value.parentElement?.querySelector(".ql-toolbar");
|
|
3181
3182
|
P && P.remove();
|
|
3182
3183
|
}
|
|
@@ -3184,17 +3185,17 @@ const po = ["for"], mo = {
|
|
|
3184
3185
|
}
|
|
3185
3186
|
}), O(() => t.modelValue, (P) => {
|
|
3186
3187
|
if (!f.value) return;
|
|
3187
|
-
|
|
3188
|
+
K() !== (P || "") && _(P || "");
|
|
3188
3189
|
}), O(() => t.disabled, (P) => {
|
|
3189
3190
|
f.value && f.value.enable(!P);
|
|
3190
3191
|
}), O(() => t.readonly, (P) => {
|
|
3191
3192
|
f.value && f.value.enable(!P);
|
|
3192
3193
|
}), O(o, async () => {
|
|
3193
3194
|
if (f.value) {
|
|
3194
|
-
const P =
|
|
3195
|
+
const P = K();
|
|
3195
3196
|
w.value && f.value.off("text-change", w.value), b.value && f.value.root.removeEventListener("blur", b.value), p.value && f.value.root.removeEventListener("focus", p.value);
|
|
3196
3197
|
const Q = m.value?.parentElement?.querySelector(".ql-toolbar");
|
|
3197
|
-
Q && Q.remove(), m.value && (m.value.innerHTML = ""), await
|
|
3198
|
+
Q && Q.remove(), m.value && (m.value.innerHTML = ""), await re(), await oe(), P && _(P);
|
|
3198
3199
|
}
|
|
3199
3200
|
}), (P, Q) => (i(), s("div", {
|
|
3200
3201
|
class: $({ "mb-3": d.value || c.value || v.value })
|
|
@@ -3209,7 +3210,7 @@ const po = ["for"], mo = {
|
|
|
3209
3210
|
], 8, po)) : g("", !0),
|
|
3210
3211
|
y.value ? (i(), s("div", yo, k(y.value), 1)) : (i(), s("div", {
|
|
3211
3212
|
key: 2,
|
|
3212
|
-
class: $(
|
|
3213
|
+
class: $(C.value),
|
|
3213
3214
|
style: Z({ minHeight: e.height })
|
|
3214
3215
|
}, [
|
|
3215
3216
|
S("div", {
|
|
@@ -3234,7 +3235,7 @@ const po = ["for"], mo = {
|
|
|
3234
3235
|
], 64)) : g("", !0)
|
|
3235
3236
|
], 2));
|
|
3236
3237
|
}
|
|
3237
|
-
}), Vo = /* @__PURE__ */ ae(wo, [["__scopeId", "data-v-
|
|
3238
|
+
}), Vo = /* @__PURE__ */ ae(wo, [["__scopeId", "data-v-822ccb91"]]), Co = {
|
|
3238
3239
|
key: 0,
|
|
3239
3240
|
class: "input-group-text"
|
|
3240
3241
|
}, xo = {
|
|
@@ -3393,63 +3394,63 @@ const Io = {
|
|
|
3393
3394
|
async: (e) => ({
|
|
3394
3395
|
validator: e
|
|
3395
3396
|
})
|
|
3396
|
-
},
|
|
3397
|
+
}, ce = "vibe-color-mode", ve = {
|
|
3397
3398
|
light: "dark",
|
|
3398
3399
|
dark: "auto",
|
|
3399
3400
|
auto: "light"
|
|
3400
|
-
},
|
|
3401
|
-
let
|
|
3402
|
-
const
|
|
3401
|
+
}, se = L("auto");
|
|
3402
|
+
let fe = !1;
|
|
3403
|
+
const he = [];
|
|
3403
3404
|
function To() {
|
|
3404
3405
|
return typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
3405
3406
|
}
|
|
3406
|
-
function
|
|
3407
|
+
function Ve(e) {
|
|
3407
3408
|
if (typeof document > "u") return;
|
|
3408
3409
|
const r = e === "auto" ? To() : e;
|
|
3409
3410
|
document.documentElement.setAttribute("data-bs-theme", r);
|
|
3410
3411
|
}
|
|
3411
|
-
function
|
|
3412
|
-
|
|
3412
|
+
function ie(e) {
|
|
3413
|
+
se.value = e, Ve(e), he.forEach((r) => r(e));
|
|
3413
3414
|
}
|
|
3414
|
-
|
|
3415
|
+
ie("auto");
|
|
3415
3416
|
typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
|
3416
|
-
|
|
3417
|
+
se.value === "auto" && (Ve("auto"), he.forEach((e) => e("auto")));
|
|
3417
3418
|
});
|
|
3418
3419
|
function Ro() {
|
|
3419
3420
|
function e(n) {
|
|
3420
|
-
if (n in
|
|
3421
|
+
if (n in ve) {
|
|
3421
3422
|
try {
|
|
3422
|
-
localStorage.setItem(
|
|
3423
|
+
localStorage.setItem(ce, n);
|
|
3423
3424
|
} catch {
|
|
3424
3425
|
}
|
|
3425
|
-
|
|
3426
|
+
ie(n);
|
|
3426
3427
|
}
|
|
3427
3428
|
}
|
|
3428
3429
|
function r() {
|
|
3429
|
-
if (
|
|
3430
|
+
if (fe) return;
|
|
3430
3431
|
let n = "auto";
|
|
3431
3432
|
try {
|
|
3432
|
-
const o = localStorage.getItem(
|
|
3433
|
-
o !== null && o in
|
|
3433
|
+
const o = localStorage.getItem(ce);
|
|
3434
|
+
o !== null && o in ve && (n = o);
|
|
3434
3435
|
} catch {
|
|
3435
3436
|
}
|
|
3436
|
-
|
|
3437
|
+
ie(n), fe = !0;
|
|
3437
3438
|
}
|
|
3438
3439
|
function t() {
|
|
3439
3440
|
try {
|
|
3440
|
-
localStorage.removeItem(
|
|
3441
|
+
localStorage.removeItem(ce);
|
|
3441
3442
|
} catch {
|
|
3442
3443
|
}
|
|
3443
|
-
|
|
3444
|
+
fe = !1, ie("auto");
|
|
3444
3445
|
}
|
|
3445
3446
|
function a() {
|
|
3446
|
-
e(
|
|
3447
|
+
e(ve[se.value] ?? "auto");
|
|
3447
3448
|
}
|
|
3448
3449
|
function l(n) {
|
|
3449
|
-
|
|
3450
|
+
he.push(n);
|
|
3450
3451
|
}
|
|
3451
3452
|
return {
|
|
3452
|
-
colorMode:
|
|
3453
|
+
colorMode: se,
|
|
3453
3454
|
setColorMode: e,
|
|
3454
3455
|
toggleColorMode: a,
|
|
3455
3456
|
initColorMode: r,
|
|
@@ -3504,7 +3505,7 @@ export {
|
|
|
3504
3505
|
oa as VibeToast,
|
|
3505
3506
|
ya as VibeTooltip,
|
|
3506
3507
|
Eo as default,
|
|
3507
|
-
|
|
3508
|
+
we as useBackButton,
|
|
3508
3509
|
ho as useBreakpoints,
|
|
3509
3510
|
Ro as useColorMode,
|
|
3510
3511
|
Mo as useFormValidation,
|