@bsasolutions/pkg_core 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -1,47 +1,53 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ChevronRight as
|
|
1
|
+
import { defineComponent as p, computed as f, openBlock as n, createBlock as B, resolveDynamicComponent as ie, normalizeStyle as T, createElementBlock as o, normalizeClass as b, createCommentVNode as i, renderSlot as y, createTextVNode as A, toDisplayString as m, createVNode as I, createElementVNode as c, Fragment as V, renderList as N, ref as M, TransitionGroup as re, withCtx as O, unref as D, inject as ue, onBeforeUnmount as ce, withKeys as U, useSlots as Q, onMounted as ee, onUnmounted as te, resolveComponent as de, watch as W, Teleport as be, Transition as me, withModifiers as fe, provide as he } from "vue";
|
|
2
|
+
import { ChartColumn as ge, ShieldCheck as ye, UserCog as ve, Users as $e, MessageSquare as pe, ChevronDown as ke, ChevronRight as Be, ChevronLeft as we, Moon as Ce, Sun as Se, TriangleAlert as _e, Info as De, CircleAlert as ze, KeySquare as Ie, EyeOff as xe, Eye as Te, RotateCw as Ve, RefreshCcw as Ne, LogOut as Me, LogIn as Ae, Mail as qe, CheckCircle as Re, XCircle as Fe, MinusCircle as Le, PlusCircle as Oe, Trash2 as Pe, Edit2 as Ue, Save as Ee, Heart as Ze, Star as He, Download as Xe, Upload as We, ArrowRight as je, ArrowLeft as Ke, Minus as Ye, Plus as Ge, Trash as Je, Edit as Qe, Check as et, Menu as tt, Bell as at, Search as st, Settings as nt, User as lt, Home as ot, X as it } from "@lucide/vue";
|
|
3
3
|
const X = {
|
|
4
|
-
X:
|
|
5
|
-
Home:
|
|
6
|
-
User:
|
|
7
|
-
Settings:
|
|
8
|
-
Search:
|
|
9
|
-
Bell:
|
|
10
|
-
Menu:
|
|
11
|
-
Check:
|
|
12
|
-
Edit:
|
|
13
|
-
Trash:
|
|
14
|
-
Plus:
|
|
15
|
-
Minus:
|
|
16
|
-
ArrowLeft:
|
|
17
|
-
ArrowRight:
|
|
18
|
-
Upload:
|
|
19
|
-
Download:
|
|
20
|
-
Star:
|
|
21
|
-
Heart:
|
|
22
|
-
Save:
|
|
23
|
-
Edit2:
|
|
24
|
-
Trash2:
|
|
25
|
-
PlusCircle:
|
|
26
|
-
MinusCircle:
|
|
27
|
-
XCircle:
|
|
28
|
-
CheckCircle:
|
|
29
|
-
Mail:
|
|
30
|
-
LogIn:
|
|
31
|
-
LogOut:
|
|
32
|
-
RefreshCcw:
|
|
33
|
-
RotateCw:
|
|
34
|
-
Eye:
|
|
35
|
-
EyeOff:
|
|
36
|
-
KeySquare:
|
|
37
|
-
CircleAlert:
|
|
38
|
-
Info:
|
|
39
|
-
TriangleAlert:
|
|
40
|
-
Sun:
|
|
41
|
-
Moon:
|
|
42
|
-
ChevronLeft:
|
|
43
|
-
ChevronRight:
|
|
44
|
-
|
|
4
|
+
X: it,
|
|
5
|
+
Home: ot,
|
|
6
|
+
User: lt,
|
|
7
|
+
Settings: nt,
|
|
8
|
+
Search: st,
|
|
9
|
+
Bell: at,
|
|
10
|
+
Menu: tt,
|
|
11
|
+
Check: et,
|
|
12
|
+
Edit: Qe,
|
|
13
|
+
Trash: Je,
|
|
14
|
+
Plus: Ge,
|
|
15
|
+
Minus: Ye,
|
|
16
|
+
ArrowLeft: Ke,
|
|
17
|
+
ArrowRight: je,
|
|
18
|
+
Upload: We,
|
|
19
|
+
Download: Xe,
|
|
20
|
+
Star: He,
|
|
21
|
+
Heart: Ze,
|
|
22
|
+
Save: Ee,
|
|
23
|
+
Edit2: Ue,
|
|
24
|
+
Trash2: Pe,
|
|
25
|
+
PlusCircle: Oe,
|
|
26
|
+
MinusCircle: Le,
|
|
27
|
+
XCircle: Fe,
|
|
28
|
+
CheckCircle: Re,
|
|
29
|
+
Mail: qe,
|
|
30
|
+
LogIn: Ae,
|
|
31
|
+
LogOut: Me,
|
|
32
|
+
RefreshCcw: Ne,
|
|
33
|
+
RotateCw: Ve,
|
|
34
|
+
Eye: Te,
|
|
35
|
+
EyeOff: xe,
|
|
36
|
+
KeySquare: Ie,
|
|
37
|
+
CircleAlert: ze,
|
|
38
|
+
Info: De,
|
|
39
|
+
TriangleAlert: _e,
|
|
40
|
+
Sun: Se,
|
|
41
|
+
Moon: Ce,
|
|
42
|
+
ChevronLeft: we,
|
|
43
|
+
ChevronRight: Be,
|
|
44
|
+
ChevronDown: ke,
|
|
45
|
+
MessageSquare: pe,
|
|
46
|
+
Users: $e,
|
|
47
|
+
UserCog: ve,
|
|
48
|
+
ShieldCheck: ye,
|
|
49
|
+
BarChart: ge
|
|
50
|
+
}, Ws = Object.keys(X), S = /* @__PURE__ */ p({
|
|
45
51
|
__name: "BsaIcons",
|
|
46
52
|
props: {
|
|
47
53
|
icon: {},
|
|
@@ -60,11 +66,11 @@ const X = {
|
|
|
60
66
|
height: a.size,
|
|
61
67
|
color: a.color
|
|
62
68
|
}));
|
|
63
|
-
return (r, u) => (n(),
|
|
69
|
+
return (r, u) => (n(), B(ie(s.value), {
|
|
64
70
|
style: T(l.value)
|
|
65
71
|
}, null, 8, ["style"]));
|
|
66
72
|
}
|
|
67
|
-
}),
|
|
73
|
+
}), rt = ["type", "disabled"], ut = { key: 2 }, E = /* @__PURE__ */ p({
|
|
68
74
|
__name: "BsaButton",
|
|
69
75
|
props: {
|
|
70
76
|
type: { default: "button" },
|
|
@@ -109,28 +115,28 @@ const X = {
|
|
|
109
115
|
class: b(l.value),
|
|
110
116
|
onClick: r
|
|
111
117
|
}, [
|
|
112
|
-
e.loading ? (n(),
|
|
118
|
+
e.loading ? (n(), B(S, {
|
|
113
119
|
key: 0,
|
|
114
120
|
icon: "Spinner",
|
|
115
121
|
class: "bsa-button__icon bsa-button__icon--loading"
|
|
116
|
-
})) : e.icon && e.iconPosition === "left" ? (n(),
|
|
122
|
+
})) : e.icon && e.iconPosition === "left" ? (n(), B(S, {
|
|
117
123
|
key: 1,
|
|
118
124
|
icon: e.icon,
|
|
119
125
|
class: "bsa-button__icon"
|
|
120
126
|
}, null, 8, ["icon"])) : i("", !0),
|
|
121
|
-
u.$slots.default || e.label ? (n(), o("span",
|
|
127
|
+
u.$slots.default || e.label ? (n(), o("span", ut, [
|
|
122
128
|
y(u.$slots, "default", {}, () => [
|
|
123
129
|
A(m(e.label), 1)
|
|
124
130
|
])
|
|
125
131
|
])) : i("", !0),
|
|
126
|
-
e.icon && e.iconPosition === "right" && !e.loading ? (n(),
|
|
132
|
+
e.icon && e.iconPosition === "right" && !e.loading ? (n(), B(S, {
|
|
127
133
|
key: 3,
|
|
128
134
|
icon: e.icon,
|
|
129
135
|
class: "bsa-button__icon"
|
|
130
136
|
}, null, 8, ["icon"])) : i("", !0)
|
|
131
|
-
], 10,
|
|
137
|
+
], 10, rt));
|
|
132
138
|
}
|
|
133
|
-
}),
|
|
139
|
+
}), ct = ["aria-label"], dt = /* @__PURE__ */ p({
|
|
134
140
|
__name: "BsaButtonBadge",
|
|
135
141
|
props: {
|
|
136
142
|
icon: { default: "Bell" },
|
|
@@ -151,11 +157,11 @@ const X = {
|
|
|
151
157
|
`bsa-button-badge__dot--${t.size}`,
|
|
152
158
|
{ "bsa-button-badge__dot--ping": t.ping }
|
|
153
159
|
]);
|
|
154
|
-
return (
|
|
160
|
+
return ($, w) => (n(), o("button", {
|
|
155
161
|
type: "button",
|
|
156
162
|
"aria-label": e.count > 0 ? `${e.count} notificações` : "Notificações",
|
|
157
163
|
class: b(l.value),
|
|
158
|
-
onClick: w[0] || (w[0] = (
|
|
164
|
+
onClick: w[0] || (w[0] = (C) => s("click", C))
|
|
159
165
|
}, [
|
|
160
166
|
I(S, {
|
|
161
167
|
icon: e.icon,
|
|
@@ -169,14 +175,14 @@ const X = {
|
|
|
169
175
|
key: 1,
|
|
170
176
|
class: b(d.value)
|
|
171
177
|
}, null, 2)) : i("", !0)
|
|
172
|
-
], 10,
|
|
178
|
+
], 10, ct));
|
|
173
179
|
}
|
|
174
|
-
}),
|
|
180
|
+
}), q = (e, a) => {
|
|
175
181
|
const t = e.__vccOpts || e;
|
|
176
182
|
for (const [s, l] of a)
|
|
177
183
|
t[s] = l;
|
|
178
184
|
return t;
|
|
179
|
-
},
|
|
185
|
+
}, js = /* @__PURE__ */ q(dt, [["__scopeId", "data-v-89d3c32f"]]), bt = ["type", "disabled", "title"], j = /* @__PURE__ */ p({
|
|
180
186
|
__name: "BsaButtonIcon",
|
|
181
187
|
props: {
|
|
182
188
|
icon: {},
|
|
@@ -217,17 +223,17 @@ const X = {
|
|
|
217
223
|
title: e.tooltip,
|
|
218
224
|
onClick: r
|
|
219
225
|
}, [
|
|
220
|
-
e.loading ? (n(),
|
|
226
|
+
e.loading ? (n(), B(S, {
|
|
221
227
|
key: 0,
|
|
222
228
|
icon: "Spinner",
|
|
223
229
|
class: "bsa-button-icon__loading"
|
|
224
|
-
})) : (n(),
|
|
230
|
+
})) : (n(), B(S, {
|
|
225
231
|
key: 1,
|
|
226
232
|
icon: e.icon
|
|
227
233
|
}, null, 8, ["icon"]))
|
|
228
|
-
], 10,
|
|
234
|
+
], 10, bt));
|
|
229
235
|
}
|
|
230
|
-
}),
|
|
236
|
+
}), Ks = /* @__PURE__ */ p({
|
|
231
237
|
__name: "BsaButtonPanel",
|
|
232
238
|
props: {
|
|
233
239
|
align: { default: "left" },
|
|
@@ -249,10 +255,21 @@ const X = {
|
|
|
249
255
|
y(s.$slots, "default")
|
|
250
256
|
], 2));
|
|
251
257
|
}
|
|
252
|
-
}),
|
|
258
|
+
}), mt = /* @__PURE__ */ p({
|
|
259
|
+
__name: "BsaBadge",
|
|
260
|
+
props: {
|
|
261
|
+
label: {},
|
|
262
|
+
tone: { default: "neutral" }
|
|
263
|
+
},
|
|
264
|
+
setup(e) {
|
|
265
|
+
return (a, t) => (n(), o("span", {
|
|
266
|
+
class: b(["bsa-badge", `bsa-badge--${e.tone}`])
|
|
267
|
+
}, m(e.label), 3));
|
|
268
|
+
}
|
|
269
|
+
}), K = /* @__PURE__ */ q(mt, [["__scopeId", "data-v-3ff150a4"]]), ft = { class: "bsa-loading__content" }, ht = {
|
|
253
270
|
key: 7,
|
|
254
271
|
class: "bsa-loading__message"
|
|
255
|
-
},
|
|
272
|
+
}, gt = { key: 0 }, yt = /* @__PURE__ */ p({
|
|
256
273
|
__name: "BsaLoading",
|
|
257
274
|
props: {
|
|
258
275
|
isLoading: { type: Boolean },
|
|
@@ -278,7 +295,7 @@ const X = {
|
|
|
278
295
|
key: 0,
|
|
279
296
|
class: b(l.value)
|
|
280
297
|
}, [
|
|
281
|
-
c("div",
|
|
298
|
+
c("div", ft, [
|
|
282
299
|
e.type === "spinner" ? (n(), o("div", {
|
|
283
300
|
key: 0,
|
|
284
301
|
class: b(["bsa-loading__spinner", s.value])
|
|
@@ -348,14 +365,14 @@ const X = {
|
|
|
348
365
|
style: T({ animationDelay: `${d * 0.1}s` })
|
|
349
366
|
}, null, 4)), 64))
|
|
350
367
|
], 2)) : i("", !0),
|
|
351
|
-
e.message ? (n(), o("div",
|
|
368
|
+
e.message ? (n(), o("div", ht, [
|
|
352
369
|
c("p", null, m(e.message), 1),
|
|
353
|
-
e.submessage ? (n(), o("p",
|
|
370
|
+
e.submessage ? (n(), o("p", gt, m(e.submessage), 1)) : i("", !0)
|
|
354
371
|
])) : i("", !0)
|
|
355
372
|
])
|
|
356
373
|
], 2)) : i("", !0);
|
|
357
374
|
}
|
|
358
|
-
}),
|
|
375
|
+
}), Ys = /* @__PURE__ */ q(yt, [["__scopeId", "data-v-09020727"]]), vt = { class: "bsa-toast__content" }, $t = { key: 0 }, pt = /* @__PURE__ */ p({
|
|
359
376
|
__name: "BsaToast",
|
|
360
377
|
props: {
|
|
361
378
|
toast: {}
|
|
@@ -383,8 +400,8 @@ const X = {
|
|
|
383
400
|
icon: r.value,
|
|
384
401
|
size: "xs"
|
|
385
402
|
}, null, 8, ["icon"]),
|
|
386
|
-
c("div",
|
|
387
|
-
e.toast.title ? (n(), o("strong",
|
|
403
|
+
c("div", vt, [
|
|
404
|
+
e.toast.title ? (n(), o("strong", $t, m(e.toast.title), 1)) : i("", !0),
|
|
388
405
|
c("span", null, m(e.toast.message), 1)
|
|
389
406
|
]),
|
|
390
407
|
I(j, {
|
|
@@ -392,7 +409,7 @@ const X = {
|
|
|
392
409
|
size: "sm",
|
|
393
410
|
class: "bsa-toast__close",
|
|
394
411
|
"aria-label": "Fechar",
|
|
395
|
-
onClick: d[0] || (d[0] = (
|
|
412
|
+
onClick: d[0] || (d[0] = ($) => s("close"))
|
|
396
413
|
}),
|
|
397
414
|
e.toast.duration ? (n(), o("div", {
|
|
398
415
|
key: 0,
|
|
@@ -402,11 +419,11 @@ const X = {
|
|
|
402
419
|
], 2));
|
|
403
420
|
}
|
|
404
421
|
}), Z = M([]);
|
|
405
|
-
let
|
|
406
|
-
const
|
|
422
|
+
let kt = 1;
|
|
423
|
+
const ae = (e) => {
|
|
407
424
|
Z.value = Z.value.filter((a) => a.id !== e);
|
|
408
425
|
}, L = (e, a = "info", t = {}) => {
|
|
409
|
-
const s =
|
|
426
|
+
const s = kt++, l = {
|
|
410
427
|
id: s,
|
|
411
428
|
type: a,
|
|
412
429
|
title: t.title,
|
|
@@ -414,24 +431,24 @@ const te = (e) => {
|
|
|
414
431
|
duration: t.duration ?? 5e3
|
|
415
432
|
};
|
|
416
433
|
return Z.value.push(l), l.duration > 0 && window.setTimeout(() => {
|
|
417
|
-
|
|
434
|
+
ae(s);
|
|
418
435
|
}, l.duration), s;
|
|
419
|
-
},
|
|
436
|
+
}, Bt = () => ({
|
|
420
437
|
toasts: Z,
|
|
421
438
|
show: L,
|
|
422
|
-
remove:
|
|
439
|
+
remove: ae,
|
|
423
440
|
success: (e, a = {}) => L(e, "success", a),
|
|
424
441
|
error: (e, a = {}) => L(e, "error", a),
|
|
425
442
|
warning: (e, a = {}) => L(e, "warning", a),
|
|
426
443
|
info: (e, a = {}) => L(e, "info", a)
|
|
427
|
-
}),
|
|
444
|
+
}), wt = { class: "bsa-toast-container" }, Gs = /* @__PURE__ */ p({
|
|
428
445
|
__name: "BsaToastContainer",
|
|
429
446
|
setup(e) {
|
|
430
|
-
const { toasts: a, remove: t } =
|
|
431
|
-
return (s, l) => (n(), o("div",
|
|
432
|
-
I(
|
|
447
|
+
const { toasts: a, remove: t } = Bt();
|
|
448
|
+
return (s, l) => (n(), o("div", wt, [
|
|
449
|
+
I(re, { name: "bsa-toast" }, {
|
|
433
450
|
default: O(() => [
|
|
434
|
-
(n(!0), o(V, null, N(D(a), (r) => (n(),
|
|
451
|
+
(n(!0), o(V, null, N(D(a), (r) => (n(), B(pt, {
|
|
435
452
|
key: r.id,
|
|
436
453
|
toast: r,
|
|
437
454
|
onClose: (u) => D(t)(r.id)
|
|
@@ -441,10 +458,10 @@ const te = (e) => {
|
|
|
441
458
|
})
|
|
442
459
|
]));
|
|
443
460
|
}
|
|
444
|
-
}),
|
|
461
|
+
}), Ct = ["src", "alt"], St = {
|
|
445
462
|
key: 2,
|
|
446
463
|
class: "bsa-logo__content"
|
|
447
|
-
},
|
|
464
|
+
}, _t = /* @__PURE__ */ p({
|
|
448
465
|
__name: "BsaLogo",
|
|
449
466
|
props: {
|
|
450
467
|
src: {},
|
|
@@ -484,12 +501,12 @@ const te = (e) => {
|
|
|
484
501
|
src: e.src,
|
|
485
502
|
alt: e.alt,
|
|
486
503
|
class: b(["bsa-logo__image", a[e.size].image])
|
|
487
|
-
}, null, 10,
|
|
504
|
+
}, null, 10, Ct)) : e.icon ? (n(), B(D(S), {
|
|
488
505
|
key: 1,
|
|
489
506
|
icon: e.icon,
|
|
490
507
|
class: b(["bsa-logo__icon", a[e.size].icon])
|
|
491
508
|
}, null, 8, ["icon", "class"])) : i("", !0),
|
|
492
|
-
e.title || e.subtitle ? (n(), o("div",
|
|
509
|
+
e.title || e.subtitle ? (n(), o("div", St, [
|
|
493
510
|
e.title ? (n(), o("div", {
|
|
494
511
|
key: 0,
|
|
495
512
|
class: b(["bsa-logo__title", a[e.size].title])
|
|
@@ -501,17 +518,17 @@ const te = (e) => {
|
|
|
501
518
|
])) : i("", !0)
|
|
502
519
|
], 2));
|
|
503
520
|
}
|
|
504
|
-
}),
|
|
505
|
-
function
|
|
506
|
-
const e =
|
|
521
|
+
}), Js = /* @__PURE__ */ q(_t, [["__scopeId", "data-v-e8e7bb76"]]), se = /* @__PURE__ */ Symbol("bsa-theme");
|
|
522
|
+
function Dt() {
|
|
523
|
+
const e = ue(se);
|
|
507
524
|
if (!e)
|
|
508
525
|
throw new Error("useTheme must be used within a BsaThemeProvider");
|
|
509
526
|
return e;
|
|
510
527
|
}
|
|
511
|
-
const
|
|
528
|
+
const zt = ["aria-label", "title"], It = /* @__PURE__ */ p({
|
|
512
529
|
__name: "BsaThemeToggle",
|
|
513
530
|
setup(e) {
|
|
514
|
-
const { isDarkMode: a, toggleTheme: t } =
|
|
531
|
+
const { isDarkMode: a, toggleTheme: t } = Dt();
|
|
515
532
|
return (s, l) => (n(), o("button", {
|
|
516
533
|
type: "button",
|
|
517
534
|
class: "bsa-theme-toggle",
|
|
@@ -524,12 +541,12 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
524
541
|
icon: D(a) ? "Sun" : "Moon",
|
|
525
542
|
size: "w-5 h-5"
|
|
526
543
|
}, null, 8, ["icon"])
|
|
527
|
-
], 8,
|
|
544
|
+
], 8, zt));
|
|
528
545
|
}
|
|
529
|
-
}),
|
|
546
|
+
}), Qs = /* @__PURE__ */ q(It, [["__scopeId", "data-v-d4c9dd72"]]), xt = ["id", "checked", "disabled", "required"], Tt = {
|
|
530
547
|
key: 0,
|
|
531
548
|
class: "bsa-checkbox__label"
|
|
532
|
-
},
|
|
549
|
+
}, en = /* @__PURE__ */ p({
|
|
533
550
|
__name: "BsaCheckbox",
|
|
534
551
|
props: {
|
|
535
552
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -560,20 +577,20 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
560
577
|
disabled: e.disabled || e.readonly,
|
|
561
578
|
required: e.required,
|
|
562
579
|
onChange: s
|
|
563
|
-
}, null, 40,
|
|
564
|
-
e.label ? (n(), o("span",
|
|
580
|
+
}, null, 40, xt),
|
|
581
|
+
e.label ? (n(), o("span", Tt, m(e.label), 1)) : i("", !0)
|
|
565
582
|
], 2));
|
|
566
583
|
}
|
|
567
|
-
}),
|
|
584
|
+
}), Vt = ["for"], Nt = {
|
|
568
585
|
key: 0,
|
|
569
586
|
class: "bsa-input-required"
|
|
570
|
-
},
|
|
587
|
+
}, Mt = { class: "bsa-input-field bsa-input-field--has-right-content" }, At = ["id", "type", "value", "placeholder", "disabled", "readonly", "required", "min", "max"], qt = { class: "bsa-input-date-icon" }, Rt = {
|
|
571
588
|
key: 1,
|
|
572
589
|
class: "bsa-input-hint"
|
|
573
|
-
},
|
|
590
|
+
}, Ft = {
|
|
574
591
|
key: 2,
|
|
575
592
|
class: "bsa-input-error"
|
|
576
|
-
},
|
|
593
|
+
}, tn = /* @__PURE__ */ p({
|
|
577
594
|
__name: "BsaInputDate",
|
|
578
595
|
props: {
|
|
579
596
|
modelValue: {},
|
|
@@ -593,7 +610,7 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
593
610
|
},
|
|
594
611
|
emits: ["update:modelValue", "change", "blur", "focus"],
|
|
595
612
|
setup(e, { emit: a }) {
|
|
596
|
-
const t = e, s = a, l = f(() => t.id || `date-${Math.random().toString(36).substring(2, 11)}`), r = f(() => t.modelValue ? t.modelValue instanceof Date ?
|
|
613
|
+
const t = e, s = a, l = f(() => t.id || `date-${Math.random().toString(36).substring(2, 11)}`), r = f(() => t.modelValue ? t.modelValue instanceof Date ? $(t.modelValue) : t.modelValue : ""), u = f(() => [
|
|
597
614
|
"bsa-input",
|
|
598
615
|
`bsa-input--${t.size}`,
|
|
599
616
|
{
|
|
@@ -601,62 +618,62 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
601
618
|
"bsa-input--readonly": t.readonly,
|
|
602
619
|
"bsa-input--disabled": t.disabled
|
|
603
620
|
}
|
|
604
|
-
]), d = f(() => t.modelValue instanceof Date),
|
|
605
|
-
const
|
|
621
|
+
]), d = f(() => t.modelValue instanceof Date), $ = (g) => {
|
|
622
|
+
const v = g.getFullYear(), _ = String(g.getMonth() + 1).padStart(2, "0"), x = String(g.getDate()).padStart(2, "0");
|
|
606
623
|
switch (t.mode) {
|
|
607
624
|
case "date":
|
|
608
|
-
return `${
|
|
625
|
+
return `${v}-${_}-${x}`;
|
|
609
626
|
case "datetime-local": {
|
|
610
|
-
const F = String(
|
|
611
|
-
return `${
|
|
627
|
+
const F = String(g.getHours()).padStart(2, "0"), R = String(g.getMinutes()).padStart(2, "0");
|
|
628
|
+
return `${v}-${_}-${x}T${F}:${R}`;
|
|
612
629
|
}
|
|
613
630
|
case "time":
|
|
614
|
-
return `${String(
|
|
631
|
+
return `${String(g.getHours()).padStart(2, "0")}:${String(g.getMinutes()).padStart(2, "0")}`;
|
|
615
632
|
case "month":
|
|
616
|
-
return `${
|
|
633
|
+
return `${v}-${_}`;
|
|
617
634
|
case "week":
|
|
618
|
-
return `${
|
|
635
|
+
return `${v}-W${String(w(g)).padStart(2, "0")}`;
|
|
619
636
|
default:
|
|
620
637
|
return "";
|
|
621
638
|
}
|
|
622
|
-
}, w = (
|
|
623
|
-
const
|
|
624
|
-
|
|
625
|
-
const x = new Date(Date.UTC(
|
|
626
|
-
return Math.ceil(((
|
|
627
|
-
},
|
|
639
|
+
}, w = (g) => {
|
|
640
|
+
const v = new Date(Date.UTC(g.getFullYear(), g.getMonth(), g.getDate())), _ = v.getUTCDay() || 7;
|
|
641
|
+
v.setUTCDate(v.getUTCDate() + 4 - _);
|
|
642
|
+
const x = new Date(Date.UTC(v.getUTCFullYear(), 0, 1));
|
|
643
|
+
return Math.ceil(((v.getTime() - x.getTime()) / 864e5 + 1) / 7);
|
|
644
|
+
}, C = (g) => {
|
|
628
645
|
switch (t.mode) {
|
|
629
646
|
case "date": {
|
|
630
|
-
const [
|
|
631
|
-
return new Date(
|
|
647
|
+
const [v, _, x] = g.split("-").map(Number);
|
|
648
|
+
return new Date(v, _ - 1, x);
|
|
632
649
|
}
|
|
633
650
|
case "datetime-local": {
|
|
634
|
-
const [
|
|
635
|
-
return new Date(x, F - 1,
|
|
651
|
+
const [v, _] = g.split("T"), [x, F, R] = v.split("-").map(Number), [H, oe] = _.split(":").map(Number);
|
|
652
|
+
return new Date(x, F - 1, R, H, oe);
|
|
636
653
|
}
|
|
637
654
|
case "time": {
|
|
638
|
-
const [
|
|
639
|
-
return x.setHours(
|
|
655
|
+
const [v, _] = g.split(":").map(Number), x = t.modelValue instanceof Date ? new Date(t.modelValue) : /* @__PURE__ */ new Date();
|
|
656
|
+
return x.setHours(v, _, 0, 0), x;
|
|
640
657
|
}
|
|
641
658
|
case "month": {
|
|
642
|
-
const [
|
|
643
|
-
return new Date(
|
|
659
|
+
const [v, _] = g.split("-").map(Number);
|
|
660
|
+
return new Date(v, _ - 1, 1);
|
|
644
661
|
}
|
|
645
662
|
case "week": {
|
|
646
|
-
const [
|
|
647
|
-
return
|
|
663
|
+
const [v, _] = g.split("-W"), x = Number(v), F = Number(_), R = new Date(x, 0, 1 + (F - 1) * 7), H = R.getDay() || 7;
|
|
664
|
+
return R.setDate(R.getDate() - H + 1), R;
|
|
648
665
|
}
|
|
649
666
|
default:
|
|
650
|
-
return new Date(
|
|
667
|
+
return new Date(g);
|
|
651
668
|
}
|
|
652
|
-
},
|
|
653
|
-
const
|
|
654
|
-
s("update:modelValue",
|
|
655
|
-
}, z = (
|
|
656
|
-
const
|
|
657
|
-
s("change",
|
|
669
|
+
}, k = (g) => d.value ? g ? C(g) : "" : g, h = (g) => {
|
|
670
|
+
const v = g.target;
|
|
671
|
+
s("update:modelValue", k(v.value));
|
|
672
|
+
}, z = (g) => {
|
|
673
|
+
const v = g.target;
|
|
674
|
+
s("change", k(v.value));
|
|
658
675
|
};
|
|
659
|
-
return (
|
|
676
|
+
return (g, v) => (n(), o("div", {
|
|
660
677
|
class: b(["bsa-input-date", t.class])
|
|
661
678
|
}, [
|
|
662
679
|
e.label ? (n(), o("label", {
|
|
@@ -665,9 +682,9 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
665
682
|
class: b(["bsa-input-label", { "bsa-input-label--error": e.error }])
|
|
666
683
|
}, [
|
|
667
684
|
A(m(e.label) + " ", 1),
|
|
668
|
-
e.required ? (n(), o("span",
|
|
669
|
-
], 10,
|
|
670
|
-
c("div",
|
|
685
|
+
e.required ? (n(), o("span", Nt, "*")) : i("", !0)
|
|
686
|
+
], 10, Vt)) : i("", !0),
|
|
687
|
+
c("div", Mt, [
|
|
671
688
|
c("input", {
|
|
672
689
|
id: l.value,
|
|
673
690
|
type: e.mode,
|
|
@@ -679,32 +696,32 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
679
696
|
min: e.min,
|
|
680
697
|
max: e.max,
|
|
681
698
|
class: b(u.value),
|
|
682
|
-
onInput:
|
|
699
|
+
onInput: h,
|
|
683
700
|
onChange: z,
|
|
684
|
-
onBlur:
|
|
685
|
-
onFocus:
|
|
686
|
-
}, null, 42,
|
|
687
|
-
c("div",
|
|
701
|
+
onBlur: v[0] || (v[0] = (_) => s("blur", _)),
|
|
702
|
+
onFocus: v[1] || (v[1] = (_) => s("focus", _))
|
|
703
|
+
}, null, 42, At),
|
|
704
|
+
c("div", qt, [
|
|
688
705
|
I(S, { icon: "Calendar" })
|
|
689
706
|
])
|
|
690
707
|
]),
|
|
691
|
-
e.hint && !e.error ? (n(), o("p",
|
|
692
|
-
e.error ? (n(), o("p",
|
|
708
|
+
e.hint && !e.error ? (n(), o("p", Rt, m(e.hint), 1)) : i("", !0),
|
|
709
|
+
e.error ? (n(), o("p", Ft, m(e.error), 1)) : i("", !0)
|
|
693
710
|
], 2));
|
|
694
711
|
}
|
|
695
|
-
}),
|
|
712
|
+
}), Lt = ["for"], Ot = {
|
|
696
713
|
key: 0,
|
|
697
714
|
class: "bsa-input-required"
|
|
698
|
-
},
|
|
715
|
+
}, Pt = { class: "bsa-input-field bsa-input-field--has-icon bsa-input-field--has-right-content" }, Ut = { class: "bsa-input-search-icon" }, Et = ["id", "value", "placeholder", "disabled", "readonly"], Zt = {
|
|
699
716
|
key: 0,
|
|
700
717
|
class: "bsa-input-search-actions"
|
|
701
|
-
},
|
|
718
|
+
}, Ht = ["disabled"], Xt = {
|
|
702
719
|
key: 1,
|
|
703
720
|
class: "bsa-input-hint"
|
|
704
|
-
},
|
|
721
|
+
}, Wt = {
|
|
705
722
|
key: 2,
|
|
706
723
|
class: "bsa-input-error"
|
|
707
|
-
},
|
|
724
|
+
}, an = /* @__PURE__ */ p({
|
|
708
725
|
__name: "BsaInputSearch",
|
|
709
726
|
props: {
|
|
710
727
|
modelValue: {},
|
|
@@ -732,19 +749,19 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
732
749
|
"bsa-input--disabled": t.disabled,
|
|
733
750
|
"bsa-input--error": !!t.error
|
|
734
751
|
}
|
|
735
|
-
]), d = (
|
|
736
|
-
const
|
|
737
|
-
s("update:modelValue",
|
|
738
|
-
s("search",
|
|
752
|
+
]), d = (C) => {
|
|
753
|
+
const h = C.target.value;
|
|
754
|
+
s("update:modelValue", h), l && clearTimeout(l), l = setTimeout(() => {
|
|
755
|
+
s("search", h);
|
|
739
756
|
}, t.debounce);
|
|
740
|
-
},
|
|
757
|
+
}, $ = () => {
|
|
741
758
|
l && clearTimeout(l), s("search", t.modelValue || "");
|
|
742
759
|
}, w = () => {
|
|
743
760
|
l && clearTimeout(l), s("update:modelValue", ""), s("clear"), s("search", "");
|
|
744
761
|
};
|
|
745
|
-
return
|
|
762
|
+
return ce(() => {
|
|
746
763
|
l && clearTimeout(l);
|
|
747
|
-
}), (
|
|
764
|
+
}), (C, k) => (n(), o("div", {
|
|
748
765
|
class: b(["bsa-input-search", t.class])
|
|
749
766
|
}, [
|
|
750
767
|
e.label ? (n(), o("label", {
|
|
@@ -753,10 +770,10 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
753
770
|
class: b(["bsa-input-label", { "bsa-input-label--error": e.error }])
|
|
754
771
|
}, [
|
|
755
772
|
A(m(e.label) + " ", 1),
|
|
756
|
-
e.required ? (n(), o("span",
|
|
757
|
-
], 10,
|
|
758
|
-
c("div",
|
|
759
|
-
c("div",
|
|
773
|
+
e.required ? (n(), o("span", Ot, "*")) : i("", !0)
|
|
774
|
+
], 10, Lt)) : i("", !0),
|
|
775
|
+
c("div", Pt, [
|
|
776
|
+
c("div", Ut, [
|
|
760
777
|
I(S, { icon: "Search" })
|
|
761
778
|
]),
|
|
762
779
|
c("input", {
|
|
@@ -769,11 +786,11 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
769
786
|
class: b(u.value),
|
|
770
787
|
onInput: d,
|
|
771
788
|
onKeydown: [
|
|
772
|
-
U(
|
|
789
|
+
U($, ["enter"]),
|
|
773
790
|
U(w, ["esc"])
|
|
774
791
|
]
|
|
775
|
-
}, null, 42,
|
|
776
|
-
e.modelValue || e.loading ? (n(), o("div",
|
|
792
|
+
}, null, 42, Et),
|
|
793
|
+
e.modelValue || e.loading ? (n(), o("div", Zt, [
|
|
777
794
|
!e.loading && e.modelValue ? (n(), o("button", {
|
|
778
795
|
key: 0,
|
|
779
796
|
type: "button",
|
|
@@ -782,35 +799,35 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
782
799
|
onClick: w
|
|
783
800
|
}, [
|
|
784
801
|
I(S, { icon: "X" })
|
|
785
|
-
], 8,
|
|
786
|
-
e.loading ? (n(),
|
|
802
|
+
], 8, Ht)) : i("", !0),
|
|
803
|
+
e.loading ? (n(), B(S, {
|
|
787
804
|
key: 1,
|
|
788
805
|
icon: "Loader",
|
|
789
806
|
class: "bsa-input-loading"
|
|
790
807
|
})) : i("", !0)
|
|
791
808
|
])) : i("", !0)
|
|
792
809
|
]),
|
|
793
|
-
e.hint && !e.error ? (n(), o("p",
|
|
794
|
-
e.error ? (n(), o("p",
|
|
810
|
+
e.hint && !e.error ? (n(), o("p", Xt, m(e.hint), 1)) : i("", !0),
|
|
811
|
+
e.error ? (n(), o("p", Wt, m(e.error), 1)) : i("", !0)
|
|
795
812
|
], 2));
|
|
796
813
|
}
|
|
797
|
-
}),
|
|
814
|
+
}), jt = ["for"], Kt = {
|
|
798
815
|
key: 0,
|
|
799
816
|
class: "bsa-input-required"
|
|
800
|
-
},
|
|
817
|
+
}, Yt = { class: "bsa-input-field bsa-input-field--has-right-content" }, Gt = ["id", "value", "disabled", "required", "multiple"], Jt = {
|
|
801
818
|
key: 0,
|
|
802
819
|
value: "",
|
|
803
820
|
disabled: ""
|
|
804
|
-
},
|
|
821
|
+
}, Qt = ["value", "disabled"], ea = ["label"], ta = ["value", "disabled"], aa = {
|
|
805
822
|
key: 0,
|
|
806
823
|
class: "bsa-input-select-icon"
|
|
807
|
-
},
|
|
824
|
+
}, sa = {
|
|
808
825
|
key: 1,
|
|
809
826
|
class: "bsa-input-hint"
|
|
810
|
-
},
|
|
827
|
+
}, na = {
|
|
811
828
|
key: 2,
|
|
812
829
|
class: "bsa-input-error"
|
|
813
|
-
},
|
|
830
|
+
}, sn = /* @__PURE__ */ p({
|
|
814
831
|
__name: "BsaInputSelect",
|
|
815
832
|
props: {
|
|
816
833
|
modelValue: { type: [String, Number, Boolean, Array] },
|
|
@@ -840,19 +857,19 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
840
857
|
"bsa-input--readonly": t.readonly
|
|
841
858
|
}
|
|
842
859
|
]), u = f(() => {
|
|
843
|
-
const w = (t.groups ?? []).flatMap((
|
|
860
|
+
const w = (t.groups ?? []).flatMap((C) => C.options);
|
|
844
861
|
return [...t.options, ...w];
|
|
845
|
-
}), d = (w) => u.value.find((
|
|
846
|
-
const
|
|
862
|
+
}), d = (w) => u.value.find((k) => String(k.value) === w)?.value ?? w, $ = (w) => {
|
|
863
|
+
const C = w.target;
|
|
847
864
|
if (t.multiple) {
|
|
848
|
-
const
|
|
849
|
-
s("update:modelValue",
|
|
865
|
+
const h = Array.from(C.selectedOptions).map((z) => d(z.value));
|
|
866
|
+
s("update:modelValue", h), s("change", h);
|
|
850
867
|
return;
|
|
851
868
|
}
|
|
852
|
-
const
|
|
853
|
-
s("update:modelValue",
|
|
869
|
+
const k = d(C.value);
|
|
870
|
+
s("update:modelValue", k), s("change", k);
|
|
854
871
|
};
|
|
855
|
-
return (w,
|
|
872
|
+
return (w, C) => (n(), o("div", {
|
|
856
873
|
class: b(["bsa-input-select", t.class])
|
|
857
874
|
}, [
|
|
858
875
|
e.label ? (n(), o("label", {
|
|
@@ -861,9 +878,9 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
861
878
|
class: b(["bsa-input-label", { "bsa-input-label--error": e.error }])
|
|
862
879
|
}, [
|
|
863
880
|
A(m(e.label) + " ", 1),
|
|
864
|
-
e.required ? (n(), o("span",
|
|
865
|
-
], 10,
|
|
866
|
-
c("div",
|
|
881
|
+
e.required ? (n(), o("span", Kt, "*")) : i("", !0)
|
|
882
|
+
], 10, jt)) : i("", !0),
|
|
883
|
+
c("div", Yt, [
|
|
867
884
|
c("select", {
|
|
868
885
|
id: l.value,
|
|
869
886
|
value: e.modelValue,
|
|
@@ -871,51 +888,51 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
871
888
|
required: e.required,
|
|
872
889
|
multiple: e.multiple,
|
|
873
890
|
class: b(r.value),
|
|
874
|
-
onChange:
|
|
875
|
-
onBlur:
|
|
876
|
-
onFocus:
|
|
891
|
+
onChange: $,
|
|
892
|
+
onBlur: C[0] || (C[0] = (k) => s("blur", k)),
|
|
893
|
+
onFocus: C[1] || (C[1] = (k) => s("focus", k))
|
|
877
894
|
}, [
|
|
878
|
-
e.placeholder && !e.multiple ? (n(), o("option",
|
|
879
|
-
(n(!0), o(V, null, N(e.options, (
|
|
880
|
-
key: String(
|
|
881
|
-
value:
|
|
882
|
-
disabled:
|
|
883
|
-
}, m(
|
|
884
|
-
(n(!0), o(V, null, N(e.groups, (
|
|
885
|
-
key:
|
|
886
|
-
label:
|
|
895
|
+
e.placeholder && !e.multiple ? (n(), o("option", Jt, m(e.placeholder), 1)) : i("", !0),
|
|
896
|
+
(n(!0), o(V, null, N(e.options, (k) => (n(), o("option", {
|
|
897
|
+
key: String(k.value),
|
|
898
|
+
value: k.value,
|
|
899
|
+
disabled: k.disabled
|
|
900
|
+
}, m(k.label), 9, Qt))), 128)),
|
|
901
|
+
(n(!0), o(V, null, N(e.groups, (k) => (n(), o("optgroup", {
|
|
902
|
+
key: k.label,
|
|
903
|
+
label: k.label
|
|
887
904
|
}, [
|
|
888
|
-
(n(!0), o(V, null, N(
|
|
889
|
-
key: String(
|
|
890
|
-
value:
|
|
891
|
-
disabled:
|
|
892
|
-
}, m(
|
|
893
|
-
], 8,
|
|
894
|
-
], 42,
|
|
895
|
-
e.multiple ? i("", !0) : (n(), o("div",
|
|
905
|
+
(n(!0), o(V, null, N(k.options, (h) => (n(), o("option", {
|
|
906
|
+
key: String(h.value),
|
|
907
|
+
value: h.value,
|
|
908
|
+
disabled: h.disabled
|
|
909
|
+
}, m(h.label), 9, ta))), 128))
|
|
910
|
+
], 8, ea))), 128))
|
|
911
|
+
], 42, Gt),
|
|
912
|
+
e.multiple ? i("", !0) : (n(), o("div", aa, [
|
|
896
913
|
I(S, { icon: "ChevronDown" })
|
|
897
914
|
]))
|
|
898
915
|
]),
|
|
899
|
-
e.hint && !e.error ? (n(), o("p",
|
|
900
|
-
e.error ? (n(), o("p",
|
|
916
|
+
e.hint && !e.error ? (n(), o("p", sa, m(e.hint), 1)) : i("", !0),
|
|
917
|
+
e.error ? (n(), o("p", na, m(e.error), 1)) : i("", !0)
|
|
901
918
|
], 2));
|
|
902
919
|
}
|
|
903
|
-
}),
|
|
920
|
+
}), la = ["for"], oa = {
|
|
904
921
|
key: 0,
|
|
905
922
|
class: "bsa-input-required"
|
|
906
|
-
},
|
|
923
|
+
}, ia = ["id", "type", "value", "placeholder", "disabled", "readonly", "required", "autocomplete", "maxlength", "minlength", "min", "max", "step"], ra = {
|
|
907
924
|
key: 0,
|
|
908
925
|
class: "bsa-input-icon"
|
|
909
|
-
},
|
|
926
|
+
}, ua = {
|
|
910
927
|
key: 1,
|
|
911
928
|
class: "bsa-input-actions"
|
|
912
|
-
},
|
|
929
|
+
}, ca = {
|
|
913
930
|
key: 1,
|
|
914
931
|
class: "bsa-input-hint"
|
|
915
|
-
},
|
|
932
|
+
}, da = {
|
|
916
933
|
key: 2,
|
|
917
934
|
class: "bsa-input-error"
|
|
918
|
-
},
|
|
935
|
+
}, nn = /* @__PURE__ */ p({
|
|
919
936
|
__name: "BsaInputText",
|
|
920
937
|
props: {
|
|
921
938
|
modelValue: {},
|
|
@@ -941,9 +958,9 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
941
958
|
},
|
|
942
959
|
emits: ["update:modelValue", "blur", "focus", "enter", "clear"],
|
|
943
960
|
setup(e, { emit: a }) {
|
|
944
|
-
const t = e, s = a, l =
|
|
961
|
+
const t = e, s = a, l = Q(), r = f(() => t.id || `input-${Math.random().toString(36).substring(2, 11)}`), u = f(() => !!t.icon || !!l.icon), d = f(
|
|
945
962
|
() => t.clearable && t.modelValue !== void 0 && t.modelValue !== "" || !!l.suffix
|
|
946
|
-
),
|
|
963
|
+
), $ = f(() => [
|
|
947
964
|
"bsa-input",
|
|
948
965
|
`bsa-input--${t.size}`,
|
|
949
966
|
{
|
|
@@ -957,17 +974,17 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
957
974
|
"bsa-input-field--has-icon": u.value,
|
|
958
975
|
"bsa-input-field--has-right-content": d.value
|
|
959
976
|
}
|
|
960
|
-
]),
|
|
961
|
-
const z =
|
|
977
|
+
]), C = (h) => {
|
|
978
|
+
const z = h.target;
|
|
962
979
|
if (t.type === "number") {
|
|
963
980
|
s("update:modelValue", z.value === "" ? "" : Number(z.value));
|
|
964
981
|
return;
|
|
965
982
|
}
|
|
966
983
|
s("update:modelValue", z.value);
|
|
967
|
-
},
|
|
984
|
+
}, k = () => {
|
|
968
985
|
s("update:modelValue", ""), s("clear");
|
|
969
986
|
};
|
|
970
|
-
return (
|
|
987
|
+
return (h, z) => (n(), o("div", {
|
|
971
988
|
class: b(["bsa-input-text", t.class])
|
|
972
989
|
}, [
|
|
973
990
|
e.label ? (n(), o("label", {
|
|
@@ -976,8 +993,8 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
976
993
|
class: b(["bsa-input-label", { "bsa-input-label--error": e.error }])
|
|
977
994
|
}, [
|
|
978
995
|
A(m(e.label) + " ", 1),
|
|
979
|
-
e.required ? (n(), o("span",
|
|
980
|
-
], 10,
|
|
996
|
+
e.required ? (n(), o("span", oa, "*")) : i("", !0)
|
|
997
|
+
], 10, la)) : i("", !0),
|
|
981
998
|
c("div", {
|
|
982
999
|
class: b(w.value)
|
|
983
1000
|
}, [
|
|
@@ -995,45 +1012,45 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
995
1012
|
min: e.min,
|
|
996
1013
|
max: e.max,
|
|
997
1014
|
step: e.step,
|
|
998
|
-
class: b(
|
|
999
|
-
onInput:
|
|
1000
|
-
onBlur: z[0] || (z[0] = (
|
|
1001
|
-
onFocus: z[1] || (z[1] = (
|
|
1002
|
-
onKeydown: z[2] || (z[2] = U((
|
|
1003
|
-
}, null, 42,
|
|
1004
|
-
u.value ? (n(), o("div",
|
|
1005
|
-
y(
|
|
1006
|
-
e.icon ? (n(),
|
|
1015
|
+
class: b($.value),
|
|
1016
|
+
onInput: C,
|
|
1017
|
+
onBlur: z[0] || (z[0] = (g) => s("blur", g)),
|
|
1018
|
+
onFocus: z[1] || (z[1] = (g) => s("focus", g)),
|
|
1019
|
+
onKeydown: z[2] || (z[2] = U((g) => s("enter", g), ["enter"]))
|
|
1020
|
+
}, null, 42, ia),
|
|
1021
|
+
u.value ? (n(), o("div", ra, [
|
|
1022
|
+
y(h.$slots, "icon", {}, () => [
|
|
1023
|
+
e.icon ? (n(), B(S, {
|
|
1007
1024
|
key: 0,
|
|
1008
1025
|
icon: e.icon
|
|
1009
1026
|
}, null, 8, ["icon"])) : i("", !0)
|
|
1010
1027
|
])
|
|
1011
1028
|
])) : i("", !0),
|
|
1012
|
-
d.value ? (n(), o("div",
|
|
1013
|
-
e.clearable && e.modelValue !== void 0 && e.modelValue !== "" ? (n(),
|
|
1029
|
+
d.value ? (n(), o("div", ua, [
|
|
1030
|
+
e.clearable && e.modelValue !== void 0 && e.modelValue !== "" ? (n(), B(j, {
|
|
1014
1031
|
key: 0,
|
|
1015
1032
|
icon: "X",
|
|
1016
1033
|
disabled: e.disabled,
|
|
1017
|
-
onClick:
|
|
1034
|
+
onClick: k,
|
|
1018
1035
|
class: "bsa-input-action"
|
|
1019
1036
|
}, null, 8, ["disabled"])) : i("", !0),
|
|
1020
|
-
y(
|
|
1037
|
+
y(h.$slots, "suffix")
|
|
1021
1038
|
])) : i("", !0)
|
|
1022
1039
|
], 2),
|
|
1023
|
-
e.hint && !e.error ? (n(), o("p",
|
|
1024
|
-
e.error ? (n(), o("p",
|
|
1040
|
+
e.hint && !e.error ? (n(), o("p", ca, m(e.hint), 1)) : i("", !0),
|
|
1041
|
+
e.error ? (n(), o("p", da, m(e.error), 1)) : i("", !0)
|
|
1025
1042
|
], 2));
|
|
1026
1043
|
}
|
|
1027
|
-
}),
|
|
1044
|
+
}), ba = ["for"], ma = {
|
|
1028
1045
|
key: 0,
|
|
1029
1046
|
class: "bsa-input-required"
|
|
1030
|
-
},
|
|
1047
|
+
}, fa = ["id", "value", "placeholder", "disabled", "readonly", "required", "rows", "cols", "maxlength", "minlength"], ha = {
|
|
1031
1048
|
key: 1,
|
|
1032
1049
|
class: "bsa-input-hint"
|
|
1033
|
-
},
|
|
1050
|
+
}, ga = {
|
|
1034
1051
|
key: 2,
|
|
1035
1052
|
class: "bsa-input-error"
|
|
1036
|
-
},
|
|
1053
|
+
}, ln = /* @__PURE__ */ p({
|
|
1037
1054
|
__name: "BsaInputTextarea",
|
|
1038
1055
|
props: {
|
|
1039
1056
|
modelValue: {},
|
|
@@ -1075,8 +1092,8 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
1075
1092
|
class: b(["bsa-input-label", { "bsa-input-label--error": e.error }])
|
|
1076
1093
|
}, [
|
|
1077
1094
|
A(m(e.label) + " ", 1),
|
|
1078
|
-
e.required ? (n(), o("span",
|
|
1079
|
-
], 10,
|
|
1095
|
+
e.required ? (n(), o("span", ma, "*")) : i("", !0)
|
|
1096
|
+
], 10, ba)) : i("", !0),
|
|
1080
1097
|
c("textarea", {
|
|
1081
1098
|
id: l.value,
|
|
1082
1099
|
value: e.modelValue,
|
|
@@ -1089,19 +1106,19 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
1089
1106
|
maxlength: e.maxlength,
|
|
1090
1107
|
minlength: e.minlength,
|
|
1091
1108
|
class: b(r.value),
|
|
1092
|
-
onInput: d[0] || (d[0] = (
|
|
1093
|
-
onBlur: d[1] || (d[1] = (
|
|
1094
|
-
onFocus: d[2] || (d[2] = (
|
|
1095
|
-
onKeydown: d[3] || (d[3] = U((
|
|
1096
|
-
}, null, 42,
|
|
1097
|
-
e.hint && !e.error ? (n(), o("p",
|
|
1098
|
-
e.error ? (n(), o("p",
|
|
1109
|
+
onInput: d[0] || (d[0] = ($) => s("update:modelValue", $.target.value)),
|
|
1110
|
+
onBlur: d[1] || (d[1] = ($) => s("blur", $)),
|
|
1111
|
+
onFocus: d[2] || (d[2] = ($) => s("focus", $)),
|
|
1112
|
+
onKeydown: d[3] || (d[3] = U(($) => s("enter", $), ["enter"]))
|
|
1113
|
+
}, null, 42, fa),
|
|
1114
|
+
e.hint && !e.error ? (n(), o("p", ha, m(e.hint), 1)) : i("", !0),
|
|
1115
|
+
e.error ? (n(), o("p", ga, m(e.error), 1)) : i("", !0)
|
|
1099
1116
|
], 2));
|
|
1100
1117
|
}
|
|
1101
|
-
}),
|
|
1118
|
+
}), ya = ["id", "name", "value", "checked", "disabled", "required"], va = {
|
|
1102
1119
|
key: 0,
|
|
1103
1120
|
class: "bsa-radio__label"
|
|
1104
|
-
},
|
|
1121
|
+
}, $a = /* @__PURE__ */ p({
|
|
1105
1122
|
__name: "BsaRadio",
|
|
1106
1123
|
props: {
|
|
1107
1124
|
modelValue: { type: [String, Number, Boolean] },
|
|
@@ -1131,23 +1148,23 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
1131
1148
|
disabled: e.disabled,
|
|
1132
1149
|
required: e.required,
|
|
1133
1150
|
onChange: l
|
|
1134
|
-
}, null, 40,
|
|
1135
|
-
e.label ? (n(), o("span",
|
|
1151
|
+
}, null, 40, ya),
|
|
1152
|
+
e.label ? (n(), o("span", va, m(e.label), 1)) : i("", !0)
|
|
1136
1153
|
], 2));
|
|
1137
1154
|
}
|
|
1138
|
-
}),
|
|
1155
|
+
}), pa = ["disabled"], ka = {
|
|
1139
1156
|
key: 0,
|
|
1140
1157
|
class: "bsa-input-label"
|
|
1141
|
-
},
|
|
1158
|
+
}, Ba = {
|
|
1142
1159
|
key: 0,
|
|
1143
1160
|
class: "bsa-input-required"
|
|
1144
|
-
},
|
|
1161
|
+
}, wa = { class: "bsa-radio-group__options" }, Ca = {
|
|
1145
1162
|
key: 1,
|
|
1146
1163
|
class: "bsa-input-hint"
|
|
1147
|
-
},
|
|
1164
|
+
}, Sa = {
|
|
1148
1165
|
key: 2,
|
|
1149
1166
|
class: "bsa-input-error"
|
|
1150
|
-
},
|
|
1167
|
+
}, on = /* @__PURE__ */ p({
|
|
1151
1168
|
__name: "BsaRadioGroup",
|
|
1152
1169
|
props: {
|
|
1153
1170
|
modelValue: { type: [String, Number, Boolean] },
|
|
@@ -1169,12 +1186,12 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
1169
1186
|
class: b(["bsa-radio-group", `bsa-radio-group--${e.direction}`]),
|
|
1170
1187
|
disabled: e.disabled
|
|
1171
1188
|
}, [
|
|
1172
|
-
e.label ? (n(), o("legend",
|
|
1189
|
+
e.label ? (n(), o("legend", ka, [
|
|
1173
1190
|
A(m(e.label) + " ", 1),
|
|
1174
|
-
e.required ? (n(), o("span",
|
|
1191
|
+
e.required ? (n(), o("span", Ba, "*")) : i("", !0)
|
|
1175
1192
|
])) : i("", !0),
|
|
1176
|
-
c("div",
|
|
1177
|
-
(n(!0), o(V, null, N(e.options, (r) => (n(),
|
|
1193
|
+
c("div", wa, [
|
|
1194
|
+
(n(!0), o(V, null, N(e.options, (r) => (n(), B($a, {
|
|
1178
1195
|
key: String(r.value),
|
|
1179
1196
|
"model-value": e.modelValue,
|
|
1180
1197
|
value: r.value,
|
|
@@ -1185,23 +1202,23 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
1185
1202
|
onChange: l[1] || (l[1] = (u) => t("change", u))
|
|
1186
1203
|
}, null, 8, ["model-value", "value", "label", "name", "disabled"]))), 128))
|
|
1187
1204
|
]),
|
|
1188
|
-
e.hint && !e.error ? (n(), o("p",
|
|
1189
|
-
e.error ? (n(), o("p",
|
|
1190
|
-
], 10,
|
|
1205
|
+
e.hint && !e.error ? (n(), o("p", Ca, m(e.hint), 1)) : i("", !0),
|
|
1206
|
+
e.error ? (n(), o("p", Sa, m(e.error), 1)) : i("", !0)
|
|
1207
|
+
], 10, pa));
|
|
1191
1208
|
}
|
|
1192
|
-
}),
|
|
1209
|
+
}), _a = {
|
|
1193
1210
|
key: 0,
|
|
1194
1211
|
class: "bsa-card-header"
|
|
1195
|
-
},
|
|
1212
|
+
}, Da = { class: "bsa-card-header__content" }, za = { class: "bsa-card-header__main" }, Ia = { class: "bsa-card-header__title" }, xa = {
|
|
1196
1213
|
key: 0,
|
|
1197
1214
|
class: "bsa-card-header__subtitle"
|
|
1198
|
-
},
|
|
1215
|
+
}, Ta = {
|
|
1199
1216
|
key: 0,
|
|
1200
1217
|
class: "bsa-card-header__actions"
|
|
1201
|
-
},
|
|
1218
|
+
}, Va = { class: "bsa-card-body" }, Na = {
|
|
1202
1219
|
key: 1,
|
|
1203
1220
|
class: "bsa-card-footer"
|
|
1204
|
-
},
|
|
1221
|
+
}, rn = /* @__PURE__ */ p({
|
|
1205
1222
|
__name: "BsaCard",
|
|
1206
1223
|
props: {
|
|
1207
1224
|
title: {},
|
|
@@ -1228,36 +1245,36 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
1228
1245
|
return (l, r) => (n(), o("div", {
|
|
1229
1246
|
class: b(s.value)
|
|
1230
1247
|
}, [
|
|
1231
|
-
e.showHeader || l.$slots.header ? (n(), o("div",
|
|
1248
|
+
e.showHeader || l.$slots.header ? (n(), o("div", _a, [
|
|
1232
1249
|
y(l.$slots, "header", {}, () => [
|
|
1233
|
-
c("div",
|
|
1234
|
-
c("div",
|
|
1235
|
-
e.icon ? (n(),
|
|
1250
|
+
c("div", Da, [
|
|
1251
|
+
c("div", za, [
|
|
1252
|
+
e.icon ? (n(), B(S, {
|
|
1236
1253
|
key: 0,
|
|
1237
1254
|
icon: e.icon,
|
|
1238
1255
|
class: "bsa-card-header__icon",
|
|
1239
1256
|
style: T({ color: e.iconColor })
|
|
1240
1257
|
}, null, 8, ["icon", "style"])) : i("", !0),
|
|
1241
1258
|
c("div", null, [
|
|
1242
|
-
c("h3",
|
|
1243
|
-
e.subtitle ? (n(), o("p",
|
|
1259
|
+
c("h3", Ia, m(e.title), 1),
|
|
1260
|
+
e.subtitle ? (n(), o("p", xa, m(e.subtitle), 1)) : i("", !0)
|
|
1244
1261
|
])
|
|
1245
1262
|
]),
|
|
1246
|
-
l.$slots.actions ? (n(), o("div",
|
|
1263
|
+
l.$slots.actions ? (n(), o("div", Ta, [
|
|
1247
1264
|
y(l.$slots, "actions")
|
|
1248
1265
|
])) : i("", !0)
|
|
1249
1266
|
])
|
|
1250
1267
|
])
|
|
1251
1268
|
])) : i("", !0),
|
|
1252
|
-
c("div",
|
|
1269
|
+
c("div", Va, [
|
|
1253
1270
|
y(l.$slots, "default")
|
|
1254
1271
|
]),
|
|
1255
|
-
e.showFooter || l.$slots.footer ? (n(), o("div",
|
|
1272
|
+
e.showFooter || l.$slots.footer ? (n(), o("div", Na, [
|
|
1256
1273
|
y(l.$slots, "footer")
|
|
1257
1274
|
])) : i("", !0)
|
|
1258
1275
|
], 2));
|
|
1259
1276
|
}
|
|
1260
|
-
}),
|
|
1277
|
+
}), Ma = ["href", "target", "aria-disabled", "tabindex"], Aa = /* @__PURE__ */ p({
|
|
1261
1278
|
__name: "BsaLink",
|
|
1262
1279
|
props: {
|
|
1263
1280
|
href: { default: void 0 },
|
|
@@ -1278,27 +1295,27 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
1278
1295
|
onClick: s
|
|
1279
1296
|
}, [
|
|
1280
1297
|
y(l.$slots, "default", {}, void 0, !0)
|
|
1281
|
-
], 10,
|
|
1298
|
+
], 10, Ma));
|
|
1282
1299
|
}
|
|
1283
|
-
}),
|
|
1300
|
+
}), ne = /* @__PURE__ */ q(Aa, [["__scopeId", "data-v-c2b6662a"]]), qa = {
|
|
1284
1301
|
key: 0,
|
|
1285
1302
|
class: "bsa-container__breadcrumb"
|
|
1286
|
-
},
|
|
1303
|
+
}, Ra = { "aria-label": "Breadcrumb" }, Fa = { class: "bsa-container__breadcrumb-list" }, La = {
|
|
1287
1304
|
key: 2,
|
|
1288
1305
|
class: "bsa-container__breadcrumb-current"
|
|
1289
|
-
},
|
|
1306
|
+
}, Oa = {
|
|
1290
1307
|
key: 1,
|
|
1291
1308
|
class: "bsa-container__header"
|
|
1292
|
-
},
|
|
1309
|
+
}, Pa = { class: "bsa-container__header-content" }, Ua = { class: "bsa-container__title" }, Ea = {
|
|
1293
1310
|
key: 0,
|
|
1294
1311
|
class: "bsa-container__description"
|
|
1295
|
-
},
|
|
1312
|
+
}, Za = {
|
|
1296
1313
|
key: 0,
|
|
1297
1314
|
class: "bsa-container__actions"
|
|
1298
|
-
},
|
|
1315
|
+
}, Ha = { class: "bsa-container__content" }, Xa = {
|
|
1299
1316
|
key: 2,
|
|
1300
1317
|
class: "bsa-container__footer"
|
|
1301
|
-
},
|
|
1318
|
+
}, un = /* @__PURE__ */ p({
|
|
1302
1319
|
__name: "BsaContainer",
|
|
1303
1320
|
props: {
|
|
1304
1321
|
title: {},
|
|
@@ -1319,20 +1336,20 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
1319
1336
|
return (s, l) => (n(), o("div", {
|
|
1320
1337
|
class: b(t.value)
|
|
1321
1338
|
}, [
|
|
1322
|
-
e.showBreadcrumb || s.$slots.breadcrumb ? (n(), o("div",
|
|
1339
|
+
e.showBreadcrumb || s.$slots.breadcrumb ? (n(), o("div", qa, [
|
|
1323
1340
|
y(s.$slots, "breadcrumb", {}, () => [
|
|
1324
|
-
c("nav",
|
|
1325
|
-
c("ol",
|
|
1341
|
+
c("nav", Ra, [
|
|
1342
|
+
c("ol", Fa, [
|
|
1326
1343
|
(n(!0), o(V, null, N(e.breadcrumbs, (r, u) => (n(), o("li", {
|
|
1327
1344
|
key: u,
|
|
1328
1345
|
class: "bsa-container__breadcrumb-item"
|
|
1329
1346
|
}, [
|
|
1330
|
-
u > 0 ? (n(),
|
|
1347
|
+
u > 0 ? (n(), B(S, {
|
|
1331
1348
|
key: 0,
|
|
1332
1349
|
icon: "ChevronRight",
|
|
1333
1350
|
class: "bsa-container__breadcrumb-separator"
|
|
1334
1351
|
})) : i("", !0),
|
|
1335
|
-
r.to ? (n(),
|
|
1352
|
+
r.to ? (n(), B(ne, {
|
|
1336
1353
|
key: 1,
|
|
1337
1354
|
to: r.to
|
|
1338
1355
|
}, {
|
|
@@ -1340,34 +1357,34 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
1340
1357
|
A(m(r.label), 1)
|
|
1341
1358
|
]),
|
|
1342
1359
|
_: 2
|
|
1343
|
-
}, 1032, ["to"])) : (n(), o("span",
|
|
1360
|
+
}, 1032, ["to"])) : (n(), o("span", La, m(r.label), 1))
|
|
1344
1361
|
]))), 128))
|
|
1345
1362
|
])
|
|
1346
1363
|
])
|
|
1347
1364
|
])
|
|
1348
1365
|
])) : i("", !0),
|
|
1349
|
-
e.title || s.$slots.header ? (n(), o("div",
|
|
1366
|
+
e.title || s.$slots.header ? (n(), o("div", Oa, [
|
|
1350
1367
|
y(s.$slots, "header", {}, () => [
|
|
1351
|
-
c("div",
|
|
1368
|
+
c("div", Pa, [
|
|
1352
1369
|
c("div", null, [
|
|
1353
|
-
c("h1",
|
|
1354
|
-
e.description ? (n(), o("p",
|
|
1370
|
+
c("h1", Ua, m(e.title), 1),
|
|
1371
|
+
e.description ? (n(), o("p", Ea, m(e.description), 1)) : i("", !0)
|
|
1355
1372
|
]),
|
|
1356
|
-
s.$slots.actions ? (n(), o("div",
|
|
1373
|
+
s.$slots.actions ? (n(), o("div", Za, [
|
|
1357
1374
|
y(s.$slots, "actions")
|
|
1358
1375
|
])) : i("", !0)
|
|
1359
1376
|
])
|
|
1360
1377
|
])
|
|
1361
1378
|
])) : i("", !0),
|
|
1362
|
-
c("div",
|
|
1379
|
+
c("div", Ha, [
|
|
1363
1380
|
y(s.$slots, "default")
|
|
1364
1381
|
]),
|
|
1365
|
-
s.$slots.footer ? (n(), o("div",
|
|
1382
|
+
s.$slots.footer ? (n(), o("div", Xa, [
|
|
1366
1383
|
y(s.$slots, "footer")
|
|
1367
1384
|
])) : i("", !0)
|
|
1368
1385
|
], 2));
|
|
1369
1386
|
}
|
|
1370
|
-
}),
|
|
1387
|
+
}), Wa = { class: "bsa-layout-app__topbar" }, ja = { class: "bsa-layout-app__body" }, Ka = { class: "bsa-layout-app__sidebar" }, Ya = ["aria-label", "aria-expanded"], Ga = { class: "bsa-layout-app__content" }, cn = /* @__PURE__ */ p({
|
|
1371
1388
|
__name: "BsaLayoutApp",
|
|
1372
1389
|
props: {
|
|
1373
1390
|
density: { default: "default" }
|
|
@@ -1376,9 +1393,9 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
1376
1393
|
const a = e, t = M(!1), s = M(!t.value), l = () => {
|
|
1377
1394
|
t.value = window.innerWidth < 767;
|
|
1378
1395
|
};
|
|
1379
|
-
|
|
1396
|
+
ee(() => {
|
|
1380
1397
|
l(), s.value = !t.value, window.addEventListener("resize", l);
|
|
1381
|
-
}),
|
|
1398
|
+
}), te(() => {
|
|
1382
1399
|
window.removeEventListener("resize", l);
|
|
1383
1400
|
});
|
|
1384
1401
|
const r = () => {
|
|
@@ -1386,27 +1403,27 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
1386
1403
|
}, u = () => {
|
|
1387
1404
|
s.value = !1;
|
|
1388
1405
|
};
|
|
1389
|
-
return (d,
|
|
1406
|
+
return (d, $) => (n(), o("div", {
|
|
1390
1407
|
class: b(["bsa-layout-app", {
|
|
1391
1408
|
"bsa-layout-app--sidebar-open": s.value,
|
|
1392
1409
|
"bsa-layout-app--density-compact": a.density === "compact"
|
|
1393
1410
|
}])
|
|
1394
1411
|
}, [
|
|
1395
|
-
c("div",
|
|
1412
|
+
c("div", Wa, [
|
|
1396
1413
|
y(d.$slots, "topbar", {
|
|
1397
1414
|
sidebarOpen: s.value,
|
|
1398
1415
|
toggleSidebar: r,
|
|
1399
1416
|
closeSidebar: u
|
|
1400
1417
|
})
|
|
1401
1418
|
]),
|
|
1402
|
-
c("div",
|
|
1419
|
+
c("div", ja, [
|
|
1403
1420
|
s.value && t.value ? (n(), o("div", {
|
|
1404
1421
|
key: 0,
|
|
1405
1422
|
class: "bsa-layout-app__overlay",
|
|
1406
1423
|
"aria-hidden": "true",
|
|
1407
1424
|
onClick: u
|
|
1408
1425
|
})) : i("", !0),
|
|
1409
|
-
c("aside",
|
|
1426
|
+
c("aside", Ka, [
|
|
1410
1427
|
y(d.$slots, "sidebar", {
|
|
1411
1428
|
open: s.value,
|
|
1412
1429
|
closeSidebar: u
|
|
@@ -1417,26 +1434,27 @@ const pt = ["aria-label", "title"], kt = /* @__PURE__ */ $({
|
|
|
1417
1434
|
class: "bsa-layout-app__sidebar-toggle",
|
|
1418
1435
|
type: "button",
|
|
1419
1436
|
"aria-label": s.value ? "Close sidebar" : "Open sidebar",
|
|
1437
|
+
"aria-expanded": s.value,
|
|
1420
1438
|
onClick: r
|
|
1421
1439
|
}, [
|
|
1422
1440
|
I(D(S), {
|
|
1423
1441
|
icon: s.value ? "ChevronLeft" : "ChevronRight",
|
|
1424
|
-
size: "
|
|
1442
|
+
size: "1rem"
|
|
1425
1443
|
}, null, 8, ["icon"])
|
|
1426
|
-
], 8,
|
|
1427
|
-
c("main",
|
|
1444
|
+
], 8, Ya)),
|
|
1445
|
+
c("main", Ga, [
|
|
1428
1446
|
y(d.$slots, "default")
|
|
1429
1447
|
])
|
|
1430
1448
|
])
|
|
1431
1449
|
], 2));
|
|
1432
1450
|
}
|
|
1433
|
-
}),
|
|
1434
|
-
function
|
|
1435
|
-
return n(), o("div",
|
|
1451
|
+
}), Ja = {}, Qa = { class: "bsa-layout-empty" };
|
|
1452
|
+
function es(e, a) {
|
|
1453
|
+
return n(), o("div", Qa, [
|
|
1436
1454
|
y(e.$slots, "default")
|
|
1437
1455
|
]);
|
|
1438
1456
|
}
|
|
1439
|
-
const
|
|
1457
|
+
const dn = /* @__PURE__ */ q(Ja, [["render", es]]), ts = { class: "bsa-layout-two-column__content" }, as = ["src"], bn = /* @__PURE__ */ p({
|
|
1440
1458
|
__name: "BsaLayoutTwoColumn",
|
|
1441
1459
|
props: {
|
|
1442
1460
|
rightIframeSrc: { default: "" },
|
|
@@ -1445,7 +1463,7 @@ const en = /* @__PURE__ */ R(Za, [["render", Xa]]), Wa = { class: "bsa-layout-tw
|
|
|
1445
1463
|
showRightSide: { type: Boolean, default: !0 }
|
|
1446
1464
|
},
|
|
1447
1465
|
setup(e) {
|
|
1448
|
-
const a = e, t =
|
|
1466
|
+
const a = e, t = Q(), s = f(() => a.showRightSide && !!(a.rightIframeSrc || t.right));
|
|
1449
1467
|
return (l, r) => (n(), o("div", {
|
|
1450
1468
|
class: b(["bsa-layout-two-column", { "bsa-layout-two-column--with-right": s.value }])
|
|
1451
1469
|
}, [
|
|
@@ -1454,7 +1472,7 @@ const en = /* @__PURE__ */ R(Za, [["render", Xa]]), Wa = { class: "bsa-layout-tw
|
|
|
1454
1472
|
style: T({ backgroundColor: e.leftBackgroundColor || void 0 })
|
|
1455
1473
|
}, [
|
|
1456
1474
|
y(l.$slots, "left", {}, () => [
|
|
1457
|
-
c("div",
|
|
1475
|
+
c("div", ts, [
|
|
1458
1476
|
y(l.$slots, "default")
|
|
1459
1477
|
])
|
|
1460
1478
|
])
|
|
@@ -1469,31 +1487,31 @@ const en = /* @__PURE__ */ R(Za, [["render", Xa]]), Wa = { class: "bsa-layout-tw
|
|
|
1469
1487
|
key: 0,
|
|
1470
1488
|
src: a.rightIframeSrc,
|
|
1471
1489
|
class: "bsa-layout-two-column__iframe"
|
|
1472
|
-
}, null, 8,
|
|
1490
|
+
}, null, 8, as)) : i("", !0)
|
|
1473
1491
|
])
|
|
1474
1492
|
], 4)) : i("", !0)
|
|
1475
1493
|
], 2));
|
|
1476
1494
|
}
|
|
1477
|
-
}),
|
|
1495
|
+
}), ss = {
|
|
1478
1496
|
key: 0,
|
|
1479
1497
|
class: "bsa-page__header"
|
|
1480
|
-
},
|
|
1498
|
+
}, ns = { class: "bsa-page__heading" }, ls = {
|
|
1481
1499
|
key: 0,
|
|
1482
1500
|
class: "bsa-page__breadcrumb",
|
|
1483
1501
|
"aria-label": "Breadcrumb"
|
|
1484
|
-
},
|
|
1502
|
+
}, os = {
|
|
1485
1503
|
key: 2,
|
|
1486
1504
|
"aria-current": "page"
|
|
1487
|
-
},
|
|
1505
|
+
}, is = {
|
|
1488
1506
|
key: 1,
|
|
1489
1507
|
class: "bsa-page__title"
|
|
1490
|
-
},
|
|
1508
|
+
}, rs = {
|
|
1491
1509
|
key: 2,
|
|
1492
1510
|
class: "bsa-page__description"
|
|
1493
|
-
},
|
|
1511
|
+
}, us = {
|
|
1494
1512
|
key: 0,
|
|
1495
1513
|
class: "bsa-page__actions"
|
|
1496
|
-
},
|
|
1514
|
+
}, cs = { class: "bsa-page__content" }, mn = /* @__PURE__ */ p({
|
|
1497
1515
|
__name: "BsaPage",
|
|
1498
1516
|
props: {
|
|
1499
1517
|
title: { default: void 0 },
|
|
@@ -1506,19 +1524,19 @@ const en = /* @__PURE__ */ R(Za, [["render", Xa]]), Wa = { class: "bsa-layout-tw
|
|
|
1506
1524
|
class: "bsa-page",
|
|
1507
1525
|
style: T({ maxWidth: e.maxWidth })
|
|
1508
1526
|
}, [
|
|
1509
|
-
e.title || e.description || e.breadcrumbs.length || a.$slots.actions || a.$slots.header ? (n(), o("header",
|
|
1527
|
+
e.title || e.description || e.breadcrumbs.length || a.$slots.actions || a.$slots.header ? (n(), o("header", ss, [
|
|
1510
1528
|
y(a.$slots, "header", {}, () => [
|
|
1511
|
-
c("div",
|
|
1512
|
-
e.breadcrumbs.length ? (n(), o("nav",
|
|
1529
|
+
c("div", ns, [
|
|
1530
|
+
e.breadcrumbs.length ? (n(), o("nav", ls, [
|
|
1513
1531
|
c("ol", null, [
|
|
1514
1532
|
(n(!0), o(V, null, N(e.breadcrumbs, (s, l) => (n(), o("li", {
|
|
1515
1533
|
key: `${s.label}-${l}`
|
|
1516
1534
|
}, [
|
|
1517
|
-
l > 0 ? (n(),
|
|
1535
|
+
l > 0 ? (n(), B(S, {
|
|
1518
1536
|
key: 0,
|
|
1519
1537
|
icon: "ChevronRight"
|
|
1520
1538
|
})) : i("", !0),
|
|
1521
|
-
s.href ? (n(),
|
|
1539
|
+
s.href ? (n(), B(ne, {
|
|
1522
1540
|
key: 1,
|
|
1523
1541
|
href: s.href
|
|
1524
1542
|
}, {
|
|
@@ -1526,33 +1544,33 @@ const en = /* @__PURE__ */ R(Za, [["render", Xa]]), Wa = { class: "bsa-layout-tw
|
|
|
1526
1544
|
A(m(s.label), 1)
|
|
1527
1545
|
]),
|
|
1528
1546
|
_: 2
|
|
1529
|
-
}, 1032, ["href"])) : (n(), o("span",
|
|
1547
|
+
}, 1032, ["href"])) : (n(), o("span", os, m(s.label), 1))
|
|
1530
1548
|
]))), 128))
|
|
1531
1549
|
])
|
|
1532
1550
|
])) : i("", !0),
|
|
1533
|
-
e.title ? (n(), o("h1",
|
|
1534
|
-
e.description ? (n(), o("p",
|
|
1551
|
+
e.title ? (n(), o("h1", is, m(e.title), 1)) : i("", !0),
|
|
1552
|
+
e.description ? (n(), o("p", rs, m(e.description), 1)) : i("", !0)
|
|
1535
1553
|
]),
|
|
1536
|
-
a.$slots.actions ? (n(), o("div",
|
|
1554
|
+
a.$slots.actions ? (n(), o("div", us, [
|
|
1537
1555
|
y(a.$slots, "actions")
|
|
1538
1556
|
])) : i("", !0)
|
|
1539
1557
|
])
|
|
1540
1558
|
])) : i("", !0),
|
|
1541
|
-
c("div",
|
|
1559
|
+
c("div", cs, [
|
|
1542
1560
|
y(a.$slots, "default")
|
|
1543
1561
|
])
|
|
1544
1562
|
], 4));
|
|
1545
1563
|
}
|
|
1546
|
-
}),
|
|
1564
|
+
}), ds = {
|
|
1547
1565
|
key: 0,
|
|
1548
1566
|
class: "bsa-section__header"
|
|
1549
|
-
},
|
|
1567
|
+
}, bs = { class: "bsa-section__header-content" }, ms = {
|
|
1550
1568
|
key: 0,
|
|
1551
1569
|
class: "bsa-section__description"
|
|
1552
|
-
},
|
|
1570
|
+
}, fs = {
|
|
1553
1571
|
key: 0,
|
|
1554
1572
|
class: "bsa-section__actions"
|
|
1555
|
-
},
|
|
1573
|
+
}, hs = { class: "bsa-section__content" }, fn = /* @__PURE__ */ p({
|
|
1556
1574
|
__name: "BsaSection",
|
|
1557
1575
|
props: {
|
|
1558
1576
|
title: {},
|
|
@@ -1572,27 +1590,27 @@ const en = /* @__PURE__ */ R(Za, [["render", Xa]]), Wa = { class: "bsa-layout-tw
|
|
|
1572
1590
|
return (l, r) => (n(), o("section", {
|
|
1573
1591
|
class: b(t.value)
|
|
1574
1592
|
}, [
|
|
1575
|
-
e.title || l.$slots.header ? (n(), o("div",
|
|
1593
|
+
e.title || l.$slots.header ? (n(), o("div", ds, [
|
|
1576
1594
|
y(l.$slots, "header", {}, () => [
|
|
1577
|
-
c("div",
|
|
1595
|
+
c("div", bs, [
|
|
1578
1596
|
c("div", null, [
|
|
1579
1597
|
c("h2", {
|
|
1580
1598
|
class: b(s.value)
|
|
1581
1599
|
}, m(e.title), 3),
|
|
1582
|
-
e.description ? (n(), o("p",
|
|
1600
|
+
e.description ? (n(), o("p", ms, m(e.description), 1)) : i("", !0)
|
|
1583
1601
|
]),
|
|
1584
|
-
l.$slots.actions ? (n(), o("div",
|
|
1602
|
+
l.$slots.actions ? (n(), o("div", fs, [
|
|
1585
1603
|
y(l.$slots, "actions")
|
|
1586
1604
|
])) : i("", !0)
|
|
1587
1605
|
])
|
|
1588
1606
|
])
|
|
1589
1607
|
])) : i("", !0),
|
|
1590
|
-
c("div",
|
|
1608
|
+
c("div", hs, [
|
|
1591
1609
|
y(l.$slots, "default")
|
|
1592
1610
|
])
|
|
1593
1611
|
], 2));
|
|
1594
1612
|
}
|
|
1595
|
-
}),
|
|
1613
|
+
}), gs = ["aria-label"], ys = { class: "bsa-sidebar__content" }, hn = /* @__PURE__ */ p({
|
|
1596
1614
|
__name: "BsaSidebar",
|
|
1597
1615
|
props: {
|
|
1598
1616
|
open: { type: Boolean, default: !1 },
|
|
@@ -1603,15 +1621,15 @@ const en = /* @__PURE__ */ R(Za, [["render", Xa]]), Wa = { class: "bsa-layout-tw
|
|
|
1603
1621
|
class: b(["bsa-sidebar", { "bsa-sidebar--open": e.open }]),
|
|
1604
1622
|
"aria-label": e.ariaLabel
|
|
1605
1623
|
}, [
|
|
1606
|
-
c("div",
|
|
1624
|
+
c("div", ys, [
|
|
1607
1625
|
y(a.$slots, "default")
|
|
1608
1626
|
])
|
|
1609
|
-
], 10,
|
|
1627
|
+
], 10, gs));
|
|
1610
1628
|
}
|
|
1611
|
-
}),
|
|
1629
|
+
}), vs = ["aria-expanded"], $s = { class: "bsa-sidebar-menu-item__label" }, ps = ["aria-disabled"], ks = { class: "bsa-sidebar-menu-item__label" }, Bs = {
|
|
1612
1630
|
key: 2,
|
|
1613
1631
|
class: "bsa-sidebar-menu-item__children"
|
|
1614
|
-
},
|
|
1632
|
+
}, gn = /* @__PURE__ */ p({
|
|
1615
1633
|
__name: "BsaSidebarMenuItem",
|
|
1616
1634
|
props: {
|
|
1617
1635
|
item: {},
|
|
@@ -1622,67 +1640,84 @@ const en = /* @__PURE__ */ R(Za, [["render", Xa]]), Wa = { class: "bsa-layout-tw
|
|
|
1622
1640
|
},
|
|
1623
1641
|
emits: ["toggle", "select"],
|
|
1624
1642
|
setup(e, { emit: a }) {
|
|
1625
|
-
const t = e, s = a, l = f(() => t.item.children.length > 0), r = f(
|
|
1643
|
+
const t = e, s = a, l = f(() => t.item.children.length > 0), r = f(
|
|
1644
|
+
() => t.item.indicator !== void 0 && t.item.indicator !== null && t.item.indicator !== ""
|
|
1645
|
+
), u = f(() => t.openItems.has(t.item.id)), d = f(() => t.activePath === t.item.path), $ = (k) => k.some((h) => h.path === t.activePath || $(h.children)), w = f(() => $(t.item.children)), C = () => {
|
|
1626
1646
|
t.item.disabled || !t.item.path || s("select", t.item.path);
|
|
1627
1647
|
};
|
|
1628
|
-
return (
|
|
1629
|
-
const
|
|
1648
|
+
return (k, h) => {
|
|
1649
|
+
const z = de("BsaSidebarMenuItem", !0);
|
|
1630
1650
|
return n(), o("li", {
|
|
1631
1651
|
class: b(["bsa-sidebar-menu-item", { "bsa-sidebar-menu-item--nested": e.depth > 0 }])
|
|
1632
1652
|
}, [
|
|
1633
1653
|
l.value ? (n(), o("button", {
|
|
1634
1654
|
key: 0,
|
|
1635
1655
|
type: "button",
|
|
1636
|
-
class: b(["bsa-sidebar-menu-item__button", { "bsa-sidebar-menu-item__button--active":
|
|
1637
|
-
"aria-expanded":
|
|
1638
|
-
onClick:
|
|
1656
|
+
class: b(["bsa-sidebar-menu-item__button", { "bsa-sidebar-menu-item__button--active": d.value || w.value }]),
|
|
1657
|
+
"aria-expanded": u.value,
|
|
1658
|
+
onClick: h[0] || (h[0] = (g) => s("toggle", e.item.id))
|
|
1639
1659
|
}, [
|
|
1640
|
-
e.item.icon ? (n(),
|
|
1660
|
+
e.item.icon ? (n(), B(S, {
|
|
1641
1661
|
key: 0,
|
|
1642
1662
|
icon: e.item.icon,
|
|
1643
1663
|
size: e.iconSize,
|
|
1644
1664
|
class: "bsa-sidebar-menu-item__icon"
|
|
1645
1665
|
}, null, 8, ["icon", "size"])) : i("", !0),
|
|
1646
|
-
c("span",
|
|
1647
|
-
|
|
1666
|
+
c("span", $s, m(e.item.label), 1),
|
|
1667
|
+
r.value ? (n(), B(K, {
|
|
1668
|
+
key: 1,
|
|
1669
|
+
class: "bsa-sidebar-menu-item__indicator",
|
|
1670
|
+
label: String(e.item.indicator),
|
|
1671
|
+
tone: "primary"
|
|
1672
|
+
}, null, 8, ["label"])) : i("", !0),
|
|
1673
|
+
I(S, {
|
|
1648
1674
|
icon: "ChevronDown",
|
|
1649
1675
|
size: e.iconSize,
|
|
1650
|
-
class: b(["bsa-sidebar-menu-item__chevron", {
|
|
1676
|
+
class: b(["bsa-sidebar-menu-item__chevron", {
|
|
1677
|
+
"bsa-sidebar-menu-item__chevron--open": u.value,
|
|
1678
|
+
"bsa-sidebar-menu-item__chevron--with-indicator": r.value
|
|
1679
|
+
}])
|
|
1651
1680
|
}, null, 8, ["size", "class"])
|
|
1652
|
-
], 10,
|
|
1681
|
+
], 10, vs)) : (n(), o("button", {
|
|
1653
1682
|
key: 1,
|
|
1654
1683
|
type: "button",
|
|
1655
1684
|
class: b(["bsa-sidebar-menu-item__button", {
|
|
1656
|
-
"bsa-sidebar-menu-item__button--active":
|
|
1685
|
+
"bsa-sidebar-menu-item__button--active": d.value,
|
|
1657
1686
|
"bsa-sidebar-menu-item__button--disabled": e.item.disabled
|
|
1658
1687
|
}]),
|
|
1659
1688
|
"aria-disabled": e.item.disabled,
|
|
1660
|
-
onClick:
|
|
1689
|
+
onClick: C
|
|
1661
1690
|
}, [
|
|
1662
|
-
e.item.icon ? (n(),
|
|
1691
|
+
e.item.icon ? (n(), B(S, {
|
|
1663
1692
|
key: 0,
|
|
1664
1693
|
icon: e.item.icon,
|
|
1665
1694
|
size: e.iconSize,
|
|
1666
1695
|
class: "bsa-sidebar-menu-item__icon"
|
|
1667
1696
|
}, null, 8, ["icon", "size"])) : i("", !0),
|
|
1668
|
-
c("span",
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1697
|
+
c("span", ks, m(e.item.label), 1),
|
|
1698
|
+
r.value ? (n(), B(K, {
|
|
1699
|
+
key: 1,
|
|
1700
|
+
class: "bsa-sidebar-menu-item__indicator",
|
|
1701
|
+
label: String(e.item.indicator),
|
|
1702
|
+
tone: "primary"
|
|
1703
|
+
}, null, 8, ["label"])) : i("", !0)
|
|
1704
|
+
], 10, ps)),
|
|
1705
|
+
l.value && u.value ? (n(), o("ul", Bs, [
|
|
1706
|
+
(n(!0), o(V, null, N(e.item.children, (g) => (n(), B(z, {
|
|
1707
|
+
key: g.id,
|
|
1708
|
+
item: g,
|
|
1674
1709
|
depth: e.depth + 1,
|
|
1675
1710
|
"active-path": e.activePath,
|
|
1676
1711
|
"open-items": e.openItems,
|
|
1677
1712
|
"icon-size": e.iconSize,
|
|
1678
|
-
onToggle:
|
|
1679
|
-
onSelect:
|
|
1713
|
+
onToggle: h[1] || (h[1] = (v) => s("toggle", v)),
|
|
1714
|
+
onSelect: h[2] || (h[2] = (v) => s("select", v))
|
|
1680
1715
|
}, null, 8, ["item", "depth", "active-path", "open-items", "icon-size"]))), 128))
|
|
1681
1716
|
])) : i("", !0)
|
|
1682
1717
|
], 2);
|
|
1683
1718
|
};
|
|
1684
1719
|
}
|
|
1685
|
-
}),
|
|
1720
|
+
}), ws = ["aria-label"], Cs = { class: "bsa-topbar__start" }, Ss = { class: "bsa-topbar__content" }, _s = { class: "bsa-topbar__end" }, Ds = /* @__PURE__ */ p({
|
|
1686
1721
|
__name: "BsaTopbar",
|
|
1687
1722
|
props: {
|
|
1688
1723
|
ariaLabel: { default: "Application header" },
|
|
@@ -1707,27 +1742,27 @@ const en = /* @__PURE__ */ R(Za, [["render", Xa]]), Wa = { class: "bsa-layout-tw
|
|
|
1707
1742
|
"aria-hidden": "true"
|
|
1708
1743
|
})
|
|
1709
1744
|
])) : i("", !0),
|
|
1710
|
-
c("div",
|
|
1745
|
+
c("div", Cs, [
|
|
1711
1746
|
y(s.$slots, "start", {}, void 0, !0)
|
|
1712
1747
|
]),
|
|
1713
|
-
c("div",
|
|
1748
|
+
c("div", Ss, [
|
|
1714
1749
|
y(s.$slots, "default", {}, void 0, !0)
|
|
1715
1750
|
]),
|
|
1716
|
-
c("div",
|
|
1751
|
+
c("div", _s, [
|
|
1717
1752
|
y(s.$slots, "end", {}, void 0, !0)
|
|
1718
1753
|
])
|
|
1719
|
-
], 8,
|
|
1754
|
+
], 8, ws));
|
|
1720
1755
|
}
|
|
1721
|
-
}),
|
|
1756
|
+
}), yn = /* @__PURE__ */ q(Ds, [["__scopeId", "data-v-8db252da"]]), zs = {
|
|
1722
1757
|
key: 0,
|
|
1723
1758
|
class: "bsa-modal__header"
|
|
1724
|
-
},
|
|
1759
|
+
}, Is = { class: "bsa-modal__header-content" }, xs = { class: "bsa-modal__heading" }, Ts = { class: "bsa-modal__title" }, Vs = {
|
|
1725
1760
|
key: 0,
|
|
1726
1761
|
class: "bsa-modal__subtitle"
|
|
1727
|
-
},
|
|
1762
|
+
}, Ns = {
|
|
1728
1763
|
key: 1,
|
|
1729
1764
|
class: "bsa-modal__footer"
|
|
1730
|
-
},
|
|
1765
|
+
}, Ms = /* @__PURE__ */ p({
|
|
1731
1766
|
__name: "BsaModal",
|
|
1732
1767
|
props: {
|
|
1733
1768
|
modelValue: { type: Boolean },
|
|
@@ -1752,51 +1787,51 @@ const en = /* @__PURE__ */ R(Za, [["render", Xa]]), Wa = { class: "bsa-layout-tw
|
|
|
1752
1787
|
setup(e, { emit: a }) {
|
|
1753
1788
|
const t = e, s = a, l = f({
|
|
1754
1789
|
get: () => t.modelValue,
|
|
1755
|
-
set: (
|
|
1790
|
+
set: (h) => s("update:modelValue", h)
|
|
1756
1791
|
}), r = f(() => ["bsa-modal", `bsa-modal--${t.size}`]), u = () => {
|
|
1757
1792
|
l.value = !1, s("close");
|
|
1758
1793
|
}, d = () => {
|
|
1759
1794
|
s("cancel"), u();
|
|
1760
|
-
},
|
|
1795
|
+
}, $ = () => {
|
|
1761
1796
|
s("confirm");
|
|
1762
1797
|
}, w = () => {
|
|
1763
1798
|
t.closeOnOverlay && t.closable && u();
|
|
1764
|
-
},
|
|
1765
|
-
|
|
1766
|
-
},
|
|
1767
|
-
|
|
1799
|
+
}, C = (h) => {
|
|
1800
|
+
h.key === "Escape" && l.value && t.closable && u();
|
|
1801
|
+
}, k = (h) => {
|
|
1802
|
+
h ? (document.addEventListener("keydown", C), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", C), document.body.style.overflow = "");
|
|
1768
1803
|
};
|
|
1769
|
-
return W(l,
|
|
1770
|
-
I(
|
|
1804
|
+
return W(l, k, { immediate: !0 }), te(() => k(!1)), (h, z) => (n(), B(be, { to: "body" }, [
|
|
1805
|
+
I(me, { name: "modal" }, {
|
|
1771
1806
|
default: O(() => [
|
|
1772
1807
|
l.value ? (n(), o("div", {
|
|
1773
1808
|
key: 0,
|
|
1774
1809
|
class: "bsa-modal-overlay",
|
|
1775
|
-
onClick:
|
|
1810
|
+
onClick: fe(w, ["self"])
|
|
1776
1811
|
}, [
|
|
1777
1812
|
c("div", {
|
|
1778
1813
|
class: b(r.value),
|
|
1779
1814
|
role: "dialog",
|
|
1780
1815
|
"aria-modal": "true"
|
|
1781
1816
|
}, [
|
|
1782
|
-
e.showHeader ? (n(), o("div",
|
|
1783
|
-
c("div",
|
|
1784
|
-
e.icon ? (n(),
|
|
1817
|
+
e.showHeader ? (n(), o("div", zs, [
|
|
1818
|
+
c("div", Is, [
|
|
1819
|
+
e.icon ? (n(), B(S, {
|
|
1785
1820
|
key: 0,
|
|
1786
1821
|
icon: e.icon,
|
|
1787
1822
|
style: T({ color: e.iconColor }),
|
|
1788
1823
|
class: "bsa-modal__icon"
|
|
1789
1824
|
}, null, 8, ["icon", "style"])) : i("", !0),
|
|
1790
|
-
c("div",
|
|
1791
|
-
c("h3",
|
|
1792
|
-
y(
|
|
1825
|
+
c("div", xs, [
|
|
1826
|
+
c("h3", Ts, [
|
|
1827
|
+
y(h.$slots, "header", {}, () => [
|
|
1793
1828
|
A(m(e.title), 1)
|
|
1794
1829
|
])
|
|
1795
1830
|
]),
|
|
1796
|
-
e.subtitle ? (n(), o("p",
|
|
1831
|
+
e.subtitle ? (n(), o("p", Vs, m(e.subtitle), 1)) : i("", !0)
|
|
1797
1832
|
])
|
|
1798
1833
|
]),
|
|
1799
|
-
e.closable ? (n(),
|
|
1834
|
+
e.closable ? (n(), B(j, {
|
|
1800
1835
|
key: 0,
|
|
1801
1836
|
icon: "X",
|
|
1802
1837
|
class: "bsa-modal__close",
|
|
@@ -1806,23 +1841,23 @@ const en = /* @__PURE__ */ R(Za, [["render", Xa]]), Wa = { class: "bsa-layout-tw
|
|
|
1806
1841
|
c("div", {
|
|
1807
1842
|
class: b(["bsa-modal__body", { "bsa-modal__body--scrollable": e.scrollable }])
|
|
1808
1843
|
}, [
|
|
1809
|
-
y(
|
|
1844
|
+
y(h.$slots, "default")
|
|
1810
1845
|
], 2),
|
|
1811
|
-
e.showFooter ||
|
|
1812
|
-
y(
|
|
1813
|
-
e.showCancel ? (n(),
|
|
1846
|
+
e.showFooter || h.$slots.footer ? (n(), o("div", Ns, [
|
|
1847
|
+
y(h.$slots, "footer", {}, () => [
|
|
1848
|
+
e.showCancel ? (n(), B(E, {
|
|
1814
1849
|
key: 0,
|
|
1815
1850
|
variant: "secondary",
|
|
1816
1851
|
outlined: "",
|
|
1817
1852
|
label: e.cancelLabel,
|
|
1818
1853
|
onClick: d
|
|
1819
1854
|
}, null, 8, ["label"])) : i("", !0),
|
|
1820
|
-
e.showConfirm ? (n(),
|
|
1855
|
+
e.showConfirm ? (n(), B(E, {
|
|
1821
1856
|
key: 1,
|
|
1822
1857
|
variant: e.confirmVariant,
|
|
1823
1858
|
label: e.confirmLabel,
|
|
1824
1859
|
loading: e.loading,
|
|
1825
|
-
onClick:
|
|
1860
|
+
onClick: $
|
|
1826
1861
|
}, null, 8, ["variant", "label", "loading"])) : i("", !0)
|
|
1827
1862
|
])
|
|
1828
1863
|
])) : i("", !0)
|
|
@@ -1834,57 +1869,57 @@ const en = /* @__PURE__ */ R(Za, [["render", Xa]]), Wa = { class: "bsa-layout-tw
|
|
|
1834
1869
|
]));
|
|
1835
1870
|
}
|
|
1836
1871
|
});
|
|
1837
|
-
function
|
|
1872
|
+
function As(e = {}) {
|
|
1838
1873
|
const a = M(!1), t = M(e), s = M(null);
|
|
1839
1874
|
return {
|
|
1840
1875
|
isOpen: a,
|
|
1841
1876
|
options: t,
|
|
1842
1877
|
result: s,
|
|
1843
|
-
open: (
|
|
1844
|
-
|
|
1878
|
+
open: ($) => {
|
|
1879
|
+
$ && (t.value = { ...t.value, ...$ }), a.value = !0, s.value = null;
|
|
1845
1880
|
},
|
|
1846
|
-
close: (
|
|
1847
|
-
s.value =
|
|
1881
|
+
close: ($) => {
|
|
1882
|
+
s.value = $, a.value = !1;
|
|
1848
1883
|
},
|
|
1849
1884
|
toggle: () => {
|
|
1850
1885
|
a.value = !a.value;
|
|
1851
1886
|
},
|
|
1852
|
-
setOptions: (
|
|
1853
|
-
t.value = { ...t.value,
|
|
1887
|
+
setOptions: ($) => {
|
|
1888
|
+
t.value = { ...t.value, ...$ };
|
|
1854
1889
|
}
|
|
1855
1890
|
};
|
|
1856
1891
|
}
|
|
1857
|
-
const P =
|
|
1892
|
+
const P = As({
|
|
1858
1893
|
size: "sm",
|
|
1859
1894
|
closable: !0,
|
|
1860
1895
|
closeOnOverlay: !1
|
|
1861
|
-
}),
|
|
1862
|
-
function
|
|
1896
|
+
}), Y = M(null), G = M(null);
|
|
1897
|
+
function qs() {
|
|
1863
1898
|
return {
|
|
1864
1899
|
...P,
|
|
1865
1900
|
confirm: (a, t) => new Promise((s) => {
|
|
1866
1901
|
P.open({
|
|
1867
1902
|
title: a,
|
|
1868
1903
|
subtitle: t
|
|
1869
|
-
}),
|
|
1904
|
+
}), Y.value = () => {
|
|
1870
1905
|
P.close(!0), s(!0);
|
|
1871
|
-
},
|
|
1906
|
+
}, G.value = () => {
|
|
1872
1907
|
P.close(!1), s(!1);
|
|
1873
1908
|
};
|
|
1874
1909
|
}),
|
|
1875
|
-
confirmHandler:
|
|
1876
|
-
cancelHandler:
|
|
1910
|
+
confirmHandler: Y,
|
|
1911
|
+
cancelHandler: G
|
|
1877
1912
|
};
|
|
1878
1913
|
}
|
|
1879
|
-
const
|
|
1914
|
+
const Rs = { class: "bsa-confirm-dialog" }, Fs = { class: "bsa-confirm-dialog__message" }, Ls = { class: "bsa-confirm-dialog__actions" }, Os = /* @__PURE__ */ p({
|
|
1880
1915
|
__name: "BsaConfirmDialog",
|
|
1881
1916
|
setup(e) {
|
|
1882
|
-
const a =
|
|
1917
|
+
const a = qs(), t = () => {
|
|
1883
1918
|
a.cancelHandler.value?.();
|
|
1884
1919
|
}, s = () => {
|
|
1885
1920
|
a.confirmHandler.value?.();
|
|
1886
1921
|
};
|
|
1887
|
-
return (l, r) => (n(),
|
|
1922
|
+
return (l, r) => (n(), B(Ms, {
|
|
1888
1923
|
modelValue: D(a).isOpen.value,
|
|
1889
1924
|
"onUpdate:modelValue": r[0] || (r[0] = (u) => D(a).isOpen.value = u),
|
|
1890
1925
|
title: D(a).options.value.title,
|
|
@@ -1896,9 +1931,9 @@ const zs = { class: "bsa-confirm-dialog" }, _s = { class: "bsa-confirm-dialog__m
|
|
|
1896
1931
|
onClose: t
|
|
1897
1932
|
}, {
|
|
1898
1933
|
default: O(() => [
|
|
1899
|
-
c("div",
|
|
1900
|
-
c("div",
|
|
1901
|
-
c("div",
|
|
1934
|
+
c("div", Rs, [
|
|
1935
|
+
c("div", Fs, m(D(a).options.value.subtitle), 1),
|
|
1936
|
+
c("div", Ls, [
|
|
1902
1937
|
I(E, {
|
|
1903
1938
|
label: "Cancel",
|
|
1904
1939
|
variant: "secondary",
|
|
@@ -1916,8 +1951,8 @@ const zs = { class: "bsa-confirm-dialog" }, _s = { class: "bsa-confirm-dialog__m
|
|
|
1916
1951
|
_: 1
|
|
1917
1952
|
}, 8, ["modelValue", "title", "subtitle", "size", "closable", "close-on-overlay"]));
|
|
1918
1953
|
}
|
|
1919
|
-
}),
|
|
1920
|
-
function
|
|
1954
|
+
}), vn = /* @__PURE__ */ q(Os, [["__scopeId", "data-v-ebcdd15a"]]);
|
|
1955
|
+
function $n(e, a) {
|
|
1921
1956
|
const { key: t, storage: s = "local" } = a, l = typeof window < "u" ? s === "local" ? localStorage : sessionStorage : null;
|
|
1922
1957
|
if (!l)
|
|
1923
1958
|
return {
|
|
@@ -1938,8 +1973,8 @@ function un(e, a) {
|
|
|
1938
1973
|
try {
|
|
1939
1974
|
const w = l.getItem(t);
|
|
1940
1975
|
if (w) {
|
|
1941
|
-
const
|
|
1942
|
-
return e.value =
|
|
1976
|
+
const C = JSON.parse(w);
|
|
1977
|
+
return e.value = C, !0;
|
|
1943
1978
|
}
|
|
1944
1979
|
return !1;
|
|
1945
1980
|
} catch {
|
|
@@ -1950,7 +1985,7 @@ function un(e, a) {
|
|
|
1950
1985
|
l.removeItem(t);
|
|
1951
1986
|
} catch {
|
|
1952
1987
|
}
|
|
1953
|
-
},
|
|
1988
|
+
}, $ = () => l.getItem(t) !== null;
|
|
1954
1989
|
return W(
|
|
1955
1990
|
e,
|
|
1956
1991
|
() => {
|
|
@@ -1961,10 +1996,10 @@ function un(e, a) {
|
|
|
1961
1996
|
save: r,
|
|
1962
1997
|
restore: u,
|
|
1963
1998
|
clear: d,
|
|
1964
|
-
hasStoredData:
|
|
1999
|
+
hasStoredData: $
|
|
1965
2000
|
};
|
|
1966
2001
|
}
|
|
1967
|
-
const
|
|
2002
|
+
const J = "bsa-theme", pn = /* @__PURE__ */ p({
|
|
1968
2003
|
__name: "BsaThemeProvider",
|
|
1969
2004
|
setup(e) {
|
|
1970
2005
|
const a = M("light"), t = M(!1), s = f(() => a.value === "dark"), l = () => {
|
|
@@ -1972,22 +2007,22 @@ const G = "bsa-theme", cn = /* @__PURE__ */ $({
|
|
|
1972
2007
|
}, r = (u) => {
|
|
1973
2008
|
document.documentElement.classList.toggle("dark", u === "dark");
|
|
1974
2009
|
};
|
|
1975
|
-
return
|
|
1976
|
-
const u = localStorage.getItem(
|
|
2010
|
+
return ee(() => {
|
|
2011
|
+
const u = localStorage.getItem(J);
|
|
1977
2012
|
a.value = u ?? "light", t.value = !0;
|
|
1978
2013
|
}), W(
|
|
1979
2014
|
[a, t],
|
|
1980
2015
|
([u, d]) => {
|
|
1981
|
-
d && (localStorage.setItem(
|
|
2016
|
+
d && (localStorage.setItem(J, u), r(u));
|
|
1982
2017
|
},
|
|
1983
2018
|
{ immediate: !0 }
|
|
1984
|
-
),
|
|
2019
|
+
), he(se, {
|
|
1985
2020
|
isDarkMode: s,
|
|
1986
2021
|
toggleTheme: l
|
|
1987
2022
|
}), (u, d) => y(u.$slots, "default");
|
|
1988
2023
|
}
|
|
1989
2024
|
});
|
|
1990
|
-
function
|
|
2025
|
+
function kn(e, a = {}) {
|
|
1991
2026
|
const { locale: t = "en-US", currency: s = "USD", minimumFractionDigits: l = 2, maximumFractionDigits: r = 2 } = a, u = typeof e == "string" ? parseFloat(e) : e;
|
|
1992
2027
|
return isNaN(u) ? "0.00" : new Intl.NumberFormat(t, {
|
|
1993
2028
|
style: "currency",
|
|
@@ -1996,21 +2031,21 @@ function dn(e, a = {}) {
|
|
|
1996
2031
|
maximumFractionDigits: r
|
|
1997
2032
|
}).format(u);
|
|
1998
2033
|
}
|
|
1999
|
-
function
|
|
2034
|
+
function Bn(e, a = "en-US") {
|
|
2000
2035
|
const s = new Intl.NumberFormat(a).format(1000.1).replace(/\d/g, "").charAt(0), l = e.replace(/[^\d.,-]/g, "").replace(new RegExp(`\\${s}`, "g"), "").replace(",", ".");
|
|
2001
2036
|
return Number(l) || 0;
|
|
2002
2037
|
}
|
|
2003
|
-
function
|
|
2038
|
+
function wn(e, a = "en-US", t = {}) {
|
|
2004
2039
|
const s = typeof e == "string" ? parseFloat(e) : e;
|
|
2005
2040
|
return isNaN(s) ? "0" : new Intl.NumberFormat(a, t).format(s);
|
|
2006
2041
|
}
|
|
2007
|
-
function
|
|
2042
|
+
function Cn(e, a = "en-US", t = 2) {
|
|
2008
2043
|
return new Intl.NumberFormat(a, {
|
|
2009
2044
|
minimumFractionDigits: t,
|
|
2010
2045
|
maximumFractionDigits: t
|
|
2011
2046
|
}).format(e) + "%";
|
|
2012
2047
|
}
|
|
2013
|
-
function
|
|
2048
|
+
function Sn(e, a = "medium", t = "en-US") {
|
|
2014
2049
|
const s = e instanceof Date ? e : new Date(e);
|
|
2015
2050
|
if (isNaN(s.getTime()))
|
|
2016
2051
|
return "Invalid Date";
|
|
@@ -2058,12 +2093,12 @@ function hn(e, a = "medium", t = "en-US") {
|
|
|
2058
2093
|
hour12: !0
|
|
2059
2094
|
}).format(s);
|
|
2060
2095
|
case "relative":
|
|
2061
|
-
return
|
|
2096
|
+
return Ps(s);
|
|
2062
2097
|
default:
|
|
2063
2098
|
return s.toLocaleDateString(t);
|
|
2064
2099
|
}
|
|
2065
2100
|
}
|
|
2066
|
-
function
|
|
2101
|
+
function Ps(e, a = "en-US") {
|
|
2067
2102
|
const t = e instanceof Date ? e : new Date(e);
|
|
2068
2103
|
if (isNaN(t.getTime()))
|
|
2069
2104
|
return "";
|
|
@@ -2085,63 +2120,63 @@ function Ts(e, a = "en-US") {
|
|
|
2085
2120
|
}
|
|
2086
2121
|
return r.format(0, "second");
|
|
2087
2122
|
}
|
|
2088
|
-
function
|
|
2123
|
+
function _n(e) {
|
|
2089
2124
|
const a = new Date(e);
|
|
2090
2125
|
return isNaN(a.getTime()) ? null : a;
|
|
2091
2126
|
}
|
|
2092
|
-
function
|
|
2127
|
+
function Dn(e) {
|
|
2093
2128
|
return e instanceof Date && !isNaN(e.getTime());
|
|
2094
2129
|
}
|
|
2095
|
-
function
|
|
2130
|
+
function zn(e, a) {
|
|
2096
2131
|
const t = new Date(e);
|
|
2097
2132
|
return t.setDate(t.getDate() + a), t;
|
|
2098
2133
|
}
|
|
2099
|
-
function
|
|
2134
|
+
function In(e, a) {
|
|
2100
2135
|
const t = new Date(e);
|
|
2101
2136
|
return t.setMonth(t.getMonth() + a), t;
|
|
2102
2137
|
}
|
|
2103
|
-
function
|
|
2138
|
+
function xn(e, a) {
|
|
2104
2139
|
const t = new Date(e);
|
|
2105
2140
|
return t.setFullYear(t.getFullYear() + a), t;
|
|
2106
2141
|
}
|
|
2107
|
-
function
|
|
2142
|
+
function Tn(e, a) {
|
|
2108
2143
|
const t = Math.abs(a.getTime() - e.getTime());
|
|
2109
2144
|
return Math.ceil(t / (1e3 * 60 * 60 * 24));
|
|
2110
2145
|
}
|
|
2111
|
-
function
|
|
2146
|
+
function Vn(e) {
|
|
2112
2147
|
const a = ["", "K", "M", "B", "T"], t = Math.floor(("" + e).length / 3);
|
|
2113
2148
|
let s = parseFloat(
|
|
2114
2149
|
(t !== 0 ? e / Math.pow(1e3, t) : e).toPrecision(3)
|
|
2115
2150
|
);
|
|
2116
2151
|
return s % 1 !== 0 && (s = s.toFixed(1)), s + a[t];
|
|
2117
2152
|
}
|
|
2118
|
-
function
|
|
2153
|
+
function Us(e) {
|
|
2119
2154
|
return e ? e.charAt(0).toUpperCase() + e.slice(1).toLowerCase() : "";
|
|
2120
2155
|
}
|
|
2121
|
-
function
|
|
2122
|
-
return e ? e.split(" ").map((a) =>
|
|
2156
|
+
function Nn(e) {
|
|
2157
|
+
return e ? e.split(" ").map((a) => Us(a)).join(" ") : "";
|
|
2123
2158
|
}
|
|
2124
|
-
function
|
|
2159
|
+
function Es(e) {
|
|
2125
2160
|
return e ? e.replace(/[^a-zA-Z0-9]+(.)/g, (a, t) => t.toUpperCase()).replace(/^[A-Z]/, (a) => a.toLowerCase()) : "";
|
|
2126
2161
|
}
|
|
2127
|
-
function
|
|
2162
|
+
function Mn(e) {
|
|
2128
2163
|
return e ? e.replace(/([A-Z])/g, "_$1").toLowerCase().replace(/^_/, "").replace(/\s+/g, "_") : "";
|
|
2129
2164
|
}
|
|
2130
|
-
function
|
|
2165
|
+
function An(e) {
|
|
2131
2166
|
return e ? e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "").replace(/\s+/g, "-") : "";
|
|
2132
2167
|
}
|
|
2133
|
-
function
|
|
2168
|
+
function qn(e) {
|
|
2134
2169
|
if (!e) return "";
|
|
2135
|
-
const a =
|
|
2170
|
+
const a = Es(e);
|
|
2136
2171
|
return a.charAt(0).toUpperCase() + a.slice(1);
|
|
2137
2172
|
}
|
|
2138
|
-
function
|
|
2173
|
+
function Rn(e, a, t = "...") {
|
|
2139
2174
|
return !e || e.length <= a ? e : e.substring(0, a) + t;
|
|
2140
2175
|
}
|
|
2141
|
-
function
|
|
2176
|
+
function Fn(e) {
|
|
2142
2177
|
return e ? e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "") : "";
|
|
2143
2178
|
}
|
|
2144
|
-
function
|
|
2179
|
+
function Ln(e, a, t = "end") {
|
|
2145
2180
|
if (!e || e.length <= a) return e;
|
|
2146
2181
|
switch (t) {
|
|
2147
2182
|
case "start":
|
|
@@ -2153,16 +2188,16 @@ function In(e, a, t = "end") {
|
|
|
2153
2188
|
return e.slice(0, a - 3) + "...";
|
|
2154
2189
|
}
|
|
2155
2190
|
}
|
|
2156
|
-
function
|
|
2191
|
+
function On(e) {
|
|
2157
2192
|
return e ? e.replace(/\s+/g, "") : "";
|
|
2158
2193
|
}
|
|
2159
|
-
function
|
|
2194
|
+
function Pn(e) {
|
|
2160
2195
|
return e ? e.replace(/\s+/g, " ").trim() : "";
|
|
2161
2196
|
}
|
|
2162
|
-
function
|
|
2197
|
+
function Un(e) {
|
|
2163
2198
|
return e ? e.replace(/<[^>]*>/g, "") : "";
|
|
2164
2199
|
}
|
|
2165
|
-
function
|
|
2200
|
+
function En(e) {
|
|
2166
2201
|
if (!e) return "";
|
|
2167
2202
|
const a = {
|
|
2168
2203
|
"&": "&",
|
|
@@ -2173,7 +2208,7 @@ function Nn(e) {
|
|
|
2173
2208
|
};
|
|
2174
2209
|
return e.replace(/[&<>"']/g, (t) => a[t]);
|
|
2175
2210
|
}
|
|
2176
|
-
function
|
|
2211
|
+
function Zn(e) {
|
|
2177
2212
|
if (!e) return "";
|
|
2178
2213
|
const a = {
|
|
2179
2214
|
"&": "&",
|
|
@@ -2184,124 +2219,124 @@ function Mn(e) {
|
|
|
2184
2219
|
};
|
|
2185
2220
|
return e.replace(/&|<|>|"|'/g, (t) => a[t]);
|
|
2186
2221
|
}
|
|
2187
|
-
function
|
|
2222
|
+
function Hn(e, a = 0, t, s = "*") {
|
|
2188
2223
|
if (!e) return "";
|
|
2189
2224
|
const l = t || e.length, r = s.repeat(l - a);
|
|
2190
2225
|
return e.substring(0, a) + r + e.substring(l);
|
|
2191
2226
|
}
|
|
2192
|
-
function
|
|
2227
|
+
function Zs(e) {
|
|
2193
2228
|
return e == null ? !0 : typeof e == "string" ? e.trim().length === 0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1;
|
|
2194
2229
|
}
|
|
2195
|
-
function
|
|
2196
|
-
return !
|
|
2230
|
+
function Xn(e) {
|
|
2231
|
+
return !Zs(e);
|
|
2197
2232
|
}
|
|
2198
|
-
function
|
|
2233
|
+
function Wn(e, a) {
|
|
2199
2234
|
return e === a;
|
|
2200
2235
|
}
|
|
2201
|
-
function
|
|
2236
|
+
function le(e) {
|
|
2202
2237
|
const a = new Date(e);
|
|
2203
2238
|
return !isNaN(a.getTime());
|
|
2204
2239
|
}
|
|
2205
|
-
function
|
|
2240
|
+
function jn(e) {
|
|
2206
2241
|
const a = new Date(e), t = /* @__PURE__ */ new Date();
|
|
2207
|
-
return
|
|
2242
|
+
return le(e) && a > t;
|
|
2208
2243
|
}
|
|
2209
|
-
function
|
|
2244
|
+
function Kn(e) {
|
|
2210
2245
|
const a = new Date(e), t = /* @__PURE__ */ new Date();
|
|
2211
|
-
return
|
|
2246
|
+
return le(e) && a < t;
|
|
2212
2247
|
}
|
|
2213
|
-
function
|
|
2248
|
+
function Yn(e) {
|
|
2214
2249
|
return !isNaN(Number(e)) && isFinite(Number(e));
|
|
2215
2250
|
}
|
|
2216
|
-
function
|
|
2251
|
+
function Gn(e, a, t) {
|
|
2217
2252
|
return e >= a && e <= t;
|
|
2218
2253
|
}
|
|
2219
|
-
function
|
|
2254
|
+
function Jn(e) {
|
|
2220
2255
|
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
|
|
2221
2256
|
}
|
|
2222
|
-
function
|
|
2257
|
+
function Qn(e) {
|
|
2223
2258
|
try {
|
|
2224
2259
|
return new URL(e), !0;
|
|
2225
2260
|
} catch {
|
|
2226
2261
|
return !1;
|
|
2227
2262
|
}
|
|
2228
2263
|
}
|
|
2229
|
-
function
|
|
2264
|
+
function el(e) {
|
|
2230
2265
|
return /^[\d\s\-\+\(\)]{10,}$/.test(e);
|
|
2231
2266
|
}
|
|
2232
|
-
function
|
|
2267
|
+
function tl(e) {
|
|
2233
2268
|
return /^[a-zA-Z0-9]+$/.test(e);
|
|
2234
2269
|
}
|
|
2235
|
-
function
|
|
2270
|
+
function al(e) {
|
|
2236
2271
|
return /^[a-zA-Z]+$/.test(e);
|
|
2237
2272
|
}
|
|
2238
|
-
function
|
|
2273
|
+
function sl(e) {
|
|
2239
2274
|
return /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e);
|
|
2240
2275
|
}
|
|
2241
|
-
function
|
|
2276
|
+
function nl(e) {
|
|
2242
2277
|
return /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/.test(e);
|
|
2243
2278
|
}
|
|
2244
|
-
function
|
|
2279
|
+
function ll(e) {
|
|
2245
2280
|
return e.length < 8;
|
|
2246
2281
|
}
|
|
2247
|
-
function
|
|
2282
|
+
function ol(e, a, t) {
|
|
2248
2283
|
return t !== void 0 ? e.length >= a && e.length <= t : e.length >= a;
|
|
2249
2284
|
}
|
|
2250
|
-
const
|
|
2285
|
+
const il = (e) => ({
|
|
2251
2286
|
required: !0,
|
|
2252
2287
|
message: e || "This field is required"
|
|
2253
|
-
}),
|
|
2288
|
+
}), rl = (e, a) => ({
|
|
2254
2289
|
minLength: e,
|
|
2255
2290
|
message: a || `Must be at least ${e} characters`
|
|
2256
|
-
}),
|
|
2291
|
+
}), ul = (e, a) => ({
|
|
2257
2292
|
maxLength: e,
|
|
2258
2293
|
message: a || `Must be at most ${e} characters`
|
|
2259
|
-
}),
|
|
2294
|
+
}), cl = (e) => ({
|
|
2260
2295
|
pattern: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
|
|
2261
2296
|
message: e || "Invalid email address"
|
|
2262
|
-
}),
|
|
2297
|
+
}), dl = (e) => ({
|
|
2263
2298
|
pattern: /^https?:\/\/.+/,
|
|
2264
2299
|
message: e || "Invalid URL"
|
|
2265
|
-
}),
|
|
2300
|
+
}), bl = (e) => ({
|
|
2266
2301
|
pattern: /^[\d\s\-\+\(\)]+$/,
|
|
2267
2302
|
message: e || "Invalid phone number"
|
|
2268
|
-
}),
|
|
2303
|
+
}), ml = (e) => ({
|
|
2269
2304
|
pattern: /^\d+$/,
|
|
2270
2305
|
message: e || "Must be numeric"
|
|
2271
|
-
}),
|
|
2306
|
+
}), fl = (e) => ({
|
|
2272
2307
|
pattern: /^[a-zA-Z0-9]+$/,
|
|
2273
2308
|
message: e || "Must be alphanumeric"
|
|
2274
|
-
}),
|
|
2309
|
+
}), hl = (e) => ({
|
|
2275
2310
|
pattern: /^[a-zA-Z]+$/,
|
|
2276
2311
|
message: e || "Must be alphabetic"
|
|
2277
|
-
}),
|
|
2312
|
+
}), gl = (e, a) => ({
|
|
2278
2313
|
validator: (t) => {
|
|
2279
2314
|
const s = Number(t);
|
|
2280
2315
|
return !isNaN(s) && s >= e;
|
|
2281
2316
|
},
|
|
2282
2317
|
message: a || `Must be at least ${e}`
|
|
2283
|
-
}),
|
|
2318
|
+
}), yl = (e, a) => ({
|
|
2284
2319
|
validator: (t) => {
|
|
2285
2320
|
const s = Number(t);
|
|
2286
2321
|
return !isNaN(s) && s <= e;
|
|
2287
2322
|
},
|
|
2288
2323
|
message: a || `Must be at most ${e}`
|
|
2289
|
-
}),
|
|
2324
|
+
}), vl = (e, a, t) => ({
|
|
2290
2325
|
validator: (s) => {
|
|
2291
2326
|
const l = Number(s);
|
|
2292
2327
|
return !isNaN(l) && l >= e && l <= a;
|
|
2293
2328
|
},
|
|
2294
2329
|
message: t || `Must be between ${e} and ${a}`
|
|
2295
|
-
}),
|
|
2330
|
+
}), $l = (e) => ({
|
|
2296
2331
|
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d@$!%*?&]{8,}$/,
|
|
2297
2332
|
message: e || "Password must be at least 8 characters with uppercase, lowercase, and number"
|
|
2298
|
-
}),
|
|
2333
|
+
}), pl = (e) => ({
|
|
2299
2334
|
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,
|
|
2300
2335
|
message: e || "Password must be at least 8 characters with uppercase, lowercase, number, and special character"
|
|
2301
|
-
}),
|
|
2336
|
+
}), kl = (e, a, t) => ({
|
|
2302
2337
|
validator: (s) => s === a,
|
|
2303
2338
|
message: t || `Must match ${e}`
|
|
2304
|
-
}),
|
|
2339
|
+
}), Bl = (e) => ({
|
|
2305
2340
|
validator: (a) => {
|
|
2306
2341
|
if (typeof a != "string" && typeof a != "number" && !(a instanceof Date))
|
|
2307
2342
|
return !1;
|
|
@@ -2309,7 +2344,7 @@ const Gn = (e) => ({
|
|
|
2309
2344
|
return !isNaN(t.getTime());
|
|
2310
2345
|
},
|
|
2311
2346
|
message: e || "Invalid date"
|
|
2312
|
-
}),
|
|
2347
|
+
}), wl = (e) => ({
|
|
2313
2348
|
validator: (a) => {
|
|
2314
2349
|
if (typeof a != "string" && typeof a != "number" && !(a instanceof Date))
|
|
2315
2350
|
return !1;
|
|
@@ -2317,7 +2352,7 @@ const Gn = (e) => ({
|
|
|
2317
2352
|
return !isNaN(t.getTime()) && t > s;
|
|
2318
2353
|
},
|
|
2319
2354
|
message: e || "Date must be in the future"
|
|
2320
|
-
}),
|
|
2355
|
+
}), Cl = (e) => ({
|
|
2321
2356
|
validator: (a) => {
|
|
2322
2357
|
if (typeof a != "string" && typeof a != "number" && !(a instanceof Date))
|
|
2323
2358
|
return !1;
|
|
@@ -2325,7 +2360,7 @@ const Gn = (e) => ({
|
|
|
2325
2360
|
return !isNaN(t.getTime()) && t < s;
|
|
2326
2361
|
},
|
|
2327
2362
|
message: e || "Date must be in the past"
|
|
2328
|
-
}),
|
|
2363
|
+
}), Sl = (e) => ({
|
|
2329
2364
|
validator: (a) => {
|
|
2330
2365
|
const t = String(a).replace(/\D/g, "");
|
|
2331
2366
|
if (t.length < 13 || t.length > 19) return !1;
|
|
@@ -2337,14 +2372,14 @@ const Gn = (e) => ({
|
|
|
2337
2372
|
return s % 10 === 0;
|
|
2338
2373
|
},
|
|
2339
2374
|
message: e || "Invalid credit card number"
|
|
2340
|
-
}),
|
|
2375
|
+
}), _l = (e) => ({
|
|
2341
2376
|
pattern: /^\d{5}(-\d{4})?$/,
|
|
2342
2377
|
message: e || "Invalid ZIP code"
|
|
2343
|
-
}),
|
|
2378
|
+
}), Dl = (e) => ({
|
|
2344
2379
|
pattern: /^\d{3}-\d{2}-\d{4}$/,
|
|
2345
2380
|
message: e || "Invalid SSN (format: XXX-XX-XXXX)"
|
|
2346
2381
|
});
|
|
2347
|
-
function
|
|
2382
|
+
function zl(e) {
|
|
2348
2383
|
const a = e.replace(/\D/g, "");
|
|
2349
2384
|
if (a.length < 13 || a.length > 19) return !1;
|
|
2350
2385
|
let t = 0, s = !1;
|
|
@@ -2354,35 +2389,35 @@ function vl(e) {
|
|
|
2354
2389
|
}
|
|
2355
2390
|
return t % 10 === 0;
|
|
2356
2391
|
}
|
|
2357
|
-
function
|
|
2392
|
+
function Il(e) {
|
|
2358
2393
|
return /^(\d{1,3}\.){3}\d{1,3}$/.test(e) ? e.split(".").every((s) => {
|
|
2359
2394
|
const l = parseInt(s);
|
|
2360
2395
|
return l >= 0 && l <= 255;
|
|
2361
2396
|
}) : !1;
|
|
2362
2397
|
}
|
|
2363
|
-
function
|
|
2398
|
+
function xl(e) {
|
|
2364
2399
|
return /^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/.test(e);
|
|
2365
2400
|
}
|
|
2366
|
-
function
|
|
2401
|
+
function Tl(e) {
|
|
2367
2402
|
return /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/.test(e);
|
|
2368
2403
|
}
|
|
2369
|
-
function
|
|
2404
|
+
function Vl(e) {
|
|
2370
2405
|
return /^[A-Za-z0-9+/]*={0,2}$/.test(e);
|
|
2371
2406
|
}
|
|
2372
|
-
function
|
|
2407
|
+
function Nl(e) {
|
|
2373
2408
|
return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e);
|
|
2374
2409
|
}
|
|
2375
|
-
function
|
|
2410
|
+
function Ml(e) {
|
|
2376
2411
|
try {
|
|
2377
2412
|
return JSON.parse(e), !0;
|
|
2378
2413
|
} catch {
|
|
2379
2414
|
return !1;
|
|
2380
2415
|
}
|
|
2381
2416
|
}
|
|
2382
|
-
function
|
|
2417
|
+
function Al(e) {
|
|
2383
2418
|
return /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e);
|
|
2384
2419
|
}
|
|
2385
|
-
function
|
|
2420
|
+
function ql(e, a = "US") {
|
|
2386
2421
|
return {
|
|
2387
2422
|
US: /^\d{5}(-\d{4})?$/,
|
|
2388
2423
|
CA: /^[A-Z]\d[A-Z] \d[A-Z]\d$/,
|
|
@@ -2390,118 +2425,119 @@ function Dl(e, a = "US") {
|
|
|
2390
2425
|
}[a].test(e);
|
|
2391
2426
|
}
|
|
2392
2427
|
export {
|
|
2428
|
+
K as BsaBadge,
|
|
2393
2429
|
E as BsaButton,
|
|
2394
|
-
|
|
2430
|
+
js as BsaButtonBadge,
|
|
2395
2431
|
j as BsaButtonIcon,
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2432
|
+
Ks as BsaButtonPanel,
|
|
2433
|
+
rn as BsaCard,
|
|
2434
|
+
en as BsaCheckbox,
|
|
2435
|
+
vn as BsaConfirmDialog,
|
|
2436
|
+
un as BsaContainer,
|
|
2401
2437
|
S as BsaIcons,
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2438
|
+
tn as BsaInputDate,
|
|
2439
|
+
an as BsaInputSearch,
|
|
2440
|
+
sn as BsaInputSelect,
|
|
2441
|
+
nn as BsaInputText,
|
|
2442
|
+
ln as BsaInputTextarea,
|
|
2443
|
+
cn as BsaLayoutApp,
|
|
2444
|
+
dn as BsaLayoutEmpty,
|
|
2445
|
+
bn as BsaLayoutTwoColumn,
|
|
2446
|
+
ne as BsaLink,
|
|
2447
|
+
Ys as BsaLoading,
|
|
2448
|
+
Js as BsaLogo,
|
|
2449
|
+
Ms as BsaModal,
|
|
2450
|
+
mn as BsaPage,
|
|
2451
|
+
$a as BsaRadio,
|
|
2452
|
+
on as BsaRadioGroup,
|
|
2453
|
+
fn as BsaSection,
|
|
2454
|
+
hn as BsaSidebar,
|
|
2455
|
+
gn as BsaSidebarMenuItem,
|
|
2456
|
+
pn as BsaThemeProvider,
|
|
2457
|
+
Qs as BsaThemeToggle,
|
|
2458
|
+
pt as BsaToast,
|
|
2459
|
+
Gs as BsaToastContainer,
|
|
2460
|
+
yn as BsaTopbar,
|
|
2461
|
+
se as THEME_KEY,
|
|
2462
|
+
Vn as abbreviateNumber,
|
|
2463
|
+
zn as addDays,
|
|
2464
|
+
In as addMonths,
|
|
2465
|
+
xn as addYears,
|
|
2466
|
+
hl as alphabetic,
|
|
2467
|
+
fl as alphanumeric,
|
|
2468
|
+
Es as camelCase,
|
|
2469
|
+
Us as capitalize,
|
|
2470
|
+
Nn as capitalizeWords,
|
|
2471
|
+
Sl as creditCard,
|
|
2472
|
+
Bl as date,
|
|
2473
|
+
Ln as ellipsis,
|
|
2474
|
+
cl as email,
|
|
2475
|
+
En as escapeHtml,
|
|
2476
|
+
kn as formatCurrency,
|
|
2477
|
+
Sn as formatDate,
|
|
2478
|
+
wn as formatNumber,
|
|
2479
|
+
Cn as formatPercentage,
|
|
2480
|
+
Ps as formatRelativeTime,
|
|
2481
|
+
wl as futureDate,
|
|
2482
|
+
Tn as getDaysDifference,
|
|
2483
|
+
Ws as iconNames,
|
|
2484
|
+
al as isAlphabetic,
|
|
2485
|
+
tl as isAlphanumeric,
|
|
2486
|
+
Vl as isBase64,
|
|
2487
|
+
zl as isCreditCard,
|
|
2488
|
+
le as isDate,
|
|
2489
|
+
Jn as isEmail,
|
|
2490
|
+
Zs as isEmpty,
|
|
2491
|
+
Wn as isEqual,
|
|
2492
|
+
jn as isFutureDate,
|
|
2493
|
+
Al as isHexColor,
|
|
2494
|
+
Il as isIPv4,
|
|
2495
|
+
xl as isIPv6,
|
|
2496
|
+
Gn as isInRange,
|
|
2497
|
+
Ml as isJSON,
|
|
2498
|
+
ol as isLength,
|
|
2499
|
+
Tl as isMACAddress,
|
|
2500
|
+
Xn as isNotEmpty,
|
|
2501
|
+
Yn as isNumeric,
|
|
2502
|
+
Kn as isPastDate,
|
|
2503
|
+
el as isPhone,
|
|
2504
|
+
ql as isPostalCode,
|
|
2505
|
+
sl as isSlug,
|
|
2506
|
+
nl as isStrongPassword,
|
|
2507
|
+
Nl as isUUID,
|
|
2508
|
+
Qn as isUrl,
|
|
2509
|
+
Dn as isValidDate,
|
|
2510
|
+
ll as isWeakPassword,
|
|
2511
|
+
An as kebabCase,
|
|
2512
|
+
Hn as mask,
|
|
2513
|
+
kl as matchField,
|
|
2514
|
+
ul as maxLength,
|
|
2515
|
+
yl as maxValue,
|
|
2516
|
+
rl as minLength,
|
|
2517
|
+
gl as minValue,
|
|
2518
|
+
Pn as normalizeWhitespace,
|
|
2519
|
+
ml as numeric,
|
|
2520
|
+
Bn as parseCurrency,
|
|
2521
|
+
_n as parseDate,
|
|
2522
|
+
qn as pascalCase,
|
|
2523
|
+
$l as password,
|
|
2524
|
+
Cl as pastDate,
|
|
2525
|
+
bl as phone,
|
|
2526
|
+
vl as range,
|
|
2527
|
+
On as removeWhitespace,
|
|
2528
|
+
il as required,
|
|
2529
|
+
Fn as slugify,
|
|
2530
|
+
Mn as snakeCase,
|
|
2531
|
+
Dl as ssn,
|
|
2532
|
+
Un as stripHtml,
|
|
2533
|
+
pl as strongPassword,
|
|
2534
|
+
Rn as truncate,
|
|
2535
|
+
Zn as unescapeHtml,
|
|
2536
|
+
dl as url,
|
|
2537
|
+
qs as useConfirmDialog,
|
|
2538
|
+
As as useModal,
|
|
2539
|
+
$n as useStorage,
|
|
2540
|
+
Dt as useTheme,
|
|
2541
|
+
Bt as useToast,
|
|
2542
|
+
_l as zipCode
|
|
2507
2543
|
};
|