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