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