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