@wwtdev/bsds-components-vue3 2.1.2 → 2.1.4
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/lib/bsds-components.js +1646 -1115
- package/lib/components.css +1 -1
- package/package.json +3 -3
package/lib/bsds-components.js
CHANGED
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { v4 as
|
|
3
|
-
import { BsIconCaretDown as
|
|
4
|
-
import { Chart as
|
|
5
|
-
const
|
|
1
|
+
import { computed as g, ref as I, onMounted as F, onUnmounted as _, shallowRef as Ze, watch as z, defineAsyncComponent as me, openBlock as s, createElementBlock as v, unref as f, createElementVNode as $, renderSlot as L, createBlock as O, resolveDynamicComponent as H, createCommentVNode as w, toDisplayString as A, createVNode as D, normalizeClass as Q, useAttrs as U, mergeProps as M, withCtx as P, Fragment as R, renderList as G, createTextVNode as W, withDirectives as ye, Transition as Ie, vShow as Be, provide as ee, inject as te, nextTick as oe, Teleport as Je, onBeforeMount as Qe, isRef as _e, useSlots as et } from "vue";
|
|
2
|
+
import { v4 as tt } from "uuid";
|
|
3
|
+
import { BsIconCaretDown as Ve, BsIconWarning as ge, BsIconClose as de, BsIconSearch as at, BsIconCaretLeftDouble as nt, BsIconCaretLeft as lt, BsIconCaretRight as ot, BsIconCaretRightDouble as it, BsIconActionEllipsis as rt, BsIconCircleExclamation as st, BsIconThumbsUpStroke as dt } from "@wwtdev/bsds-icons-vue3";
|
|
4
|
+
import { Chart as be, BarController as ut, BarElement as ct, CategoryScale as ft, LinearScale as vt, Legend as pt, Tooltip as ht } from "chart.js";
|
|
5
|
+
const Te = {
|
|
6
6
|
href: "a",
|
|
7
7
|
linkTo: "a",
|
|
8
8
|
onclick: "button",
|
|
9
9
|
onClick: "button",
|
|
10
10
|
type: "button"
|
|
11
11
|
};
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
const i =
|
|
15
|
-
return i ? (
|
|
16
|
-
}), o =
|
|
17
|
-
const i = { ...a, ...
|
|
12
|
+
function ue(e, a, t = "button") {
|
|
13
|
+
const l = bt(e, a, t), n = g(() => {
|
|
14
|
+
const i = l.value === "button", r = {};
|
|
15
|
+
return i ? (r.type = a.type || "button", r.autocomplete = "off", e.disabled && (r.disabled = !0)) : e.disabled && (r["aria-disabled"] = "true", r.tabindex = "-1"), r;
|
|
16
|
+
}), o = g(() => {
|
|
17
|
+
const i = { ...a, ...n.value };
|
|
18
18
|
return delete i.href, i;
|
|
19
|
-
}), u =
|
|
20
|
-
return { rootTag:
|
|
19
|
+
}), u = g(() => e.linkTo || e.href);
|
|
20
|
+
return { rootTag: l, attrsToBind: o, hrefUrl: u };
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const
|
|
24
|
-
return I(
|
|
22
|
+
function bt(e, a, t) {
|
|
23
|
+
const l = Object.keys(Te).find((n) => gt(e, a, n));
|
|
24
|
+
return I(Te[l] || t);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function gt(e, a, t) {
|
|
27
27
|
return e[t] || a[t];
|
|
28
28
|
}
|
|
29
|
-
const
|
|
30
|
-
const t = (
|
|
31
|
-
e.some((
|
|
29
|
+
const mt = (e, a) => {
|
|
30
|
+
const t = (l) => {
|
|
31
|
+
e.some((n) => {
|
|
32
32
|
var o;
|
|
33
|
-
return (o =
|
|
34
|
-
}) || a(
|
|
33
|
+
return (o = n.value) == null ? void 0 : o.contains(l.target);
|
|
34
|
+
}) || a(l);
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
F(() => {
|
|
37
37
|
document.addEventListener("click", t);
|
|
38
|
-
}),
|
|
38
|
+
}), _(() => {
|
|
39
39
|
document.removeEventListener("click", t);
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
|
-
function
|
|
43
|
-
const a =
|
|
42
|
+
function ce(e) {
|
|
43
|
+
const a = g(() => e.linkTo || e.href || ""), t = g(() => {
|
|
44
44
|
var o, u;
|
|
45
45
|
return ((u = (o = a.value) == null ? void 0 : o.startsWith) == null ? void 0 : u.call(o, "/")) || !1;
|
|
46
|
-
}),
|
|
46
|
+
}), l = g(() => {
|
|
47
47
|
var o, u;
|
|
48
48
|
return t.value && ((o = e.router) == null ? void 0 : o.navigateTo) || ((u = e.router) == null ? void 0 : u.push) || null;
|
|
49
49
|
});
|
|
50
|
-
function
|
|
50
|
+
function n(o) {
|
|
51
51
|
if (e.disabled) {
|
|
52
52
|
o.preventDefault(), o.stopImmediatePropagation();
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
if (!a.value || !
|
|
55
|
+
if (!a.value || !l.value)
|
|
56
56
|
return;
|
|
57
|
-
o.target.closest("a").href === `${window.location.origin}${a.value}` && (o.preventDefault(),
|
|
57
|
+
o.target.closest("a").href === `${window.location.origin}${a.value}` && (o.preventDefault(), l.value(a.value));
|
|
58
58
|
}
|
|
59
|
-
return { onLinkClick:
|
|
59
|
+
return { onLinkClick: n };
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
return e.split("-").map((
|
|
61
|
+
function xe(e) {
|
|
62
|
+
return e.split("-").map((l) => l.charAt(0).toUpperCase() + l.slice(1)).join("");
|
|
63
63
|
}
|
|
64
|
-
const
|
|
65
|
-
function t(
|
|
66
|
-
if (!
|
|
64
|
+
const se = (e, a) => {
|
|
65
|
+
function t(n) {
|
|
66
|
+
if (!n)
|
|
67
67
|
return null;
|
|
68
|
-
const o =
|
|
69
|
-
return
|
|
68
|
+
const o = n.startsWith("bs-") ? xe(n) : `BsIcon${xe(n)}`;
|
|
69
|
+
return me(async () => {
|
|
70
70
|
const { [o]: u } = await import("@wwtdev/bsds-icons-vue3");
|
|
71
71
|
return u;
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
return
|
|
74
|
+
const l = Ze();
|
|
75
|
+
return l.value = t(e[a]), z(() => e[a], async (n) => l.value = t(n)), { icon: l };
|
|
76
76
|
};
|
|
77
|
-
function
|
|
77
|
+
function K(e = 1) {
|
|
78
78
|
const a = [];
|
|
79
79
|
for (let t = 0; t < e; t++)
|
|
80
80
|
a.push(I(""));
|
|
81
|
-
return
|
|
82
|
-
a.forEach((t) => t.value =
|
|
81
|
+
return F(() => {
|
|
82
|
+
a.forEach((t) => t.value = `id-${tt()}`);
|
|
83
83
|
}), a;
|
|
84
84
|
}
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
e.includes(
|
|
85
|
+
const fe = (e, a, t = void 0) => {
|
|
86
|
+
const l = (n) => {
|
|
87
|
+
e.includes(n.key) && a(n);
|
|
88
88
|
};
|
|
89
|
-
|
|
90
|
-
((t == null ? void 0 : t.value) ?? document).addEventListener("keydown",
|
|
91
|
-
}),
|
|
92
|
-
((t == null ? void 0 : t.value) ?? document).removeEventListener("keydown",
|
|
89
|
+
F(() => {
|
|
90
|
+
((t == null ? void 0 : t.value) ?? document).addEventListener("keydown", l);
|
|
91
|
+
}), _(() => {
|
|
92
|
+
((t == null ? void 0 : t.value) ?? document).removeEventListener("keydown", l);
|
|
93
93
|
});
|
|
94
|
-
},
|
|
95
|
-
let
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}),
|
|
99
|
-
|
|
94
|
+
}, yt = (e, a, t) => {
|
|
95
|
+
let l = null;
|
|
96
|
+
F(() => {
|
|
97
|
+
l = new MutationObserver(a), l.observe(e.value, t);
|
|
98
|
+
}), _(() => {
|
|
99
|
+
l.disconnect();
|
|
100
100
|
});
|
|
101
101
|
};
|
|
102
|
-
function
|
|
103
|
-
var i,
|
|
104
|
-
const
|
|
105
|
-
|
|
102
|
+
function ae(e, a, t = []) {
|
|
103
|
+
var i, r;
|
|
104
|
+
const l = ((r = (i = e.passAttrs) == null ? void 0 : i.split) == null ? void 0 : r.call(i, ",")) || [], n = /* @__PURE__ */ new Set([...l, ...t]);
|
|
105
|
+
n.delete("");
|
|
106
106
|
const o = I({}), u = I({});
|
|
107
|
-
for (let
|
|
108
|
-
|
|
107
|
+
for (let d in a)
|
|
108
|
+
n.has(d) ? u.value[d] = a[d] : o.value[d] = a[d];
|
|
109
109
|
return {
|
|
110
110
|
toRoot: o,
|
|
111
111
|
toChild: u
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
const
|
|
114
|
+
const ve = (e) => {
|
|
115
115
|
const a = I(!1);
|
|
116
|
-
return
|
|
116
|
+
return F(() => {
|
|
117
117
|
a.value = e.enterControlled || e.preloaded ? e.enterTrigger : e.shown;
|
|
118
|
-
}),
|
|
118
|
+
}), z(() => e.shown, (t) => {
|
|
119
119
|
a.value = t;
|
|
120
|
-
}),
|
|
120
|
+
}), z(() => e.enterTrigger, (t) => {
|
|
121
121
|
a.value = t;
|
|
122
|
-
}),
|
|
122
|
+
}), z(() => e.leaveTrigger, (t) => {
|
|
123
123
|
t && (a.value = !1);
|
|
124
124
|
}), { transition: a };
|
|
125
|
-
},
|
|
125
|
+
}, Bt = ["id", "data-stacked"], $t = ["data-open"], St = ["aria-controls", "aria-expanded"], wt = {
|
|
126
126
|
key: 0,
|
|
127
127
|
"data-position": "start",
|
|
128
128
|
style: { display: "inline-flex" }
|
|
129
|
-
},
|
|
129
|
+
}, kt = ["id", "aria-level"], It = ["aria-labelledby", "data-open", "id"], Xn = {
|
|
130
130
|
__name: "BsAccordion",
|
|
131
131
|
props: {
|
|
132
132
|
controlled: { type: Boolean, default: !1 },
|
|
@@ -142,59 +142,59 @@ const de = (e) => {
|
|
|
142
142
|
},
|
|
143
143
|
emits: ["toggled"],
|
|
144
144
|
setup(e, { emit: a }) {
|
|
145
|
-
const t = e,
|
|
146
|
-
function
|
|
147
|
-
|
|
145
|
+
const t = e, l = a, n = I(null), o = I(!1), { icon: u } = se(t, "icon"), [i] = K(), r = g(() => i.value + "-content"), d = g(() => i.value + "-title"), c = g(() => t.openItemId && t.openItemId === i.value || t.openItem === !0), p = g(() => t.controlled ? c.value : o.value);
|
|
146
|
+
function h() {
|
|
147
|
+
l("toggled", i.value), t.controlled || (o.value = !o.value);
|
|
148
148
|
}
|
|
149
|
-
return (
|
|
150
|
-
id:
|
|
149
|
+
return (m, V) => (s(), v("div", {
|
|
150
|
+
id: f(i),
|
|
151
151
|
ref_key: "containerRef",
|
|
152
|
-
ref:
|
|
152
|
+
ref: n,
|
|
153
153
|
class: "bs-accordion",
|
|
154
154
|
"data-component": "bs-accordion",
|
|
155
155
|
"data-stacked": e.stacked
|
|
156
156
|
}, [
|
|
157
|
-
|
|
157
|
+
$("header", {
|
|
158
158
|
part: "header",
|
|
159
|
-
"data-open":
|
|
159
|
+
"data-open": p.value
|
|
160
160
|
}, [
|
|
161
|
-
|
|
162
|
-
"aria-controls":
|
|
163
|
-
"aria-expanded":
|
|
161
|
+
$("button", {
|
|
162
|
+
"aria-controls": r.value,
|
|
163
|
+
"aria-expanded": p.value,
|
|
164
164
|
type: "button",
|
|
165
|
-
onClick:
|
|
165
|
+
onClick: h
|
|
166
166
|
}, [
|
|
167
|
-
e.icon ||
|
|
168
|
-
|
|
169
|
-
e.icon ? (
|
|
167
|
+
e.icon || m.$slots.icon ? (s(), v("span", wt, [
|
|
168
|
+
L(m.$slots, "icon", {}, () => [
|
|
169
|
+
e.icon ? (s(), O(H(f(u) ? f(u) : "span"), { key: 0 })) : w("", !0)
|
|
170
170
|
])
|
|
171
|
-
])) :
|
|
172
|
-
|
|
173
|
-
id:
|
|
171
|
+
])) : w("", !0),
|
|
172
|
+
$("span", {
|
|
173
|
+
id: d.value,
|
|
174
174
|
"aria-level": e.headingLevel,
|
|
175
175
|
role: "heading"
|
|
176
|
-
},
|
|
177
|
-
|
|
176
|
+
}, A(e.headerText), 9, kt),
|
|
177
|
+
D(f(Ve), {
|
|
178
178
|
size: "md",
|
|
179
179
|
"data-position": "end"
|
|
180
180
|
})
|
|
181
|
-
], 8,
|
|
182
|
-
], 8,
|
|
183
|
-
|
|
184
|
-
"aria-labelledby":
|
|
181
|
+
], 8, St)
|
|
182
|
+
], 8, $t),
|
|
183
|
+
$("div", {
|
|
184
|
+
"aria-labelledby": d.value,
|
|
185
185
|
class: "bs-accordion-content",
|
|
186
|
-
"data-open":
|
|
187
|
-
id:
|
|
186
|
+
"data-open": p.value,
|
|
187
|
+
id: r.value,
|
|
188
188
|
part: "content",
|
|
189
189
|
role: "region"
|
|
190
190
|
}, [
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
$("div", null, [
|
|
192
|
+
L(m.$slots, "default")
|
|
193
193
|
])
|
|
194
|
-
], 8,
|
|
195
|
-
], 8,
|
|
194
|
+
], 8, It)
|
|
195
|
+
], 8, Bt));
|
|
196
196
|
}
|
|
197
|
-
},
|
|
197
|
+
}, Tt = ["data-badge-color", "data-count", "data-position", "data-show-zero", "data-variant", "aria-label"], xt = {
|
|
198
198
|
__name: "BsBadge",
|
|
199
199
|
props: {
|
|
200
200
|
/** Pass value to set `data-badge-color`. */
|
|
@@ -241,60 +241,60 @@ const de = (e) => {
|
|
|
241
241
|
}
|
|
242
242
|
},
|
|
243
243
|
setup(e) {
|
|
244
|
-
const a = e, t = I(null),
|
|
245
|
-
var
|
|
246
|
-
const o = ((
|
|
244
|
+
const a = e, t = I(null), l = g(() => a.count === 0 ? "0" : !a.count || a.dot ? null : a.count > a.countMax ? a.countMax + "+" : a.count.toString()), n = g(() => {
|
|
245
|
+
var r, d;
|
|
246
|
+
const o = ((d = (r = t.value) == null ? void 0 : r.textContent) == null ? void 0 : d.trim()) || "", u = l.value ? l.value + " " : "";
|
|
247
247
|
if (!u && !a.dot)
|
|
248
248
|
return o;
|
|
249
249
|
const i = a.count !== 1 ? "s" : "";
|
|
250
250
|
return `${o ? `${o}, ` : ""}${u}${a.label}${i}`;
|
|
251
251
|
});
|
|
252
|
-
return (o, u) => (
|
|
252
|
+
return (o, u) => (s(), v("span", {
|
|
253
253
|
ref_key: "hostRef",
|
|
254
254
|
ref: t,
|
|
255
|
-
class:
|
|
255
|
+
class: Q({ "bs-badge": e.dot || l.value }),
|
|
256
256
|
"data-badge-color": e.color,
|
|
257
257
|
"data-component": "bs-badge",
|
|
258
|
-
"data-count":
|
|
258
|
+
"data-count": l.value,
|
|
259
259
|
"data-position": e.position,
|
|
260
260
|
"data-show-zero": e.showZero,
|
|
261
261
|
"data-variant": e.variant,
|
|
262
|
-
"aria-label":
|
|
262
|
+
"aria-label": n.value
|
|
263
263
|
}, [
|
|
264
|
-
e.variant !== "notext" ?
|
|
265
|
-
], 10,
|
|
264
|
+
e.variant !== "notext" ? L(o.$slots, "default", { key: 0 }) : w("", !0)
|
|
265
|
+
], 10, Tt));
|
|
266
266
|
}
|
|
267
|
-
},
|
|
267
|
+
}, Ct = {
|
|
268
268
|
key: 0,
|
|
269
269
|
role: "alert",
|
|
270
270
|
class: "bs-banner"
|
|
271
|
-
},
|
|
271
|
+
}, At = { class: "bs-banner-content" }, Lt = { class: "bs-banner-warning-icon" }, Zn = {
|
|
272
272
|
__name: "BsBanner",
|
|
273
273
|
emits: ["dismiss"],
|
|
274
274
|
setup(e, { emit: a }) {
|
|
275
|
-
const t = a,
|
|
276
|
-
function
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
return (o, u) =>
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
275
|
+
const t = a, l = I(!1);
|
|
276
|
+
function n() {
|
|
277
|
+
l.value = !0, t("dismiss");
|
|
278
|
+
}
|
|
279
|
+
return (o, u) => l.value ? w("", !0) : (s(), v("div", Ct, [
|
|
280
|
+
$("div", At, [
|
|
281
|
+
$("div", Lt, [
|
|
282
|
+
D(f(ge), { size: "lg" })
|
|
283
283
|
]),
|
|
284
|
-
|
|
285
|
-
|
|
284
|
+
$("p", null, [
|
|
285
|
+
L(o.$slots, "default")
|
|
286
286
|
]),
|
|
287
|
-
|
|
287
|
+
$("button", {
|
|
288
288
|
type: "button",
|
|
289
289
|
title: "Close Banner",
|
|
290
|
-
onClick:
|
|
290
|
+
onClick: n
|
|
291
291
|
}, [
|
|
292
|
-
|
|
292
|
+
D(f(de))
|
|
293
293
|
])
|
|
294
294
|
])
|
|
295
295
|
]));
|
|
296
296
|
}
|
|
297
|
-
},
|
|
297
|
+
}, Vt = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
298
298
|
__name: "BsButton",
|
|
299
299
|
props: {
|
|
300
300
|
variant: { type: String },
|
|
@@ -305,26 +305,26 @@ const de = (e) => {
|
|
|
305
305
|
linkTo: { type: String },
|
|
306
306
|
router: {},
|
|
307
307
|
textBtn: { type: Boolean, default: !1 },
|
|
308
|
-
size: { type: String, validator: (e) => ["sm", "xs"].includes(e) }
|
|
308
|
+
size: { type: String, validator: (e) => ["sm", "xs", "xxs"].includes(e) }
|
|
309
309
|
},
|
|
310
310
|
setup(e) {
|
|
311
|
-
const a = e, t =
|
|
312
|
-
return (i,
|
|
311
|
+
const a = e, t = U(), { rootTag: l, attrsToBind: n, hrefUrl: o } = ue(a, t), { onLinkClick: u } = ce(a);
|
|
312
|
+
return (i, r) => (s(), O(H(f(l)), M({
|
|
313
313
|
class: "bs-button",
|
|
314
314
|
"data-component": "bs-button",
|
|
315
315
|
"data-ghost": e.ghostBtn,
|
|
316
316
|
"data-size": e.size,
|
|
317
317
|
"data-text": e.textBtn,
|
|
318
318
|
"data-variant": e.variant,
|
|
319
|
-
".href":
|
|
320
|
-
},
|
|
321
|
-
default:
|
|
322
|
-
|
|
319
|
+
".href": f(o)
|
|
320
|
+
}, f(n), { onClick: f(u) }), {
|
|
321
|
+
default: P(() => [
|
|
322
|
+
L(i.$slots, "default")
|
|
323
323
|
]),
|
|
324
324
|
_: 3
|
|
325
325
|
}, 48, ["data-ghost", "data-size", "data-text", "data-variant", ".href", "onClick"]));
|
|
326
326
|
}
|
|
327
|
-
}),
|
|
327
|
+
}), Et = { "data-component": "bs-chart-table" }, Pt = ["summary"], Ot = ["colspan"], Dt = /* @__PURE__ */ $("th", { scope: "col" }, " Dataset ", -1), qt = { scope: "row" }, Mt = {
|
|
328
328
|
__name: "BsChartTable",
|
|
329
329
|
props: {
|
|
330
330
|
data: {
|
|
@@ -342,53 +342,53 @@ const de = (e) => {
|
|
|
342
342
|
},
|
|
343
343
|
setup(e) {
|
|
344
344
|
return (a, t) => {
|
|
345
|
-
var
|
|
346
|
-
return
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
colspan: ((
|
|
352
|
-
},
|
|
345
|
+
var l;
|
|
346
|
+
return s(), v("div", Et, [
|
|
347
|
+
$("table", { summary: e.tableTitle }, [
|
|
348
|
+
$("thead", null, [
|
|
349
|
+
$("tr", null, [
|
|
350
|
+
$("th", {
|
|
351
|
+
colspan: ((l = e.dataIdxLabels) == null ? void 0 : l.length) + 1
|
|
352
|
+
}, A(e.tableTitle), 9, Ot)
|
|
353
353
|
]),
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
(
|
|
357
|
-
key:
|
|
354
|
+
$("tr", null, [
|
|
355
|
+
Dt,
|
|
356
|
+
(s(!0), v(R, null, G(e.dataIdxLabels, (n) => (s(), v("th", {
|
|
357
|
+
key: n,
|
|
358
358
|
scope: "col"
|
|
359
|
-
},
|
|
359
|
+
}, A(n), 1))), 128))
|
|
360
360
|
])
|
|
361
361
|
]),
|
|
362
|
-
|
|
363
|
-
(
|
|
364
|
-
key:
|
|
362
|
+
$("tbody", null, [
|
|
363
|
+
(s(!0), v(R, null, G(e.data, (n) => (s(), v("tr", {
|
|
364
|
+
key: n.label
|
|
365
365
|
}, [
|
|
366
|
-
|
|
367
|
-
(
|
|
366
|
+
$("th", qt, A(n.label), 1),
|
|
367
|
+
(s(!0), v(R, null, G(n.data, (o, u) => (s(), v("td", {
|
|
368
368
|
key: `${o}${u}`
|
|
369
|
-
},
|
|
369
|
+
}, A(o), 1))), 128))
|
|
370
370
|
]))), 128))
|
|
371
371
|
])
|
|
372
|
-
], 8,
|
|
372
|
+
], 8, Pt)
|
|
373
373
|
]);
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
|
-
},
|
|
376
|
+
}, zt = (e) => ({
|
|
377
377
|
id: "htmlLegend",
|
|
378
378
|
afterUpdate(a) {
|
|
379
|
-
e.innerHTML = "", e.style.setProperty("--legend-padding", `${a.scales.x.left}px`), a.options.plugins.legend.labels.generateLabels(a).forEach((
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
const { type:
|
|
383
|
-
|
|
379
|
+
e.innerHTML = "", e.style.setProperty("--legend-padding", `${a.scales.x.left}px`), a.options.plugins.legend.labels.generateLabels(a).forEach((l) => {
|
|
380
|
+
const n = document.createElement("li");
|
|
381
|
+
n.onclick = () => {
|
|
382
|
+
const { type: r } = a.config._config;
|
|
383
|
+
r === "pie" || r === "doughnut" ? a.toggleDataVisibility(l.index) : a.setDatasetVisibility(l.datasetIndex, !a.isDatasetVisible(l.datasetIndex)), a.update();
|
|
384
384
|
};
|
|
385
385
|
const o = document.createElement("span");
|
|
386
|
-
o.style.setProperty("--item-box-fill",
|
|
387
|
-
const u = document.createTextNode(
|
|
388
|
-
i.style.setProperty("--item-text-color",
|
|
386
|
+
o.style.setProperty("--item-box-fill", l.fillStyle), o.style.setProperty("--item-box-stroke", l.strokeStyle);
|
|
387
|
+
const u = document.createTextNode(l.text), i = document.createElement("p");
|
|
388
|
+
i.style.setProperty("--item-text-color", l.fontColor), i.style.setProperty("--item-text-decoration", l.hidden ? "line-through" : "none"), i.appendChild(u), n.appendChild(o), n.appendChild(i), e.appendChild(n);
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
-
}),
|
|
391
|
+
}), Rt = ({ type: e, datasets: a, labels: t, tooltips: l }) => ({
|
|
392
392
|
type: e,
|
|
393
393
|
data: {
|
|
394
394
|
datasets: a,
|
|
@@ -401,13 +401,13 @@ const de = (e) => {
|
|
|
401
401
|
display: !1
|
|
402
402
|
},
|
|
403
403
|
tooltip: {
|
|
404
|
-
enabled:
|
|
404
|
+
enabled: l
|
|
405
405
|
}
|
|
406
406
|
},
|
|
407
407
|
responsive: !0
|
|
408
408
|
}
|
|
409
409
|
});
|
|
410
|
-
function
|
|
410
|
+
function Nt(e) {
|
|
411
411
|
const a = [
|
|
412
412
|
"rgba(209, 26, 111, 1)",
|
|
413
413
|
"rgba(130, 18, 196, 1)",
|
|
@@ -420,19 +420,19 @@ function Et(e) {
|
|
|
420
420
|
], t = a[e % a.length];
|
|
421
421
|
return e >= a.length ? t.replace("1)", "0.5)") : t;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
let
|
|
423
|
+
function Ce(e, a, t) {
|
|
424
|
+
let l;
|
|
425
425
|
return function() {
|
|
426
|
-
let
|
|
427
|
-
clearTimeout(
|
|
428
|
-
|
|
426
|
+
let n = this, o = arguments;
|
|
427
|
+
clearTimeout(l), t && !l && e.apply(n, o), l = setTimeout(function() {
|
|
428
|
+
l = null, t || e.apply(n, o);
|
|
429
429
|
}, a);
|
|
430
430
|
};
|
|
431
431
|
}
|
|
432
|
-
const
|
|
432
|
+
const jt = {
|
|
433
433
|
class: "bs-chart-bar",
|
|
434
434
|
"data-component": "bs-chart-bar"
|
|
435
|
-
},
|
|
435
|
+
}, Wt = ["aria-label"], Ft = ["data-hidden"], Jn = {
|
|
436
436
|
__name: "BsChartBar",
|
|
437
437
|
props: {
|
|
438
438
|
chartTitle: {
|
|
@@ -486,16 +486,16 @@ const Dt = {
|
|
|
486
486
|
}
|
|
487
487
|
},
|
|
488
488
|
setup(e) {
|
|
489
|
-
const a = e, t = I(null),
|
|
490
|
-
let
|
|
491
|
-
const o =
|
|
489
|
+
const a = e, t = I(null), l = I(null);
|
|
490
|
+
let n;
|
|
491
|
+
const o = g(() => {
|
|
492
492
|
const c = {
|
|
493
493
|
datasets: u.value,
|
|
494
494
|
labels: a.dataIdxLabels,
|
|
495
495
|
type: "bar",
|
|
496
496
|
tooltips: a.showTooltips
|
|
497
|
-
},
|
|
498
|
-
return
|
|
497
|
+
}, p = Rt(c);
|
|
498
|
+
return p.plugins = [zt(l.value)], p.options.scales = {
|
|
499
499
|
x: {
|
|
500
500
|
grid: {
|
|
501
501
|
display: a.showXGrid
|
|
@@ -516,50 +516,50 @@ const Dt = {
|
|
|
516
516
|
text: a.yLabel
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
},
|
|
520
|
-
}), u =
|
|
519
|
+
}, p;
|
|
520
|
+
}), u = g(() => a.data.map((c, p) => ({
|
|
521
521
|
...c,
|
|
522
|
-
backgroundColor:
|
|
522
|
+
backgroundColor: Nt(p),
|
|
523
523
|
categoryPercentage: a.data.length > 1 ? 0.5 : 0.33
|
|
524
|
-
}))), i =
|
|
525
|
-
!
|
|
526
|
-
}, 100),
|
|
527
|
-
|
|
524
|
+
}))), i = g(() => a.chartTitle || `${a.yLabel} / ${a.xLabel}`), r = Ce(function(c, p) {
|
|
525
|
+
!n || c === p || (n.options = o.value.options, n.update());
|
|
526
|
+
}, 100), d = Ce(function() {
|
|
527
|
+
n && (n.data = o.value.data, n.update());
|
|
528
528
|
}, 100);
|
|
529
|
-
return
|
|
530
|
-
|
|
531
|
-
}),
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
529
|
+
return F(() => {
|
|
530
|
+
be.register(ut, ct, ft, vt, pt, ht), be.defaults.font.family = "'Roobert', sans-serif", n = new be(t.value, o.value);
|
|
531
|
+
}), z(() => a.showLegend, r), z(() => a.showTooltips, r), z(() => a.showXGrid, r), z(() => a.showYGrid, r), z(() => a.stacked, r), z(() => a.xLabel, r), z(() => a.yLabel, r), z(() => a.data, d), z(() => a.dataIdxLabels, d), (c, p) => (s(), v("div", jt, [
|
|
532
|
+
$("figure", null, [
|
|
533
|
+
$("div", null, [
|
|
534
|
+
$("canvas", {
|
|
535
535
|
"aria-label": i.value,
|
|
536
536
|
ref_key: "canvas",
|
|
537
537
|
ref: t,
|
|
538
538
|
role: "img"
|
|
539
|
-
}, null, 8,
|
|
539
|
+
}, null, 8, Wt)
|
|
540
540
|
]),
|
|
541
|
-
|
|
542
|
-
|
|
541
|
+
$("div", null, [
|
|
542
|
+
D(Mt, {
|
|
543
543
|
data: e.data,
|
|
544
544
|
"data-idx-labels": e.dataIdxLabels,
|
|
545
545
|
"table-title": i.value
|
|
546
546
|
}, null, 8, ["data", "data-idx-labels", "table-title"]),
|
|
547
|
-
|
|
547
|
+
$("figcaption", {
|
|
548
548
|
"data-hidden": !e.showLegend
|
|
549
549
|
}, [
|
|
550
|
-
|
|
550
|
+
$("ul", {
|
|
551
551
|
ref_key: "legendList",
|
|
552
|
-
ref:
|
|
552
|
+
ref: l
|
|
553
553
|
}, null, 512)
|
|
554
|
-
], 8,
|
|
554
|
+
], 8, Ft)
|
|
555
555
|
])
|
|
556
556
|
])
|
|
557
557
|
]));
|
|
558
558
|
}
|
|
559
|
-
},
|
|
559
|
+
}, Ut = ["data-disabled", "for"], Gt = /* @__PURE__ */ $("span", {
|
|
560
560
|
"data-required": "true",
|
|
561
561
|
"aria-hidden": "true"
|
|
562
|
-
}, " *", -1),
|
|
562
|
+
}, " *", -1), Ht = /* @__PURE__ */ $("span", { class: "visually-hidden" }, "required", -1), ne = {
|
|
563
563
|
__name: "BsLabel",
|
|
564
564
|
props: {
|
|
565
565
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -568,22 +568,22 @@ const Dt = {
|
|
|
568
568
|
required: { type: Boolean, default: !1 }
|
|
569
569
|
},
|
|
570
570
|
setup(e) {
|
|
571
|
-
return (a, t) => (
|
|
572
|
-
class:
|
|
571
|
+
return (a, t) => (s(), v("label", {
|
|
572
|
+
class: Q(["bs-label", e.hide ? "visually-hidden" : ""]),
|
|
573
573
|
"data-component": "bs-label",
|
|
574
574
|
"data-disabled": e.disabled,
|
|
575
575
|
for: e.for
|
|
576
576
|
}, [
|
|
577
|
-
|
|
578
|
-
|
|
577
|
+
$("span", null, [
|
|
578
|
+
L(a.$slots, "default")
|
|
579
579
|
]),
|
|
580
|
-
e.required ? (
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
], 64)) :
|
|
584
|
-
], 10,
|
|
580
|
+
e.required ? (s(), v(R, { key: 0 }, [
|
|
581
|
+
Gt,
|
|
582
|
+
Ht
|
|
583
|
+
], 64)) : w("", !0)
|
|
584
|
+
], 10, Ut));
|
|
585
585
|
}
|
|
586
|
-
},
|
|
586
|
+
}, Kt = ["data-size"], Yt = ["checked", "data-error", "disabled", "id", "required", "value"], Ae = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
587
587
|
__name: "BsCheckbox",
|
|
588
588
|
props: {
|
|
589
589
|
/** Sets the label. */
|
|
@@ -641,54 +641,54 @@ const Dt = {
|
|
|
641
641
|
},
|
|
642
642
|
emits: ["update:modelValue"],
|
|
643
643
|
setup(e, { emit: a }) {
|
|
644
|
-
const t = e,
|
|
645
|
-
function
|
|
646
|
-
|
|
644
|
+
const t = e, l = a, n = U(), [o] = K(), { toChild: u, toRoot: i } = ae(t, n, ["aria-label", "name", "value"]), r = I(null), d = g(() => t.inputId || o.value), c = g(() => t.checked || h.value), p = g(() => Array.isArray(t.modelValue) && t.value), h = g(() => p.value && t.modelValue.includes(t.value) || typeof t.modelValue == "boolean" && t.modelValue);
|
|
645
|
+
function m() {
|
|
646
|
+
r.value && (r.value.indeterminate = t.checkedPartially && !c.value);
|
|
647
647
|
}
|
|
648
|
-
function
|
|
649
|
-
|
|
648
|
+
function V(E) {
|
|
649
|
+
l("update:modelValue", E);
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function T(E) {
|
|
652
652
|
const y = [...t.modelValue];
|
|
653
|
-
|
|
653
|
+
E ? y.push(t.value) : y.splice(y.indexOf(t.value), 1), l("update:modelValue", y);
|
|
654
654
|
}
|
|
655
|
-
function
|
|
656
|
-
const { checked: y } =
|
|
657
|
-
|
|
655
|
+
function k(E) {
|
|
656
|
+
const { checked: y } = E.target;
|
|
657
|
+
p.value ? T(y) : V(y);
|
|
658
658
|
}
|
|
659
|
-
return
|
|
659
|
+
return z(c, m), z(() => t.checkedPartially, m), (E, y) => (s(), v("div", M({
|
|
660
660
|
class: "bs-boolean",
|
|
661
661
|
"data-component": "bs-checkbox",
|
|
662
662
|
"data-size": e.size
|
|
663
|
-
},
|
|
664
|
-
|
|
663
|
+
}, f(i)), [
|
|
664
|
+
$("input", M({
|
|
665
665
|
ref_key: "inputEl",
|
|
666
|
-
ref:
|
|
666
|
+
ref: r,
|
|
667
667
|
checked: c.value,
|
|
668
668
|
"data-error": e.error,
|
|
669
669
|
disabled: e.disabled,
|
|
670
|
-
id:
|
|
670
|
+
id: d.value,
|
|
671
671
|
required: e.required,
|
|
672
672
|
value: e.value || "on",
|
|
673
673
|
type: "checkbox",
|
|
674
|
-
onChange:
|
|
675
|
-
},
|
|
676
|
-
e.label ||
|
|
674
|
+
onChange: k
|
|
675
|
+
}, f(u)), null, 16, Yt),
|
|
676
|
+
e.label || E.$slots.label ? (s(), O(ne, {
|
|
677
677
|
key: 0,
|
|
678
|
-
for:
|
|
678
|
+
for: d.value,
|
|
679
679
|
disabled: e.disabled,
|
|
680
680
|
required: e.required
|
|
681
681
|
}, {
|
|
682
|
-
default:
|
|
683
|
-
|
|
684
|
-
|
|
682
|
+
default: P(() => [
|
|
683
|
+
L(E.$slots, "label", {}, () => [
|
|
684
|
+
W(A(e.label), 1)
|
|
685
685
|
])
|
|
686
686
|
]),
|
|
687
687
|
_: 3
|
|
688
|
-
}, 8, ["for", "disabled", "required"])) :
|
|
689
|
-
], 16,
|
|
688
|
+
}, 8, ["for", "disabled", "required"])) : w("", !0)
|
|
689
|
+
], 16, Kt));
|
|
690
690
|
}
|
|
691
|
-
}),
|
|
691
|
+
}), Xt = { key: 0 }, Zt = { class: "bs-circle-button-icon" }, Jt = { key: 1 }, Qn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
692
692
|
__name: "BsCircleButton",
|
|
693
693
|
props: {
|
|
694
694
|
disabled: {
|
|
@@ -730,37 +730,36 @@ const Dt = {
|
|
|
730
730
|
},
|
|
731
731
|
size: {
|
|
732
732
|
type: String,
|
|
733
|
-
validator: (e) => ["sm", "
|
|
734
|
-
default: "lg"
|
|
733
|
+
validator: (e) => ["sm", "xs"].includes(e)
|
|
735
734
|
}
|
|
736
735
|
},
|
|
737
736
|
setup(e) {
|
|
738
|
-
const a = e, t =
|
|
737
|
+
const a = e, t = U(), { rootTag: l, attrsToBind: n, hrefUrl: o } = ue(a, t), { icon: u } = se(a, "icon"), { onLinkClick: i } = ce(a), r = g(() => a.textBtn ? {} : a.href ? { title: a.label } : { "aria-label": a.label }), d = g(() => {
|
|
739
738
|
if (a.hoverEffect)
|
|
740
739
|
return a.iconPosition;
|
|
741
|
-
}), c =
|
|
742
|
-
return (
|
|
740
|
+
}), c = g(() => a.textBtn && a.iconPosition !== "left"), p = g(() => a.textBtn && a.iconPosition === "left");
|
|
741
|
+
return (h, m) => (s(), O(H(f(l)), M({
|
|
743
742
|
class: "bs-circle-button",
|
|
744
743
|
"data-disabled": e.disabled,
|
|
745
|
-
"data-direction":
|
|
744
|
+
"data-direction": d.value,
|
|
746
745
|
"data-ghost": e.ghostBtn,
|
|
747
746
|
"data-size": e.size,
|
|
748
747
|
"data-text": e.textBtn,
|
|
749
|
-
".href":
|
|
750
|
-
}, { ...
|
|
751
|
-
default:
|
|
752
|
-
c.value ? (
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
(
|
|
748
|
+
".href": f(o)
|
|
749
|
+
}, { ...f(n), ...r.value }, { onClick: f(i) }), {
|
|
750
|
+
default: P(() => [
|
|
751
|
+
c.value ? (s(), v("span", Xt, A(e.label), 1)) : w("", !0),
|
|
752
|
+
$("span", Zt, [
|
|
753
|
+
L(h.$slots, "icon", {}, () => [
|
|
754
|
+
(s(), O(H(f(u)), { size: e.size }, null, 8, ["size"]))
|
|
756
755
|
])
|
|
757
756
|
]),
|
|
758
|
-
|
|
757
|
+
p.value ? (s(), v("span", Jt, A(e.label), 1)) : w("", !0)
|
|
759
758
|
]),
|
|
760
759
|
_: 3
|
|
761
760
|
}, 48, ["data-disabled", "data-direction", "data-ghost", "data-size", "data-text", ".href", "onClick"]));
|
|
762
761
|
}
|
|
763
|
-
}),
|
|
762
|
+
}), pe = {
|
|
764
763
|
__name: "BsTransition",
|
|
765
764
|
props: {
|
|
766
765
|
shown: {
|
|
@@ -803,72 +802,72 @@ const Dt = {
|
|
|
803
802
|
"leave-cancelled"
|
|
804
803
|
],
|
|
805
804
|
setup(e, { emit: a }) {
|
|
806
|
-
const t = e,
|
|
807
|
-
function o(
|
|
808
|
-
const { duration: c, enterClass:
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
}, c)),
|
|
805
|
+
const t = e, l = a, n = [];
|
|
806
|
+
function o(r, d) {
|
|
807
|
+
const { duration: c, enterClass: p, enterAttribute: h } = t;
|
|
808
|
+
n.push(setTimeout(() => {
|
|
809
|
+
p && r.classList.add(p), h && r.setAttribute(h, ""), n.push(setTimeout(() => {
|
|
810
|
+
d();
|
|
811
|
+
}, c)), l("enter", r);
|
|
813
812
|
}));
|
|
814
813
|
}
|
|
815
|
-
function u(
|
|
814
|
+
function u(r, d) {
|
|
816
815
|
const {
|
|
817
816
|
duration: c,
|
|
818
|
-
enterClass:
|
|
819
|
-
enterAttribute:
|
|
820
|
-
leaveClass:
|
|
821
|
-
leaveAttribute:
|
|
817
|
+
enterClass: p,
|
|
818
|
+
enterAttribute: h,
|
|
819
|
+
leaveClass: m,
|
|
820
|
+
leaveAttribute: V
|
|
822
821
|
} = t;
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
}, c)),
|
|
822
|
+
r.classList.remove(p), r.removeAttribute(h), m && r.classList.add(m), V && r.setAttribute(V, ""), n.push(setTimeout(() => {
|
|
823
|
+
d();
|
|
824
|
+
}, c)), l("leave", r);
|
|
826
825
|
}
|
|
827
|
-
function i(
|
|
828
|
-
const { leaveClass:
|
|
829
|
-
|
|
826
|
+
function i(r) {
|
|
827
|
+
const { leaveClass: d, leaveAttribute: c } = t;
|
|
828
|
+
r.classList.remove(d), r.removeAttribute(c), l("after-leave", r);
|
|
830
829
|
}
|
|
831
|
-
return
|
|
832
|
-
|
|
833
|
-
clearTimeout(
|
|
830
|
+
return _(() => {
|
|
831
|
+
n.forEach((r) => {
|
|
832
|
+
clearTimeout(r);
|
|
834
833
|
});
|
|
835
|
-
}), (
|
|
834
|
+
}), (r, d) => e.preloaded ? ye((s(), O(Ie, {
|
|
836
835
|
key: 0,
|
|
837
836
|
css: !1,
|
|
838
|
-
onBeforeEnter:
|
|
837
|
+
onBeforeEnter: d[0] || (d[0] = (c) => l("before-enter", c)),
|
|
839
838
|
onEnter: o,
|
|
840
|
-
onAfterEnter:
|
|
841
|
-
onEnterCancelled:
|
|
842
|
-
onBeforeLeave:
|
|
839
|
+
onAfterEnter: d[1] || (d[1] = (c) => l("after-enter", c)),
|
|
840
|
+
onEnterCancelled: d[2] || (d[2] = (c) => l("enter-cancelled", c)),
|
|
841
|
+
onBeforeLeave: d[3] || (d[3] = (c) => l("before-leave", c)),
|
|
843
842
|
onLeave: u,
|
|
844
843
|
onAfterLeave: i,
|
|
845
|
-
onLeaveCancelled:
|
|
844
|
+
onLeaveCancelled: d[4] || (d[4] = (c) => l("leave-cancelled", c))
|
|
846
845
|
}, {
|
|
847
|
-
default:
|
|
848
|
-
|
|
846
|
+
default: P(() => [
|
|
847
|
+
L(r.$slots, "default")
|
|
849
848
|
]),
|
|
850
849
|
_: 3
|
|
851
850
|
}, 512)), [
|
|
852
|
-
[
|
|
853
|
-
]) : (
|
|
851
|
+
[Be, e.shown]
|
|
852
|
+
]) : (s(), O(Ie, {
|
|
854
853
|
key: 1,
|
|
855
854
|
css: !1,
|
|
856
|
-
onBeforeEnter:
|
|
855
|
+
onBeforeEnter: d[5] || (d[5] = (c) => l("before-enter", c)),
|
|
857
856
|
onEnter: o,
|
|
858
|
-
onAfterEnter:
|
|
859
|
-
onEnterCancelled:
|
|
860
|
-
onBeforeLeave:
|
|
857
|
+
onAfterEnter: d[6] || (d[6] = (c) => l("after-enter", c)),
|
|
858
|
+
onEnterCancelled: d[7] || (d[7] = (c) => l("enter-cancelled", c)),
|
|
859
|
+
onBeforeLeave: d[8] || (d[8] = (c) => l("before-leave", c)),
|
|
861
860
|
onLeave: u,
|
|
862
861
|
onAfterLeave: i,
|
|
863
|
-
onLeaveCancelled:
|
|
862
|
+
onLeaveCancelled: d[9] || (d[9] = (c) => l("leave-cancelled", c))
|
|
864
863
|
}, {
|
|
865
|
-
default:
|
|
866
|
-
e.shown ?
|
|
864
|
+
default: P(() => [
|
|
865
|
+
e.shown ? L(r.$slots, "default", { key: 0 }) : w("", !0)
|
|
867
866
|
]),
|
|
868
867
|
_: 3
|
|
869
868
|
}));
|
|
870
869
|
}
|
|
871
|
-
},
|
|
870
|
+
}, Qt = ["data-width"], _t = { key: 0 }, ea = { key: 0 }, Le = {
|
|
872
871
|
__name: "BsDropdownInternal",
|
|
873
872
|
props: {
|
|
874
873
|
shown: {
|
|
@@ -916,90 +915,93 @@ const Dt = {
|
|
|
916
915
|
"after-leave"
|
|
917
916
|
],
|
|
918
917
|
setup(e, { emit: a }) {
|
|
919
|
-
const t = e,
|
|
918
|
+
const t = e, l = a, n = I(null);
|
|
920
919
|
let o = !1;
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
}), se(["Escape"], () => {
|
|
924
|
-
o && n("close");
|
|
920
|
+
const u = new Proxy({}, {
|
|
921
|
+
get: () => document.getElementById(t.anchorId)
|
|
925
922
|
});
|
|
926
|
-
|
|
927
|
-
|
|
923
|
+
mt([n, u], () => {
|
|
924
|
+
o && l("close");
|
|
925
|
+
}), fe(["Escape"], () => {
|
|
926
|
+
o && l("close");
|
|
927
|
+
});
|
|
928
|
+
function i() {
|
|
929
|
+
const V = (t.containerRef || document.getElementById(t.containerId)).getBoundingClientRect(), T = document.getElementById(t.anchorId).getBoundingClientRect(), k = n.value.getBoundingClientRect();
|
|
928
930
|
if (t.position === "top") {
|
|
929
|
-
const
|
|
930
|
-
|
|
931
|
+
const y = V.bottom - T.bottom;
|
|
932
|
+
n.value.style.setProperty("--dropdown-wscreen-top", "auto"), n.value.style.setProperty("--dropdown-wscreen-bottom", `${y + T.height + 8}px`);
|
|
931
933
|
} else {
|
|
932
|
-
const
|
|
933
|
-
|
|
934
|
+
const y = T.top - V.top;
|
|
935
|
+
n.value.style.setProperty("--dropdown-wscreen-top", `${y + T.height + 8}px`), n.value.style.setProperty("--dropdown-wscreen-bottom", "auto");
|
|
934
936
|
}
|
|
935
|
-
const
|
|
937
|
+
const E = T.left - V.left;
|
|
936
938
|
if (t.position === "center") {
|
|
937
|
-
const
|
|
938
|
-
|
|
939
|
+
const y = (T.width - k.width) / 2;
|
|
940
|
+
n.value.style.setProperty("--dropdown-wscreen-left", `${E + y}px`);
|
|
939
941
|
} else if (t.position === "right") {
|
|
940
|
-
const
|
|
941
|
-
|
|
942
|
+
const y = V.right - T.right;
|
|
943
|
+
n.value.style.setProperty("--dropdown-wscreen-left", "auto"), n.value.style.setProperty("--dropdown-wscreen-right", `${y}px`);
|
|
942
944
|
} else
|
|
943
|
-
|
|
945
|
+
n.value.style.setProperty("--dropdown-wscreen-left", `${E}px`);
|
|
944
946
|
}
|
|
945
|
-
function
|
|
947
|
+
function r() {
|
|
946
948
|
if (t.width === "toggle") {
|
|
947
|
-
const
|
|
948
|
-
|
|
949
|
+
const m = document.getElementById(t.anchorId).getBoundingClientRect();
|
|
950
|
+
n.value.style.setProperty("--dropdown-wscreen-width", `${m.width}px`);
|
|
949
951
|
} else
|
|
950
|
-
|
|
951
|
-
}
|
|
952
|
-
function s() {
|
|
953
|
-
u(), i(), n("enter");
|
|
952
|
+
n.value.style.setProperty("--dropdown-wscreen-width", "");
|
|
954
953
|
}
|
|
955
|
-
function
|
|
956
|
-
|
|
954
|
+
function d() {
|
|
955
|
+
i(), r(), l("enter");
|
|
957
956
|
}
|
|
958
957
|
function c() {
|
|
959
|
-
o = !
|
|
958
|
+
o = !0, l("after-enter");
|
|
960
959
|
}
|
|
961
|
-
function
|
|
960
|
+
function p() {
|
|
961
|
+
o = !1, l("after-leave");
|
|
962
|
+
}
|
|
963
|
+
function h() {
|
|
962
964
|
return t.width === "toggle" ? void 0 : t.width;
|
|
963
965
|
}
|
|
964
|
-
return (
|
|
966
|
+
return (m, V) => (s(), O(f(pe), {
|
|
965
967
|
shown: e.shown,
|
|
966
968
|
preloaded: e.preloaded,
|
|
967
969
|
duration: 75,
|
|
968
970
|
"enter-attribute": "data-shown",
|
|
969
|
-
onAfterEnter:
|
|
970
|
-
onEnter:
|
|
971
|
-
onAfterLeave:
|
|
971
|
+
onAfterEnter: c,
|
|
972
|
+
onEnter: d,
|
|
973
|
+
onAfterLeave: p
|
|
972
974
|
}, {
|
|
973
|
-
default:
|
|
974
|
-
|
|
975
|
+
default: P(() => [
|
|
976
|
+
$("div", M({
|
|
975
977
|
ref_key: "dropdownRef",
|
|
976
|
-
ref:
|
|
978
|
+
ref: n,
|
|
977
979
|
class: "bs-dropdown",
|
|
978
|
-
"data-width":
|
|
979
|
-
},
|
|
980
|
-
e.helperText ? (
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
e.helperDescription ? (
|
|
980
|
+
"data-width": h()
|
|
981
|
+
}, m.$attrs), [
|
|
982
|
+
e.helperText ? (s(), v("header", _t, [
|
|
983
|
+
$("div", null, [
|
|
984
|
+
$("h3", null, A(e.helperText), 1),
|
|
985
|
+
e.helperDescription ? (s(), v("p", ea, A(e.helperDescription), 1)) : w("", !0)
|
|
984
986
|
]),
|
|
985
|
-
|
|
987
|
+
$("button", {
|
|
986
988
|
type: "button",
|
|
987
989
|
title: "close",
|
|
988
|
-
onClick:
|
|
990
|
+
onClick: V[0] || (V[0] = () => l("close"))
|
|
989
991
|
}, [
|
|
990
|
-
|
|
992
|
+
D(f(de))
|
|
991
993
|
])
|
|
992
|
-
])) :
|
|
993
|
-
|
|
994
|
-
], 16,
|
|
994
|
+
])) : w("", !0),
|
|
995
|
+
L(m.$slots, "default")
|
|
996
|
+
], 16, Qt)
|
|
995
997
|
]),
|
|
996
998
|
_: 3
|
|
997
999
|
}, 8, ["shown", "preloaded"]));
|
|
998
1000
|
}
|
|
999
|
-
},
|
|
1001
|
+
}, ta = {
|
|
1000
1002
|
key: 0,
|
|
1001
1003
|
class: "bs-dropdown-backdrop"
|
|
1002
|
-
},
|
|
1004
|
+
}, Ee = {
|
|
1003
1005
|
__name: "BsDropdown",
|
|
1004
1006
|
props: {
|
|
1005
1007
|
shown: {
|
|
@@ -1079,59 +1081,67 @@ const Dt = {
|
|
|
1079
1081
|
"after-leave"
|
|
1080
1082
|
],
|
|
1081
1083
|
setup(e, { emit: a }) {
|
|
1082
|
-
const t = e,
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1084
|
+
const t = e, l = a, n = I(null), o = I(!1), { transition: u } = ve(t);
|
|
1085
|
+
ee("dropdownAfterEnter", o), ee("dropdownShown", u);
|
|
1086
|
+
const i = g(() => t.toggleId ? t.toggleId : t.anchorId), r = g(() => t.top ? "top" : t.center ? "center" : t.right ? "right" : t.position);
|
|
1087
|
+
function d() {
|
|
1088
|
+
o.value = !0, l("after-enter");
|
|
1089
|
+
}
|
|
1090
|
+
function c() {
|
|
1091
|
+
o.value = !1, l("after-leave");
|
|
1092
|
+
}
|
|
1093
|
+
return (p, h) => (s(), v(R, null, [
|
|
1094
|
+
f(u) ? (s(), v("div", ta)) : w("", !0),
|
|
1095
|
+
e.containerId ? (s(), O(f(Le), M({
|
|
1086
1096
|
key: 1,
|
|
1087
|
-
shown:
|
|
1097
|
+
shown: f(u),
|
|
1088
1098
|
preloaded: e.preloaded,
|
|
1089
|
-
"anchor-id":
|
|
1099
|
+
"anchor-id": i.value,
|
|
1090
1100
|
"container-id": e.containerId,
|
|
1091
1101
|
"helper-description": e.helperDescription,
|
|
1092
1102
|
"helper-text": e.helperText,
|
|
1093
|
-
position:
|
|
1103
|
+
position: r.value,
|
|
1094
1104
|
width: e.width
|
|
1095
|
-
},
|
|
1096
|
-
onClose:
|
|
1097
|
-
onAfterEnter:
|
|
1098
|
-
onEnter:
|
|
1099
|
-
onAfterLeave:
|
|
1105
|
+
}, p.$attrs, {
|
|
1106
|
+
onClose: h[0] || (h[0] = (m) => l("close")),
|
|
1107
|
+
onAfterEnter: d,
|
|
1108
|
+
onEnter: h[1] || (h[1] = (m) => l("enter")),
|
|
1109
|
+
onAfterLeave: c
|
|
1100
1110
|
}), {
|
|
1101
|
-
default:
|
|
1102
|
-
|
|
1111
|
+
default: P(() => [
|
|
1112
|
+
L(p.$slots, "default")
|
|
1103
1113
|
]),
|
|
1104
1114
|
_: 3
|
|
1105
|
-
}, 16, ["shown", "preloaded", "anchor-id", "container-id", "helper-description", "helper-text", "position", "width"])) : (
|
|
1115
|
+
}, 16, ["shown", "preloaded", "anchor-id", "container-id", "helper-description", "helper-text", "position", "width"])) : (s(), v("div", {
|
|
1106
1116
|
key: 2,
|
|
1107
1117
|
ref_key: "containerRef",
|
|
1108
|
-
ref:
|
|
1118
|
+
ref: n,
|
|
1109
1119
|
style: { position: "relative" }
|
|
1110
1120
|
}, [
|
|
1111
|
-
|
|
1112
|
-
shown:
|
|
1121
|
+
D(f(Le), M({
|
|
1122
|
+
shown: f(u),
|
|
1113
1123
|
preloaded: e.preloaded,
|
|
1114
|
-
"anchor-id":
|
|
1115
|
-
"container-ref":
|
|
1124
|
+
"anchor-id": i.value,
|
|
1125
|
+
"container-ref": n.value,
|
|
1116
1126
|
"helper-description": e.helperDescription,
|
|
1117
1127
|
"helper-text": e.helperText,
|
|
1118
|
-
position:
|
|
1128
|
+
position: r.value,
|
|
1119
1129
|
width: e.width
|
|
1120
|
-
},
|
|
1121
|
-
onClose:
|
|
1122
|
-
onAfterEnter:
|
|
1123
|
-
onEnter:
|
|
1124
|
-
onAfterLeave:
|
|
1130
|
+
}, p.$attrs, {
|
|
1131
|
+
onClose: h[2] || (h[2] = (m) => l("close")),
|
|
1132
|
+
onAfterEnter: d,
|
|
1133
|
+
onEnter: h[3] || (h[3] = (m) => l("enter")),
|
|
1134
|
+
onAfterLeave: c
|
|
1125
1135
|
}), {
|
|
1126
|
-
default:
|
|
1127
|
-
|
|
1136
|
+
default: P(() => [
|
|
1137
|
+
L(p.$slots, "default")
|
|
1128
1138
|
]),
|
|
1129
1139
|
_: 3
|
|
1130
1140
|
}, 16, ["shown", "preloaded", "anchor-id", "container-ref", "helper-description", "helper-text", "position", "width"])
|
|
1131
1141
|
], 512))
|
|
1132
1142
|
], 64));
|
|
1133
1143
|
}
|
|
1134
|
-
},
|
|
1144
|
+
}, aa = ["data-value", "data-variant", "id"], ie = {
|
|
1135
1145
|
__name: "BsDropdownOption",
|
|
1136
1146
|
props: {
|
|
1137
1147
|
value: {
|
|
@@ -1144,55 +1154,52 @@ const Dt = {
|
|
|
1144
1154
|
}
|
|
1145
1155
|
},
|
|
1146
1156
|
setup(e) {
|
|
1147
|
-
const a = e, t = I(null),
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
u(), (s = t.value.querySelector("a")) == null || s.click(), i.preventDefault();
|
|
1157
|
+
const a = e, t = I(null), l = te("optionsId"), n = te("handleSelect"), o = g(() => `${l}-option-${a.value}`);
|
|
1158
|
+
fe([" ", "Enter", "NumpadEnter"], (i) => {
|
|
1159
|
+
u(), i.preventDefault();
|
|
1151
1160
|
}, t);
|
|
1152
|
-
function u() {
|
|
1153
|
-
var
|
|
1154
|
-
|
|
1161
|
+
function u(i) {
|
|
1162
|
+
var r, d;
|
|
1163
|
+
n(o.value, a.value), (r = t.value.querySelector("a")) == null || r.click(), (d = i == null ? void 0 : i.stopPropagation) == null || d.call(i);
|
|
1155
1164
|
}
|
|
1156
|
-
return (i,
|
|
1157
|
-
"data-component": "bs-dropdown-option",
|
|
1158
|
-
"data-value": a.value,
|
|
1165
|
+
return (i, r) => (s(), v("li", {
|
|
1159
1166
|
ref_key: "optionRef",
|
|
1160
1167
|
ref: t,
|
|
1161
|
-
|
|
1168
|
+
"data-component": "bs-dropdown-option",
|
|
1169
|
+
"data-value": a.value,
|
|
1162
1170
|
"data-variant": e.variant || void 0,
|
|
1163
1171
|
id: o.value,
|
|
1172
|
+
role: "option",
|
|
1164
1173
|
tabIndex: -1,
|
|
1165
1174
|
onClick: u
|
|
1166
1175
|
}, [
|
|
1167
|
-
|
|
1168
|
-
], 8,
|
|
1176
|
+
L(i.$slots, "default")
|
|
1177
|
+
], 8, aa));
|
|
1169
1178
|
}
|
|
1170
|
-
},
|
|
1179
|
+
}, na = ["aria-activedescendant", "aria-label", "id"], $e = {
|
|
1171
1180
|
__name: "BsDropdownOptionList",
|
|
1172
1181
|
props: {
|
|
1173
1182
|
optionsId: {
|
|
1174
1183
|
type: String,
|
|
1175
1184
|
required: !0
|
|
1176
1185
|
},
|
|
1177
|
-
|
|
1178
|
-
* it is not even needed when using v-if (only for v-show).
|
|
1179
|
-
*/
|
|
1180
|
-
visible: {
|
|
1181
|
-
type: Boolean,
|
|
1182
|
-
default: void 0
|
|
1183
|
-
},
|
|
1184
|
-
shown: {
|
|
1186
|
+
focusOnShow: {
|
|
1185
1187
|
type: Boolean,
|
|
1186
1188
|
default: !0
|
|
1187
1189
|
},
|
|
1188
|
-
focusDelay: {
|
|
1189
|
-
type: Number,
|
|
1190
|
-
default: 75
|
|
1191
|
-
},
|
|
1192
1190
|
label: {
|
|
1193
1191
|
type: String,
|
|
1194
1192
|
default: void 0
|
|
1195
1193
|
},
|
|
1194
|
+
/* Internal use only - no need to document */
|
|
1195
|
+
multiselect: {
|
|
1196
|
+
type: Boolean,
|
|
1197
|
+
default: !1
|
|
1198
|
+
},
|
|
1199
|
+
preventTab: {
|
|
1200
|
+
type: Boolean,
|
|
1201
|
+
default: !0
|
|
1202
|
+
},
|
|
1196
1203
|
/** @Deprecated - Use modelValue (or v-model) instead */
|
|
1197
1204
|
selectedValue: {
|
|
1198
1205
|
type: [String, Number],
|
|
@@ -1204,97 +1211,242 @@ const Dt = {
|
|
|
1204
1211
|
}
|
|
1205
1212
|
},
|
|
1206
1213
|
emits: ["optselected", "update:modelValue", "close"],
|
|
1207
|
-
setup(e, {
|
|
1208
|
-
const
|
|
1209
|
-
let
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
function
|
|
1225
|
-
var
|
|
1226
|
-
c.value ? (
|
|
1227
|
-
(
|
|
1228
|
-
),
|
|
1229
|
-
var
|
|
1230
|
-
(
|
|
1231
|
-
},
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1214
|
+
setup(e, { expose: a, emit: t }) {
|
|
1215
|
+
const l = e, n = t, o = I(null), u = I(null), i = I(-1), r = I(null), d = te("dropdownAfterEnter"), c = te("dropdownShown");
|
|
1216
|
+
let p = -1;
|
|
1217
|
+
ee("handleSelect", y), ee("optionsId", l.optionsId), F(() => {
|
|
1218
|
+
m(), V(), document.addEventListener("keydown", k);
|
|
1219
|
+
}), _(() => {
|
|
1220
|
+
document.removeEventListener("keydown", k);
|
|
1221
|
+
}), z(d, (b) => {
|
|
1222
|
+
var S, x;
|
|
1223
|
+
b && p > -1 && (l.focusOnShow ? (S = r.value[p]) == null || S.focus() : (x = r.value[p]) == null || x.scrollIntoView({ block: "nearest" }));
|
|
1224
|
+
}), z(c, V);
|
|
1225
|
+
const h = g(() => l.modelValue || l.selectedValue);
|
|
1226
|
+
function m() {
|
|
1227
|
+
r.value = Array.from(
|
|
1228
|
+
o.value.querySelectorAll('[data-component="bs-dropdown-option"]')
|
|
1229
|
+
);
|
|
1230
|
+
}
|
|
1231
|
+
function V() {
|
|
1232
|
+
var b, S;
|
|
1233
|
+
c.value && !l.multiselect ? (p = r.value.findIndex(
|
|
1234
|
+
(x) => x.getAttribute("data-value") === String(h.value)
|
|
1235
|
+
), r.value.forEach((x) => {
|
|
1236
|
+
var N;
|
|
1237
|
+
return (N = x == null ? void 0 : x.setAttribute) == null ? void 0 : N.call(x, "aria-selected", "false");
|
|
1238
|
+
}), p > -1 && ((b = r.value[p]) == null || b.setAttribute("data-selected", ""), (S = r.value[p]) == null || S.setAttribute("aria-selected", "true"), i.value = p)) : (r.value.forEach((x) => {
|
|
1239
|
+
var N;
|
|
1240
|
+
return (N = x == null ? void 0 : x.removeAttribute) == null ? void 0 : N.call(x, "data-selected");
|
|
1241
|
+
}), r.value.forEach((x) => {
|
|
1242
|
+
var N;
|
|
1243
|
+
return (N = x == null ? void 0 : x.removeAttribute) == null ? void 0 : N.call(x, "aria-selected");
|
|
1244
|
+
}));
|
|
1245
|
+
}
|
|
1246
|
+
yt(
|
|
1247
|
+
o,
|
|
1235
1248
|
() => {
|
|
1236
|
-
|
|
1249
|
+
m();
|
|
1237
1250
|
},
|
|
1238
1251
|
{ childList: !0 }
|
|
1239
1252
|
);
|
|
1240
|
-
function
|
|
1241
|
-
var
|
|
1242
|
-
i > -1 && ((
|
|
1253
|
+
function T() {
|
|
1254
|
+
var b;
|
|
1255
|
+
i.value > -1 && ((b = r.value[i.value]) == null || b.blur());
|
|
1243
1256
|
}
|
|
1244
|
-
function
|
|
1257
|
+
function k(b) {
|
|
1245
1258
|
if (c.value)
|
|
1246
|
-
switch (
|
|
1259
|
+
switch (b.key) {
|
|
1247
1260
|
case "ArrowDown":
|
|
1248
|
-
|
|
1261
|
+
E("down"), b.preventDefault();
|
|
1249
1262
|
break;
|
|
1250
1263
|
case "ArrowUp":
|
|
1251
|
-
|
|
1264
|
+
E("up"), b.preventDefault();
|
|
1252
1265
|
break;
|
|
1253
1266
|
case "Home":
|
|
1254
|
-
|
|
1267
|
+
E("home"), b.preventDefault();
|
|
1255
1268
|
break;
|
|
1256
1269
|
case "End":
|
|
1257
|
-
|
|
1270
|
+
E("end"), b.preventDefault();
|
|
1258
1271
|
break;
|
|
1259
1272
|
case "Tab":
|
|
1260
|
-
|
|
1273
|
+
i.value = p, l.preventTab && b.preventDefault();
|
|
1261
1274
|
break;
|
|
1262
1275
|
}
|
|
1263
1276
|
}
|
|
1264
|
-
function
|
|
1265
|
-
let
|
|
1266
|
-
switch (
|
|
1277
|
+
function E(b) {
|
|
1278
|
+
let S;
|
|
1279
|
+
switch (b) {
|
|
1267
1280
|
case "up":
|
|
1268
|
-
|
|
1281
|
+
S = i.value - 1 < 0 ? r.value.length - 1 : i.value - 1;
|
|
1269
1282
|
break;
|
|
1270
1283
|
case "down":
|
|
1271
|
-
|
|
1284
|
+
S = (i.value + 1) % r.value.length;
|
|
1272
1285
|
break;
|
|
1273
1286
|
case "home":
|
|
1274
|
-
|
|
1287
|
+
S = 0;
|
|
1275
1288
|
break;
|
|
1276
1289
|
case "end":
|
|
1277
|
-
|
|
1290
|
+
S = r.value.length - 1;
|
|
1278
1291
|
break;
|
|
1279
1292
|
}
|
|
1280
|
-
|
|
1293
|
+
T(), r.value[S].focus(), u.value = r.value[S].id, i.value = S;
|
|
1281
1294
|
}
|
|
1282
|
-
function
|
|
1283
|
-
|
|
1295
|
+
function y(b, S) {
|
|
1296
|
+
u.value = b, T(), n("optselected", S), n("update:modelValue", S), n("close");
|
|
1284
1297
|
}
|
|
1285
|
-
return (
|
|
1298
|
+
return a({
|
|
1299
|
+
activeDescendantId: u,
|
|
1300
|
+
focusedIndex: i,
|
|
1301
|
+
optionEls: r,
|
|
1302
|
+
refreshOptions: m
|
|
1303
|
+
}), (b, S) => (s(), v("ul", {
|
|
1286
1304
|
ref_key: "optionsRef",
|
|
1287
|
-
ref:
|
|
1288
|
-
"aria-activedescendant":
|
|
1289
|
-
"aria-label":
|
|
1305
|
+
ref: o,
|
|
1306
|
+
"aria-activedescendant": u.value || void 0,
|
|
1307
|
+
"aria-label": l.label || void 0,
|
|
1290
1308
|
class: "bs-dropdown-options",
|
|
1291
|
-
id:
|
|
1309
|
+
id: l.optionsId,
|
|
1292
1310
|
role: "listbox"
|
|
1293
1311
|
}, [
|
|
1294
|
-
|
|
1295
|
-
], 8,
|
|
1312
|
+
L(b.$slots, "default")
|
|
1313
|
+
], 8, na));
|
|
1296
1314
|
}
|
|
1297
|
-
},
|
|
1315
|
+
}, la = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1316
|
+
__proto__: null,
|
|
1317
|
+
default: $e
|
|
1318
|
+
}, Symbol.toStringTag, { value: "Module" })), oa = ["for"], ia = { role: "separator" }, ra = /* @__PURE__ */ $("hr", null, null, -1), sa = [
|
|
1319
|
+
ra
|
|
1320
|
+
], da = ["for"], ua = {
|
|
1321
|
+
__name: "BsDropdownMultiselect",
|
|
1322
|
+
props: {
|
|
1323
|
+
label: {
|
|
1324
|
+
type: String
|
|
1325
|
+
},
|
|
1326
|
+
options: {
|
|
1327
|
+
type: Array,
|
|
1328
|
+
default: () => []
|
|
1329
|
+
},
|
|
1330
|
+
optionsId: {
|
|
1331
|
+
type: String,
|
|
1332
|
+
required: !0
|
|
1333
|
+
},
|
|
1334
|
+
selectedOptions: {
|
|
1335
|
+
type: Array,
|
|
1336
|
+
default: () => []
|
|
1337
|
+
},
|
|
1338
|
+
shown: {
|
|
1339
|
+
type: Boolean,
|
|
1340
|
+
default: !1
|
|
1341
|
+
}
|
|
1342
|
+
},
|
|
1343
|
+
emits: ["update:selectedOptions"],
|
|
1344
|
+
setup(e, { emit: a }) {
|
|
1345
|
+
const t = e, l = a;
|
|
1346
|
+
I(null), I(null);
|
|
1347
|
+
const n = I(null), o = I([]), u = I([]);
|
|
1348
|
+
let i = !1;
|
|
1349
|
+
z(
|
|
1350
|
+
() => t.selectedOptions,
|
|
1351
|
+
c,
|
|
1352
|
+
{ immediate: !0 }
|
|
1353
|
+
), z(() => t.shown, (m) => {
|
|
1354
|
+
m && oe(r);
|
|
1355
|
+
});
|
|
1356
|
+
function r() {
|
|
1357
|
+
var V, T;
|
|
1358
|
+
n.value && (n.value.refreshOptions(), n.value.activeDescendantId = (V = n.value.optionEls[0]) == null ? void 0 : V.id, n.value.focusedIndex = 0);
|
|
1359
|
+
const m = document.querySelector(`#${t.optionsId} [data-component="bs-dropdown-option"]`);
|
|
1360
|
+
(T = m == null ? void 0 : m.focus) == null || T.call(m, { preventScroll: !0 });
|
|
1361
|
+
}
|
|
1362
|
+
function d() {
|
|
1363
|
+
var m;
|
|
1364
|
+
if (n.value) {
|
|
1365
|
+
n.value.refreshOptions();
|
|
1366
|
+
const V = n.value.focusedIndex, T = n.value.optionEls[V];
|
|
1367
|
+
(m = T == null ? void 0 : T.focus) == null || m.call(T), n.value.activeDescendantId = T == null ? void 0 : T.id;
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
function c(m = []) {
|
|
1371
|
+
const V = new Set(m), T = [], k = [];
|
|
1372
|
+
t.options.forEach((E) => V.has(E.value) ? T.push(E) : k.push(E)), o.value = T, oe(() => {
|
|
1373
|
+
u.value = k, oe(() => {
|
|
1374
|
+
i && d(), i = !1;
|
|
1375
|
+
});
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1378
|
+
function p(m = []) {
|
|
1379
|
+
const V = new Set(m), T = [];
|
|
1380
|
+
return t.options.forEach((k) => {
|
|
1381
|
+
V.has(k.value) && T.push(k.value);
|
|
1382
|
+
}), T;
|
|
1383
|
+
}
|
|
1384
|
+
function h(m) {
|
|
1385
|
+
const V = t.selectedOptions.includes(m) ? t.selectedOptions.filter((T) => T !== m) : p([...t.selectedOptions, m]);
|
|
1386
|
+
i = !0, l("update:selectedOptions", V);
|
|
1387
|
+
}
|
|
1388
|
+
return (m, V) => (s(), O($e, {
|
|
1389
|
+
ref_key: "optlist",
|
|
1390
|
+
ref: n,
|
|
1391
|
+
"aria-multiselectable": "true",
|
|
1392
|
+
"data-component": "bs-dropdown-multiselect",
|
|
1393
|
+
label: e.label,
|
|
1394
|
+
multiselect: "",
|
|
1395
|
+
"options-id": e.optionsId,
|
|
1396
|
+
shown: e.shown,
|
|
1397
|
+
"onUpdate:modelValue": h
|
|
1398
|
+
}, {
|
|
1399
|
+
default: P(() => {
|
|
1400
|
+
var T;
|
|
1401
|
+
return [
|
|
1402
|
+
(s(!0), v(R, null, G(o.value, (k) => (s(), O(ie, {
|
|
1403
|
+
key: k.value,
|
|
1404
|
+
"aria-checked": e.shown ? "true" : void 0,
|
|
1405
|
+
variant: "2-col",
|
|
1406
|
+
value: k.value
|
|
1407
|
+
}, {
|
|
1408
|
+
default: P(() => [
|
|
1409
|
+
D(Ae, {
|
|
1410
|
+
"input-id": `${e.optionsId}-${k.value}-cb`,
|
|
1411
|
+
value: k.value,
|
|
1412
|
+
"model-value": e.selectedOptions
|
|
1413
|
+
}, null, 8, ["input-id", "value", "model-value"]),
|
|
1414
|
+
$("label", {
|
|
1415
|
+
for: `${e.optionsId}-${k.value}-cb`
|
|
1416
|
+
}, A(k.label), 9, oa)
|
|
1417
|
+
]),
|
|
1418
|
+
_: 2
|
|
1419
|
+
}, 1032, ["aria-checked", "value"]))), 128)),
|
|
1420
|
+
ye($("li", ia, sa, 512), [
|
|
1421
|
+
[Be, (T = o.value) == null ? void 0 : T.length]
|
|
1422
|
+
]),
|
|
1423
|
+
(s(!0), v(R, null, G(u.value, (k) => (s(), O(ie, {
|
|
1424
|
+
key: k.value,
|
|
1425
|
+
"aria-checked": e.shown ? "false" : void 0,
|
|
1426
|
+
variant: "2-col",
|
|
1427
|
+
value: k.value
|
|
1428
|
+
}, {
|
|
1429
|
+
default: P(() => [
|
|
1430
|
+
D(Ae, {
|
|
1431
|
+
"input-id": `${e.optionsId}-${k.value}-cb`,
|
|
1432
|
+
value: k.value,
|
|
1433
|
+
"model-value": e.selectedOptions
|
|
1434
|
+
}, null, 8, ["input-id", "value", "model-value"]),
|
|
1435
|
+
$("label", {
|
|
1436
|
+
for: `${e.optionsId}-${k.value}-cb`
|
|
1437
|
+
}, A(k.label), 9, da)
|
|
1438
|
+
]),
|
|
1439
|
+
_: 2
|
|
1440
|
+
}, 1032, ["aria-checked", "value"]))), 128))
|
|
1441
|
+
];
|
|
1442
|
+
}),
|
|
1443
|
+
_: 1
|
|
1444
|
+
}, 8, ["label", "options-id", "shown"]));
|
|
1445
|
+
}
|
|
1446
|
+
}, ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1447
|
+
__proto__: null,
|
|
1448
|
+
default: ua
|
|
1449
|
+
}, Symbol.toStringTag, { value: "Module" })), Pe = {
|
|
1298
1450
|
__name: "BsDropdownWithOptions",
|
|
1299
1451
|
props: {
|
|
1300
1452
|
// OPTION LIST PROPS
|
|
@@ -1302,6 +1454,14 @@ const Dt = {
|
|
|
1302
1454
|
type: String,
|
|
1303
1455
|
required: !0
|
|
1304
1456
|
},
|
|
1457
|
+
focusOnShow: {
|
|
1458
|
+
type: Boolean,
|
|
1459
|
+
default: !0
|
|
1460
|
+
},
|
|
1461
|
+
preventTab: {
|
|
1462
|
+
type: Boolean,
|
|
1463
|
+
default: !0
|
|
1464
|
+
},
|
|
1305
1465
|
label: {
|
|
1306
1466
|
type: String,
|
|
1307
1467
|
default: void 0
|
|
@@ -1394,17 +1554,17 @@ const Dt = {
|
|
|
1394
1554
|
"after-leave"
|
|
1395
1555
|
],
|
|
1396
1556
|
setup(e, { emit: a }) {
|
|
1397
|
-
const t = a,
|
|
1398
|
-
function
|
|
1399
|
-
|
|
1557
|
+
const t = a, l = I(!1);
|
|
1558
|
+
function n() {
|
|
1559
|
+
l.value = !0;
|
|
1400
1560
|
}
|
|
1401
1561
|
function o(i) {
|
|
1402
|
-
|
|
1562
|
+
l.value = !1, t("optselected", i), t("update:modelValue", i), t("close");
|
|
1403
1563
|
}
|
|
1404
1564
|
function u() {
|
|
1405
|
-
|
|
1565
|
+
l.value && (l.value = !1, t("close"));
|
|
1406
1566
|
}
|
|
1407
|
-
return (i,
|
|
1567
|
+
return (i, r) => (s(), O(f(Ee), {
|
|
1408
1568
|
shown: e.shown,
|
|
1409
1569
|
preloaded: e.preloaded,
|
|
1410
1570
|
"anchor-id": e.anchorId,
|
|
@@ -1421,69 +1581,32 @@ const Dt = {
|
|
|
1421
1581
|
top: e.top,
|
|
1422
1582
|
width: e.width,
|
|
1423
1583
|
onClose: u,
|
|
1424
|
-
onAfterEnter:
|
|
1425
|
-
onEnter:
|
|
1426
|
-
onAfterLeave:
|
|
1584
|
+
onAfterEnter: r[0] || (r[0] = (d) => t("after-enter")),
|
|
1585
|
+
onEnter: n,
|
|
1586
|
+
onAfterLeave: r[1] || (r[1] = (d) => t("after-leave"))
|
|
1427
1587
|
}, {
|
|
1428
|
-
default:
|
|
1429
|
-
|
|
1588
|
+
default: P(() => [
|
|
1589
|
+
D(f($e), {
|
|
1590
|
+
"focus-on-show": e.focusOnShow,
|
|
1430
1591
|
label: e.label,
|
|
1431
1592
|
"model-value": e.modelValue,
|
|
1432
1593
|
"options-id": e.optionsId,
|
|
1594
|
+
"prevent-tab": e.preventTab,
|
|
1433
1595
|
"selected-value": e.selectedValue,
|
|
1434
|
-
shown:
|
|
1596
|
+
shown: l.value,
|
|
1435
1597
|
"onUpdate:modelValue": o,
|
|
1436
1598
|
onClose: u
|
|
1437
1599
|
}, {
|
|
1438
|
-
default:
|
|
1439
|
-
|
|
1600
|
+
default: P(() => [
|
|
1601
|
+
L(i.$slots, "default")
|
|
1440
1602
|
]),
|
|
1441
1603
|
_: 3
|
|
1442
|
-
}, 8, ["label", "model-value", "options-id", "selected-value", "shown"])
|
|
1604
|
+
}, 8, ["focus-on-show", "label", "model-value", "options-id", "prevent-tab", "selected-value", "shown"])
|
|
1443
1605
|
]),
|
|
1444
1606
|
_: 3
|
|
1445
1607
|
}, 8, ["shown", "preloaded", "anchor-id", "center", "container-id", "enter-controlled", "enter-trigger", "helper-description", "helper-text", "leave-trigger", "position", "right", "toggle-id", "top", "width"]));
|
|
1446
1608
|
}
|
|
1447
|
-
},
|
|
1448
|
-
class: "bs-field-details",
|
|
1449
|
-
"data-component": "bs-field-details"
|
|
1450
|
-
}, aa = ["id", "data-error"], na = ["data-error"], he = {
|
|
1451
|
-
__name: "BsFieldDetails",
|
|
1452
|
-
props: {
|
|
1453
|
-
/** The number of characters that have been entered by the user. */
|
|
1454
|
-
charCount: Number,
|
|
1455
|
-
/** Pass value to show character count and set the maximum number of characters that are allowed to be submitted by the user. */
|
|
1456
|
-
charMax: Number,
|
|
1457
|
-
/** Applies error styles to the helper text. */
|
|
1458
|
-
error: {
|
|
1459
|
-
type: Boolean,
|
|
1460
|
-
default: !1
|
|
1461
|
-
},
|
|
1462
|
-
/** Pass error text. Will be shown if `error` is `true`. */
|
|
1463
|
-
errorMsg: String,
|
|
1464
|
-
/** Pass single helper text. */
|
|
1465
|
-
hint: String,
|
|
1466
|
-
/** Adds an id to associate a hint to an input. */
|
|
1467
|
-
hintId: String
|
|
1468
|
-
},
|
|
1469
|
-
setup(e) {
|
|
1470
|
-
const a = e, t = p(() => a.error && a.errorMsg || a.hint);
|
|
1471
|
-
return (n, l) => (d(), f("div", ta, [
|
|
1472
|
-
t.value ? (d(), f("span", {
|
|
1473
|
-
key: 0,
|
|
1474
|
-
id: e.hintId,
|
|
1475
|
-
class: "bs-hint",
|
|
1476
|
-
"data-error": e.error
|
|
1477
|
-
}, T(t.value), 9, aa)) : S("", !0),
|
|
1478
|
-
e.charMax ? (d(), f("span", {
|
|
1479
|
-
key: 1,
|
|
1480
|
-
"aria-description": "character count over character limit for the preceding text field",
|
|
1481
|
-
class: "bs-character-count",
|
|
1482
|
-
"data-error": a.charCount > a.charMax
|
|
1483
|
-
}, T(a.charCount || "0") + " / " + T(a.charMax), 9, na)) : S("", !0)
|
|
1484
|
-
]));
|
|
1485
|
-
}
|
|
1486
|
-
}, la = ["aria-controls", "aria-expanded", "data-open", "data-size", "disabled"], zn = {
|
|
1609
|
+
}, fa = ["aria-controls", "aria-expanded", "data-open", "data-size", "disabled"], va = {
|
|
1487
1610
|
__name: "BsFilterButton",
|
|
1488
1611
|
props: {
|
|
1489
1612
|
badgeCount: {
|
|
@@ -1512,8 +1635,8 @@ const Dt = {
|
|
|
1512
1635
|
}
|
|
1513
1636
|
},
|
|
1514
1637
|
setup(e) {
|
|
1515
|
-
const a = e, t =
|
|
1516
|
-
return (
|
|
1638
|
+
const a = e, t = g(() => a.badgeCount > 0);
|
|
1639
|
+
return (l, n) => (s(), v("button", {
|
|
1517
1640
|
class: "bs-filter-button",
|
|
1518
1641
|
"aria-controls": e.optionsId,
|
|
1519
1642
|
"aria-expanded": e.open,
|
|
@@ -1523,63 +1646,259 @@ const Dt = {
|
|
|
1523
1646
|
disabled: e.disabled,
|
|
1524
1647
|
type: "button"
|
|
1525
1648
|
}, [
|
|
1526
|
-
t.value ? (
|
|
1649
|
+
t.value ? (s(), O(xt, {
|
|
1527
1650
|
key: 0,
|
|
1528
1651
|
color: "blue",
|
|
1529
1652
|
count: e.badgeCount,
|
|
1530
1653
|
label: "active filter",
|
|
1531
1654
|
position: "left",
|
|
1532
1655
|
variant: "notext"
|
|
1533
|
-
}, null, 8, ["count"])) :
|
|
1534
|
-
|
|
1535
|
-
|
|
1656
|
+
}, null, 8, ["count"])) : w("", !0),
|
|
1657
|
+
L(l.$slots, "label", {}, () => [
|
|
1658
|
+
W(A(e.label), 1)
|
|
1536
1659
|
]),
|
|
1537
|
-
|
|
1538
|
-
], 8,
|
|
1660
|
+
D(f(Ve))
|
|
1661
|
+
], 8, fa));
|
|
1662
|
+
}
|
|
1663
|
+
}, pa = ["id"], _n = {
|
|
1664
|
+
__name: "BsDropdownWithToggle",
|
|
1665
|
+
props: {
|
|
1666
|
+
breakout: {
|
|
1667
|
+
type: Boolean,
|
|
1668
|
+
default: !1
|
|
1669
|
+
},
|
|
1670
|
+
disabled: {
|
|
1671
|
+
type: Boolean,
|
|
1672
|
+
default: !1
|
|
1673
|
+
},
|
|
1674
|
+
dropdownLabel: {
|
|
1675
|
+
type: String
|
|
1676
|
+
},
|
|
1677
|
+
dropdownPosition: {
|
|
1678
|
+
type: String,
|
|
1679
|
+
validator: (e) => ["top", "center", "right"].includes(e)
|
|
1680
|
+
},
|
|
1681
|
+
dropdownWidth: {
|
|
1682
|
+
type: String,
|
|
1683
|
+
validator: (e) => ["sm", "md", "lg", "content", "toggle"].includes(e)
|
|
1684
|
+
},
|
|
1685
|
+
helperText: {
|
|
1686
|
+
type: String
|
|
1687
|
+
},
|
|
1688
|
+
helperDescription: {
|
|
1689
|
+
type: String
|
|
1690
|
+
},
|
|
1691
|
+
multiselect: {
|
|
1692
|
+
type: Boolean,
|
|
1693
|
+
default: !1
|
|
1694
|
+
},
|
|
1695
|
+
open: {
|
|
1696
|
+
type: Boolean,
|
|
1697
|
+
default: !0
|
|
1698
|
+
},
|
|
1699
|
+
options: {
|
|
1700
|
+
type: Array,
|
|
1701
|
+
default: () => []
|
|
1702
|
+
},
|
|
1703
|
+
selectedOption: {
|
|
1704
|
+
type: [String, Number]
|
|
1705
|
+
},
|
|
1706
|
+
selectedOptions: {
|
|
1707
|
+
type: Array,
|
|
1708
|
+
default: () => []
|
|
1709
|
+
},
|
|
1710
|
+
toggleLabel: {
|
|
1711
|
+
type: String,
|
|
1712
|
+
default: "Filter"
|
|
1713
|
+
},
|
|
1714
|
+
toggleSize: {
|
|
1715
|
+
type: String,
|
|
1716
|
+
validator: (e) => ["sm", "xs"].includes(e)
|
|
1717
|
+
}
|
|
1718
|
+
},
|
|
1719
|
+
emits: ["update:selectedOptions", "update:selectedOption", "toggled", "close"],
|
|
1720
|
+
setup(e, { emit: a }) {
|
|
1721
|
+
const t = e, l = a, n = I(!1), o = I(!1), u = I(null), i = g(() => me(async () => await (t.multiselect ? Promise.resolve().then(() => ca) : Promise.resolve().then(() => la)))), [r, d, c] = K(3);
|
|
1722
|
+
z(o, (y) => {
|
|
1723
|
+
y && u.value.$el.blur();
|
|
1724
|
+
}), F(() => {
|
|
1725
|
+
k(), oe(() => n.value = !0);
|
|
1726
|
+
}), _(E);
|
|
1727
|
+
function p() {
|
|
1728
|
+
o.value = !1, l("close"), u.value.$el.focus();
|
|
1729
|
+
}
|
|
1730
|
+
function h() {
|
|
1731
|
+
o.value && p();
|
|
1732
|
+
}
|
|
1733
|
+
function m() {
|
|
1734
|
+
o.value = !0;
|
|
1735
|
+
}
|
|
1736
|
+
function V(y) {
|
|
1737
|
+
l("update:selectedOptions", y);
|
|
1738
|
+
}
|
|
1739
|
+
function T(y) {
|
|
1740
|
+
t.multiselect || (l("update:selectedOption", y), p());
|
|
1741
|
+
}
|
|
1742
|
+
function k() {
|
|
1743
|
+
if (t.breakout) {
|
|
1744
|
+
const y = document.querySelector("body"), b = document.createElement("div");
|
|
1745
|
+
b.id = d.value, b.style.position = "absolute", y.insertAdjacentElement("afterbegin", b);
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
function E() {
|
|
1749
|
+
t.breakout && document.querySelector(`#${d.value}`).remove();
|
|
1750
|
+
}
|
|
1751
|
+
return (y, b) => (s(), v("div", {
|
|
1752
|
+
class: "bs-dropdown-with-toggle",
|
|
1753
|
+
id: e.breakout ? y.$attrs.id : y.$attrs.id || f(d)
|
|
1754
|
+
}, [
|
|
1755
|
+
D(va, {
|
|
1756
|
+
ref_key: "toggleRef",
|
|
1757
|
+
ref: u,
|
|
1758
|
+
disabled: e.disabled,
|
|
1759
|
+
id: f(r),
|
|
1760
|
+
open: e.open,
|
|
1761
|
+
"options-id": f(c),
|
|
1762
|
+
size: e.toggleSize,
|
|
1763
|
+
onClick: b[0] || (b[0] = (S) => y.$emit("toggled"))
|
|
1764
|
+
}, {
|
|
1765
|
+
label: P(() => [
|
|
1766
|
+
L(y.$slots, "toggle-label", {}, () => [
|
|
1767
|
+
W(A(e.toggleLabel), 1)
|
|
1768
|
+
])
|
|
1769
|
+
]),
|
|
1770
|
+
_: 3
|
|
1771
|
+
}, 8, ["disabled", "id", "open", "options-id", "size"]),
|
|
1772
|
+
n.value ? (s(), O(Je, {
|
|
1773
|
+
key: 0,
|
|
1774
|
+
disabled: !e.breakout,
|
|
1775
|
+
to: e.breakout ? `#${f(d)}` : void 0
|
|
1776
|
+
}, [
|
|
1777
|
+
D(Ee, {
|
|
1778
|
+
shown: e.open,
|
|
1779
|
+
"anchor-id": f(r),
|
|
1780
|
+
"container-id": e.breakout ? f(d) : y.$attrs.id || f(d),
|
|
1781
|
+
"helper-text": e.helperText,
|
|
1782
|
+
"helper-description": e.helperDescription,
|
|
1783
|
+
position: e.dropdownPosition,
|
|
1784
|
+
preloaded: "",
|
|
1785
|
+
width: e.dropdownWidth,
|
|
1786
|
+
onClose: h,
|
|
1787
|
+
onEnter: m
|
|
1788
|
+
}, {
|
|
1789
|
+
default: P(() => [
|
|
1790
|
+
D(f(i), {
|
|
1791
|
+
label: e.dropdownLabel,
|
|
1792
|
+
"model-value": e.selectedOption,
|
|
1793
|
+
options: e.options,
|
|
1794
|
+
"options-id": f(c),
|
|
1795
|
+
"selected-options": e.selectedOptions,
|
|
1796
|
+
shown: e.open,
|
|
1797
|
+
"onUpdate:modelValue": T,
|
|
1798
|
+
"onUpdate:selectedOptions": V,
|
|
1799
|
+
onClose: b[1] || (b[1] = (S) => e.multiselect ? void 0 : h())
|
|
1800
|
+
}, {
|
|
1801
|
+
default: P(() => [
|
|
1802
|
+
e.multiselect ? w("", !0) : (s(!0), v(R, { key: 0 }, G(e.options, (S) => (s(), O(ie, {
|
|
1803
|
+
key: S.value,
|
|
1804
|
+
value: S.value
|
|
1805
|
+
}, {
|
|
1806
|
+
default: P(() => [
|
|
1807
|
+
W(A(S.label), 1)
|
|
1808
|
+
]),
|
|
1809
|
+
_: 2
|
|
1810
|
+
}, 1032, ["value"]))), 128))
|
|
1811
|
+
]),
|
|
1812
|
+
_: 1
|
|
1813
|
+
}, 8, ["label", "model-value", "options", "options-id", "selected-options", "shown"])
|
|
1814
|
+
]),
|
|
1815
|
+
_: 1
|
|
1816
|
+
}, 8, ["shown", "anchor-id", "container-id", "helper-text", "helper-description", "position", "width"])
|
|
1817
|
+
], 8, ["disabled", "to"])) : w("", !0)
|
|
1818
|
+
], 8, pa));
|
|
1539
1819
|
}
|
|
1540
|
-
},
|
|
1820
|
+
}, ha = {
|
|
1821
|
+
class: "bs-field-details",
|
|
1822
|
+
"data-component": "bs-field-details"
|
|
1823
|
+
}, ba = ["id", "data-error"], ga = ["data-error"], Se = {
|
|
1824
|
+
__name: "BsFieldDetails",
|
|
1825
|
+
props: {
|
|
1826
|
+
/** The number of characters that have been entered by the user. */
|
|
1827
|
+
charCount: Number,
|
|
1828
|
+
/** Pass value to show character count and set the maximum number of characters that are allowed to be submitted by the user. */
|
|
1829
|
+
charMax: Number,
|
|
1830
|
+
/** Applies error styles to the helper text. */
|
|
1831
|
+
error: {
|
|
1832
|
+
type: Boolean,
|
|
1833
|
+
default: !1
|
|
1834
|
+
},
|
|
1835
|
+
/** Pass error text. Will be shown if `error` is `true`. */
|
|
1836
|
+
errorMsg: String,
|
|
1837
|
+
/** Pass single helper text. */
|
|
1838
|
+
hint: String,
|
|
1839
|
+
/** Adds an id to associate a hint to an input. */
|
|
1840
|
+
hintId: String
|
|
1841
|
+
},
|
|
1842
|
+
setup(e) {
|
|
1843
|
+
const a = e, t = g(() => a.error && a.errorMsg || a.hint);
|
|
1844
|
+
return (l, n) => (s(), v("div", ha, [
|
|
1845
|
+
t.value ? (s(), v("span", {
|
|
1846
|
+
key: 0,
|
|
1847
|
+
id: e.hintId,
|
|
1848
|
+
class: "bs-hint",
|
|
1849
|
+
"data-error": e.error
|
|
1850
|
+
}, A(t.value), 9, ba)) : w("", !0),
|
|
1851
|
+
e.charMax ? (s(), v("span", {
|
|
1852
|
+
key: 1,
|
|
1853
|
+
"aria-description": "character count over character limit for the preceding text field",
|
|
1854
|
+
class: "bs-character-count",
|
|
1855
|
+
"data-error": a.charCount > a.charMax
|
|
1856
|
+
}, A(a.charCount || "0") + " / " + A(a.charMax), 9, ga)) : w("", !0)
|
|
1857
|
+
]));
|
|
1858
|
+
}
|
|
1859
|
+
}, ma = ["view-box"], ya = ["id"], Ba = ["offset", "stop-color"], el = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1541
1860
|
__name: "BsIconGradientWrapper",
|
|
1542
1861
|
setup(e) {
|
|
1543
|
-
const a = I(null), t = I(null),
|
|
1862
|
+
const a = I(null), t = I(null), l = [
|
|
1544
1863
|
{ offset: 0.1326, color: "#EE282A" },
|
|
1545
1864
|
{ offset: 0.5466, color: "#1C0087" },
|
|
1546
1865
|
{ offset: 0.9715, color: "#0086EA" }
|
|
1547
|
-
], [
|
|
1548
|
-
return
|
|
1866
|
+
], [n] = K();
|
|
1867
|
+
return F(() => {
|
|
1549
1868
|
t.value = a.value.querySelector("svg").getAttribute("viewBox") || "0 0 0 0";
|
|
1550
|
-
}), (o, u) => (
|
|
1551
|
-
|
|
1869
|
+
}), (o, u) => (s(), v(R, null, [
|
|
1870
|
+
$("span", M({
|
|
1552
1871
|
ref_key: "svgWrapperRef",
|
|
1553
1872
|
ref: a,
|
|
1554
1873
|
class: "bs-icon-gradient-wrapper",
|
|
1555
|
-
style: `fill: url(#${
|
|
1874
|
+
style: `fill: url(#${f(n)});`
|
|
1556
1875
|
}, o.$attrs), [
|
|
1557
|
-
|
|
1876
|
+
L(o.$slots, "default")
|
|
1558
1877
|
], 16),
|
|
1559
|
-
(
|
|
1878
|
+
(s(), v("svg", {
|
|
1560
1879
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1561
1880
|
"view-box": t.value,
|
|
1562
1881
|
width: "0",
|
|
1563
1882
|
height: "0"
|
|
1564
1883
|
}, [
|
|
1565
|
-
|
|
1566
|
-
id:
|
|
1884
|
+
$("linearGradient", {
|
|
1885
|
+
id: f(n),
|
|
1567
1886
|
x1: "0",
|
|
1568
1887
|
y1: "0",
|
|
1569
1888
|
x2: "100%",
|
|
1570
1889
|
y2: "100%",
|
|
1571
1890
|
"gradient-units": "userSpaceOnUse"
|
|
1572
1891
|
}, [
|
|
1573
|
-
(
|
|
1892
|
+
(s(), v(R, null, G(l, (i) => $("stop", {
|
|
1574
1893
|
key: i.offset,
|
|
1575
1894
|
offset: i.offset,
|
|
1576
1895
|
"stop-color": i.color
|
|
1577
|
-
}, null, 8,
|
|
1578
|
-
], 8,
|
|
1579
|
-
], 8,
|
|
1896
|
+
}, null, 8, Ba)), 64))
|
|
1897
|
+
], 8, ya)
|
|
1898
|
+
], 8, ma))
|
|
1580
1899
|
], 64));
|
|
1581
1900
|
}
|
|
1582
|
-
}),
|
|
1901
|
+
}), $a = ["data-error", "id", "value"], Oe = {
|
|
1583
1902
|
__name: "BsInput",
|
|
1584
1903
|
props: {
|
|
1585
1904
|
error: {
|
|
@@ -1594,21 +1913,21 @@ const Dt = {
|
|
|
1594
1913
|
},
|
|
1595
1914
|
emits: ["update:modelValue"],
|
|
1596
1915
|
setup(e, { emit: a }) {
|
|
1597
|
-
const t = e,
|
|
1916
|
+
const t = e, l = a, n = U(), o = g(() => ({ [t.error ? "aria-errormessage" : "aria-describedby"]: t.hintId }));
|
|
1598
1917
|
function u(i) {
|
|
1599
|
-
const
|
|
1600
|
-
|
|
1918
|
+
const r = n.type === "number" ? parseInt(i.target.value) : i.target.value;
|
|
1919
|
+
l("update:modelValue", r);
|
|
1601
1920
|
}
|
|
1602
|
-
return (i,
|
|
1921
|
+
return (i, r) => (s(), v("input", M({
|
|
1603
1922
|
class: "bs-input",
|
|
1604
1923
|
"data-component": "bs-input",
|
|
1605
1924
|
"data-error": e.error,
|
|
1606
1925
|
id: i.$attrs.id || e.inputId,
|
|
1607
1926
|
value: e.value || e.modelValue,
|
|
1608
1927
|
onInput: u
|
|
1609
|
-
}, o.value), null, 16,
|
|
1928
|
+
}, o.value), null, 16, $a));
|
|
1610
1929
|
}
|
|
1611
|
-
},
|
|
1930
|
+
}, Sa = ["data-disabled", "data-error", "data-variant", "data-multifocus"], wa = {
|
|
1612
1931
|
__name: "BsInputAddon",
|
|
1613
1932
|
props: {
|
|
1614
1933
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -1617,7 +1936,7 @@ const Dt = {
|
|
|
1617
1936
|
variant: { type: String, validator: (e) => e === "inner-bordered" }
|
|
1618
1937
|
},
|
|
1619
1938
|
setup(e) {
|
|
1620
|
-
return (a, t) => (
|
|
1939
|
+
return (a, t) => (s(), v("div", {
|
|
1621
1940
|
class: "bs-input-addon",
|
|
1622
1941
|
"data-component": "bs-input-addon",
|
|
1623
1942
|
"data-disabled": e.disabled,
|
|
@@ -1625,10 +1944,10 @@ const Dt = {
|
|
|
1625
1944
|
"data-variant": e.variant,
|
|
1626
1945
|
"data-multifocus": e.multifocus
|
|
1627
1946
|
}, [
|
|
1628
|
-
|
|
1629
|
-
], 8,
|
|
1947
|
+
L(a.$slots, "default")
|
|
1948
|
+
], 8, Sa));
|
|
1630
1949
|
}
|
|
1631
|
-
},
|
|
1950
|
+
}, tl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1632
1951
|
__name: "BsInputField",
|
|
1633
1952
|
props: {
|
|
1634
1953
|
/** Sets the disabled state on input, disabled styles on label. */
|
|
@@ -1675,7 +1994,7 @@ const Dt = {
|
|
|
1675
1994
|
},
|
|
1676
1995
|
emits: ["update:modelValue"],
|
|
1677
1996
|
setup(e, { emit: a }) {
|
|
1678
|
-
const t = e,
|
|
1997
|
+
const t = e, l = U(), [n, o] = K(2), { toChild: u, toRoot: i } = ae(t, l, [
|
|
1679
1998
|
"aria-label",
|
|
1680
1999
|
"autocomplete",
|
|
1681
2000
|
"max",
|
|
@@ -1683,46 +2002,46 @@ const Dt = {
|
|
|
1683
2002
|
"min",
|
|
1684
2003
|
"minlength",
|
|
1685
2004
|
"name"
|
|
1686
|
-
]),
|
|
1687
|
-
var
|
|
1688
|
-
return ((
|
|
2005
|
+
]), r = g(() => {
|
|
2006
|
+
var p, h;
|
|
2007
|
+
return ((h = (p = t.hints) == null ? void 0 : p.join) == null ? void 0 : h.call(p, `
|
|
1689
2008
|
`)) || t.hints;
|
|
1690
|
-
}),
|
|
1691
|
-
return (
|
|
1692
|
-
e.label ||
|
|
2009
|
+
}), d = g(() => t.error && t.errorMsg || t.hint || r.value || void 0), c = g(() => t.inputId || n.value);
|
|
2010
|
+
return (p, h) => (s(), v("div", M({ "data-component": "bs-input-field" }, f(i)), [
|
|
2011
|
+
e.label || p.$slots.label ? (s(), O(ne, {
|
|
1693
2012
|
key: 0,
|
|
1694
2013
|
for: c.value,
|
|
1695
2014
|
disabled: e.disabled,
|
|
1696
2015
|
required: e.required
|
|
1697
2016
|
}, {
|
|
1698
|
-
default:
|
|
1699
|
-
|
|
1700
|
-
|
|
2017
|
+
default: P(() => [
|
|
2018
|
+
L(p.$slots, "label", {}, () => [
|
|
2019
|
+
W(A(e.label), 1)
|
|
1701
2020
|
])
|
|
1702
2021
|
]),
|
|
1703
2022
|
_: 3
|
|
1704
|
-
}, 8, ["for", "disabled", "required"])) :
|
|
1705
|
-
|
|
2023
|
+
}, 8, ["for", "disabled", "required"])) : w("", !0),
|
|
2024
|
+
D(Oe, M({
|
|
1706
2025
|
disabled: e.disabled,
|
|
1707
2026
|
error: e.error,
|
|
1708
|
-
"hint-id":
|
|
2027
|
+
"hint-id": f(o),
|
|
1709
2028
|
id: c.value,
|
|
1710
2029
|
placeholder: e.placeholder,
|
|
1711
2030
|
required: e.required,
|
|
1712
2031
|
type: e.type,
|
|
1713
2032
|
value: e.value || e.modelValue,
|
|
1714
|
-
"onUpdate:modelValue":
|
|
1715
|
-
},
|
|
1716
|
-
|
|
2033
|
+
"onUpdate:modelValue": h[0] || (h[0] = (m) => p.$emit("update:modelValue", m))
|
|
2034
|
+
}, f(u)), null, 16, ["disabled", "error", "hint-id", "id", "placeholder", "required", "type", "value"]),
|
|
2035
|
+
d.value ? (s(), O(Se, {
|
|
1717
2036
|
key: 1,
|
|
1718
2037
|
error: e.error,
|
|
1719
2038
|
"error-msg": e.errorMsg,
|
|
1720
|
-
hint: e.hint ||
|
|
1721
|
-
"hint-id":
|
|
1722
|
-
}, null, 8, ["error", "error-msg", "hint", "hint-id"])) :
|
|
2039
|
+
hint: e.hint || r.value,
|
|
2040
|
+
"hint-id": f(o)
|
|
2041
|
+
}, null, 8, ["error", "error-msg", "hint", "hint-id"])) : w("", !0)
|
|
1723
2042
|
], 16));
|
|
1724
2043
|
}
|
|
1725
|
-
}),
|
|
2044
|
+
}), ka = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1726
2045
|
__name: "BsInputSearch",
|
|
1727
2046
|
props: {
|
|
1728
2047
|
/** Sets the disabled state on input, disabled styles on label. */
|
|
@@ -1734,7 +2053,14 @@ const Dt = {
|
|
|
1734
2053
|
type: Boolean,
|
|
1735
2054
|
default: !1
|
|
1736
2055
|
},
|
|
1737
|
-
|
|
2056
|
+
hideSearchIcon: {
|
|
2057
|
+
type: Boolean,
|
|
2058
|
+
default: !1
|
|
2059
|
+
},
|
|
2060
|
+
inputId: {
|
|
2061
|
+
type: String,
|
|
2062
|
+
default: void 0
|
|
2063
|
+
},
|
|
1738
2064
|
modelValue: {
|
|
1739
2065
|
type: String,
|
|
1740
2066
|
default: ""
|
|
@@ -1760,48 +2086,235 @@ const Dt = {
|
|
|
1760
2086
|
},
|
|
1761
2087
|
emits: ["clear", "update:modelValue"],
|
|
1762
2088
|
setup(e, { emit: a }) {
|
|
1763
|
-
const t = e,
|
|
2089
|
+
const t = e, l = U(), { toChild: n, toRoot: o } = ae(t, l, [
|
|
1764
2090
|
"aria-label",
|
|
1765
2091
|
"autocomplete",
|
|
1766
2092
|
"maxlength",
|
|
1767
2093
|
"minlength",
|
|
1768
2094
|
"name"
|
|
1769
|
-
]), u =
|
|
1770
|
-
return (i,
|
|
2095
|
+
]), u = g(() => !t.disabled && !t.hideClear && t.variant !== "filter");
|
|
2096
|
+
return (i, r) => (s(), O(wa, M({
|
|
1771
2097
|
class: "bs-input-search",
|
|
1772
2098
|
"data-component": "bs-input-search",
|
|
1773
2099
|
"data-variant": e.variant,
|
|
1774
2100
|
disabled: e.disabled
|
|
1775
|
-
},
|
|
1776
|
-
default:
|
|
1777
|
-
|
|
1778
|
-
|
|
2101
|
+
}, f(o)), {
|
|
2102
|
+
default: P(() => [
|
|
2103
|
+
e.hideSearchIcon ? w("", !0) : (s(), O(f(at), { key: 0 })),
|
|
2104
|
+
D(Oe, M({
|
|
1779
2105
|
"data-autowidth": "",
|
|
1780
2106
|
disabled: e.disabled,
|
|
1781
2107
|
"input-id": e.inputId,
|
|
1782
2108
|
placeholder: e.placeholder,
|
|
1783
2109
|
value: e.value || e.modelValue,
|
|
1784
|
-
"onUpdate:modelValue":
|
|
1785
|
-
},
|
|
1786
|
-
|
|
1787
|
-
key: 0,
|
|
2110
|
+
"onUpdate:modelValue": r[0] || (r[0] = (d) => i.$emit("update:modelValue", d))
|
|
2111
|
+
}, f(n)), null, 16, ["disabled", "input-id", "placeholder", "value"]),
|
|
2112
|
+
ye($("button", {
|
|
1788
2113
|
title: "Clear",
|
|
1789
2114
|
type: "button",
|
|
1790
|
-
onClick:
|
|
2115
|
+
onClick: r[1] || (r[1] = (d) => i.$emit("clear"))
|
|
1791
2116
|
}, [
|
|
1792
|
-
|
|
1793
|
-
])
|
|
2117
|
+
D(f(de), { size: "sm" })
|
|
2118
|
+
], 512), [
|
|
2119
|
+
[Be, u.value]
|
|
2120
|
+
])
|
|
1794
2121
|
]),
|
|
1795
2122
|
_: 1
|
|
1796
2123
|
}, 16, ["data-variant", "disabled"]));
|
|
1797
2124
|
}
|
|
1798
|
-
}),
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
2125
|
+
}), De = (e, a) => {
|
|
2126
|
+
const t = e.__vccOpts || e;
|
|
2127
|
+
for (const [l, n] of a)
|
|
2128
|
+
t[l] = n;
|
|
2129
|
+
return t;
|
|
2130
|
+
}, Ia = { key: 0 }, Ta = ["innerHTML"], xa = { key: 1 }, Ca = {
|
|
2131
|
+
key: 0,
|
|
2132
|
+
class: "bs-empty-option"
|
|
2133
|
+
}, Aa = {
|
|
2134
|
+
__name: "BsInputTypeahead",
|
|
2135
|
+
props: {
|
|
2136
|
+
characterThreshold: {
|
|
2137
|
+
type: Number,
|
|
2138
|
+
default: 1
|
|
2139
|
+
},
|
|
2140
|
+
disabled: {
|
|
2141
|
+
type: Boolean,
|
|
2142
|
+
default: !1
|
|
2143
|
+
},
|
|
2144
|
+
filterType: {
|
|
2145
|
+
type: String,
|
|
2146
|
+
default: "starts-with",
|
|
2147
|
+
validator: (e) => ["includes", "starts-with"].includes(e)
|
|
2148
|
+
},
|
|
2149
|
+
hideSearchIcon: {
|
|
2150
|
+
type: Boolean,
|
|
2151
|
+
default: !1
|
|
2152
|
+
},
|
|
2153
|
+
inputValue: {
|
|
2154
|
+
type: String,
|
|
2155
|
+
default: ""
|
|
2156
|
+
},
|
|
2157
|
+
internalFiltering: {
|
|
2158
|
+
type: Boolean,
|
|
2159
|
+
default: !0
|
|
2160
|
+
},
|
|
2161
|
+
label: {
|
|
2162
|
+
type: String,
|
|
2163
|
+
default: ""
|
|
2164
|
+
},
|
|
2165
|
+
maxOptions: {
|
|
2166
|
+
type: Number,
|
|
2167
|
+
default: void 0
|
|
2168
|
+
},
|
|
2169
|
+
// [{ label: String, value: String, description: String, icon: String }] }
|
|
2170
|
+
options: {
|
|
2171
|
+
type: Array,
|
|
2172
|
+
required: !0
|
|
2173
|
+
},
|
|
2174
|
+
optionsValue: {
|
|
2175
|
+
type: [String, Number],
|
|
2176
|
+
default: ""
|
|
2177
|
+
},
|
|
2178
|
+
placeholder: {
|
|
2179
|
+
type: String,
|
|
2180
|
+
default: ""
|
|
2181
|
+
},
|
|
2182
|
+
required: {
|
|
2183
|
+
type: Boolean,
|
|
2184
|
+
default: !1
|
|
2185
|
+
},
|
|
2186
|
+
typeaheadId: {
|
|
2187
|
+
type: String,
|
|
2188
|
+
required: !0
|
|
2189
|
+
}
|
|
2190
|
+
},
|
|
2191
|
+
emits: ["update:inputValue", "update:optionsValue"],
|
|
2192
|
+
setup(e, { emit: a }) {
|
|
2193
|
+
const t = e, l = a, n = I(!1), o = I(!1), u = {};
|
|
2194
|
+
let i = [];
|
|
2195
|
+
Qe(() => {
|
|
2196
|
+
t.options.forEach((b) => {
|
|
2197
|
+
const { icon: S } = b;
|
|
2198
|
+
S && !u[S] && (u[S] = T(S));
|
|
2199
|
+
});
|
|
2200
|
+
}), z(() => t.inputValue, () => {
|
|
2201
|
+
o.value ? o.value = !1 : k();
|
|
2202
|
+
});
|
|
2203
|
+
const r = g(() => `${t.typeaheadId}-input-addon`), d = g(() => `${t.typeaheadId}-input`), c = g(() => `${t.typeaheadId}-options`), p = g(() => {
|
|
2204
|
+
if (n.value) {
|
|
2205
|
+
let b = t.options;
|
|
2206
|
+
const S = t.inputValue.toLowerCase(), x = t.filterType === "includes" ? "includes" : "startsWith";
|
|
2207
|
+
return b = h(b, S, x), b = b.slice(0, t.maxOptions), b = m(b, S, x), i = b, b;
|
|
2208
|
+
} else
|
|
2209
|
+
return i;
|
|
2210
|
+
});
|
|
2211
|
+
function h(b, S, x) {
|
|
2212
|
+
return t.internalFiltering ? b.filter((N) => N.label.toLowerCase()[x](S)) : b;
|
|
2213
|
+
}
|
|
2214
|
+
function m(b, S, x) {
|
|
2215
|
+
return b.map((N) => {
|
|
2216
|
+
let re = N.label;
|
|
2217
|
+
if (S !== "") {
|
|
2218
|
+
const Z = x === "includes" ? "gi" : "i", le = new RegExp(`(${S})`, Z);
|
|
2219
|
+
re = N.label.replace(le, '<span style="color: var(--bs-blue-base)">$1</span>');
|
|
2220
|
+
}
|
|
2221
|
+
return { ...N, labelHtml: re };
|
|
2222
|
+
});
|
|
2223
|
+
}
|
|
2224
|
+
function V(b) {
|
|
2225
|
+
let S = "";
|
|
2226
|
+
return b.icon && (S += " 2-col"), b.description && (S += " description"), S;
|
|
2227
|
+
}
|
|
2228
|
+
function T(b) {
|
|
2229
|
+
return me(async () => {
|
|
2230
|
+
const { [`BsIcon${b}`]: S } = await import("@wwtdev/bsds-icons-vue3");
|
|
2231
|
+
return S;
|
|
2232
|
+
});
|
|
2233
|
+
}
|
|
2234
|
+
function k() {
|
|
2235
|
+
t.inputValue.length >= t.characterThreshold ? n.value = !0 : n.value = !1;
|
|
2236
|
+
}
|
|
2237
|
+
function E() {
|
|
2238
|
+
l("update:inputValue", ""), l("update:optionsValue", ""), document.getElementById(d.value).focus();
|
|
2239
|
+
}
|
|
2240
|
+
function y(b) {
|
|
2241
|
+
o.value = !0, n.value = !1;
|
|
2242
|
+
const S = p.value.find((x) => x.value === b);
|
|
2243
|
+
l("update:inputValue", S.label), l("update:optionsValue", b);
|
|
2244
|
+
}
|
|
2245
|
+
return (b, S) => (s(), v(R, null, [
|
|
2246
|
+
e.label || b.$slots.label ? (s(), O(f(ne), {
|
|
2247
|
+
key: 0,
|
|
2248
|
+
for: d.value,
|
|
2249
|
+
disabled: e.disabled,
|
|
2250
|
+
required: e.required
|
|
2251
|
+
}, {
|
|
2252
|
+
default: P(() => [
|
|
2253
|
+
L(b.$slots, "label", {}, () => [
|
|
2254
|
+
W(A(e.label), 1)
|
|
2255
|
+
], !0)
|
|
2256
|
+
]),
|
|
2257
|
+
_: 3
|
|
2258
|
+
}, 8, ["for", "disabled", "required"])) : w("", !0),
|
|
2259
|
+
D(f(ka), M({
|
|
2260
|
+
"aria-controls": c.value,
|
|
2261
|
+
"aria-expanded": n.value,
|
|
2262
|
+
"aria-haspopup": "listbox",
|
|
2263
|
+
autocomplete: "off",
|
|
2264
|
+
disabled: e.disabled,
|
|
2265
|
+
"hide-clear": e.inputValue === "",
|
|
2266
|
+
"hide-search-icon": e.hideSearchIcon,
|
|
2267
|
+
id: r.value,
|
|
2268
|
+
"input-id": d.value,
|
|
2269
|
+
placeholder: e.placeholder,
|
|
2270
|
+
value: e.inputValue
|
|
2271
|
+
}, b.$attrs, {
|
|
2272
|
+
onClear: E,
|
|
2273
|
+
onFocusin: k,
|
|
2274
|
+
"onUpdate:modelValue": S[0] || (S[0] = (x) => l("update:inputValue", x))
|
|
2275
|
+
}), null, 16, ["aria-controls", "aria-expanded", "disabled", "hide-clear", "hide-search-icon", "id", "input-id", "placeholder", "value"]),
|
|
2276
|
+
D(f(Pe), {
|
|
2277
|
+
"anchor-id": r.value,
|
|
2278
|
+
"focus-on-show": !1,
|
|
2279
|
+
"model-value": e.optionsValue,
|
|
2280
|
+
"options-id": c.value,
|
|
2281
|
+
preloaded: !0,
|
|
2282
|
+
"prevent-tab": !1,
|
|
2283
|
+
shown: n.value,
|
|
2284
|
+
width: "toggle",
|
|
2285
|
+
onClose: S[1] || (S[1] = (x) => n.value = !1),
|
|
2286
|
+
"onUpdate:modelValue": y
|
|
2287
|
+
}, {
|
|
2288
|
+
default: P(() => [
|
|
2289
|
+
(s(!0), v(R, null, G(p.value, (x) => (s(), O(f(ie), {
|
|
2290
|
+
key: x.value,
|
|
2291
|
+
value: x.value,
|
|
2292
|
+
variant: V(x)
|
|
2293
|
+
}, {
|
|
2294
|
+
default: P(() => [
|
|
2295
|
+
x.icon ? (s(), v("span", Ia, [
|
|
2296
|
+
(s(), O(H(u[x.icon])))
|
|
2297
|
+
])) : w("", !0),
|
|
2298
|
+
$("span", {
|
|
2299
|
+
innerHTML: x.labelHtml
|
|
2300
|
+
}, null, 8, Ta),
|
|
2301
|
+
x.description ? (s(), v("span", xa, A(x.description), 1)) : w("", !0)
|
|
2302
|
+
]),
|
|
2303
|
+
_: 2
|
|
2304
|
+
}, 1032, ["value", "variant"]))), 128)),
|
|
2305
|
+
p.value.length === 0 ? (s(), v("li", Ca, " No results found ")) : w("", !0)
|
|
2306
|
+
]),
|
|
2307
|
+
_: 1
|
|
2308
|
+
}, 8, ["anchor-id", "model-value", "options-id", "shown"])
|
|
2309
|
+
], 64));
|
|
2310
|
+
}
|
|
2311
|
+
}, al = /* @__PURE__ */ De(Aa, [["__scopeId", "data-v-730b56e5"]]), La = ["data-size", "data-variant"], Va = /* @__PURE__ */ $("span", null, null, -1), Ea = /* @__PURE__ */ $("span", null, null, -1), Pa = /* @__PURE__ */ $("span", null, null, -1), Oa = /* @__PURE__ */ $("span", null, null, -1), Da = /* @__PURE__ */ $("span", { class: "visually-hidden" }, "Loading", -1), qa = [
|
|
2312
|
+
Va,
|
|
2313
|
+
Ea,
|
|
2314
|
+
Pa,
|
|
2315
|
+
Oa,
|
|
2316
|
+
Da
|
|
2317
|
+
], nl = {
|
|
1805
2318
|
__name: "BsLoader",
|
|
1806
2319
|
props: {
|
|
1807
2320
|
size: {
|
|
@@ -1815,14 +2328,14 @@ const Dt = {
|
|
|
1815
2328
|
}
|
|
1816
2329
|
},
|
|
1817
2330
|
setup(e) {
|
|
1818
|
-
return (a, t) => (
|
|
2331
|
+
return (a, t) => (s(), v("span", {
|
|
1819
2332
|
class: "bs-loader",
|
|
1820
2333
|
"data-size": e.size,
|
|
1821
2334
|
"data-variant": e.variant,
|
|
1822
2335
|
role: "status"
|
|
1823
|
-
},
|
|
2336
|
+
}, qa, 8, La));
|
|
1824
2337
|
}
|
|
1825
|
-
},
|
|
2338
|
+
}, Ma = /* @__PURE__ */ $("div", { class: "bs-overlay" }, null, -1), za = {
|
|
1826
2339
|
__name: "BsOverlay",
|
|
1827
2340
|
props: {
|
|
1828
2341
|
shown: {
|
|
@@ -1851,31 +2364,35 @@ const Dt = {
|
|
|
1851
2364
|
},
|
|
1852
2365
|
emits: ["after-enter", "after-leave"],
|
|
1853
2366
|
setup(e, { emit: a }) {
|
|
1854
|
-
const t = e,
|
|
1855
|
-
return (o, u) => (
|
|
1856
|
-
shown:
|
|
2367
|
+
const t = e, l = a, { transition: n } = ve(t);
|
|
2368
|
+
return (o, u) => (s(), O(f(pe), {
|
|
2369
|
+
shown: f(n),
|
|
1857
2370
|
preloaded: e.preloaded,
|
|
1858
2371
|
duration: 75,
|
|
1859
2372
|
"enter-attribute": "data-shown",
|
|
1860
|
-
onAfterEnter: u[0] || (u[0] = (i) =>
|
|
1861
|
-
onAfterLeave: u[1] || (u[1] = (i) =>
|
|
2373
|
+
onAfterEnter: u[0] || (u[0] = (i) => l("after-enter")),
|
|
2374
|
+
onAfterLeave: u[1] || (u[1] = (i) => l("after-leave"))
|
|
1862
2375
|
}, {
|
|
1863
|
-
default:
|
|
1864
|
-
|
|
2376
|
+
default: P(() => [
|
|
2377
|
+
Ma
|
|
1865
2378
|
]),
|
|
1866
2379
|
_: 1
|
|
1867
2380
|
}, 8, ["shown", "preloaded"]));
|
|
1868
2381
|
}
|
|
1869
|
-
},
|
|
2382
|
+
}, Ra = ["id", "role"], Na = {
|
|
1870
2383
|
key: 0,
|
|
1871
|
-
class: "
|
|
1872
|
-
},
|
|
2384
|
+
class: "modal-title"
|
|
2385
|
+
}, ll = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1873
2386
|
__name: "BsModal",
|
|
1874
2387
|
props: {
|
|
1875
2388
|
modalId: {
|
|
1876
2389
|
type: String,
|
|
1877
2390
|
default: void 0
|
|
1878
2391
|
},
|
|
2392
|
+
title: {
|
|
2393
|
+
type: String,
|
|
2394
|
+
required: !1
|
|
2395
|
+
},
|
|
1879
2396
|
shown: {
|
|
1880
2397
|
type: Boolean,
|
|
1881
2398
|
default: !0
|
|
@@ -1908,67 +2425,83 @@ const Dt = {
|
|
|
1908
2425
|
default: !1
|
|
1909
2426
|
}
|
|
1910
2427
|
},
|
|
1911
|
-
emits: [
|
|
1912
|
-
"close",
|
|
1913
|
-
"after-enter",
|
|
1914
|
-
"after-leave"
|
|
1915
|
-
],
|
|
2428
|
+
emits: ["close", "after-enter", "after-leave"],
|
|
1916
2429
|
setup(e, { emit: a }) {
|
|
1917
|
-
const t = e,
|
|
2430
|
+
const t = e, l = a, { transition: n } = ve(t);
|
|
1918
2431
|
let o = !1;
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
}
|
|
1922
|
-
|
|
1923
|
-
|
|
2432
|
+
const u = I(null), i = (c) => {
|
|
2433
|
+
u.value && c.target.closest(".bs-overlay") && l("close", t.modalId);
|
|
2434
|
+
};
|
|
2435
|
+
F(() => {
|
|
2436
|
+
document.addEventListener("click", i);
|
|
2437
|
+
}), _(() => {
|
|
2438
|
+
document.removeEventListener("click", i);
|
|
2439
|
+
}), fe(["Escape"], () => {
|
|
2440
|
+
o && l("close", t.modalId);
|
|
2441
|
+
});
|
|
2442
|
+
const r = () => !t.title && t.closeButton, d = () => t.title && t.closeButton;
|
|
2443
|
+
return (c, p) => (s(), v(R, null, [
|
|
2444
|
+
D(za, {
|
|
2445
|
+
shown: f(n),
|
|
1924
2446
|
preloaded: e.preloaded,
|
|
1925
2447
|
"enter-controlled": e.enterControlled,
|
|
1926
2448
|
"enter-trigger": e.enterTrigger,
|
|
1927
2449
|
"leave-trigger": e.leaveTrigger
|
|
1928
2450
|
}, null, 8, ["shown", "preloaded", "enter-controlled", "enter-trigger", "leave-trigger"]),
|
|
1929
|
-
|
|
1930
|
-
shown:
|
|
2451
|
+
D(pe, {
|
|
2452
|
+
shown: f(n),
|
|
1931
2453
|
preloaded: e.preloaded,
|
|
1932
2454
|
duration: 75,
|
|
1933
2455
|
"enter-attribute": "data-shown",
|
|
1934
|
-
onEnter:
|
|
1935
|
-
onAfterEnter:
|
|
1936
|
-
onAfterLeave:
|
|
2456
|
+
onEnter: p[1] || (p[1] = (h) => _e(o) ? o.value = !0 : o = !0),
|
|
2457
|
+
onAfterEnter: p[2] || (p[2] = (h) => l("after-enter")),
|
|
2458
|
+
onAfterLeave: p[3] || (p[3] = (h) => l("after-leave"))
|
|
1937
2459
|
}, {
|
|
1938
|
-
default:
|
|
1939
|
-
|
|
2460
|
+
default: P(() => [
|
|
2461
|
+
$("div", M({
|
|
1940
2462
|
id: t.modalId,
|
|
1941
2463
|
class: "bs-modal",
|
|
1942
2464
|
role: e.alert ? "alertdialog" : "dialog",
|
|
1943
2465
|
"aria-modal": "true"
|
|
1944
|
-
},
|
|
1945
|
-
|
|
1946
|
-
|
|
2466
|
+
}, c.$attrs, {
|
|
2467
|
+
ref_key: "modalRef",
|
|
2468
|
+
ref: u
|
|
2469
|
+
}), [
|
|
2470
|
+
e.title || e.closeButton ? (s(), v("header", {
|
|
2471
|
+
key: 0,
|
|
2472
|
+
class: Q({
|
|
2473
|
+
"only-close-button-modal-header": r,
|
|
2474
|
+
"modal-header": d
|
|
2475
|
+
})
|
|
2476
|
+
}, [
|
|
2477
|
+
e.title ? (s(), v("h5", Na, A(e.title), 1)) : w("", !0),
|
|
2478
|
+
e.closeButton ? (s(), v("button", {
|
|
2479
|
+
key: 1,
|
|
1947
2480
|
type: "button",
|
|
1948
2481
|
title: "Close Modal",
|
|
1949
2482
|
"aria-label": "Close Modal",
|
|
1950
|
-
onClick:
|
|
2483
|
+
onClick: p[0] || (p[0] = (h) => l("close", e.modalId))
|
|
1951
2484
|
}, [
|
|
1952
|
-
|
|
1953
|
-
])
|
|
1954
|
-
])) :
|
|
1955
|
-
|
|
1956
|
-
], 16,
|
|
2485
|
+
D(f(de), { class: "close-button" })
|
|
2486
|
+
])) : w("", !0)
|
|
2487
|
+
], 2)) : w("", !0),
|
|
2488
|
+
L(c.$slots, "default")
|
|
2489
|
+
], 16, Ra)
|
|
1957
2490
|
]),
|
|
1958
2491
|
_: 3
|
|
1959
2492
|
}, 8, ["shown", "preloaded"])
|
|
1960
2493
|
], 64));
|
|
1961
2494
|
}
|
|
1962
|
-
}),
|
|
2495
|
+
}), ja = ["data-variant", "data-fixed"], Wa = {
|
|
1963
2496
|
key: 0,
|
|
1964
2497
|
class: "bs-pagination-carets"
|
|
1965
|
-
},
|
|
2498
|
+
}, Fa = ["title", "disabled"], Ua = { key: 0 }, Ga = ["title", "disabled"], Ha = { key: 0 }, Ka = {
|
|
1966
2499
|
key: 1,
|
|
1967
2500
|
class: "bs-pagination-page-numbers"
|
|
1968
|
-
},
|
|
2501
|
+
}, Ya = ["title", "data-selected", "onClick"], Xa = { key: 2 }, Za = { key: 3 }, Ja = /* @__PURE__ */ $("span", null, "Results Per Page:", -1), Qa = { class: "bs-pagination-results-numbers" }, _a = ["data-selected", "disabled", "onClick"], en = {
|
|
1969
2502
|
key: 5,
|
|
1970
2503
|
class: "bs-pagination-carets"
|
|
1971
|
-
},
|
|
2504
|
+
}, tn = ["title", "disabled"], an = { key: 0 }, nn = ["title", "disabled"], ln = { key: 0 }, ol = {
|
|
1972
2505
|
__name: "BsPagination",
|
|
1973
2506
|
props: {
|
|
1974
2507
|
// Used for all
|
|
@@ -2054,129 +2587,129 @@ const Dt = {
|
|
|
2054
2587
|
},
|
|
2055
2588
|
emits: ["selchange", "update:modelValue"],
|
|
2056
2589
|
setup(e, { emit: a }) {
|
|
2057
|
-
const t = e,
|
|
2058
|
-
|
|
2059
|
-
o.value ?
|
|
2590
|
+
const t = e, l = a, n = I(null);
|
|
2591
|
+
F(() => {
|
|
2592
|
+
o.value ? n.value = o.value : t.variant === "results" ? n.value = T.value[0] : n.value = 1;
|
|
2060
2593
|
});
|
|
2061
|
-
const o =
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
}),
|
|
2065
|
-
|
|
2066
|
-
}),
|
|
2067
|
-
|
|
2594
|
+
const o = g(() => t.modelValue || t.selection);
|
|
2595
|
+
z(() => t.selection, (k) => {
|
|
2596
|
+
n.value = k;
|
|
2597
|
+
}), z(() => t.modelValue, (k) => {
|
|
2598
|
+
n.value = k;
|
|
2599
|
+
}), z(n, (k, E) => {
|
|
2600
|
+
E !== null && (l("selchange", k), l("update:modelValue", k));
|
|
2068
2601
|
});
|
|
2069
|
-
const u =
|
|
2602
|
+
const u = g(() => {
|
|
2070
2603
|
if (t.variant === "group")
|
|
2071
2604
|
return Math.ceil(t.itemsCount / t.itemsPerGroup);
|
|
2072
2605
|
if (t.variant === "base")
|
|
2073
2606
|
return t.pageCount;
|
|
2074
|
-
}), i =
|
|
2075
|
-
function s() {
|
|
2076
|
-
l.value = 1;
|
|
2077
|
-
}
|
|
2607
|
+
}), i = g(() => t.variant === "base" ? t.centerDisplay === "text" ? "group" : void 0 : t.variant);
|
|
2078
2608
|
function r() {
|
|
2079
|
-
|
|
2609
|
+
n.value = 1;
|
|
2610
|
+
}
|
|
2611
|
+
function d() {
|
|
2612
|
+
n.value = Math.max(n.value - 1, 1);
|
|
2080
2613
|
}
|
|
2081
2614
|
function c() {
|
|
2082
|
-
|
|
2083
|
-
|
|
2615
|
+
n.value = Math.min(
|
|
2616
|
+
n.value + 1,
|
|
2084
2617
|
u.value
|
|
2085
2618
|
);
|
|
2086
2619
|
}
|
|
2087
|
-
function
|
|
2088
|
-
|
|
2620
|
+
function p() {
|
|
2621
|
+
n.value = u.value;
|
|
2089
2622
|
}
|
|
2090
|
-
const
|
|
2623
|
+
const h = g(() => {
|
|
2091
2624
|
if (t.pageCount <= t.pageRange)
|
|
2092
2625
|
return [...Array(t.pageCount + 1).keys()].slice(1);
|
|
2093
|
-
const
|
|
2094
|
-
let y =
|
|
2095
|
-
y < 1 && (
|
|
2096
|
-
for (let
|
|
2097
|
-
|
|
2098
|
-
return
|
|
2099
|
-
}),
|
|
2100
|
-
const
|
|
2101
|
-
return `${t.centerLabel ?? "Results"} ${
|
|
2102
|
-
}),
|
|
2103
|
-
return (
|
|
2626
|
+
const k = [1], E = (t.pageRange - 1) / 2;
|
|
2627
|
+
let y = n.value - E, b = n.value + E;
|
|
2628
|
+
y < 1 && (b += 1 - y, y = 1), b > t.pageCount && (y -= b - t.pageCount, b = t.pageCount), y = Math.max(y, 2), b = Math.min(b, t.pageCount - 1), y > 2 && k.push(t.breakText);
|
|
2629
|
+
for (let S = y; S <= b; S++)
|
|
2630
|
+
k.push(S);
|
|
2631
|
+
return b < t.pageCount - 1 && k.push(t.breakText), k.push(t.pageCount), k;
|
|
2632
|
+
}), m = g(() => `${t.centerLabel ?? "Page"} ${n.value} of ${u.value}`), V = g(() => {
|
|
2633
|
+
const k = (n.value - 1) * t.itemsPerGroup + 1, E = Math.min(k - 1 + t.itemsPerGroup, t.itemsCount);
|
|
2634
|
+
return `${t.centerLabel ?? "Results"} ${k} - ${E} of ${t.itemsCount}`;
|
|
2635
|
+
}), T = g(() => t.resultsIncrements.split(",").map((k) => parseInt(k)));
|
|
2636
|
+
return (k, E) => (s(), v("div", {
|
|
2104
2637
|
class: "bs-pagination",
|
|
2105
2638
|
"data-variant": i.value,
|
|
2106
2639
|
"data-fixed": t.fixed
|
|
2107
2640
|
}, [
|
|
2108
|
-
e.variant === "base" || e.variant === "group" ? (
|
|
2109
|
-
e.showFirstLastButtons ? (
|
|
2641
|
+
e.variant === "base" || e.variant === "group" ? (s(), v("div", Wa, [
|
|
2642
|
+
e.showFirstLastButtons ? (s(), v("button", {
|
|
2110
2643
|
key: 0,
|
|
2111
2644
|
type: "button",
|
|
2112
|
-
class:
|
|
2645
|
+
class: Q(e.firstPageText ? "bs-pagination-word-caret" : void 0),
|
|
2113
2646
|
title: e.firstPageText,
|
|
2114
|
-
disabled:
|
|
2115
|
-
onClick:
|
|
2647
|
+
disabled: n.value === 1,
|
|
2648
|
+
onClick: r
|
|
2116
2649
|
}, [
|
|
2117
|
-
|
|
2118
|
-
e.firstPageText ? (
|
|
2119
|
-
], 10,
|
|
2120
|
-
|
|
2650
|
+
D(f(nt)),
|
|
2651
|
+
e.firstPageText ? (s(), v("span", Ua, A(e.firstPageText), 1)) : w("", !0)
|
|
2652
|
+
], 10, Fa)) : w("", !0),
|
|
2653
|
+
$("button", {
|
|
2121
2654
|
type: "button",
|
|
2122
|
-
class:
|
|
2655
|
+
class: Q(e.prevPageText ? "bs-pagination-word-caret" : void 0),
|
|
2123
2656
|
title: e.prevPageText,
|
|
2124
|
-
disabled:
|
|
2125
|
-
onClick:
|
|
2657
|
+
disabled: n.value === 1,
|
|
2658
|
+
onClick: d
|
|
2126
2659
|
}, [
|
|
2127
|
-
|
|
2128
|
-
e.prevPageText ? (
|
|
2129
|
-
], 10,
|
|
2130
|
-
])) :
|
|
2131
|
-
e.variant === "base" && e.centerDisplay === "numbers" ? (
|
|
2132
|
-
(
|
|
2660
|
+
D(f(lt)),
|
|
2661
|
+
e.prevPageText ? (s(), v("span", Ha, A(e.prevPageText), 1)) : w("", !0)
|
|
2662
|
+
], 10, Ga)
|
|
2663
|
+
])) : w("", !0),
|
|
2664
|
+
e.variant === "base" && e.centerDisplay === "numbers" ? (s(), v("div", Ka, [
|
|
2665
|
+
(s(!0), v(R, null, G(h.value, (y) => (s(), v("button", {
|
|
2133
2666
|
key: `page-${y}-button`,
|
|
2134
2667
|
type: "button",
|
|
2135
2668
|
title: `Page ${y}`,
|
|
2136
|
-
"data-selected": y ===
|
|
2137
|
-
onClick: (
|
|
2138
|
-
},
|
|
2139
|
-
])) :
|
|
2140
|
-
t.variant === "base" && t.centerDisplay === "text" ? (
|
|
2141
|
-
t.variant === "group" ? (
|
|
2142
|
-
t.variant === "results" ? (
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
(
|
|
2669
|
+
"data-selected": y === n.value,
|
|
2670
|
+
onClick: (b) => n.value = y
|
|
2671
|
+
}, A(y), 9, Ya))), 128))
|
|
2672
|
+
])) : w("", !0),
|
|
2673
|
+
t.variant === "base" && t.centerDisplay === "text" ? (s(), v("span", Xa, A(m.value), 1)) : w("", !0),
|
|
2674
|
+
t.variant === "group" ? (s(), v("span", Za, A(V.value), 1)) : w("", !0),
|
|
2675
|
+
t.variant === "results" ? (s(), v(R, { key: 4 }, [
|
|
2676
|
+
Ja,
|
|
2677
|
+
$("div", Qa, [
|
|
2678
|
+
(s(!0), v(R, null, G(T.value, (y) => (s(), v("button", {
|
|
2146
2679
|
type: "button",
|
|
2147
2680
|
key: `results-${y}`,
|
|
2148
|
-
"data-selected": y ===
|
|
2149
|
-
disabled:
|
|
2150
|
-
onClick: (
|
|
2151
|
-
},
|
|
2681
|
+
"data-selected": y === n.value,
|
|
2682
|
+
disabled: n.value === y,
|
|
2683
|
+
onClick: (b) => n.value = y
|
|
2684
|
+
}, A(y), 9, _a))), 128))
|
|
2152
2685
|
])
|
|
2153
|
-
], 64)) :
|
|
2154
|
-
e.variant === "base" || e.variant === "group" ? (
|
|
2155
|
-
|
|
2686
|
+
], 64)) : w("", !0),
|
|
2687
|
+
e.variant === "base" || e.variant === "group" ? (s(), v("div", en, [
|
|
2688
|
+
$("button", {
|
|
2156
2689
|
type: "button",
|
|
2157
|
-
class:
|
|
2690
|
+
class: Q(e.nextPageText ? "bs-pagination-word-caret" : void 0),
|
|
2158
2691
|
title: e.nextPageText,
|
|
2159
|
-
disabled:
|
|
2692
|
+
disabled: n.value === u.value,
|
|
2160
2693
|
onClick: c
|
|
2161
2694
|
}, [
|
|
2162
|
-
e.nextPageText ? (
|
|
2163
|
-
|
|
2164
|
-
], 10,
|
|
2165
|
-
e.showFirstLastButtons ? (
|
|
2695
|
+
e.nextPageText ? (s(), v("span", an, A(e.nextPageText), 1)) : w("", !0),
|
|
2696
|
+
D(f(ot))
|
|
2697
|
+
], 10, tn),
|
|
2698
|
+
e.showFirstLastButtons ? (s(), v("button", {
|
|
2166
2699
|
key: 0,
|
|
2167
2700
|
type: "button",
|
|
2168
|
-
class:
|
|
2701
|
+
class: Q(e.lastPageText ? "bs-pagination-word-caret" : void 0),
|
|
2169
2702
|
title: e.lastPageText,
|
|
2170
|
-
disabled:
|
|
2171
|
-
onClick:
|
|
2703
|
+
disabled: n.value === u.value,
|
|
2704
|
+
onClick: p
|
|
2172
2705
|
}, [
|
|
2173
|
-
e.lastPageText ? (
|
|
2174
|
-
|
|
2175
|
-
], 10,
|
|
2176
|
-
])) :
|
|
2177
|
-
], 8,
|
|
2706
|
+
e.lastPageText ? (s(), v("span", ln, A(e.lastPageText), 1)) : w("", !0),
|
|
2707
|
+
D(f(it))
|
|
2708
|
+
], 10, nn)) : w("", !0)
|
|
2709
|
+
])) : w("", !0)
|
|
2710
|
+
], 8, ja));
|
|
2178
2711
|
}
|
|
2179
|
-
},
|
|
2712
|
+
}, on = ["data-truncate"], il = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
2180
2713
|
__name: "BsPill",
|
|
2181
2714
|
props: {
|
|
2182
2715
|
active: { type: Boolean, default: !1 },
|
|
@@ -2200,35 +2733,35 @@ const Dt = {
|
|
|
2200
2733
|
}
|
|
2201
2734
|
},
|
|
2202
2735
|
setup(e) {
|
|
2203
|
-
const a = e, { onLinkClick: t } =
|
|
2204
|
-
return (i,
|
|
2736
|
+
const a = e, { onLinkClick: t } = ce(a), l = U(), { rootTag: n, attrsToBind: o, hrefUrl: u } = ue(a, l, "span");
|
|
2737
|
+
return (i, r) => (s(), O(H(f(n)), M({
|
|
2205
2738
|
class: "bs-pill",
|
|
2206
2739
|
"data-active": e.active,
|
|
2207
2740
|
"data-component": "bs-pill",
|
|
2208
2741
|
"data-status": e.status || void 0,
|
|
2209
2742
|
"data-variant": e.variant || void 0,
|
|
2210
2743
|
disabled: e.disabled,
|
|
2211
|
-
".href":
|
|
2212
|
-
},
|
|
2213
|
-
default:
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
], 8,
|
|
2744
|
+
".href": f(u)
|
|
2745
|
+
}, f(o), { onClick: f(t) }), {
|
|
2746
|
+
default: P(() => [
|
|
2747
|
+
$("span", { "data-truncate": e.truncate }, [
|
|
2748
|
+
L(i.$slots, "default")
|
|
2749
|
+
], 8, on)
|
|
2217
2750
|
]),
|
|
2218
2751
|
_: 3
|
|
2219
2752
|
}, 48, ["data-active", "data-status", "data-variant", "disabled", ".href", "onClick"]));
|
|
2220
2753
|
}
|
|
2221
|
-
}),
|
|
2754
|
+
}), rn = { class: "bs-profile-details" }, sn = {
|
|
2222
2755
|
class: "bs-profile-name",
|
|
2223
2756
|
"data-size": "sm",
|
|
2224
2757
|
"data-weight": "bold"
|
|
2225
|
-
},
|
|
2758
|
+
}, dn = {
|
|
2226
2759
|
key: 1,
|
|
2227
2760
|
"data-weight": "bold"
|
|
2228
|
-
},
|
|
2761
|
+
}, un = { key: 2 }, cn = { key: 3 }, fn = {
|
|
2229
2762
|
key: 4,
|
|
2230
2763
|
"data-icon": "true"
|
|
2231
|
-
},
|
|
2764
|
+
}, vn = {
|
|
2232
2765
|
__name: "BsProfileDetails",
|
|
2233
2766
|
props: {
|
|
2234
2767
|
profileName: {
|
|
@@ -2245,40 +2778,40 @@ const Dt = {
|
|
|
2245
2778
|
},
|
|
2246
2779
|
emits: ["action-toggled"],
|
|
2247
2780
|
setup(e, { emit: a }) {
|
|
2248
|
-
const t = e,
|
|
2781
|
+
const t = e, l = a, { icon: n } = se(t, "actionIcon"), { icon: o } = se(t, "miscMetaIcon");
|
|
2249
2782
|
function u(i) {
|
|
2250
|
-
i.target.tagName === "BUTTON" && (i.preventDefault(), i.stopImmediatePropagation(),
|
|
2783
|
+
i.target.tagName === "BUTTON" && (i.preventDefault(), i.stopImmediatePropagation(), l("action-toggled"));
|
|
2251
2784
|
}
|
|
2252
|
-
return (i,
|
|
2253
|
-
e.action || i.$slots.action ? (
|
|
2785
|
+
return (i, r) => (s(), v("div", rn, [
|
|
2786
|
+
e.action || i.$slots.action ? (s(), v("button", {
|
|
2254
2787
|
key: 0,
|
|
2255
2788
|
"data-icon": "true",
|
|
2256
2789
|
onClick: u
|
|
2257
2790
|
}, [
|
|
2258
|
-
|
|
2259
|
-
e.actionIcon ? (
|
|
2791
|
+
L(i.$slots, "action", {}, () => [
|
|
2792
|
+
e.actionIcon ? (s(), O(H(f(n) ? f(n) : "span"), {
|
|
2260
2793
|
key: 0,
|
|
2261
2794
|
class: "bs-icon"
|
|
2262
|
-
})) :
|
|
2263
|
-
|
|
2795
|
+
})) : w("", !0),
|
|
2796
|
+
W(" " + A(e.action), 1)
|
|
2264
2797
|
])
|
|
2265
|
-
])) :
|
|
2266
|
-
|
|
2267
|
-
e.company ? (
|
|
2268
|
-
e.jobTitle ? (
|
|
2269
|
-
e.email ? (
|
|
2270
|
-
e.miscMeta || i.$slots.misc ? (
|
|
2271
|
-
|
|
2272
|
-
e.miscMetaIcon ? (
|
|
2798
|
+
])) : w("", !0),
|
|
2799
|
+
$("span", sn, A(e.profileName), 1),
|
|
2800
|
+
e.company ? (s(), v("span", dn, A(e.company), 1)) : w("", !0),
|
|
2801
|
+
e.jobTitle ? (s(), v("span", un, A(e.jobTitle), 1)) : w("", !0),
|
|
2802
|
+
e.email ? (s(), v("span", cn, A(e.email), 1)) : w("", !0),
|
|
2803
|
+
e.miscMeta || i.$slots.misc ? (s(), v("span", fn, [
|
|
2804
|
+
L(i.$slots, "misc", {}, () => [
|
|
2805
|
+
e.miscMetaIcon ? (s(), O(H(f(o) ? f(o) : "span"), {
|
|
2273
2806
|
key: 0,
|
|
2274
2807
|
class: "bs-icon"
|
|
2275
|
-
})) :
|
|
2276
|
-
|
|
2808
|
+
})) : w("", !0),
|
|
2809
|
+
W(" " + A(e.miscMeta), 1)
|
|
2277
2810
|
])
|
|
2278
|
-
])) :
|
|
2811
|
+
])) : w("", !0)
|
|
2279
2812
|
]));
|
|
2280
2813
|
}
|
|
2281
|
-
},
|
|
2814
|
+
}, pn = ["data-img-size", "data-initials", "data-no-img"], hn = ["src", "alt"], bn = {
|
|
2282
2815
|
__name: "BsProfileImg",
|
|
2283
2816
|
props: {
|
|
2284
2817
|
src: String,
|
|
@@ -2293,22 +2826,22 @@ const Dt = {
|
|
|
2293
2826
|
}
|
|
2294
2827
|
},
|
|
2295
2828
|
setup(e) {
|
|
2296
|
-
const a = e, t = I(!1),
|
|
2297
|
-
return
|
|
2829
|
+
const a = e, t = I(!1), l = I(!!a.src);
|
|
2830
|
+
return F(() => t.value = !0), (n, o) => (s(), v("div", {
|
|
2298
2831
|
class: "bs-profile-img",
|
|
2299
2832
|
"data-img-size": e.size,
|
|
2300
2833
|
"data-initials": e.initials,
|
|
2301
|
-
"data-no-img": !
|
|
2834
|
+
"data-no-img": !l.value
|
|
2302
2835
|
}, [
|
|
2303
|
-
|
|
2836
|
+
l.value && t.value ? (s(), v("img", {
|
|
2304
2837
|
key: 0,
|
|
2305
2838
|
src: e.src,
|
|
2306
2839
|
alt: e.profileName,
|
|
2307
|
-
onError: o[0] || (o[0] = (u) =>
|
|
2308
|
-
}, null, 40,
|
|
2309
|
-
], 8,
|
|
2840
|
+
onError: o[0] || (o[0] = (u) => l.value = !1)
|
|
2841
|
+
}, null, 40, hn)) : w("", !0)
|
|
2842
|
+
], 8, pn));
|
|
2310
2843
|
}
|
|
2311
|
-
},
|
|
2844
|
+
}, rl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
2312
2845
|
__name: "BsProfile",
|
|
2313
2846
|
props: {
|
|
2314
2847
|
layout: {
|
|
@@ -2338,20 +2871,20 @@ const Dt = {
|
|
|
2338
2871
|
},
|
|
2339
2872
|
emits: ["action-toggled"],
|
|
2340
2873
|
setup(e, { emit: a }) {
|
|
2341
|
-
const t = e,
|
|
2342
|
-
return (
|
|
2874
|
+
const t = e, l = a, n = U(), { onLinkClick: o } = ce(t), { rootTag: u, attrsToBind: i, hrefUrl: r } = ue(t, n, "div");
|
|
2875
|
+
return (d, c) => (s(), O(H(f(u)), M({
|
|
2343
2876
|
class: "bs-profile",
|
|
2344
|
-
".href":
|
|
2877
|
+
".href": f(r),
|
|
2345
2878
|
"data-layout": e.layout
|
|
2346
|
-
},
|
|
2347
|
-
default:
|
|
2348
|
-
|
|
2879
|
+
}, f(i), { onClick: f(o) }), {
|
|
2880
|
+
default: P(() => [
|
|
2881
|
+
D(bn, {
|
|
2349
2882
|
src: e.imageSrc,
|
|
2350
2883
|
size: e.imageSize,
|
|
2351
2884
|
initials: e.initials,
|
|
2352
2885
|
"profile-name": e.profileName
|
|
2353
2886
|
}, null, 8, ["src", "size", "initials", "profile-name"]),
|
|
2354
|
-
|
|
2887
|
+
D(vn, {
|
|
2355
2888
|
"profile-name": e.profileName,
|
|
2356
2889
|
company: e.company,
|
|
2357
2890
|
"job-title": e.jobTitle,
|
|
@@ -2360,13 +2893,13 @@ const Dt = {
|
|
|
2360
2893
|
"action-icon": e.actionIcon,
|
|
2361
2894
|
"misc-meta": e.miscMeta,
|
|
2362
2895
|
"misc-meta-icon": e.miscMetaIcon,
|
|
2363
|
-
onActionToggled: c[0] || (c[0] = (
|
|
2896
|
+
onActionToggled: c[0] || (c[0] = (p) => l("action-toggled"))
|
|
2364
2897
|
}, {
|
|
2365
|
-
action:
|
|
2366
|
-
|
|
2898
|
+
action: P(() => [
|
|
2899
|
+
L(d.$slots, "action")
|
|
2367
2900
|
]),
|
|
2368
|
-
misc:
|
|
2369
|
-
|
|
2901
|
+
misc: P(() => [
|
|
2902
|
+
L(d.$slots, "misc")
|
|
2370
2903
|
]),
|
|
2371
2904
|
_: 3
|
|
2372
2905
|
}, 8, ["profile-name", "company", "job-title", "email", "action", "action-icon", "misc-meta", "misc-meta-icon"])
|
|
@@ -2374,7 +2907,7 @@ const Dt = {
|
|
|
2374
2907
|
_: 3
|
|
2375
2908
|
}, 48, [".href", "data-layout", "onClick"]));
|
|
2376
2909
|
}
|
|
2377
|
-
}),
|
|
2910
|
+
}), gn = ["data-size"], mn = ["checked", "disabled", "id", "required", "value", "data-error"], sl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
2378
2911
|
__name: "BsRadio",
|
|
2379
2912
|
props: {
|
|
2380
2913
|
label: {
|
|
@@ -2418,39 +2951,39 @@ const Dt = {
|
|
|
2418
2951
|
},
|
|
2419
2952
|
emits: ["update:modelValue"],
|
|
2420
2953
|
setup(e, { emit: a }) {
|
|
2421
|
-
const t = e,
|
|
2422
|
-
return (
|
|
2954
|
+
const t = e, l = U(), [n] = K(), { toChild: o, toRoot: u } = ae(t, l, ["aria-label", "name"]), i = g(() => t.inputId || n.value), r = g(() => t.checked || t.modelValue && t.modelValue === t.value);
|
|
2955
|
+
return (d, c) => (s(), v("div", M({
|
|
2423
2956
|
class: "bs-boolean",
|
|
2424
2957
|
"data-component": "bs-radio",
|
|
2425
2958
|
"data-size": e.size
|
|
2426
|
-
},
|
|
2427
|
-
|
|
2428
|
-
checked:
|
|
2959
|
+
}, f(u)), [
|
|
2960
|
+
$("input", M({
|
|
2961
|
+
checked: r.value,
|
|
2429
2962
|
disabled: e.disabled,
|
|
2430
2963
|
id: i.value,
|
|
2431
2964
|
required: e.required,
|
|
2432
2965
|
type: "radio",
|
|
2433
2966
|
value: e.value,
|
|
2434
2967
|
"data-error": e.error
|
|
2435
|
-
},
|
|
2436
|
-
onChange: c[0] || (c[0] = (
|
|
2437
|
-
}), null, 16,
|
|
2438
|
-
e.label ||
|
|
2968
|
+
}, f(o), {
|
|
2969
|
+
onChange: c[0] || (c[0] = (p) => d.$emit("update:modelValue", p.target.value))
|
|
2970
|
+
}), null, 16, mn),
|
|
2971
|
+
e.label || d.$slots.label ? (s(), O(ne, {
|
|
2439
2972
|
key: 0,
|
|
2440
2973
|
for: i.value,
|
|
2441
2974
|
disabled: e.disabled,
|
|
2442
2975
|
required: e.required
|
|
2443
2976
|
}, {
|
|
2444
|
-
default:
|
|
2445
|
-
|
|
2446
|
-
|
|
2977
|
+
default: P(() => [
|
|
2978
|
+
L(d.$slots, "label", {}, () => [
|
|
2979
|
+
W(A(e.label), 1)
|
|
2447
2980
|
])
|
|
2448
2981
|
]),
|
|
2449
2982
|
_: 3
|
|
2450
|
-
}, 8, ["for", "disabled", "required"])) :
|
|
2451
|
-
], 16,
|
|
2983
|
+
}, 8, ["for", "disabled", "required"])) : w("", !0)
|
|
2984
|
+
], 16, gn));
|
|
2452
2985
|
}
|
|
2453
|
-
}),
|
|
2986
|
+
}), yn = ["id", "disabled", "required", "data-error", "value"], Bn = {
|
|
2454
2987
|
__name: "BsSelect",
|
|
2455
2988
|
props: {
|
|
2456
2989
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -2463,22 +2996,22 @@ const Dt = {
|
|
|
2463
2996
|
},
|
|
2464
2997
|
emits: ["update:modelValue"],
|
|
2465
2998
|
setup(e, { emit: a }) {
|
|
2466
|
-
const t = e,
|
|
2467
|
-
return (
|
|
2468
|
-
id:
|
|
2999
|
+
const t = e, l = g(() => ({ [t.error ? "aria-errormessage" : "aria-describedby"]: t.hintId }));
|
|
3000
|
+
return (n, o) => (s(), v("select", M({
|
|
3001
|
+
id: n.$attrs.id || e.inputId,
|
|
2469
3002
|
class: "bs-select",
|
|
2470
3003
|
"data-component": "bs-select",
|
|
2471
3004
|
disabled: e.disabled,
|
|
2472
3005
|
required: e.required,
|
|
2473
3006
|
"data-error": e.error,
|
|
2474
3007
|
value: e.value || e.modelValue
|
|
2475
|
-
},
|
|
2476
|
-
onChange: o[0] || (o[0] = (u) =>
|
|
3008
|
+
}, l.value, {
|
|
3009
|
+
onChange: o[0] || (o[0] = (u) => n.$emit("update:modelValue", u.target.value))
|
|
2477
3010
|
}), [
|
|
2478
|
-
|
|
2479
|
-
], 16,
|
|
3011
|
+
L(n.$slots, "default")
|
|
3012
|
+
], 16, yn));
|
|
2480
3013
|
}
|
|
2481
|
-
},
|
|
3014
|
+
}, $n = ["selected", "disabled"], Sn = ["disabled", "selected", "value"], dl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
2482
3015
|
__name: "BsSelectField",
|
|
2483
3016
|
props: {
|
|
2484
3017
|
data: {
|
|
@@ -2522,64 +3055,64 @@ const Dt = {
|
|
|
2522
3055
|
modelValue: [String, Number]
|
|
2523
3056
|
},
|
|
2524
3057
|
setup(e) {
|
|
2525
|
-
const a = e, t =
|
|
3058
|
+
const a = e, t = U(), [l, n] = K(2), { toChild: o, toRoot: u } = ae(a, t, [
|
|
2526
3059
|
"aria-label",
|
|
2527
3060
|
"autofocus",
|
|
2528
3061
|
"name"
|
|
2529
|
-
]), i =
|
|
2530
|
-
var
|
|
2531
|
-
return ((
|
|
3062
|
+
]), i = g(() => {
|
|
3063
|
+
var p, h;
|
|
3064
|
+
return ((h = (p = a.hints) == null ? void 0 : p.join) == null ? void 0 : h.call(p, `
|
|
2532
3065
|
`)) || a.hints;
|
|
2533
|
-
}),
|
|
2534
|
-
return (
|
|
2535
|
-
e.label ||
|
|
3066
|
+
}), r = g(() => a.error && a.errorMsg || a.hint || i.value || void 0), d = g(() => a.inputId || l.value), c = g(() => a.value || a.modelValue);
|
|
3067
|
+
return (p, h) => (s(), v("div", M({ "data-component": "bs-select-field" }, f(u)), [
|
|
3068
|
+
e.label || p.$slots.label ? (s(), O(ne, {
|
|
2536
3069
|
key: 0,
|
|
2537
|
-
for:
|
|
3070
|
+
for: d.value,
|
|
2538
3071
|
disabled: e.disabled,
|
|
2539
3072
|
required: e.required
|
|
2540
3073
|
}, {
|
|
2541
|
-
default:
|
|
2542
|
-
|
|
2543
|
-
|
|
3074
|
+
default: P(() => [
|
|
3075
|
+
L(p.$slots, "label", {}, () => [
|
|
3076
|
+
W(A(e.label), 1)
|
|
2544
3077
|
])
|
|
2545
3078
|
]),
|
|
2546
3079
|
_: 3
|
|
2547
|
-
}, 8, ["for", "disabled", "required"])) :
|
|
2548
|
-
|
|
3080
|
+
}, 8, ["for", "disabled", "required"])) : w("", !0),
|
|
3081
|
+
D(Bn, M({
|
|
2549
3082
|
disabled: e.disabled,
|
|
2550
3083
|
error: e.error,
|
|
2551
|
-
"hint-id":
|
|
2552
|
-
"input-id":
|
|
3084
|
+
"hint-id": f(n),
|
|
3085
|
+
"input-id": d.value,
|
|
2553
3086
|
required: e.required,
|
|
2554
3087
|
value: c.value,
|
|
2555
|
-
"onUpdate:modelValue":
|
|
2556
|
-
},
|
|
2557
|
-
default:
|
|
2558
|
-
|
|
3088
|
+
"onUpdate:modelValue": h[0] || (h[0] = (m) => p.$emit("update:modelValue", m))
|
|
3089
|
+
}, f(o)), {
|
|
3090
|
+
default: P(() => [
|
|
3091
|
+
$("option", {
|
|
2559
3092
|
selected: !c.value,
|
|
2560
3093
|
value: "",
|
|
2561
3094
|
disabled: !!c.value
|
|
2562
|
-
},
|
|
2563
|
-
(
|
|
2564
|
-
key:
|
|
2565
|
-
disabled:
|
|
2566
|
-
selected: c.value ===
|
|
2567
|
-
value:
|
|
2568
|
-
},
|
|
3095
|
+
}, A(e.disabled ? "" : e.placeholder), 9, $n),
|
|
3096
|
+
(s(!0), v(R, null, G(e.data, (m) => (s(), v("option", {
|
|
3097
|
+
key: m.value,
|
|
3098
|
+
disabled: m.disabled,
|
|
3099
|
+
selected: c.value === m.value,
|
|
3100
|
+
value: m.value
|
|
3101
|
+
}, A(m.label), 9, Sn))), 128))
|
|
2569
3102
|
]),
|
|
2570
3103
|
_: 1
|
|
2571
3104
|
}, 16, ["disabled", "error", "hint-id", "input-id", "required", "value"]),
|
|
2572
|
-
|
|
3105
|
+
r.value ? (s(), O(Se, {
|
|
2573
3106
|
key: 1,
|
|
2574
3107
|
"data-disabled": e.disabled,
|
|
2575
3108
|
error: e.error,
|
|
2576
3109
|
"error-msg": e.errorMsg,
|
|
2577
3110
|
hint: e.hint || i.value,
|
|
2578
|
-
"hint-id":
|
|
2579
|
-
}, null, 8, ["data-disabled", "error", "error-msg", "hint", "hint-id"])) :
|
|
3111
|
+
"hint-id": f(n)
|
|
3112
|
+
}, null, 8, ["data-disabled", "error", "error-msg", "hint", "hint-id"])) : w("", !0)
|
|
2580
3113
|
], 16));
|
|
2581
3114
|
}
|
|
2582
|
-
}),
|
|
3115
|
+
}), wn = ["data-size"], kn = ["data-disabled", "data-pending", "data-size"], In = ["checked", "disabled", "id"], Tn = ["data-inner-on-label", "data-inner-off-label"], ul = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
2583
3116
|
__name: "BsSwitch",
|
|
2584
3117
|
props: {
|
|
2585
3118
|
checked: {
|
|
@@ -2625,48 +3158,48 @@ const Dt = {
|
|
|
2625
3158
|
},
|
|
2626
3159
|
emits: ["update:modelValue"],
|
|
2627
3160
|
setup(e, { emit: a }) {
|
|
2628
|
-
const t = e,
|
|
2629
|
-
return (c,
|
|
3161
|
+
const t = e, l = a, n = U(), [o] = K(), { toChild: u, toRoot: i } = ae(t, n, ["aria-label", "name", "value"]), r = g(() => t.inputId || o.value), d = g(() => t.checked || t.modelValue);
|
|
3162
|
+
return (c, p) => (s(), v("div", M({
|
|
2630
3163
|
class: "bs-boolean",
|
|
2631
3164
|
"data-component": "bs-switch",
|
|
2632
3165
|
"data-size": e.size
|
|
2633
|
-
},
|
|
2634
|
-
e.label || c.$slots.label ? (
|
|
3166
|
+
}, f(i)), [
|
|
3167
|
+
e.label || c.$slots.label ? (s(), O(ne, {
|
|
2635
3168
|
key: 0,
|
|
2636
|
-
for:
|
|
3169
|
+
for: r.value,
|
|
2637
3170
|
disabled: e.disabled,
|
|
2638
3171
|
hide: e.hideLabel
|
|
2639
3172
|
}, {
|
|
2640
|
-
default:
|
|
2641
|
-
|
|
2642
|
-
|
|
3173
|
+
default: P(() => [
|
|
3174
|
+
L(c.$slots, "label", {}, () => [
|
|
3175
|
+
W(A(e.label), 1)
|
|
2643
3176
|
])
|
|
2644
3177
|
]),
|
|
2645
3178
|
_: 3
|
|
2646
|
-
}, 8, ["for", "disabled", "hide"])) :
|
|
2647
|
-
|
|
3179
|
+
}, 8, ["for", "disabled", "hide"])) : w("", !0),
|
|
3180
|
+
$("div", {
|
|
2648
3181
|
class: "bs-switch",
|
|
2649
3182
|
"data-disabled": e.disabled,
|
|
2650
3183
|
"data-pending": e.pending,
|
|
2651
3184
|
"data-size": e.size
|
|
2652
3185
|
}, [
|
|
2653
|
-
|
|
2654
|
-
checked:
|
|
3186
|
+
$("input", M({
|
|
3187
|
+
checked: d.value,
|
|
2655
3188
|
disabled: e.disabled,
|
|
2656
|
-
id:
|
|
3189
|
+
id: r.value,
|
|
2657
3190
|
type: "checkbox"
|
|
2658
|
-
},
|
|
2659
|
-
onChange:
|
|
2660
|
-
}), null, 16,
|
|
2661
|
-
|
|
3191
|
+
}, f(u), {
|
|
3192
|
+
onChange: p[0] || (p[0] = (h) => l("update:modelValue", h.target.checked))
|
|
3193
|
+
}), null, 16, In),
|
|
3194
|
+
$("span", {
|
|
2662
3195
|
"aria-hidden": "true",
|
|
2663
3196
|
"data-inner-on-label": e.innerOnLabel,
|
|
2664
3197
|
"data-inner-off-label": e.innerOffLabel
|
|
2665
|
-
}, null, 8,
|
|
2666
|
-
], 8,
|
|
2667
|
-
], 16,
|
|
3198
|
+
}, null, 8, Tn)
|
|
3199
|
+
], 8, kn)
|
|
3200
|
+
], 16, wn));
|
|
2668
3201
|
}
|
|
2669
|
-
}),
|
|
3202
|
+
}), xn = ["aria-controls", "aria-selected", "data-hidden"], cl = {
|
|
2670
3203
|
__name: "BsTab",
|
|
2671
3204
|
props: {
|
|
2672
3205
|
activeTabId: {
|
|
@@ -2683,17 +3216,17 @@ const Dt = {
|
|
|
2683
3216
|
},
|
|
2684
3217
|
emits: ["tabClick"],
|
|
2685
3218
|
setup(e, { emit: a }) {
|
|
2686
|
-
const t = e,
|
|
2687
|
-
function i(
|
|
2688
|
-
(
|
|
3219
|
+
const t = e, l = U(), n = I(), o = g(() => t.activeTabId === l.id), u = g(() => t.panelId || `${l.id}-panel`);
|
|
3220
|
+
function i(d) {
|
|
3221
|
+
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), d.stopPropagation(), r());
|
|
2689
3222
|
}
|
|
2690
|
-
function
|
|
2691
|
-
if (t.activeTabId !==
|
|
2692
|
-
const
|
|
2693
|
-
|
|
3223
|
+
function r() {
|
|
3224
|
+
if (t.activeTabId !== l.id) {
|
|
3225
|
+
const d = new CustomEvent("tabClick", { detail: l.id, bubbles: !0 });
|
|
3226
|
+
n.value.dispatchEvent(d);
|
|
2694
3227
|
}
|
|
2695
3228
|
}
|
|
2696
|
-
return (
|
|
3229
|
+
return (d, c) => (s(), v("div", {
|
|
2697
3230
|
"aria-controls": u.value,
|
|
2698
3231
|
"aria-selected": o.value ? "true" : "false",
|
|
2699
3232
|
"data-hidden": e.hidden || void 0,
|
|
@@ -2701,14 +3234,14 @@ const Dt = {
|
|
|
2701
3234
|
role: "tab",
|
|
2702
3235
|
tabindex: "0",
|
|
2703
3236
|
ref_key: "hostEl",
|
|
2704
|
-
ref:
|
|
2705
|
-
onClick:
|
|
3237
|
+
ref: n,
|
|
3238
|
+
onClick: r,
|
|
2706
3239
|
onKeydown: i
|
|
2707
3240
|
}, [
|
|
2708
|
-
|
|
2709
|
-
], 40,
|
|
3241
|
+
L(d.$slots, "default")
|
|
3242
|
+
], 40, xn));
|
|
2710
3243
|
}
|
|
2711
|
-
},
|
|
3244
|
+
}, Cn = ["id", "data-resizing"], An = ["aria-controls", "aria-expanded", "data-active", "data-hidden", "id"], Ln = 73, Vn = 20, En = 16, fl = {
|
|
2712
3245
|
__name: "BsTabList",
|
|
2713
3246
|
props: {
|
|
2714
3247
|
activeTabId: { type: String, required: !0 },
|
|
@@ -2719,182 +3252,182 @@ const Dt = {
|
|
|
2719
3252
|
},
|
|
2720
3253
|
emits: ["tabChange", "update:modelValue"],
|
|
2721
3254
|
setup(e, { emit: a }) {
|
|
2722
|
-
const t = e,
|
|
2723
|
-
var
|
|
2724
|
-
return
|
|
2725
|
-
}),
|
|
2726
|
-
var
|
|
2727
|
-
let
|
|
3255
|
+
const t = e, l = a, n = I(!1), o = I(!1), u = I([]), i = I(!1), r = I(!1), d = I(), c = I([]), p = I(!1), h = I([]), m = I(), V = I(), T = I(), [k, E] = K(2), y = g(() => t.activeTabId ? h.value.findIndex((B) => B.id === t.activeTabId) : 0), b = g(() => u.value.some((B) => B.id === t.activeTabId)), S = g(() => `${E.value}-options`), x = g(() => `${E.value}-toggle`), N = g(() => {
|
|
3256
|
+
var B;
|
|
3257
|
+
return b.value ? (B = h.value[y.value]) == null ? void 0 : B.textContent : "More";
|
|
3258
|
+
}), re = g(() => b.value ? c.value[y.value] - c.value[y.value - 1] + Vn : Ln), Z = g(() => {
|
|
3259
|
+
var C, q;
|
|
3260
|
+
let B = [];
|
|
2728
3261
|
if (typeof window > "u")
|
|
2729
|
-
return
|
|
2730
|
-
for (let
|
|
2731
|
-
if (((
|
|
3262
|
+
return B;
|
|
3263
|
+
for (let j of h.value) {
|
|
3264
|
+
if (((C = j.dataset) == null ? void 0 : C.hidden) === "true" || ((q = j.dataset) == null ? void 0 : q.hidden) === "" || j.getAttribute("tabindex") === "-1")
|
|
2732
3265
|
break;
|
|
2733
|
-
|
|
3266
|
+
B.push(j);
|
|
2734
3267
|
}
|
|
2735
|
-
return
|
|
3268
|
+
return r.value && B.push(d.value.querySelector(".bs-tab-list-toggle")), B;
|
|
2736
3269
|
});
|
|
2737
|
-
function
|
|
2738
|
-
var
|
|
2739
|
-
let
|
|
2740
|
-
if ((
|
|
2741
|
-
for (let
|
|
2742
|
-
if (
|
|
2743
|
-
|
|
3270
|
+
function le() {
|
|
3271
|
+
var J;
|
|
3272
|
+
let B = !1, C, q = 0, j = !1, Y = [];
|
|
3273
|
+
if ((J = h.value) != null && J.length) {
|
|
3274
|
+
for (let X = 0; X < h.value.length; X++) {
|
|
3275
|
+
if (C = h.value[X], C.setAttribute("tabindex", "-1"), j && X !== y.value) {
|
|
3276
|
+
C.dataset.hidden = "true", Y.push(C);
|
|
2744
3277
|
continue;
|
|
2745
3278
|
}
|
|
2746
|
-
if (
|
|
2747
|
-
|
|
3279
|
+
if (q = X < h.value.length - 1 ? T.value - re.value : T.value, c.value[X] > q) {
|
|
3280
|
+
C.dataset.hidden = "true", Y.push(C), B = !0, j = !0;
|
|
2748
3281
|
continue;
|
|
2749
3282
|
}
|
|
2750
|
-
|
|
3283
|
+
C.dataset.hidden = "false", C.setAttribute("tabindex", "0");
|
|
2751
3284
|
}
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
},
|
|
3285
|
+
r.value = B, u.value = Y, n.value || oe(() => n.value = !0), setTimeout(() => {
|
|
3286
|
+
Ge(), p.value = !0;
|
|
3287
|
+
}, p.value ? 0 : 1e3);
|
|
2755
3288
|
}
|
|
2756
3289
|
}
|
|
2757
|
-
function
|
|
2758
|
-
|
|
3290
|
+
function he(B) {
|
|
3291
|
+
l("tabChange", B), l("update:modelValue", B);
|
|
2759
3292
|
}
|
|
2760
|
-
function
|
|
2761
|
-
var
|
|
2762
|
-
const
|
|
2763
|
-
return
|
|
3293
|
+
function qe(B) {
|
|
3294
|
+
var j, Y, J;
|
|
3295
|
+
const C = (J = (Y = (j = h.value[B]) == null ? void 0 : j.getBoundingClientRect) == null ? void 0 : Y.call(j)) == null ? void 0 : J.width;
|
|
3296
|
+
return C || (B === 0 ? c.value[0] : c.value[B] - c.value[B - 1]) || 0;
|
|
2764
3297
|
}
|
|
2765
|
-
function
|
|
2766
|
-
var
|
|
2767
|
-
(
|
|
3298
|
+
function Me() {
|
|
3299
|
+
var B;
|
|
3300
|
+
(B = h.value[y.value]) == null || B.setAttribute("aria-selected", "true"), le();
|
|
2768
3301
|
}
|
|
2769
|
-
function
|
|
2770
|
-
var
|
|
2771
|
-
(
|
|
3302
|
+
function ze() {
|
|
3303
|
+
var B;
|
|
3304
|
+
(B = m.value) == null || B.focus(), i.value = !1;
|
|
2772
3305
|
}
|
|
2773
|
-
function
|
|
3306
|
+
function Re() {
|
|
2774
3307
|
i.value = !i.value, o.value || (o.value = !0);
|
|
2775
3308
|
}
|
|
2776
|
-
function
|
|
2777
|
-
var
|
|
2778
|
-
i.value = !1, (
|
|
3309
|
+
function Ne(B) {
|
|
3310
|
+
var C;
|
|
3311
|
+
i.value = !1, (C = m.value) == null || C.focus(), he(B);
|
|
2779
3312
|
}
|
|
2780
|
-
function
|
|
3313
|
+
function je(B) {
|
|
2781
3314
|
if (t.withBsTabs)
|
|
2782
3315
|
return;
|
|
2783
|
-
const
|
|
2784
|
-
if (!
|
|
3316
|
+
const C = B.target.closest('[role="tab"]');
|
|
3317
|
+
if (!C || C.getAttribute("aria-selected") === "true")
|
|
2785
3318
|
return;
|
|
2786
|
-
const
|
|
2787
|
-
|
|
3319
|
+
const q = C.getAttribute("id");
|
|
3320
|
+
he(q);
|
|
2788
3321
|
}
|
|
2789
|
-
function
|
|
2790
|
-
if (
|
|
2791
|
-
const
|
|
2792
|
-
if (
|
|
3322
|
+
function We(B) {
|
|
3323
|
+
if (B.key === "ArrowLeft" || B.key === "ArrowRight") {
|
|
3324
|
+
const C = Z.value.findIndex((q) => q.id === B.target.id);
|
|
3325
|
+
if (C === -1)
|
|
2793
3326
|
return;
|
|
2794
|
-
|
|
3327
|
+
B.preventDefault(), B.stopPropagation(), B.key === "ArrowLeft" ? Ue(C) : Fe(C);
|
|
2795
3328
|
}
|
|
2796
3329
|
}
|
|
2797
|
-
function
|
|
2798
|
-
var
|
|
2799
|
-
const
|
|
2800
|
-
(
|
|
2801
|
-
}
|
|
2802
|
-
function
|
|
2803
|
-
var
|
|
2804
|
-
const
|
|
2805
|
-
(
|
|
2806
|
-
}
|
|
2807
|
-
function
|
|
2808
|
-
var
|
|
2809
|
-
const
|
|
2810
|
-
let
|
|
2811
|
-
|
|
2812
|
-
}
|
|
2813
|
-
function
|
|
2814
|
-
var
|
|
2815
|
-
(
|
|
2816
|
-
}
|
|
2817
|
-
function
|
|
2818
|
-
|
|
2819
|
-
for (let
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
}),
|
|
2823
|
-
}
|
|
2824
|
-
function
|
|
2825
|
-
|
|
2826
|
-
}
|
|
2827
|
-
function
|
|
2828
|
-
let
|
|
2829
|
-
|
|
2830
|
-
|
|
3330
|
+
function Fe(B) {
|
|
3331
|
+
var q;
|
|
3332
|
+
const C = (B + 1) % Z.value.length;
|
|
3333
|
+
(q = Z.value[C]) == null || q.focus();
|
|
3334
|
+
}
|
|
3335
|
+
function Ue(B) {
|
|
3336
|
+
var q;
|
|
3337
|
+
const C = B === 0 ? Z.value.length - 1 : B - 1;
|
|
3338
|
+
(q = Z.value[C]) == null || q.focus();
|
|
3339
|
+
}
|
|
3340
|
+
function Ge() {
|
|
3341
|
+
var J, X, we, ke;
|
|
3342
|
+
const B = parseInt(d.value.style.getPropertyValue("--active-line-offset")) || 0, C = T.value;
|
|
3343
|
+
let q = 300, j = ((X = (J = Z.value) == null ? void 0 : J[y.value]) == null ? void 0 : X.offsetLeft) || 0, Y = qe(y.value);
|
|
3344
|
+
r.value && b.value && (j = (we = m.value) == null ? void 0 : we.offsetLeft, Y = (ke = m.value) == null ? void 0 : ke.offsetWidth), q = Math.max(Math.abs((j - B) / C * 300), 100), d.value.style.setProperty("--active-line-max-width", `${C}px`), d.value.style.setProperty("--active-line-scale", `${Y / C}`), d.value.style.setProperty("--active-line-offset", `${j}px`), d.value.style.setProperty("--active-line-transition-duration", `${q}ms`);
|
|
3345
|
+
}
|
|
3346
|
+
function He() {
|
|
3347
|
+
var B, C;
|
|
3348
|
+
(C = (B = V.value) == null ? void 0 : B.disconnect) == null || C.call(B), V.value = null;
|
|
3349
|
+
}
|
|
3350
|
+
function Ke() {
|
|
3351
|
+
V.value = new ResizeObserver((B) => {
|
|
3352
|
+
for (let C of B)
|
|
3353
|
+
T.value = C.contentBoxSize[0].inlineSize;
|
|
3354
|
+
le();
|
|
3355
|
+
}), V.value.observe(d.value);
|
|
3356
|
+
}
|
|
3357
|
+
function Ye() {
|
|
3358
|
+
h.value = Array.from(d.value.children).filter((B) => B.role === "tab");
|
|
3359
|
+
}
|
|
3360
|
+
function Xe() {
|
|
3361
|
+
let B;
|
|
3362
|
+
h.value.forEach((C, q) => {
|
|
3363
|
+
B = C.getBoundingClientRect().width + En, c.value.push(q ? B + c.value[q - 1] : B);
|
|
2831
3364
|
});
|
|
2832
3365
|
}
|
|
2833
|
-
return
|
|
2834
|
-
var
|
|
3366
|
+
return z(() => t.activeTabId, Me), F(() => {
|
|
3367
|
+
var B;
|
|
2835
3368
|
try {
|
|
2836
|
-
|
|
2837
|
-
} catch (
|
|
2838
|
-
console.log("tab error",
|
|
3369
|
+
Ye(), Xe(), Ke(), T.value = d.value.getBoundingClientRect().width, le(), t.withBsTabs || (B = h.value[y.value]) == null || B.setAttribute("aria-selected", "true");
|
|
3370
|
+
} catch (C) {
|
|
3371
|
+
console.log("tab error", C);
|
|
2839
3372
|
}
|
|
2840
|
-
}),
|
|
3373
|
+
}), _(He), (B, C) => (s(), v("div", {
|
|
2841
3374
|
class: "bs-tab-list",
|
|
2842
3375
|
"data-component": "bs-tab-list",
|
|
2843
|
-
id:
|
|
3376
|
+
id: B.$attrs.id || f(k),
|
|
2844
3377
|
ref_key: "hostEl",
|
|
2845
|
-
ref:
|
|
3378
|
+
ref: d,
|
|
2846
3379
|
role: "tablist",
|
|
2847
|
-
"data-resizing": !
|
|
2848
|
-
onClick:
|
|
2849
|
-
"on:tabClick":
|
|
2850
|
-
onKeydown:
|
|
3380
|
+
"data-resizing": !n.value || void 0,
|
|
3381
|
+
onClick: je,
|
|
3382
|
+
"on:tabClick": C[0] || (C[0] = (q) => he(q.detail)),
|
|
3383
|
+
onKeydown: We
|
|
2851
3384
|
}, [
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
"aria-controls":
|
|
3385
|
+
L(B.$slots, "default"),
|
|
3386
|
+
$("button", {
|
|
3387
|
+
"aria-controls": f(E),
|
|
2855
3388
|
"aria-expanded": i.value,
|
|
2856
3389
|
class: "bs-tab-list-toggle",
|
|
2857
|
-
"data-active":
|
|
2858
|
-
"data-hidden": !
|
|
2859
|
-
id:
|
|
3390
|
+
"data-active": b.value || void 0,
|
|
3391
|
+
"data-hidden": !r.value,
|
|
3392
|
+
id: x.value,
|
|
2860
3393
|
ref_key: "dropdownToggle",
|
|
2861
|
-
ref:
|
|
2862
|
-
onClick:
|
|
3394
|
+
ref: m,
|
|
3395
|
+
onClick: Re
|
|
2863
3396
|
}, [
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
], 8,
|
|
2867
|
-
|
|
2868
|
-
"anchor-id":
|
|
2869
|
-
"container-id":
|
|
3397
|
+
D(f(rt), { size: "sm" }),
|
|
3398
|
+
W(" " + A(N.value), 1)
|
|
3399
|
+
], 8, An),
|
|
3400
|
+
D(Pe, {
|
|
3401
|
+
"anchor-id": x.value,
|
|
3402
|
+
"container-id": B.$attrs.id || f(k),
|
|
2870
3403
|
"helper-description": e.helperDescription || void 0,
|
|
2871
3404
|
"helper-text": e.helperText,
|
|
2872
|
-
id:
|
|
2873
|
-
"options-id":
|
|
3405
|
+
id: f(E),
|
|
3406
|
+
"options-id": S.value,
|
|
2874
3407
|
position: "right",
|
|
2875
3408
|
preloaded: "",
|
|
2876
3409
|
shown: i.value,
|
|
2877
3410
|
width: "content",
|
|
2878
|
-
onClose:
|
|
2879
|
-
"onUpdate:modelValue":
|
|
3411
|
+
onClose: ze,
|
|
3412
|
+
"onUpdate:modelValue": Ne
|
|
2880
3413
|
}, {
|
|
2881
|
-
default:
|
|
2882
|
-
(
|
|
2883
|
-
key:
|
|
2884
|
-
value:
|
|
2885
|
-
"options-id":
|
|
3414
|
+
default: P(() => [
|
|
3415
|
+
(s(!0), v(R, null, G(u.value, (q) => (s(), O(ie, {
|
|
3416
|
+
key: q.id,
|
|
3417
|
+
value: q.id,
|
|
3418
|
+
"options-id": S.value
|
|
2886
3419
|
}, {
|
|
2887
|
-
default:
|
|
2888
|
-
|
|
3420
|
+
default: P(() => [
|
|
3421
|
+
W(A(q.textContent), 1)
|
|
2889
3422
|
]),
|
|
2890
3423
|
_: 2
|
|
2891
3424
|
}, 1032, ["value", "options-id"]))), 128))
|
|
2892
3425
|
]),
|
|
2893
3426
|
_: 1
|
|
2894
3427
|
}, 8, ["anchor-id", "container-id", "helper-description", "helper-text", "id", "options-id", "shown"])
|
|
2895
|
-
], 40,
|
|
3428
|
+
], 40, Cn));
|
|
2896
3429
|
}
|
|
2897
|
-
},
|
|
3430
|
+
}, Pn = ["aria-labelledby", "data-active", "id"], vl = {
|
|
2898
3431
|
__name: "BsTabPanel",
|
|
2899
3432
|
props: {
|
|
2900
3433
|
activeTabId: {
|
|
@@ -2907,18 +3440,18 @@ const Dt = {
|
|
|
2907
3440
|
}
|
|
2908
3441
|
},
|
|
2909
3442
|
setup(e) {
|
|
2910
|
-
const a = e, t =
|
|
2911
|
-
return (o, u) => (
|
|
3443
|
+
const a = e, t = U(), l = g(() => a.activeTabId && a.activeTabId === a.tabId), n = g(() => t.id || `${a.tabId}-panel`);
|
|
3444
|
+
return (o, u) => (s(), v("section", {
|
|
2912
3445
|
"aria-labelledby": e.tabId,
|
|
2913
|
-
"data-active":
|
|
3446
|
+
"data-active": l.value,
|
|
2914
3447
|
"data-component": "bs-tab-panel",
|
|
2915
|
-
id:
|
|
3448
|
+
id: n.value,
|
|
2916
3449
|
role: "tabpanel"
|
|
2917
3450
|
}, [
|
|
2918
|
-
|
|
2919
|
-
], 8,
|
|
3451
|
+
L(o.$slots, "default")
|
|
3452
|
+
], 8, Pn));
|
|
2920
3453
|
}
|
|
2921
|
-
},
|
|
3454
|
+
}, On = ["data-error", "id", "rows", "value"], Dn = {
|
|
2922
3455
|
__name: "BsTextarea",
|
|
2923
3456
|
props: {
|
|
2924
3457
|
error: {
|
|
@@ -2933,18 +3466,18 @@ const Dt = {
|
|
|
2933
3466
|
},
|
|
2934
3467
|
emits: ["update:modelValue"],
|
|
2935
3468
|
setup(e, { emit: a }) {
|
|
2936
|
-
const t = e,
|
|
2937
|
-
return (
|
|
3469
|
+
const t = e, l = g(() => ({ [t.error ? "aria-errormessage" : "aria-describedby"]: t.hintId }));
|
|
3470
|
+
return (n, o) => (s(), v("textarea", M({
|
|
2938
3471
|
class: "bs-textarea",
|
|
2939
3472
|
"data-component": "bs-textarea",
|
|
2940
3473
|
"data-error": e.error,
|
|
2941
|
-
id:
|
|
2942
|
-
rows:
|
|
3474
|
+
id: n.$attrs.id || e.inputId,
|
|
3475
|
+
rows: n.$attrs.rows || 6,
|
|
2943
3476
|
value: e.value || e.modelValue,
|
|
2944
|
-
onInput: o[0] || (o[0] = (u) =>
|
|
2945
|
-
},
|
|
3477
|
+
onInput: o[0] || (o[0] = (u) => n.$emit("update:modelValue", u.target.value))
|
|
3478
|
+
}, l.value), null, 16, On));
|
|
2946
3479
|
}
|
|
2947
|
-
},
|
|
3480
|
+
}, pl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
2948
3481
|
__name: "BsTextareaField",
|
|
2949
3482
|
props: {
|
|
2950
3483
|
/** Sets the maximum value this textarea will allow. Will also display character count if present. This does not set maxlength, so users are able to enter text that is longer and edit it down. Enforcement of length must be by the developer. */
|
|
@@ -2993,59 +3526,59 @@ const Dt = {
|
|
|
2993
3526
|
},
|
|
2994
3527
|
emits: ["update:modelValue"],
|
|
2995
3528
|
setup(e, { emit: a }) {
|
|
2996
|
-
const t = e,
|
|
3529
|
+
const t = e, l = U(), [n, o] = K(2), { toChild: u, toRoot: i } = ae(t, l, [
|
|
2997
3530
|
"aria-label",
|
|
2998
3531
|
"autocomplete",
|
|
2999
3532
|
"cols",
|
|
3000
3533
|
"maxlength",
|
|
3001
3534
|
"minlength",
|
|
3002
3535
|
"name"
|
|
3003
|
-
]),
|
|
3004
|
-
var
|
|
3005
|
-
return ((
|
|
3006
|
-
}),
|
|
3007
|
-
var
|
|
3008
|
-
return ((
|
|
3536
|
+
]), r = g(() => {
|
|
3537
|
+
var h;
|
|
3538
|
+
return ((h = t.value || t.modelValue) == null ? void 0 : h.length) || 0;
|
|
3539
|
+
}), d = g(() => {
|
|
3540
|
+
var h, m;
|
|
3541
|
+
return ((m = (h = t.hints) == null ? void 0 : h.join) == null ? void 0 : m.call(h, `
|
|
3009
3542
|
`)) || t.hints;
|
|
3010
|
-
}), c =
|
|
3011
|
-
return (
|
|
3012
|
-
e.label ||
|
|
3543
|
+
}), c = g(() => t.error && t.errorMsg || t.hint || d.value || void 0), p = g(() => t.inputId || n.value);
|
|
3544
|
+
return (h, m) => (s(), v("div", M({ "data-component": "bs-textarea-field" }, f(i)), [
|
|
3545
|
+
e.label || h.$slots.label ? (s(), O(ne, {
|
|
3013
3546
|
key: 0,
|
|
3014
|
-
for:
|
|
3547
|
+
for: p.value,
|
|
3015
3548
|
disabled: e.disabled,
|
|
3016
3549
|
required: e.required
|
|
3017
3550
|
}, {
|
|
3018
|
-
default:
|
|
3019
|
-
|
|
3020
|
-
|
|
3551
|
+
default: P(() => [
|
|
3552
|
+
L(h.$slots, "label", {}, () => [
|
|
3553
|
+
W(A(e.label), 1)
|
|
3021
3554
|
])
|
|
3022
3555
|
]),
|
|
3023
3556
|
_: 3
|
|
3024
|
-
}, 8, ["for", "disabled", "required"])) :
|
|
3025
|
-
|
|
3557
|
+
}, 8, ["for", "disabled", "required"])) : w("", !0),
|
|
3558
|
+
D(Dn, M({
|
|
3026
3559
|
disabled: e.disabled,
|
|
3027
3560
|
error: e.error,
|
|
3028
|
-
"hint-id":
|
|
3029
|
-
id:
|
|
3561
|
+
"hint-id": f(o),
|
|
3562
|
+
id: p.value,
|
|
3030
3563
|
placeholder: e.placeholder,
|
|
3031
3564
|
required: e.required,
|
|
3032
3565
|
rows: e.rows,
|
|
3033
3566
|
value: e.value || e.modelValue,
|
|
3034
|
-
"onUpdate:modelValue":
|
|
3035
|
-
},
|
|
3036
|
-
c.value || e.charMax ? (
|
|
3567
|
+
"onUpdate:modelValue": m[0] || (m[0] = (V) => h.$emit("update:modelValue", V))
|
|
3568
|
+
}, f(u)), null, 16, ["disabled", "error", "hint-id", "id", "placeholder", "required", "rows", "value"]),
|
|
3569
|
+
c.value || e.charMax ? (s(), O(Se, {
|
|
3037
3570
|
key: 1,
|
|
3038
|
-
"char-count":
|
|
3571
|
+
"char-count": r.value,
|
|
3039
3572
|
"char-max": e.charMax,
|
|
3040
3573
|
"data-disabled": e.disabled,
|
|
3041
3574
|
error: e.error,
|
|
3042
3575
|
"error-msg": e.errorMsg,
|
|
3043
|
-
hint: e.hint ||
|
|
3044
|
-
"hint-id":
|
|
3045
|
-
}, null, 8, ["char-count", "char-max", "data-disabled", "error", "error-msg", "hint", "hint-id"])) :
|
|
3576
|
+
hint: e.hint || d.value,
|
|
3577
|
+
"hint-id": f(o)
|
|
3578
|
+
}, null, 8, ["char-count", "char-max", "data-disabled", "error", "error-msg", "hint", "hint-id"])) : w("", !0)
|
|
3046
3579
|
], 16));
|
|
3047
3580
|
}
|
|
3048
|
-
}),
|
|
3581
|
+
}), qn = ["data-variant", "data-stacked"], hl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
3049
3582
|
__name: "BsToast",
|
|
3050
3583
|
props: {
|
|
3051
3584
|
shown: {
|
|
@@ -3091,111 +3624,106 @@ const Dt = {
|
|
|
3091
3624
|
},
|
|
3092
3625
|
emits: ["dismiss", "after-enter", "after-leave"],
|
|
3093
3626
|
setup(e, { emit: a }) {
|
|
3094
|
-
const t = e,
|
|
3627
|
+
const t = e, l = a, { transition: n } = ve(t);
|
|
3095
3628
|
let o = null;
|
|
3096
|
-
|
|
3629
|
+
ee("variant", t.variant), ee("handleDismiss", i);
|
|
3097
3630
|
const u = te("stacked", t.stacked);
|
|
3098
3631
|
function i() {
|
|
3099
|
-
o && (clearTimeout(o), o = null),
|
|
3632
|
+
o && (clearTimeout(o), o = null), l("dismiss", t.toastId);
|
|
3100
3633
|
}
|
|
3101
|
-
function
|
|
3634
|
+
function r() {
|
|
3102
3635
|
t.duration > 0 && (o = setTimeout(() => {
|
|
3103
3636
|
i();
|
|
3104
|
-
}, t.duration)),
|
|
3637
|
+
}, t.duration)), l("after-enter");
|
|
3105
3638
|
}
|
|
3106
|
-
return (
|
|
3107
|
-
shown:
|
|
3639
|
+
return (d, c) => (s(), O(f(pe), {
|
|
3640
|
+
shown: f(n),
|
|
3108
3641
|
preloaded: e.preloaded,
|
|
3109
3642
|
duration: 200,
|
|
3110
3643
|
"enter-attribute": "data-shown",
|
|
3111
|
-
onAfterEnter:
|
|
3112
|
-
onAfterLeave: c[0] || (c[0] = (
|
|
3644
|
+
onAfterEnter: r,
|
|
3645
|
+
onAfterLeave: c[0] || (c[0] = (p) => l("after-leave"))
|
|
3113
3646
|
}, {
|
|
3114
|
-
default:
|
|
3115
|
-
|
|
3647
|
+
default: P(() => [
|
|
3648
|
+
$("div", M({
|
|
3116
3649
|
class: "bs-toast",
|
|
3117
3650
|
"data-variant": e.variant,
|
|
3118
|
-
"data-stacked":
|
|
3651
|
+
"data-stacked": f(u) || void 0,
|
|
3119
3652
|
"aria-role": "alert"
|
|
3120
|
-
},
|
|
3121
|
-
|
|
3122
|
-
], 16,
|
|
3653
|
+
}, d.$attrs), [
|
|
3654
|
+
L(d.$slots, "default")
|
|
3655
|
+
], 16, qn)
|
|
3123
3656
|
]),
|
|
3124
3657
|
_: 3
|
|
3125
3658
|
}, 8, ["shown", "preloaded"]));
|
|
3126
3659
|
}
|
|
3127
|
-
}),
|
|
3660
|
+
}), Mn = ["data-stacked"], bl = {
|
|
3128
3661
|
__name: "BsToastActions",
|
|
3129
3662
|
setup(e) {
|
|
3130
3663
|
const a = I(!1);
|
|
3131
|
-
|
|
3132
|
-
var
|
|
3133
|
-
const
|
|
3134
|
-
((
|
|
3664
|
+
F(() => {
|
|
3665
|
+
var n;
|
|
3666
|
+
const l = et();
|
|
3667
|
+
((n = l.default) == null ? void 0 : n.call(l).length) > 2 && (a.value = !0);
|
|
3135
3668
|
});
|
|
3136
3669
|
const t = te("handleDismiss");
|
|
3137
|
-
return (
|
|
3670
|
+
return (l, n) => (s(), v("div", {
|
|
3138
3671
|
class: "bs-toast-actions",
|
|
3139
3672
|
"data-stacked": a.value || void 0
|
|
3140
3673
|
}, [
|
|
3141
|
-
|
|
3142
|
-
|
|
3674
|
+
L(l.$slots, "default", {}, () => [
|
|
3675
|
+
D(Vt, {
|
|
3143
3676
|
size: "sm",
|
|
3144
3677
|
"text-btn": "",
|
|
3145
|
-
onClick:
|
|
3678
|
+
onClick: f(t)
|
|
3146
3679
|
}, {
|
|
3147
|
-
default:
|
|
3148
|
-
|
|
3680
|
+
default: P(() => [
|
|
3681
|
+
W(" Dismiss ")
|
|
3149
3682
|
]),
|
|
3150
3683
|
_: 1
|
|
3151
3684
|
}, 8, ["onClick"])
|
|
3152
3685
|
])
|
|
3153
|
-
], 8,
|
|
3686
|
+
], 8, Mn));
|
|
3154
3687
|
}
|
|
3155
|
-
},
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
return t;
|
|
3160
|
-
}, Bn = {}, $n = { class: "bs-toast-body" };
|
|
3161
|
-
function Sn(e, a) {
|
|
3162
|
-
return d(), f("div", $n, [
|
|
3163
|
-
k(e.$slots, "default")
|
|
3688
|
+
}, zn = {}, Rn = { class: "bs-toast-body" };
|
|
3689
|
+
function Nn(e, a) {
|
|
3690
|
+
return s(), v("div", Rn, [
|
|
3691
|
+
L(e.$slots, "default")
|
|
3164
3692
|
]);
|
|
3165
3693
|
}
|
|
3166
|
-
const
|
|
3694
|
+
const gl = /* @__PURE__ */ De(zn, [["render", Nn]]), jn = ["data-variant"], ml = {
|
|
3167
3695
|
__name: "BsToastHeader",
|
|
3168
3696
|
setup(e) {
|
|
3169
|
-
const a = te("variant"), t =
|
|
3697
|
+
const a = te("variant"), t = g(() => {
|
|
3170
3698
|
switch (a) {
|
|
3171
3699
|
case "warning":
|
|
3172
|
-
return
|
|
3700
|
+
return ge;
|
|
3173
3701
|
case "positive":
|
|
3174
|
-
return
|
|
3702
|
+
return dt;
|
|
3175
3703
|
case "negative":
|
|
3176
|
-
return
|
|
3704
|
+
return ge;
|
|
3177
3705
|
default:
|
|
3178
|
-
return
|
|
3706
|
+
return st;
|
|
3179
3707
|
}
|
|
3180
3708
|
});
|
|
3181
|
-
return (
|
|
3709
|
+
return (l, n) => (s(), v("div", {
|
|
3182
3710
|
class: "bs-toast-header",
|
|
3183
|
-
"data-variant":
|
|
3711
|
+
"data-variant": f(a)
|
|
3184
3712
|
}, [
|
|
3185
|
-
(
|
|
3186
|
-
|
|
3187
|
-
|
|
3713
|
+
(s(), O(H(t.value), { class: "bs-toast-header-icon" })),
|
|
3714
|
+
$("h5", null, [
|
|
3715
|
+
L(l.$slots, "default")
|
|
3188
3716
|
])
|
|
3189
|
-
], 8,
|
|
3717
|
+
], 8, jn));
|
|
3190
3718
|
}
|
|
3191
|
-
},
|
|
3719
|
+
}, Wn = { class: "bs-toaster" }, yl = {
|
|
3192
3720
|
__name: "BsToaster",
|
|
3193
3721
|
setup(e) {
|
|
3194
|
-
return
|
|
3195
|
-
|
|
3722
|
+
return ee("stacked", !0), (a, t) => (s(), v("div", Wn, [
|
|
3723
|
+
L(a.$slots, "default")
|
|
3196
3724
|
]));
|
|
3197
3725
|
}
|
|
3198
|
-
},
|
|
3726
|
+
}, Fn = ["data-position"], Un = ["id"], Bl = {
|
|
3199
3727
|
__name: "BsTooltip",
|
|
3200
3728
|
props: {
|
|
3201
3729
|
tooltipId: {
|
|
@@ -3222,20 +3750,20 @@ const el = /* @__PURE__ */ yn(Bn, [["render", Sn]]), wn = ["data-variant"], tl =
|
|
|
3222
3750
|
}
|
|
3223
3751
|
},
|
|
3224
3752
|
setup(e) {
|
|
3225
|
-
const a = e, t = I(!1),
|
|
3753
|
+
const a = e, t = I(!1), l = I(!1), n = g(() => {
|
|
3226
3754
|
let i = "bs-tooltip-text";
|
|
3227
|
-
return
|
|
3755
|
+
return l.value && (a.position === void 0 || a.position === "top" || a.position === "bottom" ? i += " escaped-x" : a.position === "left" || a.position === "right" ? i += " escaped-y" : i += " escaped"), i;
|
|
3228
3756
|
});
|
|
3229
|
-
|
|
3230
|
-
t.value && (t.value = !1,
|
|
3757
|
+
fe(["Escape"], () => {
|
|
3758
|
+
t.value && (t.value = !1, l.value = !0);
|
|
3231
3759
|
});
|
|
3232
3760
|
function o() {
|
|
3233
3761
|
t.value = !0;
|
|
3234
3762
|
}
|
|
3235
3763
|
function u() {
|
|
3236
|
-
t.value = !1,
|
|
3764
|
+
t.value = !1, l.value = !1;
|
|
3237
3765
|
}
|
|
3238
|
-
return (i,
|
|
3766
|
+
return (i, r) => (s(), v("div", {
|
|
3239
3767
|
class: "bs-tooltip",
|
|
3240
3768
|
"data-position": e.position || void 0,
|
|
3241
3769
|
"data-component": "bs-tooltip",
|
|
@@ -3244,58 +3772,61 @@ const el = /* @__PURE__ */ yn(Bn, [["render", Sn]]), wn = ["data-variant"], tl =
|
|
|
3244
3772
|
onMouseleave: u,
|
|
3245
3773
|
onFocusout: u
|
|
3246
3774
|
}, [
|
|
3247
|
-
|
|
3248
|
-
e.content ? (
|
|
3775
|
+
L(i.$slots, "default"),
|
|
3776
|
+
e.content ? (s(), v("div", {
|
|
3249
3777
|
key: 0,
|
|
3250
|
-
class:
|
|
3778
|
+
class: Q(n.value),
|
|
3251
3779
|
id: e.tooltipId,
|
|
3252
3780
|
role: "tooltip"
|
|
3253
|
-
},
|
|
3254
|
-
], 40,
|
|
3781
|
+
}, A(e.content), 11, Un)) : w("", !0)
|
|
3782
|
+
], 40, Fn));
|
|
3255
3783
|
}
|
|
3256
3784
|
};
|
|
3257
3785
|
export {
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3786
|
+
Xn as BsAccordion,
|
|
3787
|
+
xt as BsBadge,
|
|
3788
|
+
Zn as BsBanner,
|
|
3789
|
+
Vt as BsButton,
|
|
3790
|
+
Jn as BsChartBar,
|
|
3791
|
+
Ae as BsCheckbox,
|
|
3792
|
+
Qn as BsCircleButton,
|
|
3793
|
+
Ee as BsDropdown,
|
|
3794
|
+
ua as BsDropdownMultiselect,
|
|
3795
|
+
ie as BsDropdownOption,
|
|
3796
|
+
$e as BsDropdownOptionList,
|
|
3797
|
+
Pe as BsDropdownWithOptions,
|
|
3798
|
+
_n as BsDropdownWithToggle,
|
|
3799
|
+
Se as BsFieldDetails,
|
|
3800
|
+
va as BsFilterButton,
|
|
3801
|
+
el as BsIconGradientWrapper,
|
|
3802
|
+
Oe as BsInput,
|
|
3803
|
+
wa as BsInputAddon,
|
|
3804
|
+
tl as BsInputField,
|
|
3805
|
+
ka as BsInputSearch,
|
|
3806
|
+
al as BsInputTypeahead,
|
|
3807
|
+
ne as BsLabel,
|
|
3808
|
+
nl as BsLoader,
|
|
3809
|
+
ll as BsModal,
|
|
3810
|
+
za as BsOverlay,
|
|
3811
|
+
ol as BsPagination,
|
|
3812
|
+
il as BsPill,
|
|
3813
|
+
rl as BsProfile,
|
|
3814
|
+
vn as BsProfileDetails,
|
|
3815
|
+
bn as BsProfileImg,
|
|
3816
|
+
sl as BsRadio,
|
|
3817
|
+
Bn as BsSelect,
|
|
3818
|
+
dl as BsSelectField,
|
|
3819
|
+
ul as BsSwitch,
|
|
3820
|
+
cl as BsTab,
|
|
3821
|
+
fl as BsTabList,
|
|
3822
|
+
vl as BsTabPanel,
|
|
3823
|
+
Dn as BsTextarea,
|
|
3824
|
+
pl as BsTextareaField,
|
|
3825
|
+
hl as BsToast,
|
|
3826
|
+
bl as BsToastActions,
|
|
3827
|
+
gl as BsToastBody,
|
|
3828
|
+
ml as BsToastHeader,
|
|
3829
|
+
yl as BsToaster,
|
|
3830
|
+
Bl as BsTooltip,
|
|
3831
|
+
pe as BsTransition
|
|
3301
3832
|
};
|