@wwtdev/bsds-components-vue3 1.16.5 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3153 @@
1
+ import { computed as p, ref as k, onMounted as N, onUnmounted as ne, defineAsyncComponent as Oe, watch as V, openBlock as u, createElementBlock as v, unref as c, createElementVNode as m, renderSlot as I, createBlock as A, resolveDynamicComponent as U, createCommentVNode as $, toDisplayString as T, createVNode as D, normalizeClass as X, useAttrs as O, mergeProps as E, withCtx as C, Fragment as R, renderList as Y, createTextVNode as W, withDirectives as Ne, Transition as me, vShow as We, inject as te, provide as ae, onDeactivated as je, normalizeStyle as Ge, isRef as Fe, nextTick as Ue, useSlots as He } from "vue";
2
+ import { v4 as Ke } from "uuid";
3
+ import { BsIconCaretDown as Ye, BsIconWarning as ve, BsIconClose as oe, BsIconSearch as Xe, BsIconCaretLeftDouble as Ze, BsIconCaretLeft as Je, BsIconCaretRight as Qe, BsIconCaretRightDouble as _e, BsIconActionEllipsis as et, BsIconCircleExclamation as tt, BsIconThumbsUpStroke as at } from "@wwtdev/bsds-icons-vue3";
4
+ import { Chart as fe, BarController as nt, BarElement as lt, CategoryScale as ot, LinearScale as it, Legend as rt, Tooltip as st } from "chart.js";
5
+ const ye = {
6
+ href: "a",
7
+ onclick: "button",
8
+ onClick: "button",
9
+ type: "button"
10
+ };
11
+ function he(e, a, t = "button") {
12
+ const l = dt(e, a, t), n = p(() => {
13
+ const o = l.value === "button", d = {};
14
+ return o ? (d.type = a.type || "button", d.autocomplete = "off", e.disabled && (d.disabled = !0)) : e.disabled && (d["aria-disabled"] = "true", d.tabindex = "-1"), d;
15
+ });
16
+ return { rootTag: l, attrsToBind: n };
17
+ }
18
+ function dt(e, a, t) {
19
+ const l = Object.keys(ye).find((n) => ut(e, a, n));
20
+ return k(ye[l] || t);
21
+ }
22
+ function ut(e, a, t) {
23
+ return e[t] || a[t];
24
+ }
25
+ const ct = (e, a) => {
26
+ const t = (l) => {
27
+ e.some((n) => {
28
+ var o;
29
+ return (o = n.value) == null ? void 0 : o.contains(l.target);
30
+ }) || a(l);
31
+ };
32
+ N(() => {
33
+ document.addEventListener("click", t);
34
+ }), ne(() => {
35
+ document.removeEventListener("click", t);
36
+ });
37
+ };
38
+ function ie(e) {
39
+ const a = p(() => {
40
+ var n, o;
41
+ return ((o = (n = e.href) == null ? void 0 : n.startsWith) == null ? void 0 : o.call(n, "/")) || !1;
42
+ }), t = p(() => {
43
+ var n, o;
44
+ return a.value && ((n = e.router) == null ? void 0 : n.navigateTo) || ((o = e.router) == null ? void 0 : o.push) || null;
45
+ });
46
+ function l(n) {
47
+ var o, d, i, s, r;
48
+ if (e.disabled) {
49
+ n.preventDefault(), n.stopImmediatePropagation();
50
+ return;
51
+ }
52
+ !e.href || !t.value || ((d = (o = n.target.href) == null ? void 0 : o.endsWith) != null && d.call(o, e.href) || (r = (s = (i = n.target.closest("a")) == null ? void 0 : i.href) == null ? void 0 : s.endsWith) != null && r.call(s, e.href)) && (n.preventDefault(), t.value(e.href));
53
+ }
54
+ return { onLinkClick: l };
55
+ }
56
+ function Be(e) {
57
+ return e.split("-").map((l) => l.charAt(0).toUpperCase() + l.slice(1)).join("");
58
+ }
59
+ const le = (e) => ({ icon: p(
60
+ () => Oe(() => import("@wwtdev/bsds-icons-vue3").then((t) => e.startsWith("bs-") ? t[Be(e)] : t[`BsIcon${Be(e)}`]))
61
+ ) });
62
+ function H(e = 1) {
63
+ const a = [];
64
+ for (let t = 0; t < e; t++)
65
+ a.push(k(""));
66
+ return N(() => {
67
+ a.forEach((t) => t.value = Ke());
68
+ }), a;
69
+ }
70
+ const re = (e, a, t = void 0) => {
71
+ const l = (n) => {
72
+ e.includes(n.key) && a(n);
73
+ };
74
+ N(() => {
75
+ ((t == null ? void 0 : t.value) ?? document).addEventListener("keydown", l);
76
+ }), ne(() => {
77
+ ((t == null ? void 0 : t.value) ?? document).removeEventListener("keydown", l);
78
+ });
79
+ }, ft = (e, a, t) => {
80
+ let l = null;
81
+ N(() => {
82
+ l = new MutationObserver(a), l.observe(e.value, t);
83
+ }), ne(() => {
84
+ l.disconnect();
85
+ });
86
+ };
87
+ function Z(e, a) {
88
+ var o;
89
+ const t = new Set(((o = e.passAttrs) == null ? void 0 : o.split(",")) || "");
90
+ t.delete("");
91
+ const l = k({}), n = k({});
92
+ for (let d in a)
93
+ t.has(d) ? n.value[d] = a[d] : l.value[d] = a[d];
94
+ return {
95
+ toRoot: l,
96
+ toChild: n
97
+ };
98
+ }
99
+ const se = (e) => {
100
+ const a = k(!1);
101
+ return N(() => {
102
+ a.value = e.enterControlled || e.preloaded ? e.enterTrigger : e.shown;
103
+ }), V(() => e.shown, (t) => {
104
+ a.value = t;
105
+ }), V(() => e.enterTrigger, (t) => {
106
+ a.value = t;
107
+ }), V(() => e.leaveTrigger, (t) => {
108
+ t && (a.value = !1);
109
+ }), { transition: a };
110
+ }, vt = ["id", "data-stacked"], ht = ["data-open"], pt = ["aria-controls", "aria-expanded"], gt = {
111
+ key: 0,
112
+ "data-position": "start",
113
+ style: { display: "inline-flex" }
114
+ }, bt = ["id", "aria-level"], mt = ["aria-labelledby", "data-open", "id"], Cn = {
115
+ __name: "BsAccordion",
116
+ props: {
117
+ controlled: { type: Boolean, default: !1 },
118
+ icon: { type: String },
119
+ headerText: { type: String, required: !0 },
120
+ headingLevel: {
121
+ type: Number,
122
+ validator: (e) => [2, 3, 4, 5].includes(e)
123
+ },
124
+ openItem: { type: Boolean, default: !1 },
125
+ openItemId: { type: String },
126
+ stacked: { type: Boolean, default: !1 }
127
+ },
128
+ emits: ["toggled"],
129
+ setup(e, { emit: a }) {
130
+ const t = e, l = a, n = k(null), o = k(!1), { icon: d } = le(t.icon), [i] = H(), s = p(() => i.value + "-content"), r = p(() => i.value + "-title"), f = p(() => t.openItemId && t.openItemId === i.value || t.openItem === !0), b = p(() => t.controlled ? f.value : o.value);
131
+ function g() {
132
+ l("toggled", i.value), t.controlled || (o.value = !o.value);
133
+ }
134
+ return (y, L) => (u(), v("div", {
135
+ id: c(i),
136
+ ref_key: "containerRef",
137
+ ref: n,
138
+ class: "bs-accordion",
139
+ "data-component": "bs-accordion",
140
+ "data-stacked": e.stacked
141
+ }, [
142
+ m("header", {
143
+ part: "header",
144
+ "data-open": b.value
145
+ }, [
146
+ m("button", {
147
+ "aria-controls": s.value,
148
+ "aria-expanded": b.value,
149
+ type: "button",
150
+ onClick: g
151
+ }, [
152
+ e.icon || y.$slots.icon ? (u(), v("span", gt, [
153
+ I(y.$slots, "icon", {}, () => [
154
+ e.icon ? (u(), A(U(c(d) ? c(d) : "span"), { key: 0 })) : $("", !0)
155
+ ])
156
+ ])) : $("", !0),
157
+ m("span", {
158
+ id: r.value,
159
+ "aria-level": e.headingLevel,
160
+ role: "heading"
161
+ }, T(e.headerText), 9, bt),
162
+ D(c(Ye), {
163
+ size: "md",
164
+ "data-position": "end"
165
+ })
166
+ ], 8, pt)
167
+ ], 8, ht),
168
+ m("div", {
169
+ "aria-labelledby": r.value,
170
+ class: "bs-accordion-content",
171
+ "data-open": b.value,
172
+ id: s.value,
173
+ part: "content",
174
+ role: "region"
175
+ }, [
176
+ m("div", null, [
177
+ I(y.$slots, "default")
178
+ ])
179
+ ], 8, mt)
180
+ ], 8, vt));
181
+ }
182
+ }, yt = ["data-badge-color", "data-count", "data-position", "data-show-zero", "aria-label"], An = {
183
+ __name: "BsBadge",
184
+ props: {
185
+ /** Pass value to set `data-badge-color`. */
186
+ color: {
187
+ type: String,
188
+ validator: (e) => ["red", "blue", "white"].includes(e)
189
+ },
190
+ /** Pass value to show "count" indicator. Do not use if you are passing "dot." */
191
+ count: {
192
+ type: Number
193
+ },
194
+ /** Sets the count limit after which the displayed count will stop incrementing and a "+" will be appended. Defaults to 99. */
195
+ countMax: {
196
+ type: Number,
197
+ default: 99
198
+ },
199
+ /** Pass "true" to show a simple dot indicator. Do not use if you are passing a "count." */
200
+ dot: {
201
+ type: Boolean,
202
+ default: !1
203
+ },
204
+ /** Pass the singular name of the items that are being counted. e.g.
205
+ * if we are counting unread notifications, pass "unread notification";
206
+ * or if we are counting new messages, pass "new message".
207
+ * This is required to ensure accessibility! */
208
+ label: {
209
+ type: String,
210
+ default: "item"
211
+ },
212
+ /** Sets the position of the badge in relation to the slotted content. By default, badge is positioned to the right. */
213
+ position: {
214
+ type: String,
215
+ validator: (e) => ["left", "right"].includes(e),
216
+ default: "right"
217
+ },
218
+ /** Pass "true" to show the badge even when the "count" value is zero. */
219
+ showZero: {
220
+ type: Boolean,
221
+ default: !1
222
+ }
223
+ },
224
+ setup(e) {
225
+ const a = e, t = k(null), l = p(() => a.count === 0 ? "0" : !a.count || a.dot ? null : a.count > a.countMax ? a.countMax + "+" : a.count.toString()), n = p(() => {
226
+ var s, r;
227
+ const o = ((r = (s = t.value) == null ? void 0 : s.textContent) == null ? void 0 : r.trim()) || "", d = l.value ? l.value + " " : "";
228
+ if (!d && !a.dot)
229
+ return o;
230
+ const i = a.count !== 1 ? "s" : "";
231
+ return `${o}, ${d}${a.label}${i}`;
232
+ });
233
+ return (o, d) => (u(), v("span", {
234
+ ref_key: "hostRef",
235
+ ref: t,
236
+ class: X({ "bs-badge": e.dot || l.value }),
237
+ "data-badge-color": e.color,
238
+ "data-component": "bs-badge",
239
+ "data-count": l.value,
240
+ "data-position": e.position,
241
+ "data-show-zero": e.showZero,
242
+ "aria-label": n.value
243
+ }, [
244
+ I(o.$slots, "default")
245
+ ], 10, yt));
246
+ }
247
+ }, Bt = {
248
+ key: 0,
249
+ role: "alert",
250
+ class: "bs-banner"
251
+ }, $t = { class: "bs-banner-content" }, St = { class: "bs-banner-warning-icon" }, Ln = {
252
+ __name: "BsBanner",
253
+ emits: ["dismiss"],
254
+ setup(e, { emit: a }) {
255
+ const t = a, l = k(!1);
256
+ function n() {
257
+ l.value = !0, t("dismiss");
258
+ }
259
+ return (o, d) => l.value ? $("", !0) : (u(), v("div", Bt, [
260
+ m("div", $t, [
261
+ m("div", St, [
262
+ D(c(ve), { size: "lg" })
263
+ ]),
264
+ m("p", null, [
265
+ I(o.$slots, "default")
266
+ ]),
267
+ m("button", {
268
+ type: "button",
269
+ title: "Close Banner",
270
+ onClick: n
271
+ }, [
272
+ D(c(oe))
273
+ ])
274
+ ])
275
+ ]));
276
+ }
277
+ }, wt = {
278
+ __name: "BsButton",
279
+ props: {
280
+ variant: { type: String },
281
+ disabled: { type: Boolean, default: !1 },
282
+ ghostBtn: { type: Boolean, default: !1 },
283
+ href: { type: String },
284
+ router: {},
285
+ textBtn: { type: Boolean, default: !1 },
286
+ size: { type: String, validator: (e) => !e || e === "sm" }
287
+ },
288
+ setup(e) {
289
+ const a = e, t = O(), { rootTag: l, attrsToBind: n } = he(a, t), { onLinkClick: o } = ie(a);
290
+ return (d, i) => (u(), A(U(c(l)), E({
291
+ class: "bs-button",
292
+ "data-component": "bs-button",
293
+ "data-ghost": e.ghostBtn,
294
+ "data-size": e.size,
295
+ "data-text": e.textBtn,
296
+ "data-variant": e.variant,
297
+ href: e.href
298
+ }, c(n), { onClick: c(o) }), {
299
+ default: C(() => [
300
+ I(d.$slots, "default")
301
+ ]),
302
+ _: 3
303
+ }, 16, ["data-ghost", "data-size", "data-text", "data-variant", "href", "onClick"]));
304
+ }
305
+ }, kt = { "data-component": "bs-chart-table" }, It = ["summary"], Tt = ["colspan"], xt = /* @__PURE__ */ m("th", { scope: "col" }, " Dataset ", -1), Ct = { scope: "row" }, At = {
306
+ __name: "BsChartTable",
307
+ props: {
308
+ data: {
309
+ type: Array,
310
+ required: !0
311
+ },
312
+ dataIdxLabels: {
313
+ type: Array,
314
+ required: !0
315
+ },
316
+ tableTitle: {
317
+ type: String,
318
+ default: ""
319
+ }
320
+ },
321
+ setup(e) {
322
+ return (a, t) => {
323
+ var l;
324
+ return u(), v("div", kt, [
325
+ m("table", { summary: e.tableTitle }, [
326
+ m("thead", null, [
327
+ m("tr", null, [
328
+ m("th", {
329
+ colspan: ((l = e.dataIdxLabels) == null ? void 0 : l.length) + 1
330
+ }, T(e.tableTitle), 9, Tt)
331
+ ]),
332
+ m("tr", null, [
333
+ xt,
334
+ (u(!0), v(R, null, Y(e.dataIdxLabels, (n) => (u(), v("th", {
335
+ key: n,
336
+ scope: "col"
337
+ }, T(n), 1))), 128))
338
+ ])
339
+ ]),
340
+ m("tbody", null, [
341
+ (u(!0), v(R, null, Y(e.data, (n) => (u(), v("tr", {
342
+ key: n.label
343
+ }, [
344
+ m("th", Ct, T(n.label), 1),
345
+ (u(!0), v(R, null, Y(n.data, (o, d) => (u(), v("td", {
346
+ key: `${o}${d}`
347
+ }, T(o), 1))), 128))
348
+ ]))), 128))
349
+ ])
350
+ ], 8, It)
351
+ ]);
352
+ };
353
+ }
354
+ }, Lt = (e) => ({
355
+ id: "htmlLegend",
356
+ afterUpdate(a) {
357
+ e.innerHTML = "", e.style.setProperty("--legend-padding", `${a.scales.x.left}px`), a.options.plugins.legend.labels.generateLabels(a).forEach((l) => {
358
+ const n = document.createElement("li");
359
+ n.onclick = () => {
360
+ const { type: s } = a.config._config;
361
+ s === "pie" || s === "doughnut" ? a.toggleDataVisibility(l.index) : a.setDatasetVisibility(l.datasetIndex, !a.isDatasetVisible(l.datasetIndex)), a.update();
362
+ };
363
+ const o = document.createElement("span");
364
+ o.style.setProperty("--item-box-fill", l.fillStyle), o.style.setProperty("--item-box-stroke", l.strokeStyle);
365
+ const d = document.createTextNode(l.text), i = document.createElement("p");
366
+ i.style.setProperty("--item-text-color", l.fontColor), i.style.setProperty("--item-text-decoration", l.hidden ? "line-through" : "none"), i.appendChild(d), n.appendChild(o), n.appendChild(i), e.appendChild(n);
367
+ });
368
+ }
369
+ }), Pt = ({ type: e, datasets: a, labels: t, tooltips: l }) => ({
370
+ type: e,
371
+ data: {
372
+ datasets: a,
373
+ labels: t
374
+ },
375
+ options: {
376
+ maintainAspectRatio: !1,
377
+ plugins: {
378
+ legend: {
379
+ display: !1
380
+ },
381
+ tooltip: {
382
+ enabled: l
383
+ }
384
+ },
385
+ responsive: !0
386
+ }
387
+ });
388
+ function Dt(e) {
389
+ const a = [
390
+ "rgba(209, 26, 111, 1)",
391
+ "rgba(130, 18, 196, 1)",
392
+ "rgba(153, 207, 247, 1)",
393
+ "rgba(0, 134, 234, 1)",
394
+ "rgba(238, 40, 42, 1)",
395
+ "rgba(22, 47, 180, 1)",
396
+ "rgba(78, 79, 95, 1)",
397
+ "rgba(253, 165, 141, 1)"
398
+ ], t = a[e % a.length];
399
+ return e >= a.length ? t.replace("1)", "0.5)") : t;
400
+ }
401
+ function $e(e, a, t) {
402
+ let l;
403
+ return function() {
404
+ let n = this, o = arguments;
405
+ clearTimeout(l), t && !l && e.apply(n, o), l = setTimeout(function() {
406
+ l = null, t || e.apply(n, o);
407
+ }, a);
408
+ };
409
+ }
410
+ const Et = {
411
+ class: "bs-chart-bar",
412
+ "data-component": "bs-chart-bar"
413
+ }, Vt = ["aria-label"], qt = ["data-hidden"], Pn = {
414
+ __name: "BsChartBar",
415
+ props: {
416
+ chartTitle: {
417
+ type: String,
418
+ default: ""
419
+ },
420
+ /** Array of datasets. */
421
+ data: {
422
+ type: Array,
423
+ required: !0
424
+ },
425
+ /** Array of labels for each point along the X-Axis. */
426
+ dataIdxLabels: {
427
+ type: Array,
428
+ required: !0
429
+ },
430
+ /** Pass `true` to show legend. */
431
+ showLegend: {
432
+ type: Boolean,
433
+ default: !0
434
+ },
435
+ /** Pass `true` to show tooltips on hover. */
436
+ showTooltips: {
437
+ type: Boolean,
438
+ default: !0
439
+ },
440
+ /** Pass `true` to show vertical gridlines. */
441
+ showXGrid: {
442
+ type: Boolean,
443
+ default: !1
444
+ },
445
+ /** Pass `true` to show horizontal gridlines. */
446
+ showYGrid: {
447
+ type: Boolean,
448
+ default: !1
449
+ },
450
+ /** Pass `true` to stack each dataset's data at a given index into a single column. */
451
+ stacked: {
452
+ type: Boolean,
453
+ default: !1
454
+ },
455
+ /** Label for the X-Axis. */
456
+ xLabel: {
457
+ type: String,
458
+ default: ""
459
+ },
460
+ /** Label for the Y-Axis. */
461
+ yLabel: {
462
+ type: String,
463
+ default: ""
464
+ }
465
+ },
466
+ setup(e) {
467
+ const a = e, t = k(null), l = k(null);
468
+ let n;
469
+ const o = p(() => {
470
+ const f = {
471
+ datasets: d.value,
472
+ labels: a.dataIdxLabels,
473
+ type: "bar",
474
+ tooltips: a.showTooltips
475
+ }, b = Pt(f);
476
+ return b.plugins = [Lt(l.value)], b.options.scales = {
477
+ x: {
478
+ grid: {
479
+ display: a.showXGrid
480
+ },
481
+ stacked: a.stacked,
482
+ title: {
483
+ display: !!a.xLabel,
484
+ text: a.xLabel
485
+ }
486
+ },
487
+ y: {
488
+ grid: {
489
+ display: a.showYGrid
490
+ },
491
+ stacked: a.stacked,
492
+ title: {
493
+ display: !!a.yLabel,
494
+ text: a.yLabel
495
+ }
496
+ }
497
+ }, b;
498
+ }), d = p(() => a.data.map((f, b) => ({
499
+ ...f,
500
+ backgroundColor: Dt(b),
501
+ categoryPercentage: a.data.length > 1 ? 0.5 : 0.33
502
+ }))), i = p(() => a.chartTitle || `${a.yLabel} / ${a.xLabel}`), s = $e(function(f, b) {
503
+ !n || f === b || (n.options = o.value.options, n.update());
504
+ }, 100), r = $e(function() {
505
+ n && (n.data = o.value.data, n.update());
506
+ }, 100);
507
+ return N(() => {
508
+ fe.register(nt, lt, ot, it, rt, st), fe.defaults.font.family = "'Roobert', sans-serif", n = new fe(t.value, o.value);
509
+ }), V(() => a.showLegend, s), V(() => a.showTooltips, s), V(() => a.showXGrid, s), V(() => a.showYGrid, s), V(() => a.stacked, s), V(() => a.xLabel, s), V(() => a.yLabel, s), V(() => a.data, r), V(() => a.dataIdxLabels, r), (f, b) => (u(), v("div", Et, [
510
+ m("figure", null, [
511
+ m("div", null, [
512
+ m("canvas", {
513
+ "aria-label": i.value,
514
+ ref_key: "canvas",
515
+ ref: t,
516
+ role: "img"
517
+ }, null, 8, Vt)
518
+ ]),
519
+ m("div", null, [
520
+ D(At, {
521
+ data: e.data,
522
+ "data-idx-labels": e.dataIdxLabels,
523
+ "table-title": i.value
524
+ }, null, 8, ["data", "data-idx-labels", "table-title"]),
525
+ m("figcaption", {
526
+ "data-hidden": !e.showLegend
527
+ }, [
528
+ m("ul", {
529
+ ref_key: "legendList",
530
+ ref: l
531
+ }, null, 512)
532
+ ], 8, qt)
533
+ ])
534
+ ])
535
+ ]));
536
+ }
537
+ }, zt = ["data-size"], Mt = ["checked", "disabled", "id", "required", "data-error"], Dn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
538
+ __name: "BsCheckbox",
539
+ props: {
540
+ /** Sets the label. */
541
+ /** @ex Task Completed */
542
+ label: {
543
+ type: String
544
+ },
545
+ /** Sets the checked state. */
546
+ checked: {
547
+ type: Boolean,
548
+ default: !1
549
+ },
550
+ /** Sets the indeterminate state; i.e. partially checked. */
551
+ checkedPartially: {
552
+ type: Boolean,
553
+ default: !1
554
+ },
555
+ /** Sets the disabled state on the input. */
556
+ disabled: {
557
+ type: Boolean,
558
+ default: !1
559
+ },
560
+ /** Applies error styles to the input. */
561
+ error: {
562
+ type: Boolean,
563
+ default: !1
564
+ },
565
+ /** Pass id for the input element. Will also be applied to label attribute. */
566
+ inputId: {
567
+ type: String,
568
+ default: ""
569
+ },
570
+ /** List additional attributes by name (comma-separated) to pass through to `<input>`. */
571
+ passAttrs: {
572
+ type: String,
573
+ default: ""
574
+ },
575
+ /** Sets the required state on the input. */
576
+ required: {
577
+ type: Boolean,
578
+ default: !1
579
+ },
580
+ /** Sets the size of the input. */
581
+ size: {
582
+ type: String,
583
+ validator: (e) => e === "sm"
584
+ },
585
+ /** Sets the `checked` state - `v-model` directive will use this; do not set explicitly. */
586
+ modelValue: {
587
+ type: Boolean
588
+ }
589
+ },
590
+ emits: ["update:modelValue"],
591
+ setup(e, { emit: a }) {
592
+ const t = e, l = O(), [n] = H(), { toChild: o, toRoot: d } = Z(t, l), i = k(null), s = p(() => t.inputId || n.value), r = p(() => t.checked || t.modelValue);
593
+ function f() {
594
+ i.value && (i.value.indeterminate = t.checkedPartially && !r.value);
595
+ }
596
+ return V(r, f), V(() => t.checkedPartially, f), (b, g) => (u(), v("div", E({
597
+ class: "bs-boolean",
598
+ "data-component": "bs-checkbox",
599
+ "data-size": e.size
600
+ }, c(d)), [
601
+ m("input", E({
602
+ ref_key: "inputEl",
603
+ ref: i,
604
+ checked: r.value,
605
+ disabled: e.disabled,
606
+ id: s.value,
607
+ required: e.required,
608
+ type: "checkbox",
609
+ "data-error": e.error,
610
+ onChange: g[0] || (g[0] = (y) => b.$emit("update:modelValue", y.target.checked))
611
+ }, c(o)), null, 16, Mt),
612
+ e.label || b.$slots.label ? (u(), A(c(_), {
613
+ key: 0,
614
+ for: s.value,
615
+ disabled: e.disabled,
616
+ required: e.required
617
+ }, {
618
+ default: C(() => [
619
+ I(b.$slots, "label", {}, () => [
620
+ W(T(e.label), 1)
621
+ ])
622
+ ]),
623
+ _: 3
624
+ }, 8, ["for", "disabled", "required"])) : $("", !0)
625
+ ], 16, zt));
626
+ }
627
+ }), Rt = { key: 0 }, Ot = { class: "bs-circle-button-icon" }, Nt = { key: 1 }, En = {
628
+ __name: "BsCircleButton",
629
+ props: {
630
+ disabled: {
631
+ type: Boolean,
632
+ default: !1
633
+ },
634
+ ghostBtn: {
635
+ type: Boolean,
636
+ default: !1
637
+ },
638
+ hoverEffect: {
639
+ type: Boolean,
640
+ default: !1
641
+ },
642
+ href: {
643
+ type: String
644
+ },
645
+ icon: {
646
+ type: String,
647
+ default: "caret-right"
648
+ },
649
+ iconPosition: {
650
+ type: String,
651
+ validator: (e) => ["left", "right"].includes(e),
652
+ default: "right"
653
+ },
654
+ label: {
655
+ type: String,
656
+ required: !0
657
+ },
658
+ router: {},
659
+ textBtn: {
660
+ type: Boolean,
661
+ default: !1
662
+ },
663
+ size: {
664
+ type: String,
665
+ validator: (e) => ["sm", "lg"].includes(e),
666
+ default: "lg"
667
+ }
668
+ },
669
+ setup(e) {
670
+ const a = e, t = O(), { rootTag: l, attrsToBind: n } = he(a, t), { icon: o } = le(a.icon), { onLinkClick: d } = ie(a), i = p(() => a.textBtn ? {} : a.href ? { title: a.label } : { "aria-label": a.label }), s = p(() => {
671
+ if (a.hoverEffect)
672
+ return a.iconPosition;
673
+ }), r = p(() => a.textBtn && a.iconPosition !== "left"), f = p(() => a.textBtn && a.iconPosition === "left");
674
+ return (b, g) => (u(), A(U(c(l)), E({
675
+ class: "bs-circle-button",
676
+ "data-disabled": e.disabled,
677
+ "data-direction": s.value,
678
+ "data-ghost": e.ghostBtn,
679
+ "data-size": e.size,
680
+ "data-text": e.textBtn,
681
+ href: e.href
682
+ }, { ...c(n), ...i.value }, { onClick: c(d) }), {
683
+ default: C(() => [
684
+ r.value ? (u(), v("span", Rt, T(e.label), 1)) : $("", !0),
685
+ m("span", Ot, [
686
+ I(b.$slots, "icon", {}, () => [
687
+ (u(), A(U(c(o)), { size: e.size }, null, 8, ["size"]))
688
+ ])
689
+ ]),
690
+ f.value ? (u(), v("span", Nt, T(e.label), 1)) : $("", !0)
691
+ ]),
692
+ _: 3
693
+ }, 16, ["data-disabled", "data-direction", "data-ghost", "data-size", "data-text", "href", "onClick"]));
694
+ }
695
+ }, de = {
696
+ __name: "BsTransition",
697
+ props: {
698
+ shown: {
699
+ type: Boolean,
700
+ default: !0
701
+ },
702
+ preloaded: {
703
+ type: Boolean,
704
+ default: !1
705
+ },
706
+ duration: {
707
+ type: Number,
708
+ required: !0
709
+ },
710
+ enterClass: {
711
+ type: String,
712
+ default: void 0
713
+ },
714
+ enterAttribute: {
715
+ type: String,
716
+ default: void 0
717
+ },
718
+ leaveClass: {
719
+ type: String,
720
+ default: void 0
721
+ },
722
+ leaveAttribute: {
723
+ type: String,
724
+ default: void 0
725
+ }
726
+ },
727
+ emits: [
728
+ "before-enter",
729
+ "enter",
730
+ "after-enter",
731
+ "enter-cancelled",
732
+ "before-leave",
733
+ "leave",
734
+ "after-leave",
735
+ "leave-cancelled"
736
+ ],
737
+ setup(e, { emit: a }) {
738
+ const t = e, l = a, n = [];
739
+ function o(s, r) {
740
+ const { duration: f, enterClass: b, enterAttribute: g } = t;
741
+ n.push(setTimeout(() => {
742
+ b && s.classList.add(b), g && s.setAttribute(g, ""), n.push(setTimeout(() => {
743
+ r();
744
+ }, f)), l("enter", s);
745
+ }));
746
+ }
747
+ function d(s, r) {
748
+ const {
749
+ duration: f,
750
+ enterClass: b,
751
+ enterAttribute: g,
752
+ leaveClass: y,
753
+ leaveAttribute: L
754
+ } = t;
755
+ s.classList.remove(b), s.removeAttribute(g), y && s.classList.add(y), L && s.setAttribute(L, ""), n.push(setTimeout(() => {
756
+ r();
757
+ }, f)), l("leave", s);
758
+ }
759
+ function i(s) {
760
+ const { leaveClass: r, leaveAttribute: f } = t;
761
+ s.classList.remove(r), s.removeAttribute(f), l("after-leave", s);
762
+ }
763
+ return ne(() => {
764
+ n.forEach((s) => {
765
+ clearTimeout(s);
766
+ });
767
+ }), (s, r) => e.preloaded ? Ne((u(), A(me, {
768
+ key: 0,
769
+ css: !1,
770
+ onBeforeEnter: r[0] || (r[0] = (f) => l("before-enter", f)),
771
+ onEnter: o,
772
+ onAfterEnter: r[1] || (r[1] = (f) => l("after-enter", f)),
773
+ onEnterCancelled: r[2] || (r[2] = (f) => l("enter-cancelled", f)),
774
+ onBeforeLeave: r[3] || (r[3] = (f) => l("before-leave", f)),
775
+ onLeave: d,
776
+ onAfterLeave: i,
777
+ onLeaveCancelled: r[4] || (r[4] = (f) => l("leave-cancelled", f))
778
+ }, {
779
+ default: C(() => [
780
+ I(s.$slots, "default")
781
+ ]),
782
+ _: 3
783
+ }, 512)), [
784
+ [We, e.shown]
785
+ ]) : (u(), A(me, {
786
+ key: 1,
787
+ css: !1,
788
+ onBeforeEnter: r[5] || (r[5] = (f) => l("before-enter", f)),
789
+ onEnter: o,
790
+ onAfterEnter: r[6] || (r[6] = (f) => l("after-enter", f)),
791
+ onEnterCancelled: r[7] || (r[7] = (f) => l("enter-cancelled", f)),
792
+ onBeforeLeave: r[8] || (r[8] = (f) => l("before-leave", f)),
793
+ onLeave: d,
794
+ onAfterLeave: i,
795
+ onLeaveCancelled: r[9] || (r[9] = (f) => l("leave-cancelled", f))
796
+ }, {
797
+ default: C(() => [
798
+ e.shown ? I(s.$slots, "default", { key: 0 }) : $("", !0)
799
+ ]),
800
+ _: 3
801
+ }));
802
+ }
803
+ }, Wt = ["data-width"], jt = { key: 0 }, Gt = { key: 0 }, Se = {
804
+ __name: "BsDropdownInternal",
805
+ props: {
806
+ shown: {
807
+ type: Boolean,
808
+ default: !0
809
+ },
810
+ preloaded: {
811
+ type: Boolean,
812
+ default: !1
813
+ },
814
+ width: {
815
+ type: String,
816
+ default: void 0,
817
+ validator: (e) => ["sm", "md", "lg", "content", "toggle"].includes(e)
818
+ },
819
+ position: {
820
+ type: String,
821
+ default: void 0,
822
+ validator: (e) => ["top", "bottom", "right"].includes(e)
823
+ },
824
+ anchorId: {
825
+ required: !0
826
+ },
827
+ containerId: {
828
+ type: String,
829
+ default: void 0
830
+ },
831
+ containerRef: {
832
+ type: Object,
833
+ default: void 0
834
+ },
835
+ helperText: {
836
+ type: String,
837
+ default: void 0
838
+ },
839
+ helperDescription: {
840
+ type: String,
841
+ default: void 0
842
+ }
843
+ },
844
+ emits: [
845
+ "close",
846
+ "enter",
847
+ "after-enter",
848
+ "after-leave"
849
+ ],
850
+ setup(e, { emit: a }) {
851
+ const t = e, l = a, n = k(null);
852
+ let o = !1;
853
+ ct([n], () => {
854
+ o && l("close");
855
+ }), re(["Escape"], () => {
856
+ o && l("close");
857
+ });
858
+ function d() {
859
+ const y = (t.containerRef || document.getElementById(t.containerId)).getBoundingClientRect(), L = document.getElementById(t.anchorId).getBoundingClientRect(), M = n.value.getBoundingClientRect();
860
+ if (t.position === "top") {
861
+ const w = y.bottom - L.bottom;
862
+ n.value.style.setProperty("--dropdown-wscreen-top", "auto"), n.value.style.setProperty("--dropdown-wscreen-bottom", `${w + L.height + 8}px`);
863
+ } else {
864
+ const w = L.top - y.top;
865
+ n.value.style.setProperty("--dropdown-wscreen-top", `${w + L.height + 8}px`), n.value.style.setProperty("--dropdown-wscreen-bottom", "auto");
866
+ }
867
+ const P = L.left - y.left;
868
+ if (t.position === "center") {
869
+ const w = (L.width - M.width) / 2;
870
+ n.value.style.setProperty("--dropdown-wscreen-left", `${P + w}px`);
871
+ } else if (t.position === "right") {
872
+ const w = y.right - L.right;
873
+ n.value.style.setProperty("--dropdown-wscreen-left", "auto"), n.value.style.setProperty("--dropdown-wscreen-right", `${w}px`);
874
+ } else
875
+ n.value.style.setProperty("--dropdown-wscreen-left", `${P}px`);
876
+ }
877
+ function i() {
878
+ if (t.width === "toggle") {
879
+ const g = document.getElementById(t.anchorId).getBoundingClientRect();
880
+ n.value.style.setProperty("--dropdown-wscreen-width", `${g.width}px`);
881
+ } else
882
+ n.value.style.setProperty("--dropdown-wscreen-width", "");
883
+ }
884
+ function s() {
885
+ d(), i(), l("enter");
886
+ }
887
+ function r() {
888
+ o = !0, l("after-enter");
889
+ }
890
+ function f() {
891
+ o = !1, l("after-leave");
892
+ }
893
+ function b() {
894
+ return t.width === "toggle" ? void 0 : t.width;
895
+ }
896
+ return (g, y) => (u(), A(c(de), {
897
+ shown: e.shown,
898
+ preloaded: e.preloaded,
899
+ duration: 75,
900
+ "enter-attribute": "data-shown",
901
+ onAfterEnter: y[1] || (y[1] = (L) => r()),
902
+ onEnter: y[2] || (y[2] = (L) => s()),
903
+ onAfterLeave: y[3] || (y[3] = (L) => f())
904
+ }, {
905
+ default: C(() => [
906
+ m("div", E({
907
+ ref_key: "dropdownRef",
908
+ ref: n,
909
+ class: "bs-dropdown",
910
+ "data-width": b()
911
+ }, g.$attrs), [
912
+ e.helperText ? (u(), v("header", jt, [
913
+ m("div", null, [
914
+ m("h3", null, T(e.helperText), 1),
915
+ e.helperDescription ? (u(), v("p", Gt, T(e.helperDescription), 1)) : $("", !0)
916
+ ]),
917
+ m("button", {
918
+ type: "button",
919
+ title: "close",
920
+ onClick: y[0] || (y[0] = () => l("close"))
921
+ }, [
922
+ D(c(oe))
923
+ ])
924
+ ])) : $("", !0),
925
+ I(g.$slots, "default")
926
+ ], 16, Wt)
927
+ ]),
928
+ _: 3
929
+ }, 8, ["shown", "preloaded"]));
930
+ }
931
+ }, Ft = {
932
+ key: 0,
933
+ class: "bs-dropdown-backdrop"
934
+ }, Ut = {
935
+ __name: "BsDropdown",
936
+ props: {
937
+ shown: {
938
+ type: Boolean,
939
+ default: !0
940
+ },
941
+ preloaded: {
942
+ type: Boolean,
943
+ default: !1
944
+ },
945
+ width: {
946
+ type: String,
947
+ default: void 0,
948
+ validator: (e) => ["sm", "md", "lg", "content", "toggle"].includes(e)
949
+ },
950
+ /** @Deprecated - Use position instead */
951
+ top: {
952
+ type: Boolean,
953
+ default: !1
954
+ },
955
+ /** @Deprecated - Use position instead */
956
+ center: {
957
+ type: Boolean,
958
+ default: !1
959
+ },
960
+ /** @Deprecated - Use position instead */
961
+ right: {
962
+ type: Boolean,
963
+ default: !1
964
+ },
965
+ position: {
966
+ type: String,
967
+ default: void 0,
968
+ validator: (e) => ["top", "center", "right"].includes(e)
969
+ },
970
+ /** @Deprecated - Use anchorId instead */
971
+ toggleId: {
972
+ type: String,
973
+ default: void 0
974
+ },
975
+ anchorId: {
976
+ type: String,
977
+ default: void 0
978
+ },
979
+ containerId: {
980
+ type: String,
981
+ default: void 0
982
+ },
983
+ helperText: {
984
+ type: String,
985
+ default: void 0
986
+ },
987
+ helperDescription: {
988
+ type: String,
989
+ default: void 0
990
+ },
991
+ /** @Deprecated - Use 'preloaded' instead. */
992
+ enterControlled: {
993
+ type: Boolean,
994
+ default: !1
995
+ },
996
+ /** @Deprecated - Use 'shown' instead. */
997
+ enterTrigger: {
998
+ type: Boolean,
999
+ default: !1
1000
+ },
1001
+ /** @Deprecated - Not used anymore. Handled via 'shown'. */
1002
+ leaveTrigger: {
1003
+ type: Boolean,
1004
+ default: !1
1005
+ }
1006
+ },
1007
+ emits: [
1008
+ "close",
1009
+ "enter",
1010
+ "after-enter",
1011
+ "after-leave"
1012
+ ],
1013
+ setup(e, { emit: a }) {
1014
+ const t = e, l = a, n = k(null), { transition: o } = se(t), d = p(() => t.toggleId ? t.toggleId : t.anchorId), i = p(() => t.top ? "top" : t.center ? "center" : t.right ? "right" : t.position);
1015
+ return (s, r) => (u(), v(R, null, [
1016
+ c(o) ? (u(), v("div", Ft)) : $("", !0),
1017
+ e.containerId ? (u(), A(c(Se), E({
1018
+ key: 1,
1019
+ shown: c(o),
1020
+ preloaded: e.preloaded,
1021
+ "anchor-id": d.value,
1022
+ "container-id": e.containerId,
1023
+ "helper-description": e.helperDescription,
1024
+ "helper-text": e.helperText,
1025
+ position: i.value,
1026
+ width: e.width
1027
+ }, s.$attrs, {
1028
+ onClose: r[0] || (r[0] = (f) => l("close")),
1029
+ onAfterEnter: r[1] || (r[1] = (f) => l("after-enter")),
1030
+ onEnter: r[2] || (r[2] = (f) => l("enter")),
1031
+ onAfterLeave: r[3] || (r[3] = (f) => l("after-leave"))
1032
+ }), {
1033
+ default: C(() => [
1034
+ I(s.$slots, "default")
1035
+ ]),
1036
+ _: 3
1037
+ }, 16, ["shown", "preloaded", "anchor-id", "container-id", "helper-description", "helper-text", "position", "width"])) : (u(), v("div", {
1038
+ key: 2,
1039
+ ref_key: "containerRef",
1040
+ ref: n,
1041
+ style: { position: "relative" }
1042
+ }, [
1043
+ D(c(Se), E({
1044
+ shown: c(o),
1045
+ preloaded: e.preloaded,
1046
+ "anchor-id": d.value,
1047
+ "container-ref": n.value,
1048
+ "helper-description": e.helperDescription,
1049
+ "helper-text": e.helperText,
1050
+ position: i.value,
1051
+ width: e.width
1052
+ }, s.$attrs, {
1053
+ onClose: r[4] || (r[4] = (f) => l("close")),
1054
+ onAfterEnter: r[5] || (r[5] = (f) => l("after-enter")),
1055
+ onEnter: r[6] || (r[6] = (f) => l("enter")),
1056
+ onAfterLeave: r[7] || (r[7] = (f) => l("after-leave"))
1057
+ }), {
1058
+ default: C(() => [
1059
+ I(s.$slots, "default")
1060
+ ]),
1061
+ _: 3
1062
+ }, 16, ["shown", "preloaded", "anchor-id", "container-ref", "helper-description", "helper-text", "position", "width"])
1063
+ ], 512))
1064
+ ], 64));
1065
+ }
1066
+ }, Ht = ["data-value", "data-variant", "id"], Kt = {
1067
+ __name: "BsDropdownOption",
1068
+ props: {
1069
+ value: {
1070
+ type: String,
1071
+ required: !0
1072
+ },
1073
+ variant: {
1074
+ type: String,
1075
+ default: void 0
1076
+ }
1077
+ },
1078
+ setup(e) {
1079
+ const a = e, t = k(null), l = te("optionsId"), n = te("handleSelect"), o = p(() => `${l}-option-${a.value}`);
1080
+ re([" ", "Enter", "NumpadEnter"], (i) => {
1081
+ var s;
1082
+ d(), (s = t.value.querySelector("a")) == null || s.click(), i.preventDefault();
1083
+ }, t);
1084
+ function d() {
1085
+ var i;
1086
+ n(o.value, a.value), (i = t.value.querySelector("a")) == null || i.click();
1087
+ }
1088
+ return (i, s) => (u(), v("li", {
1089
+ "data-component": "bs-dropdown-option",
1090
+ "data-value": a.value,
1091
+ ref_key: "optionRef",
1092
+ ref: t,
1093
+ role: "option",
1094
+ "data-variant": e.variant || void 0,
1095
+ id: o.value,
1096
+ tabIndex: -1,
1097
+ onClick: d
1098
+ }, [
1099
+ I(i.$slots, "default")
1100
+ ], 8, Ht));
1101
+ }
1102
+ }, Yt = ["aria-activedescendant", "aria-label", "id"], Xt = {
1103
+ __name: "BsDropdownOptionList",
1104
+ props: {
1105
+ optionsId: {
1106
+ type: String,
1107
+ required: !0
1108
+ },
1109
+ /** @Deprecated - Use 'shown' instead. The new prop defaults to `true`, so
1110
+ * it is not even needed when using v-if (only for v-show).
1111
+ */
1112
+ visible: {
1113
+ type: Boolean,
1114
+ default: void 0
1115
+ },
1116
+ shown: {
1117
+ type: Boolean,
1118
+ default: !0
1119
+ },
1120
+ focusDelay: {
1121
+ type: Number,
1122
+ default: 75
1123
+ },
1124
+ label: {
1125
+ type: String,
1126
+ default: void 0
1127
+ },
1128
+ /** @Deprecated - Use modelValue (or v-model) instead */
1129
+ selectedValue: {
1130
+ type: String,
1131
+ default: void 0
1132
+ },
1133
+ modelValue: {
1134
+ type: String,
1135
+ default: void 0
1136
+ }
1137
+ },
1138
+ emits: ["optselected", "update:modelValue", "close"],
1139
+ setup(e, { emit: a }) {
1140
+ const t = e, l = a, n = k(null), o = k(null);
1141
+ let d = null, i = -1, s = -1;
1142
+ ae("optionsId", t.optionsId), ae("handleSelect", P);
1143
+ function r() {
1144
+ return d || (d = Array.from(n.value.querySelectorAll('[data-component="bs-dropdown-option"]'))), d;
1145
+ }
1146
+ N(() => {
1147
+ g(), document.addEventListener("keydown", L);
1148
+ }), je(() => {
1149
+ document.removeEventListener("keydown", L);
1150
+ }), V(() => t.visible, () => {
1151
+ g();
1152
+ }), V(() => t.shown, () => {
1153
+ g();
1154
+ });
1155
+ const f = p(() => t.visible || t.shown), b = p(() => t.modelValue || t.selectedValue);
1156
+ function g() {
1157
+ var w, S, q, j, ee;
1158
+ f.value ? (s = r().findIndex(
1159
+ (J) => J.getAttribute("data-value") === b.value
1160
+ ), s > -1 && ((w = r()[s]) == null || w.setAttribute("data-selected", ""), (S = r()[s]) == null || S.setAttribute("aria-selected", "true"), i = s, t.focusDelay > 0 ? setTimeout(() => {
1161
+ var J;
1162
+ (J = r()[s]) == null || J.focus();
1163
+ }, t.focusDelay) : (q = r()[s]) == null || q.focus())) : ((j = r()[s]) == null || j.removeAttribute("data-selected"), (ee = r()[s]) == null || ee.removeAttribute("aria-selected"));
1164
+ }
1165
+ ft(
1166
+ n,
1167
+ () => {
1168
+ d = null;
1169
+ },
1170
+ { childList: !0 }
1171
+ );
1172
+ function y() {
1173
+ var w;
1174
+ i > -1 && ((w = r()[i]) == null || w.blur());
1175
+ }
1176
+ function L(w) {
1177
+ if (f.value)
1178
+ switch (w.key) {
1179
+ case "ArrowDown":
1180
+ M("down"), w.preventDefault();
1181
+ break;
1182
+ case "ArrowUp":
1183
+ M("up"), w.preventDefault();
1184
+ break;
1185
+ case "Home":
1186
+ M("home"), w.preventDefault();
1187
+ break;
1188
+ case "End":
1189
+ M("end"), w.preventDefault();
1190
+ break;
1191
+ case "Tab":
1192
+ w.preventDefault();
1193
+ break;
1194
+ }
1195
+ }
1196
+ function M(w) {
1197
+ let S;
1198
+ switch (w) {
1199
+ case "up":
1200
+ S = i - 1 < 0 ? r().length - 1 : i - 1;
1201
+ break;
1202
+ case "down":
1203
+ S = (i + 1) % r().length;
1204
+ break;
1205
+ case "home":
1206
+ S = 0;
1207
+ break;
1208
+ case "end":
1209
+ S = r().length - 1;
1210
+ break;
1211
+ }
1212
+ y(), r()[S].focus(), i = S;
1213
+ }
1214
+ function P(w, S) {
1215
+ o.value = w, y(), l("optselected", S), l("update:modelValue", S), l("close");
1216
+ }
1217
+ return (w, S) => (u(), v("ul", {
1218
+ ref_key: "optionsRef",
1219
+ ref: n,
1220
+ "aria-activedescendant": o.value || void 0,
1221
+ "aria-label": t.label || void 0,
1222
+ class: "bs-dropdown-options",
1223
+ id: t.optionsId,
1224
+ role: "listbox"
1225
+ }, [
1226
+ I(w.$slots, "default")
1227
+ ], 8, Yt));
1228
+ }
1229
+ }, Zt = {
1230
+ __name: "BsDropdownWithOptions",
1231
+ props: {
1232
+ // OPTION LIST PROPS
1233
+ optionsId: {
1234
+ type: String,
1235
+ required: !0
1236
+ },
1237
+ label: {
1238
+ type: String,
1239
+ default: void 0
1240
+ },
1241
+ /** @Deprecated - Use modelValue (or v-model) instead */
1242
+ selectedValue: {
1243
+ type: String,
1244
+ default: void 0
1245
+ },
1246
+ modelValue: {
1247
+ type: String,
1248
+ default: void 0
1249
+ },
1250
+ // DROPDOWN PROPS
1251
+ shown: {
1252
+ type: Boolean,
1253
+ default: !0
1254
+ },
1255
+ preloaded: {
1256
+ type: Boolean,
1257
+ default: !1
1258
+ },
1259
+ width: {
1260
+ type: String,
1261
+ default: void 0,
1262
+ validator: (e) => ["sm", "md", "lg", "content", "toggle"].includes(e)
1263
+ },
1264
+ /** @Deprecated - Use position instead */
1265
+ top: {
1266
+ type: Boolean,
1267
+ default: !1
1268
+ },
1269
+ /** @Deprecated - Use position instead */
1270
+ center: {
1271
+ type: Boolean,
1272
+ default: !1
1273
+ },
1274
+ /** @Deprecated - Use position instead */
1275
+ right: {
1276
+ type: Boolean,
1277
+ default: !1
1278
+ },
1279
+ position: {
1280
+ type: String,
1281
+ default: void 0,
1282
+ validator: (e) => ["top", "center", "right"].includes(e)
1283
+ },
1284
+ /** @Deprecated - Use anchorId instead */
1285
+ toggleId: {
1286
+ type: String,
1287
+ default: void 0
1288
+ },
1289
+ anchorId: {
1290
+ type: String,
1291
+ default: void 0
1292
+ },
1293
+ containerId: {
1294
+ type: String,
1295
+ default: void 0
1296
+ },
1297
+ helperText: {
1298
+ type: String,
1299
+ default: void 0
1300
+ },
1301
+ helperDescription: {
1302
+ type: String,
1303
+ default: void 0
1304
+ },
1305
+ /** @Deprecated - Use 'preloaded' instead. */
1306
+ enterControlled: {
1307
+ type: Boolean,
1308
+ default: !1
1309
+ },
1310
+ /** @Deprecated - Use 'shown' instead. */
1311
+ enterTrigger: {
1312
+ type: Boolean,
1313
+ default: !1
1314
+ },
1315
+ /** @Deprecated - Not used anymore. Handled via 'shown'. */
1316
+ leaveTrigger: {
1317
+ type: Boolean,
1318
+ default: !1
1319
+ }
1320
+ },
1321
+ emits: [
1322
+ "optselected",
1323
+ "update:modelValue",
1324
+ "close",
1325
+ "after-enter",
1326
+ "after-leave"
1327
+ ],
1328
+ setup(e, { emit: a }) {
1329
+ const t = a, l = k(!1);
1330
+ function n() {
1331
+ l.value = !0;
1332
+ }
1333
+ function o(i) {
1334
+ l.value = !1, t("optselected", i), t("update:modelValue", i), t("close");
1335
+ }
1336
+ function d() {
1337
+ l.value && (l.value = !1, t("close"));
1338
+ }
1339
+ return (i, s) => (u(), A(c(Ut), {
1340
+ shown: e.shown,
1341
+ preloaded: e.preloaded,
1342
+ "anchor-id": e.anchorId,
1343
+ center: e.center,
1344
+ "container-id": e.containerId,
1345
+ "enter-controlled": e.enterControlled,
1346
+ "enter-trigger": e.enterTrigger,
1347
+ "helper-description": e.helperDescription,
1348
+ "helper-text": e.helperText,
1349
+ "leave-trigger": e.leaveTrigger,
1350
+ position: e.position,
1351
+ right: e.right,
1352
+ "toggle-id": e.toggleId,
1353
+ top: e.top,
1354
+ width: e.width,
1355
+ onClose: d,
1356
+ onAfterEnter: s[0] || (s[0] = (r) => t("after-enter")),
1357
+ onEnter: n,
1358
+ onAfterLeave: s[1] || (s[1] = (r) => t("after-leave"))
1359
+ }, {
1360
+ default: C(() => [
1361
+ D(c(Xt), {
1362
+ label: e.label,
1363
+ "model-value": e.modelValue,
1364
+ "options-id": e.optionsId,
1365
+ "selected-value": e.selectedValue,
1366
+ shown: l.value,
1367
+ onOptselected: o,
1368
+ "onUpdate:modelValue": o,
1369
+ onClose: d
1370
+ }, {
1371
+ default: C(() => [
1372
+ I(i.$slots, "default")
1373
+ ]),
1374
+ _: 3
1375
+ }, 8, ["label", "model-value", "options-id", "selected-value", "shown"])
1376
+ ]),
1377
+ _: 3
1378
+ }, 8, ["shown", "preloaded", "anchor-id", "center", "container-id", "enter-controlled", "enter-trigger", "helper-description", "helper-text", "leave-trigger", "position", "right", "toggle-id", "top", "width"]));
1379
+ }
1380
+ }, Jt = {
1381
+ class: "bs-field-details",
1382
+ "data-component": "bs-field-details"
1383
+ }, Qt = ["id", "data-error"], _t = ["data-error"], pe = {
1384
+ __name: "BsFieldDetails",
1385
+ props: {
1386
+ /** The number of characters that have been entered by the user. */
1387
+ charCount: Number,
1388
+ /** Pass value to show character count and set the maximum number of characters that are allowed to be submitted by the user. */
1389
+ charMax: Number,
1390
+ /** Applies error styles to the helper text. */
1391
+ error: {
1392
+ type: Boolean,
1393
+ default: !1
1394
+ },
1395
+ /** Pass error text. Will be shown if `error` is `true`. */
1396
+ errorMsg: String,
1397
+ /** Pass single helper text. */
1398
+ hint: String,
1399
+ /** Adds an id to associate a hint to an input. */
1400
+ hintId: String
1401
+ },
1402
+ setup(e) {
1403
+ const a = e, t = p(() => a.error && a.errorMsg || a.hint);
1404
+ return (l, n) => (u(), v("div", Jt, [
1405
+ t.value ? (u(), v("span", {
1406
+ key: 0,
1407
+ id: e.hintId,
1408
+ class: "bs-hint",
1409
+ "data-error": e.error
1410
+ }, T(t.value), 9, Qt)) : $("", !0),
1411
+ e.charMax ? (u(), v("span", {
1412
+ key: 1,
1413
+ "aria-description": "character count over character limit for the preceding text field",
1414
+ class: "bs-character-count",
1415
+ "data-error": a.charCount > a.charMax
1416
+ }, T(a.charCount || "0") + " / " + T(a.charMax), 9, _t)) : $("", !0)
1417
+ ]));
1418
+ }
1419
+ }, ea = ["view-box"], ta = ["id"], aa = ["offset", "stop-color"], Vn = {
1420
+ __name: "BsIconGradientWrapper",
1421
+ setup(e) {
1422
+ const a = k(null), t = k(null), l = [
1423
+ { offset: 0.1326, color: "#EE282A" },
1424
+ { offset: 0.5466, color: "#1C0087" },
1425
+ { offset: 0.9715, color: "#0086EA" }
1426
+ ], [n] = H();
1427
+ return N(() => {
1428
+ t.value = a.value.querySelector("svg").getAttribute("viewBox") || "0 0 0 0";
1429
+ }), (o, d) => (u(), v(R, null, [
1430
+ m("span", {
1431
+ ref_key: "svgWrapperRef",
1432
+ ref: a,
1433
+ class: "bs-icon-gradient-wrapper",
1434
+ style: Ge(`fill: url(#${c(n)});`)
1435
+ }, [
1436
+ I(o.$slots, "default")
1437
+ ], 4),
1438
+ (u(), v("svg", {
1439
+ xmlns: "http://www.w3.org/2000/svg",
1440
+ "view-box": t.value,
1441
+ width: "0",
1442
+ height: "0"
1443
+ }, [
1444
+ m("linearGradient", {
1445
+ id: c(n),
1446
+ x1: "0",
1447
+ y1: "0",
1448
+ x2: "100%",
1449
+ y2: "100%",
1450
+ "gradient-units": "userSpaceOnUse"
1451
+ }, [
1452
+ (u(), v(R, null, Y(l, (i) => m("stop", {
1453
+ key: i.offset,
1454
+ offset: i.offset,
1455
+ "stop-color": i.color
1456
+ }, null, 8, aa)), 64))
1457
+ ], 8, ta)
1458
+ ], 8, ea))
1459
+ ], 64));
1460
+ }
1461
+ }, na = ["data-error", "id", "value"], we = {
1462
+ __name: "BsInput",
1463
+ props: {
1464
+ error: {
1465
+ type: Boolean,
1466
+ default: !1
1467
+ },
1468
+ hintId: String,
1469
+ /** @Deprecated - Just set `id` since it will fall-through to the inner input element. */
1470
+ inputId: String,
1471
+ modelValue: [String, Number],
1472
+ value: [String, Number]
1473
+ },
1474
+ emits: ["update:modelValue"],
1475
+ setup(e, { emit: a }) {
1476
+ const t = e, l = a, n = O(), o = p(() => ({ [t.error ? "aria-errormessage" : "aria-describedby"]: t.hintId }));
1477
+ function d(i) {
1478
+ const s = n.type === "number" ? parseInt(i.target.value) : i.target.value;
1479
+ l("update:modelValue", s);
1480
+ }
1481
+ return (i, s) => (u(), v("input", E({
1482
+ "data-component": "bs-input",
1483
+ "data-error": e.error,
1484
+ id: i.$attrs.id || e.inputId,
1485
+ value: e.value || e.modelValue,
1486
+ onInput: d
1487
+ }, o.value), null, 16, na));
1488
+ }
1489
+ }, la = ["data-disabled", "data-error", "data-variant", "data-multifocus"], oa = {
1490
+ __name: "BsInputAddon",
1491
+ props: {
1492
+ disabled: { type: Boolean, default: !1 },
1493
+ error: { type: Boolean, default: !1 },
1494
+ multifocus: { type: Boolean, default: !1 },
1495
+ variant: { type: String, validator: (e) => e === "inner-bordered" }
1496
+ },
1497
+ setup(e) {
1498
+ return (a, t) => (u(), v("div", {
1499
+ class: "bs-input-addon",
1500
+ "data-component": "bs-input-addon",
1501
+ "data-disabled": e.disabled,
1502
+ "data-error": e.error,
1503
+ "data-variant": e.variant,
1504
+ "data-multifocus": e.multifocus
1505
+ }, [
1506
+ I(a.$slots, "default")
1507
+ ], 8, la));
1508
+ }
1509
+ }, qn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1510
+ __name: "BsInputField",
1511
+ props: {
1512
+ /** Sets the disabled state on input, disabled styles on label. */
1513
+ disabled: {
1514
+ type: Boolean,
1515
+ default: !1
1516
+ },
1517
+ /** Applies error styles to the input. */
1518
+ error: {
1519
+ type: Boolean,
1520
+ default: !1
1521
+ },
1522
+ /** Pass error text. */
1523
+ errorMsg: String,
1524
+ /** Pass helper text. */
1525
+ hint: String,
1526
+ /** @Deprecated Use `hint` and/or `errorMsg`. */
1527
+ hints: [String, Array],
1528
+ /** Pass id for the input element. Will also be applied to label attribute. */
1529
+ inputId: String,
1530
+ /** Pass label text. */
1531
+ label: { type: String },
1532
+ /** List additional attributes by name (comma-separated) to pass through to `<input>`. */
1533
+ passAttrs: {
1534
+ type: String,
1535
+ default: ""
1536
+ },
1537
+ /** Placeholder attribute for `<input>`. */
1538
+ placeholder: String,
1539
+ /** Sets the required state on the input, append required* indicator to label. */
1540
+ required: {
1541
+ type: Boolean,
1542
+ default: !1
1543
+ },
1544
+ /** Sets the native input type attribute. */
1545
+ type: {
1546
+ type: String,
1547
+ default: "text"
1548
+ },
1549
+ /** Sets the input value - do not use if using `v-model`. */
1550
+ value: [String, Number],
1551
+ /** Sets the input value - `v-model` directive will use this; do not set explicitly. */
1552
+ modelValue: [String, Number]
1553
+ },
1554
+ emits: ["update:modelValue"],
1555
+ setup(e, { emit: a }) {
1556
+ const t = e, l = O(), [n, o] = H(2), { toChild: d, toRoot: i } = Z(t, l), s = p(() => {
1557
+ var b, g;
1558
+ return ((g = (b = t.hints) == null ? void 0 : b.join) == null ? void 0 : g.call(b, `
1559
+ `)) || t.hints;
1560
+ }), r = p(() => t.error && t.errorMsg || t.hint || s.value || void 0), f = p(() => t.inputId || n.value);
1561
+ return (b, g) => (u(), v("div", E({ "data-component": "bs-input-field" }, c(i)), [
1562
+ e.label || b.$slots.label ? (u(), A(c(_), {
1563
+ key: 0,
1564
+ for: f.value,
1565
+ disabled: e.disabled,
1566
+ required: e.required
1567
+ }, {
1568
+ default: C(() => [
1569
+ I(b.$slots, "label", {}, () => [
1570
+ W(T(e.label), 1)
1571
+ ])
1572
+ ]),
1573
+ _: 3
1574
+ }, 8, ["for", "disabled", "required"])) : $("", !0),
1575
+ D(c(we), E({
1576
+ disabled: e.disabled,
1577
+ error: e.error,
1578
+ "hint-id": c(o),
1579
+ id: f.value,
1580
+ placeholder: e.placeholder,
1581
+ required: e.required,
1582
+ type: e.type,
1583
+ value: e.value || e.modelValue,
1584
+ "onUpdate:modelValue": g[0] || (g[0] = (y) => b.$emit("update:modelValue", y))
1585
+ }, c(d)), null, 16, ["disabled", "error", "hint-id", "id", "placeholder", "required", "type", "value"]),
1586
+ r.value ? (u(), A(pe, {
1587
+ key: 1,
1588
+ error: e.error,
1589
+ "error-msg": e.errorMsg,
1590
+ hint: e.hint || s.value,
1591
+ "hint-id": c(o)
1592
+ }, null, 8, ["error", "error-msg", "hint", "hint-id"])) : $("", !0)
1593
+ ], 16));
1594
+ }
1595
+ }), zn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1596
+ __name: "BsInputSearch",
1597
+ props: {
1598
+ /** Sets the disabled state on input, disabled styles on label. */
1599
+ disabled: {
1600
+ type: Boolean,
1601
+ default: !1
1602
+ },
1603
+ hideClear: {
1604
+ type: Boolean,
1605
+ default: !1
1606
+ },
1607
+ inputId: String,
1608
+ modelValue: {
1609
+ type: String,
1610
+ default: ""
1611
+ },
1612
+ passAttrs: {
1613
+ type: String,
1614
+ default: ""
1615
+ },
1616
+ placeholder: {
1617
+ type: String,
1618
+ default: "Search Items"
1619
+ },
1620
+ /** Sets the input value - do not use if using `v-model`. */
1621
+ value: {
1622
+ type: String,
1623
+ default: ""
1624
+ }
1625
+ },
1626
+ emits: ["clear", "update:modelValue"],
1627
+ setup(e, { emit: a }) {
1628
+ const t = e, l = O(), { toChild: n, toRoot: o } = Z(t, l);
1629
+ return (d, i) => (u(), A(c(oa), E({
1630
+ class: "bs-input-search",
1631
+ "data-component": "bs-input-search",
1632
+ disabled: e.disabled
1633
+ }, c(o)), {
1634
+ default: C(() => [
1635
+ D(c(Xe)),
1636
+ D(c(we), E({
1637
+ "data-autowidth": "",
1638
+ disabled: e.disabled,
1639
+ "input-id": e.inputId,
1640
+ placeholder: e.placeholder,
1641
+ value: e.value || e.modelValue,
1642
+ "onUpdate:modelValue": i[0] || (i[0] = (s) => d.$emit("update:modelValue", s))
1643
+ }, c(n)), null, 16, ["disabled", "input-id", "placeholder", "value"]),
1644
+ e.disabled || e.hideClear ? $("", !0) : (u(), v("button", {
1645
+ key: 0,
1646
+ title: "Clear",
1647
+ type: "button",
1648
+ onClick: i[1] || (i[1] = (s) => d.$emit("clear"))
1649
+ }, [
1650
+ D(c(oe), { size: "sm" })
1651
+ ]))
1652
+ ]),
1653
+ _: 1
1654
+ }, 16, ["disabled"]));
1655
+ }
1656
+ }), ia = ["data-disabled", "for"], ra = /* @__PURE__ */ m("span", {
1657
+ "data-required": "true",
1658
+ "aria-hidden": "true"
1659
+ }, " *", -1), sa = /* @__PURE__ */ m("span", { class: "visually-hidden" }, "required", -1), _ = {
1660
+ __name: "BsLabel",
1661
+ props: {
1662
+ disabled: { type: Boolean, default: !1 },
1663
+ for: { type: String, required: !0 },
1664
+ hide: { type: Boolean, default: !1 },
1665
+ required: { type: Boolean, default: !1 }
1666
+ },
1667
+ setup(e) {
1668
+ return (a, t) => (u(), v("label", {
1669
+ class: X(["bs-label", e.hide ? "visually-hidden" : ""]),
1670
+ "data-component": "bs-label",
1671
+ "data-disabled": e.disabled,
1672
+ for: e.for
1673
+ }, [
1674
+ m("span", null, [
1675
+ I(a.$slots, "default")
1676
+ ]),
1677
+ e.required ? (u(), v(R, { key: 0 }, [
1678
+ ra,
1679
+ sa
1680
+ ], 64)) : $("", !0)
1681
+ ], 10, ia));
1682
+ }
1683
+ }, da = ["data-size", "data-variant"], ua = /* @__PURE__ */ m("span", null, null, -1), ca = /* @__PURE__ */ m("span", null, null, -1), fa = /* @__PURE__ */ m("span", null, null, -1), va = /* @__PURE__ */ m("span", null, null, -1), ha = /* @__PURE__ */ m("span", { class: "visually-hidden" }, "Loading", -1), pa = [
1684
+ ua,
1685
+ ca,
1686
+ fa,
1687
+ va,
1688
+ ha
1689
+ ], Mn = {
1690
+ __name: "BsLoader",
1691
+ props: {
1692
+ size: {
1693
+ type: String,
1694
+ default: "md",
1695
+ validator: (e) => ["xs", "sm", "md", "lg"].includes(e)
1696
+ },
1697
+ variant: {
1698
+ type: String,
1699
+ validator: (e) => ["black", "white", "gray"].includes(e)
1700
+ }
1701
+ },
1702
+ setup(e) {
1703
+ return (a, t) => (u(), v("span", {
1704
+ class: "bs-loader",
1705
+ "data-size": e.size,
1706
+ "data-variant": e.variant,
1707
+ role: "status"
1708
+ }, pa, 8, da));
1709
+ }
1710
+ }, ga = /* @__PURE__ */ m("div", { class: "bs-overlay" }, null, -1), ba = {
1711
+ __name: "BsOverlay",
1712
+ props: {
1713
+ shown: {
1714
+ type: Boolean,
1715
+ default: !0
1716
+ },
1717
+ preloaded: {
1718
+ type: Boolean,
1719
+ default: !1
1720
+ },
1721
+ /** @Deprecated - Use 'preloaded' instead. */
1722
+ enterControlled: {
1723
+ type: Boolean,
1724
+ default: !1
1725
+ },
1726
+ /** @Deprecated - Use 'shown' instead. */
1727
+ enterTrigger: {
1728
+ type: Boolean,
1729
+ default: !1
1730
+ },
1731
+ /** @Deprecated - Not used anymore. Handled via 'shown'. */
1732
+ leaveTrigger: {
1733
+ type: Boolean,
1734
+ default: !1
1735
+ }
1736
+ },
1737
+ emits: ["after-enter", "after-leave"],
1738
+ setup(e, { emit: a }) {
1739
+ const t = e, l = a, { transition: n } = se(t);
1740
+ return (o, d) => (u(), A(c(de), {
1741
+ shown: c(n),
1742
+ preloaded: e.preloaded,
1743
+ duration: 75,
1744
+ "enter-attribute": "data-shown",
1745
+ onAfterEnter: d[0] || (d[0] = (i) => l("after-enter")),
1746
+ onAfterLeave: d[1] || (d[1] = (i) => l("after-leave"))
1747
+ }, {
1748
+ default: C(() => [
1749
+ ga
1750
+ ]),
1751
+ _: 1
1752
+ }, 8, ["shown", "preloaded"]));
1753
+ }
1754
+ }, ma = ["id", "role"], ya = {
1755
+ key: 0,
1756
+ class: "close-button-container"
1757
+ }, Rn = {
1758
+ __name: "BsModal",
1759
+ props: {
1760
+ modalId: {
1761
+ type: String,
1762
+ default: void 0
1763
+ },
1764
+ shown: {
1765
+ type: Boolean,
1766
+ default: !0
1767
+ },
1768
+ preloaded: {
1769
+ type: Boolean,
1770
+ default: !1
1771
+ },
1772
+ alert: {
1773
+ type: Boolean,
1774
+ default: !1
1775
+ },
1776
+ closeButton: {
1777
+ type: Boolean,
1778
+ default: !0
1779
+ },
1780
+ /** @Deprecated - Not used anymore. Handled via 'shown'. */
1781
+ enterControlled: {
1782
+ type: Boolean,
1783
+ default: !1
1784
+ },
1785
+ /** @Deprecated - Use 'shown' instead. */
1786
+ enterTrigger: {
1787
+ type: Boolean,
1788
+ default: !1
1789
+ },
1790
+ /** @Deprecated - Not used anymore. Handled via 'shown'. */
1791
+ leaveTrigger: {
1792
+ type: Boolean,
1793
+ default: !1
1794
+ }
1795
+ },
1796
+ emits: [
1797
+ "close",
1798
+ "after-enter",
1799
+ "after-leave"
1800
+ ],
1801
+ setup(e, { emit: a }) {
1802
+ const t = e, l = a, { transition: n } = se(t);
1803
+ let o = !1;
1804
+ return re(["Escape"], () => {
1805
+ o && l("close", t.modalId);
1806
+ }), (d, i) => (u(), v(R, null, [
1807
+ D(ba, {
1808
+ shown: c(n),
1809
+ preloaded: e.preloaded,
1810
+ "enter-controlled": e.enterControlled,
1811
+ "enter-trigger": e.enterTrigger,
1812
+ "leave-trigger": e.leaveTrigger
1813
+ }, null, 8, ["shown", "preloaded", "enter-controlled", "enter-trigger", "leave-trigger"]),
1814
+ D(de, {
1815
+ shown: c(n),
1816
+ preloaded: e.preloaded,
1817
+ duration: 75,
1818
+ "enter-attribute": "data-shown",
1819
+ onEnter: i[1] || (i[1] = (s) => Fe(o) ? o.value = !0 : o = !0),
1820
+ onAfterEnter: i[2] || (i[2] = (s) => l("after-enter")),
1821
+ onAfterLeave: i[3] || (i[3] = (s) => l("after-leave"))
1822
+ }, {
1823
+ default: C(() => [
1824
+ m("div", {
1825
+ id: t.modalId,
1826
+ class: "bs-modal",
1827
+ role: e.alert ? "alertdialog" : "dialog",
1828
+ "aria-modal": "true"
1829
+ }, [
1830
+ e.closeButton ? (u(), v("div", ya, [
1831
+ m("button", {
1832
+ type: "button",
1833
+ title: "Close Modal",
1834
+ "aria-label": "Close Modal",
1835
+ onClick: i[0] || (i[0] = (s) => l("close", e.modalId))
1836
+ }, [
1837
+ D(c(oe), { class: "close-button" })
1838
+ ])
1839
+ ])) : $("", !0),
1840
+ I(d.$slots, "default")
1841
+ ], 8, ma)
1842
+ ]),
1843
+ _: 3
1844
+ }, 8, ["shown", "preloaded"])
1845
+ ], 64));
1846
+ }
1847
+ }, Ba = ["data-variant", "data-fixed"], $a = {
1848
+ key: 0,
1849
+ class: "bs-pagination-carets"
1850
+ }, Sa = ["title", "disabled"], wa = { key: 0 }, ka = ["title", "disabled"], Ia = { key: 0 }, Ta = {
1851
+ key: 1,
1852
+ class: "bs-pagination-page-numbers"
1853
+ }, xa = ["title", "data-selected", "onClick"], Ca = { key: 2 }, Aa = { key: 3 }, La = /* @__PURE__ */ m("span", null, "Results Per Page:", -1), Pa = { class: "bs-pagination-results-numbers" }, Da = ["data-selected", "disabled", "onClick"], Ea = {
1854
+ key: 5,
1855
+ class: "bs-pagination-carets"
1856
+ }, Va = ["title", "disabled"], qa = { key: 0 }, za = ["title", "disabled"], Ma = { key: 0 }, On = {
1857
+ __name: "BsPagination",
1858
+ props: {
1859
+ // Used for all
1860
+ showFirstLastButtons: {
1861
+ type: Boolean,
1862
+ default: !1
1863
+ },
1864
+ prevPageText: {
1865
+ type: String,
1866
+ default: void 0
1867
+ },
1868
+ firstPageText: {
1869
+ type: String,
1870
+ default: void 0
1871
+ },
1872
+ nextPageText: {
1873
+ type: String,
1874
+ default: void 0
1875
+ },
1876
+ lastPageText: {
1877
+ type: String,
1878
+ default: void 0
1879
+ },
1880
+ fixed: {
1881
+ type: Boolean,
1882
+ default: !1
1883
+ },
1884
+ variant: {
1885
+ type: String,
1886
+ default: "base",
1887
+ validator: (e) => ["base", "group", "results"].includes(e)
1888
+ },
1889
+ /** @Deprecated - Use modelValue (or v-model) instead */
1890
+ selection: {
1891
+ type: Number,
1892
+ default: void 0
1893
+ },
1894
+ modelValue: {
1895
+ type: Number,
1896
+ default: void 0
1897
+ },
1898
+ // Used for variant="base"
1899
+ centerDisplay: {
1900
+ type: String,
1901
+ default: "numbers",
1902
+ validator: (e) => ["numbers", "text"].includes(e)
1903
+ },
1904
+ // Used for variant="base", centerDisplay="numbers"
1905
+ breakText: {
1906
+ type: String,
1907
+ default: "…"
1908
+ },
1909
+ // Used for variant="base", centerDisplay="numbers"
1910
+ pageRange: {
1911
+ type: Number,
1912
+ default: 3
1913
+ },
1914
+ // Used for variant="base"
1915
+ pageCount: {
1916
+ type: Number,
1917
+ default: void 0
1918
+ },
1919
+ // Used for variant="base", centerDisplay="text" and variant="group"
1920
+ centerLabel: {
1921
+ type: String,
1922
+ default: void 0
1923
+ },
1924
+ // Used for variant="group"
1925
+ itemsPerGroup: {
1926
+ type: Number,
1927
+ default: 25
1928
+ },
1929
+ // Used for variant="group"
1930
+ itemsCount: {
1931
+ type: Number,
1932
+ default: void 0
1933
+ },
1934
+ // Used for variant="results"
1935
+ resultsIncrements: {
1936
+ type: String,
1937
+ default: void 0
1938
+ }
1939
+ },
1940
+ emits: ["selchange", "update:modelValue"],
1941
+ setup(e, { emit: a }) {
1942
+ const t = e, l = a, n = k(null);
1943
+ N(() => {
1944
+ o.value ? n.value = o.value : t.variant === "results" ? n.value = M.value[0] : n.value = 1;
1945
+ });
1946
+ const o = p(() => t.modelValue || t.selection);
1947
+ V(() => t.selection, (P) => {
1948
+ n.value = P;
1949
+ }), V(() => t.modelValue, (P) => {
1950
+ n.value = P;
1951
+ }), V(n, (P, w) => {
1952
+ w !== null && (l("selchange", P), l("update:modelValue", P));
1953
+ });
1954
+ const d = p(() => {
1955
+ if (t.variant === "group")
1956
+ return Math.ceil(t.itemsCount / t.itemsPerGroup);
1957
+ if (t.variant === "base")
1958
+ return t.pageCount;
1959
+ }), i = p(() => t.variant === "base" ? t.centerDisplay === "text" ? "group" : void 0 : t.variant);
1960
+ function s() {
1961
+ n.value = 1;
1962
+ }
1963
+ function r() {
1964
+ n.value = Math.max(n.value - 1, 1);
1965
+ }
1966
+ function f() {
1967
+ n.value = Math.min(
1968
+ n.value + 1,
1969
+ d.value
1970
+ );
1971
+ }
1972
+ function b() {
1973
+ n.value = d.value;
1974
+ }
1975
+ const g = p(() => {
1976
+ if (t.pageCount <= t.pageRange)
1977
+ return [...Array(t.pageCount + 1).keys()].slice(1);
1978
+ const P = [1], w = (t.pageRange - 1) / 2;
1979
+ let S = n.value - w, q = n.value + w;
1980
+ S < 1 && (q += 1 - S, S = 1), q > t.pageCount && (S -= q - t.pageCount, q = t.pageCount), S = Math.max(S, 2), q = Math.min(q, t.pageCount - 1), S > 2 && P.push(t.breakText);
1981
+ for (let j = S; j <= q; j++)
1982
+ P.push(j);
1983
+ return q < t.pageCount - 1 && P.push(t.breakText), P.push(t.pageCount), P;
1984
+ }), y = p(() => `${t.centerLabel ?? "Page"} ${n.value} of ${d.value}`), L = p(() => {
1985
+ const P = (n.value - 1) * t.itemsPerGroup + 1, w = Math.min(P - 1 + t.itemsPerGroup, t.itemsCount);
1986
+ return `${t.centerLabel ?? "Results"} ${P} - ${w} of ${t.itemsCount}`;
1987
+ }), M = p(() => t.resultsIncrements.split(",").map((P) => parseInt(P)));
1988
+ return (P, w) => (u(), v("div", {
1989
+ class: "bs-pagination",
1990
+ "data-variant": i.value,
1991
+ "data-fixed": t.fixed
1992
+ }, [
1993
+ e.variant === "base" || e.variant === "group" ? (u(), v("div", $a, [
1994
+ e.showFirstLastButtons ? (u(), v("button", {
1995
+ key: 0,
1996
+ type: "button",
1997
+ class: X(e.firstPageText ? "bs-pagination-word-caret" : void 0),
1998
+ title: e.firstPageText,
1999
+ disabled: n.value === 1,
2000
+ onClick: s
2001
+ }, [
2002
+ D(c(Ze)),
2003
+ e.firstPageText ? (u(), v("span", wa, T(e.firstPageText), 1)) : $("", !0)
2004
+ ], 10, Sa)) : $("", !0),
2005
+ m("button", {
2006
+ type: "button",
2007
+ class: X(e.prevPageText ? "bs-pagination-word-caret" : void 0),
2008
+ title: e.prevPageText,
2009
+ disabled: n.value === 1,
2010
+ onClick: r
2011
+ }, [
2012
+ D(c(Je)),
2013
+ e.prevPageText ? (u(), v("span", Ia, T(e.prevPageText), 1)) : $("", !0)
2014
+ ], 10, ka)
2015
+ ])) : $("", !0),
2016
+ e.variant === "base" && e.centerDisplay === "numbers" ? (u(), v("div", Ta, [
2017
+ (u(!0), v(R, null, Y(g.value, (S) => (u(), v("button", {
2018
+ key: `page-${S}-button`,
2019
+ type: "button",
2020
+ title: `Page ${S}`,
2021
+ "data-selected": S === n.value,
2022
+ onClick: (q) => n.value = S
2023
+ }, T(S), 9, xa))), 128))
2024
+ ])) : $("", !0),
2025
+ t.variant === "base" && t.centerDisplay === "text" ? (u(), v("span", Ca, T(y.value), 1)) : $("", !0),
2026
+ t.variant === "group" ? (u(), v("span", Aa, T(L.value), 1)) : $("", !0),
2027
+ t.variant === "results" ? (u(), v(R, { key: 4 }, [
2028
+ La,
2029
+ m("div", Pa, [
2030
+ (u(!0), v(R, null, Y(M.value, (S) => (u(), v("button", {
2031
+ type: "button",
2032
+ key: `results-${S}`,
2033
+ "data-selected": S === n.value,
2034
+ disabled: n.value === S,
2035
+ onClick: (q) => n.value = S
2036
+ }, T(S), 9, Da))), 128))
2037
+ ])
2038
+ ], 64)) : $("", !0),
2039
+ e.variant === "base" || e.variant === "group" ? (u(), v("div", Ea, [
2040
+ m("button", {
2041
+ type: "button",
2042
+ class: X(e.nextPageText ? "bs-pagination-word-caret" : void 0),
2043
+ title: e.nextPageText,
2044
+ disabled: n.value === d.value,
2045
+ onClick: f
2046
+ }, [
2047
+ e.nextPageText ? (u(), v("span", qa, T(e.nextPageText), 1)) : $("", !0),
2048
+ D(c(Qe))
2049
+ ], 10, Va),
2050
+ e.showFirstLastButtons ? (u(), v("button", {
2051
+ key: 0,
2052
+ type: "button",
2053
+ class: X(e.lastPageText ? "bs-pagination-word-caret" : void 0),
2054
+ title: e.lastPageText,
2055
+ disabled: n.value === d.value,
2056
+ onClick: b
2057
+ }, [
2058
+ e.lastPageText ? (u(), v("span", Ma, T(e.lastPageText), 1)) : $("", !0),
2059
+ D(c(_e))
2060
+ ], 10, za)) : $("", !0)
2061
+ ])) : $("", !0)
2062
+ ], 8, Ba));
2063
+ }
2064
+ }, Nn = {
2065
+ __name: "BsPill",
2066
+ props: {
2067
+ active: { type: Boolean, default: !1 },
2068
+ disabled: { type: Boolean, default: !1 },
2069
+ href: { type: String },
2070
+ router: {},
2071
+ status: {
2072
+ type: String,
2073
+ validator: (e) => ["active", "complete", "inactive", "error", "warning", "positive"].includes(e)
2074
+ },
2075
+ variant: {
2076
+ type: String,
2077
+ validator: (e) => ["filter", "filter-add", "filter-remove", "live"].includes(e)
2078
+ }
2079
+ },
2080
+ setup(e) {
2081
+ const a = e, { onLinkClick: t } = ie(a), l = O(), { rootTag: n, attrsToBind: o } = he(a, l, "span");
2082
+ return (d, i) => (u(), A(U(c(n)), E({
2083
+ class: "bs-pill",
2084
+ "data-active": e.active,
2085
+ "data-component": "bs-pill",
2086
+ "data-status": e.status || void 0,
2087
+ "data-variant": e.variant || void 0,
2088
+ disabled: e.disabled,
2089
+ href: e.href
2090
+ }, c(o), { onClick: c(t) }), {
2091
+ default: C(() => [
2092
+ I(d.$slots, "default")
2093
+ ]),
2094
+ _: 3
2095
+ }, 16, ["data-active", "data-status", "data-variant", "disabled", "href", "onClick"]));
2096
+ }
2097
+ }, Wn = {
2098
+ __name: "BsProfile",
2099
+ props: {
2100
+ layout: {
2101
+ type: String,
2102
+ default: "vertical",
2103
+ validator: (e) => ["horizontal", "vertical"].includes(e)
2104
+ },
2105
+ href: String,
2106
+ imageSrc: String,
2107
+ imageSize: {
2108
+ type: String,
2109
+ default: "lg",
2110
+ validator: (e) => ["sm", "md", "lg"].includes(e)
2111
+ },
2112
+ initials: String,
2113
+ profileName: String,
2114
+ company: String,
2115
+ jobTitle: String,
2116
+ email: String,
2117
+ action: String,
2118
+ actionIcon: String,
2119
+ miscMeta: String,
2120
+ miscMetaIcon: String,
2121
+ router: Object
2122
+ },
2123
+ emits: ["action-toggled"],
2124
+ setup(e, { emit: a }) {
2125
+ const t = e, l = a, { onLinkClick: n } = ie(t), o = p(() => t.href ? "a" : "div");
2126
+ return (d, i) => (u(), A(U(o.value), {
2127
+ class: "bs-profile",
2128
+ href: e.href,
2129
+ "data-layout": e.layout,
2130
+ onClick: c(n)
2131
+ }, {
2132
+ default: C(() => [
2133
+ D(c(Ka), {
2134
+ src: e.imageSrc,
2135
+ size: e.imageSize,
2136
+ initials: e.initials,
2137
+ "profile-name": e.profileName
2138
+ }, null, 8, ["src", "size", "initials", "profile-name"]),
2139
+ D(c(Fa), {
2140
+ "profile-name": e.profileName,
2141
+ company: e.company,
2142
+ "job-title": e.jobTitle,
2143
+ email: e.email,
2144
+ action: e.action,
2145
+ "action-icon": e.actionIcon,
2146
+ "misc-meta": e.miscMeta,
2147
+ "misc-meta-icon": e.miscMetaIcon,
2148
+ onActionToggled: i[0] || (i[0] = (s) => l("action-toggled"))
2149
+ }, {
2150
+ action: C(() => [
2151
+ I(d.$slots, "action")
2152
+ ]),
2153
+ misc: C(() => [
2154
+ I(d.$slots, "misc")
2155
+ ]),
2156
+ _: 3
2157
+ }, 8, ["profile-name", "company", "job-title", "email", "action", "action-icon", "misc-meta", "misc-meta-icon"])
2158
+ ]),
2159
+ _: 3
2160
+ }, 8, ["href", "data-layout", "onClick"]));
2161
+ }
2162
+ }, Ra = { class: "bs-profile-details" }, Oa = {
2163
+ class: "bs-profile-name",
2164
+ "data-size": "sm",
2165
+ "data-weight": "bold"
2166
+ }, Na = {
2167
+ key: 1,
2168
+ "data-weight": "bold"
2169
+ }, Wa = { key: 2 }, ja = { key: 3 }, Ga = {
2170
+ key: 4,
2171
+ "data-icon": "true"
2172
+ }, Fa = {
2173
+ __name: "BsProfileDetails",
2174
+ props: {
2175
+ profileName: {
2176
+ type: String,
2177
+ required: !0
2178
+ },
2179
+ company: String,
2180
+ jobTitle: String,
2181
+ email: String,
2182
+ action: String,
2183
+ actionIcon: String,
2184
+ miscMeta: String,
2185
+ miscMetaIcon: String
2186
+ },
2187
+ emits: ["action-toggled"],
2188
+ setup(e, { emit: a }) {
2189
+ const t = e, l = a, { icon: n } = le(t.actionIcon), { icon: o } = le(t.miscMetaIcon);
2190
+ function d(i) {
2191
+ i.target.tagName === "BUTTON" && (i.preventDefault(), i.stopImmediatePropagation(), l("action-toggled"));
2192
+ }
2193
+ return (i, s) => (u(), v("div", Ra, [
2194
+ e.action || i.$slots.action ? (u(), v("button", {
2195
+ key: 0,
2196
+ "data-icon": "true",
2197
+ onClick: d
2198
+ }, [
2199
+ I(i.$slots, "action", {}, () => [
2200
+ e.actionIcon ? (u(), A(U(c(n) ? c(n) : "span"), { key: 0 })) : $("", !0),
2201
+ W(" " + T(e.action), 1)
2202
+ ])
2203
+ ])) : $("", !0),
2204
+ m("span", Oa, T(e.profileName), 1),
2205
+ e.company ? (u(), v("span", Na, T(e.company), 1)) : $("", !0),
2206
+ e.jobTitle ? (u(), v("span", Wa, T(e.jobTitle), 1)) : $("", !0),
2207
+ e.email ? (u(), v("span", ja, T(e.email), 1)) : $("", !0),
2208
+ e.miscMeta || i.$slots.misc ? (u(), v("span", Ga, [
2209
+ I(i.$slots, "misc", {}, () => [
2210
+ e.miscMetaIcon ? (u(), A(U(c(o) ? c(o) : "span"), { key: 0 })) : $("", !0),
2211
+ W(" " + T(e.miscMeta), 1)
2212
+ ])
2213
+ ])) : $("", !0)
2214
+ ]));
2215
+ }
2216
+ }, Ua = ["data-img-size", "data-initials", "data-no-img"], Ha = ["src", "alt"], Ka = {
2217
+ __name: "BsProfileImg",
2218
+ props: {
2219
+ src: String,
2220
+ size: String,
2221
+ initials: {
2222
+ type: String,
2223
+ required: !0
2224
+ },
2225
+ profileName: {
2226
+ type: String,
2227
+ required: !0
2228
+ }
2229
+ },
2230
+ setup(e) {
2231
+ const a = e, t = k(!1), l = k(!!a.src);
2232
+ return N(() => t.value = !0), (n, o) => (u(), v("div", {
2233
+ class: "bs-profile-img",
2234
+ "data-img-size": e.size,
2235
+ "data-initials": e.initials,
2236
+ "data-no-img": !l.value
2237
+ }, [
2238
+ l.value && t.value ? (u(), v("img", {
2239
+ key: 0,
2240
+ src: e.src,
2241
+ alt: e.profileName,
2242
+ onError: o[0] || (o[0] = (d) => l.value = !1)
2243
+ }, null, 40, Ha)) : $("", !0)
2244
+ ], 8, Ua));
2245
+ }
2246
+ }, Ya = ["data-size"], Xa = ["checked", "disabled", "id", "required", "value", "data-error"], jn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
2247
+ __name: "BsRadio",
2248
+ props: {
2249
+ label: {
2250
+ type: String
2251
+ },
2252
+ checked: {
2253
+ type: Boolean,
2254
+ default: !1
2255
+ },
2256
+ disabled: {
2257
+ type: Boolean,
2258
+ default: !1
2259
+ },
2260
+ error: {
2261
+ type: Boolean,
2262
+ default: !1
2263
+ },
2264
+ inputId: {
2265
+ type: String,
2266
+ default: ""
2267
+ },
2268
+ passAttrs: {
2269
+ type: String,
2270
+ default: ""
2271
+ },
2272
+ required: {
2273
+ type: Boolean,
2274
+ default: !1
2275
+ },
2276
+ size: {
2277
+ type: String,
2278
+ validator: (e) => e === "sm"
2279
+ },
2280
+ value: {
2281
+ type: String,
2282
+ required: !0
2283
+ },
2284
+ modelValue: {
2285
+ type: String
2286
+ }
2287
+ },
2288
+ emits: ["update:modelValue"],
2289
+ setup(e, { emit: a }) {
2290
+ const t = e, l = O(), [n] = H(), { toChild: o, toRoot: d } = Z(t, l), i = p(() => t.inputId || n.value), s = p(() => t.checked || t.modelValue && t.modelValue === t.value);
2291
+ return (r, f) => (u(), v("div", E({
2292
+ class: "bs-boolean",
2293
+ "data-component": "bs-radio",
2294
+ "data-size": e.size
2295
+ }, c(d)), [
2296
+ m("input", E({
2297
+ checked: s.value,
2298
+ disabled: e.disabled,
2299
+ id: i.value,
2300
+ required: e.required,
2301
+ type: "radio",
2302
+ value: e.value,
2303
+ "data-error": e.error
2304
+ }, c(o), {
2305
+ onChange: f[0] || (f[0] = (b) => r.$emit("update:modelValue", b.target.value))
2306
+ }), null, 16, Xa),
2307
+ e.label || r.$slots.label ? (u(), A(c(_), {
2308
+ key: 0,
2309
+ for: i.value,
2310
+ disabled: e.disabled,
2311
+ required: e.required
2312
+ }, {
2313
+ default: C(() => [
2314
+ I(r.$slots, "label", {}, () => [
2315
+ W(T(e.label), 1)
2316
+ ])
2317
+ ]),
2318
+ _: 3
2319
+ }, 8, ["for", "disabled", "required"])) : $("", !0)
2320
+ ], 16, Ya));
2321
+ }
2322
+ }), Za = ["id", "disabled", "required", "data-error", "value"], Ja = {
2323
+ __name: "BsSelect",
2324
+ props: {
2325
+ disabled: { type: Boolean, default: !1 },
2326
+ error: { type: Boolean, default: !1 },
2327
+ hintId: { type: String },
2328
+ inputId: { type: String },
2329
+ modelValue: [String, Number],
2330
+ required: { type: Boolean, default: !1 },
2331
+ value: [String, Number]
2332
+ },
2333
+ emits: ["update:modelValue"],
2334
+ setup(e, { emit: a }) {
2335
+ const t = e, l = p(() => ({ [t.error ? "aria-errormessage" : "aria-describedby"]: t.hintId }));
2336
+ return (n, o) => (u(), v("select", E({
2337
+ id: n.$attrs.id || e.inputId,
2338
+ class: "bs-select",
2339
+ "data-component": "bs-select",
2340
+ disabled: e.disabled,
2341
+ required: e.required,
2342
+ "data-error": e.error,
2343
+ value: e.value || e.modelValue
2344
+ }, l.value, {
2345
+ onChange: o[0] || (o[0] = (d) => n.$emit("update:modelValue", d.target.value))
2346
+ }), [
2347
+ I(n.$slots, "default")
2348
+ ], 16, Za));
2349
+ }
2350
+ }, Qa = ["selected", "disabled"], _a = ["disabled", "selected", "value"], Gn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
2351
+ __name: "BsSelectField",
2352
+ props: {
2353
+ data: {
2354
+ type: Array,
2355
+ default: () => []
2356
+ },
2357
+ /** Sets the disabled state on input, disabled styles on label. */
2358
+ disabled: {
2359
+ type: Boolean,
2360
+ default: !1
2361
+ },
2362
+ /** Applies error styles to the input. */
2363
+ error: {
2364
+ type: Boolean,
2365
+ default: !1
2366
+ },
2367
+ /** Pass error text. */
2368
+ errorMsg: String,
2369
+ /** Pass helper text. */
2370
+ hint: String,
2371
+ /** @Deprecated Use `hint` and/or `errorMsg`. */
2372
+ hints: [String, Array],
2373
+ /** Pass id for the input element. Will also be applied to label attribute. */
2374
+ inputId: String,
2375
+ /** Pass label text. */
2376
+ label: { type: String },
2377
+ /** Placeholder attribute for `<input>`. */
2378
+ placeholder: String,
2379
+ /** Sets the required state on the input, append required* indicator to label. */
2380
+ required: {
2381
+ type: Boolean,
2382
+ default: !1
2383
+ },
2384
+ /** Sets the select value - do not use if using `v-model`. */
2385
+ value: [String, Number],
2386
+ /** Sets the select value - `v-model` directive will use this; do not set explicitly. */
2387
+ modelValue: [String, Number]
2388
+ },
2389
+ setup(e) {
2390
+ const a = e, t = O(), [l, n] = H(2), { toChild: o, toRoot: d } = Z(a, t), i = p(() => {
2391
+ var b, g;
2392
+ return ((g = (b = a.hints) == null ? void 0 : b.join) == null ? void 0 : g.call(b, `
2393
+ `)) || a.hints;
2394
+ }), s = p(() => a.error && a.errorMsg || a.hint || i.value || void 0), r = p(() => a.inputId || l.value), f = p(() => a.value || a.modelValue);
2395
+ return (b, g) => (u(), v("div", E({ "data-component": "bs-select-field" }, c(d)), [
2396
+ e.label || b.$slots.label ? (u(), A(c(_), {
2397
+ key: 0,
2398
+ for: r.value,
2399
+ disabled: e.disabled,
2400
+ required: e.required
2401
+ }, {
2402
+ default: C(() => [
2403
+ I(b.$slots, "label", {}, () => [
2404
+ W(T(e.label), 1)
2405
+ ])
2406
+ ]),
2407
+ _: 3
2408
+ }, 8, ["for", "disabled", "required"])) : $("", !0),
2409
+ D(c(Ja), E({
2410
+ disabled: e.disabled,
2411
+ error: e.error,
2412
+ "hint-id": c(n),
2413
+ "input-id": r.value,
2414
+ required: e.required,
2415
+ value: f.value,
2416
+ "onUpdate:modelValue": g[0] || (g[0] = (y) => b.$emit("update:modelValue", y))
2417
+ }, c(o)), {
2418
+ default: C(() => [
2419
+ m("option", {
2420
+ selected: !f.value,
2421
+ value: "",
2422
+ disabled: !!f.value
2423
+ }, T(e.placeholder), 9, Qa),
2424
+ (u(!0), v(R, null, Y(e.data, (y) => (u(), v("option", {
2425
+ key: y.value,
2426
+ disabled: y.disabled,
2427
+ selected: f.value === y.value,
2428
+ value: y.value
2429
+ }, T(y.label), 9, _a))), 128))
2430
+ ]),
2431
+ _: 1
2432
+ }, 16, ["disabled", "error", "hint-id", "input-id", "required", "value"]),
2433
+ s.value ? (u(), A(pe, {
2434
+ key: 1,
2435
+ "data-disabled": e.disabled,
2436
+ error: e.error,
2437
+ "error-msg": e.errorMsg,
2438
+ hint: e.hint || i.value,
2439
+ "hint-id": c(n)
2440
+ }, null, 8, ["data-disabled", "error", "error-msg", "hint", "hint-id"])) : $("", !0)
2441
+ ], 16));
2442
+ }
2443
+ }), en = ["data-size"], tn = ["data-disabled", "data-pending", "data-size"], an = ["checked", "disabled", "id"], nn = ["data-inner-on-label", "data-inner-off-label"], Fn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
2444
+ __name: "BsSwitch",
2445
+ props: {
2446
+ checked: {
2447
+ type: Boolean,
2448
+ default: !1
2449
+ },
2450
+ disabled: {
2451
+ type: Boolean,
2452
+ default: !1
2453
+ },
2454
+ hideLabel: {
2455
+ type: Boolean,
2456
+ default: !1
2457
+ },
2458
+ inputId: {
2459
+ type: String,
2460
+ default: ""
2461
+ },
2462
+ innerOnLabel: {
2463
+ type: String
2464
+ },
2465
+ innerOffLabel: {
2466
+ type: String
2467
+ },
2468
+ label: {
2469
+ type: String
2470
+ },
2471
+ passAttrs: {
2472
+ type: String,
2473
+ default: ""
2474
+ },
2475
+ pending: {
2476
+ type: Boolean,
2477
+ default: !1
2478
+ },
2479
+ size: {
2480
+ type: String,
2481
+ validator: (e) => e === "sm"
2482
+ },
2483
+ modelValue: {
2484
+ type: Boolean
2485
+ }
2486
+ },
2487
+ emits: ["update:modelValue"],
2488
+ setup(e, { emit: a }) {
2489
+ const t = e, l = a, n = O(), [o] = H(), { toChild: d, toRoot: i } = Z(t, n), s = p(() => t.inputId || o.value), r = p(() => t.checked || t.modelValue);
2490
+ return (f, b) => (u(), v("div", E({
2491
+ class: "bs-boolean",
2492
+ "data-component": "bs-switch",
2493
+ "data-size": e.size
2494
+ }, c(i)), [
2495
+ e.label || f.$slots.label ? (u(), A(c(_), {
2496
+ key: 0,
2497
+ for: s.value,
2498
+ disabled: e.disabled,
2499
+ hide: e.hideLabel
2500
+ }, {
2501
+ default: C(() => [
2502
+ I(f.$slots, "label", {}, () => [
2503
+ W(T(e.label), 1)
2504
+ ])
2505
+ ]),
2506
+ _: 3
2507
+ }, 8, ["for", "disabled", "hide"])) : $("", !0),
2508
+ m("div", {
2509
+ class: "bs-switch",
2510
+ "data-disabled": e.disabled,
2511
+ "data-pending": e.pending,
2512
+ "data-size": e.size
2513
+ }, [
2514
+ m("input", E({
2515
+ checked: r.value,
2516
+ disabled: e.disabled,
2517
+ id: s.value,
2518
+ type: "checkbox"
2519
+ }, c(d), {
2520
+ onChange: b[0] || (b[0] = (g) => l("update:modelValue", g.target.checked))
2521
+ }), null, 16, an),
2522
+ m("span", {
2523
+ "aria-hidden": "true",
2524
+ "data-inner-on-label": e.innerOnLabel,
2525
+ "data-inner-off-label": e.innerOffLabel
2526
+ }, null, 8, nn)
2527
+ ], 8, tn)
2528
+ ], 16, en));
2529
+ }
2530
+ }), ln = ["aria-controls", "aria-selected", "data-hidden"], Un = {
2531
+ __name: "BsTab",
2532
+ props: {
2533
+ activeTabId: {
2534
+ type: String,
2535
+ required: !0
2536
+ },
2537
+ hidden: {
2538
+ type: Boolean,
2539
+ default: !1
2540
+ },
2541
+ panelId: {
2542
+ type: String
2543
+ }
2544
+ },
2545
+ emits: ["tabClick"],
2546
+ setup(e, { emit: a }) {
2547
+ const t = e, l = O(), n = k(), o = p(() => t.activeTabId === l.id), d = p(() => t.panelId || `${l.id}-panel`);
2548
+ function i(r) {
2549
+ (r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.stopPropagation(), s());
2550
+ }
2551
+ function s() {
2552
+ if (t.activeTabId !== l.id) {
2553
+ const r = new CustomEvent("tabClick", { detail: l.id, bubbles: !0 });
2554
+ n.value.dispatchEvent(r);
2555
+ }
2556
+ }
2557
+ return (r, f) => (u(), v("div", {
2558
+ "aria-controls": d.value,
2559
+ "aria-selected": o.value ? "true" : "false",
2560
+ "data-hidden": e.hidden || void 0,
2561
+ "data-component": "bs-tab",
2562
+ role: "tab",
2563
+ tabindex: "0",
2564
+ ref_key: "hostEl",
2565
+ ref: n,
2566
+ onClick: s,
2567
+ onKeydown: i
2568
+ }, [
2569
+ I(r.$slots, "default")
2570
+ ], 40, ln));
2571
+ }
2572
+ }, on = ["id", "data-resizing"], rn = ["aria-controls", "aria-expanded", "data-active", "data-hidden", "id"], sn = 73, dn = 20, un = 16, Hn = {
2573
+ __name: "BsTabList",
2574
+ props: {
2575
+ activeTabId: { type: String, required: !0 },
2576
+ helperText: { type: String, default: "Select a tab" },
2577
+ helperDescription: { type: String },
2578
+ modelValue: { type: String },
2579
+ withBsTabs: { type: Boolean, default: !0 }
2580
+ },
2581
+ emits: ["tabChange", "update:modelValue"],
2582
+ setup(e, { emit: a }) {
2583
+ const t = e, l = a, n = k(!1), o = k(!1), d = k([]), i = k(!1), s = k(!1), r = k(), f = k([]), b = k(!1), g = k([]), y = k(), L = k(), M = k(), [P, w] = H(2), S = p(() => t.activeTabId ? g.value.findIndex((h) => h.id === t.activeTabId) : 0), q = p(() => d.value.some((h) => h.id === t.activeTabId)), j = p(() => `${w.value}-options`), ee = p(() => `${w.value}-toggle`), J = p(() => {
2584
+ var h;
2585
+ return q.value ? (h = g.value[S.value]) == null ? void 0 : h.textContent : "More";
2586
+ }), ke = p(() => q.value ? f.value[S.value] - f.value[S.value - 1] + dn : sn), Q = p(() => {
2587
+ var B, x;
2588
+ let h = [];
2589
+ if (typeof window > "u")
2590
+ return h;
2591
+ for (let z of g.value) {
2592
+ if (((B = z.dataset) == null ? void 0 : B.hidden) === "true" || ((x = z.dataset) == null ? void 0 : x.hidden) === "" || z.getAttribute("tabindex") === "-1")
2593
+ break;
2594
+ h.push(z);
2595
+ }
2596
+ return s.value && h.push(r.value.querySelector(".bs-tab-list-toggle")), h;
2597
+ });
2598
+ function ue() {
2599
+ var K;
2600
+ let h = !1, B, x = 0, z = !1, G = [];
2601
+ if ((K = g.value) != null && K.length) {
2602
+ for (let F = 0; F < g.value.length; F++) {
2603
+ if (B = g.value[F], B.setAttribute("tabindex", "-1"), z && F !== S.value) {
2604
+ B.dataset.hidden = "true", G.push(B);
2605
+ continue;
2606
+ }
2607
+ if (x = F < g.value.length - 1 ? M.value - ke.value : M.value, f.value[F] > x) {
2608
+ B.dataset.hidden = "true", G.push(B), h = !0, z = !0;
2609
+ continue;
2610
+ }
2611
+ B.dataset.hidden = "false", B.setAttribute("tabindex", "0");
2612
+ }
2613
+ s.value = h, d.value = G, n.value || Ue(() => n.value = !0), setTimeout(() => {
2614
+ Ve(), b.value = !0;
2615
+ }, b.value ? 0 : 1e3);
2616
+ }
2617
+ }
2618
+ function ce(h) {
2619
+ l("tabChange", h), l("update:modelValue", h);
2620
+ }
2621
+ function Ie(h) {
2622
+ var z, G, K;
2623
+ const B = (K = (G = (z = g.value[h]) == null ? void 0 : z.getBoundingClientRect) == null ? void 0 : G.call(z)) == null ? void 0 : K.width;
2624
+ return B || (h === 0 ? f.value[0] : f.value[h] - f.value[h - 1]) || 0;
2625
+ }
2626
+ function Te() {
2627
+ var h;
2628
+ (h = g.value[S.value]) == null || h.setAttribute("aria-selected", "true"), ue();
2629
+ }
2630
+ function xe() {
2631
+ var h;
2632
+ (h = y.value) == null || h.focus(), i.value = !1;
2633
+ }
2634
+ function Ce() {
2635
+ i.value = !i.value, o.value || (o.value = !0);
2636
+ }
2637
+ function Ae(h) {
2638
+ var B;
2639
+ i.value = !1, (B = y.value) == null || B.focus(), ce(h);
2640
+ }
2641
+ function Le(h) {
2642
+ if (t.withBsTabs)
2643
+ return;
2644
+ const B = h.target.closest('[role="tab"]');
2645
+ if (!B || B.getAttribute("aria-selected") === "true")
2646
+ return;
2647
+ const x = B.getAttribute("id");
2648
+ ce(x);
2649
+ }
2650
+ function Pe(h) {
2651
+ if (h.key === "ArrowLeft" || h.key === "ArrowRight") {
2652
+ const B = Q.value.findIndex((x) => x.id === h.target.id);
2653
+ if (B === -1)
2654
+ return;
2655
+ h.preventDefault(), h.stopPropagation(), h.key === "ArrowLeft" ? Ee(B) : De(B);
2656
+ }
2657
+ }
2658
+ function De(h) {
2659
+ var x;
2660
+ const B = (h + 1) % Q.value.length;
2661
+ (x = Q.value[B]) == null || x.focus();
2662
+ }
2663
+ function Ee(h) {
2664
+ var x;
2665
+ const B = h === 0 ? Q.value.length - 1 : h - 1;
2666
+ (x = Q.value[B]) == null || x.focus();
2667
+ }
2668
+ function Ve() {
2669
+ var K, F, ge, be;
2670
+ const h = parseInt(r.value.style.getPropertyValue("--active-line-offset")) || 0, B = M.value;
2671
+ let x = 300, z = ((F = (K = Q.value) == null ? void 0 : K[S.value]) == null ? void 0 : F.offsetLeft) || 0, G = Ie(S.value);
2672
+ s.value && q.value && (z = (ge = y.value) == null ? void 0 : ge.offsetLeft, G = (be = y.value) == null ? void 0 : be.offsetWidth), x = Math.max(Math.abs((z - h) / B * 300), 100), r.value.style.setProperty("--active-line-max-width", `${B}px`), r.value.style.setProperty("--active-line-scale", `${G / B}`), r.value.style.setProperty("--active-line-offset", `${z}px`), r.value.style.setProperty("--active-line-transition-duration", `${x}ms`);
2673
+ }
2674
+ function qe() {
2675
+ var h, B;
2676
+ (B = (h = L.value) == null ? void 0 : h.disconnect) == null || B.call(h), L.value = null;
2677
+ }
2678
+ function ze() {
2679
+ L.value = new ResizeObserver((h) => {
2680
+ for (let B of h)
2681
+ M.value = B.contentBoxSize[0].inlineSize;
2682
+ ue();
2683
+ }), L.value.observe(r.value);
2684
+ }
2685
+ function Me() {
2686
+ g.value = Array.from(r.value.children).filter((h) => h.role === "tab");
2687
+ }
2688
+ function Re() {
2689
+ let h;
2690
+ g.value.forEach((B, x) => {
2691
+ h = B.getBoundingClientRect().width + un, f.value.push(x ? h + f.value[x - 1] : h);
2692
+ });
2693
+ }
2694
+ return V(() => t.activeTabId, Te), N(() => {
2695
+ var h;
2696
+ try {
2697
+ Me(), Re(), ze(), M.value = r.value.getBoundingClientRect().width, ue(), t.withBsTabs || (h = g.value[S.value]) == null || h.setAttribute("aria-selected", "true");
2698
+ } catch (B) {
2699
+ console.log("tab error", B);
2700
+ }
2701
+ }), ne(qe), (h, B) => (u(), v("div", {
2702
+ class: "bs-tab-list",
2703
+ "data-component": "bs-tab-list",
2704
+ id: h.$attrs.id || c(P),
2705
+ ref_key: "hostEl",
2706
+ ref: r,
2707
+ role: "tablist",
2708
+ "data-resizing": !n.value || void 0,
2709
+ onClick: Le,
2710
+ "on:tabClick": B[0] || (B[0] = (x) => ce(x.detail)),
2711
+ onKeydown: Pe
2712
+ }, [
2713
+ I(h.$slots, "default"),
2714
+ m("button", {
2715
+ "aria-controls": c(w),
2716
+ "aria-expanded": i.value,
2717
+ class: "bs-tab-list-toggle",
2718
+ "data-active": q.value || void 0,
2719
+ "data-hidden": !s.value,
2720
+ id: ee.value,
2721
+ ref_key: "dropdownToggle",
2722
+ ref: y,
2723
+ onClick: Ce
2724
+ }, [
2725
+ D(c(et), { size: "sm" }),
2726
+ W(" " + T(J.value), 1)
2727
+ ], 8, rn),
2728
+ D(c(Zt), {
2729
+ "anchor-id": ee.value,
2730
+ "container-id": h.$attrs.id || c(P),
2731
+ "helper-description": e.helperDescription || void 0,
2732
+ "helper-text": e.helperText,
2733
+ id: c(w),
2734
+ "options-id": j.value,
2735
+ position: "right",
2736
+ preloaded: "",
2737
+ shown: i.value,
2738
+ width: "content",
2739
+ onClose: xe,
2740
+ "onUpdate:modelValue": Ae
2741
+ }, {
2742
+ default: C(() => [
2743
+ (u(!0), v(R, null, Y(d.value, (x) => (u(), A(c(Kt), {
2744
+ key: x.id,
2745
+ value: x.id,
2746
+ "options-id": j.value
2747
+ }, {
2748
+ default: C(() => [
2749
+ W(T(x.textContent), 1)
2750
+ ]),
2751
+ _: 2
2752
+ }, 1032, ["value", "options-id"]))), 128))
2753
+ ]),
2754
+ _: 1
2755
+ }, 8, ["anchor-id", "container-id", "helper-description", "helper-text", "id", "options-id", "shown"])
2756
+ ], 40, on));
2757
+ }
2758
+ }, cn = ["aria-labelledby", "data-active", "id"], Kn = {
2759
+ __name: "BsTabPanel",
2760
+ props: {
2761
+ activeTabId: {
2762
+ type: String,
2763
+ required: !0
2764
+ },
2765
+ tabId: {
2766
+ type: String,
2767
+ required: !0
2768
+ }
2769
+ },
2770
+ setup(e) {
2771
+ const a = e, t = O(), l = p(() => a.activeTabId && a.activeTabId === a.tabId), n = p(() => t.id || `${a.tabId}-panel`);
2772
+ return (o, d) => (u(), v("section", {
2773
+ "aria-labelledby": e.tabId,
2774
+ "data-active": l.value,
2775
+ "data-component": "bs-tab-panel",
2776
+ id: n.value,
2777
+ role: "tabpanel"
2778
+ }, [
2779
+ I(o.$slots, "default")
2780
+ ], 8, cn));
2781
+ }
2782
+ }, fn = ["data-error", "id", "rows", "value"], vn = {
2783
+ __name: "BsTextarea",
2784
+ props: {
2785
+ error: {
2786
+ type: Boolean,
2787
+ default: !1
2788
+ },
2789
+ hintId: String,
2790
+ /** @Deprecated - Just set `id` since it will fall-through to the inner textarea element. */
2791
+ inputId: String,
2792
+ value: String,
2793
+ modelValue: String
2794
+ },
2795
+ emits: ["update:modelValue"],
2796
+ setup(e, { emit: a }) {
2797
+ const t = e, l = p(() => ({ [t.error ? "aria-errormessage" : "aria-describedby"]: t.hintId }));
2798
+ return (n, o) => (u(), v("textarea", E({
2799
+ "data-component": "bs-textarea",
2800
+ "data-error": e.error,
2801
+ id: n.$attrs.id || e.inputId,
2802
+ rows: n.$attrs.rows || 6,
2803
+ value: e.value || e.modelValue,
2804
+ onInput: o[0] || (o[0] = (d) => n.$emit("update:modelValue", d.target.value))
2805
+ }, l.value), null, 16, fn));
2806
+ }
2807
+ }, Yn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
2808
+ __name: "BsTextareaField",
2809
+ props: {
2810
+ /** 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. */
2811
+ charMax: Number,
2812
+ /** Sets the disabled state on input, disabled styles on label. */
2813
+ disabled: {
2814
+ type: Boolean,
2815
+ default: !1
2816
+ },
2817
+ /** Applies error styles to the input. */
2818
+ error: {
2819
+ type: Boolean,
2820
+ default: !1
2821
+ },
2822
+ /** Pass error text. */
2823
+ errorMsg: String,
2824
+ /** Pass helper text. */
2825
+ hint: String,
2826
+ /** @Deprecated Use `hint` and/or `errorMsg`. */
2827
+ hints: [String, Array],
2828
+ /** Pass id for the input element. Will also be applied to label attribute. */
2829
+ inputId: String,
2830
+ /** Pass label text. */
2831
+ label: { type: String },
2832
+ /** List additional attributes by name (comma-separated) to pass through to `<textarea>`. */
2833
+ passAttrs: {
2834
+ type: String,
2835
+ default: ""
2836
+ },
2837
+ /** Placeholder attribute for `<textarea>`. */
2838
+ placeholder: String,
2839
+ /** Sets the required state on the textarea, append required* indicator to label. */
2840
+ required: {
2841
+ type: Boolean,
2842
+ default: !1
2843
+ },
2844
+ /** Sets the number of rows for the textarea. Defaults to `6`. */
2845
+ rows: {
2846
+ type: [Number, String],
2847
+ default: 6
2848
+ },
2849
+ /** Sets the textarea value - do not use if using `v-model`. */
2850
+ value: String,
2851
+ /** Sets the textarea value - `v-model` directive will use this; do not set explicitly. */
2852
+ modelValue: String
2853
+ },
2854
+ emits: ["update:modelValue"],
2855
+ setup(e, { emit: a }) {
2856
+ const t = e, l = O(), [n, o] = H(2), { toChild: d, toRoot: i } = Z(t, l), s = p(() => {
2857
+ var g;
2858
+ return ((g = t.value || t.modelValue) == null ? void 0 : g.length) || 0;
2859
+ }), r = p(() => {
2860
+ var g, y;
2861
+ return ((y = (g = t.hints) == null ? void 0 : g.join) == null ? void 0 : y.call(g, `
2862
+ `)) || t.hints;
2863
+ }), f = p(() => t.error && t.errorMsg || t.hint || r.value || void 0), b = p(() => t.inputId || n.value);
2864
+ return (g, y) => (u(), v("div", E({ "data-component": "bs-textarea-field" }, c(i)), [
2865
+ e.label || g.$slots.label ? (u(), A(c(_), {
2866
+ key: 0,
2867
+ for: b.value,
2868
+ disabled: e.disabled,
2869
+ required: e.required
2870
+ }, {
2871
+ default: C(() => [
2872
+ I(g.$slots, "label", {}, () => [
2873
+ W(T(e.label), 1)
2874
+ ])
2875
+ ]),
2876
+ _: 3
2877
+ }, 8, ["for", "disabled", "required"])) : $("", !0),
2878
+ D(c(vn), E({
2879
+ disabled: e.disabled,
2880
+ error: e.error,
2881
+ "hint-id": c(o),
2882
+ id: b.value,
2883
+ placeholder: e.placeholder,
2884
+ required: e.required,
2885
+ rows: e.rows,
2886
+ value: e.value || e.modelValue,
2887
+ "onUpdate:modelValue": y[0] || (y[0] = (L) => g.$emit("update:modelValue", L))
2888
+ }, c(d)), null, 16, ["disabled", "error", "hint-id", "id", "placeholder", "required", "rows", "value"]),
2889
+ f.value || e.charMax ? (u(), A(pe, {
2890
+ key: 1,
2891
+ "char-count": s.value,
2892
+ "char-max": e.charMax,
2893
+ "data-disabled": e.disabled,
2894
+ error: e.error,
2895
+ "error-msg": e.errorMsg,
2896
+ hint: e.hint || r.value,
2897
+ "hint-id": c(o)
2898
+ }, null, 8, ["char-count", "char-max", "data-disabled", "error", "error-msg", "hint", "hint-id"])) : $("", !0)
2899
+ ], 16));
2900
+ }
2901
+ }), hn = ["data-variant", "data-stacked"], Xn = {
2902
+ __name: "BsToast",
2903
+ props: {
2904
+ shown: {
2905
+ type: Boolean,
2906
+ default: !0
2907
+ },
2908
+ preloaded: {
2909
+ type: Boolean,
2910
+ default: !1
2911
+ },
2912
+ toastId: {
2913
+ type: String,
2914
+ required: !0
2915
+ },
2916
+ variant: {
2917
+ type: String,
2918
+ default: void 0,
2919
+ validator: (e) => ["warning", "positive", "negative"].includes(e)
2920
+ },
2921
+ stacked: {
2922
+ type: Boolean,
2923
+ default: !1
2924
+ },
2925
+ duration: {
2926
+ type: Number,
2927
+ default: 1e4
2928
+ },
2929
+ /** @Deprecated - Use 'preloaded' instead. */
2930
+ enterControlled: {
2931
+ type: Boolean,
2932
+ default: !1
2933
+ },
2934
+ /** @Deprecated - Use 'shown' instead. */
2935
+ enterTrigger: {
2936
+ type: Boolean,
2937
+ default: !1
2938
+ },
2939
+ /** @Deprecated - Not used anymore. Handled via 'shown'. */
2940
+ leaveTrigger: {
2941
+ type: Boolean,
2942
+ default: !1
2943
+ }
2944
+ },
2945
+ emits: ["dismiss", "after-enter", "after-leave"],
2946
+ setup(e, { emit: a }) {
2947
+ const t = e, l = a, { transition: n } = se(t);
2948
+ let o = null;
2949
+ ae("variant", t.variant), ae("handleDismiss", i);
2950
+ const d = te("stacked", t.stacked);
2951
+ function i() {
2952
+ o && (clearTimeout(o), o = null), l("dismiss", t.toastId);
2953
+ }
2954
+ function s() {
2955
+ t.duration > 0 && (o = setTimeout(() => {
2956
+ i();
2957
+ }, t.duration)), l("after-enter");
2958
+ }
2959
+ return (r, f) => (u(), A(c(de), {
2960
+ shown: c(n),
2961
+ preloaded: e.preloaded,
2962
+ duration: 200,
2963
+ "enter-attribute": "data-shown",
2964
+ onAfterEnter: s,
2965
+ onAfterLeave: f[0] || (f[0] = (b) => l("after-leave"))
2966
+ }, {
2967
+ default: C(() => [
2968
+ m("div", {
2969
+ class: "bs-toast",
2970
+ "data-variant": e.variant,
2971
+ "data-stacked": c(d) || void 0,
2972
+ "aria-role": "alert"
2973
+ }, [
2974
+ I(r.$slots, "default")
2975
+ ], 8, hn)
2976
+ ]),
2977
+ _: 3
2978
+ }, 8, ["shown", "preloaded"]));
2979
+ }
2980
+ }, pn = ["data-stacked"], Zn = {
2981
+ __name: "BsToastActions",
2982
+ setup(e) {
2983
+ const a = k(!1);
2984
+ N(() => {
2985
+ var n;
2986
+ const l = He();
2987
+ ((n = l.default) == null ? void 0 : n.call(l).length) > 2 && (a.value = !0);
2988
+ });
2989
+ const t = te("handleDismiss");
2990
+ return (l, n) => (u(), v("div", {
2991
+ class: "bs-toast-actions",
2992
+ "data-stacked": a.value || void 0
2993
+ }, [
2994
+ I(l.$slots, "default", {}, () => [
2995
+ D(wt, {
2996
+ size: "sm",
2997
+ "text-btn": "",
2998
+ onClick: c(t)
2999
+ }, {
3000
+ default: C(() => [
3001
+ W(" Dismiss ")
3002
+ ]),
3003
+ _: 1
3004
+ }, 8, ["onClick"])
3005
+ ])
3006
+ ], 8, pn));
3007
+ }
3008
+ }, gn = (e, a) => {
3009
+ const t = e.__vccOpts || e;
3010
+ for (const [l, n] of a)
3011
+ t[l] = n;
3012
+ return t;
3013
+ }, bn = {}, mn = { class: "bs-toast-body" };
3014
+ function yn(e, a) {
3015
+ return u(), v("div", mn, [
3016
+ I(e.$slots, "default")
3017
+ ]);
3018
+ }
3019
+ const Jn = /* @__PURE__ */ gn(bn, [["render", yn]]), Bn = ["data-variant"], Qn = {
3020
+ __name: "BsToastHeader",
3021
+ setup(e) {
3022
+ const a = te("variant"), t = p(() => {
3023
+ switch (a) {
3024
+ case "warning":
3025
+ return ve;
3026
+ case "positive":
3027
+ return at;
3028
+ case "negative":
3029
+ return ve;
3030
+ default:
3031
+ return tt;
3032
+ }
3033
+ });
3034
+ return (l, n) => (u(), v("div", {
3035
+ class: "bs-toast-header",
3036
+ "data-variant": c(a)
3037
+ }, [
3038
+ (u(), A(U(t.value), { class: "bs-toast-header-icon" })),
3039
+ m("h5", null, [
3040
+ I(l.$slots, "default")
3041
+ ])
3042
+ ], 8, Bn));
3043
+ }
3044
+ }, $n = { class: "bs-toaster" }, _n = {
3045
+ __name: "BsToaster",
3046
+ setup(e) {
3047
+ return ae("stacked", !0), (a, t) => (u(), v("div", $n, [
3048
+ I(a.$slots, "default")
3049
+ ]));
3050
+ }
3051
+ }, Sn = ["data-position"], wn = ["id"], el = {
3052
+ __name: "BsTooltip",
3053
+ props: {
3054
+ tooltipId: {
3055
+ type: String,
3056
+ required: !0
3057
+ },
3058
+ content: {
3059
+ type: String,
3060
+ required: !0
3061
+ },
3062
+ position: {
3063
+ type: String,
3064
+ default: "top",
3065
+ validator: (e) => [
3066
+ "top",
3067
+ "top-left",
3068
+ "top-right",
3069
+ "right",
3070
+ "bottom",
3071
+ "bottom-left",
3072
+ "bottom-right",
3073
+ "left"
3074
+ ].includes(e)
3075
+ }
3076
+ },
3077
+ setup(e) {
3078
+ const a = e, t = k(!1), l = k(!1), n = p(() => {
3079
+ let i = "bs-tooltip-text";
3080
+ 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;
3081
+ });
3082
+ re(["Escape"], () => {
3083
+ t.value && (t.value = !1, l.value = !0);
3084
+ });
3085
+ function o() {
3086
+ t.value = !0;
3087
+ }
3088
+ function d() {
3089
+ t.value = !1, l.value = !1;
3090
+ }
3091
+ return (i, s) => (u(), v("div", {
3092
+ class: "bs-tooltip",
3093
+ "data-position": e.position || void 0,
3094
+ "data-component": "bs-tooltip",
3095
+ onMouseenter: o,
3096
+ onFocusin: o,
3097
+ onMouseleave: d,
3098
+ onFocusout: d
3099
+ }, [
3100
+ I(i.$slots, "default"),
3101
+ e.content ? (u(), v("div", {
3102
+ key: 0,
3103
+ class: X(n.value),
3104
+ id: e.tooltipId,
3105
+ role: "tooltip"
3106
+ }, T(e.content), 11, wn)) : $("", !0)
3107
+ ], 40, Sn));
3108
+ }
3109
+ };
3110
+ export {
3111
+ Cn as BsAccordion,
3112
+ An as BsBadge,
3113
+ Ln as BsBanner,
3114
+ wt as BsButton,
3115
+ Pn as BsChartBar,
3116
+ Dn as BsCheckbox,
3117
+ En as BsCircleButton,
3118
+ Ut as BsDropdown,
3119
+ Kt as BsDropdownOption,
3120
+ Xt as BsDropdownOptionList,
3121
+ Zt as BsDropdownWithOptions,
3122
+ pe as BsFieldDetails,
3123
+ Vn as BsIconGradientWrapper,
3124
+ we as BsInput,
3125
+ oa as BsInputAddon,
3126
+ qn as BsInputField,
3127
+ zn as BsInputSearch,
3128
+ _ as BsLabel,
3129
+ Mn as BsLoader,
3130
+ Rn as BsModal,
3131
+ ba as BsOverlay,
3132
+ On as BsPagination,
3133
+ Nn as BsPill,
3134
+ Wn as BsProfile,
3135
+ Fa as BsProfileDetails,
3136
+ Ka as BsProfileImg,
3137
+ jn as BsRadio,
3138
+ Ja as BsSelect,
3139
+ Gn as BsSelectField,
3140
+ Fn as BsSwitch,
3141
+ Un as BsTab,
3142
+ Hn as BsTabList,
3143
+ Kn as BsTabPanel,
3144
+ vn as BsTextarea,
3145
+ Yn as BsTextareaField,
3146
+ Xn as BsToast,
3147
+ Zn as BsToastActions,
3148
+ Jn as BsToastBody,
3149
+ Qn as BsToastHeader,
3150
+ _n as BsToaster,
3151
+ el as BsTooltip,
3152
+ de as BsTransition
3153
+ };