@tempots/beatui 0.40.0 → 0.41.0
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/README.md +11 -11
- package/dist/{2019-nWH_nAwT.cjs → 2019-BFDr925O.cjs} +1 -1
- package/dist/{2019-sCKLAY8c.js → 2019-DnG5Y5sm.js} +2 -2
- package/dist/{2020-B4xCW_nu.js → 2020-D0-tZTo7.js} +2 -2
- package/dist/{2020-D7RWX09D.cjs → 2020-gUs7l1CJ.cjs} +1 -1
- package/dist/{ar-D_4BfIJO.cjs → ar-BLgxAefV.cjs} +1 -1
- package/dist/{ar-i2uHmy8P.js → ar-DpQo8C31.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +4 -4
- package/dist/beatui.css +35 -22
- package/dist/beatui.tailwind.css +35 -22
- package/dist/{de-C0PZz9sE.cjs → de-Bv-qs--J.cjs} +1 -1
- package/dist/{de-CeLwmVZz.js → de-D1MQ4wen.js} +1 -1
- package/dist/{es-C8qT1ins.cjs → es-3r8Ko5Dn.cjs} +1 -1
- package/dist/{es-DxOgARww.js → es-DwPjonS7.js} +1 -1
- package/dist/{fa-BFV9MxMX.cjs → fa-Qw6uVZeX.cjs} +1 -1
- package/dist/{fa-B9pEff8A.js → fa-fxf_lWjh.js} +1 -1
- package/dist/{fr-Caeevx56.js → fr-BDDsMHRZ.js} +1 -1
- package/dist/{fr-BBx5IJ7G.cjs → fr-pVhG9qik.cjs} +1 -1
- package/dist/{he-DeN-WW3u.js → he-B4deK_wE.js} +1 -1
- package/dist/{he-CMOvd4Dr.cjs → he-D-fvzfe1.cjs} +1 -1
- package/dist/{hi-Dey2HxiD.js → hi-CxQT8nRD.js} +1 -1
- package/dist/{hi-IOU_PzvH.cjs → hi-DKgxHzmH.cjs} +1 -1
- package/dist/{index-HqWBd-jW.js → index-Acyxme63.js} +3 -3
- package/dist/{index-B0ff5lT-.cjs → index-BZ2AX5sk.cjs} +2 -2
- package/dist/{index-DJqo6Guq.js → index-BwEJlbG2.js} +1 -1
- package/dist/{index-BTZqW3-b.js → index-CWq36UAJ.js} +710 -710
- package/dist/{index-IQ3lRaL0.js → index-Clw0AwwJ.js} +1 -1
- package/dist/{index-C2VAPX2b.cjs → index-DRDJFYRb.cjs} +1 -1
- package/dist/{index-D8fg48Fv.cjs → index-Lj0QS2po.cjs} +1 -1
- package/dist/{index-Dtka01mK.cjs → index-nVVPqgLq.cjs} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +1862 -1865
- package/dist/{it-DghnQdZa.js → it-6QS5PWzQ.js} +1 -1
- package/dist/{it-uQF0jkDT.cjs → it-Ck0r9TO3.cjs} +1 -1
- package/dist/{ja-Kb7rxmFg.js → ja-D2VvVGEN.js} +1 -1
- package/dist/{ja-BJD6uPbl.cjs → ja-D6b9suYB.cjs} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +1 -1
- package/dist/{ko-53o5WJ-v.js → ko-CP_WopWz.js} +1 -1
- package/dist/{ko-B7bLdRnp.cjs → ko-CzvM2Bjv.cjs} +1 -1
- package/dist/{modal-BRUgTJG9.cjs → modal-BmSRMdY9.cjs} +1 -1
- package/dist/{modal-_2B8vIo0.js → modal-DMc-R2VT.js} +2 -2
- package/dist/{nl-DvUVT7xd.js → nl-DZ4dFolZ.js} +1 -1
- package/dist/{nl-CJE0fC8g.cjs → nl-_9vJc8JD.cjs} +1 -1
- package/dist/{notice-C4n5jXi6.js → notice-B5Yn_3Ay.js} +89 -89
- package/dist/{notice-CncwkUTy.cjs → notice-D3P0lewM.cjs} +2 -2
- package/dist/{pl-C3oYeTwf.js → pl-BE81iFSF.js} +1 -1
- package/dist/{pl-DUaY5slY.cjs → pl-DKcVCojx.cjs} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-BJGeScun.js → pt-BcCdXUA2.js} +1 -1
- package/dist/{pt-BAqNKCuy.cjs → pt-DNVS1_MF.cjs} +1 -1
- package/dist/{ru-2irv1YXp.js → ru-Bo_jc3s1.js} +1 -1
- package/dist/{ru-CAlgJm3K.cjs → ru-DTn9Rssv.cjs} +1 -1
- package/dist/{toolbar-CVDXVnje.js → toolbar-DhD5GmMa.js} +1 -1
- package/dist/{toolbar-B7HrL0vD.cjs → toolbar-jPGzdJGi.cjs} +1 -1
- package/dist/{tr-DMiXAhok.cjs → tr-BhTJYHQ3.cjs} +1 -1
- package/dist/{tr-CkHLE5u7.js → tr-CBw3FlOg.js} +1 -1
- package/dist/{translations-Q5C5LyIi.js → translations-B0HuWYIz.js} +1 -1
- package/dist/{translations-DRNj0YIi.cjs → translations-B7_3phoA.cjs} +1 -1
- package/dist/translations-C21osktO.cjs +1 -0
- package/dist/{translations-DEEflRUY.js → translations-D-fMB_IO.js} +195 -167
- package/dist/types/components/form/controller/color-controller.d.ts +1 -1
- package/dist/types/components/form/input/color-input.d.ts +2 -5
- package/dist/types/components/form/input/color-swatch-input.d.ts +9 -0
- package/dist/types/components/form/input/index.d.ts +1 -0
- package/dist/types/components/form/input/input-container.d.ts +7 -0
- package/dist/types/utils/{color-validation.d.ts → color.d.ts} +13 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/{ur-BjiNs3SL.cjs → ur-BjuXyU8Z.cjs} +1 -1
- package/dist/{ur-bxBR_9Z-.js → ur-BsXnPgxd.js} +1 -1
- package/dist/utils-BOEQMy82.js +2512 -0
- package/dist/utils-DH-SYrQg.cjs +1 -0
- package/dist/{vi-CByOZvV2.cjs → vi-CvsTHMkK.cjs} +1 -1
- package/dist/{vi-CKknZqol.js → vi-D1rLo6MX.js} +1 -1
- package/dist/{zh-CmUgcP9o.js → zh-BoLsjdfz.js} +1 -1
- package/dist/{zh-C0QOebEA.cjs → zh-zh1FJ4Ud.cjs} +1 -1
- package/package.json +2 -2
- package/dist/translations-Dw1oO6Dh.cjs +0 -1
- package/dist/utils-BCbc19N0.js +0 -2427
- package/dist/utils-BJZipnfW.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { makeProviderMark as O, localStorageProp as T, computedOf as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { makeProviderMark as O, localStorageProp as T, computedOf as p, Use as A, html as f, attr as c, When as w, Fragment as y, aria as g, coalesce as z, style as D, prop as $, on as I, OnDispose as M, Value as L, WithElement as K, input as W, Empty as S, emitValue as _ } from "@tempots/dom";
|
|
2
|
+
import { WhenInViewport as J, Query as Q, ElementRect as Y } from "@tempots/ui";
|
|
3
|
+
import { b as Z, g as X } from "./colors-WfmhQ5e1.js";
|
|
4
4
|
function E(t, {
|
|
5
5
|
units: e = ["B", "KB", "MB", "GB", "TB"],
|
|
6
6
|
decimalPlaces: n = 0,
|
|
@@ -13,21 +13,21 @@ function E(t, {
|
|
|
13
13
|
unitDisplay: "short",
|
|
14
14
|
maximumFractionDigits: 0
|
|
15
15
|
}).format(0).replace("byte", e[0]);
|
|
16
|
-
let
|
|
16
|
+
let a, r;
|
|
17
17
|
if (typeof t == "bigint") {
|
|
18
18
|
let l = t < 0n ? -t : t;
|
|
19
|
-
for (
|
|
20
|
-
l = l / 1024n,
|
|
21
|
-
|
|
19
|
+
for (a = 0; l >= 1024n && a < e.length - 1; )
|
|
20
|
+
l = l / 1024n, a++;
|
|
21
|
+
r = Number(t) / Math.pow(1024, a);
|
|
22
22
|
} else
|
|
23
|
-
|
|
23
|
+
a = Math.floor(Math.log(Math.abs(t)) / Math.log(1024)), a = Math.min(a, e.length - 1), r = t / Math.pow(1024, a);
|
|
24
24
|
return new Intl.NumberFormat(o, {
|
|
25
25
|
style: "unit",
|
|
26
26
|
unit: "byte",
|
|
27
27
|
unitDisplay: "short",
|
|
28
|
-
minimumFractionDigits:
|
|
29
|
-
maximumFractionDigits:
|
|
30
|
-
}).format(
|
|
28
|
+
minimumFractionDigits: a === 0 ? 0 : n,
|
|
29
|
+
maximumFractionDigits: a === 0 ? 0 : n
|
|
30
|
+
}).format(r).replace("byte", e[a]);
|
|
31
31
|
}
|
|
32
32
|
const N = {
|
|
33
33
|
loadingExtended: "Loading, please wait",
|
|
@@ -90,19 +90,19 @@ const N = {
|
|
|
90
90
|
filesInputInstructions: (t, e, n) => {
|
|
91
91
|
let o = t == null || t > 1 ? "Click to choose or drag files here" : "Click to choose or drag a file here";
|
|
92
92
|
if (t || e) {
|
|
93
|
-
const
|
|
94
|
-
if (t != null && t > 1 &&
|
|
95
|
-
const
|
|
93
|
+
const a = [];
|
|
94
|
+
if (t != null && t > 1 && a.push(`up to ${t} files`), e && n) {
|
|
95
|
+
const r = E(e, {
|
|
96
96
|
units: n
|
|
97
97
|
});
|
|
98
|
-
|
|
98
|
+
a.push(`max ${r} each`);
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
a.length > 0 && (o += ` (${a.join(", ")})`);
|
|
101
101
|
} else if (e && n) {
|
|
102
|
-
const
|
|
102
|
+
const a = E(e, {
|
|
103
103
|
units: n
|
|
104
104
|
});
|
|
105
|
-
o += ` (max ${
|
|
105
|
+
o += ` (max ${a})`;
|
|
106
106
|
}
|
|
107
107
|
return o;
|
|
108
108
|
},
|
|
@@ -126,8 +126,8 @@ const N = {
|
|
|
126
126
|
default: N
|
|
127
127
|
}, Symbol.toStringTag, { value: "Module" })), et = N, ot = "en", nt = (t, e, n) => {
|
|
128
128
|
const o = t[e];
|
|
129
|
-
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((
|
|
130
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
129
|
+
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((a, r) => {
|
|
130
|
+
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(r.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== n ? ". Note that variables only represent file names one level deep." : ""))));
|
|
131
131
|
});
|
|
132
132
|
}, rt = /* @__PURE__ */ new Set([
|
|
133
133
|
"ar",
|
|
@@ -198,19 +198,19 @@ const lt = {
|
|
|
198
198
|
}), n = T({
|
|
199
199
|
defaultValue: "auto",
|
|
200
200
|
key: "beatui-direction-preference"
|
|
201
|
-
}), o =
|
|
201
|
+
}), o = p(
|
|
202
202
|
e,
|
|
203
203
|
n
|
|
204
204
|
)(
|
|
205
|
-
(
|
|
205
|
+
(r, s) => at(s, r)
|
|
206
206
|
);
|
|
207
207
|
return {
|
|
208
208
|
value: {
|
|
209
209
|
locale: e,
|
|
210
|
-
setLocale: (
|
|
210
|
+
setLocale: (r) => e.set(r),
|
|
211
211
|
direction: o,
|
|
212
212
|
directionPreference: n,
|
|
213
|
-
setDirectionPreference: (
|
|
213
|
+
setDirectionPreference: (r) => n.set(r)
|
|
214
214
|
},
|
|
215
215
|
dispose: () => {
|
|
216
216
|
e.dispose(), n.dispose(), o.dispose();
|
|
@@ -221,7 +221,7 @@ const lt = {
|
|
|
221
221
|
variants: it,
|
|
222
222
|
special: ct,
|
|
223
223
|
overrides: j
|
|
224
|
-
} =
|
|
224
|
+
} = Z;
|
|
225
225
|
function k(t, e) {
|
|
226
226
|
switch (t) {
|
|
227
227
|
case "white":
|
|
@@ -231,7 +231,7 @@ function k(t, e) {
|
|
|
231
231
|
case "transparent":
|
|
232
232
|
return "transparent";
|
|
233
233
|
default:
|
|
234
|
-
return
|
|
234
|
+
return X(t, e);
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
function U(t, e) {
|
|
@@ -245,22 +245,22 @@ function U(t, e) {
|
|
|
245
245
|
function x(t, e, n) {
|
|
246
246
|
const o = j[t];
|
|
247
247
|
if (o) {
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
250
|
-
return { backgroundColor:
|
|
248
|
+
const r = o[n];
|
|
249
|
+
if (r)
|
|
250
|
+
return { backgroundColor: r.backgroundColor, textColor: r.color };
|
|
251
251
|
}
|
|
252
252
|
if (e === "solid") {
|
|
253
|
-
const
|
|
254
|
-
if (
|
|
253
|
+
const r = U(t, n);
|
|
254
|
+
if (r)
|
|
255
255
|
return {
|
|
256
|
-
backgroundColor:
|
|
257
|
-
textColor:
|
|
256
|
+
backgroundColor: r.backgroundColor,
|
|
257
|
+
textColor: r.color
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
-
const
|
|
260
|
+
const a = it[e][n];
|
|
261
261
|
return {
|
|
262
|
-
backgroundColor: k(t,
|
|
263
|
-
textColor:
|
|
262
|
+
backgroundColor: k(t, a.bgShade),
|
|
263
|
+
textColor: a.textColor
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
const ut = {
|
|
@@ -273,19 +273,19 @@ const ut = {
|
|
|
273
273
|
light: { shade: 400, textColor: "var(--text-normal-light)" },
|
|
274
274
|
dark: { shade: 600, textColor: "var(--text-normal-dark)" }
|
|
275
275
|
};
|
|
276
|
-
function
|
|
276
|
+
function m(t, e, n) {
|
|
277
277
|
const o = j[t];
|
|
278
278
|
if (o) {
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
281
|
-
return { backgroundColor:
|
|
279
|
+
const r = o[n];
|
|
280
|
+
if (r)
|
|
281
|
+
return { backgroundColor: r.backgroundColor, textColor: r.color };
|
|
282
282
|
}
|
|
283
283
|
if (e === "solid") {
|
|
284
|
-
const
|
|
285
|
-
if (
|
|
284
|
+
const r = U(t, n);
|
|
285
|
+
if (r)
|
|
286
286
|
return {
|
|
287
|
-
backgroundColor:
|
|
288
|
-
textColor:
|
|
287
|
+
backgroundColor: r.backgroundColor,
|
|
288
|
+
textColor: r.color
|
|
289
289
|
};
|
|
290
290
|
const s = ut[n];
|
|
291
291
|
return {
|
|
@@ -293,10 +293,10 @@ function p(t, e, n) {
|
|
|
293
293
|
textColor: s.textColor
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
|
-
const
|
|
296
|
+
const a = e === "light" ? dt[n] : ht[n];
|
|
297
297
|
return {
|
|
298
|
-
backgroundColor: k(t,
|
|
299
|
-
textColor:
|
|
298
|
+
backgroundColor: k(t, a.shade),
|
|
299
|
+
textColor: a.textColor
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
302
|
function V(t, e) {
|
|
@@ -329,8 +329,8 @@ function gt() {
|
|
|
329
329
|
return H ? new Promise((t, e) => {
|
|
330
330
|
const n = indexedDB.open(bt, 1);
|
|
331
331
|
n.onupgradeneeded = function(o) {
|
|
332
|
-
const
|
|
333
|
-
|
|
332
|
+
const a = o.target.result;
|
|
333
|
+
a.objectStoreNames.contains("icons") || a.createObjectStore("icons");
|
|
334
334
|
}, n.onsuccess = function() {
|
|
335
335
|
t(n.result);
|
|
336
336
|
}, n.onerror = function() {
|
|
@@ -343,8 +343,8 @@ function ft(t, e) {
|
|
|
343
343
|
return new Promise(async (n, o) => {
|
|
344
344
|
try {
|
|
345
345
|
if (P) {
|
|
346
|
-
const
|
|
347
|
-
|
|
346
|
+
const r = (await P).transaction("icons", "readwrite");
|
|
347
|
+
r.objectStore("icons").put(e, t), r.oncomplete = n, r.onerror = o;
|
|
348
348
|
} else
|
|
349
349
|
B.set(t, e), n(void 0);
|
|
350
350
|
} catch {
|
|
@@ -390,30 +390,30 @@ function xt(t, e = "solid") {
|
|
|
390
390
|
const n = R(t, e, "light"), o = R(t, e, "dark");
|
|
391
391
|
return `--icon-color: ${n}; --icon-color-dark: ${o}`;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function G({
|
|
394
394
|
icon: t,
|
|
395
395
|
size: e = "md",
|
|
396
396
|
color: n,
|
|
397
397
|
title: o,
|
|
398
|
-
accessibility:
|
|
399
|
-
tone:
|
|
398
|
+
accessibility: a = "auto",
|
|
399
|
+
tone: r = "solid"
|
|
400
400
|
}, ...s) {
|
|
401
|
-
const i =
|
|
402
|
-
|
|
401
|
+
const i = p(
|
|
402
|
+
a,
|
|
403
403
|
o
|
|
404
404
|
)((l, u) => l === "decorative" ? !1 : l === "informative" ? !0 : u != null && u !== "");
|
|
405
405
|
return A(
|
|
406
|
-
|
|
406
|
+
F,
|
|
407
407
|
(l) => f.span(
|
|
408
408
|
c.class(
|
|
409
|
-
|
|
409
|
+
p(e, n)((u) => vt(u ?? "md"))
|
|
410
410
|
),
|
|
411
411
|
c.style(
|
|
412
|
-
|
|
412
|
+
p(
|
|
413
413
|
n,
|
|
414
|
-
|
|
414
|
+
r
|
|
415
415
|
)(
|
|
416
|
-
(u,
|
|
416
|
+
(u, b) => xt(u ?? void 0, b ?? "solid")
|
|
417
417
|
)
|
|
418
418
|
),
|
|
419
419
|
// Add accessibility attributes based on icon type
|
|
@@ -425,9 +425,9 @@ function Ct({
|
|
|
425
425
|
),
|
|
426
426
|
() => g.hidden(!0)
|
|
427
427
|
),
|
|
428
|
-
|
|
428
|
+
J(
|
|
429
429
|
{ once: !0 },
|
|
430
|
-
() =>
|
|
430
|
+
() => Q({
|
|
431
431
|
request: t,
|
|
432
432
|
load: ({ request: u }) => kt(u),
|
|
433
433
|
convertError: String,
|
|
@@ -463,33 +463,33 @@ function Ct({
|
|
|
463
463
|
)
|
|
464
464
|
);
|
|
465
465
|
}
|
|
466
|
-
function
|
|
467
|
-
const
|
|
466
|
+
function Ct(t, e, n, o) {
|
|
467
|
+
const a = [
|
|
468
468
|
"bc-button",
|
|
469
469
|
`bc-button--size-${t}`,
|
|
470
470
|
`bc-control--padding-${t}`,
|
|
471
471
|
`bc-control--rounded-${e}`
|
|
472
472
|
];
|
|
473
|
-
return n &&
|
|
473
|
+
return n && a.push("bc-button--loading"), o && a.push("bc-button--full-width"), a.join(" ");
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function wt(t, e, n) {
|
|
476
476
|
const o = /* @__PURE__ */ new Map();
|
|
477
477
|
o.set("--button-text-shadow", "var(--text-shadow-none)"), o.set("--button-text-shadow-dark", "var(--text-shadow-none)");
|
|
478
|
-
const
|
|
479
|
-
n || (o.set("--button-bg-hover",
|
|
478
|
+
const a = (r, s, i, l) => {
|
|
479
|
+
n || (o.set("--button-bg-hover", r), o.set("--button-text-hover", i), o.set("--button-bg-hover-dark", s), o.set("--button-text-hover-dark", l));
|
|
480
480
|
};
|
|
481
481
|
switch (t) {
|
|
482
482
|
case "filled": {
|
|
483
|
-
const
|
|
484
|
-
o.set("--button-bg",
|
|
483
|
+
const r = x(e, "solid", "light"), s = x(e, "solid", "dark");
|
|
484
|
+
o.set("--button-bg", r.backgroundColor), o.set("--button-text", r.textColor), o.set("--button-bg-dark", s.backgroundColor), o.set("--button-text-dark", s.textColor), o.set(
|
|
485
485
|
"--button-text-shadow",
|
|
486
486
|
"var(--text-shadow-button-filled, var(--text-shadow-sm))"
|
|
487
487
|
), o.set(
|
|
488
488
|
"--button-text-shadow-dark",
|
|
489
489
|
"var(--text-shadow-button-filled, var(--text-shadow-sm))"
|
|
490
490
|
);
|
|
491
|
-
const i =
|
|
492
|
-
|
|
491
|
+
const i = m(e, "solid", "light"), l = m(e, "solid", "dark");
|
|
492
|
+
a(
|
|
493
493
|
i.backgroundColor,
|
|
494
494
|
l.backgroundColor,
|
|
495
495
|
i.textColor,
|
|
@@ -498,10 +498,10 @@ function yt(t, e, n) {
|
|
|
498
498
|
break;
|
|
499
499
|
}
|
|
500
500
|
case "light": {
|
|
501
|
-
const
|
|
502
|
-
o.set("--button-bg",
|
|
503
|
-
const i =
|
|
504
|
-
|
|
501
|
+
const r = x(e, "light", "light"), s = x(e, "light", "dark");
|
|
502
|
+
o.set("--button-bg", r.backgroundColor), o.set("--button-text", r.textColor), o.set("--button-bg-dark", s.backgroundColor), o.set("--button-text-dark", s.textColor);
|
|
503
|
+
const i = m(e, "light", "light"), l = m(e, "light", "dark");
|
|
504
|
+
a(
|
|
505
505
|
i.backgroundColor,
|
|
506
506
|
l.backgroundColor,
|
|
507
507
|
i.textColor,
|
|
@@ -517,29 +517,29 @@ function yt(t, e, n) {
|
|
|
517
517
|
"--button-text-shadow-dark",
|
|
518
518
|
"var(--text-shadow-button-light, var(--text-shadow-xs))"
|
|
519
519
|
);
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
|
|
520
|
+
const r = m(e, "light", "light"), s = m(e, "light", "dark");
|
|
521
|
+
a(
|
|
522
|
+
r.backgroundColor,
|
|
523
523
|
s.backgroundColor,
|
|
524
|
-
|
|
524
|
+
r.textColor,
|
|
525
525
|
s.textColor
|
|
526
526
|
);
|
|
527
527
|
break;
|
|
528
528
|
}
|
|
529
529
|
case "default": {
|
|
530
|
-
const
|
|
531
|
-
o.set("--button-bg",
|
|
530
|
+
const r = x("neutral", "light", "light"), s = x("neutral", "light", "dark");
|
|
531
|
+
o.set("--button-bg", r.backgroundColor), o.set("--button-text", C(e, "light")), o.set("--button-bg-dark", s.backgroundColor), o.set("--button-text-dark", C(e, "dark")), o.set(
|
|
532
532
|
"--button-text-shadow",
|
|
533
533
|
"var(--text-shadow-button-default, var(--text-shadow-2xs))"
|
|
534
534
|
), o.set(
|
|
535
535
|
"--button-text-shadow-dark",
|
|
536
536
|
"var(--text-shadow-button-default, var(--text-shadow-2xs))"
|
|
537
537
|
);
|
|
538
|
-
const i =
|
|
539
|
-
|
|
538
|
+
const i = m("base", "light", "light"), l = m("base", "light", "dark");
|
|
539
|
+
a(
|
|
540
540
|
i.backgroundColor,
|
|
541
541
|
l.backgroundColor,
|
|
542
|
-
o.get("--button-text") ??
|
|
542
|
+
o.get("--button-text") ?? r.textColor,
|
|
543
543
|
o.get("--button-text-dark") ?? s.textColor
|
|
544
544
|
);
|
|
545
545
|
break;
|
|
@@ -549,63 +549,63 @@ function yt(t, e, n) {
|
|
|
549
549
|
break;
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
|
-
return Array.from(o.entries()).map(([
|
|
552
|
+
return Array.from(o.entries()).map(([r, s]) => `${r}: ${s}`).join("; ");
|
|
553
553
|
}
|
|
554
554
|
function Rt({
|
|
555
555
|
type: t = "button",
|
|
556
556
|
disabled: e = !1,
|
|
557
557
|
loading: n = !1,
|
|
558
558
|
variant: o = "filled",
|
|
559
|
-
size:
|
|
560
|
-
color:
|
|
559
|
+
size: a = "md",
|
|
560
|
+
color: r = "base",
|
|
561
561
|
roundedness: s = "sm",
|
|
562
562
|
onClick: i = () => {
|
|
563
563
|
},
|
|
564
564
|
fullWidth: l = !1
|
|
565
565
|
}, ...u) {
|
|
566
|
-
const
|
|
566
|
+
const b = $(null);
|
|
567
567
|
return A(
|
|
568
|
-
|
|
569
|
-
(
|
|
568
|
+
F,
|
|
569
|
+
(h) => f.button(
|
|
570
570
|
c.type(t),
|
|
571
571
|
c.disabled(
|
|
572
|
-
|
|
572
|
+
p(
|
|
573
573
|
e,
|
|
574
574
|
n
|
|
575
575
|
)((d, v) => d || v)
|
|
576
576
|
),
|
|
577
577
|
// Add ARIA attributes for accessibility
|
|
578
578
|
g.busy(n ?? !1),
|
|
579
|
-
w(n ?? !1, () => g.label(
|
|
579
|
+
w(n ?? !1, () => g.label(h.$.loadingExtended)),
|
|
580
580
|
c.class(
|
|
581
|
-
|
|
581
|
+
p(a, s, n, l)(Ct)
|
|
582
582
|
),
|
|
583
|
-
c.style(
|
|
583
|
+
c.style(p(o, r, e)(wt)),
|
|
584
584
|
w(
|
|
585
585
|
n ?? !1,
|
|
586
586
|
() => y(
|
|
587
587
|
D.width(
|
|
588
|
-
|
|
588
|
+
b.map((d) => d == null ? "" : `${d.width}px`)
|
|
589
589
|
),
|
|
590
590
|
D.height(
|
|
591
|
-
|
|
591
|
+
b.map((d) => d == null ? "" : `${d.height}px`)
|
|
592
592
|
),
|
|
593
|
-
|
|
593
|
+
G({ icon: "line-md:loading-twotone-loop", size: a ?? "md" }),
|
|
594
594
|
// Hidden live region for screen reader announcements
|
|
595
595
|
f.span(
|
|
596
596
|
c.class("sr-only"),
|
|
597
597
|
g.live("polite"),
|
|
598
|
-
|
|
598
|
+
h.$.loadingExtended
|
|
599
599
|
)
|
|
600
600
|
),
|
|
601
601
|
() => y(I.click(i), ...u)
|
|
602
602
|
),
|
|
603
603
|
w(
|
|
604
604
|
n != null,
|
|
605
|
-
() =>
|
|
605
|
+
() => Y(
|
|
606
606
|
(d) => M(
|
|
607
607
|
d.on((v) => {
|
|
608
|
-
L.get(n ?? !1) ||
|
|
608
|
+
L.get(n ?? !1) || b.set(v);
|
|
609
609
|
})
|
|
610
610
|
)
|
|
611
611
|
)
|
|
@@ -613,72 +613,98 @@ function Rt({
|
|
|
613
613
|
)
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
|
-
function
|
|
617
|
-
const
|
|
616
|
+
function yt(t, e, n) {
|
|
617
|
+
const o = [
|
|
618
618
|
t ? "bc-base-input-container" : "bc-input-container"
|
|
619
619
|
];
|
|
620
|
-
return e ?
|
|
620
|
+
return e ? o.push(
|
|
621
621
|
t ? "bc-base-input-container--disabled" : "bc-input-container--disabled"
|
|
622
|
-
) :
|
|
622
|
+
) : o.push(
|
|
623
623
|
t ? "bc-base-input-container--default" : "bc-input-container--default"
|
|
624
|
-
), n &&
|
|
624
|
+
), n && o.push("bc-input-container--error"), o.join(" ");
|
|
625
|
+
}
|
|
626
|
+
function It(t, e) {
|
|
627
|
+
const n = ["bc-input-container__input"];
|
|
628
|
+
return t || (n.push(`bc-control--padding-${e}`), n.push(`bc-control--text-size-${e}`)), n.join(" ");
|
|
625
629
|
}
|
|
626
630
|
const Lt = ({
|
|
627
631
|
baseContainer: t,
|
|
628
632
|
disabled: e,
|
|
629
633
|
input: n,
|
|
630
634
|
before: o,
|
|
631
|
-
after:
|
|
632
|
-
hasError:
|
|
635
|
+
after: a,
|
|
636
|
+
hasError: r,
|
|
633
637
|
focusableSelector: s = "input, select, textarea",
|
|
634
638
|
growInput: i = !0,
|
|
635
639
|
size: l
|
|
636
640
|
}, ...u) => {
|
|
637
|
-
const
|
|
641
|
+
const b = L.map(e ?? !1, (h) => h);
|
|
638
642
|
return f.div(
|
|
639
|
-
M(() => L.dispose(
|
|
640
|
-
K((
|
|
643
|
+
M(() => L.dispose(b)),
|
|
644
|
+
K((h) => {
|
|
641
645
|
const d = () => {
|
|
642
|
-
|
|
646
|
+
h.querySelector(s)?.focus();
|
|
643
647
|
};
|
|
644
|
-
return
|
|
648
|
+
return h.addEventListener("click", d), M(() => h.removeEventListener("click", d));
|
|
645
649
|
}),
|
|
646
650
|
c.class(
|
|
647
|
-
|
|
651
|
+
p(
|
|
648
652
|
t,
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
653
|
+
b,
|
|
654
|
+
r ?? !1
|
|
655
|
+
// size ?? 'md'
|
|
652
656
|
)(
|
|
653
|
-
(
|
|
654
|
-
|
|
657
|
+
(h, d, v) => yt(
|
|
658
|
+
h ?? !1,
|
|
655
659
|
d ?? !1,
|
|
656
|
-
v ?? !1
|
|
657
|
-
|
|
660
|
+
v ?? !1
|
|
661
|
+
// (size ?? 'md') as ControlSize
|
|
658
662
|
)
|
|
659
663
|
)
|
|
660
664
|
),
|
|
661
665
|
o != null ? f.span(c.class("bc-input-container__before"), o) : null,
|
|
662
666
|
f.div(
|
|
663
|
-
c.class(
|
|
667
|
+
c.class(
|
|
668
|
+
p(
|
|
669
|
+
t,
|
|
670
|
+
l ?? "md"
|
|
671
|
+
)(
|
|
672
|
+
(h, d) => It(
|
|
673
|
+
h ?? !1,
|
|
674
|
+
d ?? "md"
|
|
675
|
+
)
|
|
676
|
+
)
|
|
677
|
+
),
|
|
678
|
+
// attr.class('bc-input-container__input'),
|
|
664
679
|
c.class(
|
|
665
680
|
L.map(
|
|
666
681
|
i,
|
|
667
|
-
(
|
|
682
|
+
(h) => h ? "bc-input-container__input--grow" : ""
|
|
668
683
|
)
|
|
669
684
|
),
|
|
670
685
|
n
|
|
671
686
|
),
|
|
672
|
-
|
|
687
|
+
a != null ? f.span(c.class("bc-input-container__after"), a) : null,
|
|
673
688
|
...u
|
|
674
689
|
);
|
|
675
|
-
}
|
|
690
|
+
};
|
|
691
|
+
function Ot({
|
|
692
|
+
icon: t,
|
|
693
|
+
size: e = "md",
|
|
694
|
+
color: n = "neutral"
|
|
695
|
+
}) {
|
|
696
|
+
return f.span(
|
|
697
|
+
c.class("bc-input-container__icon"),
|
|
698
|
+
G({ icon: t, size: e, color: n })
|
|
699
|
+
);
|
|
700
|
+
}
|
|
701
|
+
const Dt = ({
|
|
676
702
|
autocomplete: t,
|
|
677
703
|
autofocus: e,
|
|
678
704
|
class: n,
|
|
679
705
|
disabled: o,
|
|
680
|
-
name:
|
|
681
|
-
placeholder:
|
|
706
|
+
name: a,
|
|
707
|
+
placeholder: r,
|
|
682
708
|
id: s,
|
|
683
709
|
required: i,
|
|
684
710
|
hasError: l
|
|
@@ -687,24 +713,24 @@ const Lt = ({
|
|
|
687
713
|
c.autofocus(e),
|
|
688
714
|
c.class(n),
|
|
689
715
|
c.disabled(o),
|
|
690
|
-
c.name(
|
|
691
|
-
c.placeholder(
|
|
716
|
+
c.name(a ?? s),
|
|
717
|
+
c.placeholder(r),
|
|
692
718
|
c.id(s),
|
|
693
719
|
g.required(i),
|
|
694
720
|
l != null ? g.invalid(
|
|
695
721
|
l ?? !1
|
|
696
722
|
) : null
|
|
697
|
-
),
|
|
698
|
-
const { value: e, onBlur: n, onChange: o, onInput:
|
|
723
|
+
), At = (t) => {
|
|
724
|
+
const { value: e, onBlur: n, onChange: o, onInput: a } = t;
|
|
699
725
|
return Lt({
|
|
700
726
|
...t,
|
|
701
727
|
input: W.text(
|
|
702
728
|
Dt(t),
|
|
703
729
|
c.value(e),
|
|
704
730
|
c.class("bc-input"),
|
|
705
|
-
n != null ? I.blur(
|
|
706
|
-
o != null ? I.change(
|
|
707
|
-
|
|
731
|
+
n != null ? I.blur(_(n)) : S,
|
|
732
|
+
o != null ? I.change(_(o)) : S,
|
|
733
|
+
a != null ? I.input(_(a)) : S
|
|
708
734
|
)
|
|
709
735
|
});
|
|
710
736
|
};
|
|
@@ -718,38 +744,38 @@ function Pt({
|
|
|
718
744
|
defaultMessages: n,
|
|
719
745
|
localeLoader: o
|
|
720
746
|
}) {
|
|
721
|
-
const
|
|
722
|
-
if (i ===
|
|
723
|
-
|
|
747
|
+
const a = $(e), r = $(n), s = t.on(async (i) => {
|
|
748
|
+
if (i === a.value) return;
|
|
749
|
+
a.set(i);
|
|
724
750
|
const l = Bt(i);
|
|
725
751
|
for (const u of l)
|
|
726
752
|
try {
|
|
727
|
-
const
|
|
753
|
+
const b = await o(u);
|
|
728
754
|
if (
|
|
729
755
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
730
|
-
typeof
|
|
756
|
+
typeof b.default == "object" && Object.keys(b).length === 1
|
|
731
757
|
) {
|
|
732
758
|
console.error(
|
|
733
759
|
"It appears that you are trying to load a translation module without referencing the default export. Please use `(await import(...)).default` in your loader function."
|
|
734
760
|
);
|
|
735
761
|
return;
|
|
736
762
|
}
|
|
737
|
-
if (i ===
|
|
738
|
-
|
|
763
|
+
if (i === a.value) {
|
|
764
|
+
r.set(b);
|
|
739
765
|
return;
|
|
740
766
|
}
|
|
741
767
|
} catch {
|
|
742
768
|
continue;
|
|
743
769
|
}
|
|
744
|
-
console.warn(`No locale found for "${t.value}", using fallback`), i ===
|
|
770
|
+
console.warn(`No locale found for "${t.value}", using fallback`), i === a.value && r.set(n);
|
|
745
771
|
});
|
|
746
772
|
return {
|
|
747
773
|
/** Clean up all resources and event listeners */
|
|
748
774
|
dispose: () => {
|
|
749
|
-
s(),
|
|
775
|
+
s(), a.dispose(), r.dispose();
|
|
750
776
|
},
|
|
751
777
|
/** Translation functions that return reactive signals */
|
|
752
|
-
t:
|
|
778
|
+
t: r
|
|
753
779
|
};
|
|
754
780
|
}
|
|
755
781
|
function St({
|
|
@@ -760,10 +786,10 @@ function St({
|
|
|
760
786
|
}) {
|
|
761
787
|
return {
|
|
762
788
|
mark: O(o),
|
|
763
|
-
create: (
|
|
789
|
+
create: (a, r) => {
|
|
764
790
|
const {
|
|
765
791
|
value: { locale: s }
|
|
766
|
-
} =
|
|
792
|
+
} = r.getProvider(lt.mark), { t: i, dispose: l } = Pt({
|
|
767
793
|
locale: s,
|
|
768
794
|
defaultMessages: e,
|
|
769
795
|
defaultLocale: t,
|
|
@@ -776,40 +802,42 @@ function St({
|
|
|
776
802
|
}
|
|
777
803
|
};
|
|
778
804
|
}
|
|
779
|
-
const
|
|
805
|
+
const F = St({
|
|
780
806
|
defaultLocale: ot,
|
|
781
807
|
defaultMessages: et,
|
|
782
|
-
localeLoader: async (t) => (await nt(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-
|
|
808
|
+
localeLoader: async (t) => (await nt(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-DpQo8C31.js"), "./locales/de.ts": () => import("./de-D1MQ4wen.js"), "./locales/en.ts": () => Promise.resolve().then(() => tt), "./locales/es.ts": () => import("./es-DwPjonS7.js"), "./locales/fa.ts": () => import("./fa-fxf_lWjh.js"), "./locales/fr.ts": () => import("./fr-BDDsMHRZ.js"), "./locales/he.ts": () => import("./he-B4deK_wE.js"), "./locales/hi.ts": () => import("./hi-CxQT8nRD.js"), "./locales/it.ts": () => import("./it-6QS5PWzQ.js"), "./locales/ja.ts": () => import("./ja-D2VvVGEN.js"), "./locales/ko.ts": () => import("./ko-CP_WopWz.js"), "./locales/nl.ts": () => import("./nl-DZ4dFolZ.js"), "./locales/pl.ts": () => import("./pl-BE81iFSF.js"), "./locales/pt.ts": () => import("./pt-BcCdXUA2.js"), "./locales/ru.ts": () => import("./ru-Bo_jc3s1.js"), "./locales/tr.ts": () => import("./tr-CBw3FlOg.js"), "./locales/ur.ts": () => import("./ur-BsXnPgxd.js"), "./locales/vi.ts": () => import("./vi-D1rLo6MX.js"), "./locales/zh.ts": () => import("./zh-BoLsjdfz.js") }), `./locales/${t}.ts`, 3)).default,
|
|
783
809
|
providerName: "BeatUII18n"
|
|
784
810
|
});
|
|
785
811
|
export {
|
|
786
812
|
Rt as B,
|
|
787
813
|
Dt as C,
|
|
788
|
-
|
|
814
|
+
G as I,
|
|
789
815
|
lt as L,
|
|
790
|
-
|
|
816
|
+
At as T,
|
|
791
817
|
nt as _,
|
|
792
|
-
|
|
818
|
+
F as a,
|
|
793
819
|
Lt as b,
|
|
794
|
-
|
|
820
|
+
Ot as c,
|
|
795
821
|
et as d,
|
|
796
|
-
|
|
822
|
+
x as e,
|
|
797
823
|
E as f,
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
824
|
+
It as g,
|
|
825
|
+
V as h,
|
|
826
|
+
m as i,
|
|
827
|
+
Ct as j,
|
|
828
|
+
wt as k,
|
|
829
|
+
ot as l,
|
|
804
830
|
St as m,
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
831
|
+
H as n,
|
|
832
|
+
pt as o,
|
|
833
|
+
Pt as p,
|
|
834
|
+
q,
|
|
809
835
|
at as r,
|
|
810
836
|
ft as s,
|
|
811
837
|
C as t,
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
838
|
+
jt as u,
|
|
839
|
+
Tt as v,
|
|
840
|
+
Et as w,
|
|
841
|
+
st as x,
|
|
842
|
+
Vt as y
|
|
815
843
|
};
|