@tempots/beatui 0.22.0 → 0.24.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 +9 -0
- package/dist/{2019-DsAbc1I5.cjs → 2019-7ojCcWUJ.cjs} +1 -1
- package/dist/{2019-BD_R8GCb.js → 2019-JwkYbae8.js} +2 -2
- package/dist/{2020-j6NLRYni.cjs → 2020-BLYgDBO4.cjs} +1 -1
- package/dist/{2020-DZOE7XZH.js → 2020-kK0rQWn9.js} +2 -2
- package/dist/{ar-CYAprS9_.cjs → ar-BAb4yHZS.cjs} +1 -1
- package/dist/{ar-DuYtkwHz.js → ar-BgrUqaxG.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +3 -3
- package/dist/beatui.css +610 -394
- package/dist/beatui.tailwind.css +606 -394
- package/dist/{colors-B8HoRLA_.cjs → colors-Qc1mmmfr.cjs} +1 -1
- package/dist/{colors-5Nwx_gSj.js → colors-WfmhQ5e1.js} +63 -67
- package/dist/{de-BSxDfb1B.js → de-D_sdCcAw.js} +1 -1
- package/dist/{de-rQvC-Ydh.cjs → de-Dn2CdXgD.cjs} +1 -1
- package/dist/{es-BvmzhRc0.cjs → es-CEPxKSog.cjs} +1 -1
- package/dist/{es-CAIPTBfa.js → es-DczvLqEV.js} +1 -1
- package/dist/{fa-COTldXuh.js → fa-DhPP5Tgo.js} +1 -1
- package/dist/{fa-B3IJgHCh.cjs → fa-NvkKjIQ6.cjs} +1 -1
- package/dist/{fr-Djxzcm-x.js → fr-D3WwoeQg.js} +1 -1
- package/dist/{fr-C9hsLGOb.cjs → fr-cR59lx1A.cjs} +1 -1
- package/dist/{he-C_CvtpO2.js → he-CFhi-6Rs.js} +1 -1
- package/dist/{he-CHrcixO3.cjs → he-CxSHPJMg.cjs} +1 -1
- package/dist/{hi-C47vc5OG.js → hi-Cqy8JcS7.js} +1 -1
- package/dist/{hi-CpbCblie.cjs → hi-DLnz3lCX.cjs} +1 -1
- package/dist/{index-CeyxEbJL.cjs → index-0nXL1jt0.cjs} +1 -1
- package/dist/{index-C0yFCSoy.cjs → index-4MNPHZD0.cjs} +1 -1
- package/dist/{index-YbpU8b-b.cjs → index-4pbqdHdu.cjs} +1 -1
- package/dist/{index-m-1yJOxv.js → index-5kvan4pZ.js} +3 -3
- package/dist/{index--c2sxg96.js → index-8xL7lFvb.js} +2 -2
- package/dist/{index-KlPMACee.js → index-B8jOeOOB.js} +2 -2
- package/dist/{index-CW3QYddJ.js → index-BCaOVY88.js} +2 -2
- package/dist/{index-CsPpB1Kw.js → index-BICIDfB6.js} +1 -1
- package/dist/{index-BNQL8moK.js → index-BKHqr1z2.js} +2 -2
- package/dist/{index-BiHxJSI9.js → index-BSaEXg56.js} +3 -3
- package/dist/{index-B8EM1O9d.cjs → index-BSfK-Qwf.cjs} +1 -1
- package/dist/{index-SP-G4Erl.cjs → index-Bc-5l3Cz.cjs} +1 -1
- package/dist/{index-CjQ-nqcq.js → index-BeoVum6H.js} +1 -1
- package/dist/{index-BJZGXsLQ.cjs → index-Bk0BtvLD.cjs} +1 -1
- package/dist/{index-BUE3WeDh.cjs → index-BvXl7BJD.cjs} +1 -1
- package/dist/{index-DS0bdfOa.cjs → index-BzaR8uM1.cjs} +1 -1
- package/dist/{index-BIBYSE0O.js → index-C5uZbosj.js} +3 -3
- package/dist/{index-CcB11LV-.cjs → index-C7L2gKXf.cjs} +1 -1
- package/dist/{index-BtAze4TI.js → index-C7NeFFtL.js} +3 -3
- package/dist/{index-DtpMK8Ak.js → index-CEvEqrWz.js} +2 -2
- package/dist/{index-o4bA2Ymm.cjs → index-CGAE3ijj.cjs} +1 -1
- package/dist/{index-2J0cohRF.js → index-CJIznGSs.js} +2 -2
- package/dist/{index-h82qauh2.js → index-CKRtOTlW.js} +4 -4
- package/dist/{index-OUX19p46.js → index-CN4vYjXL.js} +2 -2
- package/dist/{index-CtlfDEiP.cjs → index-CPUSDEhf.cjs} +1 -1
- package/dist/{index-DPHERztz.cjs → index-CTiwmXQv.cjs} +1 -1
- package/dist/{index-c5HMVa4V.cjs → index-CflXJ8xJ.cjs} +1 -1
- package/dist/{index-BK8EFVAw.cjs → index-CgH6d8ie.cjs} +1 -1
- package/dist/{index-C4wKda5M.js → index-CiwYKSUt.js} +2 -2
- package/dist/{index-jLIz3LSI.js → index-Cwsc5H7D.js} +2 -2
- package/dist/{index-BLjWV-YV.cjs → index-D1rYqvi5.cjs} +2 -2
- package/dist/{index-BXHmDsV_.js → index-D6aavhaa.js} +2 -2
- package/dist/{index-C_T9Gzw8.js → index-DAdi5JJz.js} +2 -2
- package/dist/{index-CSK499Fw.cjs → index-DKyf2VGu.cjs} +1 -1
- package/dist/{index-CBlls5Ux.cjs → index-DXB8LND-.cjs} +1 -1
- package/dist/{index-D7a7hidA.js → index-DYmfX0jE.js} +100 -100
- package/dist/{index-_0aF8UPX.js → index-DZRUtuQ1.js} +2 -2
- package/dist/{index-CQcRWw-d.js → index-DqP1O6vK.js} +2 -2
- package/dist/{index-D3y-KMW-.js → index-Dr0vUVGJ.js} +4 -4
- package/dist/{index-CngY8bhO.cjs → index-DrNo6z9a.cjs} +1 -1
- package/dist/{index-C-UADaTN.cjs → index-Dsgj-jNd.cjs} +1 -1
- package/dist/index-Dvc6ZVJ3.cjs +1 -0
- package/dist/index-OrV7N-wE.js +680 -0
- package/dist/{index-Du_-zpYu.js → index-SPJ46EtH.js} +4 -4
- package/dist/{index-zcRhAq4N.cjs → index-ZuS9yWom.cjs} +1 -1
- package/dist/{index-BHOzetMx.cjs → index-ljok1ep6.cjs} +1 -1
- package/dist/{index-BIbSEVsf.cjs → index-uOI0LXHI.cjs} +1 -1
- package/dist/{index-jr-7RW3y.cjs → index-zvVNcjMi.cjs} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +1731 -1731
- package/dist/{it-iA1CUA-2.cjs → it-C7Kv6j-_.cjs} +1 -1
- package/dist/{it-l8u4xqsP.js → it-CtMArqSp.js} +1 -1
- package/dist/{ja-CRKtLvpo.cjs → ja-BPL80aw5.cjs} +1 -1
- package/dist/{ja-Dr2Azv8X.js → ja-UFqZT78C.js} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +1 -1
- package/dist/{ko-C97MbNN9.js → ko-B5LB1_X_.js} +1 -1
- package/dist/{ko-DAqjjbor.cjs → ko-Cmt_34Xp.cjs} +1 -1
- package/dist/markdown/index.cjs.js +1 -1
- package/dist/markdown/index.es.js +1 -1
- package/dist/markdown.css +52 -3
- package/dist/milkdown/index.cjs.js +1 -1
- package/dist/milkdown/index.es.js +1 -1
- package/dist/{milkdown-input-Dp-upGqQ.js → milkdown-input-BI5TwGax.js} +26 -26
- package/dist/{milkdown-input-EMBZNdma.cjs → milkdown-input-CdJ7N_YZ.cjs} +2 -2
- package/dist/{milkdown-url-DgMTahqt.js → milkdown-url-D99P-nA-.js} +1 -1
- package/dist/{milkdown-url-DjKYrEOH.cjs → milkdown-url-DqoUZH3u.cjs} +1 -1
- package/dist/milkdown.css +4 -4
- package/dist/{modal-at2TcO_O.js → modal-C2Aa-aVN.js} +1 -1
- package/dist/{modal-hr4K3edu.cjs → modal-UsqvSvHy.cjs} +1 -1
- package/dist/{nl-CCa2fPh7.cjs → nl-B-WL9SX2.cjs} +1 -1
- package/dist/{nl-BnDPAHZz.js → nl-DCfHVqzQ.js} +1 -1
- package/dist/notice-C7I6EmRh.cjs +1 -0
- package/dist/{notice-DhynzVip.js → notice-c9Vbv45l.js} +836 -821
- package/dist/{pl-BVuQd0i3.cjs → pl-TGqkSi2w.cjs} +1 -1
- package/dist/{pl-DYEVmpx5.js → pl-UcTv39q1.js} +1 -1
- package/dist/{pt-C-cIHGoh.js → pt-CXsgmVtb.js} +1 -1
- package/dist/{pt-BFGThC8F.cjs → pt-Ua_e-1JE.cjs} +1 -1
- package/dist/{ru-M4WO0h1a.cjs → ru-9YWCN6fR.cjs} +1 -1
- package/dist/{ru-n2tT3Gv-.js → ru-C0MvZW2g.js} +1 -1
- package/dist/styles-url-B3p8AqBy.cjs +1 -0
- package/dist/styles-url-COuz9fVH.js +4 -0
- package/dist/tailwind/index.cjs.js +1 -1
- package/dist/tailwind/index.es.js +2 -2
- package/dist/tailwind/preset.cjs.js +1 -1
- package/dist/tailwind/preset.es.js +3 -3
- package/dist/tailwind/vite-plugin.cjs.js +13 -6
- package/dist/tailwind/vite-plugin.es.js +478 -161
- package/dist/{tr-CFUAqbmS.js → tr-CIIkc1uL.js} +1 -1
- package/dist/{tr-KxY4CbD3.cjs → tr-D70Oy8aN.cjs} +1 -1
- package/dist/{translations-DGCYRUSw.js → translations-CB6iJ1Rn.js} +1 -1
- package/dist/translations-DpZ-btu9.cjs +2 -0
- package/dist/{translations-924E7r4Q.js → translations-GO9sIajX.js} +235 -203
- package/dist/{translations-Do79R-x4.cjs → translations-NYxsXjMT.cjs} +1 -1
- package/dist/types/components/button/button.d.ts +1 -1
- package/dist/types/components/form/input/checkbox-input.d.ts +8 -1
- package/dist/types/components/form/input/switch.d.ts +3 -1
- package/dist/types/components/misc/notice.d.ts +1 -1
- package/dist/types/components/navigation/link/link.d.ts +1 -1
- package/dist/types/components/theme/types.d.ts +1 -1
- package/dist/types/components/typography/label.d.ts +1 -1
- package/dist/types/tailwind/google-fonts.d.ts +45 -0
- package/dist/types/tailwind/preset.d.ts +34 -0
- package/dist/types/tailwind/vite-plugin.d.ts +4 -0
- package/dist/types/tokens/colors.d.ts +6 -6
- package/dist/types/tokens/index.d.ts +19 -1
- package/dist/types/tokens/motion.d.ts +25 -0
- package/dist/types/tokens/radius.d.ts +5 -0
- package/dist/types/tokens/shadows.d.ts +5 -0
- package/dist/types/tokens/spacing.d.ts +5 -0
- package/dist/types/tokens/text-shadows.d.ts +5 -0
- package/dist/types/tokens/typography.d.ts +9 -1
- package/dist/{ur-B7kT0PwV.js → ur-Cpx9oyTV.js} +1 -1
- package/dist/{ur-GeXcd9eA.cjs → ur-DmxXuJ9O.cjs} +1 -1
- package/dist/{vi-DYvrvqim.cjs → vi-Cboo_ueb.cjs} +1 -1
- package/dist/{vi-CA85io1z.js → vi-D24AUQ01.js} +1 -1
- package/dist/{zh-cLh5uTFh.js → zh-25YFRjoV.js} +1 -1
- package/dist/{zh-EIWIyzbZ.cjs → zh-BXivX7rD.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-Br70wXYb.cjs +0 -1
- package/dist/index-DVdM4Oz7.js +0 -420
- package/dist/notice-CplKL-zm.cjs +0 -1
- package/dist/styles-url-CIhMtnm4.js +0 -4
- package/dist/styles-url-SkuBc_7K.cjs +0 -1
- package/dist/translations-BtAHDMLA.cjs +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { makeProviderMark as ae, localStorageProp as X, computedOf as k, Use as q, html as p, attr as c, When as _, Fragment as E, aria as x, coalesce as Q, style as H, prop as I, on as
|
|
1
|
+
import { makeProviderMark as ae, localStorageProp as X, computedOf as k, Use as q, html as p, attr as c, When as _, Fragment as E, aria as x, coalesce as Q, style as H, prop as I, on as w, OnDispose as oe, Value as L, WithElement as ve, Empty as y, dataAttr as J, input as ie, emitValue as M, emitValueAsNumber as ke } from "@tempots/dom";
|
|
2
2
|
import { WhenInViewport as ye, Query as we, ElementRect as Ce } from "@tempots/ui";
|
|
3
|
-
import { b as xe, g as Se } from "./colors-
|
|
3
|
+
import { b as xe, g as Se } from "./colors-WfmhQ5e1.js";
|
|
4
4
|
function ee(e, {
|
|
5
5
|
units: t = ["B", "KB", "MB", "GB", "TB"],
|
|
6
6
|
decimalPlaces: s = 0,
|
|
@@ -272,8 +272,8 @@ const C = {
|
|
|
272
272
|
*/
|
|
273
273
|
toResult: (e, t) => D.match(
|
|
274
274
|
e,
|
|
275
|
-
() =>
|
|
276
|
-
(s) =>
|
|
275
|
+
() => g.success(t),
|
|
276
|
+
(s) => g.failure(s)
|
|
277
277
|
),
|
|
278
278
|
/**
|
|
279
279
|
* Execute a function when the `Validation` is valid.
|
|
@@ -291,7 +291,7 @@ const C = {
|
|
|
291
291
|
* @returns The `Validation` object.
|
|
292
292
|
*/
|
|
293
293
|
whenInvalid: (e, t) => (D.isInvalid(e) && t(e.error), e)
|
|
294
|
-
},
|
|
294
|
+
}, g = {
|
|
295
295
|
/**
|
|
296
296
|
* Creates a successful `Result`.
|
|
297
297
|
* @param value - The value to wrap in a `Success` type.
|
|
@@ -319,7 +319,7 @@ const C = {
|
|
|
319
319
|
* @returns A new `Result` with the mapped value.
|
|
320
320
|
* @public
|
|
321
321
|
*/
|
|
322
|
-
map: (e, t) => e.type === "Success" ?
|
|
322
|
+
map: (e, t) => e.type === "Success" ? g.success(t(e.value)) : e,
|
|
323
323
|
/**
|
|
324
324
|
* Maps the value of a `Result` to a new `Result`.
|
|
325
325
|
* @param r - The `Result` to map.
|
|
@@ -335,7 +335,7 @@ const C = {
|
|
|
335
335
|
* @public
|
|
336
336
|
*/
|
|
337
337
|
toAsync(e) {
|
|
338
|
-
return
|
|
338
|
+
return g.match(
|
|
339
339
|
e,
|
|
340
340
|
(t) => C.success(t),
|
|
341
341
|
(t) => C.failure(t)
|
|
@@ -348,7 +348,7 @@ const C = {
|
|
|
348
348
|
* @public
|
|
349
349
|
*/
|
|
350
350
|
toValidation(e) {
|
|
351
|
-
return
|
|
351
|
+
return g.match(
|
|
352
352
|
e,
|
|
353
353
|
() => D.valid,
|
|
354
354
|
(t) => D.invalid(t)
|
|
@@ -380,7 +380,7 @@ const C = {
|
|
|
380
380
|
* @public
|
|
381
381
|
*/
|
|
382
382
|
getOrElse(e, t) {
|
|
383
|
-
return
|
|
383
|
+
return g.isSuccess(e) ? e.value : t;
|
|
384
384
|
},
|
|
385
385
|
/**
|
|
386
386
|
* Gets the value of a `Result` if it is a `Success`, otherwise returns the result of the provided function.
|
|
@@ -390,7 +390,7 @@ const C = {
|
|
|
390
390
|
* @public
|
|
391
391
|
*/
|
|
392
392
|
getOrElseLazy(e, t) {
|
|
393
|
-
return
|
|
393
|
+
return g.isSuccess(e) ? e.value : t();
|
|
394
394
|
},
|
|
395
395
|
/**
|
|
396
396
|
* Gets the value of a `Result` if it is a `Success`, otherwise returns `null`.
|
|
@@ -399,7 +399,7 @@ const C = {
|
|
|
399
399
|
* @public
|
|
400
400
|
*/
|
|
401
401
|
getOrNull(e) {
|
|
402
|
-
return
|
|
402
|
+
return g.isSuccess(e) ? e.value : null;
|
|
403
403
|
},
|
|
404
404
|
/**
|
|
405
405
|
* Gets the value of a `Result` if it is a `Success`, otherwise returns `undefined`.
|
|
@@ -408,7 +408,7 @@ const C = {
|
|
|
408
408
|
* @public
|
|
409
409
|
*/
|
|
410
410
|
getOrUndefined(e) {
|
|
411
|
-
return
|
|
411
|
+
return g.isSuccess(e) ? e.value : void 0;
|
|
412
412
|
},
|
|
413
413
|
/**
|
|
414
414
|
* Gets the value of a `Result` if it is a `Success`, otherwise it throws the error contained in the `Failure`.
|
|
@@ -416,7 +416,7 @@ const C = {
|
|
|
416
416
|
* @returns The value of the `Result` if it is a `Success`.
|
|
417
417
|
*/
|
|
418
418
|
getUnsafe: (e) => {
|
|
419
|
-
if (
|
|
419
|
+
if (g.isSuccess(e))
|
|
420
420
|
return e.value;
|
|
421
421
|
throw e.error;
|
|
422
422
|
},
|
|
@@ -427,15 +427,15 @@ const C = {
|
|
|
427
427
|
* @returns The result of calling the appropriate function based on the state of the result.
|
|
428
428
|
* @public
|
|
429
429
|
*/
|
|
430
|
-
match: (e, t, s) =>
|
|
430
|
+
match: (e, t, s) => g.isSuccess(e) ? t(e.value) : s(e.error),
|
|
431
431
|
/**
|
|
432
432
|
* Calls the provided function if the result is a success.
|
|
433
433
|
* @param apply - The function to call if the result is a success.
|
|
434
434
|
* @returns A function that takes a `Result` and calls the provided function if the result is a success.
|
|
435
435
|
* @public
|
|
436
436
|
*/
|
|
437
|
-
whenSuccess: (e, t) => (
|
|
438
|
-
whenFailure: (e, t) => (
|
|
437
|
+
whenSuccess: (e, t) => (g.isSuccess(e) && t(e.value), e),
|
|
438
|
+
whenFailure: (e, t) => (g.isFailure(e) && t(e.error), e),
|
|
439
439
|
/**
|
|
440
440
|
* Combines two results into a single result.
|
|
441
441
|
* @param r1 - The first result.
|
|
@@ -445,18 +445,18 @@ const C = {
|
|
|
445
445
|
* @returns The combined result.
|
|
446
446
|
* @public
|
|
447
447
|
*/
|
|
448
|
-
combine: (e, t, s, n) =>
|
|
448
|
+
combine: (e, t, s, n) => g.match(
|
|
449
449
|
e,
|
|
450
|
-
(r) =>
|
|
450
|
+
(r) => g.match(
|
|
451
451
|
t,
|
|
452
|
-
(a) =>
|
|
453
|
-
(a) =>
|
|
452
|
+
(a) => g.success(s(r, a)),
|
|
453
|
+
(a) => g.failure(a)
|
|
454
454
|
),
|
|
455
|
-
(r) =>
|
|
455
|
+
(r) => g.match(
|
|
456
456
|
t,
|
|
457
457
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
458
|
-
(a) =>
|
|
459
|
-
(a) =>
|
|
458
|
+
(a) => g.failure(r),
|
|
459
|
+
(a) => g.failure(n(r, a))
|
|
460
460
|
)
|
|
461
461
|
),
|
|
462
462
|
/**
|
|
@@ -478,11 +478,11 @@ const C = {
|
|
|
478
478
|
all: (e) => {
|
|
479
479
|
const t = [];
|
|
480
480
|
for (const s of e)
|
|
481
|
-
if (
|
|
481
|
+
if (g.isSuccess(s))
|
|
482
482
|
t.push(s.value);
|
|
483
483
|
else
|
|
484
484
|
return s;
|
|
485
|
-
return
|
|
485
|
+
return g.success(t);
|
|
486
486
|
}
|
|
487
487
|
}, ce = {
|
|
488
488
|
loadingExtended: "Loading, please wait",
|
|
@@ -841,19 +841,19 @@ function F({
|
|
|
841
841
|
const i = k(
|
|
842
842
|
r,
|
|
843
843
|
n
|
|
844
|
-
)((l,
|
|
844
|
+
)((l, d) => l === "decorative" ? !1 : l === "informative" ? !0 : d != null && d !== "");
|
|
845
845
|
return q(
|
|
846
846
|
R,
|
|
847
847
|
(l) => p.span(
|
|
848
848
|
c.class(
|
|
849
|
-
k(t, s)((
|
|
849
|
+
k(t, s)((d) => Ue(d ?? "md"))
|
|
850
850
|
),
|
|
851
851
|
c.style(
|
|
852
852
|
k(
|
|
853
853
|
s,
|
|
854
854
|
a
|
|
855
855
|
)(
|
|
856
|
-
(
|
|
856
|
+
(d, u) => ze(d ?? void 0, u ?? "solid")
|
|
857
857
|
)
|
|
858
858
|
),
|
|
859
859
|
// Add accessibility attributes based on icon type
|
|
@@ -869,12 +869,12 @@ function F({
|
|
|
869
869
|
{ once: !0 },
|
|
870
870
|
() => we({
|
|
871
871
|
request: e,
|
|
872
|
-
load: ({ request:
|
|
872
|
+
load: ({ request: d }) => He(d),
|
|
873
873
|
convertError: String,
|
|
874
|
-
success: ({ value:
|
|
874
|
+
success: ({ value: d }) => p.span(
|
|
875
875
|
H.width("100%"),
|
|
876
876
|
H.height("100%"),
|
|
877
|
-
c.innerHTML(
|
|
877
|
+
c.innerHTML(d)
|
|
878
878
|
),
|
|
879
879
|
pending: () => p.span(
|
|
880
880
|
c.class("animate-spin"),
|
|
@@ -886,8 +886,8 @@ function F({
|
|
|
886
886
|
),
|
|
887
887
|
"↻"
|
|
888
888
|
),
|
|
889
|
-
failure: ({ error:
|
|
890
|
-
c.title(
|
|
889
|
+
failure: ({ error: d }) => p.span(
|
|
890
|
+
c.title(d),
|
|
891
891
|
c.class("text-red-500"),
|
|
892
892
|
// Error state accessibility
|
|
893
893
|
_(
|
|
@@ -903,23 +903,31 @@ function F({
|
|
|
903
903
|
)
|
|
904
904
|
);
|
|
905
905
|
}
|
|
906
|
-
function Ge(e, t, s
|
|
907
|
-
const
|
|
906
|
+
function Ge(e, t, s) {
|
|
907
|
+
const n = [
|
|
908
908
|
"bc-button",
|
|
909
|
-
`bc-button--size-${
|
|
910
|
-
`bc-control--padding-${
|
|
911
|
-
`bc-control--rounded-${
|
|
909
|
+
`bc-button--size-${e}`,
|
|
910
|
+
`bc-control--padding-${e}`,
|
|
911
|
+
`bc-control--rounded-${t}`
|
|
912
912
|
];
|
|
913
|
-
return
|
|
913
|
+
return s && n.push("bc-button--loading"), n.join(" ");
|
|
914
914
|
}
|
|
915
915
|
function We(e, t, s) {
|
|
916
|
-
const n = /* @__PURE__ */ new Map()
|
|
916
|
+
const n = /* @__PURE__ */ new Map();
|
|
917
|
+
n.set("--button-text-shadow", "var(--text-shadow-none)"), n.set("--button-text-shadow-dark", "var(--text-shadow-none)");
|
|
918
|
+
const r = (a, o, i, l) => {
|
|
917
919
|
s || (n.set("--button-bg-hover", a), n.set("--button-text-hover", i), n.set("--button-bg-hover-dark", o), n.set("--button-text-hover-dark", l));
|
|
918
920
|
};
|
|
919
921
|
switch (e) {
|
|
920
922
|
case "filled": {
|
|
921
923
|
const a = O(t, "solid", "light"), o = O(t, "solid", "dark");
|
|
922
|
-
n.set("--button-bg", a.backgroundColor), n.set("--button-text", a.textColor), n.set("--button-bg-dark", o.backgroundColor), n.set("--button-text-dark", o.textColor)
|
|
924
|
+
n.set("--button-bg", a.backgroundColor), n.set("--button-text", a.textColor), n.set("--button-bg-dark", o.backgroundColor), n.set("--button-text-dark", o.textColor), n.set(
|
|
925
|
+
"--button-text-shadow",
|
|
926
|
+
"var(--text-shadow-button-filled, var(--text-shadow-sm))"
|
|
927
|
+
), n.set(
|
|
928
|
+
"--button-text-shadow-dark",
|
|
929
|
+
"var(--text-shadow-button-filled, var(--text-shadow-sm))"
|
|
930
|
+
);
|
|
923
931
|
const i = V(t, "solid", "light"), l = V(t, "solid", "dark");
|
|
924
932
|
r(
|
|
925
933
|
i.backgroundColor,
|
|
@@ -942,7 +950,13 @@ function We(e, t, s) {
|
|
|
942
950
|
break;
|
|
943
951
|
}
|
|
944
952
|
case "outline": {
|
|
945
|
-
n.set("--button-bg", "transparent"), n.set("--button-bg-dark", "transparent"), n.set("--button-border", se(t, "light")), n.set("--button-border-dark", se(t, "dark")), n.set("--button-text", j(t, "light")), n.set("--button-text-dark", j(t, "dark"))
|
|
953
|
+
n.set("--button-bg", "transparent"), n.set("--button-bg-dark", "transparent"), n.set("--button-border", se(t, "light")), n.set("--button-border-dark", se(t, "dark")), n.set("--button-text", j(t, "light")), n.set("--button-text-dark", j(t, "dark")), n.set(
|
|
954
|
+
"--button-text-shadow",
|
|
955
|
+
"var(--text-shadow-button-light, var(--text-shadow-xs))"
|
|
956
|
+
), n.set(
|
|
957
|
+
"--button-text-shadow-dark",
|
|
958
|
+
"var(--text-shadow-button-light, var(--text-shadow-xs))"
|
|
959
|
+
);
|
|
946
960
|
const a = V(t, "light", "light"), o = V(t, "light", "dark");
|
|
947
961
|
r(
|
|
948
962
|
a.backgroundColor,
|
|
@@ -954,7 +968,13 @@ function We(e, t, s) {
|
|
|
954
968
|
}
|
|
955
969
|
case "default": {
|
|
956
970
|
const a = O("neutral", "light", "light"), o = O("neutral", "light", "dark");
|
|
957
|
-
n.set("--button-bg", a.backgroundColor), n.set("--button-text", j(t, "light")), n.set("--button-bg-dark", o.backgroundColor), n.set("--button-text-dark", j(t, "dark"))
|
|
971
|
+
n.set("--button-bg", a.backgroundColor), n.set("--button-text", j(t, "light")), n.set("--button-bg-dark", o.backgroundColor), n.set("--button-text-dark", j(t, "dark")), n.set(
|
|
972
|
+
"--button-text-shadow",
|
|
973
|
+
"var(--text-shadow-button-default, var(--text-shadow-2xs))"
|
|
974
|
+
), n.set(
|
|
975
|
+
"--button-text-shadow-dark",
|
|
976
|
+
"var(--text-shadow-button-default, var(--text-shadow-2xs))"
|
|
977
|
+
);
|
|
958
978
|
const i = V("base", "light", "light"), l = V("base", "light", "dark");
|
|
959
979
|
r(
|
|
960
980
|
i.backgroundColor,
|
|
@@ -982,7 +1002,7 @@ function Ke({
|
|
|
982
1002
|
onClick: i = () => {
|
|
983
1003
|
}
|
|
984
1004
|
}, ...l) {
|
|
985
|
-
const
|
|
1005
|
+
const d = I(null);
|
|
986
1006
|
return q(
|
|
987
1007
|
R,
|
|
988
1008
|
(u) => p.button(
|
|
@@ -991,28 +1011,18 @@ function Ke({
|
|
|
991
1011
|
k(
|
|
992
1012
|
t,
|
|
993
1013
|
s
|
|
994
|
-
)((
|
|
1014
|
+
)((h, b) => h || b)
|
|
995
1015
|
),
|
|
996
1016
|
// Add ARIA attributes for accessibility
|
|
997
1017
|
x.busy(s ?? !1),
|
|
998
1018
|
_(s ?? !1, () => x.label(u.$.loadingExtended)),
|
|
999
1019
|
c.class(
|
|
1000
1020
|
k(
|
|
1001
|
-
n,
|
|
1002
1021
|
r,
|
|
1003
|
-
a,
|
|
1004
1022
|
o,
|
|
1005
|
-
t,
|
|
1006
1023
|
s
|
|
1007
1024
|
)(
|
|
1008
|
-
(
|
|
1009
|
-
d ?? "filled",
|
|
1010
|
-
f ?? "md",
|
|
1011
|
-
m ?? "base",
|
|
1012
|
-
w ?? "sm",
|
|
1013
|
-
g,
|
|
1014
|
-
S
|
|
1015
|
-
)
|
|
1025
|
+
(h, b, m) => Ge(h ?? "md", b ?? "sm", m)
|
|
1016
1026
|
)
|
|
1017
1027
|
),
|
|
1018
1028
|
c.style(
|
|
@@ -1021,9 +1031,9 @@ function Ke({
|
|
|
1021
1031
|
a,
|
|
1022
1032
|
t
|
|
1023
1033
|
)(
|
|
1024
|
-
(
|
|
1025
|
-
|
|
1026
|
-
|
|
1034
|
+
(h, b, m) => We(
|
|
1035
|
+
h ?? "filled",
|
|
1036
|
+
b ?? "base",
|
|
1027
1037
|
m
|
|
1028
1038
|
)
|
|
1029
1039
|
)
|
|
@@ -1032,10 +1042,10 @@ function Ke({
|
|
|
1032
1042
|
s ?? !1,
|
|
1033
1043
|
() => E(
|
|
1034
1044
|
H.width(
|
|
1035
|
-
|
|
1045
|
+
d.map((h) => h == null ? "" : `${h.width}px`)
|
|
1036
1046
|
),
|
|
1037
1047
|
H.height(
|
|
1038
|
-
|
|
1048
|
+
d.map((h) => h == null ? "" : `${h.height}px`)
|
|
1039
1049
|
),
|
|
1040
1050
|
F({ icon: "line-md:loading-twotone-loop", size: r ?? "md" }),
|
|
1041
1051
|
// Hidden live region for screen reader announcements
|
|
@@ -1045,14 +1055,14 @@ function Ke({
|
|
|
1045
1055
|
u.$.loadingExtended
|
|
1046
1056
|
)
|
|
1047
1057
|
),
|
|
1048
|
-
() => E(
|
|
1058
|
+
() => E(w.click(i), ...l)
|
|
1049
1059
|
),
|
|
1050
1060
|
_(
|
|
1051
1061
|
s != null,
|
|
1052
1062
|
() => Ce(
|
|
1053
|
-
(
|
|
1054
|
-
|
|
1055
|
-
L.get(s ?? !1) ||
|
|
1063
|
+
(h) => oe(
|
|
1064
|
+
h.on((b) => {
|
|
1065
|
+
L.get(s ?? !1) || d.set(b);
|
|
1056
1066
|
})
|
|
1057
1067
|
)
|
|
1058
1068
|
)
|
|
@@ -1070,7 +1080,7 @@ function wt({
|
|
|
1070
1080
|
label: o
|
|
1071
1081
|
}, ...i) {
|
|
1072
1082
|
return q(R, (l) => {
|
|
1073
|
-
const
|
|
1083
|
+
const d = Q(o, l.$.closeModal);
|
|
1074
1084
|
return Ke(
|
|
1075
1085
|
{
|
|
1076
1086
|
variant: "text",
|
|
@@ -1080,8 +1090,8 @@ function wt({
|
|
|
1080
1090
|
color: r,
|
|
1081
1091
|
onClick: a
|
|
1082
1092
|
},
|
|
1083
|
-
c.title(
|
|
1084
|
-
x.label(
|
|
1093
|
+
c.title(d),
|
|
1094
|
+
x.label(d),
|
|
1085
1095
|
...i,
|
|
1086
1096
|
F({ icon: t, size: e ?? "sm" })
|
|
1087
1097
|
);
|
|
@@ -1107,24 +1117,24 @@ const W = ({
|
|
|
1107
1117
|
focusableSelector: o = "input, select, textarea",
|
|
1108
1118
|
growInput: i = !0
|
|
1109
1119
|
}, ...l) => {
|
|
1110
|
-
const
|
|
1120
|
+
const d = L.map(t ?? !1, (u) => u);
|
|
1111
1121
|
return p.div(
|
|
1112
1122
|
ve((u) => {
|
|
1113
|
-
const
|
|
1123
|
+
const h = () => {
|
|
1114
1124
|
u.querySelector(o)?.focus();
|
|
1115
1125
|
};
|
|
1116
|
-
return u.addEventListener("click",
|
|
1126
|
+
return u.addEventListener("click", h), oe(() => u.removeEventListener("click", h));
|
|
1117
1127
|
}),
|
|
1118
1128
|
c.class(
|
|
1119
1129
|
k(
|
|
1120
1130
|
e,
|
|
1121
|
-
|
|
1131
|
+
d,
|
|
1122
1132
|
a ?? !1
|
|
1123
1133
|
)(
|
|
1124
|
-
(u,
|
|
1134
|
+
(u, h, b) => Je(
|
|
1125
1135
|
u ?? !1,
|
|
1126
|
-
|
|
1127
|
-
|
|
1136
|
+
h ?? !1,
|
|
1137
|
+
b ?? !1
|
|
1128
1138
|
)
|
|
1129
1139
|
)
|
|
1130
1140
|
),
|
|
@@ -1146,13 +1156,23 @@ const W = ({
|
|
|
1146
1156
|
function K(e) {
|
|
1147
1157
|
return `bc-label bc-label--${e}`;
|
|
1148
1158
|
}
|
|
1149
|
-
const Ct = (...e) => p.span(c.class(K("emphasis")), ...e), Qe = (...e) => p.span(c.class(K("default")), ...e), Ye = (...e) => p.span(c.class(K("muted")), ...e), xt = (...e) => p.span(c.class(K("
|
|
1150
|
-
const {
|
|
1159
|
+
const Ct = (...e) => p.span(c.class(K("emphasis")), ...e), Qe = (...e) => p.span(c.class(K("default")), ...e), Ye = (...e) => p.span(c.class(K("muted")), ...e), xt = (...e) => p.span(c.class(K("danger")), ...e), St = (e) => {
|
|
1160
|
+
const {
|
|
1161
|
+
value: t,
|
|
1162
|
+
onBlur: s,
|
|
1163
|
+
onChange: n,
|
|
1164
|
+
placeholder: r,
|
|
1165
|
+
disabled: a,
|
|
1166
|
+
id: o,
|
|
1167
|
+
checkedIcon: i,
|
|
1168
|
+
uncheckedIcon: l,
|
|
1169
|
+
iconSize: d = "lg"
|
|
1170
|
+
} = e, u = o ?? le("checkbox"), h = `${u}-label`, b = () => {
|
|
1151
1171
|
if (L.get(a ?? !1)) return;
|
|
1152
|
-
const
|
|
1153
|
-
n?.(!
|
|
1154
|
-
},
|
|
1155
|
-
L.get(a ?? !1) || (
|
|
1172
|
+
const f = L.get(t);
|
|
1173
|
+
n?.(!f);
|
|
1174
|
+
}, m = (f) => {
|
|
1175
|
+
L.get(a ?? !1) || (f.key === " " || f.key === "Enter") && (f.preventDefault(), b());
|
|
1156
1176
|
};
|
|
1157
1177
|
return W(
|
|
1158
1178
|
{
|
|
@@ -1166,38 +1186,49 @@ const Ct = (...e) => p.span(c.class(K("emphasis")), ...e), Qe = (...e) => p.span
|
|
|
1166
1186
|
c.class(
|
|
1167
1187
|
L.map(
|
|
1168
1188
|
t,
|
|
1169
|
-
(
|
|
1189
|
+
(f) => f ? "bc-checkbox-input__checkbox--checked" : "bc-checkbox-input__checkbox--unchecked"
|
|
1170
1190
|
)
|
|
1171
1191
|
),
|
|
1172
1192
|
c.class(
|
|
1173
1193
|
L.map(
|
|
1174
1194
|
a ?? !1,
|
|
1175
|
-
(
|
|
1195
|
+
(f) => f ? "bc-checkbox-input__checkbox--disabled" : ""
|
|
1176
1196
|
)
|
|
1177
1197
|
),
|
|
1178
|
-
c.id(
|
|
1198
|
+
c.id(u),
|
|
1179
1199
|
c.role("checkbox"),
|
|
1180
1200
|
c.tabindex(
|
|
1181
1201
|
L.map(
|
|
1182
1202
|
a ?? !1,
|
|
1183
|
-
(
|
|
1203
|
+
(f) => f ? -1 : 0
|
|
1184
1204
|
)
|
|
1185
1205
|
),
|
|
1186
1206
|
x.checked(t),
|
|
1187
1207
|
x.disabled(a),
|
|
1188
|
-
r != null ? x.labelledby(
|
|
1189
|
-
|
|
1190
|
-
s != null ?
|
|
1208
|
+
r != null ? x.labelledby(h) : y,
|
|
1209
|
+
w.keydown(m),
|
|
1210
|
+
s != null ? w.blur(s) : y,
|
|
1211
|
+
F({
|
|
1212
|
+
icon: k(
|
|
1213
|
+
t,
|
|
1214
|
+
i,
|
|
1215
|
+
l
|
|
1216
|
+
)(
|
|
1217
|
+
(f, v, S) => f ? v ?? "akar-icons/check-box-fill" : S ?? "akar-icons/box"
|
|
1218
|
+
),
|
|
1219
|
+
accessibility: "decorative",
|
|
1220
|
+
size: d
|
|
1221
|
+
})
|
|
1191
1222
|
),
|
|
1192
1223
|
r != null ? p.label(
|
|
1193
1224
|
c.class("bc-checkbox-input__label"),
|
|
1194
|
-
c.id(
|
|
1195
|
-
c.for(
|
|
1225
|
+
c.id(h),
|
|
1226
|
+
c.for(u),
|
|
1196
1227
|
Ye(r)
|
|
1197
|
-
) :
|
|
1228
|
+
) : y
|
|
1198
1229
|
)
|
|
1199
1230
|
},
|
|
1200
|
-
|
|
1231
|
+
w.click(b)
|
|
1201
1232
|
);
|
|
1202
1233
|
}, Z = ({
|
|
1203
1234
|
autocomplete: e,
|
|
@@ -1243,13 +1274,13 @@ const pe = ({
|
|
|
1243
1274
|
error: o,
|
|
1244
1275
|
labelFor: i,
|
|
1245
1276
|
hasError: l,
|
|
1246
|
-
disabled:
|
|
1277
|
+
disabled: d,
|
|
1247
1278
|
horizontal: u
|
|
1248
|
-
}, ...
|
|
1249
|
-
const
|
|
1279
|
+
}, ...h) => {
|
|
1280
|
+
const b = l ?? o != null, m = d ?? !1, f = u ?? !1, v = le("input-wrapper"), S = r ? `${v}-description` : void 0, P = o != null ? `${v}-error` : void 0;
|
|
1250
1281
|
return p.div(
|
|
1251
1282
|
c.class(
|
|
1252
|
-
L.map(
|
|
1283
|
+
L.map(f, (T) => Xe(T))
|
|
1253
1284
|
),
|
|
1254
1285
|
t != null || n != null ? p.div(
|
|
1255
1286
|
c.class("bc-input-wrapper__header"),
|
|
@@ -1257,11 +1288,11 @@ const pe = ({
|
|
|
1257
1288
|
c.class("bc-input-wrapper__label-section"),
|
|
1258
1289
|
p.label(
|
|
1259
1290
|
c.class("bc-input-wrapper__label"),
|
|
1260
|
-
i != null ? c.for(i) :
|
|
1291
|
+
i != null ? c.for(i) : y,
|
|
1261
1292
|
p.span(
|
|
1262
1293
|
c.class(
|
|
1263
1294
|
k(
|
|
1264
|
-
|
|
1295
|
+
b,
|
|
1265
1296
|
m
|
|
1266
1297
|
)(
|
|
1267
1298
|
(T, $) => et(
|
|
@@ -1272,12 +1303,12 @@ const pe = ({
|
|
|
1272
1303
|
),
|
|
1273
1304
|
t
|
|
1274
1305
|
),
|
|
1275
|
-
t != null && e ? Ze :
|
|
1306
|
+
t != null && e ? Ze : y
|
|
1276
1307
|
),
|
|
1277
1308
|
// Show description under label when horizontal
|
|
1278
1309
|
_(
|
|
1279
1310
|
k(
|
|
1280
|
-
|
|
1311
|
+
f,
|
|
1281
1312
|
r
|
|
1282
1313
|
)((T, $) => T && $ != null),
|
|
1283
1314
|
() => p.div(
|
|
@@ -1289,23 +1320,23 @@ const pe = ({
|
|
|
1289
1320
|
)
|
|
1290
1321
|
)
|
|
1291
1322
|
),
|
|
1292
|
-
n != null ? Qe(n) :
|
|
1323
|
+
n != null ? Qe(n) : y,
|
|
1293
1324
|
s
|
|
1294
|
-
) :
|
|
1325
|
+
) : y,
|
|
1295
1326
|
p.div(
|
|
1296
1327
|
c.class("bc-input-wrapper__content"),
|
|
1297
1328
|
// Add data attributes to help inputs inherit accessibility information
|
|
1298
1329
|
[S, P].filter(Boolean).length > 0 ? J.describedby(
|
|
1299
1330
|
[S, P].filter(Boolean).join(" ")
|
|
1300
|
-
) :
|
|
1301
|
-
e ? J.required("true") :
|
|
1302
|
-
_(
|
|
1331
|
+
) : y,
|
|
1332
|
+
e ? J.required("true") : y,
|
|
1333
|
+
_(b, () => J.invalid("true")),
|
|
1303
1334
|
a
|
|
1304
1335
|
),
|
|
1305
1336
|
// Show description at bottom only when not horizontal
|
|
1306
1337
|
_(
|
|
1307
1338
|
k(
|
|
1308
|
-
|
|
1339
|
+
f,
|
|
1309
1340
|
r
|
|
1310
1341
|
)((T, $) => !T && $ != null),
|
|
1311
1342
|
() => p.div(
|
|
@@ -1315,7 +1346,7 @@ const pe = ({
|
|
|
1315
1346
|
)
|
|
1316
1347
|
),
|
|
1317
1348
|
o != null ? _(
|
|
1318
|
-
|
|
1349
|
+
b,
|
|
1319
1350
|
() => p.div(
|
|
1320
1351
|
c.class("bc-input-wrapper__error"),
|
|
1321
1352
|
c.id(P),
|
|
@@ -1326,7 +1357,7 @@ const pe = ({
|
|
|
1326
1357
|
o
|
|
1327
1358
|
)
|
|
1328
1359
|
) : null,
|
|
1329
|
-
...
|
|
1360
|
+
...h
|
|
1330
1361
|
);
|
|
1331
1362
|
};
|
|
1332
1363
|
function Dt(...e) {
|
|
@@ -1351,17 +1382,17 @@ const It = (e) => {
|
|
|
1351
1382
|
});
|
|
1352
1383
|
return q(
|
|
1353
1384
|
R,
|
|
1354
|
-
(
|
|
1385
|
+
(d) => W({
|
|
1355
1386
|
...e,
|
|
1356
1387
|
before: l,
|
|
1357
1388
|
input: ie.email(
|
|
1358
1389
|
Z(t),
|
|
1359
|
-
c.placeholder(Q(i,
|
|
1390
|
+
c.placeholder(Q(i, d.$.emailPlaceholderText)),
|
|
1360
1391
|
c.value(s),
|
|
1361
1392
|
c.class("bc-input"),
|
|
1362
|
-
r != null ?
|
|
1363
|
-
a != null ?
|
|
1364
|
-
o != null ?
|
|
1393
|
+
r != null ? w.blur(M(r)) : y,
|
|
1394
|
+
a != null ? w.change(M(a)) : y,
|
|
1395
|
+
o != null ? w.input(M(o)) : y
|
|
1365
1396
|
)
|
|
1366
1397
|
})
|
|
1367
1398
|
);
|
|
@@ -1373,9 +1404,9 @@ const It = (e) => {
|
|
|
1373
1404
|
Z(e),
|
|
1374
1405
|
c.value(t),
|
|
1375
1406
|
c.class("bc-input"),
|
|
1376
|
-
s != null ?
|
|
1377
|
-
n != null ?
|
|
1378
|
-
r != null ?
|
|
1407
|
+
s != null ? w.blur(M(s)) : y,
|
|
1408
|
+
n != null ? w.change(M(n)) : y,
|
|
1409
|
+
r != null ? w.input(M(r)) : y
|
|
1379
1410
|
)
|
|
1380
1411
|
});
|
|
1381
1412
|
}, Et = (e) => {
|
|
@@ -1388,26 +1419,26 @@ const It = (e) => {
|
|
|
1388
1419
|
after: o,
|
|
1389
1420
|
hasError: i,
|
|
1390
1421
|
disabled: l,
|
|
1391
|
-
autocomplete:
|
|
1422
|
+
autocomplete: d,
|
|
1392
1423
|
placeholder: u,
|
|
1393
|
-
...
|
|
1394
|
-
} = e,
|
|
1424
|
+
...h
|
|
1425
|
+
} = e, b = {
|
|
1395
1426
|
name: "password",
|
|
1396
1427
|
disabled: l,
|
|
1397
|
-
...
|
|
1398
|
-
}, m = I(!0),
|
|
1428
|
+
...h
|
|
1429
|
+
}, m = I(!0), f = k(
|
|
1399
1430
|
m,
|
|
1400
|
-
|
|
1401
|
-
)((
|
|
1402
|
-
return q(R, (
|
|
1431
|
+
d
|
|
1432
|
+
)((v, S) => v ? S ?? "current-password" : "off");
|
|
1433
|
+
return q(R, (v) => {
|
|
1403
1434
|
const S = k(
|
|
1404
|
-
|
|
1435
|
+
v.$.passwordPlaceholderText,
|
|
1405
1436
|
m,
|
|
1406
1437
|
u
|
|
1407
1438
|
)((T, $, me) => $ ? "•••••••••••••••" : me ?? T), P = p.button(
|
|
1408
1439
|
c.class("bc-input-container__password-toggle"),
|
|
1409
|
-
x.label(
|
|
1410
|
-
|
|
1440
|
+
x.label(v.$.togglePasswordVisibility),
|
|
1441
|
+
w.click(() => m.update((T) => !T)),
|
|
1411
1442
|
_(
|
|
1412
1443
|
m,
|
|
1413
1444
|
() => F({ icon: "line-md:watch" }),
|
|
@@ -1420,8 +1451,8 @@ const It = (e) => {
|
|
|
1420
1451
|
hasError: i,
|
|
1421
1452
|
input: p.input(
|
|
1422
1453
|
Z({
|
|
1423
|
-
...
|
|
1424
|
-
autocomplete:
|
|
1454
|
+
...b,
|
|
1455
|
+
autocomplete: f,
|
|
1425
1456
|
placeholder: S
|
|
1426
1457
|
}),
|
|
1427
1458
|
_(
|
|
@@ -1431,9 +1462,9 @@ const It = (e) => {
|
|
|
1431
1462
|
),
|
|
1432
1463
|
c.class("bc-input"),
|
|
1433
1464
|
c.value(t),
|
|
1434
|
-
s != null ?
|
|
1435
|
-
n != null ?
|
|
1436
|
-
r != null ?
|
|
1465
|
+
s != null ? w.blur(M(s)) : y,
|
|
1466
|
+
n != null ? w.change(M(n)) : y,
|
|
1467
|
+
r != null ? w.input(M(r)) : y
|
|
1437
1468
|
),
|
|
1438
1469
|
after: o != null ? E(P, o) : P
|
|
1439
1470
|
});
|
|
@@ -1540,7 +1571,7 @@ class A {
|
|
|
1540
1571
|
this.hasError,
|
|
1541
1572
|
this.touched,
|
|
1542
1573
|
a.validationMode
|
|
1543
|
-
)((i, l,
|
|
1574
|
+
)((i, l, d) => d === "continuous" ? !!i : !!i && !!l) : this.errorVisible = k(
|
|
1544
1575
|
this.hasError,
|
|
1545
1576
|
this.touched
|
|
1546
1577
|
)((i, l) => !!i && !!l), this.dirty = k(
|
|
@@ -1752,10 +1783,10 @@ class it extends A {
|
|
|
1752
1783
|
const i = n.map((u) => u ?? [], o);
|
|
1753
1784
|
super(t, s, i, r, a, o);
|
|
1754
1785
|
const l = i.on((u) => {
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1757
|
-
const
|
|
1758
|
-
|
|
1786
|
+
const h = this.#e.length - u.length;
|
|
1787
|
+
h > 0 && (this.#e.splice(u.length, h).forEach((b, m) => {
|
|
1788
|
+
const f = u.length + m;
|
|
1789
|
+
b.dispose(), this.#t.get(f)?.(), this.#t.delete(f), this.#s.delete(f), this.#r.get(f)?.(), this.#r.delete(f), this.#a.delete(f);
|
|
1759
1790
|
}), this.#l(), this.#o());
|
|
1760
1791
|
});
|
|
1761
1792
|
this.length = i.map((u) => u.length), this.#c = this.touched.on(() => {
|
|
@@ -1763,7 +1794,7 @@ class it extends A {
|
|
|
1763
1794
|
}), this.#u = this.dirty.on(() => {
|
|
1764
1795
|
this.#o();
|
|
1765
1796
|
});
|
|
1766
|
-
const
|
|
1797
|
+
const d = this.value.on(() => this.#o());
|
|
1767
1798
|
this.onDispose(() => {
|
|
1768
1799
|
for (const u of this.#e)
|
|
1769
1800
|
u.dispose();
|
|
@@ -1771,7 +1802,7 @@ class it extends A {
|
|
|
1771
1802
|
for (const u of this.#t.values()) u();
|
|
1772
1803
|
this.#t.clear(), this.#s.clear(), this.#n.dispose();
|
|
1773
1804
|
for (const u of this.#r.values()) u();
|
|
1774
|
-
this.#r.clear(), this.#a.clear(), this.#i.dispose(), this.#c(), this.#u(),
|
|
1805
|
+
this.#r.clear(), this.#a.clear(), this.#i.dispose(), this.#c(), this.#u(), d();
|
|
1775
1806
|
});
|
|
1776
1807
|
}
|
|
1777
1808
|
item = (t) => {
|
|
@@ -1858,8 +1889,8 @@ function ct(e) {
|
|
|
1858
1889
|
const t = e.filter((r) => r.path == null || r.path.length === 0).map((r) => r.message), s = e.filter((r) => r.path != null && r.path.length > 0).reduce((r, a) => {
|
|
1859
1890
|
const o = lt(a.path), i = o.pop();
|
|
1860
1891
|
let l = r;
|
|
1861
|
-
for (const
|
|
1862
|
-
l.dependencies == null && (l.dependencies = {}), l.dependencies[
|
|
1892
|
+
for (const d of o)
|
|
1893
|
+
l.dependencies == null && (l.dependencies = {}), l.dependencies[d] == null && (l.dependencies[d] = {}), l = l.dependencies[d];
|
|
1863
1894
|
return l.dependencies == null && (l.dependencies = {}), l.dependencies[i] = { message: a.message }, r;
|
|
1864
1895
|
}, {}), n = t.join(`
|
|
1865
1896
|
`);
|
|
@@ -1876,40 +1907,40 @@ function ut({
|
|
|
1876
1907
|
validationMode: r,
|
|
1877
1908
|
validateDebounceMs: a
|
|
1878
1909
|
}) {
|
|
1879
|
-
const o = L.deriveProp(e), i = I(D.valid), l = I(!1),
|
|
1880
|
-
i.set(
|
|
1910
|
+
const o = L.deriveProp(e), i = I(D.valid), l = I(!1), d = I(r ?? "touchedOrSubmit"), u = (v) => {
|
|
1911
|
+
i.set(v);
|
|
1881
1912
|
};
|
|
1882
|
-
let
|
|
1883
|
-
const
|
|
1913
|
+
let h;
|
|
1914
|
+
const b = async (v) => {
|
|
1884
1915
|
if (s != null) {
|
|
1885
|
-
const S = await s(
|
|
1916
|
+
const S = await s(v);
|
|
1886
1917
|
u(S);
|
|
1887
1918
|
}
|
|
1888
|
-
}, m = async (
|
|
1889
|
-
o.set(
|
|
1890
|
-
const S =
|
|
1919
|
+
}, m = async (v) => {
|
|
1920
|
+
o.set(v), t?.(v);
|
|
1921
|
+
const S = d.value;
|
|
1891
1922
|
if (s != null) {
|
|
1892
1923
|
if (S === "onSubmit")
|
|
1893
1924
|
return;
|
|
1894
1925
|
const P = a ?? 0;
|
|
1895
|
-
P > 0 ? (
|
|
1896
|
-
|
|
1897
|
-
}, P)) : await
|
|
1926
|
+
P > 0 ? (h && clearTimeout(h), h = setTimeout(() => {
|
|
1927
|
+
b(v);
|
|
1928
|
+
}, P)) : await b(v);
|
|
1898
1929
|
}
|
|
1899
|
-
},
|
|
1930
|
+
}, f = new A(
|
|
1900
1931
|
[],
|
|
1901
1932
|
m,
|
|
1902
1933
|
o,
|
|
1903
1934
|
i,
|
|
1904
1935
|
{
|
|
1905
1936
|
disabled: l,
|
|
1906
|
-
validationMode:
|
|
1937
|
+
validationMode: d
|
|
1907
1938
|
},
|
|
1908
1939
|
n ?? N
|
|
1909
1940
|
);
|
|
1910
|
-
return
|
|
1911
|
-
l.dispose(), o.dispose(), i.dispose(),
|
|
1912
|
-
}), { controller:
|
|
1941
|
+
return f.onDispose(() => {
|
|
1942
|
+
l.dispose(), o.dispose(), i.dispose(), d.dispose(), h && clearTimeout(h);
|
|
1943
|
+
}), { controller: f, setStatus: u };
|
|
1913
1944
|
}
|
|
1914
1945
|
function be(e) {
|
|
1915
1946
|
return E(c.disabled(e.disabled), c.name(e.name));
|
|
@@ -1920,7 +1951,7 @@ function Pt(e, {
|
|
|
1920
1951
|
return E(
|
|
1921
1952
|
be(e),
|
|
1922
1953
|
c.value(e.value),
|
|
1923
|
-
(t === "input" ?
|
|
1954
|
+
(t === "input" ? w.input : w.change)(M(e.change))
|
|
1924
1955
|
);
|
|
1925
1956
|
}
|
|
1926
1957
|
function Vt(e, {
|
|
@@ -1929,7 +1960,7 @@ function Vt(e, {
|
|
|
1929
1960
|
return E(
|
|
1930
1961
|
be(e),
|
|
1931
1962
|
c.valueAsNumber(e.value),
|
|
1932
|
-
(t === "input" ?
|
|
1963
|
+
(t === "input" ? w.input : w.change)(
|
|
1933
1964
|
ke(e.change)
|
|
1934
1965
|
)
|
|
1935
1966
|
);
|
|
@@ -1987,16 +2018,16 @@ function $t({
|
|
|
1987
2018
|
setStatus: o,
|
|
1988
2019
|
submit: async (u) => {
|
|
1989
2020
|
if (i.set(!0), u?.preventDefault(), l.markAllTouched(), (n ?? "touchedOrSubmit") === "onSubmit") {
|
|
1990
|
-
const
|
|
1991
|
-
await t["~standard"].validate(
|
|
2021
|
+
const b = l.value.value, m = re(
|
|
2022
|
+
await t["~standard"].validate(b)
|
|
1992
2023
|
);
|
|
1993
2024
|
if (o(m), m.type === "invalid") {
|
|
1994
2025
|
i.set(!1);
|
|
1995
2026
|
return;
|
|
1996
2027
|
}
|
|
1997
2028
|
}
|
|
1998
|
-
const
|
|
1999
|
-
i.set(!1),
|
|
2029
|
+
const h = await s(l.value.value);
|
|
2030
|
+
i.set(!1), h.type === "invalid" && o(h);
|
|
2000
2031
|
},
|
|
2001
2032
|
submitting: i
|
|
2002
2033
|
};
|
|
@@ -2015,9 +2046,9 @@ function ht({
|
|
|
2015
2046
|
if (i === r.value) return;
|
|
2016
2047
|
r.set(i);
|
|
2017
2048
|
const l = dt(i);
|
|
2018
|
-
for (const
|
|
2049
|
+
for (const d of l)
|
|
2019
2050
|
try {
|
|
2020
|
-
const u = await n(
|
|
2051
|
+
const u = await n(d);
|
|
2021
2052
|
if (
|
|
2022
2053
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2023
2054
|
typeof u.default == "object" && Object.keys(u).length === 1
|
|
@@ -2034,7 +2065,7 @@ function ht({
|
|
|
2034
2065
|
} catch {
|
|
2035
2066
|
continue;
|
|
2036
2067
|
}
|
|
2037
|
-
console.warn(`No locale found for "
|
|
2068
|
+
console.warn(`No locale found for "${e.value}", using fallback`), i === r.value && a.set(s);
|
|
2038
2069
|
});
|
|
2039
2070
|
return {
|
|
2040
2071
|
/** Clean up all resources and event listeners */
|
|
@@ -2072,49 +2103,50 @@ function pt({
|
|
|
2072
2103
|
const R = pt({
|
|
2073
2104
|
defaultLocale: _e,
|
|
2074
2105
|
defaultMessages: Ie,
|
|
2075
|
-
localeLoader: async (e) => (await Ee(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-
|
|
2106
|
+
localeLoader: async (e) => (await Ee(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-BgrUqaxG.js"), "./locales/de.ts": () => import("./de-D_sdCcAw.js"), "./locales/en.ts": () => Promise.resolve().then(() => De), "./locales/es.ts": () => import("./es-DczvLqEV.js"), "./locales/fa.ts": () => import("./fa-DhPP5Tgo.js"), "./locales/fr.ts": () => import("./fr-D3WwoeQg.js"), "./locales/he.ts": () => import("./he-CFhi-6Rs.js"), "./locales/hi.ts": () => import("./hi-Cqy8JcS7.js"), "./locales/it.ts": () => import("./it-CtMArqSp.js"), "./locales/ja.ts": () => import("./ja-UFqZT78C.js"), "./locales/ko.ts": () => import("./ko-B5LB1_X_.js"), "./locales/nl.ts": () => import("./nl-DCfHVqzQ.js"), "./locales/pl.ts": () => import("./pl-UcTv39q1.js"), "./locales/pt.ts": () => import("./pt-CXsgmVtb.js"), "./locales/ru.ts": () => import("./ru-C0MvZW2g.js"), "./locales/tr.ts": () => import("./tr-CIIkc1uL.js"), "./locales/ur.ts": () => import("./ur-Cpx9oyTV.js"), "./locales/vi.ts": () => import("./vi-D24AUQ01.js"), "./locales/zh.ts": () => import("./zh-25YFRjoV.js") }), `./locales/${e}.ts`, 3)).default,
|
|
2076
2107
|
providerName: "BeatUII18n"
|
|
2077
2108
|
});
|
|
2078
2109
|
export {
|
|
2079
|
-
|
|
2080
|
-
|
|
2110
|
+
re as $,
|
|
2111
|
+
he as A,
|
|
2081
2112
|
R as B,
|
|
2082
2113
|
wt as C,
|
|
2083
|
-
|
|
2114
|
+
Fe as D,
|
|
2084
2115
|
It as E,
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2116
|
+
qe as F,
|
|
2117
|
+
nt as G,
|
|
2118
|
+
Mt as H,
|
|
2088
2119
|
F as I,
|
|
2089
|
-
|
|
2090
|
-
|
|
2120
|
+
rt as J,
|
|
2121
|
+
at as K,
|
|
2091
2122
|
Qe as L,
|
|
2092
2123
|
Lt as M,
|
|
2093
|
-
|
|
2124
|
+
ot as N,
|
|
2094
2125
|
N as O,
|
|
2095
2126
|
Et as P,
|
|
2096
|
-
|
|
2127
|
+
it as Q,
|
|
2097
2128
|
Ze as R,
|
|
2098
2129
|
Dt as S,
|
|
2099
2130
|
_t as T,
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2131
|
+
lt as U,
|
|
2132
|
+
ct as V,
|
|
2133
|
+
ut as W,
|
|
2134
|
+
be as X,
|
|
2135
|
+
Pt as Y,
|
|
2136
|
+
Vt as Z,
|
|
2106
2137
|
Ee as _,
|
|
2107
2138
|
Ke as a,
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2139
|
+
Ct as a0,
|
|
2140
|
+
Ye as a1,
|
|
2141
|
+
xt as a2,
|
|
2142
|
+
ht as a3,
|
|
2143
|
+
ue as a4,
|
|
2144
|
+
Le as a5,
|
|
2145
|
+
mt as a6,
|
|
2146
|
+
vt as a7,
|
|
2147
|
+
kt as a8,
|
|
2148
|
+
Me as a9,
|
|
2149
|
+
yt as aa,
|
|
2118
2150
|
D as b,
|
|
2119
2151
|
St as c,
|
|
2120
2152
|
Tt as d,
|
|
@@ -2127,17 +2159,17 @@ export {
|
|
|
2127
2159
|
Ie as k,
|
|
2128
2160
|
Pe as l,
|
|
2129
2161
|
pt as m,
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2162
|
+
O as n,
|
|
2163
|
+
se as o,
|
|
2164
|
+
A as p,
|
|
2165
|
+
G as q,
|
|
2166
|
+
V as r,
|
|
2135
2167
|
le as s,
|
|
2136
2168
|
At as t,
|
|
2137
2169
|
$t as u,
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2170
|
+
fe as v,
|
|
2171
|
+
j as w,
|
|
2172
|
+
Ge as x,
|
|
2173
|
+
We as y,
|
|
2174
|
+
_e as z
|
|
2143
2175
|
};
|