@tempots/beatui 0.39.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-1S9vgvv2.cjs → 2019-nWH_nAwT.cjs} +1 -1
- package/dist/{2019-DPD_eCKE.js → 2019-sCKLAY8c.js} +2 -2
- package/dist/{2020-aLm9VmDL.js → 2020-B4xCW_nu.js} +2 -2
- package/dist/{2020-CGrbEEmD.cjs → 2020-D7RWX09D.cjs} +1 -1
- package/dist/{ar-B0vT_MPe.cjs → ar-D_4BfIJO.cjs} +1 -1
- package/dist/{ar-CbM09z5P.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 +181 -107
- package/dist/beatui.tailwind.css +181 -107
- package/dist/{de-tK36cL_u.cjs → de-C0PZz9sE.cjs} +1 -1
- package/dist/{de-Dd907tZQ.js → de-CeLwmVZz.js} +1 -1
- package/dist/{es-K35LRZa-.cjs → es-C8qT1ins.cjs} +1 -1
- package/dist/{es-BkJxjMdG.js → es-DxOgARww.js} +1 -1
- package/dist/{fa-DBTUBsw_.js → fa-B9pEff8A.js} +1 -1
- package/dist/{fa-BBikwwku.cjs → fa-BFV9MxMX.cjs} +1 -1
- package/dist/{fr-DMtXrrnJ.cjs → fr-BBx5IJ7G.cjs} +1 -1
- package/dist/{fr-Fmupo556.js → fr-Caeevx56.js} +1 -1
- package/dist/{he-on3Ivp8g.cjs → he-CMOvd4Dr.cjs} +1 -1
- package/dist/{he-DkI64oaY.js → he-DeN-WW3u.js} +1 -1
- package/dist/{hi-GdD5MihT.js → hi-Dey2HxiD.js} +1 -1
- package/dist/{hi-CNFV8ITE.cjs → hi-IOU_PzvH.cjs} +1 -1
- package/dist/{index-e8oQ-k0x.cjs → index-B0ff5lT-.cjs} +4 -4
- package/dist/{index-BkQ7xHgi.js → index-BTZqW3-b.js} +1245 -1232
- package/dist/{index-wdi93sK4.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-BA93M8Ux.cjs → index-D8fg48Fv.cjs} +1 -1
- package/dist/{index-BfFlhmAq.js → index-DJqo6Guq.js} +1 -1
- package/dist/{index-CPBlySmE.cjs → index-Dtka01mK.cjs} +12 -12
- package/dist/{index-BK8t6gqu.js → index-HqWBd-jW.js} +680 -677
- package/dist/{index-LUItEwlw.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 +1489 -1467
- package/dist/{it-Bpnfd60V.js → it-DghnQdZa.js} +1 -1
- package/dist/{it-BDOzBRkQ.cjs → it-uQF0jkDT.cjs} +1 -1
- package/dist/{ja-N-7c7zD7.cjs → ja-BJD6uPbl.cjs} +1 -1
- package/dist/{ja-SjlGNgs9.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-CH69ZNts.js → ko-53o5WJ-v.js} +1 -1
- package/dist/{ko-BBeTXIlY.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-BD76Rve3.js → modal-_2B8vIo0.js} +234 -209
- package/dist/{nl-C2C9QDH2.cjs → nl-CJE0fC8g.cjs} +1 -1
- package/dist/{nl-DnvMlW8v.js → nl-DvUVT7xd.js} +1 -1
- package/dist/{notice-CQZseCQs.js → notice-C4n5jXi6.js} +196 -186
- package/dist/notice-CncwkUTy.cjs +2 -0
- package/dist/{pl-CBEX2qN1.js → pl-C3oYeTwf.js} +1 -1
- package/dist/{pl-sNBCzEUd.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-Bvxg9VEA.cjs → pt-BAqNKCuy.cjs} +1 -1
- package/dist/{pt-ByFqFAdQ.js → pt-BJGeScun.js} +1 -1
- package/dist/{ru-6d5JfoDw.js → ru-2irv1YXp.js} +1 -1
- package/dist/{ru-CPAdsn4m.cjs → ru-CAlgJm3K.cjs} +1 -1
- package/dist/{toolbar-Dw2VQD9y.cjs → toolbar-B7HrL0vD.cjs} +1 -1
- package/dist/{toolbar-Cl_TAa3r.js → toolbar-CVDXVnje.js} +1 -1
- package/dist/{tr-gv4vJfm8.js → tr-CkHLE5u7.js} +1 -1
- package/dist/{tr-IKZtCQQR.cjs → tr-DMiXAhok.cjs} +1 -1
- package/dist/{translations-djDSPqdb.js → translations-DEEflRUY.js} +61 -60
- package/dist/{translations-CK426qyd.cjs → translations-DRNj0YIi.cjs} +1 -1
- package/dist/{translations-DJR65Jii.cjs → translations-Dw1oO6Dh.cjs} +1 -1
- package/dist/{translations-DXLmnUiB.js → translations-Q5C5LyIi.js} +1 -1
- package/dist/types/components/misc/notification-provider.d.ts +3 -3
- package/dist/types/utils/use-animated-toggle.d.ts +17 -4
- package/dist/{ur-Bgq_2yjr.cjs → ur-BjiNs3SL.cjs} +1 -1
- package/dist/{ur-Bo6bjEBS.js → ur-bxBR_9Z-.js} +1 -1
- package/dist/{utils-Bw911Eo4.js → utils-BCbc19N0.js} +202 -193
- package/dist/utils-BJZipnfW.cjs +1 -0
- package/dist/{vi-BrUQnj-8.cjs → vi-CByOZvV2.cjs} +1 -1
- package/dist/{vi-xDLJ3TIx.js → vi-CKknZqol.js} +1 -1
- package/dist/{zh-BqH1Cioq.cjs → zh-C0QOebEA.cjs} +1 -1
- package/dist/{zh-BivWxJJh.js → zh-CmUgcP9o.js} +1 -1
- package/package.json +4 -3
- package/dist/modal-DQycMZ8_.cjs +0 -1
- package/dist/notice-CFoc4PJe.cjs +0 -2
- package/dist/utils-Bsrfm-0d.cjs +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Use as
|
|
1
|
+
import { Use as W, Value as u, prop as et, html as I, OnDispose as N, attr as a, on as C, WithElement as it, aria as z, bind as _t, computedOf as L, style as dt, When as E, NotEmpty as Gt, Fragment as B, ForEach as ft, svg as At, svgAttr as ht, Empty as T, emitValue as j, coalesce as Qt, Ensure as Jt, OneOfType as Kt, Repeat as Pt, signal as Ft, input as K, emitValueAsNullableDate as te, emitValueAsNullableDateTime as ee, emitValueAsNumber as G, emit as ne, Task as Bt } from "@tempots/dom";
|
|
2
2
|
import { f as se } from "./colors-WfmhQ5e1.js";
|
|
3
3
|
import { g as re } from "./timer-DzWb416P.js";
|
|
4
4
|
import { ElementRect as jt, AutoSelect as le } from "@tempots/ui";
|
|
5
|
-
import { a as X, b as
|
|
6
|
-
import { C as $t, m as ue, d as pe, I as Ht, E as de, P as fe, S as ct, s as me, e as bt, O as lt, f as Lt } from "./notice-
|
|
5
|
+
import { a as X, b as P, f as ae, I as R, C as H, d as yt, T as oe, L as ce, c as Vt, e as ie, B as gt } from "./translations-DEEflRUY.js";
|
|
6
|
+
import { C as $t, m as ue, d as pe, I as Ht, E as de, P as fe, S as ct, s as me, e as bt, O as lt, f as Lt } from "./notice-C4n5jXi6.js";
|
|
7
7
|
class he extends Error {
|
|
8
8
|
constructor(e = "Missing implementation") {
|
|
9
9
|
super(e), this.name = "MissingImplementationError";
|
|
@@ -27,7 +27,7 @@ function Et({
|
|
|
27
27
|
disabled: c = !1,
|
|
28
28
|
allowMultiple: l
|
|
29
29
|
}) {
|
|
30
|
-
return
|
|
30
|
+
return W(X, (i) => {
|
|
31
31
|
const o = u.deriveProp(e ?? []), p = et(!1), m = (g) => {
|
|
32
32
|
g.preventDefault(), g.stopPropagation(), p.value = !0;
|
|
33
33
|
}, f = (g) => {
|
|
@@ -50,6 +50,7 @@ function Et({
|
|
|
50
50
|
u.get(n) && (g.key === "Enter" || g.key === " ") && (g.preventDefault(), d(g));
|
|
51
51
|
};
|
|
52
52
|
return I.div(
|
|
53
|
+
N(() => u.dispose(o), p),
|
|
53
54
|
a.role("button"),
|
|
54
55
|
a.tabindex(
|
|
55
56
|
u.map(n, (g) => g ? 0 : -1)
|
|
@@ -70,7 +71,7 @@ function Et({
|
|
|
70
71
|
"position: absolute; left: -9999px; opacity: 0; pointer-events: none;"
|
|
71
72
|
),
|
|
72
73
|
C.change(h),
|
|
73
|
-
it((g) => (x = g,
|
|
74
|
+
it((g) => (x = g, N(
|
|
74
75
|
o.on((b) => {
|
|
75
76
|
const D = globalThis.DataTransfer;
|
|
76
77
|
if (D != null) {
|
|
@@ -81,7 +82,7 @@ function Et({
|
|
|
81
82
|
)))
|
|
82
83
|
),
|
|
83
84
|
// Screen reader instructions
|
|
84
|
-
|
|
85
|
+
z.label(_t(i.$.dropZoneInstructions)(n)),
|
|
85
86
|
// Content
|
|
86
87
|
s({ files: o, clear: () => o.value = [], change: o.set })
|
|
87
88
|
);
|
|
@@ -113,6 +114,7 @@ function dn({
|
|
|
113
114
|
ve
|
|
114
115
|
);
|
|
115
116
|
return I.div(
|
|
117
|
+
N(o),
|
|
116
118
|
a.class(
|
|
117
119
|
L(
|
|
118
120
|
n,
|
|
@@ -166,7 +168,7 @@ function dn({
|
|
|
166
168
|
});
|
|
167
169
|
}
|
|
168
170
|
const x = re(d);
|
|
169
|
-
return
|
|
171
|
+
return N(x, v.on(d));
|
|
170
172
|
}),
|
|
171
173
|
p
|
|
172
174
|
))
|
|
@@ -193,18 +195,18 @@ function Ut(t) {
|
|
|
193
195
|
const n = URL.createObjectURL(r);
|
|
194
196
|
e.value = n;
|
|
195
197
|
}), I.div(
|
|
198
|
+
N(e, () => {
|
|
199
|
+
e.value && URL.revokeObjectURL(e.value);
|
|
200
|
+
}),
|
|
196
201
|
a.class("bc-file-input__thumbnail-container"),
|
|
197
202
|
I.img(
|
|
198
203
|
a.src(e),
|
|
199
204
|
a.alt(t.map((r) => r.name)),
|
|
200
|
-
a.class("bc-file-input__thumbnail")
|
|
201
|
-
W(() => {
|
|
202
|
-
e.value && URL.revokeObjectURL(e.value);
|
|
203
|
-
})
|
|
205
|
+
a.class("bc-file-input__thumbnail")
|
|
204
206
|
)
|
|
205
207
|
);
|
|
206
208
|
},
|
|
207
|
-
() =>
|
|
209
|
+
() => R({ icon: t.map(_e) })
|
|
208
210
|
);
|
|
209
211
|
}
|
|
210
212
|
const ye = (t, ...e) => {
|
|
@@ -240,7 +242,7 @@ const ye = (t, ...e) => {
|
|
|
240
242
|
files: k,
|
|
241
243
|
clear: _,
|
|
242
244
|
change: w
|
|
243
|
-
}) =>
|
|
245
|
+
}) => W(
|
|
244
246
|
X,
|
|
245
247
|
($) => I.div(
|
|
246
248
|
a.class("bc-file-input__drop-zone"),
|
|
@@ -248,7 +250,7 @@ const ye = (t, ...e) => {
|
|
|
248
250
|
a.class(
|
|
249
251
|
"bc-file-input__drop-zone-content bc-file-input__drop-zone-content--empty"
|
|
250
252
|
),
|
|
251
|
-
|
|
253
|
+
R({ icon: "mdi:cloud-upload-outline", size: "xl" }),
|
|
252
254
|
I.div(
|
|
253
255
|
a.class("bc-file-input__drop-zone-text"),
|
|
254
256
|
_t($.$.filesInputInstructions)(
|
|
@@ -261,7 +263,7 @@ const ye = (t, ...e) => {
|
|
|
261
263
|
)
|
|
262
264
|
), D = ({
|
|
263
265
|
files: k
|
|
264
|
-
}) =>
|
|
266
|
+
}) => W(
|
|
265
267
|
X,
|
|
266
268
|
(_) => I.div(
|
|
267
269
|
a.class("bc-file-input__compact-input"),
|
|
@@ -283,7 +285,7 @@ const ye = (t, ...e) => {
|
|
|
283
285
|
),
|
|
284
286
|
() => I.span(
|
|
285
287
|
a.class("bc-file-input__compact-placeholder"),
|
|
286
|
-
|
|
288
|
+
R({ icon: "mdi:cloud-upload-outline", size: "sm" }),
|
|
287
289
|
" ",
|
|
288
290
|
_t(_.$.filesInputInstructions)(
|
|
289
291
|
s,
|
|
@@ -294,9 +296,9 @@ const ye = (t, ...e) => {
|
|
|
294
296
|
)
|
|
295
297
|
)
|
|
296
298
|
);
|
|
297
|
-
return
|
|
299
|
+
return W(
|
|
298
300
|
X,
|
|
299
|
-
(k) =>
|
|
301
|
+
(k) => P(
|
|
300
302
|
{
|
|
301
303
|
baseContainer: u.map(x, (_) => !_),
|
|
302
304
|
disabled: o,
|
|
@@ -346,7 +348,7 @@ const ye = (t, ...e) => {
|
|
|
346
348
|
f,
|
|
347
349
|
() => Gt(
|
|
348
350
|
d,
|
|
349
|
-
() =>
|
|
351
|
+
() => B(
|
|
350
352
|
I.div(
|
|
351
353
|
a.class("bc-file-input__file-list"),
|
|
352
354
|
ft(d, (_, w) => {
|
|
@@ -733,7 +735,7 @@ const mn = (t) => {
|
|
|
733
735
|
// Invisible native input overlays the blob for picker and accessibility
|
|
734
736
|
I.input(
|
|
735
737
|
a.type("color"),
|
|
736
|
-
|
|
738
|
+
H(t),
|
|
737
739
|
// Native color input needs hex without alpha
|
|
738
740
|
a.value(u.map(m, ([w, $, M]) => It(w, $, M))),
|
|
739
741
|
a.class("bc-input bc-color-input bc-color-input__native"),
|
|
@@ -741,20 +743,20 @@ const mn = (t) => {
|
|
|
741
743
|
n != null ? C.change((w) => {
|
|
742
744
|
const $ = w.target.value;
|
|
743
745
|
if (!n) return;
|
|
744
|
-
const [M, A, F] = kt($), S = u.get(v) ?? 1,
|
|
746
|
+
const [M, A, F] = kt($), S = u.get(v) ?? 1, V = ot(
|
|
745
747
|
u.get(y),
|
|
746
748
|
u.get(d)
|
|
747
|
-
),
|
|
748
|
-
n(
|
|
749
|
+
), O = at(M, A, F, S, V, u.get(d));
|
|
750
|
+
n(O);
|
|
749
751
|
}) : T,
|
|
750
752
|
s != null ? C.input((w) => {
|
|
751
753
|
const $ = w.target.value;
|
|
752
754
|
if (!s) return;
|
|
753
|
-
const [M, A, F] = kt($), S = u.get(v) ?? 1,
|
|
755
|
+
const [M, A, F] = kt($), S = u.get(v) ?? 1, V = ot(
|
|
754
756
|
u.get(y),
|
|
755
757
|
u.get(d)
|
|
756
|
-
),
|
|
757
|
-
s(
|
|
758
|
+
), O = at(M, A, F, S, V, u.get(d));
|
|
759
|
+
s(O);
|
|
758
760
|
}) : T
|
|
759
761
|
)
|
|
760
762
|
), _ = E(
|
|
@@ -773,8 +775,8 @@ const mn = (t) => {
|
|
|
773
775
|
const [M, A, F] = u.get(m), S = ot(
|
|
774
776
|
u.get(y),
|
|
775
777
|
u.get(d)
|
|
776
|
-
),
|
|
777
|
-
s?.(
|
|
778
|
+
), V = at(M, A, F, $, S, u.get(d));
|
|
779
|
+
s?.(V);
|
|
778
780
|
}),
|
|
779
781
|
C.change((w) => {
|
|
780
782
|
const $ = parseFloat(w.target.value);
|
|
@@ -782,19 +784,19 @@ const mn = (t) => {
|
|
|
782
784
|
const [M, A, F] = u.get(m), S = ot(
|
|
783
785
|
u.get(y),
|
|
784
786
|
u.get(d)
|
|
785
|
-
),
|
|
786
|
-
n?.(
|
|
787
|
+
), V = at(M, A, F, $, S, u.get(d));
|
|
788
|
+
n?.(V);
|
|
787
789
|
})
|
|
788
790
|
)
|
|
789
791
|
);
|
|
790
|
-
return
|
|
792
|
+
return P({
|
|
791
793
|
baseContainer: !0,
|
|
792
794
|
...t,
|
|
793
795
|
// ensure our control does not try to grow
|
|
794
796
|
growInput: !1,
|
|
795
797
|
input: k,
|
|
796
798
|
// If caller provided an `after`, append RGB before it
|
|
797
|
-
after:
|
|
799
|
+
after: B(
|
|
798
800
|
E(
|
|
799
801
|
c ?? !1,
|
|
800
802
|
() => I.span(a.class("bc-color-input__rgb"), h)
|
|
@@ -805,7 +807,7 @@ const mn = (t) => {
|
|
|
805
807
|
});
|
|
806
808
|
}, Dt = "$$tts-exp-", Ee = (t, e) => it((r) => {
|
|
807
809
|
const n = `${Dt}${t}`;
|
|
808
|
-
return
|
|
810
|
+
return N(u.on(e, (s) => Reflect.set(r, n, s)));
|
|
809
811
|
}), hn = (t, e) => {
|
|
810
812
|
const r = `${Dt}${t}`;
|
|
811
813
|
return (n) => {
|
|
@@ -852,6 +854,7 @@ const bn = ({
|
|
|
852
854
|
}) => {
|
|
853
855
|
const c = u.deriveProp(t ?? !1), l = et(!1), i = u.map(s ?? !1, (o) => o);
|
|
854
856
|
return I.div(
|
|
857
|
+
N(c, l, () => u.dispose(i)),
|
|
855
858
|
a.class("bc-editable-text"),
|
|
856
859
|
a.class(
|
|
857
860
|
u.map(
|
|
@@ -859,7 +862,7 @@ const bn = ({
|
|
|
859
862
|
(o) => o ? "bc-editable-text--disabled" : ""
|
|
860
863
|
)
|
|
861
864
|
),
|
|
862
|
-
|
|
865
|
+
z.disabled(i),
|
|
863
866
|
E(
|
|
864
867
|
c,
|
|
865
868
|
() => I.input(
|
|
@@ -871,7 +874,7 @@ const bn = ({
|
|
|
871
874
|
o.key === "Enter" ? c.set(!1) : o.key === "Escape" && (l.set(!0), c.set(!1));
|
|
872
875
|
}),
|
|
873
876
|
C.blur(
|
|
874
|
-
|
|
877
|
+
j((o) => {
|
|
875
878
|
if (c.set(!1), l.value) {
|
|
876
879
|
l.set(!1);
|
|
877
880
|
return;
|
|
@@ -898,9 +901,9 @@ const bn = ({
|
|
|
898
901
|
() => I.button(
|
|
899
902
|
a.type("button"),
|
|
900
903
|
a.class("bc-editable-text__edit-button"),
|
|
901
|
-
|
|
904
|
+
W(X, (o) => z.label(o.$.editLabel)),
|
|
902
905
|
C.click(() => c.set(!0)),
|
|
903
|
-
|
|
906
|
+
R({ icon: "line-md/pencil", color: "neutral" })
|
|
904
907
|
)
|
|
905
908
|
)
|
|
906
909
|
)
|
|
@@ -915,7 +918,7 @@ const bn = ({
|
|
|
915
918
|
r
|
|
916
919
|
)((l, i) => e(l.value, i));
|
|
917
920
|
return I.option(
|
|
918
|
-
|
|
921
|
+
N(c.dispose),
|
|
919
922
|
a.selected(c),
|
|
920
923
|
Ee("value", s.$.value),
|
|
921
924
|
s.$.label
|
|
@@ -945,11 +948,11 @@ const bn = ({
|
|
|
945
948
|
after: i
|
|
946
949
|
} = t;
|
|
947
950
|
let o;
|
|
948
|
-
return
|
|
951
|
+
return P(
|
|
949
952
|
{
|
|
950
953
|
...t,
|
|
951
|
-
after:
|
|
952
|
-
|
|
954
|
+
after: B(
|
|
955
|
+
R({
|
|
953
956
|
icon: "ph:caret-down-bold",
|
|
954
957
|
color: "neutral",
|
|
955
958
|
size: "sm"
|
|
@@ -963,11 +966,11 @@ const bn = ({
|
|
|
963
966
|
const { removedNodes: v } = f[0];
|
|
964
967
|
v.length > 0 && (o.selectedIndex = 0);
|
|
965
968
|
});
|
|
966
|
-
return m.observe(p, { childList: !0 }),
|
|
969
|
+
return m.observe(p, { childList: !0 }), N(() => m.disconnect());
|
|
967
970
|
}),
|
|
968
|
-
|
|
971
|
+
H(t),
|
|
969
972
|
a.class("bc-native-select bc-input"),
|
|
970
|
-
|
|
973
|
+
W(
|
|
971
974
|
X,
|
|
972
975
|
(p) => I.option(
|
|
973
976
|
a.hidden("hidden"),
|
|
@@ -1001,14 +1004,14 @@ function vn(t) {
|
|
|
1001
1004
|
}
|
|
1002
1005
|
function Oe(t, e, r) {
|
|
1003
1006
|
const n = t.length.map((s) => s);
|
|
1004
|
-
return
|
|
1005
|
-
|
|
1007
|
+
return B(
|
|
1008
|
+
N(() => n.dispose()),
|
|
1006
1009
|
Pt(
|
|
1007
1010
|
n,
|
|
1008
1011
|
(s) => {
|
|
1009
1012
|
const c = t.item(s.index), l = [];
|
|
1010
|
-
return
|
|
1011
|
-
|
|
1013
|
+
return B(
|
|
1014
|
+
N(() => {
|
|
1012
1015
|
c.dispose(), l.forEach((i) => i());
|
|
1013
1016
|
}),
|
|
1014
1017
|
e({
|
|
@@ -1124,18 +1127,18 @@ function zt(t, e, r, n, s, c) {
|
|
|
1124
1127
|
continue;
|
|
1125
1128
|
}
|
|
1126
1129
|
y += S.optional ? 0 : 1;
|
|
1127
|
-
const
|
|
1128
|
-
if (
|
|
1130
|
+
const V = v[h];
|
|
1131
|
+
if (V == null)
|
|
1129
1132
|
break;
|
|
1130
1133
|
if (S.type === "any") {
|
|
1131
|
-
g++, d.push(S.transform ? S.transform(
|
|
1134
|
+
g++, d.push(S.transform ? S.transform(V) : V), x.push({ kind: "slot", filled: !0 }), b = x.length - 1, h++;
|
|
1132
1135
|
continue;
|
|
1133
1136
|
}
|
|
1134
1137
|
if (S.type === "pattern")
|
|
1135
|
-
if (S.pattern.test(
|
|
1138
|
+
if (S.pattern.test(V)) {
|
|
1136
1139
|
g++;
|
|
1137
|
-
const
|
|
1138
|
-
d.push(
|
|
1140
|
+
const O = S.transform ? S.transform(V) : V;
|
|
1141
|
+
d.push(O), x.push({ kind: "slot", filled: !0 }), b = x.length - 1, h++;
|
|
1139
1142
|
} else {
|
|
1140
1143
|
h++;
|
|
1141
1144
|
continue;
|
|
@@ -1193,7 +1196,7 @@ const Xt = (t) => {
|
|
|
1193
1196
|
g,
|
|
1194
1197
|
D,
|
|
1195
1198
|
k
|
|
1196
|
-
)(($, M, A, F, S,
|
|
1199
|
+
)(($, M, A, F, S, V, O, st, rt, tt, Q, ut, q) => M ? zt($ ?? "", "", M, {
|
|
1197
1200
|
definitions: A ?? {},
|
|
1198
1201
|
useDefaultDefinitions: F ?? !0,
|
|
1199
1202
|
extraLiterals: S ?? [],
|
|
@@ -1203,10 +1206,10 @@ const Xt = (t) => {
|
|
|
1203
1206
|
unmask: tt ?? { strategy: "none" },
|
|
1204
1207
|
allowMode: Q ?? "all",
|
|
1205
1208
|
allow: b,
|
|
1206
|
-
prefix:
|
|
1207
|
-
suffix:
|
|
1209
|
+
prefix: V,
|
|
1210
|
+
suffix: O
|
|
1208
1211
|
}).value : $ ?? ""), w = ($, M) => {
|
|
1209
|
-
const A = $.value ?? "", F = u.get(e) ?? "", S = i != null ? u.get(i) : null,
|
|
1212
|
+
const A = $.value ?? "", F = u.get(e) ?? "", S = i != null ? u.get(i) : null, V = o != null ? u.get(o) : void 0, O = p != null ? u.get(p) : void 0, st = m != null ? u.get(m) : void 0, rt = d != null ? u.get(d) : void 0, tt = h != null ? u.get(h) : void 0, Q = y != null ? u.get(y) : void 0, ut = g != null ? u.get(g) : void 0, q = f != null ? u.get(f) : void 0, U = v != null ? u.get(v) : void 0, {
|
|
1210
1213
|
value: J,
|
|
1211
1214
|
cursor: mt,
|
|
1212
1215
|
completed: St
|
|
@@ -1215,8 +1218,8 @@ const Xt = (t) => {
|
|
|
1215
1218
|
F,
|
|
1216
1219
|
S,
|
|
1217
1220
|
{
|
|
1218
|
-
definitions:
|
|
1219
|
-
useDefaultDefinitions:
|
|
1221
|
+
definitions: V ?? {},
|
|
1222
|
+
useDefaultDefinitions: O ?? !0,
|
|
1220
1223
|
extraLiterals: st ?? [],
|
|
1221
1224
|
autofix: rt ?? "none",
|
|
1222
1225
|
completion: tt ?? { mode: "mask" },
|
|
@@ -1245,93 +1248,99 @@ const Xt = (t) => {
|
|
|
1245
1248
|
cursor: mt
|
|
1246
1249
|
}), M === "input" ? s?.(J) : (n?.(J), St && l?.({ raw: Tt, conformed: J }));
|
|
1247
1250
|
};
|
|
1248
|
-
return
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1251
|
+
return B(
|
|
1252
|
+
N(_),
|
|
1253
|
+
P({
|
|
1254
|
+
...t,
|
|
1255
|
+
input: K.text(
|
|
1256
|
+
H(t),
|
|
1257
|
+
a.value(_),
|
|
1258
|
+
a.class("bc-input"),
|
|
1259
|
+
r != null ? C.blur(r) : T,
|
|
1260
|
+
it(
|
|
1261
|
+
($) => $ instanceof HTMLInputElement ? B(
|
|
1262
|
+
C.input(() => w($, "input")),
|
|
1263
|
+
C.change(() => w($, "change")),
|
|
1264
|
+
C.keydown((M) => {
|
|
1265
|
+
if (M.key !== "Backspace" || !(t.cursor ? u.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
|
|
1266
|
+
const F = $.selectionStart ?? 0, S = $.selectionEnd ?? F;
|
|
1267
|
+
if (F !== S || F <= 0) return;
|
|
1268
|
+
const V = $.value ?? "", O = i != null ? u.get(i) : null;
|
|
1269
|
+
if (!O) return;
|
|
1270
|
+
const st = o != null ? u.get(o) : void 0, rt = p != null ? u.get(p) : !0, tt = f != null ? u.get(f) : void 0, Q = v != null ? u.get(v) : void 0, ut = Yt(
|
|
1271
|
+
typeof O == "function" ? O(V, {
|
|
1272
|
+
raw: V,
|
|
1273
|
+
previousConformed: V,
|
|
1274
|
+
cursor: F,
|
|
1275
|
+
completed: !1
|
|
1276
|
+
}) : O,
|
|
1277
|
+
st ?? {},
|
|
1278
|
+
rt ?? !0
|
|
1279
|
+
), q = /* @__PURE__ */ new Set();
|
|
1280
|
+
for (const U of ut)
|
|
1281
|
+
U.type === "literal" && q.add(U.char);
|
|
1282
|
+
if (tt) for (const U of tt) q.add(U);
|
|
1283
|
+
if (Q) for (const U of Q) q.add(U);
|
|
1284
|
+
if (q.has(V[F - 1])) {
|
|
1285
|
+
let U = F - 1;
|
|
1286
|
+
for (; U >= 0 && q.has(V[U]); ) U--;
|
|
1287
|
+
U >= 0 && (M.preventDefault(), M.stopPropagation(), $.value = V.slice(0, U) + V.slice(U + 1), w($, "input"));
|
|
1288
|
+
}
|
|
1289
|
+
})
|
|
1290
|
+
) : T
|
|
1291
|
+
)
|
|
1286
1292
|
)
|
|
1287
|
-
)
|
|
1288
|
-
|
|
1293
|
+
})
|
|
1294
|
+
);
|
|
1289
1295
|
};
|
|
1290
1296
|
function Y(t, e, r) {
|
|
1291
1297
|
const n = u.map(t, (c) => c != null), s = yt.clearValue;
|
|
1292
|
-
return
|
|
1293
|
-
n,
|
|
1294
|
-
(
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1298
|
+
return B(
|
|
1299
|
+
N(() => u.dispose(n)),
|
|
1300
|
+
E(
|
|
1301
|
+
n,
|
|
1302
|
+
() => I.button(
|
|
1303
|
+
a.type("button"),
|
|
1304
|
+
a.class("bc-input-container__reset"),
|
|
1305
|
+
z.label(s),
|
|
1306
|
+
a.title(s),
|
|
1307
|
+
a.disabled(e ?? !1),
|
|
1308
|
+
R({ icon: "mdi:close", size: "sm" }),
|
|
1309
|
+
C.click((c) => {
|
|
1310
|
+
c.preventDefault(), c.stopPropagation(), r?.(null);
|
|
1311
|
+
})
|
|
1312
|
+
)
|
|
1304
1313
|
)
|
|
1305
1314
|
);
|
|
1306
1315
|
}
|
|
1307
1316
|
const xn = (t) => {
|
|
1308
1317
|
const { value: e, onBlur: r, onChange: n, after: s, disabled: c } = t, l = Y(e, c, n);
|
|
1309
|
-
return
|
|
1318
|
+
return P({
|
|
1310
1319
|
...t,
|
|
1311
1320
|
input: K.date(
|
|
1312
|
-
|
|
1321
|
+
H(t),
|
|
1313
1322
|
a.valueAsDate(e),
|
|
1314
1323
|
a.class("bc-input"),
|
|
1315
|
-
r != null ? C.blur(
|
|
1324
|
+
r != null ? C.blur(j(r)) : T,
|
|
1316
1325
|
n != null ? C.change(te(n)) : T
|
|
1317
1326
|
),
|
|
1318
|
-
after: s != null ?
|
|
1327
|
+
after: s != null ? B(l, s) : l
|
|
1319
1328
|
});
|
|
1320
1329
|
}, We = (t) => {
|
|
1321
1330
|
const e = t.getFullYear(), r = t.getMonth() + 1, n = t.getDate(), s = t.getHours(), c = t.getMinutes(), l = t.getSeconds();
|
|
1322
1331
|
return `${e}-${r.toString().padStart(2, "0")}-${n.toString().padStart(2, "0")}T${s.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}`;
|
|
1323
1332
|
}, wn = (t) => {
|
|
1324
1333
|
const { value: e, onBlur: r, onChange: n, after: s, disabled: c } = t, l = u.map(e, (o) => o != null ? We(o) : null), i = Y(e, c, n);
|
|
1325
|
-
return
|
|
1334
|
+
return P({
|
|
1326
1335
|
...t,
|
|
1327
1336
|
input: K["datetime-local"](
|
|
1328
|
-
|
|
1337
|
+
H(t),
|
|
1329
1338
|
a.value(u.map(l, (o) => o ?? null)),
|
|
1330
1339
|
a.class("bc-input"),
|
|
1331
|
-
r != null ? C.blur(
|
|
1340
|
+
r != null ? C.blur(j(r)) : T,
|
|
1332
1341
|
n != null ? C.change(ee(n)) : T
|
|
1333
1342
|
),
|
|
1334
|
-
after: s != null ?
|
|
1343
|
+
after: s != null ? B(i, s) : i
|
|
1335
1344
|
});
|
|
1336
1345
|
}, Z = (t) => typeof t == "string" && t.trim() === "" ? null : t, nt = (t) => t ?? "", _n = (t) => {
|
|
1337
1346
|
const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
|
|
@@ -1341,7 +1350,7 @@ const xn = (t) => {
|
|
|
1341
1350
|
onChange: n != null ? (p) => n(Z(p)) : void 0,
|
|
1342
1351
|
onInput: s != null ? (p) => s(Z(p)) : void 0,
|
|
1343
1352
|
onBlur: r,
|
|
1344
|
-
after: c != null ?
|
|
1353
|
+
after: c != null ? B(o, c) : o
|
|
1345
1354
|
});
|
|
1346
1355
|
}, yn = (t) => {
|
|
1347
1356
|
const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
|
|
@@ -1351,7 +1360,7 @@ const xn = (t) => {
|
|
|
1351
1360
|
onChange: n != null ? (p) => n(Z(p)) : void 0,
|
|
1352
1361
|
onInput: s != null ? (p) => s(Z(p)) : void 0,
|
|
1353
1362
|
onBlur: r,
|
|
1354
|
-
after: c != null ?
|
|
1363
|
+
after: c != null ? B(o, c) : o
|
|
1355
1364
|
});
|
|
1356
1365
|
}, $n = (t) => {
|
|
1357
1366
|
const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
|
|
@@ -1361,20 +1370,20 @@ const xn = (t) => {
|
|
|
1361
1370
|
onChange: n != null ? (p) => n(Z(p)) : void 0,
|
|
1362
1371
|
onInput: s != null ? (p) => s(Z(p)) : void 0,
|
|
1363
1372
|
onBlur: r,
|
|
1364
|
-
after: c != null ?
|
|
1373
|
+
after: c != null ? B(o, c) : o
|
|
1365
1374
|
});
|
|
1366
1375
|
}, Ze = (t) => {
|
|
1367
1376
|
const { value: e, onBlur: r, onChange: n, onInput: s, rows: c } = t;
|
|
1368
|
-
return
|
|
1377
|
+
return P({
|
|
1369
1378
|
...t,
|
|
1370
1379
|
input: I.textarea(
|
|
1371
|
-
|
|
1380
|
+
H(t),
|
|
1372
1381
|
a.rows(c ?? 3),
|
|
1373
1382
|
a.value(e),
|
|
1374
1383
|
a.class("bc-input"),
|
|
1375
|
-
r != null ? C.blur(
|
|
1376
|
-
n != null ? C.change(
|
|
1377
|
-
s != null ? C.input(
|
|
1384
|
+
r != null ? C.blur(j(r)) : T,
|
|
1385
|
+
n != null ? C.change(j(n)) : T,
|
|
1386
|
+
s != null ? C.input(j(s)) : T
|
|
1378
1387
|
)
|
|
1379
1388
|
});
|
|
1380
1389
|
}, kn = (t) => {
|
|
@@ -1385,13 +1394,13 @@ const xn = (t) => {
|
|
|
1385
1394
|
onChange: n != null ? (p) => n(Z(p)) : void 0,
|
|
1386
1395
|
onInput: s != null ? (p) => s(Z(p)) : void 0,
|
|
1387
1396
|
onBlur: r,
|
|
1388
|
-
after: c != null ?
|
|
1397
|
+
after: c != null ? B(o, c) : o
|
|
1389
1398
|
});
|
|
1390
1399
|
}, In = (t) => {
|
|
1391
1400
|
const { value: e, step: r, min: n, max: s, onBlur: c, onChange: l, onInput: i, after: o } = t, p = (v) => {
|
|
1392
1401
|
const d = n != null ? u.get(n) : void 0, x = s != null ? u.get(s) : void 0;
|
|
1393
1402
|
return d != null && v < d ? d : x != null && v > x ? x : v;
|
|
1394
|
-
}, m = r != null ?
|
|
1403
|
+
}, m = r != null ? W(X, (v) => {
|
|
1395
1404
|
const d = L(
|
|
1396
1405
|
e,
|
|
1397
1406
|
n
|
|
@@ -1426,8 +1435,8 @@ const xn = (t) => {
|
|
|
1426
1435
|
)((g, b) => !g || b)
|
|
1427
1436
|
),
|
|
1428
1437
|
C.click((g) => y(g)),
|
|
1429
|
-
|
|
1430
|
-
|
|
1438
|
+
z.label(v.$.incrementValue),
|
|
1439
|
+
R({ icon: "line-md:plus", size: "xs" })
|
|
1431
1440
|
),
|
|
1432
1441
|
// Decrement first (matches tests expecting first button to be decrement)
|
|
1433
1442
|
I.button(
|
|
@@ -1442,35 +1451,35 @@ const xn = (t) => {
|
|
|
1442
1451
|
)((g, b) => !g || b)
|
|
1443
1452
|
),
|
|
1444
1453
|
C.click((g) => h(g)),
|
|
1445
|
-
|
|
1446
|
-
|
|
1454
|
+
z.label(v.$.decrementValue),
|
|
1455
|
+
R({ icon: "line-md:minus", size: "xs" })
|
|
1447
1456
|
)
|
|
1448
1457
|
);
|
|
1449
|
-
}) : null, f = o != null && m != null ?
|
|
1450
|
-
return
|
|
1458
|
+
}) : null, f = o != null && m != null ? B(m, o) : o ?? m;
|
|
1459
|
+
return P({
|
|
1451
1460
|
...t,
|
|
1452
1461
|
input: K.number(
|
|
1453
|
-
n != null ?
|
|
1462
|
+
n != null ? B(
|
|
1454
1463
|
a.min(n),
|
|
1455
|
-
|
|
1464
|
+
N(
|
|
1456
1465
|
u.on(n, (v) => {
|
|
1457
1466
|
v < u.get(e);
|
|
1458
1467
|
})
|
|
1459
1468
|
)
|
|
1460
1469
|
) : T,
|
|
1461
|
-
s != null ?
|
|
1470
|
+
s != null ? B(
|
|
1462
1471
|
a.max(s),
|
|
1463
|
-
|
|
1472
|
+
N(
|
|
1464
1473
|
u.on(s, (v) => {
|
|
1465
1474
|
v > u.get(e);
|
|
1466
1475
|
})
|
|
1467
1476
|
)
|
|
1468
1477
|
) : T,
|
|
1469
|
-
|
|
1478
|
+
H(t),
|
|
1470
1479
|
a.valueAsNumber(e),
|
|
1471
1480
|
a.step(r),
|
|
1472
1481
|
a.class("bc-input bc-number-input"),
|
|
1473
|
-
c != null ? C.blur(
|
|
1482
|
+
c != null ? C.blur(j(c)) : T,
|
|
1474
1483
|
l != null ? C.change(G(l)) : T,
|
|
1475
1484
|
i != null ? C.input(G(i)) : T,
|
|
1476
1485
|
// Add wheel event support when step is defined
|
|
@@ -1529,8 +1538,8 @@ const xn = (t) => {
|
|
|
1529
1538
|
)((k, _) => !k || _)
|
|
1530
1539
|
),
|
|
1531
1540
|
C.click((k) => y(k)),
|
|
1532
|
-
|
|
1533
|
-
|
|
1541
|
+
z.label(b),
|
|
1542
|
+
R({ icon: "line-md:plus", size: "xs" })
|
|
1534
1543
|
),
|
|
1535
1544
|
I.button(
|
|
1536
1545
|
a.type("button"),
|
|
@@ -1544,46 +1553,46 @@ const xn = (t) => {
|
|
|
1544
1553
|
)((k, _) => !k || _)
|
|
1545
1554
|
),
|
|
1546
1555
|
C.click((k) => h(k)),
|
|
1547
|
-
|
|
1548
|
-
|
|
1556
|
+
z.label(D),
|
|
1557
|
+
R({ icon: "line-md:minus", size: "xs" })
|
|
1549
1558
|
)
|
|
1550
1559
|
))(
|
|
1551
1560
|
yt.incrementValue,
|
|
1552
1561
|
yt.decrementValue
|
|
1553
1562
|
);
|
|
1554
|
-
})(), f = Y(e, t.disabled, l), v = o != null && m != null ?
|
|
1555
|
-
return
|
|
1563
|
+
})(), f = Y(e, t.disabled, l), v = o != null && m != null ? B(m, f, o) : o != null ? B(f, o) : m != null ? B(m, f) : f;
|
|
1564
|
+
return P({
|
|
1556
1565
|
...t,
|
|
1557
1566
|
input: K.number(
|
|
1558
1567
|
// min/max attributes and reactive watchers (no forced correction)
|
|
1559
|
-
n != null ?
|
|
1568
|
+
n != null ? B(
|
|
1560
1569
|
a.min(n),
|
|
1561
|
-
|
|
1570
|
+
N(
|
|
1562
1571
|
u.on(n, (d) => {
|
|
1563
1572
|
})
|
|
1564
1573
|
)
|
|
1565
1574
|
) : T,
|
|
1566
|
-
s != null ?
|
|
1575
|
+
s != null ? B(
|
|
1567
1576
|
a.max(s),
|
|
1568
|
-
|
|
1577
|
+
N(
|
|
1569
1578
|
u.on(s, (d) => {
|
|
1570
1579
|
})
|
|
1571
1580
|
)
|
|
1572
1581
|
) : T,
|
|
1573
|
-
|
|
1582
|
+
H(t),
|
|
1574
1583
|
// Represent null as empty string so the field can be cleared
|
|
1575
1584
|
a.value(u.map(e, (d) => d == null ? "" : String(d))),
|
|
1576
1585
|
a.step(r),
|
|
1577
1586
|
a.class("bc-input bc-number-input"),
|
|
1578
|
-
c != null ? C.blur(
|
|
1587
|
+
c != null ? C.blur(j(c)) : T,
|
|
1579
1588
|
l != null ? C.change(
|
|
1580
|
-
|
|
1589
|
+
j((d) => {
|
|
1581
1590
|
const x = Rt(d);
|
|
1582
1591
|
l(x);
|
|
1583
1592
|
})
|
|
1584
1593
|
) : T,
|
|
1585
1594
|
i != null ? C.input(
|
|
1586
|
-
|
|
1595
|
+
j((d) => {
|
|
1587
1596
|
const x = Rt(d);
|
|
1588
1597
|
i(x);
|
|
1589
1598
|
})
|
|
@@ -1649,8 +1658,8 @@ const xn = (t) => {
|
|
|
1649
1658
|
a.tabindex(
|
|
1650
1659
|
u.map(l, (h) => h ? -1 : 0)
|
|
1651
1660
|
),
|
|
1652
|
-
|
|
1653
|
-
|
|
1661
|
+
z.checked(t),
|
|
1662
|
+
z.disabled(l),
|
|
1654
1663
|
C.click(d),
|
|
1655
1664
|
C.keydown(x),
|
|
1656
1665
|
n != null ? C.blur(n) : null,
|
|
@@ -1663,7 +1672,7 @@ const xn = (t) => {
|
|
|
1663
1672
|
)
|
|
1664
1673
|
),
|
|
1665
1674
|
s != null ? I.div(
|
|
1666
|
-
|
|
1675
|
+
z.hidden(!0),
|
|
1667
1676
|
a.class("bc-switch__track-label bc-switch__track-label--off"),
|
|
1668
1677
|
a.class(
|
|
1669
1678
|
u.map(
|
|
@@ -1684,7 +1693,7 @@ const xn = (t) => {
|
|
|
1684
1693
|
c
|
|
1685
1694
|
) : null,
|
|
1686
1695
|
jt(
|
|
1687
|
-
(h) =>
|
|
1696
|
+
(h) => W(
|
|
1688
1697
|
ce,
|
|
1689
1698
|
({ direction: y }) => I.div(
|
|
1690
1699
|
a.class("bc-switch__thumb"),
|
|
@@ -1780,7 +1789,7 @@ const xn = (t) => {
|
|
|
1780
1789
|
onChange: n != null ? (p) => n(Z(p)) : void 0,
|
|
1781
1790
|
onInput: s != null ? (p) => s(Z(p)) : void 0,
|
|
1782
1791
|
onBlur: r,
|
|
1783
|
-
after: c != null ?
|
|
1792
|
+
after: c != null ? B(o, c) : o
|
|
1784
1793
|
});
|
|
1785
1794
|
}, Xe = "line-md:star-alt-filled", qe = "line-md:star-alt", Ge = (t) => {
|
|
1786
1795
|
const {
|
|
@@ -1828,7 +1837,7 @@ const xn = (t) => {
|
|
|
1828
1837
|
}, y = u.map(p, (b) => `bc-icon--${b}`), g = ({ index: b, counter: D }) => I.span(
|
|
1829
1838
|
a.class("bc-rating-input__icon-container"),
|
|
1830
1839
|
a.class(y),
|
|
1831
|
-
|
|
1840
|
+
R(
|
|
1832
1841
|
{ icon: o, size: p, color: l, tone: "soft" },
|
|
1833
1842
|
a.class("bc-rating-input__icon-empty")
|
|
1834
1843
|
),
|
|
@@ -1841,7 +1850,7 @@ const xn = (t) => {
|
|
|
1841
1850
|
return _ > b ? "100%" : _ < b ? "0%" : `${(k - b) * 100}%`;
|
|
1842
1851
|
})
|
|
1843
1852
|
),
|
|
1844
|
-
|
|
1853
|
+
R(
|
|
1845
1854
|
{ icon: i, size: p, color: c, tone: "soft" },
|
|
1846
1855
|
a.class("bc-rating-input__icon-full")
|
|
1847
1856
|
)
|
|
@@ -1853,23 +1862,23 @@ const xn = (t) => {
|
|
|
1853
1862
|
})
|
|
1854
1863
|
)
|
|
1855
1864
|
);
|
|
1856
|
-
return
|
|
1865
|
+
return P({
|
|
1857
1866
|
baseContainer: !0,
|
|
1858
1867
|
growInput: !1,
|
|
1859
1868
|
focusableSelector: '[role="slider"]',
|
|
1860
1869
|
...t,
|
|
1861
1870
|
input: I.div(
|
|
1862
1871
|
// Common input attributes (id, required, invalid, custom classes, etc.)
|
|
1863
|
-
|
|
1872
|
+
H(t),
|
|
1864
1873
|
a.class("bc-rating-input"),
|
|
1865
1874
|
// ARIA slider semantics
|
|
1866
1875
|
a.role("slider"),
|
|
1867
1876
|
a.tabindex(u.map(n ?? !1, (b) => b ? -1 : 0)),
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1877
|
+
z.disabled(n ?? !1),
|
|
1878
|
+
z.valuemin(0),
|
|
1879
|
+
z.valuemax(u.map(s, (b) => b ?? 0)),
|
|
1880
|
+
z.valuenow(u.map(e, (b) => b ?? 0)),
|
|
1881
|
+
z.valuetext(
|
|
1873
1882
|
L(
|
|
1874
1883
|
e,
|
|
1875
1884
|
s
|
|
@@ -1893,17 +1902,17 @@ const xn = (t) => {
|
|
|
1893
1902
|
// Pass through numeric changes; clear button will call onChange(null)
|
|
1894
1903
|
onChange: r,
|
|
1895
1904
|
onBlur: n,
|
|
1896
|
-
after: s != null ?
|
|
1905
|
+
after: s != null ? B(i, s) : i
|
|
1897
1906
|
});
|
|
1898
1907
|
}, Tn = (t) => {
|
|
1899
1908
|
const { value: e, step: r, min: n, max: s, onBlur: c, onChange: l, onInput: i } = t;
|
|
1900
|
-
return
|
|
1909
|
+
return P({
|
|
1901
1910
|
...t,
|
|
1902
1911
|
// Make sure clicks anywhere focus the range input
|
|
1903
1912
|
focusableSelector: 'input[type="range"]',
|
|
1904
1913
|
input: I.input(
|
|
1905
1914
|
a.type("range"),
|
|
1906
|
-
|
|
1915
|
+
H(t),
|
|
1907
1916
|
a.min(n),
|
|
1908
1917
|
a.max(s),
|
|
1909
1918
|
a.step(r),
|
|
@@ -1923,14 +1932,14 @@ const xn = (t) => {
|
|
|
1923
1932
|
}), p = Y(e, t.disabled, (m) => {
|
|
1924
1933
|
l?.(m);
|
|
1925
1934
|
});
|
|
1926
|
-
return
|
|
1935
|
+
return P(
|
|
1927
1936
|
{
|
|
1928
1937
|
...t,
|
|
1929
1938
|
focusableSelector: 'input[type="range"]',
|
|
1930
1939
|
after: p,
|
|
1931
1940
|
input: I.input(
|
|
1932
1941
|
a.type("range"),
|
|
1933
|
-
|
|
1942
|
+
H(t),
|
|
1934
1943
|
a.min(n),
|
|
1935
1944
|
a.max(s),
|
|
1936
1945
|
a.step(r),
|
|
@@ -1950,7 +1959,7 @@ const xn = (t) => {
|
|
|
1950
1959
|
)
|
|
1951
1960
|
},
|
|
1952
1961
|
// Ensure container grows input naturally
|
|
1953
|
-
|
|
1962
|
+
B()
|
|
1954
1963
|
);
|
|
1955
1964
|
};
|
|
1956
1965
|
let wt = null;
|
|
@@ -1999,7 +2008,7 @@ const Ot = (t, e) => {
|
|
|
1999
2008
|
}, Fn = (t) => {
|
|
2000
2009
|
const { value: e, onChange: r, after: n, disabled: s, onBlur: c } = t, l = () => {
|
|
2001
2010
|
const p = Y(e, s, r);
|
|
2002
|
-
return n != null ?
|
|
2011
|
+
return n != null ? B(p, n) : p;
|
|
2003
2012
|
}, i = t.placeholder != null ? T : a.placeholder("P0DT0H0M0S");
|
|
2004
2013
|
return Qe(
|
|
2005
2014
|
(p) => Xt({
|
|
@@ -2011,10 +2020,10 @@ const Ot = (t, e) => {
|
|
|
2011
2020
|
placeholder: "P0DT0H0M0S",
|
|
2012
2021
|
after: l()
|
|
2013
2022
|
}),
|
|
2014
|
-
{ pending: () =>
|
|
2023
|
+
{ pending: () => P({
|
|
2015
2024
|
...t,
|
|
2016
2025
|
input: K.text(
|
|
2017
|
-
|
|
2026
|
+
H(t),
|
|
2018
2027
|
a.value(u.map(e, (p) => p?.toString() ?? "")),
|
|
2019
2028
|
a.class("bc-input"),
|
|
2020
2029
|
i,
|
|
@@ -2042,15 +2051,15 @@ const Ot = (t, e) => {
|
|
|
2042
2051
|
);
|
|
2043
2052
|
}, en = (t) => {
|
|
2044
2053
|
const { value: e, onBlur: r, onChange: n, onInput: s } = t;
|
|
2045
|
-
return
|
|
2054
|
+
return P({
|
|
2046
2055
|
...t,
|
|
2047
2056
|
input: K.url(
|
|
2048
|
-
|
|
2057
|
+
H(t),
|
|
2049
2058
|
a.value(e),
|
|
2050
2059
|
a.class("bc-input"),
|
|
2051
|
-
r != null ? C.blur(
|
|
2052
|
-
n != null ? C.change(
|
|
2053
|
-
s != null ? C.input(
|
|
2060
|
+
r != null ? C.blur(j(r)) : T,
|
|
2061
|
+
n != null ? C.change(j(n)) : T,
|
|
2062
|
+
s != null ? C.input(j(s)) : T
|
|
2054
2063
|
)
|
|
2055
2064
|
});
|
|
2056
2065
|
}, Bn = (t) => {
|
|
@@ -2061,7 +2070,7 @@ const Ot = (t, e) => {
|
|
|
2061
2070
|
onChange: n != null ? (p) => n(Z(p)) : void 0,
|
|
2062
2071
|
onInput: s != null ? (p) => s(Z(p)) : void 0,
|
|
2063
2072
|
onBlur: r,
|
|
2064
|
-
after: c != null ?
|
|
2073
|
+
after: c != null ? B(o, c) : o
|
|
2065
2074
|
});
|
|
2066
2075
|
}, nn = (t) => {
|
|
2067
2076
|
const {
|
|
@@ -2094,9 +2103,9 @@ const Ot = (t, e) => {
|
|
|
2094
2103
|
onClick: () => h.move("up"),
|
|
2095
2104
|
disabled: h.cannotMove("up")
|
|
2096
2105
|
},
|
|
2097
|
-
|
|
2106
|
+
W(
|
|
2098
2107
|
X,
|
|
2099
|
-
(b) =>
|
|
2108
|
+
(b) => R({
|
|
2100
2109
|
size: "xs",
|
|
2101
2110
|
icon: "line-md:arrow-up",
|
|
2102
2111
|
title: b.$.incrementValue
|
|
@@ -2111,9 +2120,9 @@ const Ot = (t, e) => {
|
|
|
2111
2120
|
onClick: () => h.move("down"),
|
|
2112
2121
|
disabled: h.cannotMove("down")
|
|
2113
2122
|
},
|
|
2114
|
-
|
|
2123
|
+
W(
|
|
2115
2124
|
X,
|
|
2116
|
-
(b) =>
|
|
2125
|
+
(b) => R({
|
|
2117
2126
|
size: "xs",
|
|
2118
2127
|
icon: "line-md:arrow-down",
|
|
2119
2128
|
title: b.$.decrementValue
|
|
@@ -2123,7 +2132,7 @@ const Ot = (t, e) => {
|
|
|
2123
2132
|
)
|
|
2124
2133
|
), g = E(
|
|
2125
2134
|
c,
|
|
2126
|
-
() =>
|
|
2135
|
+
() => W(
|
|
2127
2136
|
X,
|
|
2128
2137
|
(b) => $t({
|
|
2129
2138
|
size: "xs",
|
|
@@ -2181,18 +2190,18 @@ const Ot = (t, e) => {
|
|
|
2181
2190
|
(h, y) => h || y
|
|
2182
2191
|
)
|
|
2183
2192
|
},
|
|
2184
|
-
|
|
2193
|
+
W(
|
|
2185
2194
|
X,
|
|
2186
2195
|
(h) => pt(
|
|
2187
2196
|
a.class("bc-group--gap-2"),
|
|
2188
|
-
|
|
2197
|
+
R({ icon: "line-md:plus" }),
|
|
2189
2198
|
o ?? h.$.addLabel
|
|
2190
2199
|
)
|
|
2191
2200
|
)
|
|
2192
2201
|
)
|
|
2193
2202
|
)
|
|
2194
2203
|
);
|
|
2195
|
-
return
|
|
2204
|
+
return B(
|
|
2196
2205
|
Oe(
|
|
2197
2206
|
e,
|
|
2198
2207
|
(h) => d(h)(r(h)),
|