@tempots/beatui 0.35.0 → 0.36.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-DJeW9RI7.cjs → 2019-B1QESOSc.cjs} +1 -1
- package/dist/{2019-Dmseo7Cq.js → 2019-RaU4YQ5c.js} +2 -2
- package/dist/{2020-I1mnGGtD.js → 2020-BAomdSE8.js} +2 -2
- package/dist/{2020-BySxLQc5.cjs → 2020-BI-SxTSK.cjs} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +2 -2
- package/dist/beatui.css +398 -10
- package/dist/beatui.tailwind.css +398 -10
- package/dist/{index-CBc0q0zl.cjs → index-BKjL6RO2.cjs} +2 -2
- package/dist/{index-D-CBfcZj.js → index-BS0NyhvV.js} +192 -189
- package/dist/{index-Ct2_ulan.cjs → index-BzApzJXc.cjs} +1 -1
- package/dist/{index-DbQzJti7.js → index-Dc9UNC8n.js} +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +1462 -1332
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +1 -1
- package/dist/{modal-Dm61yY5i.js → modal-CxG-RO9B.js} +1 -1
- package/dist/{modal-AFhB4rIq.cjs → modal-OMSAbIg1.cjs} +1 -1
- package/dist/notice-0Xhzr7qR.cjs +2 -0
- package/dist/{notice-Cd9ElXwb.js → notice-C7o5d8Jw.js} +390 -375
- package/dist/types/components/data/index.d.ts +1 -0
- package/dist/types/components/data/table.d.ts +27 -0
- package/dist/types/components/form/input/input-wrapper.d.ts +4 -2
- package/dist/types/components/form/input/switch.d.ts +4 -3
- package/dist/types/components/layout/action-card.d.ts +19 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/utils-BcIRhDH0.cjs +1 -0
- package/dist/{utils-g5YCiiS6.js → utils-C7619Rp3.js} +392 -398
- package/package.json +1 -1
- package/dist/notice-len8sDjL.cjs +0 -2
- package/dist/utils-BetBqtiV.cjs +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { Use as H, Value as u, prop as et, html as I, attr as a, on as C, WithElement as it, OnDispose as W, aria as N, bind as _t, computedOf as
|
|
1
|
+
import { Use as H, Value as u, prop as et, html as I, attr as a, on as C, WithElement as it, OnDispose as W, aria as N, bind as _t, computedOf as L, style as dt, When as E, NotEmpty as Gt, Fragment as V, ForEach as ft, svg as At, svgAttr as ht, Empty as T, emitValue as P, 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 O, f as ae, I as z, C as j, d as yt, T as oe, L as ce, c 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,
|
|
7
|
-
class
|
|
5
|
+
import { a as X, b as O, f as ae, I as z, C as j, d as yt, T as oe, L as ce, c as Vt, e as ie, B as gt } from "./translations-iam7PITs.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-C7o5d8Jw.js";
|
|
7
|
+
class he extends Error {
|
|
8
8
|
constructor(e = "Missing implementation") {
|
|
9
9
|
super(e), this.name = "MissingImplementationError";
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const un = (t) => ge(t).split("_").join(" "), ge = (t) => (t = t.replace(/::/g, "/"), t = t.replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2"), t = t.replace(/([a-z\d])([A-Z])/g, "$1_$2"), t = t.replace(/-/g, "_"), t.toLowerCase()), pn = (t) => t.substring(0, 1).toUpperCase() + t.substring(1), be = (t) => {
|
|
13
13
|
if (typeof Buffer < "u")
|
|
14
14
|
return Buffer.from(t, "base64").toString("utf8");
|
|
15
15
|
if (typeof atob < "u")
|
|
16
16
|
return atob(t);
|
|
17
|
-
throw new
|
|
17
|
+
throw new he(
|
|
18
18
|
"No implementation found for base64 decoding"
|
|
19
19
|
);
|
|
20
20
|
};
|
|
@@ -24,18 +24,18 @@ function Et({
|
|
|
24
24
|
accept: r = "*/*",
|
|
25
25
|
enableClick: n = !0,
|
|
26
26
|
content: s,
|
|
27
|
-
disabled:
|
|
27
|
+
disabled: c = !1,
|
|
28
28
|
allowMultiple: l
|
|
29
29
|
}) {
|
|
30
30
|
return H(X, (i) => {
|
|
31
|
-
const
|
|
31
|
+
const o = u.deriveProp(e ?? []), p = et(!1), m = (g) => {
|
|
32
32
|
g.preventDefault(), g.stopPropagation(), p.value = !0;
|
|
33
33
|
}, f = (g) => {
|
|
34
34
|
g.preventDefault(), g.stopPropagation(), (!g.currentTarget || !g.currentTarget.contains(g.relatedTarget)) && (p.value = !1);
|
|
35
35
|
}, v = (g) => {
|
|
36
36
|
g.preventDefault(), g.stopPropagation(), p.value = !1;
|
|
37
37
|
const b = Array.from(g.dataTransfer?.files || []);
|
|
38
|
-
b.length > 0 && (
|
|
38
|
+
b.length > 0 && (o.value = b, t(b));
|
|
39
39
|
}, d = (g) => {
|
|
40
40
|
u.get(n) && g.currentTarget.querySelector(
|
|
41
41
|
'input[type="file"]'
|
|
@@ -45,7 +45,7 @@ function Et({
|
|
|
45
45
|
const h = () => {
|
|
46
46
|
if (x == null) return;
|
|
47
47
|
const g = Array.from(x.files ?? []);
|
|
48
|
-
g.length > 0 && (
|
|
48
|
+
g.length > 0 && (o.value = g, t(g)), x.value = "";
|
|
49
49
|
}, y = (g) => {
|
|
50
50
|
u.get(n) && (g.key === "Enter" || g.key === " ") && (g.preventDefault(), d(g));
|
|
51
51
|
};
|
|
@@ -63,7 +63,7 @@ function Et({
|
|
|
63
63
|
// Hidden file input
|
|
64
64
|
I.input(
|
|
65
65
|
a.type("file"),
|
|
66
|
-
a.disabled(
|
|
66
|
+
a.disabled(c),
|
|
67
67
|
a.accept(r),
|
|
68
68
|
a.multiple(l),
|
|
69
69
|
a.style(
|
|
@@ -71,7 +71,7 @@ function Et({
|
|
|
71
71
|
),
|
|
72
72
|
C.change(h),
|
|
73
73
|
it((g) => (x = g, W(
|
|
74
|
-
|
|
74
|
+
o.on((b) => {
|
|
75
75
|
const D = globalThis.DataTransfer;
|
|
76
76
|
if (D != null) {
|
|
77
77
|
const k = new D();
|
|
@@ -83,42 +83,42 @@ function Et({
|
|
|
83
83
|
// Screen reader instructions
|
|
84
84
|
N.label(_t(i.$.dropZoneInstructions)(n)),
|
|
85
85
|
// Content
|
|
86
|
-
s({ files:
|
|
86
|
+
s({ files: o, clear: () => o.value = [], change: o.set })
|
|
87
87
|
);
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function ve(t, e) {
|
|
91
91
|
return t.length === e.length && t.every((r, n) => r === e[n]);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function xe(t, e) {
|
|
94
94
|
const r = ["bc-segmented-control", `bc-segmented-control--size-${t}`];
|
|
95
95
|
return e && r.push("bc-segmented-control--disabled"), r.join(" ");
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function dn({
|
|
98
98
|
options: t,
|
|
99
99
|
value: e,
|
|
100
100
|
onChange: r,
|
|
101
101
|
size: n = "md",
|
|
102
102
|
disabled: s = !1
|
|
103
|
-
}, ...
|
|
104
|
-
const l = se(t).map(([i,
|
|
103
|
+
}, ...c) {
|
|
104
|
+
const l = se(t).map(([i, o]) => ({
|
|
105
105
|
key: i,
|
|
106
|
-
label:
|
|
106
|
+
label: o
|
|
107
107
|
}));
|
|
108
108
|
return it(() => {
|
|
109
109
|
const i = Object.fromEntries(
|
|
110
110
|
l.map((p, m) => [p.key, m])
|
|
111
|
-
),
|
|
111
|
+
), o = et(
|
|
112
112
|
l.map(() => ({ left: 0, width: 0 })),
|
|
113
|
-
|
|
113
|
+
ve
|
|
114
114
|
);
|
|
115
115
|
return I.div(
|
|
116
116
|
a.class(
|
|
117
|
-
|
|
117
|
+
L(
|
|
118
118
|
n,
|
|
119
119
|
s
|
|
120
120
|
)(
|
|
121
|
-
(p, m) =>
|
|
121
|
+
(p, m) => xe(p ?? "md", m ?? !1)
|
|
122
122
|
)
|
|
123
123
|
),
|
|
124
124
|
I.div(
|
|
@@ -126,18 +126,18 @@ function fn({
|
|
|
126
126
|
I.div(
|
|
127
127
|
a.class("bc-segmented-control__indicator"),
|
|
128
128
|
dt.width(
|
|
129
|
-
|
|
129
|
+
L(
|
|
130
130
|
e,
|
|
131
|
-
|
|
131
|
+
o
|
|
132
132
|
)((p, m) => {
|
|
133
133
|
const { width: f } = m[i[p] ?? 0];
|
|
134
134
|
return `${f}px`;
|
|
135
135
|
})
|
|
136
136
|
),
|
|
137
137
|
dt.left(
|
|
138
|
-
|
|
138
|
+
L(
|
|
139
139
|
e,
|
|
140
|
-
|
|
140
|
+
o
|
|
141
141
|
)((p, m) => {
|
|
142
142
|
const { left: f } = m[i[p] ?? 0];
|
|
143
143
|
return `${f}px`;
|
|
@@ -157,7 +157,7 @@ function fn({
|
|
|
157
157
|
),
|
|
158
158
|
jt((v) => {
|
|
159
159
|
function d() {
|
|
160
|
-
|
|
160
|
+
o.update((h) => {
|
|
161
161
|
const y = [...h];
|
|
162
162
|
return y[f] = {
|
|
163
163
|
width: v.value.width,
|
|
@@ -171,21 +171,21 @@ function fn({
|
|
|
171
171
|
p
|
|
172
172
|
))
|
|
173
173
|
),
|
|
174
|
-
...
|
|
174
|
+
...c
|
|
175
175
|
);
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function we(t) {
|
|
179
179
|
const e = t.type.toLowerCase();
|
|
180
180
|
return e.startsWith("image/") && (e.includes("jpeg") || e.includes("jpg") || e.includes("png") || e.includes("gif") || e.includes("webp") || e.includes("svg"));
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function _e(t) {
|
|
183
183
|
const e = t.type.toLowerCase();
|
|
184
184
|
return e.startsWith("image/") ? "vscode-icons:file-type-image" : e.startsWith("video/") ? "vscode-icons:file-type-video" : e.startsWith("audio/") ? "vscode-icons:file-type-audio" : e.includes("pdf") ? "vscode-icons:file-type-pdf2" : e.includes("word") || e.includes("document") ? "vscode-icons:file-type-word" : e.includes("excel") || e.includes("spreadsheet") ? "vscode-icons:file-type-excel" : e.includes("powerpoint") || e.includes("presentation") ? "vscode-icons:file-type-powerpoint" : e.includes("zip") || e.includes("archive") ? "vscode-icons:file-type-zip" : e.includes("text") ? "vscode-icons:file-type-text" : e.includes("json") ? "vscode-icons:file-type-json-official" : e.includes("csv") ? "vscode-icons:file-type-csv" : e.includes("xml") ? "vscode-icons:file-type-xml" : e.includes("yaml") ? "vscode-icons:file-type-yaml-official" : "vscode-icons:file-type-binary";
|
|
185
185
|
}
|
|
186
186
|
function Ut(t) {
|
|
187
187
|
return E(
|
|
188
|
-
t.map(
|
|
188
|
+
t.map(we),
|
|
189
189
|
() => {
|
|
190
190
|
const e = et(null);
|
|
191
191
|
return t.on((r) => {
|
|
@@ -204,18 +204,18 @@ function Ut(t) {
|
|
|
204
204
|
)
|
|
205
205
|
);
|
|
206
206
|
},
|
|
207
|
-
() => z({ icon: t.map(
|
|
207
|
+
() => z({ icon: t.map(_e) })
|
|
208
208
|
);
|
|
209
209
|
}
|
|
210
|
-
const
|
|
210
|
+
const ye = (t, ...e) => {
|
|
211
211
|
const {
|
|
212
212
|
value: r = et([]),
|
|
213
213
|
accept: n = "*/*",
|
|
214
214
|
maxFiles: s,
|
|
215
|
-
maxFileSize:
|
|
215
|
+
maxFileSize: c,
|
|
216
216
|
onChange: l,
|
|
217
217
|
onBlur: i,
|
|
218
|
-
disabled:
|
|
218
|
+
disabled: o,
|
|
219
219
|
hasError: p,
|
|
220
220
|
mode: m = "default",
|
|
221
221
|
showFileList: f = !0,
|
|
@@ -226,8 +226,8 @@ const $e = (t, ...e) => {
|
|
|
226
226
|
const w = u.get(s);
|
|
227
227
|
_ = _.slice(0, w);
|
|
228
228
|
}
|
|
229
|
-
if (
|
|
230
|
-
const w = u.get(
|
|
229
|
+
if (c) {
|
|
230
|
+
const w = u.get(c);
|
|
231
231
|
_ = _.filter(($) => $.size <= w);
|
|
232
232
|
}
|
|
233
233
|
l?.(_);
|
|
@@ -253,7 +253,7 @@ const $e = (t, ...e) => {
|
|
|
253
253
|
a.class("bc-file-input__drop-zone-text"),
|
|
254
254
|
_t($.$.filesInputInstructions)(
|
|
255
255
|
s,
|
|
256
|
-
|
|
256
|
+
c,
|
|
257
257
|
$.$.fileSizeUnits.value
|
|
258
258
|
)
|
|
259
259
|
)
|
|
@@ -287,7 +287,7 @@ const $e = (t, ...e) => {
|
|
|
287
287
|
" ",
|
|
288
288
|
_t(_.$.filesInputInstructions)(
|
|
289
289
|
s,
|
|
290
|
-
|
|
290
|
+
c,
|
|
291
291
|
_.$.fileSizeUnits.value
|
|
292
292
|
)
|
|
293
293
|
)
|
|
@@ -299,7 +299,7 @@ const $e = (t, ...e) => {
|
|
|
299
299
|
(k) => O(
|
|
300
300
|
{
|
|
301
301
|
baseContainer: u.map(x, (_) => !_),
|
|
302
|
-
disabled:
|
|
302
|
+
disabled: o,
|
|
303
303
|
hasError: p,
|
|
304
304
|
after: E(
|
|
305
305
|
x,
|
|
@@ -309,7 +309,7 @@ const $e = (t, ...e) => {
|
|
|
309
309
|
{
|
|
310
310
|
size: "sm",
|
|
311
311
|
label: k.$.clearAllFiles,
|
|
312
|
-
disabled:
|
|
312
|
+
disabled: o,
|
|
313
313
|
onClick: g
|
|
314
314
|
},
|
|
315
315
|
a.class("bc-file-input__compact-clear")
|
|
@@ -326,7 +326,7 @@ const $e = (t, ...e) => {
|
|
|
326
326
|
accept: n,
|
|
327
327
|
enableClick: !0,
|
|
328
328
|
allowMultiple: u.map(s ?? 1 / 0, (_) => _ > 1),
|
|
329
|
-
disabled:
|
|
329
|
+
disabled: o,
|
|
330
330
|
onChange: h,
|
|
331
331
|
content: D
|
|
332
332
|
})
|
|
@@ -338,7 +338,7 @@ const $e = (t, ...e) => {
|
|
|
338
338
|
accept: n,
|
|
339
339
|
enableClick: !0,
|
|
340
340
|
allowMultiple: u.map(s ?? 1 / 0, (_) => _ > 1),
|
|
341
|
-
disabled:
|
|
341
|
+
disabled: o,
|
|
342
342
|
onChange: h,
|
|
343
343
|
content: b
|
|
344
344
|
}),
|
|
@@ -346,7 +346,7 @@ const $e = (t, ...e) => {
|
|
|
346
346
|
f,
|
|
347
347
|
() => Gt(
|
|
348
348
|
d,
|
|
349
|
-
() =>
|
|
349
|
+
() => V(
|
|
350
350
|
I.div(
|
|
351
351
|
a.class("bc-file-input__file-list"),
|
|
352
352
|
ft(d, (_, w) => {
|
|
@@ -366,14 +366,14 @@ const $e = (t, ...e) => {
|
|
|
366
366
|
),
|
|
367
367
|
I.div(
|
|
368
368
|
a.class("bc-file-input__file-meta"),
|
|
369
|
-
|
|
369
|
+
L(
|
|
370
370
|
_.$.size,
|
|
371
371
|
k.$.fileSizeUnits
|
|
372
372
|
)(
|
|
373
373
|
(M, A) => ae(M, { units: A })
|
|
374
374
|
),
|
|
375
375
|
" • ",
|
|
376
|
-
|
|
376
|
+
L(
|
|
377
377
|
_.$.type,
|
|
378
378
|
k.$.unknownType
|
|
379
379
|
)((M, A) => M || A)
|
|
@@ -383,7 +383,7 @@ const $e = (t, ...e) => {
|
|
|
383
383
|
{
|
|
384
384
|
size: "sm",
|
|
385
385
|
label: k.$.removeFile,
|
|
386
|
-
disabled:
|
|
386
|
+
disabled: o,
|
|
387
387
|
onClick: () => y($)
|
|
388
388
|
},
|
|
389
389
|
a.class("bc-file-input__remove-button")
|
|
@@ -400,7 +400,7 @@ const $e = (t, ...e) => {
|
|
|
400
400
|
I.button(
|
|
401
401
|
a.type("button"),
|
|
402
402
|
a.class("bc-file-input__clear-all-button"),
|
|
403
|
-
a.disabled(
|
|
403
|
+
a.disabled(o),
|
|
404
404
|
k.$.clearAllFiles,
|
|
405
405
|
C.click((_) => {
|
|
406
406
|
_.preventDefault(), _.stopPropagation(), g();
|
|
@@ -418,7 +418,7 @@ const $e = (t, ...e) => {
|
|
|
418
418
|
)
|
|
419
419
|
);
|
|
420
420
|
};
|
|
421
|
-
async function
|
|
421
|
+
async function $e(t) {
|
|
422
422
|
return new Promise((e, r) => {
|
|
423
423
|
const n = new FileReader();
|
|
424
424
|
n.readAsDataURL(t), n.onload = () => {
|
|
@@ -427,10 +427,10 @@ async function ke(t) {
|
|
|
427
427
|
}, n.onerror = (s) => r(s);
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
return Promise.all(t.map(
|
|
430
|
+
function ke(t) {
|
|
431
|
+
return Promise.all(t.map($e));
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function Ie(t) {
|
|
434
434
|
if (t.length >= 4) {
|
|
435
435
|
if (t[0] === 137 && t[1] === 80 && t[2] === 78 && t[3] === 71)
|
|
436
436
|
return "image/png";
|
|
@@ -446,53 +446,53 @@ function Ce(t) {
|
|
|
446
446
|
}
|
|
447
447
|
return "application/octet-stream";
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
const e =
|
|
449
|
+
function Ce(t) {
|
|
450
|
+
const e = be(t ?? ""), r = e.length, n = new Uint8Array(r);
|
|
451
451
|
for (let s = 0; s < r; s++) n[s] = e.charCodeAt(s);
|
|
452
452
|
return n;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function Me(t) {
|
|
455
455
|
const {
|
|
456
456
|
value: e,
|
|
457
457
|
onChange: r,
|
|
458
458
|
onInput: n,
|
|
459
459
|
...s
|
|
460
|
-
} = t,
|
|
461
|
-
const d =
|
|
460
|
+
} = t, c = /* @__PURE__ */ new Map(), l = u.toSignal(e).map((m) => m.map((f, v) => {
|
|
461
|
+
const d = c.get(f), x = Ce(f ?? ""), h = d?.type || Ie(x), y = d?.name ?? `file-${v}`, g = x.buffer.slice(
|
|
462
462
|
x.byteOffset,
|
|
463
463
|
x.byteOffset + x.byteLength
|
|
464
464
|
), b = new Blob([g], { type: h });
|
|
465
465
|
return new File([b], y, { type: h });
|
|
466
466
|
})), i = (m) => (f) => {
|
|
467
|
-
m &&
|
|
467
|
+
m && ke(f).then((v) => {
|
|
468
468
|
for (const [d, x] of v.entries())
|
|
469
|
-
|
|
469
|
+
c.set(x, { name: f[d].name, type: f[d].type });
|
|
470
470
|
m(v);
|
|
471
471
|
});
|
|
472
|
-
},
|
|
473
|
-
return
|
|
472
|
+
}, o = i(r), p = i(n);
|
|
473
|
+
return ye({
|
|
474
474
|
...s,
|
|
475
475
|
value: l,
|
|
476
|
-
onChange:
|
|
476
|
+
onChange: o,
|
|
477
477
|
onInput: p
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function fn(t) {
|
|
481
481
|
const {
|
|
482
482
|
value: e,
|
|
483
483
|
onInput: r,
|
|
484
484
|
onChange: n,
|
|
485
485
|
...s
|
|
486
486
|
} = t;
|
|
487
|
-
return
|
|
487
|
+
return Me({
|
|
488
488
|
...s,
|
|
489
489
|
maxFiles: 1,
|
|
490
|
-
value: u.map(e, (
|
|
491
|
-
onChange: (
|
|
492
|
-
n?.(
|
|
490
|
+
value: u.map(e, (c) => c == null ? [] : [c]),
|
|
491
|
+
onChange: (c) => {
|
|
492
|
+
n?.(c[0]);
|
|
493
493
|
},
|
|
494
|
-
onInput: (
|
|
495
|
-
r?.(
|
|
494
|
+
onInput: (c) => {
|
|
495
|
+
r?.(c[0]);
|
|
496
496
|
}
|
|
497
497
|
});
|
|
498
498
|
}
|
|
@@ -506,7 +506,7 @@ function It(t, e, r) {
|
|
|
506
506
|
Math.max(0, Math.min(255, e))
|
|
507
507
|
)}${n(Math.max(0, Math.min(255, r)))}`;
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function De(t) {
|
|
510
510
|
if (!t) return [0, 0, 0, 1];
|
|
511
511
|
const r = t.trim().match(
|
|
512
512
|
/^#?([a-fA-F0-9]{3,4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$/
|
|
@@ -548,35 +548,35 @@ function Se(t) {
|
|
|
548
548
|
);
|
|
549
549
|
if (s)
|
|
550
550
|
return [parseInt(s[1], 10), parseInt(s[2], 10), parseInt(s[3], 10), 1];
|
|
551
|
-
const
|
|
551
|
+
const c = t.match(
|
|
552
552
|
/^hsla?\(\s*([+-]?[\d.]+)(?:deg)?\s*[ ,]?\s*([\d.]+)%\s*[ ,]?\s*([\d.]+)%\s*(?:[/,]\s*(\d?(?:\.\d+)?))?\s*\)$/i
|
|
553
553
|
);
|
|
554
|
-
if (
|
|
555
|
-
const f = parseFloat(
|
|
554
|
+
if (c) {
|
|
555
|
+
const f = parseFloat(c[1]), v = parseFloat(c[2]), d = parseFloat(c[3]), x = c[4] != null ? parseFloat(c[4]) : 1, [h, y, g] = Wt(f, v / 100, d / 100);
|
|
556
556
|
return [h, y, g, x];
|
|
557
557
|
}
|
|
558
558
|
const l = t.match(
|
|
559
559
|
/^hwb\(\s*([+-]?[\d.]+)(?:deg)?\s*[, ]\s*([\d.]+)%\s*[, ]\s*([\d.]+)%\s*(?:[/]\s*(\d?(?:\.\d+)?))?\s*\)$/i
|
|
560
560
|
);
|
|
561
561
|
if (l) {
|
|
562
|
-
const f = parseFloat(l[1]), v = parseFloat(l[2]) / 100, d = parseFloat(l[3]) / 100, x = l[4] != null ? parseFloat(l[4]) : 1, [h, y, g] =
|
|
562
|
+
const f = parseFloat(l[1]), v = parseFloat(l[2]) / 100, d = parseFloat(l[3]) / 100, x = l[4] != null ? parseFloat(l[4]) : 1, [h, y, g] = Ae(f, v, d);
|
|
563
563
|
return [h, y, g, x];
|
|
564
564
|
}
|
|
565
565
|
const i = t.match(
|
|
566
566
|
/^oklch\(\s*([+-]?[\d.]+%?)\s+([\d.]+)\s+([+-]?[\d.]+)(?:deg)?(?:\s*\/\s*(\d?(?:\.\d+)?))?\s*\)$/i
|
|
567
567
|
);
|
|
568
568
|
if (i) {
|
|
569
|
-
const f = i[1], v = parseFloat(i[2]), d = parseFloat(i[3]), x = i[4] != null ? parseFloat(i[4]) : 1, h = f.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(f) / 100)) : Math.max(0, Math.min(1, parseFloat(f))), [y, g, b] =
|
|
569
|
+
const f = i[1], v = parseFloat(i[2]), d = parseFloat(i[3]), x = i[4] != null ? parseFloat(i[4]) : 1, h = f.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(f) / 100)) : Math.max(0, Math.min(1, parseFloat(f))), [y, g, b] = Be(h, v, d);
|
|
570
570
|
return [y, g, b, x];
|
|
571
571
|
}
|
|
572
|
-
const [
|
|
573
|
-
return [
|
|
572
|
+
const [o, p, m] = kt(t);
|
|
573
|
+
return [o, p, m, 1];
|
|
574
574
|
}
|
|
575
|
-
const
|
|
575
|
+
const Se = (t, e, r, n) => `rgba(${Math.round(t)}, ${Math.round(e)}, ${Math.round(r)}, ${Math.max(
|
|
576
576
|
0,
|
|
577
577
|
Math.min(1, Math.round(n * 100) / 100)
|
|
578
578
|
)})`;
|
|
579
|
-
function
|
|
579
|
+
function Te(t) {
|
|
580
580
|
let e = t + 1831565813;
|
|
581
581
|
return function() {
|
|
582
582
|
return e = Math.imul(e ^ e >>> 15, e | 1), e ^= e + Math.imul(e ^ e >>> 7, e | 61), ((e ^ e >>> 14) >>> 0) / 4294967296;
|
|
@@ -584,44 +584,44 @@ function Ae(t) {
|
|
|
584
584
|
}
|
|
585
585
|
function Wt(t, e, r) {
|
|
586
586
|
t = (t % 360 + 360) % 360;
|
|
587
|
-
const n = (1 - Math.abs(2 * r - 1)) * e, s = n * (1 - Math.abs(t / 60 % 2 - 1)),
|
|
588
|
-
let l = 0, i = 0,
|
|
589
|
-
return 0 <= t && t < 60 ? [l, i,
|
|
590
|
-
Math.round((l +
|
|
591
|
-
Math.round((i +
|
|
592
|
-
Math.round((
|
|
587
|
+
const n = (1 - Math.abs(2 * r - 1)) * e, s = n * (1 - Math.abs(t / 60 % 2 - 1)), c = r - n / 2;
|
|
588
|
+
let l = 0, i = 0, o = 0;
|
|
589
|
+
return 0 <= t && t < 60 ? [l, i, o] = [n, s, 0] : 60 <= t && t < 120 ? [l, i, o] = [s, n, 0] : 120 <= t && t < 180 ? [l, i, o] = [0, n, s] : 180 <= t && t < 240 ? [l, i, o] = [0, s, n] : 240 <= t && t < 300 ? [l, i, o] = [s, 0, n] : [l, i, o] = [n, 0, s], [
|
|
590
|
+
Math.round((l + c) * 255),
|
|
591
|
+
Math.round((i + c) * 255),
|
|
592
|
+
Math.round((o + c) * 255)
|
|
593
593
|
];
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function Ae(t, e, r) {
|
|
596
596
|
t = (t % 360 + 360) % 360;
|
|
597
597
|
const n = e + r;
|
|
598
598
|
n > 1 && (e /= n, r /= n);
|
|
599
|
-
const [s,
|
|
600
|
-
return [Math.round(
|
|
599
|
+
const [s, c, l] = Wt(t, 1, 0.5).map((f) => f / 255), i = 1 - e - r, o = s * i + e, p = c * i + e, m = l * i + e;
|
|
600
|
+
return [Math.round(o * 255), Math.round(p * 255), Math.round(m * 255)];
|
|
601
601
|
}
|
|
602
602
|
function Ct(t, e, r) {
|
|
603
603
|
t /= 255, e /= 255, r /= 255;
|
|
604
604
|
const n = Math.max(t, e, r), s = Math.min(t, e, r);
|
|
605
|
-
let
|
|
606
|
-
const i = (n + s) / 2,
|
|
607
|
-
if (
|
|
608
|
-
switch (l = i > 0.5 ?
|
|
605
|
+
let c = 0, l = 0;
|
|
606
|
+
const i = (n + s) / 2, o = n - s;
|
|
607
|
+
if (o !== 0) {
|
|
608
|
+
switch (l = i > 0.5 ? o / (2 - n - s) : o / (n + s), n) {
|
|
609
609
|
case t:
|
|
610
|
-
|
|
610
|
+
c = (e - r) / o + (e < r ? 6 : 0);
|
|
611
611
|
break;
|
|
612
612
|
case e:
|
|
613
|
-
|
|
613
|
+
c = (r - t) / o + 2;
|
|
614
614
|
break;
|
|
615
615
|
default:
|
|
616
|
-
|
|
616
|
+
c = (t - e) / o + 4;
|
|
617
617
|
}
|
|
618
|
-
|
|
618
|
+
c *= 60;
|
|
619
619
|
}
|
|
620
|
-
return [Math.round(
|
|
620
|
+
return [Math.round(c), Math.round(l * 100), Math.round(i * 100)];
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
const [n] = Ct(t, e, r), s = t / 255,
|
|
624
|
-
return [n, Math.round(i * 100), Math.round(
|
|
622
|
+
function Fe(t, e, r) {
|
|
623
|
+
const [n] = Ct(t, e, r), s = t / 255, c = e / 255, l = r / 255, i = Math.min(s, c, l), o = 1 - Math.max(s, c, l);
|
|
624
|
+
return [n, Math.round(i * 100), Math.round(o * 100)];
|
|
625
625
|
}
|
|
626
626
|
function vt(t) {
|
|
627
627
|
const e = t / 255;
|
|
@@ -631,20 +631,20 @@ function xt(t) {
|
|
|
631
631
|
const e = t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 0.4166666666666667) - 0.055;
|
|
632
632
|
return Math.round(Math.max(0, Math.min(1, e)) * 255);
|
|
633
633
|
}
|
|
634
|
-
function
|
|
635
|
-
const n = r * Math.PI / 180, s = Math.cos(n) * e,
|
|
634
|
+
function Be(t, e, r) {
|
|
635
|
+
const n = r * Math.PI / 180, s = Math.cos(n) * e, c = Math.sin(n) * e, l = t + 0.3963377774 * s + 0.2158037573 * c, i = t - 0.1055613458 * s - 0.0638541728 * c, o = t - 0.0894841775 * s - 1.291485548 * c, p = l * l * l, m = i * i * i, f = o * o * o, v = 4.0767416621 * p - 3.3077115913 * m + 0.2309699292 * f, d = -1.2684380046 * p + 2.6097574011 * m - 0.3413193965 * f, x = -0.0041960863 * p - 0.7034186147 * m + 1.707614701 * f;
|
|
636
636
|
return [xt(v), xt(d), xt(x)];
|
|
637
637
|
}
|
|
638
638
|
function Ve(t, e, r) {
|
|
639
|
-
const n = vt(t), s = vt(e),
|
|
639
|
+
const n = vt(t), s = vt(e), c = vt(r), l = 0.4122214708 * n + 0.5363325363 * s + 0.0514459929 * c, i = 0.2119034982 * n + 0.6806995451 * s + 0.1073969566 * c, o = 0.0883024619 * n + 0.2817188376 * s + 0.6299787005 * c, p = Math.cbrt(l), m = Math.cbrt(i), f = Math.cbrt(o), v = 0.2104542553 * p + 0.793617785 * m - 0.0040720468 * f, d = 1.9779984951 * p - 2.428592205 * m + 0.4505937099 * f, x = 0.0259040371 * p + 0.7827717662 * m - 0.808675766 * f, h = Math.sqrt(d * d + x * x);
|
|
640
640
|
let y = Math.atan2(x, d) * 180 / Math.PI;
|
|
641
641
|
return y < 0 && (y += 360), [v, h, y];
|
|
642
642
|
}
|
|
643
|
-
function at(t, e, r, n, s,
|
|
643
|
+
function at(t, e, r, n, s, c) {
|
|
644
644
|
switch (s) {
|
|
645
645
|
case "hex":
|
|
646
|
-
if (
|
|
647
|
-
const l = (
|
|
646
|
+
if (c) {
|
|
647
|
+
const l = (o) => o.toString(16).padStart(2, "0"), i = Math.max(0, Math.min(255, Math.round(n * 255)));
|
|
648
648
|
return `#${l(t)}${l(e)}${l(r)}${l(i)}`;
|
|
649
649
|
}
|
|
650
650
|
return It(t, e, r);
|
|
@@ -653,30 +653,30 @@ function at(t, e, r, n, s, o) {
|
|
|
653
653
|
case "rgba":
|
|
654
654
|
return `rgba(${t}, ${e}, ${r}, ${Math.round(n * 100) / 100})`;
|
|
655
655
|
case "hsl": {
|
|
656
|
-
const [l, i,
|
|
657
|
-
return `hsl(${l}, ${i}%, ${
|
|
656
|
+
const [l, i, o] = Ct(t, e, r);
|
|
657
|
+
return `hsl(${l}, ${i}%, ${o}%)`;
|
|
658
658
|
}
|
|
659
659
|
case "hsla": {
|
|
660
|
-
const [l, i,
|
|
661
|
-
return `hsla(${l}, ${i}%, ${
|
|
660
|
+
const [l, i, o] = Ct(t, e, r);
|
|
661
|
+
return `hsla(${l}, ${i}%, ${o}%, ${Math.round(n * 100) / 100})`;
|
|
662
662
|
}
|
|
663
663
|
case "hwb": {
|
|
664
|
-
const [l, i,
|
|
665
|
-
return n < 1 ? `hwb(${l} ${i}% ${
|
|
664
|
+
const [l, i, o] = Fe(t, e, r);
|
|
665
|
+
return n < 1 ? `hwb(${l} ${i}% ${o}% / ${Math.round(n * 100) / 100})` : `hwb(${l} ${i}% ${o}%)`;
|
|
666
666
|
}
|
|
667
667
|
case "oklch": {
|
|
668
|
-
const [l, i,
|
|
669
|
-
return
|
|
668
|
+
const [l, i, o] = Ve(t, e, r), p = (Math.round(l * 1e3) / 1e3).toFixed(3), m = (Math.round(i * 1e3) / 1e3).toFixed(3), f = (Math.round(o * 10) / 10).toFixed(1), v = Math.round(n * 100) / 100;
|
|
669
|
+
return c || n < 1 ? `oklch(${p} ${m} ${f} / ${v})` : `oklch(${p} ${m} ${f})`;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
673
|
function ot(t, e) {
|
|
674
674
|
return e ? t === "rgb" ? "rgba" : t === "hsl" ? "hsla" : t : t === "rgba" ? "rgb" : t === "hsla" ? "hsl" : t;
|
|
675
675
|
}
|
|
676
|
-
function
|
|
677
|
-
const [r, n, s] = t,
|
|
676
|
+
function Le(t, e) {
|
|
677
|
+
const [r, n, s] = t, c = r << 16 ^ n << 8 ^ s, l = Te(c), i = 6 + Math.floor(l() * 5), o = 0.18 + l() * 0.06, p = [];
|
|
678
678
|
for (let d = 0; d < i; d++) {
|
|
679
|
-
const x = d / i * Math.PI * 2, h = e * (1 + (l() * 2 - 1) *
|
|
679
|
+
const x = d / i * Math.PI * 2, h = e * (1 + (l() * 2 - 1) * o), y = Math.cos(x) * h, g = Math.sin(x) * h;
|
|
680
680
|
p.push({ x: y, y: g });
|
|
681
681
|
}
|
|
682
682
|
const m = (p[0].x + p[i - 1].x) / 2, f = (p[0].y + p[i - 1].y) / 2;
|
|
@@ -687,14 +687,14 @@ function Ee(t, e) {
|
|
|
687
687
|
}
|
|
688
688
|
return v += " Z", v;
|
|
689
689
|
}
|
|
690
|
-
const
|
|
691
|
-
const { value: e, onBlur: r, onChange: n, onInput: s, displayValue:
|
|
690
|
+
const mn = (t) => {
|
|
691
|
+
const { value: e, onBlur: r, onChange: n, onInput: s, displayValue: c, size: l, withAlpha: i } = t, o = u.map(l ?? 32, (w) => w), p = u.map(e, (w) => De(w ?? "#000000")), m = u.map(
|
|
692
692
|
p,
|
|
693
693
|
([w, $, M]) => [w, $, M]
|
|
694
694
|
), f = u.map(p, ([, , , w]) => w), v = et(u.get(f) ?? 1), d = u.map(i ?? !1, (w) => w), x = u.map(
|
|
695
695
|
t.colorTextFormat ?? "rgb",
|
|
696
696
|
(w) => w
|
|
697
|
-
), h =
|
|
697
|
+
), h = L(
|
|
698
698
|
m,
|
|
699
699
|
v,
|
|
700
700
|
x,
|
|
@@ -704,15 +704,15 @@ const hn = (t) => {
|
|
|
704
704
|
), y = u.map(
|
|
705
705
|
t.colorTextFormat ?? "hex",
|
|
706
706
|
(w) => w
|
|
707
|
-
), g = u.map(
|
|
707
|
+
), g = u.map(o, (w) => `${-w / 2} ${-w / 2} ${w} ${w}`), b = L(
|
|
708
708
|
m,
|
|
709
|
-
|
|
710
|
-
)((w, $) =>
|
|
709
|
+
o
|
|
710
|
+
)((w, $) => Le(w, $ / 2)), D = L(
|
|
711
711
|
m,
|
|
712
712
|
v,
|
|
713
713
|
d
|
|
714
714
|
)(
|
|
715
|
-
([w, $, M], A, F) => F || A < 1 ?
|
|
715
|
+
([w, $, M], A, F) => F || A < 1 ? Se(w, $, M, A) : It(w, $, M)
|
|
716
716
|
), k = I.div(
|
|
717
717
|
a.class("bc-color-input__control"),
|
|
718
718
|
a.class(
|
|
@@ -722,7 +722,7 @@ const hn = (t) => {
|
|
|
722
722
|
)
|
|
723
723
|
),
|
|
724
724
|
a.style(
|
|
725
|
-
|
|
725
|
+
L(o)((w) => `min-width:${w + 2}px;height:${w + 2}px`)
|
|
726
726
|
),
|
|
727
727
|
// The SVG blob preview
|
|
728
728
|
At.svg(
|
|
@@ -794,45 +794,45 @@ const hn = (t) => {
|
|
|
794
794
|
growInput: !1,
|
|
795
795
|
input: k,
|
|
796
796
|
// If caller provided an `after`, append RGB before it
|
|
797
|
-
after:
|
|
797
|
+
after: V(
|
|
798
798
|
E(
|
|
799
|
-
|
|
799
|
+
c ?? !1,
|
|
800
800
|
() => I.span(a.class("bc-color-input__rgb"), h)
|
|
801
801
|
),
|
|
802
802
|
_,
|
|
803
803
|
t.after
|
|
804
804
|
)
|
|
805
805
|
});
|
|
806
|
-
}, Dt = "$$tts-exp-",
|
|
806
|
+
}, Dt = "$$tts-exp-", Ee = (t, e) => it((r) => {
|
|
807
807
|
const n = `${Dt}${t}`;
|
|
808
808
|
return W(u.on(e, (s) => Reflect.set(r, n, s)));
|
|
809
|
-
}),
|
|
809
|
+
}), hn = (t, e) => {
|
|
810
810
|
const r = `${Dt}${t}`;
|
|
811
811
|
return (n) => {
|
|
812
812
|
e(Reflect.get(n.target, r));
|
|
813
813
|
};
|
|
814
|
-
},
|
|
814
|
+
}, Ue = (t, e) => {
|
|
815
815
|
const r = `${Dt}${t}`;
|
|
816
816
|
return (n) => {
|
|
817
|
-
const s = n.target,
|
|
817
|
+
const s = n.target, c = s.selectedIndex, l = s.options[c];
|
|
818
818
|
e(Reflect.get(l, r));
|
|
819
819
|
};
|
|
820
820
|
};
|
|
821
|
-
function
|
|
821
|
+
function Ne(t, e, r) {
|
|
822
822
|
const n = ["bc-card"];
|
|
823
823
|
return t !== "default" && n.push(`bc-card--${t}`), e !== "md" && n.push(`bc-card--padding-${e}`), r !== "lg" && n.push(`bc-card--rounded-${r}`), n.join(" ");
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function gn({ variant: t = "default", size: e = "md", roundedness: r = "lg" } = {}, ...n) {
|
|
826
826
|
return I.div(
|
|
827
827
|
a.class(
|
|
828
|
-
|
|
828
|
+
L(
|
|
829
829
|
t,
|
|
830
830
|
e,
|
|
831
831
|
r
|
|
832
832
|
)(
|
|
833
|
-
(s,
|
|
833
|
+
(s, c, l) => Ne(
|
|
834
834
|
s ?? "default",
|
|
835
|
-
|
|
835
|
+
c ?? "md",
|
|
836
836
|
l ?? "lg"
|
|
837
837
|
)
|
|
838
838
|
)
|
|
@@ -843,50 +843,50 @@ function bn({ variant: t = "default", size: e = "md", roundedness: r = "lg" } =
|
|
|
843
843
|
function pt(...t) {
|
|
844
844
|
return I.div(a.class("bc-group"), ...t);
|
|
845
845
|
}
|
|
846
|
-
const
|
|
846
|
+
const bn = ({
|
|
847
847
|
startEditing: t,
|
|
848
848
|
value: e,
|
|
849
849
|
onChange: r,
|
|
850
850
|
placeholder: n,
|
|
851
851
|
disabled: s
|
|
852
852
|
}) => {
|
|
853
|
-
const
|
|
853
|
+
const c = u.deriveProp(t ?? !1), l = et(!1), i = u.map(s ?? !1, (o) => o);
|
|
854
854
|
return I.div(
|
|
855
855
|
a.class("bc-editable-text"),
|
|
856
856
|
a.class(
|
|
857
857
|
u.map(
|
|
858
858
|
i,
|
|
859
|
-
(
|
|
859
|
+
(o) => o ? "bc-editable-text--disabled" : ""
|
|
860
860
|
)
|
|
861
861
|
),
|
|
862
862
|
N.disabled(i),
|
|
863
863
|
E(
|
|
864
|
-
|
|
864
|
+
c,
|
|
865
865
|
() => I.input(
|
|
866
866
|
a.placeholder(n),
|
|
867
867
|
a.value(e),
|
|
868
868
|
a.class("bc-editable-text__input"),
|
|
869
869
|
le(),
|
|
870
|
-
C.keydown((
|
|
871
|
-
|
|
870
|
+
C.keydown((o) => {
|
|
871
|
+
o.key === "Enter" ? c.set(!1) : o.key === "Escape" && (l.set(!0), c.set(!1));
|
|
872
872
|
}),
|
|
873
873
|
C.blur(
|
|
874
|
-
P((
|
|
875
|
-
if (
|
|
874
|
+
P((o) => {
|
|
875
|
+
if (c.set(!1), l.value) {
|
|
876
876
|
l.set(!1);
|
|
877
877
|
return;
|
|
878
878
|
}
|
|
879
|
-
r(
|
|
879
|
+
r(o);
|
|
880
880
|
})
|
|
881
881
|
)
|
|
882
882
|
),
|
|
883
883
|
() => I.span(
|
|
884
884
|
C.click(() => {
|
|
885
|
-
u.get(i) ||
|
|
885
|
+
u.get(i) || c.set(!0);
|
|
886
886
|
}),
|
|
887
887
|
a.class("bc-editable-text__display"),
|
|
888
888
|
E(
|
|
889
|
-
u.map(e, (
|
|
889
|
+
u.map(e, (o) => o != null && o.trim() !== ""),
|
|
890
890
|
() => I.span(a.class("bc-editable-text__text"), e),
|
|
891
891
|
() => I.span(
|
|
892
892
|
a.class("bc-editable-text__placeholder"),
|
|
@@ -894,12 +894,12 @@ const vn = ({
|
|
|
894
894
|
)
|
|
895
895
|
),
|
|
896
896
|
E(
|
|
897
|
-
u.map(i, (
|
|
897
|
+
u.map(i, (o) => !o),
|
|
898
898
|
() => I.button(
|
|
899
899
|
a.type("button"),
|
|
900
900
|
a.class("bc-editable-text__edit-button"),
|
|
901
|
-
H(X, (
|
|
902
|
-
C.click(() =>
|
|
901
|
+
H(X, (o) => N.label(o.$.editLabel)),
|
|
902
|
+
C.click(() => c.set(!0)),
|
|
903
903
|
z({ icon: "line-md/pencil", color: "neutral" })
|
|
904
904
|
)
|
|
905
905
|
)
|
|
@@ -910,14 +910,14 @@ const vn = ({
|
|
|
910
910
|
t,
|
|
911
911
|
(n) => Kt(n, {
|
|
912
912
|
value: (s) => {
|
|
913
|
-
const
|
|
913
|
+
const c = L(
|
|
914
914
|
s,
|
|
915
915
|
r
|
|
916
916
|
)((l, i) => e(l.value, i));
|
|
917
917
|
return I.option(
|
|
918
|
-
W(
|
|
919
|
-
a.selected(
|
|
920
|
-
|
|
918
|
+
W(c.dispose),
|
|
919
|
+
a.selected(c),
|
|
920
|
+
Ee("value", s.$.value),
|
|
921
921
|
s.$.label
|
|
922
922
|
);
|
|
923
923
|
},
|
|
@@ -925,8 +925,8 @@ const vn = ({
|
|
|
925
925
|
a.label(s.$.group),
|
|
926
926
|
ft(
|
|
927
927
|
s.$.options,
|
|
928
|
-
(
|
|
929
|
-
|
|
928
|
+
(c) => Zt(
|
|
929
|
+
c,
|
|
930
930
|
e,
|
|
931
931
|
r
|
|
932
932
|
)
|
|
@@ -934,21 +934,21 @@ const vn = ({
|
|
|
934
934
|
),
|
|
935
935
|
break: () => I.hr()
|
|
936
936
|
})
|
|
937
|
-
),
|
|
937
|
+
), ze = (t) => {
|
|
938
938
|
const {
|
|
939
939
|
value: e,
|
|
940
940
|
onBlur: r,
|
|
941
941
|
onChange: n,
|
|
942
942
|
options: s,
|
|
943
|
-
unselectedLabel:
|
|
943
|
+
unselectedLabel: c,
|
|
944
944
|
equality: l = (p, m) => p === m,
|
|
945
945
|
after: i
|
|
946
946
|
} = t;
|
|
947
|
-
let
|
|
947
|
+
let o;
|
|
948
948
|
return O(
|
|
949
949
|
{
|
|
950
950
|
...t,
|
|
951
|
-
after:
|
|
951
|
+
after: V(
|
|
952
952
|
z({
|
|
953
953
|
icon: "ph:caret-down-bold",
|
|
954
954
|
color: "neutral",
|
|
@@ -958,10 +958,10 @@ const vn = ({
|
|
|
958
958
|
),
|
|
959
959
|
input: I.select(
|
|
960
960
|
it((p) => {
|
|
961
|
-
|
|
961
|
+
o = p;
|
|
962
962
|
const m = new MutationObserver((f) => {
|
|
963
963
|
const { removedNodes: v } = f[0];
|
|
964
|
-
v.length > 0 && (
|
|
964
|
+
v.length > 0 && (o.selectedIndex = 0);
|
|
965
965
|
});
|
|
966
966
|
return m.observe(p, { childList: !0 }), W(() => m.disconnect());
|
|
967
967
|
}),
|
|
@@ -971,49 +971,49 @@ const vn = ({
|
|
|
971
971
|
X,
|
|
972
972
|
(p) => I.option(
|
|
973
973
|
a.hidden("hidden"),
|
|
974
|
-
Qt(
|
|
974
|
+
Qt(c, p.$.selectOne)
|
|
975
975
|
)
|
|
976
976
|
),
|
|
977
977
|
ft(s, (p) => Zt(p, l, e)),
|
|
978
978
|
r != null ? C.blur(r) : T,
|
|
979
|
-
n != null ? C.change(
|
|
979
|
+
n != null ? C.change(Ue("value", (p) => n(p))) : T
|
|
980
980
|
)
|
|
981
981
|
},
|
|
982
982
|
C.click(() => {
|
|
983
|
-
|
|
983
|
+
o?.focus(), typeof o?.showPicker == "function" && o.showPicker();
|
|
984
984
|
})
|
|
985
985
|
);
|
|
986
986
|
};
|
|
987
|
-
function
|
|
987
|
+
function Re(t) {
|
|
988
988
|
const { controller: e, onChange: r, onBlur: n, ...s } = t;
|
|
989
|
-
return
|
|
989
|
+
return ze({
|
|
990
990
|
...s,
|
|
991
991
|
value: e.signal,
|
|
992
992
|
onChange: pe(e, r),
|
|
993
993
|
onBlur: ue(e, n)
|
|
994
994
|
});
|
|
995
995
|
}
|
|
996
|
-
function
|
|
996
|
+
function vn(t) {
|
|
997
997
|
return Ht({
|
|
998
998
|
...t,
|
|
999
|
-
content:
|
|
999
|
+
content: Re(t)
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function Oe(t, e, r) {
|
|
1003
1003
|
const n = t.length.map((s) => s);
|
|
1004
|
-
return
|
|
1004
|
+
return V(
|
|
1005
1005
|
W(() => n.dispose()),
|
|
1006
1006
|
Pt(
|
|
1007
1007
|
n,
|
|
1008
1008
|
(s) => {
|
|
1009
|
-
const
|
|
1010
|
-
return
|
|
1009
|
+
const c = t.item(s.index), l = [];
|
|
1010
|
+
return V(
|
|
1011
1011
|
W(() => {
|
|
1012
|
-
|
|
1012
|
+
c.dispose(), l.forEach((i) => i());
|
|
1013
1013
|
}),
|
|
1014
1014
|
e({
|
|
1015
1015
|
list: t,
|
|
1016
|
-
item:
|
|
1016
|
+
item: c,
|
|
1017
1017
|
position: s,
|
|
1018
1018
|
remove: () => t.removeAt(s.index),
|
|
1019
1019
|
move: (i) => {
|
|
@@ -1034,7 +1034,7 @@ function Pe(t, e, r) {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
},
|
|
1036
1036
|
canMove: (i) => {
|
|
1037
|
-
const
|
|
1037
|
+
const o = (() => {
|
|
1038
1038
|
switch (i) {
|
|
1039
1039
|
case "up":
|
|
1040
1040
|
return Ft(s.index > 0);
|
|
@@ -1042,10 +1042,10 @@ function Pe(t, e, r) {
|
|
|
1042
1042
|
return t.length.map((p) => s.index < p - 1);
|
|
1043
1043
|
}
|
|
1044
1044
|
})();
|
|
1045
|
-
return l.push(() =>
|
|
1045
|
+
return l.push(() => o.dispose()), o;
|
|
1046
1046
|
},
|
|
1047
1047
|
cannotMove: (i) => {
|
|
1048
|
-
const
|
|
1048
|
+
const o = (() => {
|
|
1049
1049
|
switch (i) {
|
|
1050
1050
|
case "up":
|
|
1051
1051
|
return Ft(s.index === 0);
|
|
@@ -1053,7 +1053,7 @@ function Pe(t, e, r) {
|
|
|
1053
1053
|
return t.length.map((p) => s.index === p - 1);
|
|
1054
1054
|
}
|
|
1055
1055
|
})();
|
|
1056
|
-
return l.push(() =>
|
|
1056
|
+
return l.push(() => o.dispose()), o;
|
|
1057
1057
|
}
|
|
1058
1058
|
})
|
|
1059
1059
|
);
|
|
@@ -1066,25 +1066,25 @@ const Nt = {
|
|
|
1066
1066
|
9: { pattern: /^[0-9]$/ },
|
|
1067
1067
|
A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
|
|
1068
1068
|
"*": { pattern: /^.$/ }
|
|
1069
|
-
},
|
|
1069
|
+
}, Pe = (t) => t instanceof RegExp;
|
|
1070
1070
|
function Yt(t, e, r) {
|
|
1071
1071
|
if (t == null) return [];
|
|
1072
1072
|
const n = r ? { ...Nt, ...e } : e ?? Nt, s = (l, i) => {
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1075
|
-
},
|
|
1073
|
+
const o = n[i];
|
|
1074
|
+
o ? l.push({ type: "pattern", name: i, ...o }) : l.push({ type: "literal", char: i });
|
|
1075
|
+
}, c = [];
|
|
1076
1076
|
if (typeof t == "string") {
|
|
1077
|
-
for (const l of t) s(
|
|
1078
|
-
return
|
|
1077
|
+
for (const l of t) s(c, l);
|
|
1078
|
+
return c;
|
|
1079
1079
|
}
|
|
1080
1080
|
for (const l of t)
|
|
1081
1081
|
if (typeof l == "string")
|
|
1082
|
-
if (l.length <= 1) s(
|
|
1083
|
-
else for (const i of l) s(
|
|
1084
|
-
else
|
|
1085
|
-
return
|
|
1082
|
+
if (l.length <= 1) s(c, l);
|
|
1083
|
+
else for (const i of l) s(c, i);
|
|
1084
|
+
else Pe(l) ? c.push({ type: "pattern", pattern: l }) : typeof l == "object" && l && c.push(l);
|
|
1085
|
+
return c;
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1087
|
+
function je(t, e) {
|
|
1088
1088
|
return (r) => {
|
|
1089
1089
|
switch (t) {
|
|
1090
1090
|
case "digits":
|
|
@@ -1100,17 +1100,17 @@ function He(t, e) {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
};
|
|
1102
1102
|
}
|
|
1103
|
-
function zt(t, e, r, n, s,
|
|
1103
|
+
function zt(t, e, r, n, s, c) {
|
|
1104
1104
|
const l = {
|
|
1105
1105
|
raw: t,
|
|
1106
1106
|
previousConformed: e,
|
|
1107
1107
|
cursor: s ?? t.length,
|
|
1108
1108
|
completed: !1
|
|
1109
|
-
}, i = n.definitions ?? {},
|
|
1110
|
-
|
|
1109
|
+
}, i = n.definitions ?? {}, o = typeof r == "function" ? r(t, l) : r, p = Yt(
|
|
1110
|
+
o,
|
|
1111
1111
|
i,
|
|
1112
1112
|
n.useDefaultDefinitions ?? !0
|
|
1113
|
-
), m =
|
|
1113
|
+
), m = je(n.allowMode, n.allow), f = /* @__PURE__ */ new Set();
|
|
1114
1114
|
for (const S of p) S.type === "literal" && f.add(S.char);
|
|
1115
1115
|
if (n.prefix) for (const S of n.prefix) f.add(S);
|
|
1116
1116
|
if (n.suffix) for (const S of n.suffix) f.add(S);
|
|
@@ -1145,7 +1145,7 @@ function zt(t, e, r, n, s, o) {
|
|
|
1145
1145
|
let w = (n.prefix ?? "").length;
|
|
1146
1146
|
if (b >= 0) {
|
|
1147
1147
|
let S = b + 1;
|
|
1148
|
-
if ((
|
|
1148
|
+
if ((c?.policy ?? "smart") !== "sticky")
|
|
1149
1149
|
for (; S < x.length && x[S].kind === "literal"; ) S++;
|
|
1150
1150
|
w += S;
|
|
1151
1151
|
}
|
|
@@ -1153,7 +1153,7 @@ function zt(t, e, r, n, s, o) {
|
|
|
1153
1153
|
let A, F = w;
|
|
1154
1154
|
return M === !1 ? (A = e, F = e.length) : typeof M == "string" ? (A = M, F = M.length) : typeof M == "object" && M ? (A = M.value, F = M.cursor ?? M.value.length) : A = k, { value: A, cursor: F, completed: $ };
|
|
1155
1155
|
}
|
|
1156
|
-
function
|
|
1156
|
+
function He(t, e) {
|
|
1157
1157
|
const r = e?.strategy ?? "none";
|
|
1158
1158
|
return r === "custom" && e?.unmask ? e.unmask(t) : r === "strip" ? t.replace(/[^A-Za-z0-9]/g, "") : t;
|
|
1159
1159
|
}
|
|
@@ -1163,10 +1163,10 @@ const Xt = (t) => {
|
|
|
1163
1163
|
onBlur: r,
|
|
1164
1164
|
onChange: n,
|
|
1165
1165
|
onInput: s,
|
|
1166
|
-
onAccept:
|
|
1166
|
+
onAccept: c,
|
|
1167
1167
|
onComplete: l,
|
|
1168
1168
|
mask: i,
|
|
1169
|
-
definitions:
|
|
1169
|
+
definitions: o,
|
|
1170
1170
|
useDefaultDefinitions: p,
|
|
1171
1171
|
extraLiterals: m,
|
|
1172
1172
|
prefix: f,
|
|
@@ -1179,10 +1179,10 @@ const Xt = (t) => {
|
|
|
1179
1179
|
allow: b,
|
|
1180
1180
|
placeholder: D,
|
|
1181
1181
|
placeholderOptions: k
|
|
1182
|
-
} = t, _ =
|
|
1182
|
+
} = t, _ = L(
|
|
1183
1183
|
e,
|
|
1184
1184
|
i,
|
|
1185
|
-
|
|
1185
|
+
o,
|
|
1186
1186
|
p,
|
|
1187
1187
|
m,
|
|
1188
1188
|
f,
|
|
@@ -1206,7 +1206,7 @@ const Xt = (t) => {
|
|
|
1206
1206
|
prefix: B,
|
|
1207
1207
|
suffix: R
|
|
1208
1208
|
}).value : $ ?? ""), w = ($, M) => {
|
|
1209
|
-
const A = $.value ?? "", F = u.get(e) ?? "", S = i != null ? u.get(i) : null, B =
|
|
1209
|
+
const A = $.value ?? "", F = u.get(e) ?? "", S = i != null ? u.get(i) : null, B = o != null ? u.get(o) : void 0, R = 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
1210
|
value: J,
|
|
1211
1211
|
cursor: mt,
|
|
1212
1212
|
completed: St
|
|
@@ -1237,8 +1237,8 @@ const Xt = (t) => {
|
|
|
1237
1237
|
} catch {
|
|
1238
1238
|
}
|
|
1239
1239
|
}
|
|
1240
|
-
const Tt =
|
|
1241
|
-
|
|
1240
|
+
const Tt = He(J, Q);
|
|
1241
|
+
c?.({
|
|
1242
1242
|
raw: Tt,
|
|
1243
1243
|
conformed: J,
|
|
1244
1244
|
completed: St,
|
|
@@ -1253,7 +1253,7 @@ const Xt = (t) => {
|
|
|
1253
1253
|
a.class("bc-input"),
|
|
1254
1254
|
r != null ? C.blur(r) : T,
|
|
1255
1255
|
it(
|
|
1256
|
-
($) => $ instanceof HTMLInputElement ?
|
|
1256
|
+
($) => $ instanceof HTMLInputElement ? V(
|
|
1257
1257
|
C.input(() => w($, "input")),
|
|
1258
1258
|
C.change(() => w($, "change")),
|
|
1259
1259
|
C.keydown((M) => {
|
|
@@ -1262,7 +1262,7 @@ const Xt = (t) => {
|
|
|
1262
1262
|
if (F !== S || F <= 0) return;
|
|
1263
1263
|
const B = $.value ?? "", R = i != null ? u.get(i) : null;
|
|
1264
1264
|
if (!R) return;
|
|
1265
|
-
const st =
|
|
1265
|
+
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(
|
|
1266
1266
|
typeof R == "function" ? R(B, {
|
|
1267
1267
|
raw: B,
|
|
1268
1268
|
previousConformed: B,
|
|
@@ -1288,7 +1288,7 @@ const Xt = (t) => {
|
|
|
1288
1288
|
});
|
|
1289
1289
|
};
|
|
1290
1290
|
function Y(t, e, r) {
|
|
1291
|
-
const n = u.map(t, (
|
|
1291
|
+
const n = u.map(t, (c) => c != null), s = yt.clearValue;
|
|
1292
1292
|
return E(
|
|
1293
1293
|
n,
|
|
1294
1294
|
() => I.button(
|
|
@@ -1298,14 +1298,14 @@ function Y(t, e, r) {
|
|
|
1298
1298
|
a.title(s),
|
|
1299
1299
|
a.disabled(e ?? !1),
|
|
1300
1300
|
z({ icon: "mdi:close", size: "sm" }),
|
|
1301
|
-
C.click((
|
|
1302
|
-
|
|
1301
|
+
C.click((c) => {
|
|
1302
|
+
c.preventDefault(), c.stopPropagation(), r?.(null);
|
|
1303
1303
|
})
|
|
1304
1304
|
)
|
|
1305
1305
|
);
|
|
1306
1306
|
}
|
|
1307
|
-
const
|
|
1308
|
-
const { value: e, onBlur: r, onChange: n, after: s, disabled:
|
|
1307
|
+
const xn = (t) => {
|
|
1308
|
+
const { value: e, onBlur: r, onChange: n, after: s, disabled: c } = t, l = Y(e, c, n);
|
|
1309
1309
|
return O({
|
|
1310
1310
|
...t,
|
|
1311
1311
|
input: K.date(
|
|
@@ -1315,61 +1315,61 @@ const wn = (t) => {
|
|
|
1315
1315
|
r != null ? C.blur(P(r)) : T,
|
|
1316
1316
|
n != null ? C.change(te(n)) : T
|
|
1317
1317
|
),
|
|
1318
|
-
after: s != null ?
|
|
1318
|
+
after: s != null ? V(l, s) : l
|
|
1319
1319
|
});
|
|
1320
|
-
},
|
|
1321
|
-
const e = t.getFullYear(), r = t.getMonth() + 1, n = t.getDate(), s = t.getHours(),
|
|
1322
|
-
return `${e}-${r.toString().padStart(2, "0")}-${n.toString().padStart(2, "0")}T${s.toString().padStart(2, "0")}:${
|
|
1323
|
-
},
|
|
1324
|
-
const { value: e, onBlur: r, onChange: n, after: s, disabled:
|
|
1320
|
+
}, We = (t) => {
|
|
1321
|
+
const e = t.getFullYear(), r = t.getMonth() + 1, n = t.getDate(), s = t.getHours(), c = t.getMinutes(), l = t.getSeconds();
|
|
1322
|
+
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
|
+
}, wn = (t) => {
|
|
1324
|
+
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
1325
|
return O({
|
|
1326
1326
|
...t,
|
|
1327
1327
|
input: K["datetime-local"](
|
|
1328
1328
|
j(t),
|
|
1329
|
-
a.value(u.map(l, (
|
|
1329
|
+
a.value(u.map(l, (o) => o ?? null)),
|
|
1330
1330
|
a.class("bc-input"),
|
|
1331
1331
|
r != null ? C.blur(P(r)) : T,
|
|
1332
1332
|
n != null ? C.change(ee(n)) : T
|
|
1333
1333
|
),
|
|
1334
|
-
after: s != null ?
|
|
1334
|
+
after: s != null ? V(i, s) : i
|
|
1335
1335
|
});
|
|
1336
|
-
}, Z = (t) => typeof t == "string" && t.trim() === "" ? null : t, nt = (t) => t ?? "",
|
|
1337
|
-
const { value: e, onBlur: r, onChange: n, onInput: s, after:
|
|
1336
|
+
}, Z = (t) => typeof t == "string" && t.trim() === "" ? null : t, nt = (t) => t ?? "", _n = (t) => {
|
|
1337
|
+
const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
|
|
1338
1338
|
return oe({
|
|
1339
1339
|
...i,
|
|
1340
1340
|
value: u.map(e, nt),
|
|
1341
1341
|
onChange: n != null ? (p) => n(Z(p)) : void 0,
|
|
1342
1342
|
onInput: s != null ? (p) => s(Z(p)) : void 0,
|
|
1343
1343
|
onBlur: r,
|
|
1344
|
-
after:
|
|
1344
|
+
after: c != null ? V(o, c) : o
|
|
1345
1345
|
});
|
|
1346
|
-
},
|
|
1347
|
-
const { value: e, onBlur: r, onChange: n, onInput: s, after:
|
|
1346
|
+
}, yn = (t) => {
|
|
1347
|
+
const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
|
|
1348
1348
|
return de({
|
|
1349
1349
|
...i,
|
|
1350
1350
|
value: u.map(e, nt),
|
|
1351
1351
|
onChange: n != null ? (p) => n(Z(p)) : void 0,
|
|
1352
1352
|
onInput: s != null ? (p) => s(Z(p)) : void 0,
|
|
1353
1353
|
onBlur: r,
|
|
1354
|
-
after:
|
|
1354
|
+
after: c != null ? V(o, c) : o
|
|
1355
1355
|
});
|
|
1356
|
-
},
|
|
1357
|
-
const { value: e, onBlur: r, onChange: n, onInput: s, after:
|
|
1356
|
+
}, $n = (t) => {
|
|
1357
|
+
const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
|
|
1358
1358
|
return fe({
|
|
1359
1359
|
...i,
|
|
1360
1360
|
value: u.map(e, nt),
|
|
1361
1361
|
onChange: n != null ? (p) => n(Z(p)) : void 0,
|
|
1362
1362
|
onInput: s != null ? (p) => s(Z(p)) : void 0,
|
|
1363
1363
|
onBlur: r,
|
|
1364
|
-
after:
|
|
1364
|
+
after: c != null ? V(o, c) : o
|
|
1365
1365
|
});
|
|
1366
|
-
},
|
|
1367
|
-
const { value: e, onBlur: r, onChange: n, onInput: s, rows:
|
|
1366
|
+
}, Ze = (t) => {
|
|
1367
|
+
const { value: e, onBlur: r, onChange: n, onInput: s, rows: c } = t;
|
|
1368
1368
|
return O({
|
|
1369
1369
|
...t,
|
|
1370
1370
|
input: I.textarea(
|
|
1371
1371
|
j(t),
|
|
1372
|
-
a.rows(
|
|
1372
|
+
a.rows(c ?? 3),
|
|
1373
1373
|
a.value(e),
|
|
1374
1374
|
a.class("bc-input"),
|
|
1375
1375
|
r != null ? C.blur(P(r)) : T,
|
|
@@ -1377,25 +1377,25 @@ const wn = (t) => {
|
|
|
1377
1377
|
s != null ? C.input(P(s)) : T
|
|
1378
1378
|
)
|
|
1379
1379
|
});
|
|
1380
|
-
},
|
|
1381
|
-
const { value: e, onBlur: r, onChange: n, onInput: s, after:
|
|
1382
|
-
return
|
|
1380
|
+
}, kn = (t) => {
|
|
1381
|
+
const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
|
|
1382
|
+
return Ze({
|
|
1383
1383
|
...i,
|
|
1384
1384
|
value: u.map(e, nt),
|
|
1385
1385
|
onChange: n != null ? (p) => n(Z(p)) : void 0,
|
|
1386
1386
|
onInput: s != null ? (p) => s(Z(p)) : void 0,
|
|
1387
1387
|
onBlur: r,
|
|
1388
|
-
after:
|
|
1388
|
+
after: c != null ? V(o, c) : o
|
|
1389
1389
|
});
|
|
1390
|
-
},
|
|
1391
|
-
const { value: e, step: r, min: n, max: s, onBlur:
|
|
1390
|
+
}, In = (t) => {
|
|
1391
|
+
const { value: e, step: r, min: n, max: s, onBlur: c, onChange: l, onInput: i, after: o } = t, p = (v) => {
|
|
1392
1392
|
const d = n != null ? u.get(n) : void 0, x = s != null ? u.get(s) : void 0;
|
|
1393
1393
|
return d != null && v < d ? d : x != null && v > x ? x : v;
|
|
1394
1394
|
}, m = r != null ? H(X, (v) => {
|
|
1395
|
-
const d =
|
|
1395
|
+
const d = L(
|
|
1396
1396
|
e,
|
|
1397
1397
|
n
|
|
1398
|
-
)((g, b) => b == null ? !0 : (g ?? 0) > b), x =
|
|
1398
|
+
)((g, b) => b == null ? !0 : (g ?? 0) > b), x = L(
|
|
1399
1399
|
e,
|
|
1400
1400
|
s
|
|
1401
1401
|
)((g, b) => b == null ? !0 : (g ?? 0) < b), h = (g) => {
|
|
@@ -1420,7 +1420,7 @@ const wn = (t) => {
|
|
|
1420
1420
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
|
|
1421
1421
|
),
|
|
1422
1422
|
a.disabled(
|
|
1423
|
-
|
|
1423
|
+
L(
|
|
1424
1424
|
x,
|
|
1425
1425
|
t.disabled ?? !1
|
|
1426
1426
|
)((g, b) => !g || b)
|
|
@@ -1436,7 +1436,7 @@ const wn = (t) => {
|
|
|
1436
1436
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
|
|
1437
1437
|
),
|
|
1438
1438
|
a.disabled(
|
|
1439
|
-
|
|
1439
|
+
L(
|
|
1440
1440
|
d,
|
|
1441
1441
|
t.disabled ?? !1
|
|
1442
1442
|
)((g, b) => !g || b)
|
|
@@ -1446,11 +1446,11 @@ const wn = (t) => {
|
|
|
1446
1446
|
z({ icon: "line-md:minus", size: "xs" })
|
|
1447
1447
|
)
|
|
1448
1448
|
);
|
|
1449
|
-
}) : null, f =
|
|
1449
|
+
}) : null, f = o != null && m != null ? V(m, o) : o ?? m;
|
|
1450
1450
|
return O({
|
|
1451
1451
|
...t,
|
|
1452
1452
|
input: K.number(
|
|
1453
|
-
n != null ?
|
|
1453
|
+
n != null ? V(
|
|
1454
1454
|
a.min(n),
|
|
1455
1455
|
W(
|
|
1456
1456
|
u.on(n, (v) => {
|
|
@@ -1458,7 +1458,7 @@ const wn = (t) => {
|
|
|
1458
1458
|
})
|
|
1459
1459
|
)
|
|
1460
1460
|
) : T,
|
|
1461
|
-
s != null ?
|
|
1461
|
+
s != null ? V(
|
|
1462
1462
|
a.max(s),
|
|
1463
1463
|
W(
|
|
1464
1464
|
u.on(s, (v) => {
|
|
@@ -1470,7 +1470,7 @@ const wn = (t) => {
|
|
|
1470
1470
|
a.valueAsNumber(e),
|
|
1471
1471
|
a.step(r),
|
|
1472
1472
|
a.class("bc-input bc-number-input"),
|
|
1473
|
-
|
|
1473
|
+
c != null ? C.blur(P(c)) : T,
|
|
1474
1474
|
l != null ? C.change(G(l)) : T,
|
|
1475
1475
|
i != null ? C.input(G(i)) : T,
|
|
1476
1476
|
// Add wheel event support when step is defined
|
|
@@ -1486,19 +1486,19 @@ const wn = (t) => {
|
|
|
1486
1486
|
if (t == null || t === "") return null;
|
|
1487
1487
|
const e = Number(t);
|
|
1488
1488
|
return Number.isNaN(e) ? null : e;
|
|
1489
|
-
},
|
|
1490
|
-
const { value: e, step: r, min: n, max: s, onBlur:
|
|
1489
|
+
}, Cn = (t) => {
|
|
1490
|
+
const { value: e, step: r, min: n, max: s, onBlur: c, onChange: l, onInput: i, after: o } = t, p = (d) => {
|
|
1491
1491
|
const x = n != null ? u.get(n) : void 0, h = s != null ? u.get(s) : void 0;
|
|
1492
1492
|
return x != null && d < x ? x : h != null && d > h ? h : d;
|
|
1493
1493
|
}, m = (() => {
|
|
1494
1494
|
if (r == null) return null;
|
|
1495
|
-
const d =
|
|
1495
|
+
const d = L(
|
|
1496
1496
|
e,
|
|
1497
1497
|
n
|
|
1498
1498
|
)((b, D) => {
|
|
1499
1499
|
const k = b ?? 0;
|
|
1500
1500
|
return D == null ? !0 : k > D;
|
|
1501
|
-
}), x =
|
|
1501
|
+
}), x = L(
|
|
1502
1502
|
e,
|
|
1503
1503
|
s
|
|
1504
1504
|
)((b, D) => {
|
|
@@ -1523,7 +1523,7 @@ const wn = (t) => {
|
|
|
1523
1523
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
|
|
1524
1524
|
),
|
|
1525
1525
|
a.disabled(
|
|
1526
|
-
|
|
1526
|
+
L(
|
|
1527
1527
|
x,
|
|
1528
1528
|
t.disabled ?? !1
|
|
1529
1529
|
)((k, _) => !k || _)
|
|
@@ -1538,7 +1538,7 @@ const wn = (t) => {
|
|
|
1538
1538
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
|
|
1539
1539
|
),
|
|
1540
1540
|
a.disabled(
|
|
1541
|
-
|
|
1541
|
+
L(
|
|
1542
1542
|
d,
|
|
1543
1543
|
t.disabled ?? !1
|
|
1544
1544
|
)((k, _) => !k || _)
|
|
@@ -1551,19 +1551,19 @@ const wn = (t) => {
|
|
|
1551
1551
|
yt.incrementValue,
|
|
1552
1552
|
yt.decrementValue
|
|
1553
1553
|
);
|
|
1554
|
-
})(), f = Y(e, t.disabled, l), v =
|
|
1554
|
+
})(), f = Y(e, t.disabled, l), v = o != null && m != null ? V(m, f, o) : o != null ? V(f, o) : m != null ? V(m, f) : f;
|
|
1555
1555
|
return O({
|
|
1556
1556
|
...t,
|
|
1557
1557
|
input: K.number(
|
|
1558
1558
|
// min/max attributes and reactive watchers (no forced correction)
|
|
1559
|
-
n != null ?
|
|
1559
|
+
n != null ? V(
|
|
1560
1560
|
a.min(n),
|
|
1561
1561
|
W(
|
|
1562
1562
|
u.on(n, (d) => {
|
|
1563
1563
|
})
|
|
1564
1564
|
)
|
|
1565
1565
|
) : T,
|
|
1566
|
-
s != null ?
|
|
1566
|
+
s != null ? V(
|
|
1567
1567
|
a.max(s),
|
|
1568
1568
|
W(
|
|
1569
1569
|
u.on(s, (d) => {
|
|
@@ -1575,7 +1575,7 @@ const wn = (t) => {
|
|
|
1575
1575
|
a.value(u.map(e, (d) => d == null ? "" : String(d))),
|
|
1576
1576
|
a.step(r),
|
|
1577
1577
|
a.class("bc-input bc-number-input"),
|
|
1578
|
-
|
|
1578
|
+
c != null ? C.blur(P(c)) : T,
|
|
1579
1579
|
l != null ? C.change(
|
|
1580
1580
|
P((d) => {
|
|
1581
1581
|
const x = Rt(d);
|
|
@@ -1597,18 +1597,19 @@ const wn = (t) => {
|
|
|
1597
1597
|
),
|
|
1598
1598
|
after: v
|
|
1599
1599
|
});
|
|
1600
|
-
},
|
|
1600
|
+
}, Mn = ({
|
|
1601
1601
|
value: t,
|
|
1602
1602
|
onChange: e,
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1603
|
+
onInput: r,
|
|
1604
|
+
onBlur: n,
|
|
1605
|
+
offLabel: s,
|
|
1606
|
+
onLabel: c,
|
|
1607
|
+
disabled: l = !1,
|
|
1608
|
+
size: i = "md",
|
|
1609
|
+
id: o,
|
|
1610
|
+
color: p = "primary"
|
|
1610
1611
|
}) => {
|
|
1611
|
-
const
|
|
1612
|
+
const m = o ?? me("switch");
|
|
1612
1613
|
function f(h, y) {
|
|
1613
1614
|
const g = [
|
|
1614
1615
|
"bc-switch",
|
|
@@ -1618,48 +1619,41 @@ const wn = (t) => {
|
|
|
1618
1619
|
return h && g.push("bc-switch--disabled"), g.join(" ");
|
|
1619
1620
|
}
|
|
1620
1621
|
function v(h) {
|
|
1621
|
-
const y = h ?? "primary", g = /* @__PURE__ */ new Map(), b =
|
|
1622
|
+
const y = h ?? "primary", g = /* @__PURE__ */ new Map(), b = Vt(y, "solid", "light"), D = Vt(y, "solid", "dark");
|
|
1622
1623
|
return g.set("--switch-track-on-bg", b.backgroundColor), g.set("--switch-track-on-label", b.textColor), g.set("--switch-track-on-bg-dark", D.backgroundColor), g.set("--switch-track-on-label-dark", D.textColor), g.set(
|
|
1623
1624
|
"--switch-track-on-border-dark",
|
|
1624
1625
|
ie(y, "dark")
|
|
1625
1626
|
), Array.from(g.entries()).map(([k, _]) => `${k}: ${_}`).join("; ");
|
|
1626
1627
|
}
|
|
1627
1628
|
const d = () => {
|
|
1628
|
-
u.get(
|
|
1629
|
+
u.get(l) || (e?.(!u.get(t)), r?.(!u.get(t)));
|
|
1629
1630
|
}, x = (h) => {
|
|
1630
|
-
u.get(
|
|
1631
|
+
u.get(l) || (h.key === " " || h.key === "Enter") && (h.preventDefault(), d());
|
|
1631
1632
|
};
|
|
1632
1633
|
return I.div(
|
|
1633
1634
|
a.class(
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1635
|
+
L(
|
|
1636
|
+
l ?? !1,
|
|
1637
|
+
i
|
|
1637
1638
|
)(
|
|
1638
1639
|
(h, y) => f(h ?? !1, y ?? "md")
|
|
1639
1640
|
)
|
|
1640
1641
|
),
|
|
1641
1642
|
a.style(
|
|
1642
|
-
|
|
1643
|
+
L(p)(
|
|
1643
1644
|
(h) => v(h)
|
|
1644
1645
|
)
|
|
1645
1646
|
),
|
|
1646
|
-
a.id(
|
|
1647
|
+
a.id(m),
|
|
1647
1648
|
a.role("switch"),
|
|
1648
1649
|
a.tabindex(
|
|
1649
|
-
u.map(
|
|
1650
|
+
u.map(l, (h) => h ? -1 : 0)
|
|
1650
1651
|
),
|
|
1651
1652
|
N.checked(t),
|
|
1652
|
-
N.disabled(
|
|
1653
|
-
N.labelledby(s != null ? m : void 0),
|
|
1653
|
+
N.disabled(l),
|
|
1654
1654
|
C.click(d),
|
|
1655
1655
|
C.keydown(x),
|
|
1656
|
-
|
|
1657
|
-
a.id(m),
|
|
1658
|
-
a.class(
|
|
1659
|
-
`bc-switch__label bc-switch__label--size-${l} bc-switch__label--nowrap`
|
|
1660
|
-
),
|
|
1661
|
-
s
|
|
1662
|
-
) : null,
|
|
1656
|
+
n != null ? C.blur(n) : null,
|
|
1663
1657
|
I.div(
|
|
1664
1658
|
a.class("bc-switch__track"),
|
|
1665
1659
|
a.class(
|
|
@@ -1668,7 +1662,7 @@ const wn = (t) => {
|
|
|
1668
1662
|
(h) => h ? "bc-switch__track--on" : "bc-switch__track--off"
|
|
1669
1663
|
)
|
|
1670
1664
|
),
|
|
1671
|
-
|
|
1665
|
+
s != null ? I.div(
|
|
1672
1666
|
N.hidden(!0),
|
|
1673
1667
|
a.class("bc-switch__track-label bc-switch__track-label--off"),
|
|
1674
1668
|
a.class(
|
|
@@ -1677,9 +1671,9 @@ const wn = (t) => {
|
|
|
1677
1671
|
(h) => h ? "bc-switch__track-label--hidden" : "bc-switch__track-label--visible"
|
|
1678
1672
|
)
|
|
1679
1673
|
),
|
|
1680
|
-
|
|
1674
|
+
s
|
|
1681
1675
|
) : null,
|
|
1682
|
-
|
|
1676
|
+
c != null ? I.div(
|
|
1683
1677
|
a.class("bc-switch__track-label bc-switch__track-label--on"),
|
|
1684
1678
|
a.class(
|
|
1685
1679
|
u.map(
|
|
@@ -1687,7 +1681,7 @@ const wn = (t) => {
|
|
|
1687
1681
|
(h) => h ? "bc-switch__track-label--visible" : "bc-switch__track-label--hidden"
|
|
1688
1682
|
)
|
|
1689
1683
|
),
|
|
1690
|
-
|
|
1684
|
+
c
|
|
1691
1685
|
) : null,
|
|
1692
1686
|
jt(
|
|
1693
1687
|
(h) => H(
|
|
@@ -1701,10 +1695,10 @@ const wn = (t) => {
|
|
|
1701
1695
|
)
|
|
1702
1696
|
),
|
|
1703
1697
|
dt.transform(
|
|
1704
|
-
|
|
1698
|
+
L(
|
|
1705
1699
|
t,
|
|
1706
1700
|
h,
|
|
1707
|
-
|
|
1701
|
+
i,
|
|
1708
1702
|
y
|
|
1709
1703
|
)((g, { width: b }, D, k) => {
|
|
1710
1704
|
const _ = (() => {
|
|
@@ -1729,7 +1723,7 @@ const wn = (t) => {
|
|
|
1729
1723
|
)
|
|
1730
1724
|
)
|
|
1731
1725
|
);
|
|
1732
|
-
},
|
|
1726
|
+
}, Ye = (t) => {
|
|
1733
1727
|
const e = {
|
|
1734
1728
|
type: "pattern",
|
|
1735
1729
|
pattern: /[0-9A-Fa-f]/,
|
|
@@ -1778,26 +1772,26 @@ const wn = (t) => {
|
|
|
1778
1772
|
// Sensible default placeholder; can be overridden via options.placeholder
|
|
1779
1773
|
placeholder: t.placeholder ?? "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
1780
1774
|
});
|
|
1781
|
-
},
|
|
1782
|
-
const { value: e, onBlur: r, onChange: n, onInput: s, after:
|
|
1783
|
-
return
|
|
1775
|
+
}, Dn = (t) => {
|
|
1776
|
+
const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
|
|
1777
|
+
return Ye({
|
|
1784
1778
|
...i,
|
|
1785
1779
|
value: u.map(e, nt),
|
|
1786
1780
|
onChange: n != null ? (p) => n(Z(p)) : void 0,
|
|
1787
1781
|
onInput: s != null ? (p) => s(Z(p)) : void 0,
|
|
1788
1782
|
onBlur: r,
|
|
1789
|
-
after:
|
|
1783
|
+
after: c != null ? V(o, c) : o
|
|
1790
1784
|
});
|
|
1791
|
-
},
|
|
1785
|
+
}, Xe = "line-md:star-alt-filled", qe = "line-md:star-alt", Ge = (t) => {
|
|
1792
1786
|
const {
|
|
1793
1787
|
value: e,
|
|
1794
1788
|
onChange: r,
|
|
1795
1789
|
disabled: n,
|
|
1796
1790
|
max: s = 5,
|
|
1797
|
-
fullColor:
|
|
1791
|
+
fullColor: c = "yellow",
|
|
1798
1792
|
emptyColor: l = "neutral",
|
|
1799
|
-
fullIcon: i =
|
|
1800
|
-
emptyIcon:
|
|
1793
|
+
fullIcon: i = Xe,
|
|
1794
|
+
emptyIcon: o = qe,
|
|
1801
1795
|
size: p = "md",
|
|
1802
1796
|
onBlur: m,
|
|
1803
1797
|
rounding: f = 1
|
|
@@ -1835,7 +1829,7 @@ const wn = (t) => {
|
|
|
1835
1829
|
a.class("bc-rating-input__icon-container"),
|
|
1836
1830
|
a.class(y),
|
|
1837
1831
|
z(
|
|
1838
|
-
{ icon:
|
|
1832
|
+
{ icon: o, size: p, color: l, tone: "soft" },
|
|
1839
1833
|
a.class("bc-rating-input__icon-empty")
|
|
1840
1834
|
),
|
|
1841
1835
|
I.span(
|
|
@@ -1848,7 +1842,7 @@ const wn = (t) => {
|
|
|
1848
1842
|
})
|
|
1849
1843
|
),
|
|
1850
1844
|
z(
|
|
1851
|
-
{ icon: i, size: p, color:
|
|
1845
|
+
{ icon: i, size: p, color: c, tone: "soft" },
|
|
1852
1846
|
a.class("bc-rating-input__icon-full")
|
|
1853
1847
|
)
|
|
1854
1848
|
),
|
|
@@ -1876,7 +1870,7 @@ const wn = (t) => {
|
|
|
1876
1870
|
N.valuemax(u.map(s, (b) => b ?? 0)),
|
|
1877
1871
|
N.valuenow(u.map(e, (b) => b ?? 0)),
|
|
1878
1872
|
N.valuetext(
|
|
1879
|
-
|
|
1873
|
+
L(
|
|
1880
1874
|
e,
|
|
1881
1875
|
s
|
|
1882
1876
|
)((b, D) => {
|
|
@@ -1890,19 +1884,19 @@ const wn = (t) => {
|
|
|
1890
1884
|
Pt(s, g)
|
|
1891
1885
|
)
|
|
1892
1886
|
});
|
|
1893
|
-
},
|
|
1894
|
-
const { value: e, onChange: r, onBlur: n, after: s, disabled:
|
|
1895
|
-
return
|
|
1887
|
+
}, Sn = (t) => {
|
|
1888
|
+
const { value: e, onChange: r, onBlur: n, after: s, disabled: c, ...l } = t, i = Y(e, c, r);
|
|
1889
|
+
return Ge({
|
|
1896
1890
|
...l,
|
|
1897
1891
|
// Map null -> 0 for display so the control shows as empty when null
|
|
1898
|
-
value: u.map(e, (
|
|
1892
|
+
value: u.map(e, (o) => o ?? 0),
|
|
1899
1893
|
// Pass through numeric changes; clear button will call onChange(null)
|
|
1900
1894
|
onChange: r,
|
|
1901
1895
|
onBlur: n,
|
|
1902
|
-
after: s != null ?
|
|
1896
|
+
after: s != null ? V(i, s) : i
|
|
1903
1897
|
});
|
|
1904
|
-
},
|
|
1905
|
-
const { value: e, step: r, min: n, max: s, onBlur:
|
|
1898
|
+
}, Tn = (t) => {
|
|
1899
|
+
const { value: e, step: r, min: n, max: s, onBlur: c, onChange: l, onInput: i } = t;
|
|
1906
1900
|
return O({
|
|
1907
1901
|
...t,
|
|
1908
1902
|
// Make sure clicks anywhere focus the range input
|
|
@@ -1916,13 +1910,13 @@ const wn = (t) => {
|
|
|
1916
1910
|
// Using value as number to keep it in sync
|
|
1917
1911
|
a.valueAsNumber(e),
|
|
1918
1912
|
a.class("bc-input bc-slider-input"),
|
|
1919
|
-
|
|
1913
|
+
c != null ? C.blur(G(c)) : T,
|
|
1920
1914
|
l != null ? C.change(G(l)) : T,
|
|
1921
1915
|
i != null ? C.input(G(i)) : T
|
|
1922
1916
|
)
|
|
1923
1917
|
});
|
|
1924
|
-
},
|
|
1925
|
-
const { value: e, step: r, min: n, max: s, onBlur:
|
|
1918
|
+
}, An = (t) => {
|
|
1919
|
+
const { value: e, step: r, min: n, max: s, onBlur: c, onChange: l, onInput: i } = t, o = u.map(e, (m) => {
|
|
1926
1920
|
if (m != null) return m;
|
|
1927
1921
|
const f = n != null ? u.get(n) : void 0;
|
|
1928
1922
|
return typeof f == "number" ? f : 0;
|
|
@@ -1940,9 +1934,9 @@ const wn = (t) => {
|
|
|
1940
1934
|
a.min(n),
|
|
1941
1935
|
a.max(s),
|
|
1942
1936
|
a.step(r),
|
|
1943
|
-
a.valueAsNumber(
|
|
1937
|
+
a.valueAsNumber(o),
|
|
1944
1938
|
a.class("bc-input bc-slider-input"),
|
|
1945
|
-
|
|
1939
|
+
c != null ? C.blur(G(c)) : T,
|
|
1946
1940
|
l != null ? C.change(
|
|
1947
1941
|
G((m) => {
|
|
1948
1942
|
l(m);
|
|
@@ -1956,7 +1950,7 @@ const wn = (t) => {
|
|
|
1956
1950
|
)
|
|
1957
1951
|
},
|
|
1958
1952
|
// Ensure container grows input naturally
|
|
1959
|
-
|
|
1953
|
+
V()
|
|
1960
1954
|
);
|
|
1961
1955
|
};
|
|
1962
1956
|
let wt = null;
|
|
@@ -1967,25 +1961,25 @@ async function Mt() {
|
|
|
1967
1961
|
return t.Temporal || (t.Temporal = r), r;
|
|
1968
1962
|
})), wt);
|
|
1969
1963
|
}
|
|
1970
|
-
const
|
|
1964
|
+
const Qe = (t, e) => e ? Bt(Mt, {
|
|
1971
1965
|
then: t,
|
|
1972
1966
|
pending: e.pending,
|
|
1973
1967
|
error: e.error
|
|
1974
|
-
}) : Bt(Mt, t),
|
|
1975
|
-
function
|
|
1968
|
+
}) : Bt(Mt, t), Je = /^P(\d+([YMWD]|$)){0,4}(T(\d+([HMS]|$)){0,3})?$/i, Ke = /^P(?:(\d+Y)?(\d+M)?(\d+W)?(\d+D)?)(T(\d+H)?(\d+M)?(\d+S)?)?$/i;
|
|
1969
|
+
function tn(t) {
|
|
1976
1970
|
return {
|
|
1977
1971
|
mask: null,
|
|
1978
1972
|
allowMode: "custom",
|
|
1979
1973
|
allow: (e) => /[0-9ptwdhms]/i.test(e),
|
|
1980
1974
|
pipe: (e) => {
|
|
1981
1975
|
const r = e.toUpperCase();
|
|
1982
|
-
return r.length === 0 ? r : !r.startsWith("P") || !
|
|
1976
|
+
return r.length === 0 ? r : !r.startsWith("P") || !Je.test(r) ? !1 : r;
|
|
1983
1977
|
},
|
|
1984
1978
|
completion: {
|
|
1985
1979
|
mode: "custom",
|
|
1986
1980
|
isComplete: (e) => {
|
|
1987
1981
|
const r = e.toUpperCase();
|
|
1988
|
-
if (!
|
|
1982
|
+
if (!Ke.test(r)) return !1;
|
|
1989
1983
|
try {
|
|
1990
1984
|
return t(r), !0;
|
|
1991
1985
|
} catch {
|
|
@@ -2002,18 +1996,18 @@ const Ot = (t, e) => {
|
|
|
2002
1996
|
} catch {
|
|
2003
1997
|
return null;
|
|
2004
1998
|
}
|
|
2005
|
-
},
|
|
2006
|
-
const { value: e, onChange: r, after: n, disabled: s, onBlur:
|
|
1999
|
+
}, Fn = (t) => {
|
|
2000
|
+
const { value: e, onChange: r, after: n, disabled: s, onBlur: c } = t, l = () => {
|
|
2007
2001
|
const p = Y(e, s, r);
|
|
2008
|
-
return n != null ?
|
|
2002
|
+
return n != null ? V(p, n) : p;
|
|
2009
2003
|
}, i = t.placeholder != null ? T : a.placeholder("P0DT0H0M0S");
|
|
2010
|
-
return
|
|
2004
|
+
return Qe(
|
|
2011
2005
|
(p) => Xt({
|
|
2012
2006
|
...t,
|
|
2013
2007
|
value: u.map(e, (m) => m?.toString() ?? ""),
|
|
2014
2008
|
onChange: r ? (m) => r(m === "" ? null : p.Duration.from(m)) : void 0,
|
|
2015
2009
|
onInput: void 0,
|
|
2016
|
-
...
|
|
2010
|
+
...tn(p.Duration.from),
|
|
2017
2011
|
placeholder: "P0DT0H0M0S",
|
|
2018
2012
|
after: l()
|
|
2019
2013
|
}),
|
|
@@ -2024,7 +2018,7 @@ const Ot = (t, e) => {
|
|
|
2024
2018
|
a.value(u.map(e, (p) => p?.toString() ?? "")),
|
|
2025
2019
|
a.class("bc-input"),
|
|
2026
2020
|
i,
|
|
2027
|
-
|
|
2021
|
+
c != null ? C.blur(() => c()) : T,
|
|
2028
2022
|
r != null ? C.change((p) => {
|
|
2029
2023
|
const f = p.currentTarget?.value ?? "";
|
|
2030
2024
|
if (f === "") {
|
|
@@ -2046,7 +2040,7 @@ const Ot = (t, e) => {
|
|
|
2046
2040
|
after: l()
|
|
2047
2041
|
}) }
|
|
2048
2042
|
);
|
|
2049
|
-
},
|
|
2043
|
+
}, en = (t) => {
|
|
2050
2044
|
const { value: e, onBlur: r, onChange: n, onInput: s } = t;
|
|
2051
2045
|
return O({
|
|
2052
2046
|
...t,
|
|
@@ -2059,26 +2053,26 @@ const Ot = (t, e) => {
|
|
|
2059
2053
|
s != null ? C.input(P(s)) : T
|
|
2060
2054
|
)
|
|
2061
2055
|
});
|
|
2062
|
-
},
|
|
2063
|
-
const { value: e, onBlur: r, onChange: n, onInput: s, after:
|
|
2064
|
-
return
|
|
2056
|
+
}, Bn = (t) => {
|
|
2057
|
+
const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
|
|
2058
|
+
return en({
|
|
2065
2059
|
...i,
|
|
2066
2060
|
value: u.map(e, nt),
|
|
2067
2061
|
onChange: n != null ? (p) => n(Z(p)) : void 0,
|
|
2068
2062
|
onInput: s != null ? (p) => s(Z(p)) : void 0,
|
|
2069
2063
|
onBlur: r,
|
|
2070
|
-
after:
|
|
2064
|
+
after: c != null ? V(o, c) : o
|
|
2071
2065
|
});
|
|
2072
|
-
},
|
|
2066
|
+
}, nn = (t) => {
|
|
2073
2067
|
const {
|
|
2074
2068
|
controller: e,
|
|
2075
2069
|
element: r,
|
|
2076
2070
|
separator: n,
|
|
2077
2071
|
showMove: s = !0,
|
|
2078
|
-
showRemove:
|
|
2072
|
+
showRemove: c = !0,
|
|
2079
2073
|
showAdd: l = !0,
|
|
2080
2074
|
createItem: i,
|
|
2081
|
-
addLabel:
|
|
2075
|
+
addLabel: o,
|
|
2082
2076
|
controlsLayout: p = "aside",
|
|
2083
2077
|
removeDisabled: m,
|
|
2084
2078
|
addDisabled: f
|
|
@@ -2128,7 +2122,7 @@ const Ot = (t, e) => {
|
|
|
2128
2122
|
)
|
|
2129
2123
|
)
|
|
2130
2124
|
), g = E(
|
|
2131
|
-
|
|
2125
|
+
c,
|
|
2132
2126
|
() => H(
|
|
2133
2127
|
X,
|
|
2134
2128
|
(b) => $t({
|
|
@@ -2170,7 +2164,7 @@ const Ot = (t, e) => {
|
|
|
2170
2164
|
)
|
|
2171
2165
|
);
|
|
2172
2166
|
}, x = E(
|
|
2173
|
-
|
|
2167
|
+
L(l, i)((h, y) => h && y != null),
|
|
2174
2168
|
() => pt(
|
|
2175
2169
|
a.class(
|
|
2176
2170
|
"bc-group--gap-2 bc-group--align-center bc-group--justify-center"
|
|
@@ -2180,7 +2174,7 @@ const Ot = (t, e) => {
|
|
|
2180
2174
|
size: "sm",
|
|
2181
2175
|
variant: "filled",
|
|
2182
2176
|
onClick: () => e.push(i()),
|
|
2183
|
-
disabled:
|
|
2177
|
+
disabled: L(
|
|
2184
2178
|
e.disabled,
|
|
2185
2179
|
f ?? !1
|
|
2186
2180
|
)(
|
|
@@ -2192,14 +2186,14 @@ const Ot = (t, e) => {
|
|
|
2192
2186
|
(h) => pt(
|
|
2193
2187
|
a.class("bc-group--gap-2"),
|
|
2194
2188
|
z({ icon: "line-md:plus" }),
|
|
2195
|
-
|
|
2189
|
+
o ?? h.$.addLabel
|
|
2196
2190
|
)
|
|
2197
2191
|
)
|
|
2198
2192
|
)
|
|
2199
2193
|
)
|
|
2200
2194
|
);
|
|
2201
|
-
return
|
|
2202
|
-
|
|
2195
|
+
return V(
|
|
2196
|
+
Oe(
|
|
2203
2197
|
e,
|
|
2204
2198
|
(h) => d(h)(r(h)),
|
|
2205
2199
|
n
|
|
@@ -2211,10 +2205,10 @@ const Ot = (t, e) => {
|
|
|
2211
2205
|
controller: r,
|
|
2212
2206
|
element: n,
|
|
2213
2207
|
separator: s,
|
|
2214
|
-
showMove:
|
|
2208
|
+
showMove: c,
|
|
2215
2209
|
showRemove: l,
|
|
2216
2210
|
showAdd: i,
|
|
2217
|
-
createItem:
|
|
2211
|
+
createItem: o,
|
|
2218
2212
|
addLabel: p,
|
|
2219
2213
|
controlsLayout: m,
|
|
2220
2214
|
removeDisabled: f,
|
|
@@ -2224,14 +2218,14 @@ const Ot = (t, e) => {
|
|
|
2224
2218
|
return Ht(
|
|
2225
2219
|
{
|
|
2226
2220
|
...d,
|
|
2227
|
-
content:
|
|
2221
|
+
content: nn({
|
|
2228
2222
|
controller: r,
|
|
2229
2223
|
element: n,
|
|
2230
2224
|
separator: s,
|
|
2231
|
-
showMove:
|
|
2225
|
+
showMove: c,
|
|
2232
2226
|
showRemove: l,
|
|
2233
2227
|
showAdd: i,
|
|
2234
|
-
createItem:
|
|
2228
|
+
createItem: o,
|
|
2235
2229
|
addLabel: p,
|
|
2236
2230
|
controlsLayout: m,
|
|
2237
2231
|
removeDisabled: f,
|
|
@@ -2241,20 +2235,20 @@ const Ot = (t, e) => {
|
|
|
2241
2235
|
...e
|
|
2242
2236
|
);
|
|
2243
2237
|
};
|
|
2244
|
-
class
|
|
2238
|
+
class Ln extends bt {
|
|
2245
2239
|
branches;
|
|
2246
2240
|
activeBranch;
|
|
2247
2241
|
#e;
|
|
2248
2242
|
#t = /* @__PURE__ */ new Map();
|
|
2249
|
-
constructor(e, r, n, s,
|
|
2250
|
-
super(e, r, n, s,
|
|
2251
|
-
const
|
|
2243
|
+
constructor(e, r, n, s, c, l, i = lt) {
|
|
2244
|
+
super(e, r, n, s, c, i), this.branches = l;
|
|
2245
|
+
const o = (m) => {
|
|
2252
2246
|
for (const f of l)
|
|
2253
2247
|
if (f.detect(m))
|
|
2254
2248
|
return f.key;
|
|
2255
2249
|
return l[0]?.key ?? "unknown";
|
|
2256
2250
|
};
|
|
2257
|
-
this.activeBranch = n.map(
|
|
2251
|
+
this.activeBranch = n.map(o, lt);
|
|
2258
2252
|
const p = (m) => {
|
|
2259
2253
|
if (this.#t.has(m))
|
|
2260
2254
|
return this.#t.get(m);
|
|
@@ -2270,7 +2264,7 @@ class En extends bt {
|
|
|
2270
2264
|
(d) => f.detect(d) ? d : f.defaultValue(),
|
|
2271
2265
|
i
|
|
2272
2266
|
),
|
|
2273
|
-
s.map(
|
|
2267
|
+
s.map(Lt([m])),
|
|
2274
2268
|
{
|
|
2275
2269
|
disabled: this.disabled,
|
|
2276
2270
|
validationMode: this.parent.validationMode
|
|
@@ -2312,7 +2306,7 @@ class En extends bt {
|
|
|
2312
2306
|
(s) => r.detect(s) ? s : r.defaultValue(),
|
|
2313
2307
|
lt
|
|
2314
2308
|
),
|
|
2315
|
-
this.status.map(
|
|
2309
|
+
this.status.map(Lt([e])),
|
|
2316
2310
|
{
|
|
2317
2311
|
disabled: this.disabled,
|
|
2318
2312
|
validationMode: this.parent.validationMode
|
|
@@ -2340,8 +2334,8 @@ class En extends bt {
|
|
|
2340
2334
|
"Changing type will clear the current value. Continue?"
|
|
2341
2335
|
))
|
|
2342
2336
|
return !1;
|
|
2343
|
-
const
|
|
2344
|
-
return this.change(
|
|
2337
|
+
const c = n.defaultValue();
|
|
2338
|
+
return this.change(c), !0;
|
|
2345
2339
|
}
|
|
2346
2340
|
/**
|
|
2347
2341
|
* Get the current active branch definition
|
|
@@ -2351,74 +2345,74 @@ class En extends bt {
|
|
|
2351
2345
|
return this.branches.find((r) => r.key === e);
|
|
2352
2346
|
}
|
|
2353
2347
|
}
|
|
2354
|
-
function
|
|
2348
|
+
function En(t) {
|
|
2355
2349
|
return t.transform(
|
|
2356
2350
|
(e) => e ?? null,
|
|
2357
2351
|
(e) => e ?? void 0
|
|
2358
2352
|
);
|
|
2359
2353
|
}
|
|
2360
|
-
function
|
|
2354
|
+
function Un(t) {
|
|
2361
2355
|
return t.transform(
|
|
2362
2356
|
(e) => e ?? "",
|
|
2363
2357
|
(e) => e === "" ? void 0 : e
|
|
2364
2358
|
);
|
|
2365
2359
|
}
|
|
2366
|
-
function
|
|
2360
|
+
function Nn(t) {
|
|
2367
2361
|
return t.transform(
|
|
2368
2362
|
(e) => e ?? void 0,
|
|
2369
2363
|
(e) => e ?? null
|
|
2370
2364
|
);
|
|
2371
2365
|
}
|
|
2372
2366
|
export {
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2367
|
+
Sn as A,
|
|
2368
|
+
nn as B,
|
|
2369
|
+
mn as C,
|
|
2370
|
+
Tn as D,
|
|
2371
|
+
Ee as E,
|
|
2372
|
+
ye as F,
|
|
2379
2373
|
pt as G,
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2374
|
+
An as H,
|
|
2375
|
+
Fn as I,
|
|
2376
|
+
en as J,
|
|
2377
|
+
Bn as K,
|
|
2384
2378
|
Vn as L,
|
|
2385
2379
|
Xt as M,
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2380
|
+
ze as N,
|
|
2381
|
+
gn as O,
|
|
2382
|
+
hn as P,
|
|
2383
|
+
Ue as Q,
|
|
2384
|
+
Ge as R,
|
|
2385
|
+
dn as S,
|
|
2386
|
+
Ze as T,
|
|
2393
2387
|
Et as U,
|
|
2394
2388
|
Mt as V,
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2389
|
+
Qe as W,
|
|
2390
|
+
un as X,
|
|
2391
|
+
pn as _,
|
|
2398
2392
|
Y as a,
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2393
|
+
Ln as b,
|
|
2394
|
+
Un as c,
|
|
2395
|
+
tn as d,
|
|
2402
2396
|
Z as e,
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2397
|
+
Nn as f,
|
|
2398
|
+
fn as g,
|
|
2399
|
+
$e as h,
|
|
2400
|
+
Me as i,
|
|
2401
|
+
bn as j,
|
|
2402
|
+
Oe as k,
|
|
2403
|
+
Re as l,
|
|
2404
|
+
vn as m,
|
|
2411
2405
|
nt as n,
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2406
|
+
xn as o,
|
|
2407
|
+
wn as p,
|
|
2408
|
+
yn as q,
|
|
2409
|
+
$n as r,
|
|
2410
|
+
kn as s,
|
|
2411
|
+
En as t,
|
|
2412
|
+
_n as u,
|
|
2413
|
+
In as v,
|
|
2414
|
+
Cn as w,
|
|
2415
|
+
Mn as x,
|
|
2416
|
+
Ye as y,
|
|
2417
|
+
Dn as z
|
|
2424
2418
|
};
|