@tempots/beatui 0.87.4 → 0.89.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-Dn7AkNO5.js → ar-MUKILk4c.js} +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-BZPM2Xd3.js → auth-divider-DvVmqjnk.js} +7 -7
- package/dist/beatui.css +737 -671
- package/dist/beatui.tailwind.css +719 -662
- package/dist/better-auth/index.es.js +5 -5
- package/dist/{colors-CatA-RXf.js → colors-BY0Ja_bf.js} +3 -3
- package/dist/{de-QYhBiWv7.js → de-CEsW1rVX.js} +1 -1
- package/dist/deep-merge-Dgy9xj6w.cjs +1 -0
- package/dist/{deep-merge-D076XcC5.js → deep-merge-OvVqSLSN.js} +322 -304
- package/dist/{duration-input-6RN16H08.js → duration-input-BCXujp0V.js} +4 -4
- package/dist/{duration-input-CJU-yeKk.cjs → duration-input-MJz6UO6E.cjs} +1 -1
- package/dist/{editor-toolbar-group-DRCbXeQP.js → editor-toolbar-group-Cnta0SOa.js} +2 -2
- package/dist/{es-Ba31pZAd.js → es-ChP-aFwC.js} +1 -1
- package/dist/{fa-DvLjl_Ha.js → fa-CNsrlIqh.js} +1 -1
- package/dist/{fr-D64yBpAp.js → fr-DgEFKpML.js} +1 -1
- package/dist/{he-DHZGEQ7C.js → he-B4TqfISZ.js} +1 -1
- package/dist/{hi-CeAXVCvp.js → hi-TSoDsngT.js} +1 -1
- package/dist/{index-KNk3k6NI.js → index-1JaBwDB-.js} +1 -1
- package/dist/index-B8cqD9ny.js +838 -0
- package/dist/index-CN10Cyqr.cjs +1 -0
- package/dist/{index-yMrXbIdg.cjs → index-CTcbhnPw.cjs} +1 -1
- package/dist/{index-BIGCKfNz.cjs → index-D3QVPAme.cjs} +2 -2
- package/dist/{index-Bso_SkEn.cjs → index-D4ZFV8Rs.cjs} +1 -1
- package/dist/{index-anrXec7K.cjs → index-DF7RFzD9.cjs} +1 -1
- package/dist/{index-DWDC-qRY.js → index-DOc1_-Nm.js} +1 -1
- package/dist/{index-BTITknMc.js → index-D_aTUfqS.js} +6 -6
- package/dist/{index-BFe-x3-z.js → index-DfPkCwdC.js} +2 -2
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +1500 -1472
- package/dist/{input-container-BTyCOubf.js → input-container-BBWCDGTv.js} +1 -1
- package/dist/{it-Im0KgKWL.js → it-BrbebXg4.js} +1 -1
- package/dist/{ja-lliCbC19.js → ja-DcfOktrV.js} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +11 -11
- package/dist/json-schema-display/index.es.js +1 -1
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +6 -6
- package/dist/{ko-B9W4RBBs.js → ko-73e6t369.js} +1 -1
- package/dist/lexical/index.cjs.js +1 -1
- package/dist/lexical/index.es.js +7 -7
- package/dist/lexical.css +24 -23
- package/dist/markdown/index.cjs.js +1 -1
- package/dist/markdown/index.es.js +1 -1
- package/dist/markdown.css +7 -7
- package/dist/{modal-CD3DwAlD.js → modal-BBJWY7NB.js} +3 -3
- package/dist/{nl-ba5SyHsw.js → nl-Bq-1-ulc.js} +1 -1
- package/dist/{notice-Cc26kgiB.js → notice-AUVH8Lho.js} +4 -4
- package/dist/{oneof-branch-detection-DiAtgGQH.js → oneof-branch-detection-BQnRjp9P.js} +1 -1
- package/dist/{pl-DCiJAZWC.js → pl-Du9-VCfW.js} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/prosemirror.css +7 -7
- package/dist/{pt-Df5bAGWA.js → pt-B2UqqSAB.js} +1 -1
- package/dist/{ru-Dg-c670Y.js → ru-DiWa2inw.js} +1 -1
- package/dist/styles-url-4g2WnNJ8.js +4 -0
- package/dist/{styles-url-DZhZ-9Bf.js → styles-url-CJYy5nML.js} +1 -1
- package/dist/{styles-url-YAJ6Q1GS.cjs → styles-url-D8nVwSmZ.cjs} +1 -1
- package/dist/{styles-url-BSUFsmMD.cjs → styles-url-evUdl8tK.cjs} +1 -1
- package/dist/{styles-url-BvcVGpBJ.js → styles-url-hKxIOumK.js} +1 -1
- package/dist/styles-url-mlDYoWbF.cjs +1 -0
- 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/{text-input-Cux5iiUC.js → text-input-6FD7p7hN.js} +1 -1
- package/dist/{toolbar-DYmKrtic.js → toolbar-Cr0JGj5h.js} +1 -1
- package/dist/{tr-Dhpiq0u_.js → tr-Culcm2Zb.js} +1 -1
- package/dist/{translations-COSDzhvR.js → translations-Cttn6w0G.js} +1 -1
- package/dist/{translations-BLlzvZgw.js → translations-uEUkO6gJ.js} +19 -19
- package/dist/types/components/form/input/step-utils.d.ts +5 -0
- package/dist/types/tailwind/preset.d.ts +1 -1
- package/dist/types/tailwind/vite-plugin.d.ts +1 -1
- package/dist/types/tokens/borders.d.ts +104 -0
- package/dist/types/tokens/controls.d.ts +127 -0
- package/dist/types/tokens/index.d.ts +2 -0
- package/dist/types/tokens/radius.d.ts +14 -14
- package/dist/types/tokens/typography.d.ts +33 -33
- package/dist/{ur-Lr1p8f9y.js → ur-Deb-uH6b.js} +1 -1
- package/dist/{use-form-BfzX3bwL.js → use-form-lg6-7Brc.js} +3 -2
- package/dist/{vi-jozfaxSj.js → vi-CUsCVh3n.js} +1 -1
- package/dist/{widget-customization-BZqPoojo.cjs → widget-customization-BLvD4Lqt.cjs} +1 -1
- package/dist/{widget-customization-fMNSVtuP.js → widget-customization-CDD72zYs.js} +5 -5
- package/dist/{zh-BBYKq49d.js → zh-Dil2Jft8.js} +1 -1
- package/package.json +11 -11
- package/dist/deep-merge-BmxkFFi1.cjs +0 -1
- package/dist/index-BywbRDsb.cjs +0 -1
- package/dist/index-rHnH2IGb.js +0 -671
- package/dist/styles-url-CCopc5pG.js +0 -4
- package/dist/styles-url-CEDSZTyZ.cjs +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Task as
|
|
2
|
-
import { B as F, b as
|
|
3
|
-
import { l as
|
|
4
|
-
import { g as
|
|
5
|
-
import { ElementRect as
|
|
6
|
-
import { I as W, a as
|
|
7
|
-
import { C as
|
|
8
|
-
import { C as q } from "./text-input-
|
|
9
|
-
import { S as
|
|
10
|
-
let
|
|
11
|
-
async function
|
|
1
|
+
import { Task as ye, Use as O, Value as f, prop as ae, html as h, attr as l, on as C, WithElement as te, Empty as S, aria as J, bind as ie, computedOf as V, style as we, OnDispose as ne, When as U, NotEmpty as Re, Fragment as N, ForEach as ee, coalesce as Ne, Ensure as Pe, OneOfType as je, Repeat as We, signal as _e, input as se, emitValue as P, emitValueAsNumber as ke } from "@tempots/dom";
|
|
2
|
+
import { B as F, b as Ce, f as De, I as E, d as ce } from "./translations-uEUkO6gJ.js";
|
|
3
|
+
import { l as Ze } from "./colors-BY0Ja_bf.js";
|
|
4
|
+
import { g as He } from "./timer-Rd2sKnvH.js";
|
|
5
|
+
import { ElementRect as qe } from "@tempots/ui";
|
|
6
|
+
import { I as W, a as Ye, g as Ge, B as be } from "./input-container-BBWCDGTv.js";
|
|
7
|
+
import { C as oe, I as Ve, m as Je, c as Xe, d as fe, O as K, e as Ie } from "./use-form-lg6-7Brc.js";
|
|
8
|
+
import { C as q } from "./text-input-6FD7p7hN.js";
|
|
9
|
+
import { S as Ae } from "./stack-Bm-UZosx.js";
|
|
10
|
+
let pe = null;
|
|
11
|
+
async function he() {
|
|
12
12
|
const t = globalThis;
|
|
13
|
-
return t.Temporal ? t.Temporal : (
|
|
13
|
+
return t.Temporal ? t.Temporal : (pe || (pe = import("./index.esm-By0m3ki1.js").then((e) => {
|
|
14
14
|
const n = e.Temporal;
|
|
15
15
|
return t.Temporal || (t.Temporal = n), n;
|
|
16
|
-
})),
|
|
16
|
+
})), pe);
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const Qe = (t, e) => e ? ye(he, {
|
|
19
19
|
then: t,
|
|
20
20
|
pending: e.pending,
|
|
21
21
|
error: e.error
|
|
22
|
-
}) :
|
|
23
|
-
function
|
|
22
|
+
}) : ye(he, t);
|
|
23
|
+
function de({
|
|
24
24
|
onChange: t,
|
|
25
25
|
value: e,
|
|
26
26
|
accept: n = "*/*",
|
|
@@ -30,7 +30,7 @@ function pe({
|
|
|
30
30
|
allowMultiple: i
|
|
31
31
|
}) {
|
|
32
32
|
return O(F, (g) => {
|
|
33
|
-
const p = f.deriveProp(e ?? []), v =
|
|
33
|
+
const p = f.deriveProp(e ?? []), v = ae(!1), d = (u) => {
|
|
34
34
|
u.preventDefault(), u.stopPropagation(), v.value = !0;
|
|
35
35
|
}, m = (u) => {
|
|
36
36
|
u.preventDefault(), u.stopPropagation(), (!u.currentTarget || !u.currentTarget.contains(u.relatedTarget)) && (v.value = !1);
|
|
@@ -48,7 +48,7 @@ function pe({
|
|
|
48
48
|
if (a == null) return;
|
|
49
49
|
const u = Array.from(a.files ?? []);
|
|
50
50
|
u.length > 0 && (p.value = u, t(u, "click")), a.value = "";
|
|
51
|
-
},
|
|
51
|
+
}, M = (u) => {
|
|
52
52
|
f.get(s) && (u.key === "Enter" || u.key === " ") && (u.preventDefault(), o(u));
|
|
53
53
|
};
|
|
54
54
|
return h.div(
|
|
@@ -61,7 +61,7 @@ function pe({
|
|
|
61
61
|
C.dragleave(m),
|
|
62
62
|
C.drop(y),
|
|
63
63
|
C.click(o),
|
|
64
|
-
C.keydown(
|
|
64
|
+
C.keydown(M),
|
|
65
65
|
// Hidden file input
|
|
66
66
|
h.input(
|
|
67
67
|
l.type("file"),
|
|
@@ -72,34 +72,34 @@ function pe({
|
|
|
72
72
|
"position: absolute; left: -9999px; opacity: 0; pointer-events: none;"
|
|
73
73
|
),
|
|
74
74
|
C.change(D),
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
const I = new
|
|
75
|
+
te((u) => (a = u, p.on((x) => {
|
|
76
|
+
const $ = globalThis.DataTransfer;
|
|
77
|
+
if ($ != null) {
|
|
78
|
+
const I = new $();
|
|
79
79
|
x.forEach((A) => I.items.add(A)), u.files = I.files;
|
|
80
80
|
}
|
|
81
|
-
}),
|
|
81
|
+
}), S))
|
|
82
82
|
),
|
|
83
83
|
// Screen reader instructions
|
|
84
|
-
|
|
84
|
+
J.label(ie(g.$.dropZoneInstructions)(s)),
|
|
85
85
|
// Content
|
|
86
86
|
r({ files: p, clear: () => p.value = [], change: p.set })
|
|
87
87
|
);
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function Ke(t, e) {
|
|
91
91
|
return t.length === e.length && t.every((n, s) => n === e[s]);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function et(t, e, n) {
|
|
94
94
|
const s = ["bc-segmented-input", `bc-segmented-input--size-${t}`];
|
|
95
95
|
return n === "squared" && s.push("bc-segmented-input--squared"), e && s.push("bc-segmented-input--disabled"), s.join(" ");
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function tt(t) {
|
|
98
98
|
if (t == null) return "";
|
|
99
|
-
const e = /* @__PURE__ */ new Map(), n =
|
|
99
|
+
const e = /* @__PURE__ */ new Map(), n = Ce(t, "solid", "light"), s = Ce(t, "solid", "dark");
|
|
100
100
|
return e.set("--si-indicator-bg", n.backgroundColor), e.set("--si-active-text", n.textColor), e.set("--si-indicator-bg-dark", s.backgroundColor), e.set("--si-active-text-dark", s.textColor), Array.from(e.entries()).map(([r, b]) => `${r}: ${b}`).join("; ");
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Mt({
|
|
103
103
|
options: t,
|
|
104
104
|
value: e,
|
|
105
105
|
onChange: n,
|
|
@@ -108,16 +108,16 @@ function It({
|
|
|
108
108
|
variant: b = "pill",
|
|
109
109
|
color: i
|
|
110
110
|
}, ...g) {
|
|
111
|
-
const p =
|
|
111
|
+
const p = Ze(t).map(([v, d]) => ({
|
|
112
112
|
key: v,
|
|
113
113
|
label: d
|
|
114
114
|
}));
|
|
115
|
-
return
|
|
115
|
+
return te(() => {
|
|
116
116
|
const v = Object.fromEntries(
|
|
117
117
|
p.map((m, y) => [m.key, y])
|
|
118
|
-
), d =
|
|
118
|
+
), d = ae(
|
|
119
119
|
p.map(() => ({ left: 0, width: 0 })),
|
|
120
|
-
|
|
120
|
+
Ke
|
|
121
121
|
);
|
|
122
122
|
return h.div(
|
|
123
123
|
l.class(
|
|
@@ -126,7 +126,7 @@ function It({
|
|
|
126
126
|
r,
|
|
127
127
|
b
|
|
128
128
|
)(
|
|
129
|
-
(m, y, o) =>
|
|
129
|
+
(m, y, o) => et(
|
|
130
130
|
m ?? "md",
|
|
131
131
|
y ?? !1,
|
|
132
132
|
o ?? "pill"
|
|
@@ -134,13 +134,13 @@ function It({
|
|
|
134
134
|
)
|
|
135
135
|
),
|
|
136
136
|
l.style(
|
|
137
|
-
i != null ? f.map(i, (m) =>
|
|
137
|
+
i != null ? f.map(i, (m) => tt(m)) : ""
|
|
138
138
|
),
|
|
139
139
|
h.div(
|
|
140
140
|
l.class("bc-segmented-input__container"),
|
|
141
141
|
h.div(
|
|
142
142
|
l.class("bc-segmented-input__indicator"),
|
|
143
|
-
|
|
143
|
+
we.width(
|
|
144
144
|
V(
|
|
145
145
|
e,
|
|
146
146
|
d
|
|
@@ -149,7 +149,7 @@ function It({
|
|
|
149
149
|
return `${o}px`;
|
|
150
150
|
})
|
|
151
151
|
),
|
|
152
|
-
|
|
152
|
+
we.left(
|
|
153
153
|
V(
|
|
154
154
|
e,
|
|
155
155
|
d
|
|
@@ -170,7 +170,7 @@ function It({
|
|
|
170
170
|
l.class(
|
|
171
171
|
f.map(e, (a) => a === y ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
|
|
172
172
|
),
|
|
173
|
-
|
|
173
|
+
qe((a) => {
|
|
174
174
|
function D() {
|
|
175
175
|
d.update((u) => {
|
|
176
176
|
const x = [...u];
|
|
@@ -180,8 +180,8 @@ function It({
|
|
|
180
180
|
}, x;
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
|
-
const
|
|
184
|
-
return
|
|
183
|
+
const M = He(D);
|
|
184
|
+
return ne(M, a.on(D));
|
|
185
185
|
}),
|
|
186
186
|
m
|
|
187
187
|
))
|
|
@@ -190,25 +190,25 @@ function It({
|
|
|
190
190
|
);
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function nt(t) {
|
|
194
194
|
const e = t.type.toLowerCase();
|
|
195
195
|
return e.startsWith("image/") && (e.includes("jpeg") || e.includes("jpg") || e.includes("png") || e.includes("gif") || e.includes("webp") || e.includes("svg"));
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function st(t) {
|
|
198
198
|
const e = t.type.toLowerCase();
|
|
199
199
|
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";
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function me(t) {
|
|
202
202
|
return U(
|
|
203
|
-
t.map(
|
|
203
|
+
t.map(nt),
|
|
204
204
|
() => {
|
|
205
|
-
const e =
|
|
205
|
+
const e = ae(null);
|
|
206
206
|
return t.on((n) => {
|
|
207
207
|
e.value && URL.revokeObjectURL(e.value);
|
|
208
208
|
const s = URL.createObjectURL(n);
|
|
209
209
|
e.value = s;
|
|
210
210
|
}), h.div(
|
|
211
|
-
|
|
211
|
+
ne(() => {
|
|
212
212
|
e.value && URL.revokeObjectURL(e.value);
|
|
213
213
|
}),
|
|
214
214
|
l.class("bc-file-input__thumbnail-container"),
|
|
@@ -219,12 +219,12 @@ function de(t) {
|
|
|
219
219
|
)
|
|
220
220
|
);
|
|
221
221
|
},
|
|
222
|
-
() => E({ icon: t.map(
|
|
222
|
+
() => E({ icon: t.map(st) })
|
|
223
223
|
);
|
|
224
224
|
}
|
|
225
|
-
const
|
|
225
|
+
const St = (t, ...e) => {
|
|
226
226
|
const {
|
|
227
|
-
value: n =
|
|
227
|
+
value: n = ae([]),
|
|
228
228
|
accept: s = "*/*",
|
|
229
229
|
maxFiles: r,
|
|
230
230
|
maxFileSize: b,
|
|
@@ -235,7 +235,7 @@ const $t = (t, ...e) => {
|
|
|
235
235
|
mode: d = "default",
|
|
236
236
|
showFileList: m = !0,
|
|
237
237
|
...y
|
|
238
|
-
} = t, o = n, a = f.map(d, (k) => k === "input"), D = f.map(d, (k) => k === "compact"),
|
|
238
|
+
} = t, o = n, a = f.map(d, (k) => k === "input"), D = f.map(d, (k) => k === "compact"), M = (k) => {
|
|
239
239
|
let c = k;
|
|
240
240
|
if (r != null) {
|
|
241
241
|
const w = f.get(r);
|
|
@@ -243,21 +243,21 @@ const $t = (t, ...e) => {
|
|
|
243
243
|
}
|
|
244
244
|
if (b) {
|
|
245
245
|
const w = f.get(b);
|
|
246
|
-
c = c.filter((
|
|
246
|
+
c = c.filter((T) => T.size <= w);
|
|
247
247
|
}
|
|
248
248
|
i?.(c);
|
|
249
249
|
}, u = (k) => {
|
|
250
|
-
const w = o.value.filter((
|
|
250
|
+
const w = o.value.filter((T, z) => z !== k);
|
|
251
251
|
i?.(w);
|
|
252
252
|
}, x = () => {
|
|
253
253
|
i?.([]);
|
|
254
|
-
},
|
|
254
|
+
}, $ = ({
|
|
255
255
|
files: k,
|
|
256
256
|
clear: c,
|
|
257
257
|
change: w
|
|
258
258
|
}) => O(
|
|
259
259
|
F,
|
|
260
|
-
(
|
|
260
|
+
(T) => h.div(
|
|
261
261
|
l.class("bc-file-input__drop-zone"),
|
|
262
262
|
h.div(
|
|
263
263
|
l.class(
|
|
@@ -266,10 +266,10 @@ const $t = (t, ...e) => {
|
|
|
266
266
|
E({ icon: "mdi:cloud-upload-outline", size: "xl" }),
|
|
267
267
|
h.div(
|
|
268
268
|
l.class("bc-file-input__drop-zone-text"),
|
|
269
|
-
|
|
269
|
+
ie(T.$.filesInputInstructions)(
|
|
270
270
|
r,
|
|
271
271
|
b,
|
|
272
|
-
|
|
272
|
+
T.$.fileSizeUnits.value
|
|
273
273
|
)
|
|
274
274
|
)
|
|
275
275
|
)
|
|
@@ -284,13 +284,13 @@ const $t = (t, ...e) => {
|
|
|
284
284
|
k.map((w) => w.length > 0),
|
|
285
285
|
() => h.div(
|
|
286
286
|
l.class("bc-file-input__compact-file-list"),
|
|
287
|
-
|
|
288
|
-
const z =
|
|
287
|
+
ee(k, (w, T) => {
|
|
288
|
+
const z = T.index;
|
|
289
289
|
return h.div(
|
|
290
290
|
l.class("bc-file-input__compact-file-item"),
|
|
291
291
|
h.div(
|
|
292
292
|
l.class("bc-file-input__compact-file-icon"),
|
|
293
|
-
|
|
293
|
+
me(w)
|
|
294
294
|
),
|
|
295
295
|
h.div(
|
|
296
296
|
l.class("bc-file-input__compact-file-info"),
|
|
@@ -304,7 +304,7 @@ const $t = (t, ...e) => {
|
|
|
304
304
|
V(
|
|
305
305
|
w.$.size,
|
|
306
306
|
c.$.fileSizeUnits
|
|
307
|
-
)((_, B) =>
|
|
307
|
+
)((_, B) => De(_, { units: B })),
|
|
308
308
|
" • ",
|
|
309
309
|
V(
|
|
310
310
|
w.$.type,
|
|
@@ -312,7 +312,7 @@ const $t = (t, ...e) => {
|
|
|
312
312
|
)((_, B) => _ || B)
|
|
313
313
|
)
|
|
314
314
|
),
|
|
315
|
-
|
|
315
|
+
oe(
|
|
316
316
|
{
|
|
317
317
|
size: "sm",
|
|
318
318
|
label: c.$.removeFile,
|
|
@@ -329,7 +329,7 @@ const $t = (t, ...e) => {
|
|
|
329
329
|
E({ icon: "mdi:cloud-upload-outline", size: "lg" }),
|
|
330
330
|
h.div(
|
|
331
331
|
l.class("bc-file-input__compact-placeholder-text"),
|
|
332
|
-
|
|
332
|
+
ie(c.$.filesInputInstructions)(
|
|
333
333
|
r,
|
|
334
334
|
b,
|
|
335
335
|
c.$.fileSizeUnits.value
|
|
@@ -348,11 +348,11 @@ const $t = (t, ...e) => {
|
|
|
348
348
|
k.map((w) => w.length > 0),
|
|
349
349
|
() => h.span(
|
|
350
350
|
l.class("bc-file-input__compact-value"),
|
|
351
|
-
|
|
351
|
+
ee(
|
|
352
352
|
k,
|
|
353
353
|
(w) => h.span(
|
|
354
354
|
l.class("bc-file-input__compact-value-item"),
|
|
355
|
-
|
|
355
|
+
me(w),
|
|
356
356
|
h.span(
|
|
357
357
|
l.class("bc-file-input__compact-value-item-name"),
|
|
358
358
|
w.$.name
|
|
@@ -364,7 +364,7 @@ const $t = (t, ...e) => {
|
|
|
364
364
|
l.class("bc-file-input__compact-placeholder"),
|
|
365
365
|
E({ icon: "mdi:cloud-upload-outline", size: "md" }),
|
|
366
366
|
" ",
|
|
367
|
-
|
|
367
|
+
ie(c.$.filesInputInstructions)(
|
|
368
368
|
r,
|
|
369
369
|
b,
|
|
370
370
|
c.$.fileSizeUnits.value
|
|
@@ -384,7 +384,7 @@ const $t = (t, ...e) => {
|
|
|
384
384
|
a,
|
|
385
385
|
() => U(
|
|
386
386
|
o.map(({ length: c }) => c > 0),
|
|
387
|
-
() =>
|
|
387
|
+
() => oe(
|
|
388
388
|
{
|
|
389
389
|
size: "sm",
|
|
390
390
|
label: k.$.clearAllFiles,
|
|
@@ -400,13 +400,13 @@ const $t = (t, ...e) => {
|
|
|
400
400
|
a,
|
|
401
401
|
() => h.div(
|
|
402
402
|
l.class("bc-file-input bc-file-input--input"),
|
|
403
|
-
|
|
403
|
+
de({
|
|
404
404
|
value: o,
|
|
405
405
|
accept: s,
|
|
406
406
|
enableClick: !0,
|
|
407
407
|
allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
|
|
408
408
|
disabled: p,
|
|
409
|
-
onChange:
|
|
409
|
+
onChange: M,
|
|
410
410
|
content: A
|
|
411
411
|
})
|
|
412
412
|
),
|
|
@@ -414,41 +414,41 @@ const $t = (t, ...e) => {
|
|
|
414
414
|
D,
|
|
415
415
|
() => h.div(
|
|
416
416
|
l.class("bc-file-input bc-file-input--compact"),
|
|
417
|
-
|
|
417
|
+
de({
|
|
418
418
|
value: o,
|
|
419
419
|
accept: s,
|
|
420
420
|
enableClick: !0,
|
|
421
421
|
allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
|
|
422
422
|
disabled: p,
|
|
423
|
-
onChange:
|
|
423
|
+
onChange: M,
|
|
424
424
|
content: I
|
|
425
425
|
})
|
|
426
426
|
),
|
|
427
427
|
() => h.div(
|
|
428
428
|
l.class("bc-file-input"),
|
|
429
|
-
|
|
429
|
+
de({
|
|
430
430
|
value: o,
|
|
431
431
|
accept: s,
|
|
432
432
|
enableClick: !0,
|
|
433
433
|
allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
|
|
434
434
|
disabled: p,
|
|
435
|
-
onChange:
|
|
436
|
-
content:
|
|
435
|
+
onChange: M,
|
|
436
|
+
content: $
|
|
437
437
|
}),
|
|
438
438
|
U(
|
|
439
439
|
m,
|
|
440
|
-
() =>
|
|
440
|
+
() => Re(
|
|
441
441
|
o,
|
|
442
442
|
() => N(
|
|
443
443
|
h.div(
|
|
444
444
|
l.class("bc-file-input__file-list"),
|
|
445
|
-
|
|
446
|
-
const
|
|
445
|
+
ee(o, (c, w) => {
|
|
446
|
+
const T = w.index;
|
|
447
447
|
return h.div(
|
|
448
448
|
l.class("bc-file-input__file-item"),
|
|
449
449
|
h.div(
|
|
450
450
|
l.class("bc-file-input__file-icon"),
|
|
451
|
-
|
|
451
|
+
me(c)
|
|
452
452
|
),
|
|
453
453
|
h.div(
|
|
454
454
|
l.class("bc-file-input__file-info"),
|
|
@@ -463,7 +463,7 @@ const $t = (t, ...e) => {
|
|
|
463
463
|
c.$.size,
|
|
464
464
|
k.$.fileSizeUnits
|
|
465
465
|
)(
|
|
466
|
-
(z, _) =>
|
|
466
|
+
(z, _) => De(z, { units: _ })
|
|
467
467
|
),
|
|
468
468
|
" • ",
|
|
469
469
|
V(
|
|
@@ -472,12 +472,12 @@ const $t = (t, ...e) => {
|
|
|
472
472
|
)((z, _) => z || _)
|
|
473
473
|
)
|
|
474
474
|
),
|
|
475
|
-
|
|
475
|
+
oe(
|
|
476
476
|
{
|
|
477
477
|
size: "sm",
|
|
478
478
|
label: k.$.removeFile,
|
|
479
479
|
disabled: p,
|
|
480
|
-
onClick: () => u(
|
|
480
|
+
onClick: () => u(T)
|
|
481
481
|
},
|
|
482
482
|
l.class("bc-file-input__remove-button")
|
|
483
483
|
)
|
|
@@ -511,27 +511,27 @@ const $t = (t, ...e) => {
|
|
|
511
511
|
...e
|
|
512
512
|
)
|
|
513
513
|
);
|
|
514
|
-
},
|
|
515
|
-
const s = `${
|
|
516
|
-
return
|
|
517
|
-
}),
|
|
518
|
-
const n = `${
|
|
514
|
+
}, ge = "$$tts-exp-", lt = (t, e) => te((n) => {
|
|
515
|
+
const s = `${ge}${t}`;
|
|
516
|
+
return ne(f.on(e, (r) => Reflect.set(n, s, r)));
|
|
517
|
+
}), Tt = (t, e) => {
|
|
518
|
+
const n = `${ge}${t}`;
|
|
519
519
|
return (s) => {
|
|
520
520
|
e(Reflect.get(s.target, n));
|
|
521
521
|
};
|
|
522
|
-
},
|
|
523
|
-
const n = `${
|
|
522
|
+
}, rt = (t, e) => {
|
|
523
|
+
const n = `${ge}${t}`;
|
|
524
524
|
return (s) => {
|
|
525
525
|
const r = s.target, b = r.selectedIndex, i = r.options[b];
|
|
526
526
|
e(Reflect.get(i, n));
|
|
527
527
|
};
|
|
528
528
|
};
|
|
529
|
-
function
|
|
529
|
+
function $e(...t) {
|
|
530
530
|
return h.div(l.class("bc-group"), ...t);
|
|
531
531
|
}
|
|
532
|
-
const
|
|
532
|
+
const Le = (t, e, n) => Pe(
|
|
533
533
|
t,
|
|
534
|
-
(s) =>
|
|
534
|
+
(s) => je(s, {
|
|
535
535
|
value: (r) => {
|
|
536
536
|
const b = V(
|
|
537
537
|
r,
|
|
@@ -539,15 +539,15 @@ const Ae = (t, e, n) => Ne(
|
|
|
539
539
|
)((i, g) => e(i.value, g));
|
|
540
540
|
return h.option(
|
|
541
541
|
l.selected(b),
|
|
542
|
-
|
|
542
|
+
lt("value", r.$.value),
|
|
543
543
|
r.$.label
|
|
544
544
|
);
|
|
545
545
|
},
|
|
546
546
|
group: (r) => h.optgroup(
|
|
547
547
|
l.label(r.$.group),
|
|
548
|
-
|
|
548
|
+
ee(
|
|
549
549
|
r.$.options,
|
|
550
|
-
(b) =>
|
|
550
|
+
(b) => Le(
|
|
551
551
|
b,
|
|
552
552
|
e,
|
|
553
553
|
n
|
|
@@ -556,7 +556,7 @@ const Ae = (t, e, n) => Ne(
|
|
|
556
556
|
),
|
|
557
557
|
break: () => h.hr()
|
|
558
558
|
})
|
|
559
|
-
),
|
|
559
|
+
), it = (t) => {
|
|
560
560
|
const {
|
|
561
561
|
value: e,
|
|
562
562
|
onBlur: n,
|
|
@@ -571,7 +571,7 @@ const Ae = (t, e, n) => Ne(
|
|
|
571
571
|
{
|
|
572
572
|
...t,
|
|
573
573
|
after: N(
|
|
574
|
-
|
|
574
|
+
Ye({
|
|
575
575
|
icon: "ph:caret-down-bold",
|
|
576
576
|
color: "neutral",
|
|
577
577
|
size: "sm"
|
|
@@ -579,13 +579,13 @@ const Ae = (t, e, n) => Ne(
|
|
|
579
579
|
g
|
|
580
580
|
),
|
|
581
581
|
input: h.select(
|
|
582
|
-
|
|
582
|
+
te((v) => {
|
|
583
583
|
p = v;
|
|
584
584
|
const d = new MutationObserver((m) => {
|
|
585
585
|
const { removedNodes: y } = m[0];
|
|
586
586
|
y.length > 0 && (p.selectedIndex = 0);
|
|
587
587
|
});
|
|
588
|
-
return d.observe(v, { childList: !0 }),
|
|
588
|
+
return d.observe(v, { childList: !0 }), ne(() => d.disconnect());
|
|
589
589
|
}),
|
|
590
590
|
q(t),
|
|
591
591
|
l.class("bc-native-select bc-input"),
|
|
@@ -593,12 +593,12 @@ const Ae = (t, e, n) => Ne(
|
|
|
593
593
|
F,
|
|
594
594
|
(v) => h.option(
|
|
595
595
|
l.hidden("hidden"),
|
|
596
|
-
|
|
596
|
+
Ne(b, v.$.selectOne)
|
|
597
597
|
)
|
|
598
598
|
),
|
|
599
|
-
|
|
600
|
-
n != null ? C.blur(n) :
|
|
601
|
-
s != null ? C.change(
|
|
599
|
+
ee(r, (v) => Le(v, i, e)),
|
|
600
|
+
n != null ? C.blur(n) : S,
|
|
601
|
+
s != null ? C.change(rt("value", (v) => s(v))) : S
|
|
602
602
|
)
|
|
603
603
|
},
|
|
604
604
|
C.click(() => {
|
|
@@ -610,29 +610,29 @@ const Ae = (t, e, n) => Ne(
|
|
|
610
610
|
})
|
|
611
611
|
);
|
|
612
612
|
};
|
|
613
|
-
function
|
|
613
|
+
function ot(t) {
|
|
614
614
|
const { controller: e, onChange: n, onBlur: s, ...r } = t;
|
|
615
|
-
return
|
|
615
|
+
return it({
|
|
616
616
|
...r,
|
|
617
617
|
value: e.signal,
|
|
618
|
-
onChange:
|
|
619
|
-
onBlur:
|
|
618
|
+
onChange: Xe(e, n),
|
|
619
|
+
onBlur: Je(e, s)
|
|
620
620
|
});
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
return
|
|
622
|
+
function zt(t) {
|
|
623
|
+
return Ve({
|
|
624
624
|
...t,
|
|
625
|
-
content:
|
|
625
|
+
content: ot(t)
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function ct(t, e, n) {
|
|
629
629
|
const s = t.length.map((r) => r);
|
|
630
|
-
return
|
|
630
|
+
return We(
|
|
631
631
|
s,
|
|
632
632
|
(r) => {
|
|
633
633
|
const b = t.item(r.index), i = [];
|
|
634
634
|
return N(
|
|
635
|
-
|
|
635
|
+
ne(() => {
|
|
636
636
|
i.forEach((g) => g());
|
|
637
637
|
}),
|
|
638
638
|
e({
|
|
@@ -661,7 +661,7 @@ function ot(t, e, n) {
|
|
|
661
661
|
const p = (() => {
|
|
662
662
|
switch (g) {
|
|
663
663
|
case "up":
|
|
664
|
-
return
|
|
664
|
+
return _e(r.index > 0);
|
|
665
665
|
case "down":
|
|
666
666
|
return t.length.map((v) => r.index < v - 1);
|
|
667
667
|
}
|
|
@@ -672,7 +672,7 @@ function ot(t, e, n) {
|
|
|
672
672
|
const p = (() => {
|
|
673
673
|
switch (g) {
|
|
674
674
|
case "up":
|
|
675
|
-
return
|
|
675
|
+
return _e(r.index === 0);
|
|
676
676
|
case "down":
|
|
677
677
|
return t.length.map((v) => r.index === v - 1);
|
|
678
678
|
}
|
|
@@ -685,14 +685,14 @@ function ot(t, e, n) {
|
|
|
685
685
|
n
|
|
686
686
|
);
|
|
687
687
|
}
|
|
688
|
-
const
|
|
688
|
+
const Me = {
|
|
689
689
|
9: { pattern: /^[0-9]$/ },
|
|
690
690
|
A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
|
|
691
691
|
"*": { pattern: /^.$/ }
|
|
692
|
-
},
|
|
693
|
-
function
|
|
692
|
+
}, at = (t) => t instanceof RegExp;
|
|
693
|
+
function Ue(t, e, n) {
|
|
694
694
|
if (t == null) return [];
|
|
695
|
-
const s = n ? {
|
|
695
|
+
const s = n ? { ...Me, ...e } : e ?? Me, r = (i, g) => {
|
|
696
696
|
const p = s[g];
|
|
697
697
|
p ? i.push({ type: "pattern", name: g, ...p }) : i.push({ type: "literal", char: g });
|
|
698
698
|
}, b = [];
|
|
@@ -704,10 +704,10 @@ function Le(t, e, n) {
|
|
|
704
704
|
if (typeof i == "string")
|
|
705
705
|
if (i.length <= 1) r(b, i);
|
|
706
706
|
else for (const g of i) r(b, g);
|
|
707
|
-
else
|
|
707
|
+
else at(i) ? b.push({ type: "pattern", pattern: i }) : typeof i == "object" && i && b.push(i);
|
|
708
708
|
return b;
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function ut(t, e) {
|
|
711
711
|
return (n) => {
|
|
712
712
|
switch (t) {
|
|
713
713
|
case "digits":
|
|
@@ -723,30 +723,30 @@ function at(t, e) {
|
|
|
723
723
|
}
|
|
724
724
|
};
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function Se(t, e, n, s, r, b) {
|
|
727
727
|
const i = {
|
|
728
728
|
raw: t,
|
|
729
729
|
previousConformed: e,
|
|
730
730
|
cursor: r ?? t.length,
|
|
731
731
|
completed: !1
|
|
732
|
-
}, g = s.definitions ?? {}, p = typeof n == "function" ? n(t, i) : n, v =
|
|
732
|
+
}, g = s.definitions ?? {}, p = typeof n == "function" ? n(t, i) : n, v = Ue(
|
|
733
733
|
p,
|
|
734
734
|
g,
|
|
735
735
|
s.useDefaultDefinitions ?? !0
|
|
736
|
-
), d =
|
|
736
|
+
), d = ut(s.allowMode, s.allow), m = /* @__PURE__ */ new Set();
|
|
737
737
|
for (const _ of v) _.type === "literal" && m.add(_.char);
|
|
738
738
|
if (s.prefix) for (const _ of s.prefix) m.add(_);
|
|
739
739
|
if (s.suffix) for (const _ of s.suffix) m.add(_);
|
|
740
740
|
const y = Array.from(t).filter((_) => d(_) && !m.has(_));
|
|
741
741
|
if (y.length === 0) return { value: "", cursor: 0, completed: !1 };
|
|
742
742
|
const o = [], a = [];
|
|
743
|
-
let D = 0,
|
|
743
|
+
let D = 0, M = 0, u = 0, x = -1;
|
|
744
744
|
for (const _ of v) {
|
|
745
745
|
if (_.type === "literal") {
|
|
746
746
|
o.push(_.char), a.push({ kind: "literal", filled: !0 });
|
|
747
747
|
continue;
|
|
748
748
|
}
|
|
749
|
-
|
|
749
|
+
M += _.optional ? 0 : 1;
|
|
750
750
|
const B = y[D];
|
|
751
751
|
if (B == null)
|
|
752
752
|
break;
|
|
@@ -764,7 +764,7 @@ function Me(t, e, n, s, r, b) {
|
|
|
764
764
|
continue;
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
|
-
const
|
|
767
|
+
const $ = o.join(""), I = (s.prefix ?? "") + $ + (s.suffix ?? "");
|
|
768
768
|
let k = (s.prefix ?? "").length;
|
|
769
769
|
if (x >= 0) {
|
|
770
770
|
let _ = x + 1;
|
|
@@ -772,15 +772,15 @@ function Me(t, e, n, s, r, b) {
|
|
|
772
772
|
for (; _ < a.length && a[_].kind === "literal"; ) _++;
|
|
773
773
|
k += _;
|
|
774
774
|
}
|
|
775
|
-
const c = s.completion?.mode === "min" ? (s.completion.minChars ?? 0) <= u : s.completion?.mode === "custom" ? !!s.completion.isComplete?.(I) :
|
|
776
|
-
let
|
|
777
|
-
return w === !1 ? (
|
|
775
|
+
const c = s.completion?.mode === "min" ? (s.completion.minChars ?? 0) <= u : s.completion?.mode === "custom" ? !!s.completion.isComplete?.(I) : M > 0 && u >= M, w = s.pipe?.(I, { ...i, completed: c });
|
|
776
|
+
let T, z = k;
|
|
777
|
+
return w === !1 ? (T = e, z = e.length) : typeof w == "string" ? (T = w, z = w.length) : typeof w == "object" && w ? (T = w.value, z = w.cursor ?? w.value.length) : T = I, { value: T, cursor: z, completed: c };
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function ft(t, e) {
|
|
780
780
|
const n = e?.strategy ?? "none";
|
|
781
781
|
return n === "custom" && e?.unmask ? e.unmask(t) : n === "strip" ? t.replace(/[^A-Za-z0-9]/g, "") : t;
|
|
782
782
|
}
|
|
783
|
-
const
|
|
783
|
+
const Ee = (t) => {
|
|
784
784
|
const {
|
|
785
785
|
value: e,
|
|
786
786
|
onBlur: n,
|
|
@@ -797,10 +797,10 @@ const Ue = (t) => {
|
|
|
797
797
|
autofix: o,
|
|
798
798
|
pipe: a,
|
|
799
799
|
completion: D,
|
|
800
|
-
unmask:
|
|
800
|
+
unmask: M,
|
|
801
801
|
allowMode: u,
|
|
802
802
|
allow: x,
|
|
803
|
-
placeholder:
|
|
803
|
+
placeholder: $,
|
|
804
804
|
placeholderOptions: I
|
|
805
805
|
} = t, A = V(
|
|
806
806
|
e,
|
|
@@ -812,16 +812,16 @@ const Ue = (t) => {
|
|
|
812
812
|
y,
|
|
813
813
|
o,
|
|
814
814
|
D,
|
|
815
|
-
$,
|
|
816
|
-
u,
|
|
817
815
|
M,
|
|
816
|
+
u,
|
|
817
|
+
$,
|
|
818
818
|
I
|
|
819
|
-
)((c, w,
|
|
820
|
-
definitions:
|
|
819
|
+
)((c, w, T, z, _, B, R, X, Q, Y, Z, le, j) => w ? Se(c ?? "", "", w, {
|
|
820
|
+
definitions: T ?? {},
|
|
821
821
|
useDefaultDefinitions: z ?? !0,
|
|
822
822
|
extraLiterals: _ ?? [],
|
|
823
|
-
autofix:
|
|
824
|
-
completion:
|
|
823
|
+
autofix: X ?? "none",
|
|
824
|
+
completion: Q ?? { mode: "mask" },
|
|
825
825
|
pipe: a ?? ((L) => L),
|
|
826
826
|
unmask: Y ?? { strategy: "none" },
|
|
827
827
|
allowMode: Z ?? "all",
|
|
@@ -829,53 +829,53 @@ const Ue = (t) => {
|
|
|
829
829
|
prefix: B,
|
|
830
830
|
suffix: R
|
|
831
831
|
}).value : c ?? ""), k = (c, w) => {
|
|
832
|
-
const
|
|
832
|
+
const T = c.value ?? "", z = f.get(e) ?? "", _ = g != null ? f.get(g) : null, B = p != null ? f.get(p) : void 0, R = v != null ? f.get(v) : void 0, X = d != null ? f.get(d) : void 0, Q = o != null ? f.get(o) : void 0, Y = D != null ? f.get(D) : void 0, Z = M != null ? f.get(M) : void 0, le = u != null ? f.get(u) : void 0, j = m != null ? f.get(m) : void 0, L = y != null ? f.get(y) : void 0, {
|
|
833
833
|
value: H,
|
|
834
|
-
cursor:
|
|
835
|
-
completed:
|
|
836
|
-
} = _ ?
|
|
837
|
-
|
|
834
|
+
cursor: ue,
|
|
835
|
+
completed: ve
|
|
836
|
+
} = _ ? Se(
|
|
837
|
+
T,
|
|
838
838
|
z,
|
|
839
839
|
_,
|
|
840
840
|
{
|
|
841
841
|
definitions: B ?? {},
|
|
842
842
|
useDefaultDefinitions: R ?? !0,
|
|
843
|
-
extraLiterals:
|
|
844
|
-
autofix:
|
|
843
|
+
extraLiterals: X ?? [],
|
|
844
|
+
autofix: Q ?? "none",
|
|
845
845
|
completion: Y ?? { mode: "mask" },
|
|
846
|
-
pipe: a ?? ((
|
|
846
|
+
pipe: a ?? ((Fe) => Fe),
|
|
847
847
|
unmask: Z ?? { strategy: "none" },
|
|
848
|
-
allowMode:
|
|
848
|
+
allowMode: le ?? "all",
|
|
849
849
|
allow: x,
|
|
850
850
|
prefix: j,
|
|
851
851
|
suffix: L
|
|
852
852
|
},
|
|
853
|
-
c.selectionStart ??
|
|
853
|
+
c.selectionStart ?? T.length,
|
|
854
854
|
t.cursor ? f.get(t.cursor) : void 0
|
|
855
|
-
) : { value:
|
|
856
|
-
if (H !==
|
|
855
|
+
) : { value: T, cursor: T.length, completed: !0 };
|
|
856
|
+
if (H !== T) {
|
|
857
857
|
c.value = H;
|
|
858
858
|
try {
|
|
859
|
-
c.setSelectionRange(
|
|
859
|
+
c.setSelectionRange(ue, ue);
|
|
860
860
|
} catch {
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
|
-
const
|
|
863
|
+
const xe = ft(H, Z);
|
|
864
864
|
b?.({
|
|
865
|
-
raw:
|
|
865
|
+
raw: xe,
|
|
866
866
|
conformed: H,
|
|
867
|
-
completed:
|
|
868
|
-
cursor:
|
|
869
|
-
}), w === "input" ? r?.(H) : (s?.(H),
|
|
867
|
+
completed: ve,
|
|
868
|
+
cursor: ue
|
|
869
|
+
}), w === "input" ? r?.(H) : (s?.(H), ve && i?.({ raw: xe, conformed: H }));
|
|
870
870
|
};
|
|
871
871
|
return W({
|
|
872
872
|
...t,
|
|
873
|
-
input:
|
|
873
|
+
input: se.text(
|
|
874
874
|
q(t),
|
|
875
875
|
l.value(A),
|
|
876
876
|
l.class("bc-input"),
|
|
877
|
-
n != null ? C.blur(n) :
|
|
878
|
-
|
|
877
|
+
n != null ? C.blur(n) : S,
|
|
878
|
+
te(
|
|
879
879
|
(c) => c instanceof HTMLInputElement ? N(
|
|
880
880
|
C.input(() => k(c, "input")),
|
|
881
881
|
C.change(() => k(c, "change")),
|
|
@@ -885,17 +885,17 @@ const Ue = (t) => {
|
|
|
885
885
|
if (z !== _ || z <= 0) return;
|
|
886
886
|
const B = c.value ?? "", R = g != null ? f.get(g) : null;
|
|
887
887
|
if (!R) return;
|
|
888
|
-
const
|
|
888
|
+
const X = p != null ? f.get(p) : void 0, Q = v != null ? f.get(v) : !0, Y = m != null ? f.get(m) : void 0, Z = y != null ? f.get(y) : void 0, le = Ue(
|
|
889
889
|
typeof R == "function" ? R(B, {
|
|
890
890
|
raw: B,
|
|
891
891
|
previousConformed: B,
|
|
892
892
|
cursor: z,
|
|
893
893
|
completed: !1
|
|
894
894
|
}) : R,
|
|
895
|
-
|
|
896
|
-
|
|
895
|
+
X ?? {},
|
|
896
|
+
Q ?? !0
|
|
897
897
|
), j = /* @__PURE__ */ new Set();
|
|
898
|
-
for (const L of
|
|
898
|
+
for (const L of le)
|
|
899
899
|
L.type === "literal" && j.add(L.char);
|
|
900
900
|
if (Y) for (const L of Y) j.add(L);
|
|
901
901
|
if (Z) for (const L of Z) j.add(L);
|
|
@@ -905,20 +905,20 @@ const Ue = (t) => {
|
|
|
905
905
|
L >= 0 && (w.preventDefault(), w.stopPropagation(), c.value = B.slice(0, L) + B.slice(L + 1), k(c, "input"));
|
|
906
906
|
}
|
|
907
907
|
})
|
|
908
|
-
) :
|
|
908
|
+
) : S
|
|
909
909
|
)
|
|
910
910
|
)
|
|
911
911
|
});
|
|
912
912
|
};
|
|
913
|
-
function
|
|
913
|
+
function Oe(t, e, n) {
|
|
914
914
|
const s = f.map(t, (i) => i != null), r = V(
|
|
915
915
|
s,
|
|
916
916
|
e ?? !1
|
|
917
|
-
)((i, g) => !i || g), b =
|
|
917
|
+
)((i, g) => !i || g), b = ce.clearValue;
|
|
918
918
|
return h.button(
|
|
919
919
|
l.type("button"),
|
|
920
920
|
l.class("bc-input-container__reset"),
|
|
921
|
-
|
|
921
|
+
J.label(b),
|
|
922
922
|
l.title(b),
|
|
923
923
|
l.disabled(r),
|
|
924
924
|
E({ icon: "mdi:close", size: "sm" }),
|
|
@@ -927,7 +927,7 @@ function Ee(t, e, n) {
|
|
|
927
927
|
})
|
|
928
928
|
);
|
|
929
929
|
}
|
|
930
|
-
const
|
|
930
|
+
const Bt = (t) => {
|
|
931
931
|
const { value: e, onBlur: n, onChange: s, onInput: r, rows: b } = t;
|
|
932
932
|
return W({
|
|
933
933
|
baseContainer: !0,
|
|
@@ -935,7 +935,7 @@ const St = (t) => {
|
|
|
935
935
|
input: h.textarea(
|
|
936
936
|
l.class(
|
|
937
937
|
V(t.size ?? "md")(
|
|
938
|
-
(i) =>
|
|
938
|
+
(i) => Ge(
|
|
939
939
|
!1,
|
|
940
940
|
i ?? "md"
|
|
941
941
|
)
|
|
@@ -945,12 +945,23 @@ const St = (t) => {
|
|
|
945
945
|
l.rows(b ?? 3),
|
|
946
946
|
l.value(e),
|
|
947
947
|
l.class("bc-input"),
|
|
948
|
-
n != null ? C.blur(P(n)) :
|
|
949
|
-
s != null ? C.change(P(s)) :
|
|
950
|
-
r != null ? C.input(P(r)) :
|
|
948
|
+
n != null ? C.blur(P(n)) : S,
|
|
949
|
+
s != null ? C.change(P(s)) : S,
|
|
950
|
+
r != null ? C.input(P(r)) : S
|
|
951
951
|
)
|
|
952
952
|
});
|
|
953
|
-
}
|
|
953
|
+
};
|
|
954
|
+
function pt(t) {
|
|
955
|
+
const e = String(t), n = e.indexOf(".");
|
|
956
|
+
return n === -1 ? 0 : e.length - n - 1;
|
|
957
|
+
}
|
|
958
|
+
function G(t, e) {
|
|
959
|
+
const n = pt(e);
|
|
960
|
+
if (n === 0) return Math.round(t);
|
|
961
|
+
const s = Math.pow(10, n);
|
|
962
|
+
return Math.round(t * s) / s;
|
|
963
|
+
}
|
|
964
|
+
const Vt = (t) => {
|
|
954
965
|
const { value: e, step: n, min: s, max: r, onBlur: b, onChange: i, onInput: g, after: p } = t, v = (y) => {
|
|
955
966
|
const o = s != null ? f.get(s) : void 0, a = r != null ? f.get(r) : void 0;
|
|
956
967
|
return o != null && y < o ? o : a != null && y > a ? a : y;
|
|
@@ -962,19 +973,25 @@ const St = (t) => {
|
|
|
962
973
|
e,
|
|
963
974
|
r
|
|
964
975
|
)((u, x) => x == null ? !0 : (u ?? 0) < x), D = (u) => {
|
|
965
|
-
const x = f.get(e) ?? 0,
|
|
976
|
+
const x = f.get(e) ?? 0, $ = f.get(n), I = u?.shiftKey ? 10 : 1, A = G(
|
|
977
|
+
x - $ * I,
|
|
978
|
+
$
|
|
979
|
+
), k = s != null ? f.get(s) : void 0;
|
|
966
980
|
if (k != null && A < k)
|
|
967
981
|
return;
|
|
968
982
|
const c = v(A);
|
|
969
983
|
c !== x && i && i(c);
|
|
970
|
-
},
|
|
971
|
-
const x = f.get(e) ?? 0,
|
|
984
|
+
}, M = (u) => {
|
|
985
|
+
const x = f.get(e) ?? 0, $ = f.get(n), I = u?.shiftKey ? 10 : 1, A = G(
|
|
986
|
+
x + $ * I,
|
|
987
|
+
$
|
|
988
|
+
), k = r != null ? f.get(r) : void 0;
|
|
972
989
|
if (k != null && A > k)
|
|
973
990
|
return;
|
|
974
991
|
const c = v(A);
|
|
975
992
|
c !== x && i && i(c);
|
|
976
993
|
};
|
|
977
|
-
return
|
|
994
|
+
return Ae(
|
|
978
995
|
l.class("bc-number-input-steppers"),
|
|
979
996
|
// Increment second
|
|
980
997
|
h.button(
|
|
@@ -988,8 +1005,8 @@ const St = (t) => {
|
|
|
988
1005
|
t.disabled ?? !1
|
|
989
1006
|
)((u, x) => !u || x)
|
|
990
1007
|
),
|
|
991
|
-
C.click((u) =>
|
|
992
|
-
|
|
1008
|
+
C.click((u) => M(u)),
|
|
1009
|
+
J.label(y.$.incrementValue),
|
|
993
1010
|
E({ icon: "line-md:plus", size: "xs" })
|
|
994
1011
|
),
|
|
995
1012
|
// Decrement first (matches tests expecting first button to be decrement)
|
|
@@ -1005,29 +1022,29 @@ const St = (t) => {
|
|
|
1005
1022
|
)((u, x) => !u || x)
|
|
1006
1023
|
),
|
|
1007
1024
|
C.click((u) => D(u)),
|
|
1008
|
-
|
|
1025
|
+
J.label(y.$.decrementValue),
|
|
1009
1026
|
E({ icon: "line-md:minus", size: "xs" })
|
|
1010
1027
|
)
|
|
1011
1028
|
);
|
|
1012
1029
|
}) : null, m = p != null && d != null ? N(d, p) : p ?? d;
|
|
1013
1030
|
return W({
|
|
1014
1031
|
...t,
|
|
1015
|
-
input:
|
|
1016
|
-
s != null ? l.min(s) :
|
|
1017
|
-
r != null ? l.max(r) :
|
|
1032
|
+
input: se.number(
|
|
1033
|
+
s != null ? l.min(s) : S,
|
|
1034
|
+
r != null ? l.max(r) : S,
|
|
1018
1035
|
q(t),
|
|
1019
1036
|
l.valueAsNumber(e),
|
|
1020
1037
|
l.step(n),
|
|
1021
1038
|
l.class("bc-input bc-number-input"),
|
|
1022
|
-
b != null ? C.blur(P(b)) :
|
|
1023
|
-
i != null ? C.change(
|
|
1024
|
-
g != null ? C.input(
|
|
1039
|
+
b != null ? C.blur(P(b)) : S,
|
|
1040
|
+
i != null ? C.change(ke(i)) : S,
|
|
1041
|
+
g != null ? C.input(ke(g)) : S,
|
|
1025
1042
|
// Add wheel event support when step is defined
|
|
1026
1043
|
n != null ? C.wheel((y) => {
|
|
1027
1044
|
y.preventDefault();
|
|
1028
|
-
const o = f.get(e) ?? 0, a = f.get(n), D = y.shiftKey ? 10 : 1,
|
|
1045
|
+
const o = f.get(e) ?? 0, a = f.get(n), D = y.shiftKey ? 10 : 1, M = y.deltaY < 0 ? a * D : -a * D, u = v(G(o + M, a));
|
|
1029
1046
|
u !== o && i && i(u);
|
|
1030
|
-
}) :
|
|
1047
|
+
}) : S
|
|
1031
1048
|
),
|
|
1032
1049
|
after: m
|
|
1033
1050
|
});
|
|
@@ -1035,7 +1052,7 @@ const St = (t) => {
|
|
|
1035
1052
|
if (t == null || t === "") return null;
|
|
1036
1053
|
const e = Number(t);
|
|
1037
1054
|
return Number.isNaN(e) ? null : e;
|
|
1038
|
-
},
|
|
1055
|
+
}, At = (t) => {
|
|
1039
1056
|
const { value: e, step: n, min: s, max: r, onBlur: b, onChange: i, onInput: g, after: p } = t, v = (o) => {
|
|
1040
1057
|
const a = s != null ? f.get(s) : void 0, D = r != null ? f.get(r) : void 0;
|
|
1041
1058
|
return a != null && o < a ? a : D != null && o > D ? D : o;
|
|
@@ -1044,27 +1061,27 @@ const St = (t) => {
|
|
|
1044
1061
|
const o = V(
|
|
1045
1062
|
e,
|
|
1046
1063
|
s
|
|
1047
|
-
)((x,
|
|
1064
|
+
)((x, $) => {
|
|
1048
1065
|
const I = x ?? 0;
|
|
1049
|
-
return
|
|
1066
|
+
return $ == null ? !0 : I > $;
|
|
1050
1067
|
}), a = V(
|
|
1051
1068
|
e,
|
|
1052
1069
|
r
|
|
1053
|
-
)((x,
|
|
1070
|
+
)((x, $) => {
|
|
1054
1071
|
const I = x ?? 0;
|
|
1055
|
-
return
|
|
1072
|
+
return $ == null ? !0 : I < $;
|
|
1056
1073
|
}), D = (x) => {
|
|
1057
|
-
const
|
|
1074
|
+
const $ = f.get(e) ?? 0, I = f.get(n), A = x?.shiftKey ? 10 : 1, k = G($ - I * A, I), c = s != null ? f.get(s) : void 0;
|
|
1058
1075
|
if (c != null && k < c) return;
|
|
1059
1076
|
const w = v(k);
|
|
1060
|
-
w !==
|
|
1061
|
-
},
|
|
1062
|
-
const
|
|
1077
|
+
w !== $ && i && i(w);
|
|
1078
|
+
}, M = (x) => {
|
|
1079
|
+
const $ = f.get(e) ?? 0, I = f.get(n), A = x?.shiftKey ? 10 : 1, k = G($ + I * A, I), c = r != null ? f.get(r) : void 0;
|
|
1063
1080
|
if (c != null && k > c) return;
|
|
1064
1081
|
const w = v(k);
|
|
1065
|
-
w !==
|
|
1082
|
+
w !== $ && i && i(w);
|
|
1066
1083
|
};
|
|
1067
|
-
return ((x,
|
|
1084
|
+
return ((x, $) => Ae(
|
|
1068
1085
|
l.class("bc-number-input-steppers"),
|
|
1069
1086
|
h.button(
|
|
1070
1087
|
l.type("button"),
|
|
@@ -1077,8 +1094,8 @@ const St = (t) => {
|
|
|
1077
1094
|
t.disabled ?? !1
|
|
1078
1095
|
)((I, A) => !I || A)
|
|
1079
1096
|
),
|
|
1080
|
-
C.click((I) =>
|
|
1081
|
-
|
|
1097
|
+
C.click((I) => M(I)),
|
|
1098
|
+
J.label(x),
|
|
1082
1099
|
E({ icon: "line-md:plus", size: "xs" })
|
|
1083
1100
|
),
|
|
1084
1101
|
h.button(
|
|
@@ -1093,58 +1110,58 @@ const St = (t) => {
|
|
|
1093
1110
|
)((I, A) => !I || A)
|
|
1094
1111
|
),
|
|
1095
1112
|
C.click((I) => D(I)),
|
|
1096
|
-
|
|
1113
|
+
J.label($),
|
|
1097
1114
|
E({ icon: "line-md:minus", size: "xs" })
|
|
1098
1115
|
)
|
|
1099
1116
|
))(
|
|
1100
|
-
|
|
1101
|
-
|
|
1117
|
+
ce.incrementValue,
|
|
1118
|
+
ce.decrementValue
|
|
1102
1119
|
);
|
|
1103
|
-
})(), m =
|
|
1120
|
+
})(), m = Oe(
|
|
1104
1121
|
e,
|
|
1105
1122
|
t.disabled,
|
|
1106
1123
|
i ?? g
|
|
1107
1124
|
), y = p != null && d != null ? N(d, m, p) : p != null ? N(m, p) : d != null ? N(d, m) : m;
|
|
1108
1125
|
return W({
|
|
1109
1126
|
...t,
|
|
1110
|
-
input:
|
|
1127
|
+
input: se.number(
|
|
1111
1128
|
// min/max attributes and reactive watchers (no forced correction)
|
|
1112
|
-
s != null ? l.min(s) :
|
|
1113
|
-
r != null ? l.max(r) :
|
|
1129
|
+
s != null ? l.min(s) : S,
|
|
1130
|
+
r != null ? l.max(r) : S,
|
|
1114
1131
|
q(t),
|
|
1115
1132
|
// Represent null as empty string so the field can be cleared
|
|
1116
1133
|
l.value(f.map(e, (o) => o == null ? "" : String(o))),
|
|
1117
1134
|
l.step(n),
|
|
1118
1135
|
l.class("bc-input bc-number-input"),
|
|
1119
|
-
b != null ? C.blur(P(b)) :
|
|
1136
|
+
b != null ? C.blur(P(b)) : S,
|
|
1120
1137
|
i != null ? C.change(
|
|
1121
1138
|
P((o) => {
|
|
1122
1139
|
const a = Te(o);
|
|
1123
1140
|
i(a);
|
|
1124
1141
|
})
|
|
1125
|
-
) :
|
|
1142
|
+
) : S,
|
|
1126
1143
|
g != null ? C.input(
|
|
1127
1144
|
P((o) => {
|
|
1128
1145
|
const a = Te(o);
|
|
1129
1146
|
g(a);
|
|
1130
1147
|
})
|
|
1131
|
-
) :
|
|
1148
|
+
) : S,
|
|
1132
1149
|
// Wheel support when step is defined
|
|
1133
1150
|
n != null ? C.wheel((o) => {
|
|
1134
1151
|
o.preventDefault();
|
|
1135
|
-
const a = f.get(e) ?? 0, D = f.get(n),
|
|
1152
|
+
const a = f.get(e) ?? 0, D = f.get(n), M = o.shiftKey ? 10 : 1, u = o.deltaY < 0 ? D * M : -D * M, x = v(G(a + u, D));
|
|
1136
1153
|
x !== a && i && i(x);
|
|
1137
|
-
}) :
|
|
1154
|
+
}) : S
|
|
1138
1155
|
),
|
|
1139
1156
|
after: y
|
|
1140
1157
|
});
|
|
1141
|
-
},
|
|
1158
|
+
}, Lt = (t) => {
|
|
1142
1159
|
const e = {
|
|
1143
1160
|
type: "pattern",
|
|
1144
1161
|
pattern: /[0-9A-Fa-f]/,
|
|
1145
1162
|
transform: (s) => s.toLowerCase()
|
|
1146
1163
|
};
|
|
1147
|
-
return
|
|
1164
|
+
return Ee({
|
|
1148
1165
|
...t,
|
|
1149
1166
|
mask: [
|
|
1150
1167
|
e,
|
|
@@ -1187,21 +1204,21 @@ const St = (t) => {
|
|
|
1187
1204
|
// Sensible default placeholder; can be overridden via options.placeholder
|
|
1188
1205
|
placeholder: t.placeholder ?? "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
1189
1206
|
});
|
|
1190
|
-
},
|
|
1191
|
-
function
|
|
1207
|
+
}, dt = /^P(\d+([YMWD]|$)){0,4}(T(\d+([HMS]|$)){0,3})?$/i, mt = /^P(?:(\d+Y)?(\d+M)?(\d+W)?(\d+D)?)(T(\d+H)?(\d+M)?(\d+S)?)?$/i;
|
|
1208
|
+
function bt(t) {
|
|
1192
1209
|
return {
|
|
1193
1210
|
mask: null,
|
|
1194
1211
|
allowMode: "custom",
|
|
1195
1212
|
allow: (e) => /[0-9ptwdhms]/i.test(e),
|
|
1196
1213
|
pipe: (e) => {
|
|
1197
1214
|
const n = e.toUpperCase();
|
|
1198
|
-
return n.length === 0 ? n : !n.startsWith("P") || !
|
|
1215
|
+
return n.length === 0 ? n : !n.startsWith("P") || !dt.test(n) ? !1 : n;
|
|
1199
1216
|
},
|
|
1200
1217
|
completion: {
|
|
1201
1218
|
mode: "custom",
|
|
1202
1219
|
isComplete: (e) => {
|
|
1203
1220
|
const n = e.toUpperCase();
|
|
1204
|
-
if (!
|
|
1221
|
+
if (!mt.test(n)) return !1;
|
|
1205
1222
|
try {
|
|
1206
1223
|
return t(n), !0;
|
|
1207
1224
|
} catch {
|
|
@@ -1211,25 +1228,25 @@ function dt(t) {
|
|
|
1211
1228
|
}
|
|
1212
1229
|
};
|
|
1213
1230
|
}
|
|
1214
|
-
const
|
|
1231
|
+
const ze = (t, e) => {
|
|
1215
1232
|
if (t == null) return null;
|
|
1216
1233
|
try {
|
|
1217
1234
|
return t.Duration.from(e);
|
|
1218
1235
|
} catch {
|
|
1219
1236
|
return null;
|
|
1220
1237
|
}
|
|
1221
|
-
},
|
|
1238
|
+
}, Ut = (t) => {
|
|
1222
1239
|
const { value: e, onChange: n, onInput: s, after: r, disabled: b, onBlur: i } = t, g = () => {
|
|
1223
|
-
const d =
|
|
1240
|
+
const d = Oe(e, b, n ?? s);
|
|
1224
1241
|
return r != null ? N(d, r) : d;
|
|
1225
|
-
}, p = t.placeholder != null ?
|
|
1226
|
-
return
|
|
1227
|
-
(d) =>
|
|
1242
|
+
}, p = t.placeholder != null ? S : l.placeholder("P0DT0H0M0S");
|
|
1243
|
+
return Qe(
|
|
1244
|
+
(d) => Ee({
|
|
1228
1245
|
...t,
|
|
1229
1246
|
value: f.map(e, (m) => m?.toString() ?? ""),
|
|
1230
1247
|
onChange: n ? (m) => n(m === "" ? null : d.Duration.from(m)) : void 0,
|
|
1231
1248
|
onInput: void 0,
|
|
1232
|
-
...
|
|
1249
|
+
...bt(d.Duration.from),
|
|
1233
1250
|
placeholder: "P0DT0H0M0S",
|
|
1234
1251
|
after: g()
|
|
1235
1252
|
}),
|
|
@@ -1240,47 +1257,47 @@ const Se = (t, e) => {
|
|
|
1240
1257
|
m(null);
|
|
1241
1258
|
return;
|
|
1242
1259
|
}
|
|
1243
|
-
const D = globalThis.Temporal,
|
|
1244
|
-
if (
|
|
1245
|
-
m(
|
|
1260
|
+
const D = globalThis.Temporal, M = ze(D, a);
|
|
1261
|
+
if (M != null) {
|
|
1262
|
+
m(M);
|
|
1246
1263
|
return;
|
|
1247
1264
|
}
|
|
1248
|
-
|
|
1249
|
-
const x =
|
|
1265
|
+
he().then((u) => {
|
|
1266
|
+
const x = ze(u, a);
|
|
1250
1267
|
x != null && m(x);
|
|
1251
1268
|
}).catch(() => {
|
|
1252
1269
|
});
|
|
1253
1270
|
};
|
|
1254
1271
|
return W({
|
|
1255
1272
|
...t,
|
|
1256
|
-
input:
|
|
1273
|
+
input: se.text(
|
|
1257
1274
|
q(t),
|
|
1258
1275
|
l.value(f.map(e, (m) => m?.toString() ?? "")),
|
|
1259
1276
|
l.class("bc-input"),
|
|
1260
1277
|
p,
|
|
1261
|
-
i != null ? C.blur(() => i()) :
|
|
1262
|
-
n != null ? C.change(d(n)) :
|
|
1263
|
-
s != null ? C.input(d(s)) :
|
|
1278
|
+
i != null ? C.blur(() => i()) : S,
|
|
1279
|
+
n != null ? C.change(d(n)) : S,
|
|
1280
|
+
s != null ? C.input(d(s)) : S
|
|
1264
1281
|
),
|
|
1265
1282
|
after: g()
|
|
1266
1283
|
});
|
|
1267
1284
|
} }
|
|
1268
1285
|
);
|
|
1269
|
-
},
|
|
1286
|
+
}, Et = (t) => {
|
|
1270
1287
|
const { value: e, onBlur: n, onChange: s, onInput: r } = t;
|
|
1271
1288
|
return W({
|
|
1272
1289
|
...t,
|
|
1273
|
-
input:
|
|
1290
|
+
input: se.url(
|
|
1274
1291
|
q(t),
|
|
1275
1292
|
l.value(e),
|
|
1276
1293
|
l.class("bc-input"),
|
|
1277
|
-
n != null ? C.blur(P(n)) :
|
|
1278
|
-
s != null ? C.change(P(s)) :
|
|
1279
|
-
r != null ? C.input(P(r)) :
|
|
1294
|
+
n != null ? C.blur(P(n)) : S,
|
|
1295
|
+
s != null ? C.change(P(s)) : S,
|
|
1296
|
+
r != null ? C.input(P(r)) : S
|
|
1280
1297
|
)
|
|
1281
1298
|
});
|
|
1282
1299
|
};
|
|
1283
|
-
function
|
|
1300
|
+
function ht(t, e) {
|
|
1284
1301
|
const {
|
|
1285
1302
|
onMove: n,
|
|
1286
1303
|
cannotMoveUp: s,
|
|
@@ -1295,7 +1312,7 @@ function mt(t, e) {
|
|
|
1295
1312
|
i,
|
|
1296
1313
|
() => h.div(
|
|
1297
1314
|
l.class("bc-list-item-controls__move"),
|
|
1298
|
-
|
|
1315
|
+
be(
|
|
1299
1316
|
{
|
|
1300
1317
|
size: "xs",
|
|
1301
1318
|
roundedness: "full",
|
|
@@ -1312,7 +1329,7 @@ function mt(t, e) {
|
|
|
1312
1329
|
})
|
|
1313
1330
|
)
|
|
1314
1331
|
),
|
|
1315
|
-
|
|
1332
|
+
be(
|
|
1316
1333
|
{
|
|
1317
1334
|
size: "xs",
|
|
1318
1335
|
roundedness: "full",
|
|
@@ -1334,7 +1351,7 @@ function mt(t, e) {
|
|
|
1334
1351
|
g,
|
|
1335
1352
|
() => O(
|
|
1336
1353
|
F,
|
|
1337
|
-
(a) =>
|
|
1354
|
+
(a) => oe({
|
|
1338
1355
|
size: "xs",
|
|
1339
1356
|
label: f.map(a.$.removeItem, (D) => D.toLowerCase()),
|
|
1340
1357
|
color: "danger",
|
|
@@ -1369,7 +1386,7 @@ function mt(t, e) {
|
|
|
1369
1386
|
)
|
|
1370
1387
|
);
|
|
1371
1388
|
}
|
|
1372
|
-
const
|
|
1389
|
+
const gt = (t) => {
|
|
1373
1390
|
const {
|
|
1374
1391
|
controller: e,
|
|
1375
1392
|
element: n,
|
|
@@ -1384,11 +1401,11 @@ const bt = (t) => {
|
|
|
1384
1401
|
addDisabled: m
|
|
1385
1402
|
} = t, y = U(
|
|
1386
1403
|
V(i, g)((o, a) => o && a != null),
|
|
1387
|
-
() =>
|
|
1404
|
+
() => $e(
|
|
1388
1405
|
l.class(
|
|
1389
1406
|
"bc-group--gap-2 bc-group--align-center bc-group--justify-center"
|
|
1390
1407
|
),
|
|
1391
|
-
|
|
1408
|
+
be(
|
|
1392
1409
|
{
|
|
1393
1410
|
size: "sm",
|
|
1394
1411
|
variant: "filled",
|
|
@@ -1402,7 +1419,7 @@ const bt = (t) => {
|
|
|
1402
1419
|
},
|
|
1403
1420
|
O(
|
|
1404
1421
|
F,
|
|
1405
|
-
(o) =>
|
|
1422
|
+
(o) => $e(
|
|
1406
1423
|
l.class("bc-group--gap-2"),
|
|
1407
1424
|
E({ icon: "line-md:plus" }),
|
|
1408
1425
|
p ?? o.$.addLabel
|
|
@@ -1412,9 +1429,9 @@ const bt = (t) => {
|
|
|
1412
1429
|
)
|
|
1413
1430
|
);
|
|
1414
1431
|
return N(
|
|
1415
|
-
|
|
1432
|
+
ct(
|
|
1416
1433
|
e,
|
|
1417
|
-
(o) =>
|
|
1434
|
+
(o) => ht(
|
|
1418
1435
|
{
|
|
1419
1436
|
onMove: o.move,
|
|
1420
1437
|
cannotMoveUp: o.cannotMove("up"),
|
|
@@ -1432,7 +1449,7 @@ const bt = (t) => {
|
|
|
1432
1449
|
),
|
|
1433
1450
|
y
|
|
1434
1451
|
);
|
|
1435
|
-
},
|
|
1452
|
+
}, Ot = (t, ...e) => {
|
|
1436
1453
|
const {
|
|
1437
1454
|
controller: n,
|
|
1438
1455
|
element: s,
|
|
@@ -1447,10 +1464,10 @@ const bt = (t) => {
|
|
|
1447
1464
|
addDisabled: y,
|
|
1448
1465
|
...o
|
|
1449
1466
|
} = t;
|
|
1450
|
-
return
|
|
1467
|
+
return Ve(
|
|
1451
1468
|
{
|
|
1452
1469
|
...o,
|
|
1453
|
-
content:
|
|
1470
|
+
content: gt({
|
|
1454
1471
|
controller: n,
|
|
1455
1472
|
element: s,
|
|
1456
1473
|
separator: r,
|
|
@@ -1467,7 +1484,7 @@ const bt = (t) => {
|
|
|
1467
1484
|
...e
|
|
1468
1485
|
);
|
|
1469
1486
|
};
|
|
1470
|
-
class
|
|
1487
|
+
class Ft extends fe {
|
|
1471
1488
|
/** The immutable list of branch definitions for this union */
|
|
1472
1489
|
branches;
|
|
1473
1490
|
/** Reactive signal containing the key of the currently active branch */
|
|
@@ -1487,7 +1504,7 @@ class Et extends ue {
|
|
|
1487
1504
|
* @param branches - Array of branch definitions describing the possible value types
|
|
1488
1505
|
* @param equals - Optional equality function for comparing values. Defaults to `strictEqual`.
|
|
1489
1506
|
*/
|
|
1490
|
-
constructor(e, n, s, r, b, i, g =
|
|
1507
|
+
constructor(e, n, s, r, b, i, g = K) {
|
|
1491
1508
|
super(e, n, s, r, b, g), this.branches = i;
|
|
1492
1509
|
const p = (d) => {
|
|
1493
1510
|
for (const m of i)
|
|
@@ -1495,14 +1512,14 @@ class Et extends ue {
|
|
|
1495
1512
|
return m.key;
|
|
1496
1513
|
return i[0]?.key ?? "unknown";
|
|
1497
1514
|
};
|
|
1498
|
-
this.activeBranch = s.map(p,
|
|
1515
|
+
this.activeBranch = s.map(p, K);
|
|
1499
1516
|
const v = (d) => {
|
|
1500
1517
|
if (this.#e.has(d))
|
|
1501
1518
|
return this.#e.get(d);
|
|
1502
1519
|
const m = i.find((o) => o.key === d);
|
|
1503
1520
|
if (!m)
|
|
1504
1521
|
throw new Error(`Unknown branch: ${d}`);
|
|
1505
|
-
const y = new
|
|
1522
|
+
const y = new fe(
|
|
1506
1523
|
[...e, d],
|
|
1507
1524
|
(o) => {
|
|
1508
1525
|
this.change(o);
|
|
@@ -1511,7 +1528,7 @@ class Et extends ue {
|
|
|
1511
1528
|
(o) => m.detect(o) ? o : m.defaultValue(),
|
|
1512
1529
|
g
|
|
1513
1530
|
),
|
|
1514
|
-
r.map(
|
|
1531
|
+
r.map(Ie([d])),
|
|
1515
1532
|
{
|
|
1516
1533
|
disabled: this.disabled,
|
|
1517
1534
|
validationMode: this.parent.validationMode
|
|
@@ -1522,7 +1539,7 @@ class Et extends ue {
|
|
|
1522
1539
|
};
|
|
1523
1540
|
this.#t = this.activeBranch.map(
|
|
1524
1541
|
(d) => v(d),
|
|
1525
|
-
|
|
1542
|
+
K
|
|
1526
1543
|
), this.onDispose(() => {
|
|
1527
1544
|
for (const d of this.#e.values())
|
|
1528
1545
|
d.dispose();
|
|
@@ -1555,21 +1572,21 @@ class Et extends ue {
|
|
|
1555
1572
|
throw new Error(`Unknown branch: ${e}`);
|
|
1556
1573
|
if (this.#e.has(e))
|
|
1557
1574
|
return this.#e.get(e);
|
|
1558
|
-
const s = new
|
|
1575
|
+
const s = new fe(
|
|
1559
1576
|
[...this.path, e],
|
|
1560
1577
|
(r) => {
|
|
1561
1578
|
this.change(r);
|
|
1562
1579
|
},
|
|
1563
1580
|
this.signal.map(
|
|
1564
1581
|
(r) => n.detect(r) ? r : n.defaultValue(),
|
|
1565
|
-
|
|
1582
|
+
K
|
|
1566
1583
|
),
|
|
1567
|
-
this.status.map(
|
|
1584
|
+
this.status.map(Ie([e])),
|
|
1568
1585
|
{
|
|
1569
1586
|
disabled: this.disabled,
|
|
1570
1587
|
validationMode: this.parent.validationMode
|
|
1571
1588
|
},
|
|
1572
|
-
|
|
1589
|
+
K
|
|
1573
1590
|
);
|
|
1574
1591
|
return this.#e.set(e, s), s;
|
|
1575
1592
|
}
|
|
@@ -1599,7 +1616,7 @@ class Et extends ue {
|
|
|
1599
1616
|
if (i.ok)
|
|
1600
1617
|
return this.change(i.value), !0;
|
|
1601
1618
|
}
|
|
1602
|
-
if (n && typeof window == "object" && typeof window.confirm == "function" && !window.confirm(
|
|
1619
|
+
if (n && typeof window == "object" && typeof window.confirm == "function" && !window.confirm(ce.changeTypeConfirmation))
|
|
1603
1620
|
return !1;
|
|
1604
1621
|
const b = s.defaultValue();
|
|
1605
1622
|
return this.change(b), !0;
|
|
@@ -1614,72 +1631,73 @@ class Et extends ue {
|
|
|
1614
1631
|
return this.branches.find((n) => n.key === e);
|
|
1615
1632
|
}
|
|
1616
1633
|
}
|
|
1617
|
-
function
|
|
1634
|
+
function Rt(t) {
|
|
1618
1635
|
return t.transform(
|
|
1619
1636
|
(e) => e ?? null,
|
|
1620
1637
|
(e) => e ?? void 0
|
|
1621
1638
|
);
|
|
1622
1639
|
}
|
|
1623
|
-
function
|
|
1640
|
+
function Nt(t) {
|
|
1624
1641
|
return t.transform(
|
|
1625
1642
|
(e) => e ?? "",
|
|
1626
1643
|
(e) => e === "" ? void 0 : e
|
|
1627
1644
|
);
|
|
1628
1645
|
}
|
|
1629
|
-
function
|
|
1646
|
+
function Pt(t) {
|
|
1630
1647
|
return t.transform(
|
|
1631
1648
|
(e) => e ?? void 0,
|
|
1632
1649
|
(e) => e ?? null
|
|
1633
1650
|
);
|
|
1634
1651
|
}
|
|
1635
|
-
function
|
|
1652
|
+
function re(t) {
|
|
1636
1653
|
return t !== null && typeof t == "object" && !Array.isArray(t) && Object.prototype.toString.call(t) === "[object Object]";
|
|
1637
1654
|
}
|
|
1638
|
-
function
|
|
1655
|
+
function vt(t, e) {
|
|
1639
1656
|
if (e == null)
|
|
1640
|
-
return
|
|
1657
|
+
return Be(t);
|
|
1641
1658
|
if (t == null)
|
|
1642
1659
|
return e;
|
|
1643
|
-
if (
|
|
1660
|
+
if (re(t) && re(e)) {
|
|
1644
1661
|
const n = { ...e };
|
|
1645
1662
|
for (const s of Object.keys(t))
|
|
1646
|
-
n[s] === void 0 ? n[s] =
|
|
1663
|
+
n[s] === void 0 ? n[s] = Be(t[s]) : re(t[s]) && re(n[s]) && (n[s] = vt(t[s], n[s]));
|
|
1647
1664
|
return n;
|
|
1648
1665
|
}
|
|
1649
1666
|
return e;
|
|
1650
1667
|
}
|
|
1651
|
-
function
|
|
1668
|
+
function Be(t) {
|
|
1652
1669
|
return typeof structuredClone == "function" ? structuredClone(t) : JSON.parse(JSON.stringify(t));
|
|
1653
1670
|
}
|
|
1654
1671
|
export {
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1672
|
+
gt as B,
|
|
1673
|
+
lt as E,
|
|
1674
|
+
St as F,
|
|
1675
|
+
$e as G,
|
|
1676
|
+
Ot as L,
|
|
1677
|
+
Ee as M,
|
|
1678
|
+
Oe as N,
|
|
1679
|
+
Mt as S,
|
|
1680
|
+
Bt as T,
|
|
1681
|
+
Lt as U,
|
|
1682
|
+
Qe as W,
|
|
1683
|
+
Et as a,
|
|
1684
|
+
it as b,
|
|
1685
|
+
Ut as c,
|
|
1686
|
+
bt as d,
|
|
1687
|
+
Nt as e,
|
|
1688
|
+
At as f,
|
|
1689
|
+
Vt as g,
|
|
1690
|
+
zt as h,
|
|
1691
|
+
Ft as i,
|
|
1692
|
+
vt as j,
|
|
1693
|
+
ot as k,
|
|
1694
|
+
ct as l,
|
|
1695
|
+
ht as m,
|
|
1696
|
+
de as n,
|
|
1697
|
+
Tt as o,
|
|
1698
|
+
rt as p,
|
|
1699
|
+
he as q,
|
|
1700
|
+
G as r,
|
|
1701
|
+
Pt as s,
|
|
1702
|
+
Rt as t
|
|
1685
1703
|
};
|