@tempots/beatui 0.38.0 → 0.40.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/dist/{2019-DxwU2aOm.cjs → 2019-nWH_nAwT.cjs} +1 -1
- package/dist/{2019-CGWicU9n.js → 2019-sCKLAY8c.js} +2 -2
- package/dist/{2020-BRNvbMGL.js → 2020-B4xCW_nu.js} +2 -2
- package/dist/{2020-DHep9dU6.cjs → 2020-D7RWX09D.cjs} +1 -1
- package/dist/{ar-CqAHPRKu.cjs → ar-D_4BfIJO.cjs} +1 -1
- package/dist/{ar-avevuYiW.js → ar-i2uHmy8P.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +54 -49
- package/dist/beatui.css +463 -59
- package/dist/beatui.tailwind.css +463 -59
- package/dist/{de--4OtRESW.cjs → de-C0PZz9sE.cjs} +1 -1
- package/dist/{de-Cz7ah611.js → de-CeLwmVZz.js} +1 -1
- package/dist/{es-CE1wRgxl.cjs → es-C8qT1ins.cjs} +1 -1
- package/dist/{es-CiNQQzF1.js → es-DxOgARww.js} +1 -1
- package/dist/{fa-Gkt0b9XN.js → fa-B9pEff8A.js} +1 -1
- package/dist/{fa-DjuJZNLK.cjs → fa-BFV9MxMX.cjs} +1 -1
- package/dist/{fr-DotyzMGL.cjs → fr-BBx5IJ7G.cjs} +1 -1
- package/dist/{fr-xM9p9Q6G.js → fr-Caeevx56.js} +1 -1
- package/dist/{he-BQ6ygVEQ.cjs → he-CMOvd4Dr.cjs} +1 -1
- package/dist/{he-CoO6PsiS.js → he-DeN-WW3u.js} +1 -1
- package/dist/{hi-DA3-4Cdo.js → hi-Dey2HxiD.js} +1 -1
- package/dist/{hi-BCfJ0mRh.cjs → hi-IOU_PzvH.cjs} +1 -1
- package/dist/{index-CesoPnvj.cjs → index-B-SyWyCc.cjs} +1 -1
- package/dist/{index-DJJ67-RV.js → index-B-pudlMv.js} +58 -58
- package/dist/{index-Dtqe3URb.cjs → index-B0ff5lT-.cjs} +4 -4
- package/dist/{index-i9pAnFtS.js → index-BTZqW3-b.js} +1245 -1232
- package/dist/{index-C5-BM51Y.cjs → index-C2VAPX2b.cjs} +1 -1
- package/dist/{index-DjShJtXp.js → index-CAeOFdez.js} +1 -1
- package/dist/{index-BI5w0jSz.js → index-CBT2SLat.js} +224 -223
- package/dist/{index-Bv2gn_kV.cjs → index-ClFVnBUS.cjs} +3 -3
- package/dist/{index-CCu0qfNP.cjs → index-D8fg48Fv.cjs} +1 -1
- package/dist/{index-C_nSdynJ.js → index-DJqo6Guq.js} +1 -1
- package/dist/{index-CZQHL_pf.cjs → index-Dtka01mK.cjs} +12 -12
- package/dist/{index-C2rz3G1d.js → index-HqWBd-jW.js} +680 -677
- package/dist/{index-D41aREgo.js → index-IQ3lRaL0.js} +1 -1
- package/dist/{index-CKyH3jwP.cjs → index-KPHFBjQB.cjs} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +3349 -3064
- package/dist/{it-EdPuWBJR.js → it-DghnQdZa.js} +1 -1
- package/dist/{it-pv2Gm3jb.cjs → it-uQF0jkDT.cjs} +1 -1
- package/dist/{ja-CuRaPMgh.cjs → ja-BJD6uPbl.cjs} +1 -1
- package/dist/{ja-BSRCR430.js → ja-Kb7rxmFg.js} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +1 -1
- package/dist/{ko-Dm4oD1fh.js → ko-53o5WJ-v.js} +1 -1
- package/dist/{ko-C7YP1PL4.cjs → ko-B7bLdRnp.cjs} +1 -1
- package/dist/markdown/index.cjs.js +1 -1
- package/dist/markdown/index.es.js +1 -1
- package/dist/modal-BRUgTJG9.cjs +1 -0
- package/dist/modal-_2B8vIo0.js +658 -0
- package/dist/{nl-ClCD6lP-.cjs → nl-CJE0fC8g.cjs} +1 -1
- package/dist/{nl-B0l1kdfd.js → nl-DvUVT7xd.js} +1 -1
- package/dist/{notice-BuYqG6zM.js → notice-C4n5jXi6.js} +408 -391
- package/dist/notice-CncwkUTy.cjs +2 -0
- package/dist/{pl-DVKneBSY.js → pl-C3oYeTwf.js} +1 -1
- package/dist/{pl-fyCkqVrr.cjs → pl-DUaY5slY.cjs} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-BHExG3lf.cjs → pt-BAqNKCuy.cjs} +1 -1
- package/dist/{pt-Bw0sTDOX.js → pt-BJGeScun.js} +1 -1
- package/dist/{ru-B26VQ4f9.js → ru-2irv1YXp.js} +1 -1
- package/dist/{ru-PuEOLDw1.cjs → ru-CAlgJm3K.cjs} +1 -1
- package/dist/tailwind/index.cjs.js +1 -1
- package/dist/tailwind/index.es.js +1 -1
- package/dist/tailwind/preset.cjs.js +1 -1
- package/dist/tailwind/preset.es.js +1 -1
- package/dist/tailwind/vite-plugin.cjs.js +1 -1
- package/dist/tailwind/vite-plugin.es.js +1 -1
- package/dist/{toolbar-kwkvH3nX.cjs → toolbar-B7HrL0vD.cjs} +1 -1
- package/dist/{toolbar-ClJbaKID.js → toolbar-CVDXVnje.js} +1 -1
- package/dist/{tr-DQMivdvy.js → tr-CkHLE5u7.js} +1 -1
- package/dist/{tr-CI97fTpD.cjs → tr-DMiXAhok.cjs} +1 -1
- package/dist/{translations-iam7PITs.js → translations-DEEflRUY.js} +96 -112
- package/dist/{translations-ZB5oDFId.cjs → translations-DRNj0YIi.cjs} +1 -1
- package/dist/translations-Dw1oO6Dh.cjs +1 -0
- package/dist/{translations-1yD6Rm5l.js → translations-Q5C5LyIi.js} +1 -1
- package/dist/types/components/beatui.d.ts +4 -1
- package/dist/types/components/button/button.d.ts +4 -3
- package/dist/types/components/form/input/input-wrapper.d.ts +2 -1
- package/dist/types/components/misc/index.d.ts +4 -0
- package/dist/types/components/misc/notification-provider.d.ts +47 -0
- package/dist/types/components/misc/notification.d.ts +17 -0
- package/dist/types/components/misc/opengraph.d.ts +111 -0
- package/dist/types/components/navigation/link/button-link.d.ts +2 -0
- package/dist/types/components/overlay/lightbox.d.ts +1 -1
- package/dist/types/components/overlay/modal.d.ts +2 -2
- package/dist/types/components/overlay/ribbon.d.ts +2 -2
- package/dist/types/utils/use-animated-toggle.d.ts +43 -9
- package/dist/{ur-B3CiO8KH.cjs → ur-BjiNs3SL.cjs} +1 -1
- package/dist/{ur-o3rog5MJ.js → ur-bxBR_9Z-.js} +1 -1
- package/dist/{utils-B_QSuN66.js → utils-BCbc19N0.js} +202 -193
- package/dist/utils-BJZipnfW.cjs +1 -0
- package/dist/{vi-FibsLfdk.cjs → vi-CByOZvV2.cjs} +1 -1
- package/dist/{vi-C7cb2K_B.js → vi-CKknZqol.js} +1 -1
- package/dist/{zh-BtSj_Euh.cjs → zh-C0QOebEA.cjs} +1 -1
- package/dist/{zh-NGrfqAHM.js → zh-CmUgcP9o.js} +1 -1
- package/package.json +4 -3
- package/dist/modal--1g8Y5LH.js +0 -601
- package/dist/modal-mA_AFUCI.cjs +0 -1
- package/dist/notice-DCuZEAQO.cjs +0 -2
- package/dist/translations-DQxg-W9w.cjs +0 -1
- package/dist/utils-BD6NGV1v.cjs +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { makeProviderMark as
|
|
1
|
+
import { makeProviderMark as O, localStorageProp as T, computedOf as m, 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
2
|
import { b as J, g as Q } from "./colors-WfmhQ5e1.js";
|
|
3
3
|
import { WhenInViewport as Y, Query as Z, ElementRect as X } from "@tempots/ui";
|
|
4
|
-
function
|
|
4
|
+
function E(t, {
|
|
5
5
|
units: e = ["B", "KB", "MB", "GB", "TB"],
|
|
6
6
|
decimalPlaces: n = 0,
|
|
7
7
|
locale: o
|
|
@@ -92,14 +92,14 @@ const N = {
|
|
|
92
92
|
if (t || e) {
|
|
93
93
|
const r = [];
|
|
94
94
|
if (t != null && t > 1 && r.push(`up to ${t} files`), e && n) {
|
|
95
|
-
const a =
|
|
95
|
+
const a = E(e, {
|
|
96
96
|
units: n
|
|
97
97
|
});
|
|
98
98
|
r.push(`max ${a} each`);
|
|
99
99
|
}
|
|
100
100
|
r.length > 0 && (o += ` (${r.join(", ")})`);
|
|
101
101
|
} else if (e && n) {
|
|
102
|
-
const r =
|
|
102
|
+
const r = E(e, {
|
|
103
103
|
units: n
|
|
104
104
|
});
|
|
105
105
|
o += ` (max ${r})`;
|
|
@@ -190,12 +190,12 @@ function Vt(t, e) {
|
|
|
190
190
|
return st[e][t];
|
|
191
191
|
}
|
|
192
192
|
const lt = {
|
|
193
|
-
mark:
|
|
193
|
+
mark: O("Locale"),
|
|
194
194
|
create: (t) => {
|
|
195
|
-
const e =
|
|
195
|
+
const e = T({
|
|
196
196
|
defaultValue: navigator.language ?? "en-US",
|
|
197
197
|
key: "beatui-locale"
|
|
198
|
-
}), n =
|
|
198
|
+
}), n = T({
|
|
199
199
|
defaultValue: "auto",
|
|
200
200
|
key: "beatui-direction-preference"
|
|
201
201
|
}), o = m(
|
|
@@ -220,7 +220,7 @@ const lt = {
|
|
|
220
220
|
}, {
|
|
221
221
|
variants: it,
|
|
222
222
|
special: ct,
|
|
223
|
-
overrides:
|
|
223
|
+
overrides: j
|
|
224
224
|
} = J;
|
|
225
225
|
function k(t, e) {
|
|
226
226
|
switch (t) {
|
|
@@ -239,11 +239,11 @@ function U(t, e) {
|
|
|
239
239
|
if (!n) return;
|
|
240
240
|
if (e === "light")
|
|
241
241
|
return n;
|
|
242
|
-
const o =
|
|
242
|
+
const o = j[t];
|
|
243
243
|
return o ? o[e] : n;
|
|
244
244
|
}
|
|
245
245
|
function x(t, e, n) {
|
|
246
|
-
const o =
|
|
246
|
+
const o = j[t];
|
|
247
247
|
if (o) {
|
|
248
248
|
const a = o[n];
|
|
249
249
|
if (a)
|
|
@@ -274,7 +274,7 @@ const ut = {
|
|
|
274
274
|
dark: { shade: 600, textColor: "var(--text-normal-dark)" }
|
|
275
275
|
};
|
|
276
276
|
function p(t, e, n) {
|
|
277
|
-
const o =
|
|
277
|
+
const o = j[t];
|
|
278
278
|
if (o) {
|
|
279
279
|
const a = o[n];
|
|
280
280
|
if (a)
|
|
@@ -299,7 +299,7 @@ function p(t, e, n) {
|
|
|
299
299
|
textColor: r.textColor
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function V(t, e) {
|
|
303
303
|
const n = e === "light" ? 500 : 600;
|
|
304
304
|
switch (t) {
|
|
305
305
|
case "white":
|
|
@@ -315,10 +315,10 @@ function E(t, e) {
|
|
|
315
315
|
function C(t, e) {
|
|
316
316
|
return t === "white" ? "var(--color-white)" : t === "black" ? "var(--color-black)" : t === "transparent" ? "inherit" : k(t, e === "light" ? 800 : 200);
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function R(t, e, n) {
|
|
319
319
|
return e === "soft" ? k(t, n === "light" ? 300 : 700) : k(t, n === "light" ? 500 : 600);
|
|
320
320
|
}
|
|
321
|
-
const bt = "bui-icons",
|
|
321
|
+
const bt = "bui-icons", B = /* @__PURE__ */ new Map(), H = (() => {
|
|
322
322
|
try {
|
|
323
323
|
return typeof indexedDB < "u" && indexedDB !== null;
|
|
324
324
|
} catch {
|
|
@@ -338,32 +338,32 @@ function gt() {
|
|
|
338
338
|
};
|
|
339
339
|
}) : Promise.reject(new Error("IndexedDB not available"));
|
|
340
340
|
}
|
|
341
|
-
const
|
|
341
|
+
const P = H ? gt() : null;
|
|
342
342
|
function ft(t, e) {
|
|
343
343
|
return new Promise(async (n, o) => {
|
|
344
344
|
try {
|
|
345
|
-
if (
|
|
346
|
-
const a = (await
|
|
345
|
+
if (P) {
|
|
346
|
+
const a = (await P).transaction("icons", "readwrite");
|
|
347
347
|
a.objectStore("icons").put(e, t), a.oncomplete = n, a.onerror = o;
|
|
348
348
|
} else
|
|
349
|
-
|
|
349
|
+
B.set(t, e), n(void 0);
|
|
350
350
|
} catch {
|
|
351
|
-
|
|
351
|
+
B.set(t, e), n(void 0);
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
355
|
function pt(t) {
|
|
356
356
|
return new Promise(async (e, n) => {
|
|
357
357
|
try {
|
|
358
|
-
if (
|
|
359
|
-
const s = (await
|
|
358
|
+
if (P) {
|
|
359
|
+
const s = (await P).transaction("icons", "readonly").objectStore("icons").get(t);
|
|
360
360
|
s.onsuccess = function() {
|
|
361
361
|
e(s.result);
|
|
362
362
|
}, s.onerror = n;
|
|
363
363
|
} else
|
|
364
|
-
e(
|
|
364
|
+
e(B.get(t) || null);
|
|
365
365
|
} catch {
|
|
366
|
-
e(
|
|
366
|
+
e(B.get(t) || null);
|
|
367
367
|
}
|
|
368
368
|
});
|
|
369
369
|
}
|
|
@@ -387,7 +387,7 @@ function vt(t) {
|
|
|
387
387
|
}
|
|
388
388
|
function xt(t, e = "solid") {
|
|
389
389
|
if (!t) return "";
|
|
390
|
-
const n =
|
|
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
393
|
function Ct({
|
|
@@ -401,19 +401,19 @@ function Ct({
|
|
|
401
401
|
const i = m(
|
|
402
402
|
r,
|
|
403
403
|
o
|
|
404
|
-
)((l,
|
|
405
|
-
return
|
|
404
|
+
)((l, u) => l === "decorative" ? !1 : l === "informative" ? !0 : u != null && u !== "");
|
|
405
|
+
return A(
|
|
406
406
|
G,
|
|
407
407
|
(l) => f.span(
|
|
408
408
|
c.class(
|
|
409
|
-
m(e, n)((
|
|
409
|
+
m(e, n)((u) => vt(u ?? "md"))
|
|
410
410
|
),
|
|
411
411
|
c.style(
|
|
412
412
|
m(
|
|
413
413
|
n,
|
|
414
414
|
a
|
|
415
415
|
)(
|
|
416
|
-
(
|
|
416
|
+
(u, h) => xt(u ?? void 0, h ?? "solid")
|
|
417
417
|
)
|
|
418
418
|
),
|
|
419
419
|
// Add accessibility attributes based on icon type
|
|
@@ -421,39 +421,39 @@ function Ct({
|
|
|
421
421
|
i,
|
|
422
422
|
() => y(
|
|
423
423
|
c.role("img"),
|
|
424
|
-
|
|
424
|
+
g.label(z(o, l.$.iconDescription))
|
|
425
425
|
),
|
|
426
|
-
() =>
|
|
426
|
+
() => g.hidden(!0)
|
|
427
427
|
),
|
|
428
428
|
Y(
|
|
429
429
|
{ once: !0 },
|
|
430
430
|
() => Z({
|
|
431
431
|
request: t,
|
|
432
|
-
load: ({ request:
|
|
432
|
+
load: ({ request: u }) => kt(u),
|
|
433
433
|
convertError: String,
|
|
434
|
-
success: ({ value:
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
c.innerHTML(
|
|
434
|
+
success: ({ value: u }) => f.span(
|
|
435
|
+
D.width("100%"),
|
|
436
|
+
D.height("100%"),
|
|
437
|
+
c.innerHTML(u)
|
|
438
438
|
),
|
|
439
439
|
pending: () => f.span(
|
|
440
440
|
c.class("animate-spin"),
|
|
441
441
|
// Loading state accessibility
|
|
442
442
|
w(
|
|
443
443
|
i,
|
|
444
|
-
() => y(c.role("img"),
|
|
445
|
-
() =>
|
|
444
|
+
() => y(c.role("img"), g.label(l.$.loadingIcon)),
|
|
445
|
+
() => g.hidden(!0)
|
|
446
446
|
),
|
|
447
447
|
"↻"
|
|
448
448
|
),
|
|
449
|
-
failure: ({ error:
|
|
450
|
-
c.title(
|
|
449
|
+
failure: ({ error: u }) => f.span(
|
|
450
|
+
c.title(u),
|
|
451
451
|
c.class("text-red-500"),
|
|
452
452
|
// Error state accessibility
|
|
453
453
|
w(
|
|
454
454
|
i,
|
|
455
|
-
() => y(c.role("img"),
|
|
456
|
-
() =>
|
|
455
|
+
() => y(c.role("img"), g.label(l.$.failedToLoadIcon)),
|
|
456
|
+
() => g.hidden(!0)
|
|
457
457
|
),
|
|
458
458
|
"🚫"
|
|
459
459
|
)
|
|
@@ -463,14 +463,14 @@ function Ct({
|
|
|
463
463
|
)
|
|
464
464
|
);
|
|
465
465
|
}
|
|
466
|
-
function wt(t, e, n) {
|
|
467
|
-
const
|
|
466
|
+
function wt(t, e, n, o) {
|
|
467
|
+
const r = [
|
|
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 && r.push("bc-button--loading"), o && r.push("bc-button--full-width"), r.join(" ");
|
|
474
474
|
}
|
|
475
475
|
function yt(t, e, n) {
|
|
476
476
|
const o = /* @__PURE__ */ new Map();
|
|
@@ -510,7 +510,7 @@ function yt(t, e, n) {
|
|
|
510
510
|
break;
|
|
511
511
|
}
|
|
512
512
|
case "outline": {
|
|
513
|
-
o.set("--button-bg", "transparent"), o.set("--button-bg-dark", "transparent"), o.set("--button-border",
|
|
513
|
+
o.set("--button-bg", "transparent"), o.set("--button-bg-dark", "transparent"), o.set("--button-border", V(e, "light")), o.set("--button-border-dark", V(e, "dark")), o.set("--button-text", C(e, "light")), o.set("--button-text-dark", C(e, "dark")), o.set(
|
|
514
514
|
"--button-text-shadow",
|
|
515
515
|
"var(--text-shadow-button-light, var(--text-shadow-xs))"
|
|
516
516
|
), o.set(
|
|
@@ -553,76 +553,59 @@ function yt(t, e, n) {
|
|
|
553
553
|
}
|
|
554
554
|
function Rt({
|
|
555
555
|
type: t = "button",
|
|
556
|
-
disabled: e,
|
|
557
|
-
loading: n,
|
|
556
|
+
disabled: e = !1,
|
|
557
|
+
loading: n = !1,
|
|
558
558
|
variant: o = "filled",
|
|
559
559
|
size: r = "md",
|
|
560
560
|
color: a = "base",
|
|
561
561
|
roundedness: s = "sm",
|
|
562
562
|
onClick: i = () => {
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
563
|
+
},
|
|
564
|
+
fullWidth: l = !1
|
|
565
|
+
}, ...u) {
|
|
566
|
+
const h = _(null);
|
|
567
|
+
return A(
|
|
567
568
|
G,
|
|
568
|
-
(
|
|
569
|
+
(b) => f.button(
|
|
569
570
|
c.type(t),
|
|
570
571
|
c.disabled(
|
|
571
572
|
m(
|
|
572
573
|
e,
|
|
573
574
|
n
|
|
574
|
-
)((
|
|
575
|
+
)((d, v) => d || v)
|
|
575
576
|
),
|
|
576
577
|
// Add ARIA attributes for accessibility
|
|
577
|
-
|
|
578
|
-
w(n ?? !1, () =>
|
|
578
|
+
g.busy(n ?? !1),
|
|
579
|
+
w(n ?? !1, () => g.label(b.$.loadingExtended)),
|
|
579
580
|
c.class(
|
|
580
|
-
m(
|
|
581
|
-
r,
|
|
582
|
-
s,
|
|
583
|
-
n
|
|
584
|
-
)(
|
|
585
|
-
(u, h, v) => wt(u ?? "md", h ?? "sm", v)
|
|
586
|
-
)
|
|
587
|
-
),
|
|
588
|
-
c.style(
|
|
589
|
-
m(
|
|
590
|
-
o,
|
|
591
|
-
a,
|
|
592
|
-
e
|
|
593
|
-
)(
|
|
594
|
-
(u, h, v) => yt(
|
|
595
|
-
u ?? "filled",
|
|
596
|
-
h ?? "base",
|
|
597
|
-
v
|
|
598
|
-
)
|
|
599
|
-
)
|
|
581
|
+
m(r, s, n, l)(wt)
|
|
600
582
|
),
|
|
583
|
+
c.style(m(o, a, e)(yt)),
|
|
601
584
|
w(
|
|
602
585
|
n ?? !1,
|
|
603
586
|
() => y(
|
|
604
|
-
|
|
605
|
-
|
|
587
|
+
D.width(
|
|
588
|
+
h.map((d) => d == null ? "" : `${d.width}px`)
|
|
606
589
|
),
|
|
607
|
-
|
|
608
|
-
|
|
590
|
+
D.height(
|
|
591
|
+
h.map((d) => d == null ? "" : `${d.height}px`)
|
|
609
592
|
),
|
|
610
593
|
Ct({ icon: "line-md:loading-twotone-loop", size: r ?? "md" }),
|
|
611
594
|
// Hidden live region for screen reader announcements
|
|
612
595
|
f.span(
|
|
613
596
|
c.class("sr-only"),
|
|
614
|
-
|
|
615
|
-
|
|
597
|
+
g.live("polite"),
|
|
598
|
+
b.$.loadingExtended
|
|
616
599
|
)
|
|
617
600
|
),
|
|
618
|
-
() => y(I.click(i), ...
|
|
601
|
+
() => y(I.click(i), ...u)
|
|
619
602
|
),
|
|
620
603
|
w(
|
|
621
604
|
n != null,
|
|
622
605
|
() => X(
|
|
623
|
-
(
|
|
624
|
-
|
|
625
|
-
|
|
606
|
+
(d) => M(
|
|
607
|
+
d.on((v) => {
|
|
608
|
+
L.get(n ?? !1) || h.set(v);
|
|
626
609
|
})
|
|
627
610
|
)
|
|
628
611
|
)
|
|
@@ -650,25 +633,26 @@ const Lt = ({
|
|
|
650
633
|
focusableSelector: s = "input, select, textarea",
|
|
651
634
|
growInput: i = !0,
|
|
652
635
|
size: l
|
|
653
|
-
}, ...
|
|
654
|
-
const
|
|
636
|
+
}, ...u) => {
|
|
637
|
+
const h = L.map(e ?? !1, (b) => b);
|
|
655
638
|
return f.div(
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
639
|
+
M(() => L.dispose(h)),
|
|
640
|
+
K((b) => {
|
|
641
|
+
const d = () => {
|
|
642
|
+
b.querySelector(s)?.focus();
|
|
659
643
|
};
|
|
660
|
-
return
|
|
644
|
+
return b.addEventListener("click", d), M(() => b.removeEventListener("click", d));
|
|
661
645
|
}),
|
|
662
646
|
c.class(
|
|
663
647
|
m(
|
|
664
648
|
t,
|
|
665
|
-
|
|
649
|
+
h,
|
|
666
650
|
a ?? !1,
|
|
667
651
|
l ?? "md"
|
|
668
652
|
)(
|
|
669
|
-
(
|
|
670
|
-
|
|
671
|
-
|
|
653
|
+
(b, d, v, F) => It(
|
|
654
|
+
b ?? !1,
|
|
655
|
+
d ?? !1,
|
|
672
656
|
v ?? !1,
|
|
673
657
|
F ?? "md"
|
|
674
658
|
)
|
|
@@ -678,15 +662,15 @@ const Lt = ({
|
|
|
678
662
|
f.div(
|
|
679
663
|
c.class("bc-input-container__input"),
|
|
680
664
|
c.class(
|
|
681
|
-
|
|
665
|
+
L.map(
|
|
682
666
|
i,
|
|
683
|
-
(
|
|
667
|
+
(b) => b ? "bc-input-container__input--grow" : ""
|
|
684
668
|
)
|
|
685
669
|
),
|
|
686
670
|
n
|
|
687
671
|
),
|
|
688
672
|
r != null ? f.span(c.class("bc-input-container__after"), r) : null,
|
|
689
|
-
...
|
|
673
|
+
...u
|
|
690
674
|
);
|
|
691
675
|
}, Dt = ({
|
|
692
676
|
autocomplete: t,
|
|
@@ -706,8 +690,8 @@ const Lt = ({
|
|
|
706
690
|
c.name(r ?? s),
|
|
707
691
|
c.placeholder(a),
|
|
708
692
|
c.id(s),
|
|
709
|
-
|
|
710
|
-
l != null ?
|
|
693
|
+
g.required(i),
|
|
694
|
+
l != null ? g.invalid(
|
|
711
695
|
l ?? !1
|
|
712
696
|
) : null
|
|
713
697
|
), Ot = (t) => {
|
|
@@ -718,9 +702,9 @@ const Lt = ({
|
|
|
718
702
|
Dt(t),
|
|
719
703
|
c.value(e),
|
|
720
704
|
c.class("bc-input"),
|
|
721
|
-
n != null ? I.blur(
|
|
722
|
-
o != null ? I.change(
|
|
723
|
-
r != null ? I.input(
|
|
705
|
+
n != null ? I.blur($(n)) : S,
|
|
706
|
+
o != null ? I.change($(o)) : S,
|
|
707
|
+
r != null ? I.input($(r)) : S
|
|
724
708
|
)
|
|
725
709
|
});
|
|
726
710
|
};
|
|
@@ -734,16 +718,16 @@ function Pt({
|
|
|
734
718
|
defaultMessages: n,
|
|
735
719
|
localeLoader: o
|
|
736
720
|
}) {
|
|
737
|
-
const r =
|
|
721
|
+
const r = _(e), a = _(n), s = t.on(async (i) => {
|
|
738
722
|
if (i === r.value) return;
|
|
739
723
|
r.set(i);
|
|
740
724
|
const l = Bt(i);
|
|
741
|
-
for (const
|
|
725
|
+
for (const u of l)
|
|
742
726
|
try {
|
|
743
|
-
const
|
|
727
|
+
const h = await o(u);
|
|
744
728
|
if (
|
|
745
729
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
746
|
-
typeof
|
|
730
|
+
typeof h.default == "object" && Object.keys(h).length === 1
|
|
747
731
|
) {
|
|
748
732
|
console.error(
|
|
749
733
|
"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."
|
|
@@ -751,7 +735,7 @@ function Pt({
|
|
|
751
735
|
return;
|
|
752
736
|
}
|
|
753
737
|
if (i === r.value) {
|
|
754
|
-
a.set(
|
|
738
|
+
a.set(h);
|
|
755
739
|
return;
|
|
756
740
|
}
|
|
757
741
|
} catch {
|
|
@@ -775,7 +759,7 @@ function St({
|
|
|
775
759
|
providerName: o = "I18nProvider"
|
|
776
760
|
}) {
|
|
777
761
|
return {
|
|
778
|
-
mark:
|
|
762
|
+
mark: O(o),
|
|
779
763
|
create: (r, a) => {
|
|
780
764
|
const {
|
|
781
765
|
value: { locale: s }
|
|
@@ -795,7 +779,7 @@ function St({
|
|
|
795
779
|
const G = St({
|
|
796
780
|
defaultLocale: ot,
|
|
797
781
|
defaultMessages: et,
|
|
798
|
-
localeLoader: async (t) => (await nt(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-
|
|
782
|
+
localeLoader: async (t) => (await nt(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-i2uHmy8P.js"), "./locales/de.ts": () => import("./de-CeLwmVZz.js"), "./locales/en.ts": () => Promise.resolve().then(() => tt), "./locales/es.ts": () => import("./es-DxOgARww.js"), "./locales/fa.ts": () => import("./fa-B9pEff8A.js"), "./locales/fr.ts": () => import("./fr-Caeevx56.js"), "./locales/he.ts": () => import("./he-DeN-WW3u.js"), "./locales/hi.ts": () => import("./hi-Dey2HxiD.js"), "./locales/it.ts": () => import("./it-DghnQdZa.js"), "./locales/ja.ts": () => import("./ja-Kb7rxmFg.js"), "./locales/ko.ts": () => import("./ko-53o5WJ-v.js"), "./locales/nl.ts": () => import("./nl-DvUVT7xd.js"), "./locales/pl.ts": () => import("./pl-C3oYeTwf.js"), "./locales/pt.ts": () => import("./pt-BJGeScun.js"), "./locales/ru.ts": () => import("./ru-2irv1YXp.js"), "./locales/tr.ts": () => import("./tr-CkHLE5u7.js"), "./locales/ur.ts": () => import("./ur-bxBR_9Z-.js"), "./locales/vi.ts": () => import("./vi-CKknZqol.js"), "./locales/zh.ts": () => import("./zh-CmUgcP9o.js") }), `./locales/${t}.ts`, 3)).default,
|
|
799
783
|
providerName: "BeatUII18n"
|
|
800
784
|
});
|
|
801
785
|
export {
|
|
@@ -809,8 +793,8 @@ export {
|
|
|
809
793
|
Lt as b,
|
|
810
794
|
x as c,
|
|
811
795
|
et as d,
|
|
812
|
-
|
|
813
|
-
|
|
796
|
+
V as e,
|
|
797
|
+
E as f,
|
|
814
798
|
wt as g,
|
|
815
799
|
p as h,
|
|
816
800
|
yt as i,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-Dw1oO6Dh.cjs"),s={signInTitle:"Sign In",signInButton:"Sign In",emailLabel:"Email",passwordLabel:"Password",rememberMeLabel:"Remember me",forgotPasswordLink:"Forgot password?",noAccountLink:"Don't have an account? Sign up",signUpTitle:"Sign Up",signUpButton:"Sign Up",nameLabel:"Name",confirmPasswordLabel:"Confirm Password",acceptTermsLabel:"I accept the terms and conditions",hasAccountLink:"Already have an account? Sign in",resetPasswordTitle:"Reset Password",resetPasswordButton:"Reset Password",resetPasswordDescription:"Enter your email to reset your password.",backToSignInLink:"Back to sign in",continueWithProvider:e=>`Continue with ${e}`,passwordStrengthWeak:"Weak",passwordStrengthFair:"Fair",passwordStrengthGood:"Good",passwordStrengthStrong:"Strong",orDivider:"or",error:"An error occurred",required:"Required",authenticationTitle:"Authentication"},o=Object.freeze(Object.defineProperty({__proto__:null,default:s},Symbol.toStringTag,{value:"Module"})),t=s,n="en",i=r.makeI18nProvider({defaultLocale:n,defaultMessages:t,localeLoader:async e=>(await r.__variableDynamicImportRuntimeHelper(Object.assign({"./locales/ar.ts":()=>Promise.resolve().then(()=>require("./ar-BsUm-TCn.cjs")),"./locales/de.ts":()=>Promise.resolve().then(()=>require("./de-BUFLEyKr.cjs")),"./locales/en.ts":()=>Promise.resolve().then(()=>o),"./locales/es.ts":()=>Promise.resolve().then(()=>require("./es-BxBeTRCv.cjs")),"./locales/fa.ts":()=>Promise.resolve().then(()=>require("./fa-DxPseW3g.cjs")),"./locales/fr.ts":()=>Promise.resolve().then(()=>require("./fr-Cdyopuz3.cjs")),"./locales/he.ts":()=>Promise.resolve().then(()=>require("./he-DarDNPn0.cjs")),"./locales/hi.ts":()=>Promise.resolve().then(()=>require("./hi-tATwsXJ6.cjs")),"./locales/it.ts":()=>Promise.resolve().then(()=>require("./it-BmFag7j0.cjs")),"./locales/ja.ts":()=>Promise.resolve().then(()=>require("./ja-Dj-bAKLf.cjs")),"./locales/ko.ts":()=>Promise.resolve().then(()=>require("./ko-BomUE-yQ.cjs")),"./locales/nl.ts":()=>Promise.resolve().then(()=>require("./nl-Dr-l6zUy.cjs")),"./locales/pl.ts":()=>Promise.resolve().then(()=>require("./pl-BK0i_yvq.cjs")),"./locales/pt.ts":()=>Promise.resolve().then(()=>require("./pt-oBMmVYcu.cjs")),"./locales/ru.ts":()=>Promise.resolve().then(()=>require("./ru-CtxMmoa6.cjs")),"./locales/tr.ts":()=>Promise.resolve().then(()=>require("./tr-CgJ8uhZu.cjs")),"./locales/ur.ts":()=>Promise.resolve().then(()=>require("./ur-DvqAg9gW.cjs")),"./locales/vi.ts":()=>Promise.resolve().then(()=>require("./vi-D5R3YcU0.cjs")),"./locales/zh.ts":()=>Promise.resolve().then(()=>require("./zh-CCGXcj5r.cjs"))}),`./locales/${e}.ts`,3)).default,providerName:"AuthI18n"});exports.AuthI18n=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("@tempots/dom"),q=require("./colors-Qc1mmmfr.cjs"),C=require("@tempots/ui");function w(t,{units:e=["B","KB","MB","GB","TB"],decimalPlaces:n=0,locale:o}={}){if(t===0||t===0n)return new Intl.NumberFormat(o,{style:"unit",unit:"byte",unitDisplay:"short",maximumFractionDigits:0}).format(0).replace("byte",e[0]);let a,s;if(typeof t=="bigint"){let i=t<0n?-t:t;for(a=0;i>=1024n&&a<e.length-1;)i=i/1024n,a++;s=Number(t)/Math.pow(1024,a)}else a=Math.floor(Math.log(Math.abs(t))/Math.log(1024)),a=Math.min(a,e.length-1),s=t/Math.pow(1024,a);return new Intl.NumberFormat(o,{style:"unit",unit:"byte",unitDisplay:"short",minimumFractionDigits:a===0?0:n,maximumFractionDigits:a===0?0:n}).format(s).replace("byte",e[a])}const S={loadingExtended:"Loading, please wait",loadingShort:"Loading...",locale:"Locale",iconDescription:"Icon",loadingIcon:"Loading icon",failedToLoadIcon:"Failed to load icon",editLabel:"Edit",selectOne:"Select one",selectMany:"Select many",noResults:"No results",passwordPlaceholderText:"Secret Password",togglePasswordVisibility:"Toggle password visibility",toggleMenu:"Toggle menu",toggleAside:"Toggle aside",mainNavigation:"Main navigation",sidebar:"Sidebar",closeDrawer:"Close drawer",closeModal:"Close modal",confirm:"Confirm",cancel:"Cancel",addLabel:"Add",removeItem:"Remove item",currentLocale:"English",ar:"Arabic",de:"German",en:"English",es:"Spanish",fr:"French",hi:"Hindi",it:"Italian",ja:"Japanese",ko:"Korean",nl:"Dutch",pl:"Polish",pt:"Portuguese",ru:"Russian",tr:"Turkish",vi:"Vietnamese",zh:"Chinese",he:"Hebrew",fa:"Persian",ur:"Urdu",emailPlaceholderText:"Enter your email",incrementValue:"Increment value",decrementValue:"Decrement value",dropZoneInstructions:t=>t?"Click to choose or drag files here, or press Enter or Space to open file selector":"Drag files here",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Remove file",clearAllFiles:"Clear all files",clearValue:"Reset",unknownType:"Unknown type",filesInputInstructions:(t,e,n)=>{let o=t==null||t>1?"Click to choose or drag files here":"Click to choose or drag a file here";if(t||e){const a=[];if(t!=null&&t>1&&a.push(`up to ${t} files`),e&&n){const s=w(e,{units:n});a.push(`max ${s} each`)}a.length>0&&(o+=` (${a.join(", ")})`)}else if(e&&n){const a=w(e,{units:n});o+=` (max ${a})`}return o},prosemirror:{bold:"Bold",italic:"Italic",code:"Inline code",link:"Insert link",removeLink:"Remove link",heading:t=>`Heading ${t}`,bulletList:"Bullet list",orderedList:"Ordered list",blockquote:"Blockquote",codeBlock:"Code block",horizontalRule:"Horizontal rule",linkUrlPlaceholder:"https://example.com"}},K=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),M=S,_="en",V=(t,e,n)=>{const o=t[e];return o?typeof o=="function"?o():Promise.resolve(o):new Promise((a,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},Y=new Set(["ar","he","fa","ur","ps","sd","ku","dv","yi","ji","iw","in"]);function I(t){if(!t)return"ltr";const e=t.split(/[-_]/)[0].toLowerCase();return Y.has(e)?"rtl":"ltr"}function $(t,e){return t==="auto"?I(e):t}function J(t){return`b-${t}`}function Q(t){return I(t)==="rtl"}function Z(t){return t==="ltr"?"rtl":"ltr"}const O={ltr:{"inline-start":"left","inline-end":"right","block-start":"top","block-end":"bottom"},rtl:{"inline-start":"right","inline-end":"left","block-start":"top","block-end":"bottom"}};function X(t,e){return O[e][t]}const E={mark:r.makeProviderMark("Locale"),create:t=>{const e=r.localStorageProp({defaultValue:navigator.language??"en-US",key:"beatui-locale"}),n=r.localStorageProp({defaultValue:"auto",key:"beatui-direction-preference"}),o=r.computedOf(e,n)((s,l)=>$(l,s));return{value:{locale:e,setLocale:s=>e.set(s),direction:o,directionPreference:n,setDirectionPreference:s=>n.set(s)},dispose:()=>{e.dispose(),n.dispose(),o.dispose()}}}},{variants:tt,special:et,overrides:P}=q.backgroundConfig;function m(t,e){switch(t){case"white":return"var(--color-white)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return q.getColorVar(t,e)}}function T(t,e){const n=et[t];if(!n)return;if(e==="light")return n;const o=P[t];return o?o[e]:n}function f(t,e,n){const o=P[t];if(o){const s=o[n];if(s)return{backgroundColor:s.backgroundColor,textColor:s.color}}if(e==="solid"){const s=T(t,n);if(s)return{backgroundColor:s.backgroundColor,textColor:s.color}}const a=tt[e][n];return{backgroundColor:m(t,a.bgShade),textColor:a.textColor}}const rt={light:{shade:700,textColor:"var(--color-white)"},dark:{shade:600,textColor:"var(--text-inverted-dark)"}},ot={light:{shade:300,textColor:"var(--text-normal-light)"},dark:{shade:700,textColor:"var(--text-normal-dark)"}},nt={light:{shade:400,textColor:"var(--text-normal-light)"},dark:{shade:600,textColor:"var(--text-normal-dark)"}};function g(t,e,n){const o=P[t];if(o){const s=o[n];if(s)return{backgroundColor:s.backgroundColor,textColor:s.color}}if(e==="solid"){const s=T(t,n);if(s)return{backgroundColor:s.backgroundColor,textColor:s.color};const l=rt[n];return{backgroundColor:m(t,l.shade),textColor:l.textColor}}const a=e==="light"?ot[n]:nt[n];return{backgroundColor:m(t,a.shade),textColor:a.textColor}}function y(t,e){const n=e==="light"?500:600;switch(t){case"white":return e==="light"?"var(--text-inverse-light)":"var(--text-inverted-dark)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return m(t,n)}}function p(t,e){return t==="white"?"var(--color-white)":t==="black"?"var(--color-black)":t==="transparent"?"inherit":m(t,e==="light"?800:200)}function B(t,e,n){return e==="soft"?m(t,n==="light"?300:700):m(t,n==="light"?500:600)}const at="bui-icons",v=new Map,L=(()=>{try{return typeof indexedDB<"u"&&indexedDB!==null}catch{return!1}})();function st(){return L?new Promise((t,e)=>{const n=indexedDB.open(at,1);n.onupgradeneeded=function(o){const a=o.target.result;a.objectStoreNames.contains("icons")||a.createObjectStore("icons")},n.onsuccess=function(){t(n.result)},n.onerror=function(){e(n.error)}}):Promise.reject(new Error("IndexedDB not available"))}const x=L?st():null;function j(t,e){return new Promise(async(n,o)=>{try{if(x){const s=(await x).transaction("icons","readwrite");s.objectStore("icons").put(e,t),s.oncomplete=n,s.onerror=o}else v.set(t,e),n(void 0)}catch{v.set(t,e),n(void 0)}})}function R(t){return new Promise(async(e,n)=>{try{if(x){const l=(await x).transaction("icons","readonly").objectStore("icons").get(t);l.onsuccess=function(){e(l.result)},l.onerror=n}else e(v.get(t)||null)}catch{e(v.get(t)||null)}})}async function lt(t){const e=`https://api.iconify.design/${t}.svg`;return fetch(e).then(n=>{if(n.status===200)return n.text();throw new Error(`Failed to load icon: ${t}`)})}async function it(t){const e=t.replace(":","/"),n=await R(e);if(n)return n;const o=await lt(e);return await j(e,o),o}function ct(t){return["bc-icon",`bc-icon--${t}`].join(" ")}function ut(t,e="solid"){if(!t)return"";const n=B(t,e,"light"),o=B(t,e,"dark");return`--icon-color: ${n}; --icon-color-dark: ${o}`}function A({icon:t,size:e="md",color:n,title:o,accessibility:a="auto",tone:s="solid"},...l){const c=r.computedOf(a,o)((i,u)=>i==="decorative"?!1:i==="informative"?!0:u!=null&&u!=="");return r.Use(D,i=>r.html.span(r.attr.class(r.computedOf(e,n)(u=>ct(u??"md"))),r.attr.style(r.computedOf(n,s)((u,h)=>ut(u??void 0,h??"solid"))),r.When(c,()=>r.Fragment(r.attr.role("img"),r.aria.label(r.coalesce(o,i.$.iconDescription))),()=>r.aria.hidden(!0)),C.WhenInViewport({once:!0},()=>C.Query({request:t,load:({request:u})=>it(u),convertError:String,success:({value:u})=>r.html.span(r.style.width("100%"),r.style.height("100%"),r.attr.innerHTML(u)),pending:()=>r.html.span(r.attr.class("animate-spin"),r.When(c,()=>r.Fragment(r.attr.role("img"),r.aria.label(i.$.loadingIcon)),()=>r.aria.hidden(!0)),"↻"),failure:({error:u})=>r.html.span(r.attr.title(u),r.attr.class("text-red-500"),r.When(c,()=>r.Fragment(r.attr.role("img"),r.aria.label(i.$.failedToLoadIcon)),()=>r.aria.hidden(!0)),"🚫")})),...l))}function F(t,e,n,o){const a=["bc-button",`bc-button--size-${t}`,`bc-control--padding-${t}`,`bc-control--rounded-${e}`];return n&&a.push("bc-button--loading"),o&&a.push("bc-button--full-width"),a.join(" ")}function N(t,e,n){const o=new Map;o.set("--button-text-shadow","var(--text-shadow-none)"),o.set("--button-text-shadow-dark","var(--text-shadow-none)");const a=(s,l,c,i)=>{n||(o.set("--button-bg-hover",s),o.set("--button-text-hover",c),o.set("--button-bg-hover-dark",l),o.set("--button-text-hover-dark",i))};switch(t){case"filled":{const s=f(e,"solid","light"),l=f(e,"solid","dark");o.set("--button-bg",s.backgroundColor),o.set("--button-text",s.textColor),o.set("--button-bg-dark",l.backgroundColor),o.set("--button-text-dark",l.textColor),o.set("--button-text-shadow","var(--text-shadow-button-filled, var(--text-shadow-sm))"),o.set("--button-text-shadow-dark","var(--text-shadow-button-filled, var(--text-shadow-sm))");const c=g(e,"solid","light"),i=g(e,"solid","dark");a(c.backgroundColor,i.backgroundColor,c.textColor,i.textColor);break}case"light":{const s=f(e,"light","light"),l=f(e,"light","dark");o.set("--button-bg",s.backgroundColor),o.set("--button-text",s.textColor),o.set("--button-bg-dark",l.backgroundColor),o.set("--button-text-dark",l.textColor);const c=g(e,"light","light"),i=g(e,"light","dark");a(c.backgroundColor,i.backgroundColor,c.textColor,i.textColor);break}case"outline":{o.set("--button-bg","transparent"),o.set("--button-bg-dark","transparent"),o.set("--button-border",y(e,"light")),o.set("--button-border-dark",y(e,"dark")),o.set("--button-text",p(e,"light")),o.set("--button-text-dark",p(e,"dark")),o.set("--button-text-shadow","var(--text-shadow-button-light, var(--text-shadow-xs))"),o.set("--button-text-shadow-dark","var(--text-shadow-button-light, var(--text-shadow-xs))");const s=g(e,"light","light"),l=g(e,"light","dark");a(s.backgroundColor,l.backgroundColor,s.textColor,l.textColor);break}case"default":{const s=f("neutral","light","light"),l=f("neutral","light","dark");o.set("--button-bg",s.backgroundColor),o.set("--button-text",p(e,"light")),o.set("--button-bg-dark",l.backgroundColor),o.set("--button-text-dark",p(e,"dark")),o.set("--button-text-shadow","var(--text-shadow-button-default, var(--text-shadow-2xs))"),o.set("--button-text-shadow-dark","var(--text-shadow-button-default, var(--text-shadow-2xs))");const c=g("base","light","light"),i=g("base","light","dark");a(c.backgroundColor,i.backgroundColor,o.get("--button-text")??s.textColor,o.get("--button-text-dark")??l.textColor);break}case"text":{o.set("--button-bg","transparent"),o.set("--button-bg-dark","transparent"),o.set("--button-text",p(e,"light")),o.set("--button-text-dark",p(e,"dark")),n||o.set("--button-hover-decoration","underline");break}}return Array.from(o.entries()).map(([s,l])=>`${s}: ${l}`).join("; ")}function dt({type:t="button",disabled:e=!1,loading:n=!1,variant:o="filled",size:a="md",color:s="base",roundedness:l="sm",onClick:c=()=>{},fullWidth:i=!1},...u){const h=r.prop(null);return r.Use(D,b=>r.html.button(r.attr.type(t),r.attr.disabled(r.computedOf(e,n)((d,k)=>d||k)),r.aria.busy(n??!1),r.When(n??!1,()=>r.aria.label(b.$.loadingExtended)),r.attr.class(r.computedOf(a,l,n,i)(F)),r.attr.style(r.computedOf(o,s,e)(N)),r.When(n??!1,()=>r.Fragment(r.style.width(h.map(d=>d==null?"":`${d.width}px`)),r.style.height(h.map(d=>d==null?"":`${d.height}px`)),A({icon:"line-md:loading-twotone-loop",size:a??"md"}),r.html.span(r.attr.class("sr-only"),r.aria.live("polite"),b.$.loadingExtended)),()=>r.Fragment(r.on.click(c),...u)),r.When(n!=null,()=>C.ElementRect(d=>r.OnDispose(d.on(k=>{r.Value.get(n??!1)||h.set(k)}))))))}function ht(t,e,n,o){const a=[t?"bc-base-input-container":"bc-input-container"];return e?a.push(t?"bc-base-input-container--disabled":"bc-input-container--disabled"):a.push(t?"bc-base-input-container--default":"bc-input-container--default"),n&&a.push("bc-input-container--error"),t||(a.push(`bc-control--padding-${o}`),a.push(`bc-control--text-size-${o}`)),a.join(" ")}const U=({baseContainer:t,disabled:e,input:n,before:o,after:a,hasError:s,focusableSelector:l="input, select, textarea",growInput:c=!0,size:i},...u)=>{const h=r.Value.map(e??!1,b=>b);return r.html.div(r.OnDispose(()=>r.Value.dispose(h)),r.WithElement(b=>{const d=()=>{b.querySelector(l)?.focus()};return b.addEventListener("click",d),r.OnDispose(()=>b.removeEventListener("click",d))}),r.attr.class(r.computedOf(t,h,s??!1,i??"md")((b,d,k,z)=>ht(b??!1,d??!1,k??!1,z??"md"))),o!=null?r.html.span(r.attr.class("bc-input-container__before"),o):null,r.html.div(r.attr.class("bc-input-container__input"),r.attr.class(r.Value.map(c,b=>b?"bc-input-container__input--grow":"")),n),a!=null?r.html.span(r.attr.class("bc-input-container__after"),a):null,...u)},H=({autocomplete:t,autofocus:e,class:n,disabled:o,name:a,placeholder:s,id:l,required:c,hasError:i})=>r.Fragment(r.attr.autocomplete(t),r.attr.autofocus(e),r.attr.class(n),r.attr.disabled(o),r.attr.name(a??l),r.attr.placeholder(s),r.attr.id(l),r.aria.required(c),i!=null?r.aria.invalid(i??!1):null),bt=t=>{const{value:e,onBlur:n,onChange:o,onInput:a}=t;return U({...t,input:r.input.text(H(t),r.attr.value(e),r.attr.class("bc-input"),n!=null?r.on.blur(r.emitValue(n)):r.Empty,o!=null?r.on.change(r.emitValue(o)):r.Empty,a!=null?r.on.input(r.emitValue(a)):r.Empty)})};function gt(t){const e=t.split("-"),n=[t];return e.length>1&&n.push(e[0]),n}function W({locale:t,defaultLocale:e="en-US",defaultMessages:n,localeLoader:o}){const a=r.prop(e),s=r.prop(n),l=t.on(async c=>{if(c===a.value)return;a.set(c);const i=gt(c);for(const u of i)try{const h=await o(u);if(typeof h.default=="object"&&Object.keys(h).length===1){console.error("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.");return}if(c===a.value){s.set(h);return}}catch{continue}console.warn(`No locale found for "${t.value}", using fallback`),c===a.value&&s.set(n)});return{dispose:()=>{l(),a.dispose(),s.dispose()},t:s}}function G({defaultLocale:t,defaultMessages:e,localeLoader:n,providerName:o="I18nProvider"}){return{mark:r.makeProviderMark(o),create:(a,s)=>{const{value:{locale:l}}=s.getProvider(E.mark),{t:c,dispose:i}=W({locale:l,defaultMessages:e,defaultLocale:t,localeLoader:n});return{value:c,dispose:i}}}}const D=G({defaultLocale:_,defaultMessages:M,localeLoader:async t=>(await V(Object.assign({"./locales/ar.ts":()=>Promise.resolve().then(()=>require("./ar-D_4BfIJO.cjs")),"./locales/de.ts":()=>Promise.resolve().then(()=>require("./de-C0PZz9sE.cjs")),"./locales/en.ts":()=>Promise.resolve().then(()=>K),"./locales/es.ts":()=>Promise.resolve().then(()=>require("./es-C8qT1ins.cjs")),"./locales/fa.ts":()=>Promise.resolve().then(()=>require("./fa-BFV9MxMX.cjs")),"./locales/fr.ts":()=>Promise.resolve().then(()=>require("./fr-BBx5IJ7G.cjs")),"./locales/he.ts":()=>Promise.resolve().then(()=>require("./he-CMOvd4Dr.cjs")),"./locales/hi.ts":()=>Promise.resolve().then(()=>require("./hi-IOU_PzvH.cjs")),"./locales/it.ts":()=>Promise.resolve().then(()=>require("./it-uQF0jkDT.cjs")),"./locales/ja.ts":()=>Promise.resolve().then(()=>require("./ja-BJD6uPbl.cjs")),"./locales/ko.ts":()=>Promise.resolve().then(()=>require("./ko-B7bLdRnp.cjs")),"./locales/nl.ts":()=>Promise.resolve().then(()=>require("./nl-CJE0fC8g.cjs")),"./locales/pl.ts":()=>Promise.resolve().then(()=>require("./pl-DUaY5slY.cjs")),"./locales/pt.ts":()=>Promise.resolve().then(()=>require("./pt-BAqNKCuy.cjs")),"./locales/ru.ts":()=>Promise.resolve().then(()=>require("./ru-CAlgJm3K.cjs")),"./locales/tr.ts":()=>Promise.resolve().then(()=>require("./tr-DMiXAhok.cjs")),"./locales/ur.ts":()=>Promise.resolve().then(()=>require("./ur-BjiNs3SL.cjs")),"./locales/vi.ts":()=>Promise.resolve().then(()=>require("./vi-CByOZvV2.cjs")),"./locales/zh.ts":()=>Promise.resolve().then(()=>require("./zh-C0QOebEA.cjs"))}),`./locales/${t}.ts`,3)).default,providerName:"BeatUII18n"});exports.BeatUII18n=D;exports.Button=dt;exports.CommonInputAttributes=H;exports.Icon=A;exports.InputContainer=U;exports.LOGICAL_PROPERTY_MAP=O;exports.Locale=E;exports.TextInput=bt;exports.__variableDynamicImportRuntimeHelper=V;exports.backgroundValue=f;exports.borderColorValue=y;exports.defaultLocale=_;exports.defaultMessages=M;exports.formatFileSize=w;exports.generateButtonClasses=F;exports.generateButtonStyles=N;exports.getDirectionClassName=J;exports.getDirectionFromLocale=I;exports.getIconLocally=R;exports.getOppositeDirection=Z;exports.getPhysicalProperty=X;exports.hoverBackgroundValue=g;exports.isIndexedDBAvailable=L;exports.isRTLLocale=Q;exports.makeI18nProvider=G;exports.makeMessages=W;exports.resolveDirection=$;exports.storeIconLocally=j;exports.textColorValue=p;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { TNode } from '@tempots/dom';
|
|
2
2
|
import { AppearancePreference } from './theme';
|
|
3
|
+
import { NotificationViewportPosition } from './misc/notification-provider';
|
|
3
4
|
export type BeatUIOptions = {
|
|
4
5
|
includeAuthI18n?: boolean;
|
|
5
6
|
enableAppearance?: boolean;
|
|
6
7
|
defaultAppearance?: AppearancePreference;
|
|
7
8
|
appearancePreferenceKey?: string;
|
|
9
|
+
includeNotifications?: boolean;
|
|
10
|
+
notificationPosition?: NotificationViewportPosition;
|
|
8
11
|
};
|
|
9
|
-
export declare function BeatUI({ includeAuthI18n, enableAppearance, defaultAppearance, appearancePreferenceKey, }: BeatUIOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
12
|
+
export declare function BeatUI({ includeAuthI18n, enableAppearance, defaultAppearance, appearancePreferenceKey, includeNotifications, notificationPosition, }: BeatUIOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
@@ -12,7 +12,8 @@ export interface ButtonOptions {
|
|
|
12
12
|
color?: Value<ThemeColorName | 'black' | 'white'>;
|
|
13
13
|
roundedness?: Value<RadiusName>;
|
|
14
14
|
onClick?: () => void;
|
|
15
|
+
fullWidth?: Value<boolean>;
|
|
15
16
|
}
|
|
16
|
-
export declare function generateButtonClasses(size: ControlSize, roundedness: RadiusName, loading
|
|
17
|
-
export declare function generateButtonStyles(variant: ButtonVariant, color: ExtendedColor, disabled
|
|
18
|
-
export declare function Button({ type, disabled, loading, variant, size, color, roundedness, onClick, }: ButtonOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
17
|
+
export declare function generateButtonClasses(size: ControlSize, roundedness: RadiusName, loading: boolean, fullWidth: boolean): string;
|
|
18
|
+
export declare function generateButtonStyles(variant: ButtonVariant, color: ExtendedColor, disabled: boolean): string;
|
|
19
|
+
export declare function Button({ type, disabled, loading, variant, size, color, roundedness, onClick, fullWidth, }: ButtonOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
@@ -2,6 +2,7 @@ import { TNode, Value } from '@tempots/dom';
|
|
|
2
2
|
export declare const RequiredSymbol: import("@tempots/dom").Renderable;
|
|
3
3
|
export type InputWrapperLayout = 'vertical' | 'horizontal' | 'horizontal-label-right' | 'horizontal-fixed';
|
|
4
4
|
export type InputWrapperOptions = {
|
|
5
|
+
fullWidth?: Value<boolean>;
|
|
5
6
|
label?: TNode;
|
|
6
7
|
labelChildren?: TNode;
|
|
7
8
|
context?: TNode;
|
|
@@ -15,4 +16,4 @@ export type InputWrapperOptions = {
|
|
|
15
16
|
layout?: Value<InputWrapperLayout>;
|
|
16
17
|
labelWidth?: Value<string>;
|
|
17
18
|
};
|
|
18
|
-
export declare const InputWrapper: ({ required, label, labelChildren, context, description, content, error, labelFor, hasError, disabled, layout, labelWidth, }: InputWrapperOptions, ...children: TNode[]) => import("@tempots/dom").Renderable;
|
|
19
|
+
export declare const InputWrapper: ({ fullWidth, required, label, labelChildren, context, description, content, error, labelFor, hasError, disabled, layout, labelWidth, }: InputWrapperOptions, ...children: TNode[]) => import("@tempots/dom").Renderable;
|