@tempots/beatui 0.76.0 → 0.78.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/{ar-CefikVG3.cjs → ar-DNoFBb9J.cjs} +1 -1
- package/dist/{ar-BbgpGwJp.js → ar-D__6gR_P.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +5 -5
- package/dist/beatui.css +11 -2
- package/dist/beatui.tailwind.css +11 -2
- package/dist/{colors-B9fcMxa_.cjs → colors-B2yrgHSW.cjs} +1 -1
- package/dist/{colors-pQZlNrwM.js → colors-DPo9GEJR.js} +6 -6
- package/dist/{de-ZRnkggf5.cjs → de-AwUkK0rS.cjs} +1 -1
- package/dist/{de-R7lPfyZ4.js → de-DmKpCTuQ.js} +1 -1
- package/dist/deep-merge-BoJqJNah.cjs +1 -0
- package/dist/{deep-merge-CQQCMLwG.js → deep-merge-Cjm-tFVT.js} +224 -226
- package/dist/{duration-input-D-SIoDoo.cjs → duration-input-COTlyMwv.cjs} +1 -1
- package/dist/{duration-input-DKxZ6OCa.js → duration-input-DfdE7_V9.js} +3 -3
- package/dist/{es-DV0Jr_BZ.js → es-BDZ5UJLS.js} +1 -1
- package/dist/{es-IkNtVSp2.cjs → es-D-d2AIlX.cjs} +1 -1
- package/dist/{fa-DXvHejs9.js → fa-CuPgy1cj.js} +1 -1
- package/dist/{fa-B-byOhgU.cjs → fa-D7rRdG8c.cjs} +1 -1
- package/dist/{fr-F0ZegdR2.cjs → fr-0er_BWMt.cjs} +1 -1
- package/dist/{fr-D8FOMX0o.js → fr-DmyMO3lB.js} +1 -1
- package/dist/{he-B19Qsx-u.js → he-C3RHfs6R.js} +1 -1
- package/dist/{he-BcEFNuYz.cjs → he-R2veUyP3.cjs} +1 -1
- package/dist/{hi-CarXvOJD.cjs → hi-C9UP7NGG.cjs} +1 -1
- package/dist/{hi-DozFnE3b.js → hi-YnvrXBht.js} +1 -1
- package/dist/{index-DdpYvBeh.js → index-BSl-AmDV.js} +3 -3
- package/dist/{index-B7lXSIXm.cjs → index-ByWYsYVI.cjs} +2 -2
- package/dist/{index-CYb1YxDX.js → index-Ck1DAzZ9.js} +1 -1
- package/dist/{index-gSTSk9KZ.cjs → index-D5kPtj3r.cjs} +1 -1
- package/dist/{index-CyyNsVT9.cjs → index-DE2tjivA.cjs} +1 -1
- package/dist/{index-CpZh_Snx.js → index-DklKfzD4.js} +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +244 -243
- package/dist/{it-But8uzNi.js → it-CWLwlDXe.js} +1 -1
- package/dist/{it-ops3Czzi.cjs → it-Cxt1_D4h.cjs} +1 -1
- package/dist/{ja-2dzONSkh.cjs → ja-CpDovHPb.cjs} +1 -1
- package/dist/{ja-DkwTnFdU.js → ja-DthjgDtM.js} +1 -1
- package/dist/json-schema/index.cjs.js +2 -2
- package/dist/json-schema/index.es.js +7 -7
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +5 -5
- package/dist/{ko-uVJEhtyQ.cjs → ko-M_MCTNuN.cjs} +1 -1
- package/dist/{ko-Cqv-IjhX.js → ko-joDK7ONT.js} +1 -1
- package/dist/{modal-MofsfmAe.js → modal-CkcwBTk2.js} +28 -28
- package/dist/{modal-5P9mU_a4.cjs → modal-CwDATZfz.cjs} +1 -1
- package/dist/monaco/index.cjs.js +2 -2
- package/dist/monaco/index.es.js +11 -11
- package/dist/{nl-DXnbYulJ.cjs → nl-DGhIOGxN.cjs} +1 -1
- package/dist/{nl-YSiU3rFI.js → nl-DmoWeXUt.js} +1 -1
- package/dist/{notice-DP209Ed8.cjs → notice-Bs90dF7k.cjs} +1 -1
- package/dist/{notice-Cqq8g17n.js → notice-CQ1Vx-z1.js} +2 -2
- package/dist/{pl-DXmHc2Nh.js → pl-8hl5VXnm.js} +1 -1
- package/dist/{pl-RbiIBA3C.cjs → pl-DocnXix_.cjs} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-Bf3z_-26.js → pt-BfYK9Rl3.js} +1 -1
- package/dist/{pt-BAecyAv-.cjs → pt-DO2Zcuqv.cjs} +1 -1
- package/dist/{ru-DZ4gJ6yr.cjs → ru-D9KCOBqN.cjs} +1 -1
- package/dist/{ru-Sy00qUeG.js → ru-eA_dNkJz.js} +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 +2 -2
- package/dist/tailwind/vite-plugin.cjs.js +1 -1
- package/dist/tailwind/vite-plugin.es.js +1 -1
- package/dist/timer-BJHOsuS6.cjs +1 -0
- package/dist/timer-Rd2sKnvH.js +65 -0
- package/dist/{toolbar-C_Ec0_XC.js → toolbar-CdY5huSG.js} +1 -1
- package/dist/{toolbar-wEm8iNet.cjs → toolbar-DoRPrs-s.cjs} +1 -1
- package/dist/{tr-7jGF_acJ.cjs → tr-BBmQvRSa.cjs} +1 -1
- package/dist/{tr-BDxG3qd6.js → tr-CdqbnopM.js} +1 -1
- package/dist/{translations-DQxouiBG.js → translations-BEMKy6-W.js} +19 -19
- package/dist/{translations-BmsRhth7.js → translations-CVfr2JXG.js} +1 -1
- package/dist/{translations-C7HVMcOQ.cjs → translations-D_Vu2mbd.cjs} +1 -1
- package/dist/{translations-hMQlZmD4.cjs → translations-eUtMHN9s.cjs} +1 -1
- package/dist/types/components/form/controller/controller-validation.d.ts +41 -0
- package/dist/types/components/json-schema/widgets/widget-customization.d.ts +7 -7
- package/dist/{ur-55zdT2TQ.js → ur-D9sr_I1M.js} +1 -1
- package/dist/{ur-ZT6fZFId.cjs → ur-u5qjZsKM.cjs} +1 -1
- package/dist/use-form-C5eF9ALX.cjs +2 -0
- package/dist/use-form-D3EXhCfe.js +1731 -0
- package/dist/{vi-C7K7W0hM.js → vi-0f97dtZb.js} +1 -1
- package/dist/{vi-tNs62pgs.cjs → vi-_w5RE8el.cjs} +1 -1
- package/dist/{widget-customization-CobH7Rj_.js → widget-customization-BB1gYtwq.js} +4 -4
- package/dist/{widget-customization-GaZB6sLP.cjs → widget-customization-Czt9chmX.cjs} +1 -1
- package/dist/{zh-CBnP8_Lf.cjs → zh-6cQcHbf6.cjs} +1 -1
- package/dist/{zh-DvJBV9D8.js → zh-C7HcUKhE.js} +1 -1
- package/package.json +7 -4
- package/dist/deep-merge-DZxfgKqX.cjs +0 -1
- package/dist/timer-DK_yKNwE.cjs +0 -1
- package/dist/timer-DzWb416P.js +0 -51
- package/dist/use-form-B7A865EM.js +0 -1298
- package/dist/use-form-DVJXMMoN.cjs +0 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Use as F, Value as p, prop as ae, html as v, attr as l, on as $, WithElement as te, Empty as T, aria as G, bind as oe, computedOf as
|
|
2
|
-
import {
|
|
3
|
-
import { g as We } from "./timer-
|
|
1
|
+
import { Use as F, Value as p, prop as ae, html as v, attr as l, on as $, WithElement as te, Empty as T, aria as G, bind as oe, computedOf as B, style as we, OnDispose as ne, When as U, NotEmpty as Oe, Fragment as E, ForEach as K, coalesce as Fe, Ensure as Ne, OneOfType as Re, Repeat as je, signal as _e, input as le, emitValue as j, emitValueAsNumber as ke, Task as Ce } from "@tempots/dom";
|
|
2
|
+
import { l as Pe } from "./colors-DPo9GEJR.js";
|
|
3
|
+
import { g as We } from "./timer-Rd2sKnvH.js";
|
|
4
4
|
import { ElementRect as Ze } from "@tempots/ui";
|
|
5
|
-
import { a as N, b as W, f as $e, c as O, C as Y, I as He, g as ge, h as Ye, B as pe } from "./translations-
|
|
6
|
-
import { C as ce, m as qe,
|
|
5
|
+
import { a as N, b as W, f as $e, c as O, C as Y, I as He, g as ge, h as Ye, B as pe } from "./translations-BEMKy6-W.js";
|
|
6
|
+
import { C as ce, m as qe, c as Ge, I as Ae, S as ee, d as fe, O as Q, e as De } from "./use-form-D3EXhCfe.js";
|
|
7
7
|
class Je extends Error {
|
|
8
8
|
constructor(e = "Missing implementation") {
|
|
9
9
|
super(e), this.name = "MissingImplementationError";
|
|
@@ -24,16 +24,16 @@ function de({
|
|
|
24
24
|
accept: n = "*/*",
|
|
25
25
|
enableClick: s = !0,
|
|
26
26
|
content: r,
|
|
27
|
-
disabled:
|
|
27
|
+
disabled: g = !1,
|
|
28
28
|
allowMultiple: i
|
|
29
29
|
}) {
|
|
30
|
-
return F(N, (
|
|
31
|
-
const f = p.deriveProp(e ?? []),
|
|
32
|
-
c.preventDefault(), c.stopPropagation(),
|
|
30
|
+
return F(N, (m) => {
|
|
31
|
+
const f = p.deriveProp(e ?? []), b = ae(!1), a = (c) => {
|
|
32
|
+
c.preventDefault(), c.stopPropagation(), b.value = !0;
|
|
33
33
|
}, h = (c) => {
|
|
34
|
-
c.preventDefault(), c.stopPropagation(), (!c.currentTarget || !c.currentTarget.contains(c.relatedTarget)) && (
|
|
34
|
+
c.preventDefault(), c.stopPropagation(), (!c.currentTarget || !c.currentTarget.contains(c.relatedTarget)) && (b.value = !1);
|
|
35
35
|
}, _ = (c) => {
|
|
36
|
-
c.preventDefault(), c.stopPropagation(),
|
|
36
|
+
c.preventDefault(), c.stopPropagation(), b.value = !1;
|
|
37
37
|
const d = Array.from(c.dataTransfer?.files || []);
|
|
38
38
|
d.length > 0 && (f.value = d, t(d, "dragdrop"));
|
|
39
39
|
}, u = (c) => {
|
|
@@ -46,7 +46,7 @@ function de({
|
|
|
46
46
|
if (x == null) return;
|
|
47
47
|
const c = Array.from(x.files ?? []);
|
|
48
48
|
c.length > 0 && (f.value = c, t(c, "click")), x.value = "";
|
|
49
|
-
},
|
|
49
|
+
}, D = (c) => {
|
|
50
50
|
p.get(s) && (c.key === "Enter" || c.key === " ") && (c.preventDefault(), u(c));
|
|
51
51
|
};
|
|
52
52
|
return v.div(
|
|
@@ -59,11 +59,11 @@ function de({
|
|
|
59
59
|
$.dragleave(h),
|
|
60
60
|
$.drop(_),
|
|
61
61
|
$.click(u),
|
|
62
|
-
$.keydown(
|
|
62
|
+
$.keydown(D),
|
|
63
63
|
// Hidden file input
|
|
64
64
|
v.input(
|
|
65
65
|
l.type("file"),
|
|
66
|
-
l.disabled(
|
|
66
|
+
l.disabled(g),
|
|
67
67
|
l.accept(n),
|
|
68
68
|
l.multiple(i),
|
|
69
69
|
l.style(
|
|
@@ -71,15 +71,15 @@ function de({
|
|
|
71
71
|
),
|
|
72
72
|
$.change(y),
|
|
73
73
|
te((c) => (x = c, f.on((d) => {
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
const z = new
|
|
77
|
-
d.forEach((
|
|
74
|
+
const I = globalThis.DataTransfer;
|
|
75
|
+
if (I != null) {
|
|
76
|
+
const z = new I();
|
|
77
|
+
d.forEach((V) => z.items.add(V)), c.files = z.files;
|
|
78
78
|
}
|
|
79
79
|
}), T))
|
|
80
80
|
),
|
|
81
81
|
// Screen reader instructions
|
|
82
|
-
G.label(oe(
|
|
82
|
+
G.label(oe(m.$.dropZoneInstructions)(s)),
|
|
83
83
|
// Content
|
|
84
84
|
r({ files: f, clear: () => f.value = [], change: f.set })
|
|
85
85
|
);
|
|
@@ -98,25 +98,25 @@ function $t({
|
|
|
98
98
|
onChange: n,
|
|
99
99
|
size: s = "md",
|
|
100
100
|
disabled: r = !1
|
|
101
|
-
}, ...
|
|
102
|
-
const i = Pe(t).map(([
|
|
103
|
-
key:
|
|
101
|
+
}, ...g) {
|
|
102
|
+
const i = Pe(t).map(([m, f]) => ({
|
|
103
|
+
key: m,
|
|
104
104
|
label: f
|
|
105
105
|
}));
|
|
106
106
|
return te(() => {
|
|
107
|
-
const
|
|
108
|
-
i.map((
|
|
107
|
+
const m = Object.fromEntries(
|
|
108
|
+
i.map((b, a) => [b.key, a])
|
|
109
109
|
), f = ae(
|
|
110
110
|
i.map(() => ({ left: 0, width: 0 })),
|
|
111
111
|
Qe
|
|
112
112
|
);
|
|
113
113
|
return v.div(
|
|
114
114
|
l.class(
|
|
115
|
-
|
|
115
|
+
B(
|
|
116
116
|
s,
|
|
117
117
|
r
|
|
118
118
|
)(
|
|
119
|
-
(
|
|
119
|
+
(b, a) => Ke(b ?? "md", a ?? !1)
|
|
120
120
|
)
|
|
121
121
|
),
|
|
122
122
|
v.div(
|
|
@@ -124,26 +124,26 @@ function $t({
|
|
|
124
124
|
v.div(
|
|
125
125
|
l.class("bc-segmented-input__indicator"),
|
|
126
126
|
we.width(
|
|
127
|
-
|
|
127
|
+
B(
|
|
128
128
|
e,
|
|
129
129
|
f
|
|
130
|
-
)((
|
|
131
|
-
const { width: h } = a[
|
|
130
|
+
)((b, a) => {
|
|
131
|
+
const { width: h } = a[m[b] ?? 0];
|
|
132
132
|
return `${h}px`;
|
|
133
133
|
})
|
|
134
134
|
),
|
|
135
135
|
we.left(
|
|
136
|
-
|
|
136
|
+
B(
|
|
137
137
|
e,
|
|
138
138
|
f
|
|
139
|
-
)((
|
|
140
|
-
const { left: h } = a[
|
|
139
|
+
)((b, a) => {
|
|
140
|
+
const { left: h } = a[m[b] ?? 0];
|
|
141
141
|
return `${h}px`;
|
|
142
142
|
})
|
|
143
143
|
)
|
|
144
144
|
),
|
|
145
145
|
// clickable buttons
|
|
146
|
-
i.map(({ label:
|
|
146
|
+
i.map(({ label: b, key: a }, h) => v.button(
|
|
147
147
|
l.type("button"),
|
|
148
148
|
$.click((_) => {
|
|
149
149
|
_.preventDefault(), p.get(r) || n?.(a);
|
|
@@ -156,20 +156,20 @@ function $t({
|
|
|
156
156
|
Ze((_) => {
|
|
157
157
|
function u() {
|
|
158
158
|
f.update((y) => {
|
|
159
|
-
const
|
|
160
|
-
return
|
|
159
|
+
const D = [...y];
|
|
160
|
+
return D[h] = {
|
|
161
161
|
width: _.value.width,
|
|
162
162
|
left: _.value.localLeft
|
|
163
|
-
},
|
|
163
|
+
}, D;
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
const x = We(u);
|
|
167
167
|
return ne(x, _.on(u));
|
|
168
168
|
}),
|
|
169
|
-
|
|
169
|
+
b
|
|
170
170
|
))
|
|
171
171
|
),
|
|
172
|
-
...
|
|
172
|
+
...g
|
|
173
173
|
);
|
|
174
174
|
});
|
|
175
175
|
}
|
|
@@ -205,27 +205,27 @@ function me(t) {
|
|
|
205
205
|
() => O({ icon: t.map(tt) })
|
|
206
206
|
);
|
|
207
207
|
}
|
|
208
|
-
const
|
|
208
|
+
const Dt = (t, ...e) => {
|
|
209
209
|
const {
|
|
210
210
|
value: n = ae([]),
|
|
211
211
|
accept: s = "*/*",
|
|
212
212
|
maxFiles: r,
|
|
213
|
-
maxFileSize:
|
|
213
|
+
maxFileSize: g,
|
|
214
214
|
onChange: i,
|
|
215
|
-
onBlur:
|
|
215
|
+
onBlur: m,
|
|
216
216
|
disabled: f,
|
|
217
|
-
hasError:
|
|
217
|
+
hasError: b,
|
|
218
218
|
mode: a = "default",
|
|
219
219
|
showFileList: h = !0,
|
|
220
220
|
..._
|
|
221
|
-
} = t, u = n, x = p.map(a, (C) => C === "input"), y = p.map(a, (C) => C === "compact"),
|
|
221
|
+
} = t, u = n, x = p.map(a, (C) => C === "input"), y = p.map(a, (C) => C === "compact"), D = (C) => {
|
|
222
222
|
let o = C;
|
|
223
223
|
if (r != null) {
|
|
224
224
|
const w = p.get(r);
|
|
225
225
|
o = o.slice(0, w);
|
|
226
226
|
}
|
|
227
|
-
if (
|
|
228
|
-
const w = p.get(
|
|
227
|
+
if (g) {
|
|
228
|
+
const w = p.get(g);
|
|
229
229
|
o = o.filter((S) => S.size <= w);
|
|
230
230
|
}
|
|
231
231
|
i?.(o);
|
|
@@ -234,7 +234,7 @@ const It = (t, ...e) => {
|
|
|
234
234
|
i?.(w);
|
|
235
235
|
}, d = () => {
|
|
236
236
|
i?.([]);
|
|
237
|
-
},
|
|
237
|
+
}, I = ({
|
|
238
238
|
files: C,
|
|
239
239
|
clear: o,
|
|
240
240
|
change: w
|
|
@@ -251,7 +251,7 @@ const It = (t, ...e) => {
|
|
|
251
251
|
l.class("bc-file-input__drop-zone-text"),
|
|
252
252
|
oe(S.$.filesInputInstructions)(
|
|
253
253
|
r,
|
|
254
|
-
|
|
254
|
+
g,
|
|
255
255
|
S.$.fileSizeUnits.value
|
|
256
256
|
)
|
|
257
257
|
)
|
|
@@ -284,12 +284,12 @@ const It = (t, ...e) => {
|
|
|
284
284
|
),
|
|
285
285
|
v.div(
|
|
286
286
|
l.class("bc-file-input__compact-file-meta"),
|
|
287
|
-
|
|
287
|
+
B(
|
|
288
288
|
w.$.size,
|
|
289
289
|
o.$.fileSizeUnits
|
|
290
290
|
)((k, A) => $e(k, { units: A })),
|
|
291
291
|
" • ",
|
|
292
|
-
|
|
292
|
+
B(
|
|
293
293
|
w.$.type,
|
|
294
294
|
o.$.unknownType
|
|
295
295
|
)((k, A) => k || A)
|
|
@@ -314,14 +314,14 @@ const It = (t, ...e) => {
|
|
|
314
314
|
l.class("bc-file-input__compact-placeholder-text"),
|
|
315
315
|
oe(o.$.filesInputInstructions)(
|
|
316
316
|
r,
|
|
317
|
-
|
|
317
|
+
g,
|
|
318
318
|
o.$.fileSizeUnits.value
|
|
319
319
|
)
|
|
320
320
|
)
|
|
321
321
|
)
|
|
322
322
|
)
|
|
323
323
|
)
|
|
324
|
-
),
|
|
324
|
+
), V = ({
|
|
325
325
|
files: C
|
|
326
326
|
}) => F(
|
|
327
327
|
N,
|
|
@@ -349,7 +349,7 @@ const It = (t, ...e) => {
|
|
|
349
349
|
" ",
|
|
350
350
|
oe(o.$.filesInputInstructions)(
|
|
351
351
|
r,
|
|
352
|
-
|
|
352
|
+
g,
|
|
353
353
|
o.$.fileSizeUnits.value
|
|
354
354
|
)
|
|
355
355
|
)
|
|
@@ -362,7 +362,7 @@ const It = (t, ...e) => {
|
|
|
362
362
|
{
|
|
363
363
|
baseContainer: p.map(x, (o) => !o),
|
|
364
364
|
disabled: f,
|
|
365
|
-
hasError:
|
|
365
|
+
hasError: b,
|
|
366
366
|
after: U(
|
|
367
367
|
x,
|
|
368
368
|
() => U(
|
|
@@ -389,8 +389,8 @@ const It = (t, ...e) => {
|
|
|
389
389
|
enableClick: !0,
|
|
390
390
|
allowMultiple: p.map(r ?? 1 / 0, (o) => o > 1),
|
|
391
391
|
disabled: f,
|
|
392
|
-
onChange:
|
|
393
|
-
content:
|
|
392
|
+
onChange: D,
|
|
393
|
+
content: V
|
|
394
394
|
})
|
|
395
395
|
),
|
|
396
396
|
() => U(
|
|
@@ -403,7 +403,7 @@ const It = (t, ...e) => {
|
|
|
403
403
|
enableClick: !0,
|
|
404
404
|
allowMultiple: p.map(r ?? 1 / 0, (o) => o > 1),
|
|
405
405
|
disabled: f,
|
|
406
|
-
onChange:
|
|
406
|
+
onChange: D,
|
|
407
407
|
content: z
|
|
408
408
|
})
|
|
409
409
|
),
|
|
@@ -415,8 +415,8 @@ const It = (t, ...e) => {
|
|
|
415
415
|
enableClick: !0,
|
|
416
416
|
allowMultiple: p.map(r ?? 1 / 0, (o) => o > 1),
|
|
417
417
|
disabled: f,
|
|
418
|
-
onChange:
|
|
419
|
-
content:
|
|
418
|
+
onChange: D,
|
|
419
|
+
content: I
|
|
420
420
|
}),
|
|
421
421
|
U(
|
|
422
422
|
h,
|
|
@@ -442,14 +442,14 @@ const It = (t, ...e) => {
|
|
|
442
442
|
),
|
|
443
443
|
v.div(
|
|
444
444
|
l.class("bc-file-input__file-meta"),
|
|
445
|
-
|
|
445
|
+
B(
|
|
446
446
|
o.$.size,
|
|
447
447
|
C.$.fileSizeUnits
|
|
448
448
|
)(
|
|
449
449
|
(M, k) => $e(M, { units: k })
|
|
450
450
|
),
|
|
451
451
|
" • ",
|
|
452
|
-
|
|
452
|
+
B(
|
|
453
453
|
o.$.type,
|
|
454
454
|
C.$.unknownType
|
|
455
455
|
)((M, k) => M || k)
|
|
@@ -497,7 +497,7 @@ const It = (t, ...e) => {
|
|
|
497
497
|
}, ve = "$$tts-exp-", nt = (t, e) => te((n) => {
|
|
498
498
|
const s = `${ve}${t}`;
|
|
499
499
|
return ne(p.on(e, (r) => Reflect.set(n, s, r)));
|
|
500
|
-
}),
|
|
500
|
+
}), It = (t, e) => {
|
|
501
501
|
const n = `${ve}${t}`;
|
|
502
502
|
return (s) => {
|
|
503
503
|
e(Reflect.get(s.target, n));
|
|
@@ -505,7 +505,7 @@ const It = (t, ...e) => {
|
|
|
505
505
|
}, lt = (t, e) => {
|
|
506
506
|
const n = `${ve}${t}`;
|
|
507
507
|
return (s) => {
|
|
508
|
-
const r = s.target,
|
|
508
|
+
const r = s.target, g = r.selectedIndex, i = r.options[g];
|
|
509
509
|
e(Reflect.get(i, n));
|
|
510
510
|
};
|
|
511
511
|
};
|
|
@@ -516,12 +516,12 @@ const Be = (t, e, n) => Ne(
|
|
|
516
516
|
t,
|
|
517
517
|
(s) => Re(s, {
|
|
518
518
|
value: (r) => {
|
|
519
|
-
const
|
|
519
|
+
const g = B(
|
|
520
520
|
r,
|
|
521
521
|
n
|
|
522
|
-
)((i,
|
|
522
|
+
)((i, m) => e(i.value, m));
|
|
523
523
|
return v.option(
|
|
524
|
-
l.selected(
|
|
524
|
+
l.selected(g),
|
|
525
525
|
nt("value", r.$.value),
|
|
526
526
|
r.$.label
|
|
527
527
|
);
|
|
@@ -530,8 +530,8 @@ const Be = (t, e, n) => Ne(
|
|
|
530
530
|
l.label(r.$.group),
|
|
531
531
|
K(
|
|
532
532
|
r.$.options,
|
|
533
|
-
(
|
|
534
|
-
|
|
533
|
+
(g) => Be(
|
|
534
|
+
g,
|
|
535
535
|
e,
|
|
536
536
|
n
|
|
537
537
|
)
|
|
@@ -545,9 +545,9 @@ const Be = (t, e, n) => Ne(
|
|
|
545
545
|
onBlur: n,
|
|
546
546
|
onChange: s,
|
|
547
547
|
options: r,
|
|
548
|
-
unselectedLabel:
|
|
549
|
-
equality: i = (
|
|
550
|
-
after:
|
|
548
|
+
unselectedLabel: g,
|
|
549
|
+
equality: i = (b, a) => b === a,
|
|
550
|
+
after: m
|
|
551
551
|
} = t;
|
|
552
552
|
let f;
|
|
553
553
|
return W(
|
|
@@ -559,29 +559,29 @@ const Be = (t, e, n) => Ne(
|
|
|
559
559
|
color: "neutral",
|
|
560
560
|
size: "sm"
|
|
561
561
|
}),
|
|
562
|
-
|
|
562
|
+
m
|
|
563
563
|
),
|
|
564
564
|
input: v.select(
|
|
565
|
-
te((
|
|
566
|
-
f =
|
|
565
|
+
te((b) => {
|
|
566
|
+
f = b;
|
|
567
567
|
const a = new MutationObserver((h) => {
|
|
568
568
|
const { removedNodes: _ } = h[0];
|
|
569
569
|
_.length > 0 && (f.selectedIndex = 0);
|
|
570
570
|
});
|
|
571
|
-
return a.observe(
|
|
571
|
+
return a.observe(b, { childList: !0 }), ne(() => a.disconnect());
|
|
572
572
|
}),
|
|
573
573
|
Y(t),
|
|
574
574
|
l.class("bc-native-select bc-input"),
|
|
575
575
|
F(
|
|
576
576
|
N,
|
|
577
|
-
(
|
|
577
|
+
(b) => v.option(
|
|
578
578
|
l.hidden("hidden"),
|
|
579
|
-
Fe(
|
|
579
|
+
Fe(g, b.$.selectOne)
|
|
580
580
|
)
|
|
581
581
|
),
|
|
582
|
-
K(r, (
|
|
582
|
+
K(r, (b) => Be(b, i, e)),
|
|
583
583
|
n != null ? $.blur(n) : T,
|
|
584
|
-
s != null ? $.change(lt("value", (
|
|
584
|
+
s != null ? $.change(lt("value", (b) => s(b))) : T
|
|
585
585
|
)
|
|
586
586
|
},
|
|
587
587
|
$.click(() => {
|
|
@@ -614,18 +614,18 @@ function it(t, e, n) {
|
|
|
614
614
|
je(
|
|
615
615
|
s,
|
|
616
616
|
(r) => {
|
|
617
|
-
const
|
|
617
|
+
const g = t.item(r.index), i = [];
|
|
618
618
|
return E(
|
|
619
619
|
ne(() => {
|
|
620
|
-
i.forEach((
|
|
620
|
+
i.forEach((m) => m());
|
|
621
621
|
}),
|
|
622
622
|
e({
|
|
623
623
|
list: t,
|
|
624
|
-
item:
|
|
624
|
+
item: g,
|
|
625
625
|
position: r,
|
|
626
626
|
remove: () => t.removeAt(r.index),
|
|
627
|
-
move: (
|
|
628
|
-
switch (
|
|
627
|
+
move: (m) => {
|
|
628
|
+
switch (m) {
|
|
629
629
|
case "up":
|
|
630
630
|
if (r.index === 0) return;
|
|
631
631
|
t.move(r.index, r.index - 1);
|
|
@@ -641,24 +641,24 @@ function it(t, e, n) {
|
|
|
641
641
|
t.move(r.index, t.length.value - 1);
|
|
642
642
|
}
|
|
643
643
|
},
|
|
644
|
-
canMove: (
|
|
644
|
+
canMove: (m) => {
|
|
645
645
|
const f = (() => {
|
|
646
|
-
switch (
|
|
646
|
+
switch (m) {
|
|
647
647
|
case "up":
|
|
648
648
|
return _e(r.index > 0);
|
|
649
649
|
case "down":
|
|
650
|
-
return t.length.map((
|
|
650
|
+
return t.length.map((b) => r.index < b - 1);
|
|
651
651
|
}
|
|
652
652
|
})();
|
|
653
653
|
return i.push(() => f.dispose()), f;
|
|
654
654
|
},
|
|
655
|
-
cannotMove: (
|
|
655
|
+
cannotMove: (m) => {
|
|
656
656
|
const f = (() => {
|
|
657
|
-
switch (
|
|
657
|
+
switch (m) {
|
|
658
658
|
case "up":
|
|
659
659
|
return _e(r.index === 0);
|
|
660
660
|
case "down":
|
|
661
|
-
return t.length.map((
|
|
661
|
+
return t.length.map((b) => r.index === b - 1);
|
|
662
662
|
}
|
|
663
663
|
})();
|
|
664
664
|
return i.push(() => f.dispose()), f;
|
|
@@ -670,27 +670,27 @@ function it(t, e, n) {
|
|
|
670
670
|
)
|
|
671
671
|
);
|
|
672
672
|
}
|
|
673
|
-
const
|
|
673
|
+
const Ie = {
|
|
674
674
|
9: { pattern: /^[0-9]$/ },
|
|
675
675
|
A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
|
|
676
676
|
"*": { pattern: /^.$/ }
|
|
677
677
|
}, ot = (t) => t instanceof RegExp;
|
|
678
678
|
function Ve(t, e, n) {
|
|
679
679
|
if (t == null) return [];
|
|
680
|
-
const s = n ? { ...
|
|
681
|
-
const f = s[
|
|
682
|
-
f ? i.push({ type: "pattern", name:
|
|
683
|
-
},
|
|
680
|
+
const s = n ? { ...Ie, ...e } : e ?? Ie, r = (i, m) => {
|
|
681
|
+
const f = s[m];
|
|
682
|
+
f ? i.push({ type: "pattern", name: m, ...f }) : i.push({ type: "literal", char: m });
|
|
683
|
+
}, g = [];
|
|
684
684
|
if (typeof t == "string") {
|
|
685
|
-
for (const i of t) r(
|
|
686
|
-
return
|
|
685
|
+
for (const i of t) r(g, i);
|
|
686
|
+
return g;
|
|
687
687
|
}
|
|
688
688
|
for (const i of t)
|
|
689
689
|
if (typeof i == "string")
|
|
690
|
-
if (i.length <= 1) r(
|
|
691
|
-
else for (const
|
|
692
|
-
else ot(i) ?
|
|
693
|
-
return
|
|
690
|
+
if (i.length <= 1) r(g, i);
|
|
691
|
+
else for (const m of i) r(g, m);
|
|
692
|
+
else ot(i) ? g.push({ type: "pattern", pattern: i }) : typeof i == "object" && i && g.push(i);
|
|
693
|
+
return g;
|
|
694
694
|
}
|
|
695
695
|
function ct(t, e) {
|
|
696
696
|
return (n) => {
|
|
@@ -708,30 +708,30 @@ function ct(t, e) {
|
|
|
708
708
|
}
|
|
709
709
|
};
|
|
710
710
|
}
|
|
711
|
-
function ze(t, e, n, s, r,
|
|
711
|
+
function ze(t, e, n, s, r, g) {
|
|
712
712
|
const i = {
|
|
713
713
|
raw: t,
|
|
714
714
|
previousConformed: e,
|
|
715
715
|
cursor: r ?? t.length,
|
|
716
716
|
completed: !1
|
|
717
|
-
},
|
|
717
|
+
}, m = s.definitions ?? {}, f = typeof n == "function" ? n(t, i) : n, b = Ve(
|
|
718
718
|
f,
|
|
719
|
-
|
|
719
|
+
m,
|
|
720
720
|
s.useDefaultDefinitions ?? !0
|
|
721
721
|
), a = ct(s.allowMode, s.allow), h = /* @__PURE__ */ new Set();
|
|
722
|
-
for (const k of
|
|
722
|
+
for (const k of b) k.type === "literal" && h.add(k.char);
|
|
723
723
|
if (s.prefix) for (const k of s.prefix) h.add(k);
|
|
724
724
|
if (s.suffix) for (const k of s.suffix) h.add(k);
|
|
725
725
|
const _ = Array.from(t).filter((k) => a(k) && !h.has(k));
|
|
726
726
|
if (_.length === 0) return { value: "", cursor: 0, completed: !1 };
|
|
727
727
|
const u = [], x = [];
|
|
728
|
-
let y = 0,
|
|
729
|
-
for (const k of
|
|
728
|
+
let y = 0, D = 0, c = 0, d = -1;
|
|
729
|
+
for (const k of b) {
|
|
730
730
|
if (k.type === "literal") {
|
|
731
731
|
u.push(k.char), x.push({ kind: "literal", filled: !0 });
|
|
732
732
|
continue;
|
|
733
733
|
}
|
|
734
|
-
|
|
734
|
+
D += k.optional ? 0 : 1;
|
|
735
735
|
const A = _[y];
|
|
736
736
|
if (A == null)
|
|
737
737
|
break;
|
|
@@ -749,15 +749,15 @@ function ze(t, e, n, s, r, b) {
|
|
|
749
749
|
continue;
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
|
-
const
|
|
752
|
+
const I = u.join(""), z = (s.prefix ?? "") + I + (s.suffix ?? "");
|
|
753
753
|
let C = (s.prefix ?? "").length;
|
|
754
754
|
if (d >= 0) {
|
|
755
755
|
let k = d + 1;
|
|
756
|
-
if ((
|
|
756
|
+
if ((g?.policy ?? "smart") !== "sticky")
|
|
757
757
|
for (; k < x.length && x[k].kind === "literal"; ) k++;
|
|
758
758
|
C += k;
|
|
759
759
|
}
|
|
760
|
-
const o = s.completion?.mode === "min" ? (s.completion.minChars ?? 0) <= c : s.completion?.mode === "custom" ? !!s.completion.isComplete?.(z) :
|
|
760
|
+
const o = s.completion?.mode === "min" ? (s.completion.minChars ?? 0) <= c : s.completion?.mode === "custom" ? !!s.completion.isComplete?.(z) : D > 0 && c >= D, w = s.pipe?.(z, { ...i, completed: o });
|
|
761
761
|
let S, M = C;
|
|
762
762
|
return w === !1 ? (S = e, M = e.length) : typeof w == "string" ? (S = w, M = w.length) : typeof w == "object" && w ? (S = w.value, M = w.cursor ?? w.value.length) : S = z, { value: S, cursor: M, completed: o };
|
|
763
763
|
}
|
|
@@ -771,35 +771,35 @@ const Le = (t) => {
|
|
|
771
771
|
onBlur: n,
|
|
772
772
|
onChange: s,
|
|
773
773
|
onInput: r,
|
|
774
|
-
onAccept:
|
|
774
|
+
onAccept: g,
|
|
775
775
|
onComplete: i,
|
|
776
|
-
mask:
|
|
776
|
+
mask: m,
|
|
777
777
|
definitions: f,
|
|
778
|
-
useDefaultDefinitions:
|
|
778
|
+
useDefaultDefinitions: b,
|
|
779
779
|
extraLiterals: a,
|
|
780
780
|
prefix: h,
|
|
781
781
|
suffix: _,
|
|
782
782
|
autofix: u,
|
|
783
783
|
pipe: x,
|
|
784
784
|
completion: y,
|
|
785
|
-
unmask:
|
|
785
|
+
unmask: D,
|
|
786
786
|
allowMode: c,
|
|
787
787
|
allow: d,
|
|
788
|
-
placeholder:
|
|
788
|
+
placeholder: I,
|
|
789
789
|
placeholderOptions: z
|
|
790
|
-
} = t,
|
|
790
|
+
} = t, V = B(
|
|
791
791
|
e,
|
|
792
|
-
g,
|
|
793
|
-
f,
|
|
794
792
|
m,
|
|
793
|
+
f,
|
|
794
|
+
b,
|
|
795
795
|
a,
|
|
796
796
|
h,
|
|
797
797
|
_,
|
|
798
798
|
u,
|
|
799
799
|
y,
|
|
800
|
-
I,
|
|
801
|
-
c,
|
|
802
800
|
D,
|
|
801
|
+
c,
|
|
802
|
+
I,
|
|
803
803
|
z
|
|
804
804
|
)((o, w, S, M, k, A, R, J, X, q, Z, se, P) => w ? ze(o ?? "", "", w, {
|
|
805
805
|
definitions: S ?? {},
|
|
@@ -814,7 +814,7 @@ const Le = (t) => {
|
|
|
814
814
|
prefix: A,
|
|
815
815
|
suffix: R
|
|
816
816
|
}).value : o ?? ""), C = (o, w) => {
|
|
817
|
-
const S = o.value ?? "", M = p.get(e) ?? "", k =
|
|
817
|
+
const S = o.value ?? "", M = p.get(e) ?? "", k = m != null ? p.get(m) : null, A = f != null ? p.get(f) : void 0, R = b != null ? p.get(b) : void 0, J = a != null ? p.get(a) : void 0, X = u != null ? p.get(u) : void 0, q = y != null ? p.get(y) : void 0, Z = D != null ? p.get(D) : void 0, se = c != null ? p.get(c) : void 0, P = h != null ? p.get(h) : void 0, L = _ != null ? p.get(_) : void 0, {
|
|
818
818
|
value: H,
|
|
819
819
|
cursor: ue,
|
|
820
820
|
completed: xe
|
|
@@ -846,7 +846,7 @@ const Le = (t) => {
|
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
848
|
const ye = at(H, Z);
|
|
849
|
-
|
|
849
|
+
g?.({
|
|
850
850
|
raw: ye,
|
|
851
851
|
conformed: H,
|
|
852
852
|
completed: xe,
|
|
@@ -858,7 +858,7 @@ const Le = (t) => {
|
|
|
858
858
|
...t,
|
|
859
859
|
input: le.text(
|
|
860
860
|
Y(t),
|
|
861
|
-
l.value(
|
|
861
|
+
l.value(V),
|
|
862
862
|
l.class("bc-input"),
|
|
863
863
|
n != null ? $.blur(n) : T,
|
|
864
864
|
te(
|
|
@@ -869,9 +869,9 @@ const Le = (t) => {
|
|
|
869
869
|
if (w.key !== "Backspace" || !(t.cursor ? p.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
|
|
870
870
|
const M = o.selectionStart ?? 0, k = o.selectionEnd ?? M;
|
|
871
871
|
if (M !== k || M <= 0) return;
|
|
872
|
-
const A = o.value ?? "", R =
|
|
872
|
+
const A = o.value ?? "", R = m != null ? p.get(m) : null;
|
|
873
873
|
if (!R) return;
|
|
874
|
-
const J = f != null ? p.get(f) : void 0, X =
|
|
874
|
+
const J = f != null ? p.get(f) : void 0, X = b != null ? p.get(b) : !0, q = h != null ? p.get(h) : void 0, Z = _ != null ? p.get(_) : void 0, se = Ve(
|
|
875
875
|
typeof R == "function" ? R(A, {
|
|
876
876
|
raw: A,
|
|
877
877
|
previousConformed: A,
|
|
@@ -898,32 +898,30 @@ const Le = (t) => {
|
|
|
898
898
|
);
|
|
899
899
|
};
|
|
900
900
|
function Ue(t, e, n) {
|
|
901
|
-
const s = p.map(t, (
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
)
|
|
916
|
-
)
|
|
901
|
+
const s = p.map(t, (i) => i != null), r = B(
|
|
902
|
+
s,
|
|
903
|
+
e ?? !1
|
|
904
|
+
)((i, m) => !i || m), g = ge.clearValue;
|
|
905
|
+
return v.button(
|
|
906
|
+
l.type("button"),
|
|
907
|
+
l.class("bc-input-container__reset"),
|
|
908
|
+
G.label(g),
|
|
909
|
+
l.title(g),
|
|
910
|
+
l.disabled(r),
|
|
911
|
+
O({ icon: "mdi:close", size: "sm" }),
|
|
912
|
+
$.click((i) => {
|
|
913
|
+
i.stopPropagation(), n?.(null);
|
|
914
|
+
})
|
|
917
915
|
);
|
|
918
916
|
}
|
|
919
917
|
const Tt = (t) => {
|
|
920
|
-
const { value: e, onBlur: n, onChange: s, onInput: r, rows:
|
|
918
|
+
const { value: e, onBlur: n, onChange: s, onInput: r, rows: g } = t;
|
|
921
919
|
return W({
|
|
922
920
|
baseContainer: !0,
|
|
923
921
|
...t,
|
|
924
922
|
input: v.textarea(
|
|
925
923
|
l.class(
|
|
926
|
-
|
|
924
|
+
B(t.size ?? "md")(
|
|
927
925
|
(i) => Ye(
|
|
928
926
|
!1,
|
|
929
927
|
i ?? "md"
|
|
@@ -931,7 +929,7 @@ const Tt = (t) => {
|
|
|
931
929
|
)
|
|
932
930
|
),
|
|
933
931
|
Y(t),
|
|
934
|
-
l.rows(
|
|
932
|
+
l.rows(g ?? 3),
|
|
935
933
|
l.value(e),
|
|
936
934
|
l.class("bc-input"),
|
|
937
935
|
n != null ? $.blur(j(n)) : T,
|
|
@@ -940,27 +938,27 @@ const Tt = (t) => {
|
|
|
940
938
|
)
|
|
941
939
|
});
|
|
942
940
|
}, St = (t) => {
|
|
943
|
-
const { value: e, step: n, min: s, max: r, onBlur:
|
|
941
|
+
const { value: e, step: n, min: s, max: r, onBlur: g, onChange: i, onInput: m, after: f } = t, b = (_) => {
|
|
944
942
|
const u = s != null ? p.get(s) : void 0, x = r != null ? p.get(r) : void 0;
|
|
945
943
|
return u != null && _ < u ? u : x != null && _ > x ? x : _;
|
|
946
944
|
}, a = n != null ? F(N, (_) => {
|
|
947
|
-
const u =
|
|
945
|
+
const u = B(
|
|
948
946
|
e,
|
|
949
947
|
s
|
|
950
|
-
)((c, d) => d == null ? !0 : (c ?? 0) > d), x =
|
|
948
|
+
)((c, d) => d == null ? !0 : (c ?? 0) > d), x = B(
|
|
951
949
|
e,
|
|
952
950
|
r
|
|
953
951
|
)((c, d) => d == null ? !0 : (c ?? 0) < d), y = (c) => {
|
|
954
|
-
const d = p.get(e) ?? 0,
|
|
955
|
-
if (C != null &&
|
|
952
|
+
const d = p.get(e) ?? 0, I = p.get(n), z = c?.shiftKey ? 10 : 1, V = d - I * z, C = s != null ? p.get(s) : void 0;
|
|
953
|
+
if (C != null && V < C)
|
|
956
954
|
return;
|
|
957
|
-
const o =
|
|
955
|
+
const o = b(V);
|
|
958
956
|
o !== d && i && i(o);
|
|
959
|
-
},
|
|
960
|
-
const d = p.get(e) ?? 0,
|
|
961
|
-
if (C != null &&
|
|
957
|
+
}, D = (c) => {
|
|
958
|
+
const d = p.get(e) ?? 0, I = p.get(n), z = c?.shiftKey ? 10 : 1, V = d + I * z, C = r != null ? p.get(r) : void 0;
|
|
959
|
+
if (C != null && V > C)
|
|
962
960
|
return;
|
|
963
|
-
const o =
|
|
961
|
+
const o = b(V);
|
|
964
962
|
o !== d && i && i(o);
|
|
965
963
|
};
|
|
966
964
|
return ee(
|
|
@@ -972,12 +970,12 @@ const Tt = (t) => {
|
|
|
972
970
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
|
|
973
971
|
),
|
|
974
972
|
l.disabled(
|
|
975
|
-
|
|
973
|
+
B(
|
|
976
974
|
x,
|
|
977
975
|
t.disabled ?? !1
|
|
978
976
|
)((c, d) => !c || d)
|
|
979
977
|
),
|
|
980
|
-
$.click((c) =>
|
|
978
|
+
$.click((c) => D(c)),
|
|
981
979
|
G.label(_.$.incrementValue),
|
|
982
980
|
O({ icon: "line-md:plus", size: "xs" })
|
|
983
981
|
),
|
|
@@ -988,7 +986,7 @@ const Tt = (t) => {
|
|
|
988
986
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
|
|
989
987
|
),
|
|
990
988
|
l.disabled(
|
|
991
|
-
|
|
989
|
+
B(
|
|
992
990
|
u,
|
|
993
991
|
t.disabled ?? !1
|
|
994
992
|
)((c, d) => !c || d)
|
|
@@ -1008,13 +1006,13 @@ const Tt = (t) => {
|
|
|
1008
1006
|
l.valueAsNumber(e),
|
|
1009
1007
|
l.step(n),
|
|
1010
1008
|
l.class("bc-input bc-number-input"),
|
|
1011
|
-
|
|
1009
|
+
g != null ? $.blur(j(g)) : T,
|
|
1012
1010
|
i != null ? $.change(ke(i)) : T,
|
|
1013
|
-
|
|
1011
|
+
m != null ? $.input(ke(m)) : T,
|
|
1014
1012
|
// Add wheel event support when step is defined
|
|
1015
1013
|
n != null ? $.wheel((_) => {
|
|
1016
1014
|
_.preventDefault();
|
|
1017
|
-
const u = p.get(e) ?? 0, x = p.get(n), y = _.shiftKey ? 10 : 1,
|
|
1015
|
+
const u = p.get(e) ?? 0, x = p.get(n), y = _.shiftKey ? 10 : 1, D = _.deltaY < 0 ? x * y : -x * y, c = b(u + D);
|
|
1018
1016
|
c !== u && i && i(c);
|
|
1019
1017
|
}) : T
|
|
1020
1018
|
),
|
|
@@ -1025,35 +1023,35 @@ const Tt = (t) => {
|
|
|
1025
1023
|
const e = Number(t);
|
|
1026
1024
|
return Number.isNaN(e) ? null : e;
|
|
1027
1025
|
}, Mt = (t) => {
|
|
1028
|
-
const { value: e, step: n, min: s, max: r, onBlur:
|
|
1026
|
+
const { value: e, step: n, min: s, max: r, onBlur: g, onChange: i, onInput: m, after: f } = t, b = (u) => {
|
|
1029
1027
|
const x = s != null ? p.get(s) : void 0, y = r != null ? p.get(r) : void 0;
|
|
1030
1028
|
return x != null && u < x ? x : y != null && u > y ? y : u;
|
|
1031
1029
|
}, a = (() => {
|
|
1032
1030
|
if (n == null) return null;
|
|
1033
|
-
const u =
|
|
1031
|
+
const u = B(
|
|
1034
1032
|
e,
|
|
1035
1033
|
s
|
|
1036
|
-
)((d,
|
|
1034
|
+
)((d, I) => {
|
|
1037
1035
|
const z = d ?? 0;
|
|
1038
|
-
return
|
|
1039
|
-
}), x =
|
|
1036
|
+
return I == null ? !0 : z > I;
|
|
1037
|
+
}), x = B(
|
|
1040
1038
|
e,
|
|
1041
1039
|
r
|
|
1042
|
-
)((d,
|
|
1040
|
+
)((d, I) => {
|
|
1043
1041
|
const z = d ?? 0;
|
|
1044
|
-
return
|
|
1042
|
+
return I == null ? !0 : z < I;
|
|
1045
1043
|
}), y = (d) => {
|
|
1046
|
-
const
|
|
1044
|
+
const I = p.get(e) ?? 0, z = p.get(n), V = d?.shiftKey ? 10 : 1, C = I - z * V, o = s != null ? p.get(s) : void 0;
|
|
1047
1045
|
if (o != null && C < o) return;
|
|
1048
|
-
const w =
|
|
1049
|
-
w !==
|
|
1050
|
-
},
|
|
1051
|
-
const
|
|
1046
|
+
const w = b(C);
|
|
1047
|
+
w !== I && i && i(w);
|
|
1048
|
+
}, D = (d) => {
|
|
1049
|
+
const I = p.get(e) ?? 0, z = p.get(n), V = d?.shiftKey ? 10 : 1, C = I + z * V, o = r != null ? p.get(r) : void 0;
|
|
1052
1050
|
if (o != null && C > o) return;
|
|
1053
|
-
const w =
|
|
1054
|
-
w !==
|
|
1051
|
+
const w = b(C);
|
|
1052
|
+
w !== I && i && i(w);
|
|
1055
1053
|
};
|
|
1056
|
-
return ((d,
|
|
1054
|
+
return ((d, I) => ee(
|
|
1057
1055
|
l.class("bc-number-input-steppers"),
|
|
1058
1056
|
v.button(
|
|
1059
1057
|
l.type("button"),
|
|
@@ -1061,12 +1059,12 @@ const Tt = (t) => {
|
|
|
1061
1059
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
|
|
1062
1060
|
),
|
|
1063
1061
|
l.disabled(
|
|
1064
|
-
|
|
1062
|
+
B(
|
|
1065
1063
|
x,
|
|
1066
1064
|
t.disabled ?? !1
|
|
1067
|
-
)((z,
|
|
1065
|
+
)((z, V) => !z || V)
|
|
1068
1066
|
),
|
|
1069
|
-
$.click((z) =>
|
|
1067
|
+
$.click((z) => D(z)),
|
|
1070
1068
|
G.label(d),
|
|
1071
1069
|
O({ icon: "line-md:plus", size: "xs" })
|
|
1072
1070
|
),
|
|
@@ -1076,13 +1074,13 @@ const Tt = (t) => {
|
|
|
1076
1074
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
|
|
1077
1075
|
),
|
|
1078
1076
|
l.disabled(
|
|
1079
|
-
|
|
1077
|
+
B(
|
|
1080
1078
|
u,
|
|
1081
1079
|
t.disabled ?? !1
|
|
1082
|
-
)((z,
|
|
1080
|
+
)((z, V) => !z || V)
|
|
1083
1081
|
),
|
|
1084
1082
|
$.click((z) => y(z)),
|
|
1085
|
-
G.label(
|
|
1083
|
+
G.label(I),
|
|
1086
1084
|
O({ icon: "line-md:minus", size: "xs" })
|
|
1087
1085
|
)
|
|
1088
1086
|
))(
|
|
@@ -1092,7 +1090,7 @@ const Tt = (t) => {
|
|
|
1092
1090
|
})(), h = Ue(
|
|
1093
1091
|
e,
|
|
1094
1092
|
t.disabled,
|
|
1095
|
-
i ??
|
|
1093
|
+
i ?? m
|
|
1096
1094
|
), _ = f != null && a != null ? E(a, h, f) : f != null ? E(h, f) : a != null ? E(a, h) : h;
|
|
1097
1095
|
return W({
|
|
1098
1096
|
...t,
|
|
@@ -1105,23 +1103,23 @@ const Tt = (t) => {
|
|
|
1105
1103
|
l.value(p.map(e, (u) => u == null ? "" : String(u))),
|
|
1106
1104
|
l.step(n),
|
|
1107
1105
|
l.class("bc-input bc-number-input"),
|
|
1108
|
-
|
|
1106
|
+
g != null ? $.blur(j(g)) : T,
|
|
1109
1107
|
i != null ? $.change(
|
|
1110
1108
|
j((u) => {
|
|
1111
1109
|
const x = Te(u);
|
|
1112
1110
|
i(x);
|
|
1113
1111
|
})
|
|
1114
1112
|
) : T,
|
|
1115
|
-
|
|
1113
|
+
m != null ? $.input(
|
|
1116
1114
|
j((u) => {
|
|
1117
1115
|
const x = Te(u);
|
|
1118
|
-
|
|
1116
|
+
m(x);
|
|
1119
1117
|
})
|
|
1120
1118
|
) : T,
|
|
1121
1119
|
// Wheel support when step is defined
|
|
1122
1120
|
n != null ? $.wheel((u) => {
|
|
1123
1121
|
u.preventDefault();
|
|
1124
|
-
const x = p.get(e) ?? 0, y = p.get(n),
|
|
1122
|
+
const x = p.get(e) ?? 0, y = p.get(n), D = u.shiftKey ? 10 : 1, c = u.deltaY < 0 ? y * D : -y * D, d = b(x + c);
|
|
1125
1123
|
d !== x && i && i(d);
|
|
1126
1124
|
}) : T
|
|
1127
1125
|
),
|
|
@@ -1221,8 +1219,8 @@ const Se = (t, e) => {
|
|
|
1221
1219
|
return null;
|
|
1222
1220
|
}
|
|
1223
1221
|
}, Bt = (t) => {
|
|
1224
|
-
const { value: e, onChange: n, onInput: s, after: r, disabled:
|
|
1225
|
-
const a = Ue(e,
|
|
1222
|
+
const { value: e, onChange: n, onInput: s, after: r, disabled: g, onBlur: i } = t, m = () => {
|
|
1223
|
+
const a = Ue(e, g, n ?? s);
|
|
1226
1224
|
return r != null ? E(a, r) : a;
|
|
1227
1225
|
}, f = t.placeholder != null ? T : l.placeholder("P0DT0H0M0S");
|
|
1228
1226
|
return ut(
|
|
@@ -1233,7 +1231,7 @@ const Se = (t, e) => {
|
|
|
1233
1231
|
onInput: void 0,
|
|
1234
1232
|
...dt(a.Duration.from),
|
|
1235
1233
|
placeholder: "P0DT0H0M0S",
|
|
1236
|
-
after:
|
|
1234
|
+
after: m()
|
|
1237
1235
|
}),
|
|
1238
1236
|
{ pending: () => {
|
|
1239
1237
|
const a = (h) => (_) => {
|
|
@@ -1242,9 +1240,9 @@ const Se = (t, e) => {
|
|
|
1242
1240
|
h(null);
|
|
1243
1241
|
return;
|
|
1244
1242
|
}
|
|
1245
|
-
const y = globalThis.Temporal,
|
|
1246
|
-
if (
|
|
1247
|
-
h(
|
|
1243
|
+
const y = globalThis.Temporal, D = Se(y, x);
|
|
1244
|
+
if (D != null) {
|
|
1245
|
+
h(D);
|
|
1248
1246
|
return;
|
|
1249
1247
|
}
|
|
1250
1248
|
he().then((c) => {
|
|
@@ -1264,7 +1262,7 @@ const Se = (t, e) => {
|
|
|
1264
1262
|
n != null ? $.change(a(n)) : T,
|
|
1265
1263
|
s != null ? $.input(a(s)) : T
|
|
1266
1264
|
),
|
|
1267
|
-
after:
|
|
1265
|
+
after: m()
|
|
1268
1266
|
});
|
|
1269
1267
|
} }
|
|
1270
1268
|
);
|
|
@@ -1287,15 +1285,15 @@ const Se = (t, e) => {
|
|
|
1287
1285
|
element: n,
|
|
1288
1286
|
separator: s,
|
|
1289
1287
|
showMove: r = !0,
|
|
1290
|
-
showRemove:
|
|
1288
|
+
showRemove: g = !0,
|
|
1291
1289
|
showAdd: i = !0,
|
|
1292
|
-
createItem:
|
|
1290
|
+
createItem: m,
|
|
1293
1291
|
addLabel: f,
|
|
1294
|
-
controlsLayout:
|
|
1292
|
+
controlsLayout: b = "aside",
|
|
1295
1293
|
removeDisabled: a,
|
|
1296
1294
|
addDisabled: h
|
|
1297
|
-
} = t, _ = p.toSignal(
|
|
1298
|
-
const
|
|
1295
|
+
} = t, _ = p.toSignal(b).map((y) => y === "aside"), u = (y) => {
|
|
1296
|
+
const D = U(
|
|
1299
1297
|
r ?? !1,
|
|
1300
1298
|
() => v.div(
|
|
1301
1299
|
l.class("bc-group--align-center"),
|
|
@@ -1340,13 +1338,13 @@ const Se = (t, e) => {
|
|
|
1340
1338
|
)
|
|
1341
1339
|
)
|
|
1342
1340
|
), c = U(
|
|
1343
|
-
|
|
1341
|
+
g,
|
|
1344
1342
|
() => F(
|
|
1345
1343
|
N,
|
|
1346
1344
|
(d) => ce({
|
|
1347
1345
|
size: "xs",
|
|
1348
1346
|
// Use a lowercase label to satisfy tests that query with [aria-label*="remove"]
|
|
1349
|
-
label: p.map(d.$.removeItem, (
|
|
1347
|
+
label: p.map(d.$.removeItem, (I) => I.toLowerCase()),
|
|
1350
1348
|
color: "danger",
|
|
1351
1349
|
disabled: a,
|
|
1352
1350
|
onClick: y.remove
|
|
@@ -1361,8 +1359,8 @@ const Se = (t, e) => {
|
|
|
1361
1359
|
ee(
|
|
1362
1360
|
l.class("bc-stack--align-center"),
|
|
1363
1361
|
U(
|
|
1364
|
-
e.signal.map((
|
|
1365
|
-
() =>
|
|
1362
|
+
e.signal.map((I) => I.length > 1),
|
|
1363
|
+
() => D
|
|
1366
1364
|
),
|
|
1367
1365
|
c
|
|
1368
1366
|
)
|
|
@@ -1373,8 +1371,8 @@ const Se = (t, e) => {
|
|
|
1373
1371
|
re(
|
|
1374
1372
|
l.class("bc-group--gap-2 bc-group--justify-between"),
|
|
1375
1373
|
U(
|
|
1376
|
-
e.signal.map((
|
|
1377
|
-
() =>
|
|
1374
|
+
e.signal.map((I) => I.length > 1),
|
|
1375
|
+
() => D,
|
|
1378
1376
|
() => v.div()
|
|
1379
1377
|
),
|
|
1380
1378
|
c
|
|
@@ -1382,7 +1380,7 @@ const Se = (t, e) => {
|
|
|
1382
1380
|
)
|
|
1383
1381
|
);
|
|
1384
1382
|
}, x = U(
|
|
1385
|
-
|
|
1383
|
+
B(i, m)((y, D) => y && D != null),
|
|
1386
1384
|
() => re(
|
|
1387
1385
|
l.class(
|
|
1388
1386
|
"bc-group--gap-2 bc-group--align-center bc-group--justify-center"
|
|
@@ -1391,12 +1389,12 @@ const Se = (t, e) => {
|
|
|
1391
1389
|
{
|
|
1392
1390
|
size: "sm",
|
|
1393
1391
|
variant: "filled",
|
|
1394
|
-
onClick: () => e.push(
|
|
1395
|
-
disabled:
|
|
1392
|
+
onClick: () => e.push(m()),
|
|
1393
|
+
disabled: B(
|
|
1396
1394
|
e.disabled,
|
|
1397
1395
|
h ?? !1
|
|
1398
1396
|
)(
|
|
1399
|
-
(y,
|
|
1397
|
+
(y, D) => y || D
|
|
1400
1398
|
)
|
|
1401
1399
|
},
|
|
1402
1400
|
F(
|
|
@@ -1423,11 +1421,11 @@ const Se = (t, e) => {
|
|
|
1423
1421
|
controller: n,
|
|
1424
1422
|
element: s,
|
|
1425
1423
|
separator: r,
|
|
1426
|
-
showMove:
|
|
1424
|
+
showMove: g,
|
|
1427
1425
|
showRemove: i,
|
|
1428
|
-
showAdd:
|
|
1426
|
+
showAdd: m,
|
|
1429
1427
|
createItem: f,
|
|
1430
|
-
addLabel:
|
|
1428
|
+
addLabel: b,
|
|
1431
1429
|
controlsLayout: a,
|
|
1432
1430
|
removeDisabled: h,
|
|
1433
1431
|
addDisabled: _,
|
|
@@ -1440,11 +1438,11 @@ const Se = (t, e) => {
|
|
|
1440
1438
|
controller: n,
|
|
1441
1439
|
element: s,
|
|
1442
1440
|
separator: r,
|
|
1443
|
-
showMove:
|
|
1441
|
+
showMove: g,
|
|
1444
1442
|
showRemove: i,
|
|
1445
|
-
showAdd:
|
|
1443
|
+
showAdd: m,
|
|
1446
1444
|
createItem: f,
|
|
1447
|
-
addLabel:
|
|
1445
|
+
addLabel: b,
|
|
1448
1446
|
controlsLayout: a,
|
|
1449
1447
|
removeDisabled: h,
|
|
1450
1448
|
addDisabled: _
|
|
@@ -1458,8 +1456,8 @@ class Ut extends fe {
|
|
|
1458
1456
|
activeBranch;
|
|
1459
1457
|
#t;
|
|
1460
1458
|
#e = /* @__PURE__ */ new Map();
|
|
1461
|
-
constructor(e, n, s, r,
|
|
1462
|
-
super(e, n, s, r,
|
|
1459
|
+
constructor(e, n, s, r, g, i, m = Q) {
|
|
1460
|
+
super(e, n, s, r, g, m), this.branches = i;
|
|
1463
1461
|
const f = (a) => {
|
|
1464
1462
|
for (const h of i)
|
|
1465
1463
|
if (h.detect(a))
|
|
@@ -1467,7 +1465,7 @@ class Ut extends fe {
|
|
|
1467
1465
|
return i[0]?.key ?? "unknown";
|
|
1468
1466
|
};
|
|
1469
1467
|
this.activeBranch = s.map(f, Q);
|
|
1470
|
-
const
|
|
1468
|
+
const b = (a) => {
|
|
1471
1469
|
if (this.#e.has(a))
|
|
1472
1470
|
return this.#e.get(a);
|
|
1473
1471
|
const h = i.find((u) => u.key === a);
|
|
@@ -1480,19 +1478,19 @@ class Ut extends fe {
|
|
|
1480
1478
|
},
|
|
1481
1479
|
this.signal.map(
|
|
1482
1480
|
(u) => h.detect(u) ? u : h.defaultValue(),
|
|
1483
|
-
|
|
1481
|
+
m
|
|
1484
1482
|
),
|
|
1485
|
-
r.map(
|
|
1483
|
+
r.map(De([a])),
|
|
1486
1484
|
{
|
|
1487
1485
|
disabled: this.disabled,
|
|
1488
1486
|
validationMode: this.parent.validationMode
|
|
1489
1487
|
},
|
|
1490
|
-
|
|
1488
|
+
m
|
|
1491
1489
|
);
|
|
1492
1490
|
return this.#e.set(a, _), _;
|
|
1493
1491
|
};
|
|
1494
1492
|
this.#t = this.activeBranch.map(
|
|
1495
|
-
(a) =>
|
|
1493
|
+
(a) => b(a),
|
|
1496
1494
|
Q
|
|
1497
1495
|
), this.onDispose(() => {
|
|
1498
1496
|
for (const a of this.#e.values())
|
|
@@ -1524,7 +1522,7 @@ class Ut extends fe {
|
|
|
1524
1522
|
(r) => n.detect(r) ? r : n.defaultValue(),
|
|
1525
1523
|
Q
|
|
1526
1524
|
),
|
|
1527
|
-
this.status.map(
|
|
1525
|
+
this.status.map(De([e])),
|
|
1528
1526
|
{
|
|
1529
1527
|
disabled: this.disabled,
|
|
1530
1528
|
validationMode: this.parent.validationMode
|
|
@@ -1552,8 +1550,8 @@ class Ut extends fe {
|
|
|
1552
1550
|
"Changing type will clear the current value. Continue?"
|
|
1553
1551
|
))
|
|
1554
1552
|
return !1;
|
|
1555
|
-
const
|
|
1556
|
-
return this.change(
|
|
1553
|
+
const g = s.defaultValue();
|
|
1554
|
+
return this.change(g), !0;
|
|
1557
1555
|
}
|
|
1558
1556
|
/**
|
|
1559
1557
|
* Get the current active branch definition
|
|
@@ -1604,7 +1602,7 @@ export {
|
|
|
1604
1602
|
Ct as $,
|
|
1605
1603
|
mt as B,
|
|
1606
1604
|
nt as E,
|
|
1607
|
-
|
|
1605
|
+
Dt as F,
|
|
1608
1606
|
re as G,
|
|
1609
1607
|
Lt as L,
|
|
1610
1608
|
Le as M,
|
|
@@ -1629,7 +1627,7 @@ export {
|
|
|
1629
1627
|
Ft as m,
|
|
1630
1628
|
it as n,
|
|
1631
1629
|
rt as o,
|
|
1632
|
-
|
|
1630
|
+
It as p,
|
|
1633
1631
|
lt as q,
|
|
1634
1632
|
he as r,
|
|
1635
1633
|
Ot as t
|