@tempots/beatui 0.39.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/dist/{2019-1S9vgvv2.cjs → 2019-BFDr925O.cjs} +1 -1
- package/dist/{2019-DPD_eCKE.js → 2019-DnG5Y5sm.js} +2 -2
- package/dist/{2020-aLm9VmDL.js → 2020-D0-tZTo7.js} +2 -2
- package/dist/{2020-CGrbEEmD.cjs → 2020-gUs7l1CJ.cjs} +1 -1
- package/dist/{ar-B0vT_MPe.cjs → ar-BLgxAefV.cjs} +1 -1
- package/dist/{ar-CbM09z5P.js → ar-DpQo8C31.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +54 -49
- package/dist/beatui.css +216 -129
- package/dist/beatui.tailwind.css +216 -129
- package/dist/{de-tK36cL_u.cjs → de-Bv-qs--J.cjs} +1 -1
- package/dist/{de-Dd907tZQ.js → de-D1MQ4wen.js} +1 -1
- package/dist/{es-K35LRZa-.cjs → es-3r8Ko5Dn.cjs} +1 -1
- package/dist/{es-BkJxjMdG.js → es-DwPjonS7.js} +1 -1
- package/dist/{fa-BBikwwku.cjs → fa-Qw6uVZeX.cjs} +1 -1
- package/dist/{fa-DBTUBsw_.js → fa-fxf_lWjh.js} +1 -1
- package/dist/{fr-Fmupo556.js → fr-BDDsMHRZ.js} +1 -1
- package/dist/{fr-DMtXrrnJ.cjs → fr-pVhG9qik.cjs} +1 -1
- package/dist/{he-DkI64oaY.js → he-B4deK_wE.js} +1 -1
- package/dist/{he-on3Ivp8g.cjs → he-D-fvzfe1.cjs} +1 -1
- package/dist/{hi-GdD5MihT.js → hi-CxQT8nRD.js} +1 -1
- package/dist/{hi-CNFV8ITE.cjs → hi-DKgxHzmH.cjs} +1 -1
- package/dist/{index-BK8t6gqu.js → index-Acyxme63.js} +680 -677
- package/dist/{index-e8oQ-k0x.cjs → index-BZ2AX5sk.cjs} +4 -4
- package/dist/{index-BfFlhmAq.js → index-BwEJlbG2.js} +1 -1
- package/dist/{index-DjShJtXp.js → index-CAeOFdez.js} +1 -1
- package/dist/{index-BI5w0jSz.js → index-CBT2SLat.js} +224 -223
- package/dist/{index-BkQ7xHgi.js → index-CWq36UAJ.js} +770 -757
- package/dist/{index-Bv2gn_kV.cjs → index-ClFVnBUS.cjs} +3 -3
- package/dist/{index-LUItEwlw.js → index-Clw0AwwJ.js} +1 -1
- package/dist/{index-wdi93sK4.cjs → index-DRDJFYRb.cjs} +1 -1
- package/dist/{index-CKyH3jwP.cjs → index-KPHFBjQB.cjs} +1 -1
- package/dist/{index-BA93M8Ux.cjs → index-Lj0QS2po.cjs} +1 -1
- package/dist/{index-CPBlySmE.cjs → index-nVVPqgLq.cjs} +12 -12
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +2200 -2181
- package/dist/{it-Bpnfd60V.js → it-6QS5PWzQ.js} +1 -1
- package/dist/{it-BDOzBRkQ.cjs → it-Ck0r9TO3.cjs} +1 -1
- package/dist/{ja-SjlGNgs9.js → ja-D2VvVGEN.js} +1 -1
- package/dist/{ja-N-7c7zD7.cjs → ja-D6b9suYB.cjs} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +1 -1
- package/dist/{ko-CH69ZNts.js → ko-CP_WopWz.js} +1 -1
- package/dist/{ko-BBeTXIlY.cjs → ko-CzvM2Bjv.cjs} +1 -1
- package/dist/markdown/index.cjs.js +1 -1
- package/dist/markdown/index.es.js +1 -1
- package/dist/modal-BmSRMdY9.cjs +1 -0
- package/dist/{modal-BD76Rve3.js → modal-DMc-R2VT.js} +234 -209
- package/dist/{nl-DnvMlW8v.js → nl-DZ4dFolZ.js} +1 -1
- package/dist/{nl-C2C9QDH2.cjs → nl-_9vJc8JD.cjs} +1 -1
- package/dist/{notice-CQZseCQs.js → notice-B5Yn_3Ay.js} +205 -195
- package/dist/notice-D3P0lewM.cjs +2 -0
- package/dist/{pl-CBEX2qN1.js → pl-BE81iFSF.js} +1 -1
- package/dist/{pl-sNBCzEUd.cjs → pl-DKcVCojx.cjs} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-ByFqFAdQ.js → pt-BcCdXUA2.js} +1 -1
- package/dist/{pt-Bvxg9VEA.cjs → pt-DNVS1_MF.cjs} +1 -1
- package/dist/{ru-6d5JfoDw.js → ru-Bo_jc3s1.js} +1 -1
- package/dist/{ru-CPAdsn4m.cjs → ru-DTn9Rssv.cjs} +1 -1
- package/dist/{toolbar-Cl_TAa3r.js → toolbar-DhD5GmMa.js} +1 -1
- package/dist/{toolbar-Dw2VQD9y.cjs → toolbar-jPGzdJGi.cjs} +1 -1
- package/dist/{tr-IKZtCQQR.cjs → tr-BhTJYHQ3.cjs} +1 -1
- package/dist/{tr-gv4vJfm8.js → tr-CBw3FlOg.js} +1 -1
- package/dist/{translations-DXLmnUiB.js → translations-B0HuWYIz.js} +1 -1
- package/dist/{translations-CK426qyd.cjs → translations-B7_3phoA.cjs} +1 -1
- package/dist/translations-C21osktO.cjs +1 -0
- package/dist/{translations-djDSPqdb.js → translations-D-fMB_IO.js} +212 -183
- package/dist/types/components/form/controller/color-controller.d.ts +1 -1
- package/dist/types/components/form/input/color-input.d.ts +2 -5
- package/dist/types/components/form/input/color-swatch-input.d.ts +9 -0
- package/dist/types/components/form/input/index.d.ts +1 -0
- package/dist/types/components/form/input/input-container.d.ts +7 -0
- package/dist/types/components/misc/notification-provider.d.ts +3 -3
- package/dist/types/utils/{color-validation.d.ts → color.d.ts} +13 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/use-animated-toggle.d.ts +17 -4
- package/dist/{ur-Bgq_2yjr.cjs → ur-BjuXyU8Z.cjs} +1 -1
- package/dist/{ur-Bo6bjEBS.js → ur-BsXnPgxd.js} +1 -1
- package/dist/utils-BOEQMy82.js +2512 -0
- package/dist/utils-DH-SYrQg.cjs +1 -0
- package/dist/{vi-BrUQnj-8.cjs → vi-CvsTHMkK.cjs} +1 -1
- package/dist/{vi-xDLJ3TIx.js → vi-D1rLo6MX.js} +1 -1
- package/dist/{zh-BivWxJJh.js → zh-BoLsjdfz.js} +1 -1
- package/dist/{zh-BqH1Cioq.cjs → zh-zh1FJ4Ud.cjs} +1 -1
- package/package.json +4 -3
- package/dist/modal-DQycMZ8_.cjs +0 -1
- package/dist/notice-CFoc4PJe.cjs +0 -2
- package/dist/translations-DJR65Jii.cjs +0 -1
- package/dist/utils-Bsrfm-0d.cjs +0 -1
- package/dist/utils-Bw911Eo4.js +0 -2418
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { makeProviderMark as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
function
|
|
1
|
+
import { makeProviderMark as O, localStorageProp as T, computedOf as p, Use as A, html as f, attr as c, When as w, Fragment as y, aria as g, coalesce as z, style as D, prop as $, on as I, OnDispose as M, Value as L, WithElement as K, input as W, Empty as S, emitValue as _ } from "@tempots/dom";
|
|
2
|
+
import { WhenInViewport as J, Query as Q, ElementRect as Y } from "@tempots/ui";
|
|
3
|
+
import { b as Z, g as X } from "./colors-WfmhQ5e1.js";
|
|
4
|
+
function E(t, {
|
|
5
5
|
units: e = ["B", "KB", "MB", "GB", "TB"],
|
|
6
6
|
decimalPlaces: n = 0,
|
|
7
7
|
locale: o
|
|
@@ -13,21 +13,21 @@ function T(t, {
|
|
|
13
13
|
unitDisplay: "short",
|
|
14
14
|
maximumFractionDigits: 0
|
|
15
15
|
}).format(0).replace("byte", e[0]);
|
|
16
|
-
let
|
|
16
|
+
let a, r;
|
|
17
17
|
if (typeof t == "bigint") {
|
|
18
18
|
let l = t < 0n ? -t : t;
|
|
19
|
-
for (
|
|
20
|
-
l = l / 1024n,
|
|
21
|
-
|
|
19
|
+
for (a = 0; l >= 1024n && a < e.length - 1; )
|
|
20
|
+
l = l / 1024n, a++;
|
|
21
|
+
r = Number(t) / Math.pow(1024, a);
|
|
22
22
|
} else
|
|
23
|
-
|
|
23
|
+
a = Math.floor(Math.log(Math.abs(t)) / Math.log(1024)), a = Math.min(a, e.length - 1), r = t / Math.pow(1024, a);
|
|
24
24
|
return new Intl.NumberFormat(o, {
|
|
25
25
|
style: "unit",
|
|
26
26
|
unit: "byte",
|
|
27
27
|
unitDisplay: "short",
|
|
28
|
-
minimumFractionDigits:
|
|
29
|
-
maximumFractionDigits:
|
|
30
|
-
}).format(
|
|
28
|
+
minimumFractionDigits: a === 0 ? 0 : n,
|
|
29
|
+
maximumFractionDigits: a === 0 ? 0 : n
|
|
30
|
+
}).format(r).replace("byte", e[a]);
|
|
31
31
|
}
|
|
32
32
|
const N = {
|
|
33
33
|
loadingExtended: "Loading, please wait",
|
|
@@ -90,19 +90,19 @@ const N = {
|
|
|
90
90
|
filesInputInstructions: (t, e, n) => {
|
|
91
91
|
let o = t == null || t > 1 ? "Click to choose or drag files here" : "Click to choose or drag a file here";
|
|
92
92
|
if (t || e) {
|
|
93
|
-
const
|
|
94
|
-
if (t != null && t > 1 &&
|
|
95
|
-
const
|
|
93
|
+
const a = [];
|
|
94
|
+
if (t != null && t > 1 && a.push(`up to ${t} files`), e && n) {
|
|
95
|
+
const r = E(e, {
|
|
96
96
|
units: n
|
|
97
97
|
});
|
|
98
|
-
|
|
98
|
+
a.push(`max ${r} each`);
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
a.length > 0 && (o += ` (${a.join(", ")})`);
|
|
101
101
|
} else if (e && n) {
|
|
102
|
-
const
|
|
102
|
+
const a = E(e, {
|
|
103
103
|
units: n
|
|
104
104
|
});
|
|
105
|
-
o += ` (max ${
|
|
105
|
+
o += ` (max ${a})`;
|
|
106
106
|
}
|
|
107
107
|
return o;
|
|
108
108
|
},
|
|
@@ -126,8 +126,8 @@ const N = {
|
|
|
126
126
|
default: N
|
|
127
127
|
}, Symbol.toStringTag, { value: "Module" })), et = N, ot = "en", nt = (t, e, n) => {
|
|
128
128
|
const o = t[e];
|
|
129
|
-
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((
|
|
130
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
129
|
+
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((a, r) => {
|
|
130
|
+
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(r.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== n ? ". Note that variables only represent file names one level deep." : ""))));
|
|
131
131
|
});
|
|
132
132
|
}, rt = /* @__PURE__ */ new Set([
|
|
133
133
|
"ar",
|
|
@@ -190,27 +190,27 @@ function Vt(t, e) {
|
|
|
190
190
|
return st[e][t];
|
|
191
191
|
}
|
|
192
192
|
const lt = {
|
|
193
|
-
mark:
|
|
193
|
+
mark: O("Locale"),
|
|
194
194
|
create: (t) => {
|
|
195
|
-
const e =
|
|
195
|
+
const e = T({
|
|
196
196
|
defaultValue: navigator.language ?? "en-US",
|
|
197
197
|
key: "beatui-locale"
|
|
198
|
-
}), n =
|
|
198
|
+
}), n = T({
|
|
199
199
|
defaultValue: "auto",
|
|
200
200
|
key: "beatui-direction-preference"
|
|
201
|
-
}), o =
|
|
201
|
+
}), o = p(
|
|
202
202
|
e,
|
|
203
203
|
n
|
|
204
204
|
)(
|
|
205
|
-
(
|
|
205
|
+
(r, s) => at(s, r)
|
|
206
206
|
);
|
|
207
207
|
return {
|
|
208
208
|
value: {
|
|
209
209
|
locale: e,
|
|
210
|
-
setLocale: (
|
|
210
|
+
setLocale: (r) => e.set(r),
|
|
211
211
|
direction: o,
|
|
212
212
|
directionPreference: n,
|
|
213
|
-
setDirectionPreference: (
|
|
213
|
+
setDirectionPreference: (r) => n.set(r)
|
|
214
214
|
},
|
|
215
215
|
dispose: () => {
|
|
216
216
|
e.dispose(), n.dispose(), o.dispose();
|
|
@@ -220,8 +220,8 @@ const lt = {
|
|
|
220
220
|
}, {
|
|
221
221
|
variants: it,
|
|
222
222
|
special: ct,
|
|
223
|
-
overrides:
|
|
224
|
-
} =
|
|
223
|
+
overrides: j
|
|
224
|
+
} = Z;
|
|
225
225
|
function k(t, e) {
|
|
226
226
|
switch (t) {
|
|
227
227
|
case "white":
|
|
@@ -231,7 +231,7 @@ function k(t, e) {
|
|
|
231
231
|
case "transparent":
|
|
232
232
|
return "transparent";
|
|
233
233
|
default:
|
|
234
|
-
return
|
|
234
|
+
return X(t, e);
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
function U(t, e) {
|
|
@@ -239,28 +239,28 @@ function U(t, e) {
|
|
|
239
239
|
if (!n) return;
|
|
240
240
|
if (e === "light")
|
|
241
241
|
return n;
|
|
242
|
-
const o =
|
|
242
|
+
const o = j[t];
|
|
243
243
|
return o ? o[e] : n;
|
|
244
244
|
}
|
|
245
245
|
function x(t, e, n) {
|
|
246
|
-
const o =
|
|
246
|
+
const o = j[t];
|
|
247
247
|
if (o) {
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
250
|
-
return { backgroundColor:
|
|
248
|
+
const r = o[n];
|
|
249
|
+
if (r)
|
|
250
|
+
return { backgroundColor: r.backgroundColor, textColor: r.color };
|
|
251
251
|
}
|
|
252
252
|
if (e === "solid") {
|
|
253
|
-
const
|
|
254
|
-
if (
|
|
253
|
+
const r = U(t, n);
|
|
254
|
+
if (r)
|
|
255
255
|
return {
|
|
256
|
-
backgroundColor:
|
|
257
|
-
textColor:
|
|
256
|
+
backgroundColor: r.backgroundColor,
|
|
257
|
+
textColor: r.color
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
-
const
|
|
260
|
+
const a = it[e][n];
|
|
261
261
|
return {
|
|
262
|
-
backgroundColor: k(t,
|
|
263
|
-
textColor:
|
|
262
|
+
backgroundColor: k(t, a.bgShade),
|
|
263
|
+
textColor: a.textColor
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
const ut = {
|
|
@@ -273,19 +273,19 @@ const ut = {
|
|
|
273
273
|
light: { shade: 400, textColor: "var(--text-normal-light)" },
|
|
274
274
|
dark: { shade: 600, textColor: "var(--text-normal-dark)" }
|
|
275
275
|
};
|
|
276
|
-
function
|
|
277
|
-
const o =
|
|
276
|
+
function m(t, e, n) {
|
|
277
|
+
const o = j[t];
|
|
278
278
|
if (o) {
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
281
|
-
return { backgroundColor:
|
|
279
|
+
const r = o[n];
|
|
280
|
+
if (r)
|
|
281
|
+
return { backgroundColor: r.backgroundColor, textColor: r.color };
|
|
282
282
|
}
|
|
283
283
|
if (e === "solid") {
|
|
284
|
-
const
|
|
285
|
-
if (
|
|
284
|
+
const r = U(t, n);
|
|
285
|
+
if (r)
|
|
286
286
|
return {
|
|
287
|
-
backgroundColor:
|
|
288
|
-
textColor:
|
|
287
|
+
backgroundColor: r.backgroundColor,
|
|
288
|
+
textColor: r.color
|
|
289
289
|
};
|
|
290
290
|
const s = ut[n];
|
|
291
291
|
return {
|
|
@@ -293,13 +293,13 @@ function p(t, e, n) {
|
|
|
293
293
|
textColor: s.textColor
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
|
-
const
|
|
296
|
+
const a = e === "light" ? dt[n] : ht[n];
|
|
297
297
|
return {
|
|
298
|
-
backgroundColor: k(t,
|
|
299
|
-
textColor:
|
|
298
|
+
backgroundColor: k(t, a.shade),
|
|
299
|
+
textColor: a.textColor
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function V(t, e) {
|
|
303
303
|
const n = e === "light" ? 500 : 600;
|
|
304
304
|
switch (t) {
|
|
305
305
|
case "white":
|
|
@@ -315,10 +315,10 @@ function E(t, e) {
|
|
|
315
315
|
function C(t, e) {
|
|
316
316
|
return t === "white" ? "var(--color-white)" : t === "black" ? "var(--color-black)" : t === "transparent" ? "inherit" : k(t, e === "light" ? 800 : 200);
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function R(t, e, n) {
|
|
319
319
|
return e === "soft" ? k(t, n === "light" ? 300 : 700) : k(t, n === "light" ? 500 : 600);
|
|
320
320
|
}
|
|
321
|
-
const bt = "bui-icons",
|
|
321
|
+
const bt = "bui-icons", B = /* @__PURE__ */ new Map(), H = (() => {
|
|
322
322
|
try {
|
|
323
323
|
return typeof indexedDB < "u" && indexedDB !== null;
|
|
324
324
|
} catch {
|
|
@@ -329,8 +329,8 @@ function gt() {
|
|
|
329
329
|
return H ? new Promise((t, e) => {
|
|
330
330
|
const n = indexedDB.open(bt, 1);
|
|
331
331
|
n.onupgradeneeded = function(o) {
|
|
332
|
-
const
|
|
333
|
-
|
|
332
|
+
const a = o.target.result;
|
|
333
|
+
a.objectStoreNames.contains("icons") || a.createObjectStore("icons");
|
|
334
334
|
}, n.onsuccess = function() {
|
|
335
335
|
t(n.result);
|
|
336
336
|
}, n.onerror = function() {
|
|
@@ -338,32 +338,32 @@ function gt() {
|
|
|
338
338
|
};
|
|
339
339
|
}) : Promise.reject(new Error("IndexedDB not available"));
|
|
340
340
|
}
|
|
341
|
-
const
|
|
341
|
+
const P = H ? gt() : null;
|
|
342
342
|
function ft(t, e) {
|
|
343
343
|
return new Promise(async (n, o) => {
|
|
344
344
|
try {
|
|
345
|
-
if (
|
|
346
|
-
const
|
|
347
|
-
|
|
345
|
+
if (P) {
|
|
346
|
+
const r = (await P).transaction("icons", "readwrite");
|
|
347
|
+
r.objectStore("icons").put(e, t), r.oncomplete = n, r.onerror = o;
|
|
348
348
|
} else
|
|
349
|
-
|
|
349
|
+
B.set(t, e), n(void 0);
|
|
350
350
|
} catch {
|
|
351
|
-
|
|
351
|
+
B.set(t, e), n(void 0);
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
355
|
function pt(t) {
|
|
356
356
|
return new Promise(async (e, n) => {
|
|
357
357
|
try {
|
|
358
|
-
if (
|
|
359
|
-
const s = (await
|
|
358
|
+
if (P) {
|
|
359
|
+
const s = (await P).transaction("icons", "readonly").objectStore("icons").get(t);
|
|
360
360
|
s.onsuccess = function() {
|
|
361
361
|
e(s.result);
|
|
362
362
|
}, s.onerror = n;
|
|
363
363
|
} else
|
|
364
|
-
e(
|
|
364
|
+
e(B.get(t) || null);
|
|
365
365
|
} catch {
|
|
366
|
-
e(
|
|
366
|
+
e(B.get(t) || null);
|
|
367
367
|
}
|
|
368
368
|
});
|
|
369
369
|
}
|
|
@@ -387,31 +387,31 @@ function vt(t) {
|
|
|
387
387
|
}
|
|
388
388
|
function xt(t, e = "solid") {
|
|
389
389
|
if (!t) return "";
|
|
390
|
-
const n =
|
|
390
|
+
const n = R(t, e, "light"), o = R(t, e, "dark");
|
|
391
391
|
return `--icon-color: ${n}; --icon-color-dark: ${o}`;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function G({
|
|
394
394
|
icon: t,
|
|
395
395
|
size: e = "md",
|
|
396
396
|
color: n,
|
|
397
397
|
title: o,
|
|
398
|
-
accessibility:
|
|
399
|
-
tone:
|
|
398
|
+
accessibility: a = "auto",
|
|
399
|
+
tone: r = "solid"
|
|
400
400
|
}, ...s) {
|
|
401
|
-
const i =
|
|
402
|
-
|
|
401
|
+
const i = p(
|
|
402
|
+
a,
|
|
403
403
|
o
|
|
404
404
|
)((l, u) => l === "decorative" ? !1 : l === "informative" ? !0 : u != null && u !== "");
|
|
405
|
-
return
|
|
406
|
-
|
|
405
|
+
return A(
|
|
406
|
+
F,
|
|
407
407
|
(l) => f.span(
|
|
408
408
|
c.class(
|
|
409
|
-
|
|
409
|
+
p(e, n)((u) => vt(u ?? "md"))
|
|
410
410
|
),
|
|
411
411
|
c.style(
|
|
412
|
-
|
|
412
|
+
p(
|
|
413
413
|
n,
|
|
414
|
-
|
|
414
|
+
r
|
|
415
415
|
)(
|
|
416
416
|
(u, b) => xt(u ?? void 0, b ?? "solid")
|
|
417
417
|
)
|
|
@@ -425,15 +425,15 @@ function Ct({
|
|
|
425
425
|
),
|
|
426
426
|
() => g.hidden(!0)
|
|
427
427
|
),
|
|
428
|
-
|
|
428
|
+
J(
|
|
429
429
|
{ once: !0 },
|
|
430
|
-
() =>
|
|
430
|
+
() => Q({
|
|
431
431
|
request: t,
|
|
432
432
|
load: ({ request: u }) => kt(u),
|
|
433
433
|
convertError: String,
|
|
434
434
|
success: ({ value: u }) => f.span(
|
|
435
|
-
|
|
436
|
-
|
|
435
|
+
D.width("100%"),
|
|
436
|
+
D.height("100%"),
|
|
437
437
|
c.innerHTML(u)
|
|
438
438
|
),
|
|
439
439
|
pending: () => f.span(
|
|
@@ -463,33 +463,33 @@ function Ct({
|
|
|
463
463
|
)
|
|
464
464
|
);
|
|
465
465
|
}
|
|
466
|
-
function
|
|
467
|
-
const
|
|
466
|
+
function Ct(t, e, n, o) {
|
|
467
|
+
const a = [
|
|
468
468
|
"bc-button",
|
|
469
469
|
`bc-button--size-${t}`,
|
|
470
470
|
`bc-control--padding-${t}`,
|
|
471
471
|
`bc-control--rounded-${e}`
|
|
472
472
|
];
|
|
473
|
-
return n &&
|
|
473
|
+
return n && a.push("bc-button--loading"), o && a.push("bc-button--full-width"), a.join(" ");
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function wt(t, e, n) {
|
|
476
476
|
const o = /* @__PURE__ */ new Map();
|
|
477
477
|
o.set("--button-text-shadow", "var(--text-shadow-none)"), o.set("--button-text-shadow-dark", "var(--text-shadow-none)");
|
|
478
|
-
const
|
|
479
|
-
n || (o.set("--button-bg-hover",
|
|
478
|
+
const a = (r, s, i, l) => {
|
|
479
|
+
n || (o.set("--button-bg-hover", r), o.set("--button-text-hover", i), o.set("--button-bg-hover-dark", s), o.set("--button-text-hover-dark", l));
|
|
480
480
|
};
|
|
481
481
|
switch (t) {
|
|
482
482
|
case "filled": {
|
|
483
|
-
const
|
|
484
|
-
o.set("--button-bg",
|
|
483
|
+
const r = x(e, "solid", "light"), s = x(e, "solid", "dark");
|
|
484
|
+
o.set("--button-bg", r.backgroundColor), o.set("--button-text", r.textColor), o.set("--button-bg-dark", s.backgroundColor), o.set("--button-text-dark", s.textColor), o.set(
|
|
485
485
|
"--button-text-shadow",
|
|
486
486
|
"var(--text-shadow-button-filled, var(--text-shadow-sm))"
|
|
487
487
|
), o.set(
|
|
488
488
|
"--button-text-shadow-dark",
|
|
489
489
|
"var(--text-shadow-button-filled, var(--text-shadow-sm))"
|
|
490
490
|
);
|
|
491
|
-
const i =
|
|
492
|
-
|
|
491
|
+
const i = m(e, "solid", "light"), l = m(e, "solid", "dark");
|
|
492
|
+
a(
|
|
493
493
|
i.backgroundColor,
|
|
494
494
|
l.backgroundColor,
|
|
495
495
|
i.textColor,
|
|
@@ -498,10 +498,10 @@ function yt(t, e, n) {
|
|
|
498
498
|
break;
|
|
499
499
|
}
|
|
500
500
|
case "light": {
|
|
501
|
-
const
|
|
502
|
-
o.set("--button-bg",
|
|
503
|
-
const i =
|
|
504
|
-
|
|
501
|
+
const r = x(e, "light", "light"), s = x(e, "light", "dark");
|
|
502
|
+
o.set("--button-bg", r.backgroundColor), o.set("--button-text", r.textColor), o.set("--button-bg-dark", s.backgroundColor), o.set("--button-text-dark", s.textColor);
|
|
503
|
+
const i = m(e, "light", "light"), l = m(e, "light", "dark");
|
|
504
|
+
a(
|
|
505
505
|
i.backgroundColor,
|
|
506
506
|
l.backgroundColor,
|
|
507
507
|
i.textColor,
|
|
@@ -510,36 +510,36 @@ function yt(t, e, n) {
|
|
|
510
510
|
break;
|
|
511
511
|
}
|
|
512
512
|
case "outline": {
|
|
513
|
-
o.set("--button-bg", "transparent"), o.set("--button-bg-dark", "transparent"), o.set("--button-border",
|
|
513
|
+
o.set("--button-bg", "transparent"), o.set("--button-bg-dark", "transparent"), o.set("--button-border", V(e, "light")), o.set("--button-border-dark", V(e, "dark")), o.set("--button-text", C(e, "light")), o.set("--button-text-dark", C(e, "dark")), o.set(
|
|
514
514
|
"--button-text-shadow",
|
|
515
515
|
"var(--text-shadow-button-light, var(--text-shadow-xs))"
|
|
516
516
|
), o.set(
|
|
517
517
|
"--button-text-shadow-dark",
|
|
518
518
|
"var(--text-shadow-button-light, var(--text-shadow-xs))"
|
|
519
519
|
);
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
|
|
520
|
+
const r = m(e, "light", "light"), s = m(e, "light", "dark");
|
|
521
|
+
a(
|
|
522
|
+
r.backgroundColor,
|
|
523
523
|
s.backgroundColor,
|
|
524
|
-
|
|
524
|
+
r.textColor,
|
|
525
525
|
s.textColor
|
|
526
526
|
);
|
|
527
527
|
break;
|
|
528
528
|
}
|
|
529
529
|
case "default": {
|
|
530
|
-
const
|
|
531
|
-
o.set("--button-bg",
|
|
530
|
+
const r = x("neutral", "light", "light"), s = x("neutral", "light", "dark");
|
|
531
|
+
o.set("--button-bg", r.backgroundColor), o.set("--button-text", C(e, "light")), o.set("--button-bg-dark", s.backgroundColor), o.set("--button-text-dark", C(e, "dark")), o.set(
|
|
532
532
|
"--button-text-shadow",
|
|
533
533
|
"var(--text-shadow-button-default, var(--text-shadow-2xs))"
|
|
534
534
|
), o.set(
|
|
535
535
|
"--button-text-shadow-dark",
|
|
536
536
|
"var(--text-shadow-button-default, var(--text-shadow-2xs))"
|
|
537
537
|
);
|
|
538
|
-
const i =
|
|
539
|
-
|
|
538
|
+
const i = m("base", "light", "light"), l = m("base", "light", "dark");
|
|
539
|
+
a(
|
|
540
540
|
i.backgroundColor,
|
|
541
541
|
l.backgroundColor,
|
|
542
|
-
o.get("--button-text") ??
|
|
542
|
+
o.get("--button-text") ?? r.textColor,
|
|
543
543
|
o.get("--button-text-dark") ?? s.textColor
|
|
544
544
|
);
|
|
545
545
|
break;
|
|
@@ -549,27 +549,27 @@ function yt(t, e, n) {
|
|
|
549
549
|
break;
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
|
-
return Array.from(o.entries()).map(([
|
|
552
|
+
return Array.from(o.entries()).map(([r, s]) => `${r}: ${s}`).join("; ");
|
|
553
553
|
}
|
|
554
554
|
function Rt({
|
|
555
555
|
type: t = "button",
|
|
556
556
|
disabled: e = !1,
|
|
557
557
|
loading: n = !1,
|
|
558
558
|
variant: o = "filled",
|
|
559
|
-
size:
|
|
560
|
-
color:
|
|
559
|
+
size: a = "md",
|
|
560
|
+
color: r = "base",
|
|
561
561
|
roundedness: s = "sm",
|
|
562
562
|
onClick: i = () => {
|
|
563
563
|
},
|
|
564
564
|
fullWidth: l = !1
|
|
565
565
|
}, ...u) {
|
|
566
566
|
const b = $(null);
|
|
567
|
-
return
|
|
568
|
-
|
|
567
|
+
return A(
|
|
568
|
+
F,
|
|
569
569
|
(h) => f.button(
|
|
570
570
|
c.type(t),
|
|
571
571
|
c.disabled(
|
|
572
|
-
|
|
572
|
+
p(
|
|
573
573
|
e,
|
|
574
574
|
n
|
|
575
575
|
)((d, v) => d || v)
|
|
@@ -578,19 +578,19 @@ function Rt({
|
|
|
578
578
|
g.busy(n ?? !1),
|
|
579
579
|
w(n ?? !1, () => g.label(h.$.loadingExtended)),
|
|
580
580
|
c.class(
|
|
581
|
-
|
|
581
|
+
p(a, s, n, l)(Ct)
|
|
582
582
|
),
|
|
583
|
-
c.style(
|
|
583
|
+
c.style(p(o, r, e)(wt)),
|
|
584
584
|
w(
|
|
585
585
|
n ?? !1,
|
|
586
586
|
() => y(
|
|
587
|
-
|
|
587
|
+
D.width(
|
|
588
588
|
b.map((d) => d == null ? "" : `${d.width}px`)
|
|
589
589
|
),
|
|
590
|
-
|
|
590
|
+
D.height(
|
|
591
591
|
b.map((d) => d == null ? "" : `${d.height}px`)
|
|
592
592
|
),
|
|
593
|
-
|
|
593
|
+
G({ icon: "line-md:loading-twotone-loop", size: a ?? "md" }),
|
|
594
594
|
// Hidden live region for screen reader announcements
|
|
595
595
|
f.span(
|
|
596
596
|
c.class("sr-only"),
|
|
@@ -602,10 +602,10 @@ function Rt({
|
|
|
602
602
|
),
|
|
603
603
|
w(
|
|
604
604
|
n != null,
|
|
605
|
-
() =>
|
|
606
|
-
(d) =>
|
|
605
|
+
() => Y(
|
|
606
|
+
(d) => M(
|
|
607
607
|
d.on((v) => {
|
|
608
|
-
|
|
608
|
+
L.get(n ?? !1) || b.set(v);
|
|
609
609
|
})
|
|
610
610
|
)
|
|
611
611
|
)
|
|
@@ -613,71 +613,98 @@ function Rt({
|
|
|
613
613
|
)
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
|
-
function
|
|
617
|
-
const
|
|
616
|
+
function yt(t, e, n) {
|
|
617
|
+
const o = [
|
|
618
618
|
t ? "bc-base-input-container" : "bc-input-container"
|
|
619
619
|
];
|
|
620
|
-
return e ?
|
|
620
|
+
return e ? o.push(
|
|
621
621
|
t ? "bc-base-input-container--disabled" : "bc-input-container--disabled"
|
|
622
|
-
) :
|
|
622
|
+
) : o.push(
|
|
623
623
|
t ? "bc-base-input-container--default" : "bc-input-container--default"
|
|
624
|
-
), n &&
|
|
624
|
+
), n && o.push("bc-input-container--error"), o.join(" ");
|
|
625
|
+
}
|
|
626
|
+
function It(t, e) {
|
|
627
|
+
const n = ["bc-input-container__input"];
|
|
628
|
+
return t || (n.push(`bc-control--padding-${e}`), n.push(`bc-control--text-size-${e}`)), n.join(" ");
|
|
625
629
|
}
|
|
626
630
|
const Lt = ({
|
|
627
631
|
baseContainer: t,
|
|
628
632
|
disabled: e,
|
|
629
633
|
input: n,
|
|
630
634
|
before: o,
|
|
631
|
-
after:
|
|
632
|
-
hasError:
|
|
635
|
+
after: a,
|
|
636
|
+
hasError: r,
|
|
633
637
|
focusableSelector: s = "input, select, textarea",
|
|
634
638
|
growInput: i = !0,
|
|
635
639
|
size: l
|
|
636
640
|
}, ...u) => {
|
|
637
|
-
const b =
|
|
641
|
+
const b = L.map(e ?? !1, (h) => h);
|
|
638
642
|
return f.div(
|
|
643
|
+
M(() => L.dispose(b)),
|
|
639
644
|
K((h) => {
|
|
640
645
|
const d = () => {
|
|
641
646
|
h.querySelector(s)?.focus();
|
|
642
647
|
};
|
|
643
|
-
return h.addEventListener("click", d),
|
|
648
|
+
return h.addEventListener("click", d), M(() => h.removeEventListener("click", d));
|
|
644
649
|
}),
|
|
645
650
|
c.class(
|
|
646
|
-
|
|
651
|
+
p(
|
|
647
652
|
t,
|
|
648
653
|
b,
|
|
649
|
-
|
|
650
|
-
|
|
654
|
+
r ?? !1
|
|
655
|
+
// size ?? 'md'
|
|
651
656
|
)(
|
|
652
|
-
(h, d, v
|
|
657
|
+
(h, d, v) => yt(
|
|
653
658
|
h ?? !1,
|
|
654
659
|
d ?? !1,
|
|
655
|
-
v ?? !1
|
|
656
|
-
|
|
660
|
+
v ?? !1
|
|
661
|
+
// (size ?? 'md') as ControlSize
|
|
657
662
|
)
|
|
658
663
|
)
|
|
659
664
|
),
|
|
660
665
|
o != null ? f.span(c.class("bc-input-container__before"), o) : null,
|
|
661
666
|
f.div(
|
|
662
|
-
c.class("bc-input-container__input"),
|
|
663
667
|
c.class(
|
|
664
|
-
|
|
668
|
+
p(
|
|
669
|
+
t,
|
|
670
|
+
l ?? "md"
|
|
671
|
+
)(
|
|
672
|
+
(h, d) => It(
|
|
673
|
+
h ?? !1,
|
|
674
|
+
d ?? "md"
|
|
675
|
+
)
|
|
676
|
+
)
|
|
677
|
+
),
|
|
678
|
+
// attr.class('bc-input-container__input'),
|
|
679
|
+
c.class(
|
|
680
|
+
L.map(
|
|
665
681
|
i,
|
|
666
682
|
(h) => h ? "bc-input-container__input--grow" : ""
|
|
667
683
|
)
|
|
668
684
|
),
|
|
669
685
|
n
|
|
670
686
|
),
|
|
671
|
-
|
|
687
|
+
a != null ? f.span(c.class("bc-input-container__after"), a) : null,
|
|
672
688
|
...u
|
|
673
689
|
);
|
|
674
|
-
}
|
|
690
|
+
};
|
|
691
|
+
function Ot({
|
|
692
|
+
icon: t,
|
|
693
|
+
size: e = "md",
|
|
694
|
+
color: n = "neutral"
|
|
695
|
+
}) {
|
|
696
|
+
return f.span(
|
|
697
|
+
c.class("bc-input-container__icon"),
|
|
698
|
+
G({ icon: t, size: e, color: n })
|
|
699
|
+
);
|
|
700
|
+
}
|
|
701
|
+
const Dt = ({
|
|
675
702
|
autocomplete: t,
|
|
676
703
|
autofocus: e,
|
|
677
704
|
class: n,
|
|
678
705
|
disabled: o,
|
|
679
|
-
name:
|
|
680
|
-
placeholder:
|
|
706
|
+
name: a,
|
|
707
|
+
placeholder: r,
|
|
681
708
|
id: s,
|
|
682
709
|
required: i,
|
|
683
710
|
hasError: l
|
|
@@ -686,24 +713,24 @@ const Lt = ({
|
|
|
686
713
|
c.autofocus(e),
|
|
687
714
|
c.class(n),
|
|
688
715
|
c.disabled(o),
|
|
689
|
-
c.name(
|
|
690
|
-
c.placeholder(
|
|
716
|
+
c.name(a ?? s),
|
|
717
|
+
c.placeholder(r),
|
|
691
718
|
c.id(s),
|
|
692
719
|
g.required(i),
|
|
693
720
|
l != null ? g.invalid(
|
|
694
721
|
l ?? !1
|
|
695
722
|
) : null
|
|
696
|
-
),
|
|
697
|
-
const { value: e, onBlur: n, onChange: o, onInput:
|
|
723
|
+
), At = (t) => {
|
|
724
|
+
const { value: e, onBlur: n, onChange: o, onInput: a } = t;
|
|
698
725
|
return Lt({
|
|
699
726
|
...t,
|
|
700
727
|
input: W.text(
|
|
701
728
|
Dt(t),
|
|
702
729
|
c.value(e),
|
|
703
730
|
c.class("bc-input"),
|
|
704
|
-
n != null ? I.blur(
|
|
705
|
-
o != null ? I.change(
|
|
706
|
-
|
|
731
|
+
n != null ? I.blur(_(n)) : S,
|
|
732
|
+
o != null ? I.change(_(o)) : S,
|
|
733
|
+
a != null ? I.input(_(a)) : S
|
|
707
734
|
)
|
|
708
735
|
});
|
|
709
736
|
};
|
|
@@ -717,9 +744,9 @@ function Pt({
|
|
|
717
744
|
defaultMessages: n,
|
|
718
745
|
localeLoader: o
|
|
719
746
|
}) {
|
|
720
|
-
const
|
|
721
|
-
if (i ===
|
|
722
|
-
|
|
747
|
+
const a = $(e), r = $(n), s = t.on(async (i) => {
|
|
748
|
+
if (i === a.value) return;
|
|
749
|
+
a.set(i);
|
|
723
750
|
const l = Bt(i);
|
|
724
751
|
for (const u of l)
|
|
725
752
|
try {
|
|
@@ -733,22 +760,22 @@ function Pt({
|
|
|
733
760
|
);
|
|
734
761
|
return;
|
|
735
762
|
}
|
|
736
|
-
if (i ===
|
|
737
|
-
|
|
763
|
+
if (i === a.value) {
|
|
764
|
+
r.set(b);
|
|
738
765
|
return;
|
|
739
766
|
}
|
|
740
767
|
} catch {
|
|
741
768
|
continue;
|
|
742
769
|
}
|
|
743
|
-
console.warn(`No locale found for "${t.value}", using fallback`), i ===
|
|
770
|
+
console.warn(`No locale found for "${t.value}", using fallback`), i === a.value && r.set(n);
|
|
744
771
|
});
|
|
745
772
|
return {
|
|
746
773
|
/** Clean up all resources and event listeners */
|
|
747
774
|
dispose: () => {
|
|
748
|
-
s(),
|
|
775
|
+
s(), a.dispose(), r.dispose();
|
|
749
776
|
},
|
|
750
777
|
/** Translation functions that return reactive signals */
|
|
751
|
-
t:
|
|
778
|
+
t: r
|
|
752
779
|
};
|
|
753
780
|
}
|
|
754
781
|
function St({
|
|
@@ -758,11 +785,11 @@ function St({
|
|
|
758
785
|
providerName: o = "I18nProvider"
|
|
759
786
|
}) {
|
|
760
787
|
return {
|
|
761
|
-
mark:
|
|
762
|
-
create: (
|
|
788
|
+
mark: O(o),
|
|
789
|
+
create: (a, r) => {
|
|
763
790
|
const {
|
|
764
791
|
value: { locale: s }
|
|
765
|
-
} =
|
|
792
|
+
} = r.getProvider(lt.mark), { t: i, dispose: l } = Pt({
|
|
766
793
|
locale: s,
|
|
767
794
|
defaultMessages: e,
|
|
768
795
|
defaultLocale: t,
|
|
@@ -775,40 +802,42 @@ function St({
|
|
|
775
802
|
}
|
|
776
803
|
};
|
|
777
804
|
}
|
|
778
|
-
const
|
|
805
|
+
const F = St({
|
|
779
806
|
defaultLocale: ot,
|
|
780
807
|
defaultMessages: et,
|
|
781
|
-
localeLoader: async (t) => (await nt(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-
|
|
808
|
+
localeLoader: async (t) => (await nt(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-DpQo8C31.js"), "./locales/de.ts": () => import("./de-D1MQ4wen.js"), "./locales/en.ts": () => Promise.resolve().then(() => tt), "./locales/es.ts": () => import("./es-DwPjonS7.js"), "./locales/fa.ts": () => import("./fa-fxf_lWjh.js"), "./locales/fr.ts": () => import("./fr-BDDsMHRZ.js"), "./locales/he.ts": () => import("./he-B4deK_wE.js"), "./locales/hi.ts": () => import("./hi-CxQT8nRD.js"), "./locales/it.ts": () => import("./it-6QS5PWzQ.js"), "./locales/ja.ts": () => import("./ja-D2VvVGEN.js"), "./locales/ko.ts": () => import("./ko-CP_WopWz.js"), "./locales/nl.ts": () => import("./nl-DZ4dFolZ.js"), "./locales/pl.ts": () => import("./pl-BE81iFSF.js"), "./locales/pt.ts": () => import("./pt-BcCdXUA2.js"), "./locales/ru.ts": () => import("./ru-Bo_jc3s1.js"), "./locales/tr.ts": () => import("./tr-CBw3FlOg.js"), "./locales/ur.ts": () => import("./ur-BsXnPgxd.js"), "./locales/vi.ts": () => import("./vi-D1rLo6MX.js"), "./locales/zh.ts": () => import("./zh-BoLsjdfz.js") }), `./locales/${t}.ts`, 3)).default,
|
|
782
809
|
providerName: "BeatUII18n"
|
|
783
810
|
});
|
|
784
811
|
export {
|
|
785
812
|
Rt as B,
|
|
786
813
|
Dt as C,
|
|
787
|
-
|
|
814
|
+
G as I,
|
|
788
815
|
lt as L,
|
|
789
|
-
|
|
816
|
+
At as T,
|
|
790
817
|
nt as _,
|
|
791
|
-
|
|
818
|
+
F as a,
|
|
792
819
|
Lt as b,
|
|
793
|
-
|
|
820
|
+
Ot as c,
|
|
794
821
|
et as d,
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
822
|
+
x as e,
|
|
823
|
+
E as f,
|
|
824
|
+
It as g,
|
|
825
|
+
V as h,
|
|
826
|
+
m as i,
|
|
827
|
+
Ct as j,
|
|
828
|
+
wt as k,
|
|
829
|
+
ot as l,
|
|
803
830
|
St as m,
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
831
|
+
H as n,
|
|
832
|
+
pt as o,
|
|
833
|
+
Pt as p,
|
|
834
|
+
q,
|
|
808
835
|
at as r,
|
|
809
836
|
ft as s,
|
|
810
837
|
C as t,
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
838
|
+
jt as u,
|
|
839
|
+
Tt as v,
|
|
840
|
+
Et as w,
|
|
841
|
+
st as x,
|
|
842
|
+
Vt as y
|
|
814
843
|
};
|