@webority/ui-react 0.9.3 → 0.9.5
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/iconCatalogFull.bold.g-OK3eOiMp.js +947 -0
- package/dist/iconCatalogFull.broken.g-BZsyxXcp.js +947 -0
- package/dist/iconCatalogFull.bulk.g-B7wsb4AN.js +947 -0
- package/dist/iconCatalogFull.g-BKUr0SVj.js +947 -0
- package/dist/iconCatalogFull.outline.g-AOnxJAAj.js +947 -0
- package/dist/iconCatalogFull.twotone.g-DR6Qdpib.js +947 -0
- package/dist/{iconVariants.g-BL1d2HPV.js → iconVariants.g-CLikIWjb.js} +5 -5
- package/dist/types/components/iconCatalogFull.bold.g.d.ts +944 -0
- package/dist/types/components/iconCatalogFull.broken.g.d.ts +944 -0
- package/dist/types/components/iconCatalogFull.bulk.g.d.ts +944 -0
- package/dist/types/components/iconCatalogFull.g.d.ts +0 -4722
- package/dist/types/components/iconCatalogFull.outline.g.d.ts +944 -0
- package/dist/types/components/iconCatalogFull.twotone.g.d.ts +944 -0
- package/dist/types/components/useWuiControl.d.ts +15 -1
- package/dist/ui-react.js +707 -657
- package/package.json +3 -3
- package/dist/iconCatalogFull.g-DHZusHbO.js +0 -5668
package/dist/ui-react.js
CHANGED
|
@@ -78,7 +78,7 @@ var D = /* @__PURE__ */ "aave.activity.add.add-circle.add-square.additem.airdrop
|
|
|
78
78
|
house: "<path d=\"m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12ZM12 17.99v-3\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
79
79
|
image: "<path d=\"M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M9 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM2.67 18.95l4.93-3.31c.79-.53 1.93-.47 2.64.14l.33.29c.78.67 2.04.67 2.82 0l4.16-3.57c.78-.67 2.04-.67 2.82 0L22 13.9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
80
80
|
inbox: "<path d=\"M12 2v7l2-2M12 9l-2-2M1.98 13h4.41c.38 0 .72.21.89.55l1.17 2.34A2 2 0 0 0 10.24 17h3.53a2 2 0 0 0 1.79-1.11l1.17-2.34a1 1 0 0 1 .89-.55h4.36\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M7 4.13c-3.54.52-5 2.6-5 6.87v4c0 5 2 7 7 7h6c5 0 7-2 7-7v-4c0-4.27-1.46-6.35-5-6.87\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
81
|
-
info: "<path d=\"M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M11.995 16h.009\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
81
|
+
info: "<g transform=\"rotate(180 12 12)\"><path d=\"M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M11.995 16h.009\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path></g>",
|
|
82
82
|
key: "<path d=\"M19.79 14.93a7.575 7.575 0 0 1-7.6 1.87l-4.71 4.7c-.34.35-1.01.56-1.49.49l-2.18-.3c-.72-.1-1.39-.78-1.5-1.5l-.3-2.18c-.07-.48.16-1.15.49-1.49l4.7-4.7c-.8-2.6-.18-5.55 1.88-7.6 2.95-2.95 7.74-2.95 10.7 0 2.96 2.95 2.96 7.76.01 10.71ZM6.89 17.49l2.3 2.3\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M14.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
83
83
|
"layout-dashboard": "<path d=\"M5 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3H5C3 2 2 3 2 5v2c0 2 1 3 3 3ZM17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM17 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
84
84
|
"layout-grid": "<path d=\"M17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM6 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM18 22a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
@@ -166,23 +166,41 @@ function N(e, t) {
|
|
|
166
166
|
//#region src/components/AppIcon.jsx
|
|
167
167
|
var P = null, F = null, I = /* @__PURE__ */ new Set();
|
|
168
168
|
function L() {
|
|
169
|
-
return F ||= import("./iconVariants.g-
|
|
169
|
+
return F ||= import("./iconVariants.g-CLikIWjb.js").then((e) => {
|
|
170
170
|
P = e.VARIANT_GLYPHS;
|
|
171
171
|
for (let e of I) e();
|
|
172
172
|
I.clear();
|
|
173
173
|
}), F;
|
|
174
174
|
}
|
|
175
|
-
var R = new Set(D), z = null, ee = null,
|
|
176
|
-
function
|
|
177
|
-
return
|
|
178
|
-
z = e.FULL_GLYPHS
|
|
175
|
+
var R = new Set(D), z = null, ee = null, B = /* @__PURE__ */ new Set();
|
|
176
|
+
function te() {
|
|
177
|
+
return ee ||= import("./iconCatalogFull.g-BKUr0SVj.js").then((e) => {
|
|
178
|
+
z = e.FULL_GLYPHS;
|
|
179
179
|
for (let e of B) e();
|
|
180
180
|
B.clear();
|
|
181
|
-
}),
|
|
181
|
+
}), ee;
|
|
182
|
+
}
|
|
183
|
+
var ne = {
|
|
184
|
+
outline: () => import("./iconCatalogFull.outline.g-AOnxJAAj.js"),
|
|
185
|
+
bold: () => import("./iconCatalogFull.bold.g-OK3eOiMp.js"),
|
|
186
|
+
bulk: () => import("./iconCatalogFull.bulk.g-B7wsb4AN.js"),
|
|
187
|
+
broken: () => import("./iconCatalogFull.broken.g-BZsyxXcp.js"),
|
|
188
|
+
twotone: () => import("./iconCatalogFull.twotone.g-DR6Qdpib.js")
|
|
189
|
+
}, re = Object.create(null), ie = Object.create(null), ae = Object.create(null);
|
|
190
|
+
function oe(e) {
|
|
191
|
+
let t = ne[e];
|
|
192
|
+
return t ? (ie[e] ||= t().then((t) => {
|
|
193
|
+
re[e] = t.FULL_VARIANT_GLYPHS;
|
|
194
|
+
let n = ae[e];
|
|
195
|
+
if (n) {
|
|
196
|
+
for (let e of n) e();
|
|
197
|
+
n.clear();
|
|
198
|
+
}
|
|
199
|
+
}), ie[e]) : null;
|
|
182
200
|
}
|
|
183
|
-
var
|
|
184
|
-
function
|
|
185
|
-
for (let [t, n] of Object.entries(e))
|
|
201
|
+
var se = D, ce = /* @__PURE__ */ new Map();
|
|
202
|
+
function le(e) {
|
|
203
|
+
for (let [t, n] of Object.entries(e)) ce.set(t, n);
|
|
186
204
|
}
|
|
187
205
|
function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color: a, style: s, ...c }) {
|
|
188
206
|
N("AppIcon", c);
|
|
@@ -195,15 +213,16 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
195
213
|
}) : e, h = O[e] !== void 0, g = !h && R.has(e), [, _] = d(0);
|
|
196
214
|
o(() => {
|
|
197
215
|
let e = () => _((e) => e + 1);
|
|
198
|
-
return l && h && !P && (I.add(e), L()), g && !z && (B.add(e),
|
|
199
|
-
I.delete(e), B.delete(e);
|
|
216
|
+
return l && h && !P && (I.add(e), L()), g && !z && (B.add(e), te()), l && g && !re[n] && ((ae[n] ||= /* @__PURE__ */ new Set()).add(e), oe(n)), () => {
|
|
217
|
+
I.delete(e), B.delete(e), ae[n]?.delete(e);
|
|
200
218
|
};
|
|
201
219
|
}, [
|
|
202
220
|
l,
|
|
203
221
|
h,
|
|
204
|
-
g
|
|
222
|
+
g,
|
|
223
|
+
n
|
|
205
224
|
]);
|
|
206
|
-
let v =
|
|
225
|
+
let v = ce.get(e);
|
|
207
226
|
if (v) return f(v({
|
|
208
227
|
size: t,
|
|
209
228
|
color: a,
|
|
@@ -233,7 +252,7 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
233
252
|
}), /* @__PURE__ */ p("path", { d: "M3.2 22.5C3.2 17.4 7.5 14.9 11 14.7L12 17.4l1-2.7C16.5 14.9 20.8 17.4 20.8 22.5z" })]
|
|
234
253
|
})
|
|
235
254
|
}));
|
|
236
|
-
let y = l && (P?.[n]?.[e] ||
|
|
255
|
+
let y = l && (P?.[n]?.[e] || re?.[n]?.[e]) || O[e] || z?.[e];
|
|
237
256
|
return y ? f(/* @__PURE__ */ p("svg", {
|
|
238
257
|
width: t,
|
|
239
258
|
height: t,
|
|
@@ -253,7 +272,7 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
253
272
|
}
|
|
254
273
|
//#endregion
|
|
255
274
|
//#region src/components/AppAccordion.jsx
|
|
256
|
-
function
|
|
275
|
+
function ue({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i }) {
|
|
257
276
|
N("AppAccordion", i);
|
|
258
277
|
let a = s(), o = n || a, [c, l] = d(() => {
|
|
259
278
|
let n = e.map((e, t) => ({
|
|
@@ -314,7 +333,7 @@ function H(e, { size: t = 16, className: n } = {}) {
|
|
|
314
333
|
}
|
|
315
334
|
//#endregion
|
|
316
335
|
//#region src/components/AppActionIcon.jsx
|
|
317
|
-
function
|
|
336
|
+
function de({ icon: e, label: t, danger: n = !1, disabled: r = !1, size: i = 20, onClick: a, className: o = "", as: s, href: c, ...l }) {
|
|
318
337
|
N("AppActionIcon", l);
|
|
319
338
|
let u = [
|
|
320
339
|
"u-action",
|
|
@@ -344,13 +363,13 @@ function se({ icon: e, label: t, danger: n = !1, disabled: r = !1, size: i = 20,
|
|
|
344
363
|
}
|
|
345
364
|
//#endregion
|
|
346
365
|
//#region src/components/AppAlert.jsx
|
|
347
|
-
var
|
|
366
|
+
var fe = {
|
|
348
367
|
info: "info",
|
|
349
368
|
success: "check",
|
|
350
369
|
warning: "alert-triangle",
|
|
351
370
|
danger: "x"
|
|
352
371
|
};
|
|
353
|
-
function
|
|
372
|
+
function pe(e, t, n, r) {
|
|
354
373
|
return n ? /* @__PURE__ */ p("span", {
|
|
355
374
|
className: "alert-icon alert-icon-image",
|
|
356
375
|
children: /* @__PURE__ */ p("img", {
|
|
@@ -368,9 +387,9 @@ function le(e, t, n, r) {
|
|
|
368
387
|
children: e
|
|
369
388
|
}) : null;
|
|
370
389
|
}
|
|
371
|
-
function
|
|
390
|
+
function U({ variant: e = "info", children: t, title: n, icon: r, image: i, imageAlt: a = "", className: o = "", onClose: s, dismissible: c, bordered: l = !0, role: u = "alert", ...d }) {
|
|
372
391
|
N("AppAlert", d);
|
|
373
|
-
let g = r === void 0 ?
|
|
392
|
+
let g = r === void 0 ? fe[e] : r === "none" ? null : r, _ = !!i || !!g, v = n ? /* @__PURE__ */ p("div", {
|
|
374
393
|
className: "alert-heading",
|
|
375
394
|
children: n
|
|
376
395
|
}) : null, y = _ && !!v && !!t, b = y ? 13 : 11;
|
|
@@ -387,7 +406,7 @@ function ue({ variant: e = "info", children: t, title: n, icon: r, image: i, ima
|
|
|
387
406
|
transition: !1,
|
|
388
407
|
role: u,
|
|
389
408
|
...d,
|
|
390
|
-
children: _ ? /* @__PURE__ */ m(f, { children: [
|
|
409
|
+
children: _ ? /* @__PURE__ */ m(f, { children: [pe(g, b, i, a), /* @__PURE__ */ m("div", {
|
|
391
410
|
className: "alert-content",
|
|
392
411
|
children: [v, t]
|
|
393
412
|
})] }) : /* @__PURE__ */ m(f, { children: [v, t] })
|
|
@@ -395,23 +414,23 @@ function ue({ variant: e = "info", children: t, title: n, icon: r, image: i, ima
|
|
|
395
414
|
}
|
|
396
415
|
//#endregion
|
|
397
416
|
//#region src/components/warnInvalidValue.js
|
|
398
|
-
var
|
|
417
|
+
var me = () => {
|
|
399
418
|
try {
|
|
400
419
|
return process.env.NODE_ENV !== "production";
|
|
401
420
|
} catch {
|
|
402
421
|
return !0;
|
|
403
422
|
}
|
|
404
|
-
},
|
|
405
|
-
function
|
|
406
|
-
if (!
|
|
423
|
+
}, he = /* @__PURE__ */ new Set();
|
|
424
|
+
function W(e, t, n, r) {
|
|
425
|
+
if (!me() || n == null) return;
|
|
407
426
|
let i = r instanceof Set ? r : new Set(r);
|
|
408
427
|
if (i.has(n)) return;
|
|
409
428
|
let a = `${e}.${t}.${String(n)}`;
|
|
410
|
-
|
|
429
|
+
he.has(a) || (he.add(a), console.warn(`[@webority/ui-react] <${e}> received ${t}="${String(n)}", which is not one of ${[...i].map((e) => `"${e}"`).join(" | ")}. The component fell back to its default, so this renders something other than what the call site asks for — check the value against the component catalogue at https://ui-react.webority.dev.`));
|
|
411
430
|
}
|
|
412
431
|
//#endregion
|
|
413
432
|
//#region src/components/AppButton.jsx
|
|
414
|
-
var
|
|
433
|
+
var ge = {
|
|
415
434
|
primary: "primary",
|
|
416
435
|
secondary: "secondary",
|
|
417
436
|
outline: "outline-primary",
|
|
@@ -423,25 +442,25 @@ var W = {
|
|
|
423
442
|
warning: "warning",
|
|
424
443
|
subtle: "subtle",
|
|
425
444
|
"outline-light": "outline-light"
|
|
426
|
-
},
|
|
445
|
+
}, _e = {
|
|
427
446
|
sm: 14,
|
|
428
447
|
md: 16,
|
|
429
448
|
lg: 20
|
|
430
449
|
};
|
|
431
|
-
function
|
|
450
|
+
function ve(e, t, n) {
|
|
432
451
|
if (!e) return null;
|
|
433
452
|
let r = t === "left" ? "me-2" : "ms-2";
|
|
434
453
|
return typeof e == "string" ? /* @__PURE__ */ p(V, {
|
|
435
454
|
name: e,
|
|
436
|
-
size:
|
|
455
|
+
size: _e[n] ?? _e.md,
|
|
437
456
|
className: r
|
|
438
457
|
}) : /* @__PURE__ */ p("span", {
|
|
439
458
|
className: `d-inline-flex ${r}`,
|
|
440
459
|
children: e
|
|
441
460
|
});
|
|
442
461
|
}
|
|
443
|
-
function
|
|
444
|
-
N("AppButton", d),
|
|
462
|
+
function ye({ children: e, variant: t = "primary", size: n = "md", type: r = "button", loading: i = !1, disabled: a = !1, block: o = !1, leftIcon: s = null, rightIcon: c = null, href: l, className: u = "", ...d }) {
|
|
463
|
+
N("AppButton", d), W("AppButton", "variant", t, Object.keys(ge)), W("AppButton", "size", n, Object.keys(_e));
|
|
445
464
|
let f = [
|
|
446
465
|
o ? "w-100" : "",
|
|
447
466
|
i ? "is-loading" : "",
|
|
@@ -450,7 +469,7 @@ function he({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
450
469
|
return /* @__PURE__ */ m(v, {
|
|
451
470
|
type: (d.as === void 0 || d.as === "button") && l === void 0 ? r : void 0,
|
|
452
471
|
href: l,
|
|
453
|
-
variant:
|
|
472
|
+
variant: ge[t] ?? "primary",
|
|
454
473
|
size: n === "md" ? void 0 : n,
|
|
455
474
|
disabled: a || i,
|
|
456
475
|
"aria-busy": i || void 0,
|
|
@@ -461,15 +480,15 @@ function he({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
461
480
|
className: "spinner-border spinner-border-sm me-2",
|
|
462
481
|
"aria-hidden": "true"
|
|
463
482
|
}),
|
|
464
|
-
!i &&
|
|
483
|
+
!i && ve(s, "left", n),
|
|
465
484
|
e,
|
|
466
|
-
!i &&
|
|
485
|
+
!i && ve(c, "right", n)
|
|
467
486
|
]
|
|
468
487
|
});
|
|
469
488
|
}
|
|
470
489
|
//#endregion
|
|
471
490
|
//#region src/components/AppEmptyState.jsx
|
|
472
|
-
function
|
|
491
|
+
function be({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, action: a, className: o = "", style: s, ...c }) {
|
|
473
492
|
return N("AppEmptyState", c), /* @__PURE__ */ m("div", {
|
|
474
493
|
className: [
|
|
475
494
|
"empty-state",
|
|
@@ -500,7 +519,7 @@ function ge({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, acti
|
|
|
500
519
|
}
|
|
501
520
|
//#endregion
|
|
502
521
|
//#region src/components/AppSpinner.jsx
|
|
503
|
-
function
|
|
522
|
+
function xe({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
504
523
|
N("AppSpinner", r);
|
|
505
524
|
let { style: i, ...a } = r, o = Number(e), s = Number.isFinite(o) && o > 0;
|
|
506
525
|
return /* @__PURE__ */ p("span", {
|
|
@@ -518,7 +537,7 @@ function _e({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
|
518
537
|
}
|
|
519
538
|
//#endregion
|
|
520
539
|
//#region src/components/AppAsyncBlock.jsx
|
|
521
|
-
function
|
|
540
|
+
function Se({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRetry: i, skeleton: a, className: o = "", ...s }) {
|
|
522
541
|
N("AppAsyncBlock", s);
|
|
523
542
|
let c = `async-block${o ? ` ${o}` : ""}`;
|
|
524
543
|
return e ? /* @__PURE__ */ p("div", {
|
|
@@ -527,17 +546,17 @@ function ve({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
527
546
|
...s,
|
|
528
547
|
children: a ?? /* @__PURE__ */ p("div", {
|
|
529
548
|
className: "d-flex align-items-center justify-content-center py-5",
|
|
530
|
-
children: /* @__PURE__ */ p(
|
|
549
|
+
children: /* @__PURE__ */ p(xe, { label: "Loading" })
|
|
531
550
|
})
|
|
532
551
|
}) : t ? /* @__PURE__ */ p("div", {
|
|
533
552
|
className: c,
|
|
534
553
|
"data-state": "error",
|
|
535
554
|
...s,
|
|
536
|
-
children: /* @__PURE__ */ p(
|
|
555
|
+
children: /* @__PURE__ */ p(be, {
|
|
537
556
|
icon: "alert-circle",
|
|
538
557
|
title: "Something went wrong",
|
|
539
558
|
text: t,
|
|
540
|
-
action: i ? /* @__PURE__ */ p(
|
|
559
|
+
action: i ? /* @__PURE__ */ p(ye, {
|
|
541
560
|
variant: "secondary",
|
|
542
561
|
onClick: i,
|
|
543
562
|
children: "Retry"
|
|
@@ -547,7 +566,7 @@ function ve({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
547
566
|
className: c,
|
|
548
567
|
"data-state": "empty",
|
|
549
568
|
...s,
|
|
550
|
-
children: /* @__PURE__ */ p(
|
|
569
|
+
children: /* @__PURE__ */ p(be, {
|
|
551
570
|
icon: "inbox",
|
|
552
571
|
title: "Nothing to show yet"
|
|
553
572
|
})
|
|
@@ -560,15 +579,15 @@ function ve({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
560
579
|
}
|
|
561
580
|
//#endregion
|
|
562
581
|
//#region ../elements/dist/ui-elements.js
|
|
563
|
-
var
|
|
582
|
+
var Ce = {
|
|
564
583
|
success: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-success-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-success-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_success_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-success-active)\"/>\n<rect x=\"108.758\" y=\"67.5986\" width=\"75.5044\" height=\"49.155\" transform=\"rotate(45 108.758 67.5986)\" fill=\"var(--wui-success)\"/>\n<path d=\"M87.895 96.1046C89.7154 97.9249 89.7154 101.046 87.895 102.866L84.1243 106.637C82.3039 108.457 79.1833 108.457 77.3629 106.637L60.8496 89.9934C59.0293 88.173 59.0293 85.0524 60.8496 83.232L64.6204 79.4613C66.4408 77.6409 69.5614 77.6409 71.3817 79.4613L87.895 96.1046Z\" fill=\"white\"/>\n<path d=\"M102.324 67.3672C104.144 65.5469 107.265 65.5469 109.085 67.3672L112.856 71.138C114.676 72.9583 114.676 76.079 112.856 77.8993L84.2499 106.375C82.4296 108.195 79.3089 108.195 77.4886 106.375L73.7178 102.604C71.8975 100.784 71.8975 97.6633 73.7178 95.8429L102.324 67.3672Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_success_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
|
|
565
584
|
error: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_error_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<rect x=\"110.758\" y=\"62\" width=\"75.5044\" height=\"69.9535\" transform=\"rotate(45 110.758 62)\" fill=\"var(--wui-danger-active)\"/>\n<g clip-path=\"url(#wui_error_clip1)\">\n<path d=\"M95.9285 87.0037L112.943 69.9887C114.823 68.1087 114.823 65.0608 112.943 63.1838L110.675 60.9155C108.795 59.0349 105.747 59.0349 103.87 60.9155L86.8552 77.9298L69.8403 60.9119C67.9603 59.032 64.9124 59.032 63.0353 60.9119L60.7635 63.1802C58.8835 65.0608 58.8835 68.1087 60.7635 69.9858L77.7814 87.0037L60.767 104.018C58.8865 105.899 58.8865 108.947 60.767 110.824L63.0353 113.092C64.9153 114.972 67.9632 114.972 69.8403 113.092L86.8552 96.0769L103.87 113.092C105.75 114.972 108.798 114.972 110.675 113.092L112.943 110.824C114.823 108.943 114.823 105.895 112.943 104.018L95.9285 87.0037Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_error_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_error_clip1\"><rect width=\"55\" height=\"55\" fill=\"white\" transform=\"translate(59.3535 59.502)\"/></clipPath></defs>",
|
|
566
585
|
warning: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-warning-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-warning-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_warning_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-warning)\"/>\n<path d=\"M93.7812 60.9731L156.173 123.365L113.082 166.456L60 113.5L97 109L93.7812 60.9731Z\" fill=\"var(--wui-warning-active)\"/>\n<path d=\"M116.145 101.611L96.0431 62.7255C94.8912 60.6967 93.0607 59.1479 90.8656 58.3543C88.6768 57.5543 86.2768 57.5607 84.0945 58.3671C83.0001 58.7767 81.9953 59.3655 81.125 60.1079C80.2545 60.8567 79.5122 61.7527 78.9425 62.7703L57.8933 101.554C56.1525 104.594 56.1717 108.331 57.9317 111.358C59.6981 114.392 62.9427 116.248 66.4435 116.242H107.563C111.051 116.248 114.283 114.398 116.049 111.39C116.952 109.854 117.4 108.133 117.4 106.418C117.4 104.76 116.984 103.102 116.145 101.611ZM87.0064 105.714C85.0672 105.714 83.4929 104.146 83.4929 102.207C83.4929 100.267 85.0672 98.6993 87.0064 98.6993C88.9392 98.6993 90.5136 100.267 90.5136 102.207C90.5136 104.146 88.9392 105.714 87.0064 105.714ZM90.9104 78.098L88.0432 95.3266C88.0049 95.8706 87.5504 96.2994 87.0064 96.2994C86.4561 96.2994 86.0016 95.8706 85.9633 95.3266L83.0961 78.098C83.0385 77.8101 83.0065 77.522 83.0065 77.2405C83.0065 76.3125 83.3137 75.4037 83.8833 74.6485C84.6321 73.6629 85.7713 73.0549 87.0064 72.9717C88.2352 73.0549 89.3744 73.6629 90.1232 74.6485C90.872 75.6341 91.16 76.8885 90.9104 78.098Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_warning_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
|
|
567
586
|
info: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-info-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-info-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_info_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-info)\"/>\n<path d=\"M104.999 67.5L111.454 64L163.495 116.041L115.739 163.797L62.999 111L101.897 104.102L104.999 67.5Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M87 121C105.778 121 121 105.778 121 87C121 68.2223 105.778 53 87 53C68.2223 53 53 68.2223 53 87C53 105.778 68.2223 121 87 121Z\" fill=\"white\"/>\n<path d=\"M87 75.542C89.3472 75.542 91.25 73.6392 91.25 71.292C91.25 68.9448 89.3472 67.042 87 67.042C84.6528 67.042 82.75 68.9448 82.75 71.292C82.75 73.6392 84.6528 75.542 87 75.542Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M86.9992 106.992C86.0975 106.992 85.2327 106.634 84.5951 105.996C83.9574 105.359 83.5992 104.494 83.5992 103.592V86.592C82.6975 86.592 81.8327 86.2338 81.1951 85.5962C80.5574 84.9585 80.1992 84.0937 80.1992 83.192C80.1992 82.2903 80.5574 81.4255 81.1951 80.7878C81.8327 80.1502 82.6975 79.792 83.5992 79.792H86.9992C87.901 79.792 88.7658 80.1502 89.4034 80.7878C90.041 81.4255 90.3992 82.2903 90.3992 83.192V103.592C90.3992 104.494 90.041 105.359 89.4034 105.996C88.7658 106.634 87.901 106.992 86.9992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M90.3992 106.992H83.5992C82.6975 106.992 81.8327 106.634 81.1951 105.996C80.5574 105.358 80.1992 104.494 80.1992 103.592C80.1992 102.69 80.5574 101.825 81.1951 101.188C81.8327 100.55 82.6975 100.192 83.5992 100.192H90.3992C91.301 100.192 92.1658 100.55 92.8034 101.188C93.441 101.825 93.7992 102.69 93.7992 103.592C93.7992 104.494 93.441 105.358 92.8034 105.996C92.1658 106.634 91.301 106.992 90.3992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n</g>\n<defs><clipPath id=\"wui_info_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
|
|
568
587
|
delete: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_delete_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<path d=\"M114.529 67.5672L163.249 116.287L116.354 163.183L67.6336 114.463L100.999 81.0975L64.999 77.5L58.999 69.5L114.529 67.5672Z\" fill=\"var(--wui-danger-active)\"/>\n<path d=\"M103.5 79L100.5 105.5L76 113L69.5 83.5L103.5 79Z\" fill=\"var(--wui-danger)\"/>\n<g clip-path=\"url(#wui_delete_clip1)\">\n<path d=\"M113.652 66.9993C108.895 66.5266 104.139 66.1721 99.3522 65.9061V65.8766L98.7022 62.0357C98.259 59.3175 97.609 55.2402 90.6954 55.2402H82.9545C76.0704 55.2402 75.4204 59.1402 74.9477 62.0061L74.3272 65.788C71.5795 65.9652 68.8318 66.1425 66.084 66.4084L60.0568 66.9993C58.8159 67.1175 57.9295 68.2107 58.0477 69.4221C58.1659 70.6334 59.2295 71.5198 60.4704 71.4016L66.4977 70.8107C81.9795 69.2743 97.5795 69.8652 113.239 71.4311C113.327 71.4311 113.386 71.4311 113.475 71.4311C114.598 71.4311 115.573 70.5743 115.691 69.4221C115.779 68.2107 114.893 67.1175 113.652 66.9993Z\" fill=\"white\"/>\n<path d=\"M108.216 75.5971C107.507 74.8585 106.532 74.4448 105.527 74.4448H68.1816C67.177 74.4448 66.1725 74.8585 65.4929 75.5971C64.8134 76.3357 64.4293 77.3403 64.4884 78.3744L66.3202 108.688C66.6452 113.179 67.0588 118.793 77.3702 118.793H96.3384C106.65 118.793 107.063 113.208 107.388 108.688L109.22 78.4039C109.279 77.3403 108.895 76.3357 108.216 75.5971ZM91.7588 103.99H81.9202C80.7088 103.99 79.7043 102.986 79.7043 101.774C79.7043 100.563 80.7088 99.5585 81.9202 99.5585H91.7588C92.9702 99.5585 93.9747 100.563 93.9747 101.774C93.9747 102.986 92.9702 103.99 91.7588 103.99ZM94.2406 92.1721H79.4679C78.2566 92.1721 77.252 91.1676 77.252 89.9562C77.252 88.7448 78.2566 87.7403 79.4679 87.7403H94.2406C95.452 87.7403 96.4566 88.7448 96.4566 89.9562C96.4566 91.1676 95.452 92.1721 94.2406 92.1721Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_delete_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_delete_clip1\"><rect width=\"65\" height=\"65\" fill=\"white\" transform=\"translate(54.3535 54.502)\"/></clipPath></defs>"
|
|
569
588
|
};
|
|
570
|
-
Object.keys(
|
|
571
|
-
var
|
|
589
|
+
Object.keys(Ce);
|
|
590
|
+
var we = class extends HTMLElement {
|
|
572
591
|
static get observedAttributes() {
|
|
573
592
|
return ["tone", "size"];
|
|
574
593
|
}
|
|
@@ -579,36 +598,36 @@ var be = class extends HTMLElement {
|
|
|
579
598
|
this.isConnected && this.render();
|
|
580
599
|
}
|
|
581
600
|
render() {
|
|
582
|
-
let e = this.getAttribute("tone"), t = Number.parseInt(this.getAttribute("size"), 10) || 72, n =
|
|
601
|
+
let e = this.getAttribute("tone"), t = Number.parseInt(this.getAttribute("size"), 10) || 72, n = Ce[e] || Ce.info;
|
|
583
602
|
this.innerHTML = `<svg width="${t}" height="${t}" viewBox="0 0 174 174" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${n}</svg>`;
|
|
584
603
|
}
|
|
585
|
-
},
|
|
586
|
-
function
|
|
604
|
+
}, Te = 4;
|
|
605
|
+
function Ee(e, t, n = {}) {
|
|
587
606
|
if (!e || !t) return;
|
|
588
|
-
let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i +
|
|
589
|
-
t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(
|
|
590
|
-
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s -
|
|
591
|
-
t.style.left = `${Math.max(
|
|
607
|
+
let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + Te && r.top > a;
|
|
608
|
+
t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(Te, r.top - i - Te)}px` : `${r.bottom + Te}px`, n.matchWidth && (t.style.minWidth = `${r.width}px`, t.style.width = "max-content", t.style.maxWidth = `${window.innerWidth - Te * 2}px`);
|
|
609
|
+
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - Te);
|
|
610
|
+
t.style.left = `${Math.max(Te, c)}px`;
|
|
592
611
|
}
|
|
593
|
-
function
|
|
594
|
-
|
|
612
|
+
function De(e, t) {
|
|
613
|
+
Oe(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
|
|
595
614
|
}
|
|
596
|
-
function
|
|
615
|
+
function Oe(e) {
|
|
597
616
|
e?._reanchor && (window.removeEventListener("resize", e._reanchor), window.removeEventListener("scroll", e._reanchor, !0), e._reanchor = null);
|
|
598
617
|
}
|
|
599
|
-
var
|
|
618
|
+
var ke = "data-wui-mirror";
|
|
600
619
|
function G(e, t) {
|
|
601
|
-
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${
|
|
620
|
+
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${ke}]`);
|
|
602
621
|
if (!n) {
|
|
603
622
|
r?.remove();
|
|
604
623
|
return;
|
|
605
624
|
}
|
|
606
|
-
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(
|
|
625
|
+
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(ke, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
|
|
607
626
|
for (let t of [...r.attributes]) t.name.startsWith("data-val") && !e.hasAttribute(t.name) && r.removeAttribute(t.name);
|
|
608
627
|
for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
|
|
609
628
|
r.disabled = e.hasAttribute("disabled");
|
|
610
629
|
}
|
|
611
|
-
var
|
|
630
|
+
var Ae = {
|
|
612
631
|
activity: "<path d=\"M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"m7.33 14.49 2.38-3.09c.34-.44.97-.52 1.41-.18l1.83 1.44c.44.34 1.07.26 1.41-.17l2.31-2.98\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
613
632
|
alarm: "<path d=\"M2 22h20M12 6a9 9 0 0 0-9 9v7h18v-7a9 9 0 0 0-9-9ZM12 2v1M4 4l1 1M20 4l-1 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
614
633
|
"alert-circle": "<path d=\"M12 7.75V13M21.08 8.58v6.84c0 1.12-.6 2.16-1.57 2.73l-5.94 3.43c-.97.56-2.17.56-3.15 0l-5.94-3.43a3.15 3.15 0 0 1-1.57-2.73V8.58c0-1.12.6-2.16 1.57-2.73l5.94-3.43c.97-.56 2.17-.56 3.15 0l5.94 3.43c.97.57 1.57 1.6 1.57 2.73Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M12 16.2v.1\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
@@ -684,7 +703,7 @@ var Ee = {
|
|
|
684
703
|
house: "<path d=\"m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12ZM12 17.99v-3\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
685
704
|
image: "<path d=\"M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M9 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM2.67 18.95l4.93-3.31c.79-.53 1.93-.47 2.64.14l.33.29c.78.67 2.04.67 2.82 0l4.16-3.57c.78-.67 2.04-.67 2.82 0L22 13.9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
686
705
|
inbox: "<path d=\"M12 2v7l2-2M12 9l-2-2M1.98 13h4.41c.38 0 .72.21.89.55l1.17 2.34A2 2 0 0 0 10.24 17h3.53a2 2 0 0 0 1.79-1.11l1.17-2.34a1 1 0 0 1 .89-.55h4.36\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M7 4.13c-3.54.52-5 2.6-5 6.87v4c0 5 2 7 7 7h6c5 0 7-2 7-7v-4c0-4.27-1.46-6.35-5-6.87\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
687
|
-
info: "<path d=\"M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M11.995 16h.009\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
706
|
+
info: "<g transform=\"rotate(180 12 12)\"><path d=\"M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M11.995 16h.009\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path></g>",
|
|
688
707
|
key: "<path d=\"M19.79 14.93a7.575 7.575 0 0 1-7.6 1.87l-4.71 4.7c-.34.35-1.01.56-1.49.49l-2.18-.3c-.72-.1-1.39-.78-1.5-1.5l-.3-2.18c-.07-.48.16-1.15.49-1.49l4.7-4.7c-.8-2.6-.18-5.55 1.88-7.6 2.95-2.95 7.74-2.95 10.7 0 2.96 2.95 2.96 7.76.01 10.71ZM6.89 17.49l2.3 2.3\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M14.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
689
708
|
"layout-dashboard": "<path d=\"M5 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3H5C3 2 2 3 2 5v2c0 2 1 3 3 3ZM17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM17 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
690
709
|
"layout-grid": "<path d=\"M17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM6 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM18 22a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
@@ -751,12 +770,12 @@ var Ee = {
|
|
|
751
770
|
"zoom-in": "<path d=\"M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM8.5 11h5M11 13.5v-5M18.93 20.69c.53 1.6 1.74 1.76 2.67.36.85-1.28.29-2.33-1.25-2.33-1.14-.01-1.78.88-1.42 1.97Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
752
771
|
"zoom-out": "<path d=\"M9 11.7h5M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>"
|
|
753
772
|
};
|
|
754
|
-
Object.keys(
|
|
773
|
+
Object.keys(Ae);
|
|
755
774
|
function K(e, { size: t = 16, className: n = "", style: r = "" } = {}) {
|
|
756
|
-
let i =
|
|
775
|
+
let i = Ae[e];
|
|
757
776
|
return i ? `<svg class="${n ? `wui-icon ${n}` : "wui-icon"}" data-icon="${e}" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" aria-hidden="true" style="vertical-align:-.125em${r ? `;${r}` : ""}">${i}</svg>` : "";
|
|
758
777
|
}
|
|
759
|
-
function
|
|
778
|
+
function je(e) {
|
|
760
779
|
let { getVisibleOptions: t, getActive: n, setActive: r, onEnter: i, onEscape: a, onTypeahead: o, typeaheadMs: s = 500 } = e, c = "", l = null, u = () => {
|
|
761
780
|
clearTimeout(l), l = null, c = "";
|
|
762
781
|
};
|
|
@@ -785,15 +804,15 @@ function De(e) {
|
|
|
785
804
|
teardown: u
|
|
786
805
|
};
|
|
787
806
|
}
|
|
788
|
-
var
|
|
807
|
+
var Me = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), Ne = (e) => {
|
|
789
808
|
if (!e) return "";
|
|
790
809
|
let t = String(e).toLowerCase().replace(/[^a-z0-9-]/g, "");
|
|
791
810
|
return t ? K(t) : "";
|
|
792
|
-
},
|
|
811
|
+
}, Pe = (e) => {
|
|
793
812
|
if (e == null) return "";
|
|
794
|
-
let t = e[
|
|
813
|
+
let t = e[Me] ? String(e.label ?? "") : q(e.label), n = Ne(e.icon);
|
|
795
814
|
return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
|
|
796
|
-
},
|
|
815
|
+
}, Fe = class extends HTMLElement {
|
|
797
816
|
static formAssociated = !0;
|
|
798
817
|
_accessibleName() {
|
|
799
818
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
@@ -854,12 +873,12 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
854
873
|
set value(e) {
|
|
855
874
|
this._value = e == null ? "" : String(e), G(this, this._value);
|
|
856
875
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
857
|
-
this._label = t ?
|
|
876
|
+
this._label = t ? Le(t.label) : "", this._syncInput(), this._renderOptions("");
|
|
858
877
|
}
|
|
859
878
|
set options(e) {
|
|
860
879
|
this._optionsProp = Array.isArray(e) ? e : [];
|
|
861
880
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
862
|
-
t && (this._label =
|
|
881
|
+
t && (this._label = Le(t.label)), this._renderOptions(), this._syncInput();
|
|
863
882
|
}
|
|
864
883
|
get options() {
|
|
865
884
|
return this._readOptions();
|
|
@@ -878,7 +897,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
878
897
|
}
|
|
879
898
|
_matchesKnownOption(e) {
|
|
880
899
|
let t = e.toLowerCase();
|
|
881
|
-
return this._readOptions().some((e) =>
|
|
900
|
+
return this._readOptions().some((e) => Le(e.label).toLowerCase() === t || String(e.value ?? "").toLowerCase() === t);
|
|
882
901
|
}
|
|
883
902
|
get _minChars() {
|
|
884
903
|
return Math.max(0, Number(this.getAttribute("min-chars")) || +!!this._remote);
|
|
@@ -896,7 +915,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
896
915
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
897
916
|
label: e.innerHTML,
|
|
898
917
|
icon: e.getAttribute("icon") || void 0,
|
|
899
|
-
[
|
|
918
|
+
[Me]: !0,
|
|
900
919
|
selected: e.hasAttribute("selected")
|
|
901
920
|
})));
|
|
902
921
|
}
|
|
@@ -910,12 +929,12 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
910
929
|
let r = `${this.id}-listbox`;
|
|
911
930
|
this._listboxId = r, this.innerHTML = `
|
|
912
931
|
<div class="search-select${n}">
|
|
913
|
-
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
914
|
-
<input class="search-select-input search-select-ac-input" placeholder="${
|
|
932
|
+
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Ie(r)}" aria-label="${Ie(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}>
|
|
933
|
+
<input class="search-select-input search-select-ac-input" placeholder="${Ie(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
915
934
|
<span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
|
|
916
935
|
<button type="button" class="search-select-clear" aria-label="Clear" hidden>${K("x")}</button>
|
|
917
936
|
</div>
|
|
918
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
937
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${Ie(r)}" tabindex="-1" hidden>
|
|
919
938
|
<div class="search-select-options"></div>
|
|
920
939
|
<div class="search-select-empty" hidden>No matches</div>
|
|
921
940
|
<div class="search-select-hint" hidden>Type to search…</div>
|
|
@@ -949,7 +968,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
949
968
|
let t = this._refs();
|
|
950
969
|
if (!t.optionsWrap) return;
|
|
951
970
|
let n = e ?? (t.input ? t.input.value : ""), r = n.trim().toLowerCase(), i = this._readOptions();
|
|
952
|
-
!this._remote && r && (i = i.filter((e) =>
|
|
971
|
+
!this._remote && r && (i = i.filter((e) => Le(e.label).toLowerCase().includes(r)));
|
|
953
972
|
let a = n.trim(), o = this._allowCustom && a && !this._matchesKnownOption(a) ? [...i, {
|
|
954
973
|
value: a,
|
|
955
974
|
custom: !0
|
|
@@ -958,10 +977,10 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
958
977
|
let n = `${s}-opt-${t}`;
|
|
959
978
|
if (e.custom) {
|
|
960
979
|
let t = `Add “${q(e.value)}”`;
|
|
961
|
-
return `<button type="button" role="option" id="${
|
|
980
|
+
return `<button type="button" role="option" id="${Ie(n)}" class="search-select-option search-select-option-custom" data-value="${Ie(e.value)}" data-custom="true" aria-selected="false">${t}</button>`;
|
|
962
981
|
}
|
|
963
982
|
let r = String(e.value) === String(this._value);
|
|
964
|
-
return `<button type="button" role="option" id="${
|
|
983
|
+
return `<button type="button" role="option" id="${Ie(n)}" class="search-select-option${r ? " selected" : ""}" data-value="${Ie(e.value)}" aria-selected="${r}">${Pe(e)}</button>`;
|
|
965
984
|
}).join(""), this._active = -1, t.control?.removeAttribute("aria-activedescendant");
|
|
966
985
|
let c = r.length < this._minChars;
|
|
967
986
|
t.hint && (t.hint.hidden = !(this._remote && c && !i.length)), t.empty && (t.empty.hidden = this._loading || o.length > 0 || this._remote && c);
|
|
@@ -970,7 +989,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
970
989
|
this._teardown();
|
|
971
990
|
let e = this._refs();
|
|
972
991
|
if (!e.control || !e.input) return;
|
|
973
|
-
let t = () =>
|
|
992
|
+
let t = () => Ee(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (t) => {
|
|
974
993
|
let r = n();
|
|
975
994
|
this._active = t;
|
|
976
995
|
for (let e of this._optionEls()) e.classList.remove("is-active");
|
|
@@ -981,7 +1000,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
981
1000
|
e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "", this._syncInput();
|
|
982
1001
|
}, s = (t) => {
|
|
983
1002
|
let n = t.dataset.custom === "true";
|
|
984
|
-
this._value = t.dataset.value, this._label = n ? t.dataset.value :
|
|
1003
|
+
this._value = t.dataset.value, this._label = n ? t.dataset.value : Le(t.innerHTML), G(this, this._value), e.input.value = this._label, this.dispatchEvent(new CustomEvent("change", {
|
|
985
1004
|
bubbles: !0,
|
|
986
1005
|
detail: { isCustom: n }
|
|
987
1006
|
})), o(), e.input.focus();
|
|
@@ -1004,7 +1023,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1004
1023
|
}, this._timer = setTimeout(() => this._fireSearch(t, e), this._debounceMs);
|
|
1005
1024
|
} else this._renderOptions(t);
|
|
1006
1025
|
};
|
|
1007
|
-
this._navHandler =
|
|
1026
|
+
this._navHandler = je({
|
|
1008
1027
|
getVisibleOptions: n,
|
|
1009
1028
|
getActive: () => this._active,
|
|
1010
1029
|
setActive: (e) => r(e),
|
|
@@ -1048,7 +1067,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1048
1067
|
}), this._bindGlobal = () => {
|
|
1049
1068
|
this._teardown(), this._onDocClick = (e) => {
|
|
1050
1069
|
i() && !this.contains(e.target) && o();
|
|
1051
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
1070
|
+
}, document.addEventListener("click", this._onDocClick), De(this, () => {
|
|
1052
1071
|
i() && t();
|
|
1053
1072
|
});
|
|
1054
1073
|
}, this._bindGlobal();
|
|
@@ -1063,12 +1082,12 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1063
1082
|
}));
|
|
1064
1083
|
}
|
|
1065
1084
|
_teardown() {
|
|
1066
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
1085
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), Oe(this), clearTimeout(this._timer), this._navHandler?.teardown();
|
|
1067
1086
|
}
|
|
1068
1087
|
disconnectedCallback() {
|
|
1069
1088
|
this._teardown();
|
|
1070
1089
|
}
|
|
1071
|
-
},
|
|
1090
|
+
}, Ie = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), Le = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), Re = [
|
|
1072
1091
|
"January",
|
|
1073
1092
|
"February",
|
|
1074
1093
|
"March",
|
|
@@ -1081,7 +1100,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1081
1100
|
"October",
|
|
1082
1101
|
"November",
|
|
1083
1102
|
"December"
|
|
1084
|
-
],
|
|
1103
|
+
], ze = [
|
|
1085
1104
|
"Su",
|
|
1086
1105
|
"Mo",
|
|
1087
1106
|
"Tu",
|
|
@@ -1089,24 +1108,24 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1089
1108
|
"Th",
|
|
1090
1109
|
"Fr",
|
|
1091
1110
|
"Sa"
|
|
1092
|
-
],
|
|
1111
|
+
], Be = (e) => String(e).padStart(2, "0"), Ve = (e, t, n) => `${e}-${Be(t + 1)}-${Be(n)}`, J = (e) => {
|
|
1093
1112
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
|
|
1094
1113
|
return t ? {
|
|
1095
1114
|
y: +t[1],
|
|
1096
1115
|
m: t[2] - 1,
|
|
1097
1116
|
d: +t[3]
|
|
1098
1117
|
} : null;
|
|
1099
|
-
},
|
|
1118
|
+
}, He = (e) => {
|
|
1100
1119
|
let t = J(e);
|
|
1101
|
-
return t ? `${
|
|
1102
|
-
},
|
|
1120
|
+
return t ? `${Be(t.d)} ${Re[t.m].slice(0, 3)} ${t.y}` : "";
|
|
1121
|
+
}, Ue = (e, t) => new Date(e, t + 1, 0).getDate(), We = (e, t) => {
|
|
1103
1122
|
for (; t < 0;) t += 12, --e;
|
|
1104
1123
|
for (; t > 11;) t -= 12, e += 1;
|
|
1105
1124
|
return {
|
|
1106
1125
|
y: e,
|
|
1107
1126
|
m: t
|
|
1108
1127
|
};
|
|
1109
|
-
},
|
|
1128
|
+
}, Ge = class extends HTMLElement {
|
|
1110
1129
|
static formAssociated = !0;
|
|
1111
1130
|
static get observedAttributes() {
|
|
1112
1131
|
return [
|
|
@@ -1163,7 +1182,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1163
1182
|
this.innerHTML = `
|
|
1164
1183
|
<div class="datepicker">
|
|
1165
1184
|
<button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${i ? ` aria-label="${q(i)}"` : ""}${a ? ` aria-describedby="${q(a)}"` : ""}>
|
|
1166
|
-
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ?
|
|
1185
|
+
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? He(this._value) : q(e)}</span>
|
|
1167
1186
|
${K("calendar-dots")}
|
|
1168
1187
|
</button>
|
|
1169
1188
|
<div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
|
|
@@ -1176,7 +1195,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1176
1195
|
let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
|
|
1177
1196
|
if (!t) return;
|
|
1178
1197
|
let n = J(this._value);
|
|
1179
|
-
t.textContent = n ?
|
|
1198
|
+
t.textContent = n ? He(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
|
|
1180
1199
|
}
|
|
1181
1200
|
_limits() {
|
|
1182
1201
|
let e = J(this.getAttribute("min")), t = J(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
|
|
@@ -1187,7 +1206,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1187
1206
|
},
|
|
1188
1207
|
monthDisabled: (e, t) => {
|
|
1189
1208
|
let i = new Date(e, t, 1).getTime();
|
|
1190
|
-
return new Date(e, t,
|
|
1209
|
+
return new Date(e, t, Ue(e, t)).getTime() < n || i > r;
|
|
1191
1210
|
},
|
|
1192
1211
|
yearDisabled: (e) => {
|
|
1193
1212
|
let t = new Date(e, 0, 1).getTime();
|
|
@@ -1200,28 +1219,28 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1200
1219
|
e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
|
|
1201
1220
|
}
|
|
1202
1221
|
_daysHtml() {
|
|
1203
|
-
let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n =
|
|
1222
|
+
let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = Ue(this._viewY, this._viewM), r = J(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
|
|
1204
1223
|
y: this._viewY,
|
|
1205
1224
|
m: this._viewM,
|
|
1206
1225
|
d: 1
|
|
1207
1226
|
}, s = (e, t, n, s) => {
|
|
1208
|
-
let c =
|
|
1227
|
+
let c = Ve(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
|
|
1209
1228
|
return `<button type="button" class="${[
|
|
1210
1229
|
"datepicker-day",
|
|
1211
1230
|
s ? "is-outside" : "",
|
|
1212
1231
|
u ? "is-today" : "",
|
|
1213
1232
|
l ? "is-selected" : ""
|
|
1214
1233
|
].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
|
|
1215
|
-
}, c = "", l =
|
|
1234
|
+
}, c = "", l = We(this._viewY, this._viewM - 1), u = Ue(l.y, l.m);
|
|
1216
1235
|
for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
|
|
1217
1236
|
for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
|
|
1218
|
-
let d =
|
|
1237
|
+
let d = We(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
|
|
1219
1238
|
for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
|
|
1220
|
-
let p =
|
|
1239
|
+
let p = ze.map((t, n) => ze[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
|
|
1221
1240
|
return `
|
|
1222
1241
|
<div class="datepicker-head">
|
|
1223
1242
|
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${K("chevron-left")}</button>
|
|
1224
|
-
<button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${
|
|
1243
|
+
<button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${Re[this._viewM]} ${this._viewY}</button>
|
|
1225
1244
|
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${K("chevron-right")}</button>
|
|
1226
1245
|
</div>
|
|
1227
1246
|
<div class="datepicker-weekdays">${p}</div>
|
|
@@ -1239,7 +1258,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1239
1258
|
o ? "is-today" : "",
|
|
1240
1259
|
a ? "is-selected" : ""
|
|
1241
1260
|
].filter(Boolean).join(" ");
|
|
1242
|
-
r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${
|
|
1261
|
+
r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${Re[i].slice(0, 3)}</button>`;
|
|
1243
1262
|
}
|
|
1244
1263
|
return `
|
|
1245
1264
|
<div class="datepicker-head">
|
|
@@ -1272,17 +1291,17 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1272
1291
|
t && e.contains(document.activeElement) && t.focus();
|
|
1273
1292
|
}
|
|
1274
1293
|
_position(e, t) {
|
|
1275
|
-
|
|
1294
|
+
Ee(e, t);
|
|
1276
1295
|
}
|
|
1277
1296
|
_setFocus(e, t, n, r) {
|
|
1278
|
-
let { y: i, m: a } =
|
|
1297
|
+
let { y: i, m: a } = We(e, t);
|
|
1279
1298
|
this._focus = {
|
|
1280
1299
|
y: i,
|
|
1281
1300
|
m: a,
|
|
1282
1301
|
d: n
|
|
1283
1302
|
};
|
|
1284
1303
|
let o = i !== this._viewY || a !== this._viewM;
|
|
1285
|
-
this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${
|
|
1304
|
+
this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${Ve(i, a, n)}"]`)?.focus();
|
|
1286
1305
|
}
|
|
1287
1306
|
_onKey(e) {
|
|
1288
1307
|
if (this._mode !== "days") {
|
|
@@ -1307,17 +1326,17 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1307
1326
|
case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
|
|
1308
1327
|
case "PageUp": {
|
|
1309
1328
|
e.preventDefault();
|
|
1310
|
-
let n =
|
|
1311
|
-
return this._setFocus(n.y, n.m, Math.min(t.d,
|
|
1329
|
+
let n = We(t.y, t.m - (e.shiftKey ? 12 : 1));
|
|
1330
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, Ue(n.y, n.m)), "slide-prev");
|
|
1312
1331
|
}
|
|
1313
1332
|
case "PageDown": {
|
|
1314
1333
|
e.preventDefault();
|
|
1315
|
-
let n =
|
|
1316
|
-
return this._setFocus(n.y, n.m, Math.min(t.d,
|
|
1334
|
+
let n = We(t.y, t.m + (e.shiftKey ? 12 : 1));
|
|
1335
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, Ue(n.y, n.m)), "slide-next");
|
|
1317
1336
|
}
|
|
1318
1337
|
case "Enter":
|
|
1319
1338
|
case " ":
|
|
1320
|
-
e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value =
|
|
1339
|
+
e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = Ve(t.y, t.m, t.d), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
|
|
1321
1340
|
return;
|
|
1322
1341
|
case "Escape": return this._close();
|
|
1323
1342
|
default:
|
|
@@ -1344,7 +1363,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1344
1363
|
let t = e.target.closest("[data-nav]");
|
|
1345
1364
|
if (t) {
|
|
1346
1365
|
this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
|
|
1347
|
-
let e =
|
|
1366
|
+
let e = We(this._viewY, this._viewM + Number(t.dataset.nav));
|
|
1348
1367
|
this._viewY = e.y, this._viewM = e.m, this._focus = {
|
|
1349
1368
|
y: e.y,
|
|
1350
1369
|
m: e.m,
|
|
@@ -1383,7 +1402,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1383
1402
|
}
|
|
1384
1403
|
if (e.target.closest("[data-today]")) {
|
|
1385
1404
|
let e = /* @__PURE__ */ new Date();
|
|
1386
|
-
this.value =
|
|
1405
|
+
this.value = Ve(e.getFullYear(), e.getMonth(), e.getDate()), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
|
|
1387
1406
|
return;
|
|
1388
1407
|
}
|
|
1389
1408
|
if (e.target.closest("[data-clear]")) {
|
|
@@ -1400,18 +1419,18 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1400
1419
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
1401
1420
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
1402
1421
|
r() && e.key === "Escape" && this._close();
|
|
1403
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
1422
|
+
}, document.addEventListener("keydown", this._onDocKey), De(this, () => {
|
|
1404
1423
|
r() && this._position(e, t);
|
|
1405
1424
|
});
|
|
1406
1425
|
}, this._bindGlobal(), this._syncFormValue();
|
|
1407
1426
|
}
|
|
1408
1427
|
_teardown() {
|
|
1409
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
1428
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), Oe(this);
|
|
1410
1429
|
}
|
|
1411
1430
|
disconnectedCallback() {
|
|
1412
1431
|
this._teardown();
|
|
1413
1432
|
}
|
|
1414
|
-
},
|
|
1433
|
+
}, Ke = class extends HTMLElement {
|
|
1415
1434
|
static formAssociated = !0;
|
|
1416
1435
|
static get observedAttributes() {
|
|
1417
1436
|
return [
|
|
@@ -1470,7 +1489,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1470
1489
|
text: e,
|
|
1471
1490
|
empty: !0
|
|
1472
1491
|
} : {
|
|
1473
|
-
text: `${
|
|
1492
|
+
text: `${He(this._start) || "Start"} – ${He(this._end) || "End"}`,
|
|
1474
1493
|
empty: !1
|
|
1475
1494
|
};
|
|
1476
1495
|
}
|
|
@@ -1517,17 +1536,17 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1517
1536
|
};
|
|
1518
1537
|
}
|
|
1519
1538
|
_monthHtml(e, t) {
|
|
1520
|
-
let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i =
|
|
1521
|
-
let i =
|
|
1539
|
+
let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = Ue(e, t), a = this._limits(), o = ze.map((e, t) => ze[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
|
|
1540
|
+
let i = Ve(e, t, n), o = a(e, t, n);
|
|
1522
1541
|
return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
|
|
1523
|
-
}, c = "", l =
|
|
1542
|
+
}, c = "", l = We(e, t - 1), u = Ue(l.y, l.m);
|
|
1524
1543
|
for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
|
|
1525
1544
|
for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
|
|
1526
|
-
let d =
|
|
1545
|
+
let d = We(e, t + 1), f = (7 - (r + i) % 7) % 7;
|
|
1527
1546
|
for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
|
|
1528
1547
|
return `
|
|
1529
1548
|
<div class="daterange-cal">
|
|
1530
|
-
<div class="datepicker-month-label">${
|
|
1549
|
+
<div class="datepicker-month-label">${Re[t]} ${e}</div>
|
|
1531
1550
|
<div class="datepicker-weekdays">${o}</div>
|
|
1532
1551
|
<div class="datepicker-grid" role="grid">${c}</div>
|
|
1533
1552
|
</div>`;
|
|
@@ -1535,7 +1554,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1535
1554
|
_renderView() {
|
|
1536
1555
|
let e = this.querySelector(".daterange-pop");
|
|
1537
1556
|
if (!e) return;
|
|
1538
|
-
let t =
|
|
1557
|
+
let t = We(this._viewY, this._viewM + 1);
|
|
1539
1558
|
e.innerHTML = `
|
|
1540
1559
|
<div class="daterange-head">
|
|
1541
1560
|
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${K("chevron-left")}</button>
|
|
@@ -1561,10 +1580,10 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1561
1580
|
n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
|
|
1562
1581
|
}
|
|
1563
1582
|
let i = e.querySelector("[data-range-hint]");
|
|
1564
|
-
i && (i.textContent = this._start ? this._end ? `${
|
|
1583
|
+
i && (i.textContent = this._start ? this._end ? `${He(this._start)} – ${He(this._end)}` : "Pick an end date" : "Pick a start date");
|
|
1565
1584
|
}
|
|
1566
1585
|
_position(e, t) {
|
|
1567
|
-
|
|
1586
|
+
Ee(e, t);
|
|
1568
1587
|
}
|
|
1569
1588
|
_pick(e) {
|
|
1570
1589
|
if (!this._start || this._start && this._end) {
|
|
@@ -1596,7 +1615,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1596
1615
|
this._popClick = !0;
|
|
1597
1616
|
let t = e.target.closest("[data-nav]");
|
|
1598
1617
|
if (t) {
|
|
1599
|
-
let e =
|
|
1618
|
+
let e = We(this._viewY, this._viewM + Number(t.dataset.nav));
|
|
1600
1619
|
this._viewY = e.y, this._viewM = e.m, this._renderView();
|
|
1601
1620
|
return;
|
|
1602
1621
|
}
|
|
@@ -1615,18 +1634,18 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1615
1634
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
1616
1635
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
1617
1636
|
r() && e.key === "Escape" && this._close();
|
|
1618
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
1637
|
+
}, document.addEventListener("keydown", this._onDocKey), De(this, () => {
|
|
1619
1638
|
r() && this._position(e, t);
|
|
1620
1639
|
});
|
|
1621
1640
|
}, this._bindGlobal(), this._syncMirrors();
|
|
1622
1641
|
}
|
|
1623
1642
|
_teardown() {
|
|
1624
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
1643
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), Oe(this);
|
|
1625
1644
|
}
|
|
1626
1645
|
disconnectedCallback() {
|
|
1627
1646
|
this._teardown();
|
|
1628
1647
|
}
|
|
1629
|
-
},
|
|
1648
|
+
}, qe = class extends HTMLElement {
|
|
1630
1649
|
static get observedAttributes() {
|
|
1631
1650
|
return [
|
|
1632
1651
|
"static",
|
|
@@ -1647,10 +1666,10 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1647
1666
|
e === "static" && this.isConnected && this._wire();
|
|
1648
1667
|
}
|
|
1649
1668
|
_maxScale() {
|
|
1650
|
-
return
|
|
1669
|
+
return Je(this.getAttribute("max-scale"), 1.6);
|
|
1651
1670
|
}
|
|
1652
1671
|
_radius() {
|
|
1653
|
-
return
|
|
1672
|
+
return Je(this.getAttribute("radius"), 100);
|
|
1654
1673
|
}
|
|
1655
1674
|
_magnifyEnabled() {
|
|
1656
1675
|
return !(this.hasAttribute("static") || typeof matchMedia == "function" && (matchMedia("(pointer: coarse)").matches || matchMedia("(prefers-reduced-motion: reduce)").matches));
|
|
@@ -1675,10 +1694,10 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1675
1694
|
_teardown() {
|
|
1676
1695
|
this._pointerMoveListener &&= (this.removeEventListener("pointermove", this._pointerMoveListener), null), this._pointerLeaveListener &&= (this.removeEventListener("pointerleave", this._pointerLeaveListener), null), this._resetMagnification();
|
|
1677
1696
|
}
|
|
1678
|
-
},
|
|
1697
|
+
}, Je = (e, t) => {
|
|
1679
1698
|
let n = Number.parseFloat(e);
|
|
1680
1699
|
return Number.isFinite(n) ? n : t;
|
|
1681
|
-
},
|
|
1700
|
+
}, Ye = class extends HTMLElement {
|
|
1682
1701
|
static formAssociated = !0;
|
|
1683
1702
|
_accessibleName() {
|
|
1684
1703
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
@@ -1756,7 +1775,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1756
1775
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
1757
1776
|
label: e.innerHTML,
|
|
1758
1777
|
icon: e.getAttribute("icon") || void 0,
|
|
1759
|
-
[
|
|
1778
|
+
[Me]: !0,
|
|
1760
1779
|
selected: e.hasAttribute("selected")
|
|
1761
1780
|
})));
|
|
1762
1781
|
}
|
|
@@ -1769,7 +1788,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1769
1788
|
}
|
|
1770
1789
|
_labelHtmlFor(e) {
|
|
1771
1790
|
let t = this._readOptions().find((t) => String(t.value) === String(e));
|
|
1772
|
-
return t ?
|
|
1791
|
+
return t ? Pe(t) : q(e);
|
|
1773
1792
|
}
|
|
1774
1793
|
render() {
|
|
1775
1794
|
this._snapshotDeclared();
|
|
@@ -1778,13 +1797,13 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1778
1797
|
let a = `${this.id}-listbox`;
|
|
1779
1798
|
this._listboxId = a, this.innerHTML = `
|
|
1780
1799
|
<div class="search-select${i}">
|
|
1781
|
-
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
1800
|
+
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Xe(a)}" aria-label="${Xe(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
|
|
1782
1801
|
${n ? K(n, { className: "search-select-icon" }) : ""}
|
|
1783
1802
|
<div class="ms-chips" data-chips></div>
|
|
1784
1803
|
${K("chevron-down", { className: "search-select-caret" })}
|
|
1785
1804
|
</div>
|
|
1786
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
1787
|
-
${e ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${
|
|
1805
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${Xe(a)}" aria-multiselectable="true" tabindex="-1" hidden>
|
|
1806
|
+
${e ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${Xe(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${K("x")}</button></div>` : ""}
|
|
1788
1807
|
<div class="search-select-options"></div>
|
|
1789
1808
|
<div class="search-select-empty" hidden>No matches</div>
|
|
1790
1809
|
</div>
|
|
@@ -1798,7 +1817,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1798
1817
|
e.innerHTML = `<span class="search-select-placeholder">${q(t)}</span>`;
|
|
1799
1818
|
return;
|
|
1800
1819
|
}
|
|
1801
|
-
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${
|
|
1820
|
+
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${Xe(e)}" aria-label="Remove ${Xe(Ze(this._labelFor(e)))}">${K("x")}</button></span>`).join(""), this._collapseChips();
|
|
1802
1821
|
}
|
|
1803
1822
|
_collapseChips() {
|
|
1804
1823
|
let e = this.querySelector("[data-chips]");
|
|
@@ -1822,18 +1841,18 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1822
1841
|
let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
|
|
1823
1842
|
if (!t) return;
|
|
1824
1843
|
let r = (e || "").trim().toLowerCase(), i = this._readOptions();
|
|
1825
|
-
r && (i = i.filter((e) =>
|
|
1844
|
+
r && (i = i.filter((e) => Ze(e.label).toLowerCase().includes(r)));
|
|
1826
1845
|
let a = this._listboxId || `${this.id || "wui-multiselect"}-listbox`;
|
|
1827
1846
|
t.innerHTML = i.map((e, t) => {
|
|
1828
1847
|
let n = this._values.includes(String(e.value));
|
|
1829
|
-
return `<button type="button" role="option" id="${
|
|
1848
|
+
return `<button type="button" role="option" id="${Xe(`${a}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${Xe(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${Pe(e)}</span><span class="ms-check">${K("check")}</span></button>`;
|
|
1830
1849
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1, this.querySelector(".search-select-control")?.removeAttribute("aria-activedescendant");
|
|
1831
1850
|
}
|
|
1832
1851
|
_wire() {
|
|
1833
1852
|
this._teardown();
|
|
1834
1853
|
let e = this.querySelector(".search-select-control"), t = this.querySelector(".search-select-menu"), n = this.querySelector(".search-select-input"), r = this.querySelector(".search-select-clear"), i = this.querySelector(".search-select-options");
|
|
1835
1854
|
if (!e || !t) return;
|
|
1836
|
-
let a = () => this.hasAttribute("disabled"), o = () =>
|
|
1855
|
+
let a = () => this.hasAttribute("disabled"), o = () => Ee(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (t) => {
|
|
1837
1856
|
let n = c();
|
|
1838
1857
|
this._active = t;
|
|
1839
1858
|
for (let e of s()) e.classList.remove("is-active");
|
|
@@ -1866,7 +1885,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1866
1885
|
t && l(c().indexOf(t));
|
|
1867
1886
|
}), i.addEventListener("mouseleave", () => l(-1)), n?.addEventListener("input", () => {
|
|
1868
1887
|
this._renderOptions(n.value), r && (r.hidden = !n.value), l(-1);
|
|
1869
|
-
}), this._navHandler =
|
|
1888
|
+
}), this._navHandler = je({
|
|
1870
1889
|
getVisibleOptions: c,
|
|
1871
1890
|
getActive: () => this._active,
|
|
1872
1891
|
setActive: (e) => l(e),
|
|
@@ -1895,18 +1914,18 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1895
1914
|
}), this._bindGlobal = () => {
|
|
1896
1915
|
this._teardown(), !this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this)), this._onDocClick = (e) => {
|
|
1897
1916
|
u() && !this.contains(e.target) && f();
|
|
1898
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
1917
|
+
}, document.addEventListener("click", this._onDocClick), De(this, () => {
|
|
1899
1918
|
u() && o();
|
|
1900
1919
|
});
|
|
1901
1920
|
}, this._bindGlobal();
|
|
1902
1921
|
}
|
|
1903
1922
|
_teardown() {
|
|
1904
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
1923
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), Oe(this), this._navHandler?.teardown();
|
|
1905
1924
|
}
|
|
1906
1925
|
disconnectedCallback() {
|
|
1907
1926
|
this._teardown(), this._ro?.disconnect(), this._ro = null;
|
|
1908
1927
|
}
|
|
1909
|
-
},
|
|
1928
|
+
}, Xe = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), Ze = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), Qe = /[^0-9]/g, $e = /[^0-9a-zA-Z]/g, et = class extends HTMLElement {
|
|
1910
1929
|
static formAssociated = !0;
|
|
1911
1930
|
static get observedAttributes() {
|
|
1912
1931
|
return [
|
|
@@ -1937,7 +1956,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1937
1956
|
this._value = this._clean(e), G(this, this._value), this._paint();
|
|
1938
1957
|
}
|
|
1939
1958
|
_clean(e) {
|
|
1940
|
-
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ?
|
|
1959
|
+
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? $e : Qe, "").slice(0, this.length);
|
|
1941
1960
|
}
|
|
1942
1961
|
constructor() {
|
|
1943
1962
|
super();
|
|
@@ -1999,25 +2018,36 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1999
2018
|
detail: t
|
|
2000
2019
|
}));
|
|
2001
2020
|
};
|
|
2002
|
-
e.addEventListener("input", () =>
|
|
2021
|
+
e.addEventListener("input", () => {
|
|
2022
|
+
let n = e.value;
|
|
2023
|
+
if (this._value.length === this.length && n.length > this._value.length && n.startsWith(this._value)) {
|
|
2024
|
+
let e = this._clean(n.slice(this._value.length));
|
|
2025
|
+
if (e) {
|
|
2026
|
+
t(e);
|
|
2027
|
+
return;
|
|
2028
|
+
}
|
|
2029
|
+
}
|
|
2030
|
+
t(n);
|
|
2031
|
+
}), e.addEventListener("paste", (e) => {
|
|
2003
2032
|
let n = e.clipboardData?.getData("text");
|
|
2004
2033
|
n != null && (e.preventDefault(), t(n));
|
|
2005
2034
|
});
|
|
2006
2035
|
for (let t of [
|
|
2007
2036
|
"keyup",
|
|
2008
2037
|
"click",
|
|
2009
|
-
"focus",
|
|
2010
2038
|
"blur",
|
|
2011
2039
|
"select"
|
|
2012
2040
|
]) e.addEventListener(t, () => this._paint());
|
|
2013
|
-
|
|
2041
|
+
e.addEventListener("focus", () => {
|
|
2042
|
+
this._value.length === this.length && e.select(), this._paint();
|
|
2043
|
+
}), this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange), this._onSelectionChange = () => {
|
|
2014
2044
|
document.activeElement === e && this._paint();
|
|
2015
2045
|
}, document.addEventListener("selectionchange", this._onSelectionChange);
|
|
2016
2046
|
}
|
|
2017
2047
|
disconnectedCallback() {
|
|
2018
2048
|
this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange);
|
|
2019
2049
|
}
|
|
2020
|
-
},
|
|
2050
|
+
}, tt = [
|
|
2021
2051
|
[
|
|
2022
2052
|
"AF",
|
|
2023
2053
|
"Afghanistan",
|
|
@@ -3243,20 +3273,20 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
3243
3273
|
"Zimbabwe",
|
|
3244
3274
|
"263"
|
|
3245
3275
|
]
|
|
3246
|
-
],
|
|
3276
|
+
], nt = (e) => (tt.find((t) => t[0] === e) || [
|
|
3247
3277
|
"",
|
|
3248
3278
|
"",
|
|
3249
3279
|
""
|
|
3250
|
-
])[2],
|
|
3251
|
-
function
|
|
3252
|
-
return Y ? Promise.resolve(Y) : (
|
|
3280
|
+
])[2], rt = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, Y = null, it = null;
|
|
3281
|
+
function at() {
|
|
3282
|
+
return Y ? Promise.resolve(Y) : (it ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (Y = {
|
|
3253
3283
|
AsYouType: e.AsYouType,
|
|
3254
3284
|
getExampleNumber: e.getExampleNumber,
|
|
3255
3285
|
isValidPhoneNumber: e.isValidPhoneNumber,
|
|
3256
3286
|
examples: t.default || t
|
|
3257
|
-
}, Y)).catch(() => null),
|
|
3287
|
+
}, Y)).catch(() => null), it);
|
|
3258
3288
|
}
|
|
3259
|
-
function
|
|
3289
|
+
function ot(e, t) {
|
|
3260
3290
|
if (!Y || !t) return t;
|
|
3261
3291
|
try {
|
|
3262
3292
|
return new Y.AsYouType(e).input(t);
|
|
@@ -3264,7 +3294,7 @@ function nt(e, t) {
|
|
|
3264
3294
|
return t;
|
|
3265
3295
|
}
|
|
3266
3296
|
}
|
|
3267
|
-
function
|
|
3297
|
+
function st(e) {
|
|
3268
3298
|
if (!Y) return null;
|
|
3269
3299
|
try {
|
|
3270
3300
|
return Y.getExampleNumber(e, Y.examples)?.formatNational() || null;
|
|
@@ -3272,7 +3302,7 @@ function rt(e) {
|
|
|
3272
3302
|
return null;
|
|
3273
3303
|
}
|
|
3274
3304
|
}
|
|
3275
|
-
function
|
|
3305
|
+
function ct(e) {
|
|
3276
3306
|
if (!Y || !e) return null;
|
|
3277
3307
|
try {
|
|
3278
3308
|
return Y.isValidPhoneNumber(e);
|
|
@@ -3280,7 +3310,7 @@ function it(e) {
|
|
|
3280
3310
|
return null;
|
|
3281
3311
|
}
|
|
3282
3312
|
}
|
|
3283
|
-
function
|
|
3313
|
+
function lt(e) {
|
|
3284
3314
|
if (!Y) return null;
|
|
3285
3315
|
try {
|
|
3286
3316
|
let t = Y.getExampleNumber(e, Y.examples);
|
|
@@ -3289,7 +3319,7 @@ function at(e) {
|
|
|
3289
3319
|
return null;
|
|
3290
3320
|
}
|
|
3291
3321
|
}
|
|
3292
|
-
function
|
|
3322
|
+
function ut(e) {
|
|
3293
3323
|
if (!Y || !e?.trim().startsWith("+")) return null;
|
|
3294
3324
|
try {
|
|
3295
3325
|
let t = new Y.AsYouType();
|
|
@@ -3303,7 +3333,7 @@ function ot(e) {
|
|
|
3303
3333
|
return null;
|
|
3304
3334
|
}
|
|
3305
3335
|
}
|
|
3306
|
-
var
|
|
3336
|
+
var dt = class extends HTMLElement {
|
|
3307
3337
|
static formAssociated = !0;
|
|
3308
3338
|
static get observedAttributes() {
|
|
3309
3339
|
return [
|
|
@@ -3343,13 +3373,13 @@ var st = class extends HTMLElement {
|
|
|
3343
3373
|
this.value = this._defaultValue || "";
|
|
3344
3374
|
}
|
|
3345
3375
|
get value() {
|
|
3346
|
-
return this._national ? `+${
|
|
3376
|
+
return this._national ? `+${nt(this._country)}${this._national}` : "";
|
|
3347
3377
|
}
|
|
3348
3378
|
set value(e) {
|
|
3349
|
-
let t = String(e ?? "").trim(), n =
|
|
3379
|
+
let t = String(e ?? "").trim(), n = ut(t);
|
|
3350
3380
|
if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
|
|
3351
3381
|
else if (t.startsWith("+")) {
|
|
3352
|
-
let e = t.replace(/[^0-9]/g, ""), n = String(
|
|
3382
|
+
let e = t.replace(/[^0-9]/g, ""), n = String(nt(this._country));
|
|
3353
3383
|
n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
|
|
3354
3384
|
} else this._national = t.replace(/[^0-9]/g, "");
|
|
3355
3385
|
n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._committedValue = this.value, this._syncMirror();
|
|
@@ -3365,25 +3395,25 @@ var st = class extends HTMLElement {
|
|
|
3365
3395
|
}
|
|
3366
3396
|
render() {
|
|
3367
3397
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._country = this.getAttribute("country") || this._country;
|
|
3368
|
-
let e = this.getAttribute("placeholder") ||
|
|
3398
|
+
let e = this.getAttribute("placeholder") || st(this._country) || "Enter phone number";
|
|
3369
3399
|
this.id ||= `wui-phone-${Math.random().toString(36).slice(2, 9)}`;
|
|
3370
3400
|
let t = `${this.id}-listbox`;
|
|
3371
3401
|
this._listboxId = t;
|
|
3372
|
-
let n =
|
|
3402
|
+
let n = tt.map(([e, n, r], i) => `<button type="button" role="option" id="${ft(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${rt(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
|
|
3373
3403
|
this.innerHTML = `
|
|
3374
3404
|
<div class="phone-input-wrap">
|
|
3375
3405
|
<div class="phone-country-adornment">
|
|
3376
|
-
<button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
3377
|
-
<span class="${
|
|
3406
|
+
<button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${ft(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
3407
|
+
<span class="${rt(this._country)}" data-flag aria-hidden="true"></span>
|
|
3378
3408
|
${K("chevron-down", { className: "phone-chevron" })}
|
|
3379
|
-
<span class="phone-dial" data-dial>+${
|
|
3409
|
+
<span class="phone-dial" data-dial>+${nt(this._country)}</span>
|
|
3380
3410
|
</button>
|
|
3381
|
-
<div class="country-dropdown-menu" role="listbox" id="${
|
|
3382
|
-
<div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${K("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${
|
|
3411
|
+
<div class="country-dropdown-menu" role="listbox" id="${ft(t)}" tabindex="-1" hidden>
|
|
3412
|
+
<div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${K("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${ft(t)}" aria-autocomplete="list" /></div>
|
|
3383
3413
|
<div class="country-list-scroll">${n}<div class="country-empty" hidden>No countries found</div></div>
|
|
3384
3414
|
</div>
|
|
3385
3415
|
</div>
|
|
3386
|
-
<input type="tel" class="input" placeholder="${
|
|
3416
|
+
<input type="tel" class="input" placeholder="${ft(e)}" value="${ft(ot(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${ft(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${ft(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
3387
3417
|
</div>
|
|
3388
3418
|
<div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, G(this, this.value), this._wire();
|
|
3389
3419
|
}
|
|
@@ -3397,7 +3427,7 @@ var st = class extends HTMLElement {
|
|
|
3397
3427
|
this._teardown();
|
|
3398
3428
|
let e = this.querySelector(".country-toggle"), t = this.querySelector(".phone-input-wrap"), n = this.querySelector(".country-dropdown-menu"), r = this.querySelector(".dropdown-search-input"), i = this.querySelector(".country-list-scroll"), a = this.querySelector(".country-empty"), o = this.querySelector("input[type=tel]"), s = this.querySelector("[data-flag]"), c = this.querySelector("[data-dial]");
|
|
3399
3429
|
if (!e || !n) return;
|
|
3400
|
-
let l = () => !n.hidden, u = () =>
|
|
3430
|
+
let l = () => !n.hidden, u = () => Ee(t || e, n), d = (e) => {
|
|
3401
3431
|
let t = this._visibleItems();
|
|
3402
3432
|
this._active = e;
|
|
3403
3433
|
for (let e of this._itemEls()) e.classList.remove("is-active");
|
|
@@ -3414,12 +3444,12 @@ var st = class extends HTMLElement {
|
|
|
3414
3444
|
}
|
|
3415
3445
|
a && (a.hidden = n > 0);
|
|
3416
3446
|
}, h = (e) => {
|
|
3417
|
-
this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), s && (s.className =
|
|
3447
|
+
this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), s && (s.className = rt(e)), c && (c.textContent = `+${nt(e)}`);
|
|
3418
3448
|
for (let t of this._itemEls()) {
|
|
3419
3449
|
let n = t.dataset.iso === e;
|
|
3420
3450
|
t.classList.toggle("selected", n), t.setAttribute("aria-selected", String(n));
|
|
3421
3451
|
}
|
|
3422
|
-
!this.getAttribute("placeholder") && o && (o.placeholder =
|
|
3452
|
+
!this.getAttribute("placeholder") && o && (o.placeholder = st(e) || "Enter phone number"), o && this._national && (o.value = ot(e, this._national)), p(), this._syncMirror(), this._emitChange(), o?.focus();
|
|
3423
3453
|
}, g = (t) => {
|
|
3424
3454
|
let n = this._visibleItems();
|
|
3425
3455
|
if (t.key === "ArrowDown") {
|
|
@@ -3453,7 +3483,7 @@ var st = class extends HTMLElement {
|
|
|
3453
3483
|
let _ = this.querySelector("[data-phone-error]"), v = (e) => {
|
|
3454
3484
|
if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), _) {
|
|
3455
3485
|
if (e) {
|
|
3456
|
-
let e =
|
|
3486
|
+
let e = st(this._country);
|
|
3457
3487
|
_.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
|
|
3458
3488
|
}
|
|
3459
3489
|
_.hidden = !e;
|
|
@@ -3461,26 +3491,26 @@ var st = class extends HTMLElement {
|
|
|
3461
3491
|
};
|
|
3462
3492
|
o.addEventListener("input", (e) => {
|
|
3463
3493
|
e.stopPropagation();
|
|
3464
|
-
let t = o.value.replace(/[^0-9]/g, ""), n =
|
|
3494
|
+
let t = o.value.replace(/[^0-9]/g, ""), n = lt(this._country);
|
|
3465
3495
|
n && t.length > n && (t = t.slice(0, n)), this._national = t;
|
|
3466
|
-
let r =
|
|
3467
|
-
o.value !== r && (o.value = r), this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national ||
|
|
3496
|
+
let r = ot(this._country, this._national);
|
|
3497
|
+
o.value !== r && (o.value = r), this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || ct(this.value) === !0) && v(!1);
|
|
3468
3498
|
}), o.addEventListener("change", (e) => e.stopPropagation()), o.addEventListener("blur", () => {
|
|
3469
|
-
v(this._national.length > 0 &&
|
|
3499
|
+
v(this._national.length > 0 && ct(this.value) === !1), this.value !== this._committedValue && this._emitChange();
|
|
3470
3500
|
}), o.addEventListener("paste", (e) => {
|
|
3471
|
-
let t =
|
|
3472
|
-
t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value =
|
|
3501
|
+
let t = ut(e.clipboardData?.getData("text"));
|
|
3502
|
+
t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = ot(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
|
|
3473
3503
|
}), this._bindGlobal = () => {
|
|
3474
3504
|
this._teardownGlobals?.(), this._onDocClick = (e) => {
|
|
3475
3505
|
l() && !this.contains(e.target) && p();
|
|
3476
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
3506
|
+
}, document.addEventListener("click", this._onDocClick), De(this, () => {
|
|
3477
3507
|
l() && u();
|
|
3478
3508
|
});
|
|
3479
3509
|
}, this._teardownGlobals = () => {
|
|
3480
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
3481
|
-
}, this._bindGlobal(),
|
|
3482
|
-
if (!(!e || !o.isConnected) && (this._national && (o.value =
|
|
3483
|
-
let e =
|
|
3510
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), Oe(this);
|
|
3511
|
+
}, this._bindGlobal(), at().then((e) => {
|
|
3512
|
+
if (!(!e || !o.isConnected) && (this._national && (o.value = ot(this._country, this._national)), !this.getAttribute("placeholder"))) {
|
|
3513
|
+
let e = st(this._country);
|
|
3484
3514
|
e && (o.placeholder = e);
|
|
3485
3515
|
}
|
|
3486
3516
|
}), this._syncMirror();
|
|
@@ -3491,7 +3521,7 @@ var st = class extends HTMLElement {
|
|
|
3491
3521
|
disconnectedCallback() {
|
|
3492
3522
|
this._teardown();
|
|
3493
3523
|
}
|
|
3494
|
-
},
|
|
3524
|
+
}, ft = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), pt = class extends HTMLElement {
|
|
3495
3525
|
static formAssociated = !0;
|
|
3496
3526
|
static get observedAttributes() {
|
|
3497
3527
|
return [
|
|
@@ -3565,7 +3595,7 @@ var st = class extends HTMLElement {
|
|
|
3565
3595
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
3566
3596
|
label: e.innerHTML,
|
|
3567
3597
|
icon: e.getAttribute("icon") || void 0,
|
|
3568
|
-
[
|
|
3598
|
+
[Me]: !0,
|
|
3569
3599
|
selected: e.hasAttribute("selected")
|
|
3570
3600
|
})));
|
|
3571
3601
|
}
|
|
@@ -3580,19 +3610,19 @@ var st = class extends HTMLElement {
|
|
|
3580
3610
|
this._listboxId = u;
|
|
3581
3611
|
let d = e.map((e, t) => {
|
|
3582
3612
|
let n = String(e.value) === String(this._value);
|
|
3583
|
-
return `<button type="button" role="option" id="${
|
|
3613
|
+
return `<button type="button" role="option" id="${mt(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${mt(e.value)}" aria-selected="${n}">${Pe(e)}</button>`;
|
|
3584
3614
|
}).join("");
|
|
3585
3615
|
this.innerHTML = `
|
|
3586
3616
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
|
|
3587
|
-
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
3617
|
+
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${mt(u)}" aria-label="${mt(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
3588
3618
|
${a ? K(a, { className: "search-select-icon" }) : ""}
|
|
3589
3619
|
${o ? `<span class="search-select-prefix">${q(o)}</span>` : ""}
|
|
3590
|
-
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ?
|
|
3620
|
+
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? Pe(l) : q(s)}</span>
|
|
3591
3621
|
${n ? `<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${K("x")}</span>` : ""}
|
|
3592
3622
|
${K("chevron-down", { className: "search-select-caret" })}
|
|
3593
3623
|
</button>
|
|
3594
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
3595
|
-
${t ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${
|
|
3624
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${mt(u)}" tabindex="-1" hidden>
|
|
3625
|
+
${t ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${mt(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${K("x")}</button></div>` : ""}
|
|
3596
3626
|
<div class="search-select-options">${d}<div class="search-select-empty" hidden>No matches</div></div>
|
|
3597
3627
|
</div>
|
|
3598
3628
|
</div>`, this._rendered = !0, G(this, this._value), this._wire(), this._syncReset();
|
|
@@ -3621,7 +3651,7 @@ var st = class extends HTMLElement {
|
|
|
3621
3651
|
let t = e.dataset.value === String(this._value);
|
|
3622
3652
|
e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
|
|
3623
3653
|
}
|
|
3624
|
-
e && (e.innerHTML = t ?
|
|
3654
|
+
e && (e.innerHTML = t ? Pe(t) : q(this.getAttribute("placeholder") || "Select..."), e.classList.toggle("search-select-placeholder", !t));
|
|
3625
3655
|
}
|
|
3626
3656
|
_syncReset() {
|
|
3627
3657
|
let { reset: e } = this._refs();
|
|
@@ -3634,8 +3664,8 @@ var st = class extends HTMLElement {
|
|
|
3634
3664
|
let t = () => {
|
|
3635
3665
|
if (this.hasAttribute("compact")) {
|
|
3636
3666
|
let t = e.control.getBoundingClientRect();
|
|
3637
|
-
e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px",
|
|
3638
|
-
} else
|
|
3667
|
+
e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", Ee(e.control, e.menu);
|
|
3668
|
+
} else Ee(e.control, e.menu, { matchWidth: !0 });
|
|
3639
3669
|
}, n = (t) => {
|
|
3640
3670
|
let n = this._visible();
|
|
3641
3671
|
this._active = t;
|
|
@@ -3655,7 +3685,7 @@ var st = class extends HTMLElement {
|
|
|
3655
3685
|
}, s = (t) => {
|
|
3656
3686
|
this.value = t.dataset.value, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.control.focus();
|
|
3657
3687
|
};
|
|
3658
|
-
this._navHandler =
|
|
3688
|
+
this._navHandler = je({
|
|
3659
3689
|
getVisibleOptions: () => this._visible(),
|
|
3660
3690
|
getActive: () => this._active,
|
|
3661
3691
|
setActive: (e) => n(e),
|
|
@@ -3686,18 +3716,18 @@ var st = class extends HTMLElement {
|
|
|
3686
3716
|
}), e.menu.addEventListener("keydown", this._navHandler.handler), this._bindGlobal = () => {
|
|
3687
3717
|
this._teardown(), this._onDocClick = (e) => {
|
|
3688
3718
|
i() && !this.contains(e.target) && o();
|
|
3689
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
3719
|
+
}, document.addEventListener("click", this._onDocClick), De(this, () => {
|
|
3690
3720
|
i() && t();
|
|
3691
3721
|
});
|
|
3692
3722
|
}, this._bindGlobal();
|
|
3693
3723
|
}
|
|
3694
3724
|
_teardown() {
|
|
3695
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
3725
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), Oe(this), this._navHandler?.teardown();
|
|
3696
3726
|
}
|
|
3697
3727
|
disconnectedCallback() {
|
|
3698
3728
|
this._teardown();
|
|
3699
3729
|
}
|
|
3700
|
-
},
|
|
3730
|
+
}, mt = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), ht = class extends HTMLElement {
|
|
3701
3731
|
static formAssociated = !0;
|
|
3702
3732
|
static get observedAttributes() {
|
|
3703
3733
|
return [
|
|
@@ -3737,19 +3767,19 @@ var st = class extends HTMLElement {
|
|
|
3737
3767
|
return this._value;
|
|
3738
3768
|
}
|
|
3739
3769
|
set value(e) {
|
|
3740
|
-
this._value = this._snapToStep(this._clamp(
|
|
3770
|
+
this._value = this._snapToStep(this._clamp(gt(e, this._value))), this._syncValue(), this._syncMirrors();
|
|
3741
3771
|
}
|
|
3742
3772
|
get start() {
|
|
3743
3773
|
return this._start;
|
|
3744
3774
|
}
|
|
3745
3775
|
set start(e) {
|
|
3746
|
-
this._start = Math.min(this._snapToStep(this._clamp(
|
|
3776
|
+
this._start = Math.min(this._snapToStep(this._clamp(gt(e, this._start))), this._end), this._syncValue(), this._syncMirrors();
|
|
3747
3777
|
}
|
|
3748
3778
|
get end() {
|
|
3749
3779
|
return this._end;
|
|
3750
3780
|
}
|
|
3751
3781
|
set end(e) {
|
|
3752
|
-
this._end = Math.max(this._snapToStep(this._clamp(
|
|
3782
|
+
this._end = Math.max(this._snapToStep(this._clamp(gt(e, this._end))), this._start), this._syncValue(), this._syncMirrors();
|
|
3753
3783
|
}
|
|
3754
3784
|
attributeChangedCallback(e, t, n) {
|
|
3755
3785
|
if (e === "value" || e === "start" || e === "end" || e === "min" || e === "max" || e === "step") {
|
|
@@ -3762,19 +3792,19 @@ var st = class extends HTMLElement {
|
|
|
3762
3792
|
this._isRange() ? this._resetRange() : this._resetSingle();
|
|
3763
3793
|
}
|
|
3764
3794
|
_updateFromAttribute(e) {
|
|
3765
|
-
e === "value" ? this._value = this._snapToStep(this._clamp(
|
|
3795
|
+
e === "value" ? this._value = this._snapToStep(this._clamp(gt(this.getAttribute("value"), this._value))) : e === "start" ? this._start = this._snapToStep(this._clamp(gt(this.getAttribute("start"), this._start))) : e === "end" && (this._end = this._snapToStep(this._clamp(gt(this.getAttribute("end"), this._end))));
|
|
3766
3796
|
}
|
|
3767
3797
|
_isRange() {
|
|
3768
3798
|
return this.hasAttribute("range");
|
|
3769
3799
|
}
|
|
3770
3800
|
_min() {
|
|
3771
|
-
return
|
|
3801
|
+
return gt(this.getAttribute("min"), 0);
|
|
3772
3802
|
}
|
|
3773
3803
|
_max() {
|
|
3774
|
-
return
|
|
3804
|
+
return gt(this.getAttribute("max"), 100);
|
|
3775
3805
|
}
|
|
3776
3806
|
_step() {
|
|
3777
|
-
return
|
|
3807
|
+
return gt(this.getAttribute("step"), 1);
|
|
3778
3808
|
}
|
|
3779
3809
|
_clamp(e) {
|
|
3780
3810
|
return Math.max(this._min(), Math.min(e, this._max()));
|
|
@@ -3839,7 +3869,7 @@ var st = class extends HTMLElement {
|
|
|
3839
3869
|
aria-valuenow="${this._value}"
|
|
3840
3870
|
aria-valuetext="${this._formatValue(this._value)}"
|
|
3841
3871
|
${a ? "disabled" : ""}
|
|
3842
|
-
aria-label="${
|
|
3872
|
+
aria-label="${_t(this.getAttribute("aria-label") || "Value")}"
|
|
3843
3873
|
></button>
|
|
3844
3874
|
`}
|
|
3845
3875
|
${this.hasAttribute("show-value") ? n ? `<span class="slider-value">${this._formatValue(this._start)} – ${this._formatValue(this._end)}</span>` : `<span class="slider-value">${this._formatValue(this._value)}</span>` : ""}
|
|
@@ -3939,10 +3969,10 @@ var st = class extends HTMLElement {
|
|
|
3939
3969
|
disconnectedCallback() {
|
|
3940
3970
|
this._teardown();
|
|
3941
3971
|
}
|
|
3942
|
-
},
|
|
3972
|
+
}, gt = (e, t) => {
|
|
3943
3973
|
let n = Number.parseFloat(e);
|
|
3944
3974
|
return Number.isFinite(n) ? n : t;
|
|
3945
|
-
},
|
|
3975
|
+
}, _t = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), vt = class extends HTMLElement {
|
|
3946
3976
|
static formAssociated = !0;
|
|
3947
3977
|
_accessibleName() {
|
|
3948
3978
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Add tags";
|
|
@@ -4015,7 +4045,7 @@ var st = class extends HTMLElement {
|
|
|
4015
4045
|
G(this, this._values.join(",")), this.innerHTML = `
|
|
4016
4046
|
<div class="search-select${t}">
|
|
4017
4047
|
<div class="input search-select-control search-select-multi"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
|
|
4018
|
-
<input type="text" class="ms-input" data-input aria-label="${
|
|
4048
|
+
<input type="text" class="ms-input" data-input aria-label="${bt(this._accessibleName())}" placeholder="${bt(this.getAttribute("placeholder") || "Add…")}" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""}/>
|
|
4019
4049
|
<div class="ms-chips" data-chips></div>
|
|
4020
4050
|
</div>
|
|
4021
4051
|
</div>`, this._rendered = !0, G(this, this._values.join(",")), this._renderControl(), this._wire();
|
|
@@ -4027,7 +4057,7 @@ var st = class extends HTMLElement {
|
|
|
4027
4057
|
e.innerHTML = "";
|
|
4028
4058
|
return;
|
|
4029
4059
|
}
|
|
4030
|
-
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${
|
|
4060
|
+
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${yt(e)}</span><button type="button" class="chip-remove" data-remove="${bt(e)}" aria-label="Remove ${bt(e)}">${K("x")}</button></span>`).join("");
|
|
4031
4061
|
}
|
|
4032
4062
|
}
|
|
4033
4063
|
_wire() {
|
|
@@ -4098,18 +4128,18 @@ var st = class extends HTMLElement {
|
|
|
4098
4128
|
disconnectedCallback() {
|
|
4099
4129
|
this._teardown();
|
|
4100
4130
|
}
|
|
4101
|
-
},
|
|
4131
|
+
}, yt = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), bt = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), xt = (e) => String(e).padStart(2, "0"), St = (e, t) => `${xt(e)}:${xt(t)}`, Ct = (e) => {
|
|
4102
4132
|
let t = /^(\d{2}):(\d{2})$/.exec(e || "");
|
|
4103
4133
|
return t ? {
|
|
4104
4134
|
h: +t[1],
|
|
4105
4135
|
m: +t[2]
|
|
4106
4136
|
} : null;
|
|
4107
|
-
},
|
|
4137
|
+
}, wt = (e, t = "24") => {
|
|
4108
4138
|
if (!e) return "";
|
|
4109
|
-
if (t === "24") return
|
|
4139
|
+
if (t === "24") return St(e.h, e.m);
|
|
4110
4140
|
let n = e.h % 12 || 12, r = e.h >= 12 ? "PM" : "AM";
|
|
4111
|
-
return `${n}:${
|
|
4112
|
-
},
|
|
4141
|
+
return `${n}:${xt(e.m)} ${r}`;
|
|
4142
|
+
}, Tt = class extends HTMLElement {
|
|
4113
4143
|
static formAssociated = !0;
|
|
4114
4144
|
static get observedAttributes() {
|
|
4115
4145
|
return [
|
|
@@ -4156,11 +4186,11 @@ var st = class extends HTMLElement {
|
|
|
4156
4186
|
}
|
|
4157
4187
|
render() {
|
|
4158
4188
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
|
|
4159
|
-
let e = this.getAttribute("placeholder") || "Select time", t =
|
|
4189
|
+
let e = this.getAttribute("placeholder") || "Select time", t = Ct(this._value), n = this.getAttribute("format") || "24", r = this.getAttribute("size"), i = r === "sm" ? " input-sm" : r === "lg" ? " input-lg" : "", a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
|
|
4160
4190
|
this.innerHTML = `
|
|
4161
4191
|
<div class="timepicker">
|
|
4162
4192
|
<button type="button" class="input timepicker-trigger${i}${t ? " has-value" : ""}" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${q(a)}"` : ""}${o ? ` aria-describedby="${q(o)}"` : ""}>
|
|
4163
|
-
<span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ?
|
|
4193
|
+
<span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? wt(t, n) : q(e)}</span>
|
|
4164
4194
|
${K("clock")}
|
|
4165
4195
|
</button>
|
|
4166
4196
|
<div class="timepicker-pop" role="listbox" tabindex="-1" hidden></div>
|
|
@@ -4172,14 +4202,14 @@ var st = class extends HTMLElement {
|
|
|
4172
4202
|
_syncTrigger() {
|
|
4173
4203
|
let e = this.querySelector(".timepicker-trigger"), t = this.querySelector("[data-trigger-label]");
|
|
4174
4204
|
if (!t) return;
|
|
4175
|
-
let n =
|
|
4176
|
-
t.textContent = n ?
|
|
4205
|
+
let n = Ct(this._value), r = this.getAttribute("format") || "24";
|
|
4206
|
+
t.textContent = n ? wt(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
|
|
4177
4207
|
}
|
|
4178
4208
|
_buildTimes() {
|
|
4179
|
-
let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r =
|
|
4209
|
+
let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r = Ct(t) || {
|
|
4180
4210
|
h: 0,
|
|
4181
4211
|
m: 0
|
|
4182
|
-
}, i =
|
|
4212
|
+
}, i = Ct(n) || {
|
|
4183
4213
|
h: 23,
|
|
4184
4214
|
m: 59
|
|
4185
4215
|
}, a = [], o = r.h, s = r.m;
|
|
@@ -4192,10 +4222,10 @@ var st = class extends HTMLElement {
|
|
|
4192
4222
|
_renderOptions() {
|
|
4193
4223
|
let e = this.querySelector(".timepicker-pop");
|
|
4194
4224
|
if (!e) return;
|
|
4195
|
-
let t = this.getAttribute("format") || "24", n = this._buildTimes(), r =
|
|
4225
|
+
let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = Ct(this._value), i = this._focus, a = "";
|
|
4196
4226
|
for (let e = 0; e < n.length; e++) {
|
|
4197
|
-
let o = n[e], s =
|
|
4198
|
-
a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${
|
|
4227
|
+
let o = n[e], s = St(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
|
|
4228
|
+
a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${wt(o, t)}</button>`;
|
|
4199
4229
|
}
|
|
4200
4230
|
e.innerHTML = a, this._focusActive();
|
|
4201
4231
|
}
|
|
@@ -4204,7 +4234,7 @@ var st = class extends HTMLElement {
|
|
|
4204
4234
|
t && !e.hidden && t.focus();
|
|
4205
4235
|
}
|
|
4206
4236
|
_position(e, t) {
|
|
4207
|
-
|
|
4237
|
+
Ee(e, t);
|
|
4208
4238
|
}
|
|
4209
4239
|
_onKey(e) {
|
|
4210
4240
|
let t = [...this.querySelector(".timepicker-pop").querySelectorAll(".timepicker-option")];
|
|
@@ -4282,18 +4312,18 @@ var st = class extends HTMLElement {
|
|
|
4282
4312
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
4283
4313
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
4284
4314
|
r() && e.key === "Escape" && this._close();
|
|
4285
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
4315
|
+
}, document.addEventListener("keydown", this._onDocKey), De(this, () => {
|
|
4286
4316
|
r() && this._position(e, t);
|
|
4287
4317
|
});
|
|
4288
4318
|
}, this._bindGlobal(), this._syncFormValue();
|
|
4289
4319
|
}
|
|
4290
4320
|
_teardown() {
|
|
4291
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
4321
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), Oe(this), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
|
|
4292
4322
|
}
|
|
4293
4323
|
disconnectedCallback() {
|
|
4294
4324
|
this._teardown();
|
|
4295
4325
|
}
|
|
4296
|
-
},
|
|
4326
|
+
}, Et = "wui-wizard-step", Dt = class extends HTMLElement {
|
|
4297
4327
|
static get observedAttributes() {
|
|
4298
4328
|
return [
|
|
4299
4329
|
"active",
|
|
@@ -4327,7 +4357,7 @@ var st = class extends HTMLElement {
|
|
|
4327
4357
|
this._beforeNext = typeof e == "function" ? e : null;
|
|
4328
4358
|
}
|
|
4329
4359
|
get _steps() {
|
|
4330
|
-
return [...this.querySelectorAll(`:scope > ${
|
|
4360
|
+
return [...this.querySelectorAll(`:scope > ${Et}`)];
|
|
4331
4361
|
}
|
|
4332
4362
|
refresh() {
|
|
4333
4363
|
this._rendered && this._renderChrome();
|
|
@@ -4386,13 +4416,13 @@ var st = class extends HTMLElement {
|
|
|
4386
4416
|
return e.map((e, r) => {
|
|
4387
4417
|
let a = this._stepStatus(e, r), o = e.getAttribute("label") || "", s = e.getAttribute("description") || "", c = e.getAttribute("icon") || "", l = r + 1, u;
|
|
4388
4418
|
u = a === "done" ? K("check") : a === "error" ? K("alert-triangle") : a === "skipped" ? K("minus") : c ? K(c) : String(l);
|
|
4389
|
-
let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", p = i || r < this._active, m = s ? `<span class="step-desc">${
|
|
4390
|
-
return h = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${
|
|
4419
|
+
let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", p = i || r < this._active, m = s ? `<span class="step-desc">${Ot(s)}</span>` : "", h;
|
|
4420
|
+
return h = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${Ot(o)}</span>${m}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${Ot(o)}</span>${m}` : `<span class="step-circle">${u}</span><span class="step-label">${Ot(o)}</span>${m}`, p ? `<button type="button" class="${d}" data-step="${r}"${f}>${h}</button>` : `<div class="${d}"${f}>${h}</div>`;
|
|
4391
4421
|
}).join("");
|
|
4392
4422
|
}
|
|
4393
4423
|
_footerHtml(e) {
|
|
4394
4424
|
let t = this._active, n = e.length - 1, r = this.hasAttribute("disabled") ? " disabled" : "", i = e[t]?.hasAttribute("optional") || this.hasAttribute("skippable"), a = this.getAttribute("back-label") || "Back", o = this.getAttribute("next-label") || "Next", s = this.getAttribute("skip-label") || "Skip", c = this.getAttribute("finish-label") || "Finish";
|
|
4395
|
-
return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${K("arrow-left", { className: "me-2" })}${
|
|
4425
|
+
return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${K("arrow-left", { className: "me-2" })}${Ot(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${Ot(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${Ot(o)}${K("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${Ot(c)}</button>`}</span>`;
|
|
4396
4426
|
}
|
|
4397
4427
|
_wire() {
|
|
4398
4428
|
this._teardown(), this._onHeaderClick = (e) => {
|
|
@@ -4460,7 +4490,7 @@ var st = class extends HTMLElement {
|
|
|
4460
4490
|
_reflectActive(e) {
|
|
4461
4491
|
this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
|
|
4462
4492
|
}
|
|
4463
|
-
},
|
|
4493
|
+
}, Ot = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), kt = class extends HTMLElement {
|
|
4464
4494
|
static get observedAttributes() {
|
|
4465
4495
|
return [
|
|
4466
4496
|
"label",
|
|
@@ -4474,14 +4504,14 @@ var st = class extends HTMLElement {
|
|
|
4474
4504
|
let e = this.closest("wui-wizard");
|
|
4475
4505
|
e && typeof e.refresh == "function" && e.refresh();
|
|
4476
4506
|
}
|
|
4477
|
-
},
|
|
4507
|
+
}, At = "image/png,image/jpeg,image/webp", jt = {
|
|
4478
4508
|
"image/png": [".png"],
|
|
4479
4509
|
"image/jpeg": [".jpg", ".jpeg"],
|
|
4480
4510
|
"image/webp": [".webp"],
|
|
4481
4511
|
"image/gif": [".gif"],
|
|
4482
4512
|
"image/svg+xml": [".svg"],
|
|
4483
4513
|
"application/pdf": [".pdf"]
|
|
4484
|
-
},
|
|
4514
|
+
}, Mt = {
|
|
4485
4515
|
"image/png": "PNG",
|
|
4486
4516
|
"image/jpeg": "JPG",
|
|
4487
4517
|
"image/webp": "WEBP",
|
|
@@ -4495,7 +4525,7 @@ var st = class extends HTMLElement {
|
|
|
4495
4525
|
".gif": "GIF",
|
|
4496
4526
|
".svg": "SVG",
|
|
4497
4527
|
".pdf": "PDF"
|
|
4498
|
-
},
|
|
4528
|
+
}, Nt = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), Pt = [
|
|
4499
4529
|
".png",
|
|
4500
4530
|
".jpg",
|
|
4501
4531
|
".jpeg",
|
|
@@ -4506,46 +4536,46 @@ var st = class extends HTMLElement {
|
|
|
4506
4536
|
".avif",
|
|
4507
4537
|
".heic"
|
|
4508
4538
|
];
|
|
4509
|
-
function
|
|
4539
|
+
function Ft(e) {
|
|
4510
4540
|
if (!e) return !1;
|
|
4511
4541
|
let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
|
|
4512
4542
|
if (t) return t.startsWith("image/");
|
|
4513
4543
|
let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
|
|
4514
|
-
return
|
|
4544
|
+
return Pt.some((e) => r.endsWith(e));
|
|
4515
4545
|
}
|
|
4516
|
-
function
|
|
4517
|
-
let t =
|
|
4518
|
-
return t.length ? t.every((e) => e.startsWith(".") ?
|
|
4546
|
+
function It(e) {
|
|
4547
|
+
let t = Nt(e);
|
|
4548
|
+
return t.length ? t.every((e) => e.startsWith(".") ? Pt.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
|
|
4519
4549
|
}
|
|
4520
|
-
function
|
|
4550
|
+
function Lt(e) {
|
|
4521
4551
|
let t = [];
|
|
4522
|
-
for (let n of
|
|
4523
|
-
let e =
|
|
4552
|
+
for (let n of Nt(e)) {
|
|
4553
|
+
let e = Mt[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
4524
4554
|
t.includes(e) || t.push(e);
|
|
4525
4555
|
}
|
|
4526
4556
|
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
4527
4557
|
}
|
|
4528
|
-
function
|
|
4529
|
-
let n =
|
|
4558
|
+
function Rt(e, t) {
|
|
4559
|
+
let n = Nt(t);
|
|
4530
4560
|
if (!n.length) return !0;
|
|
4531
4561
|
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
4532
|
-
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (
|
|
4562
|
+
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (jt[e] || []).some((e) => i.endsWith(e)));
|
|
4533
4563
|
}
|
|
4534
|
-
function
|
|
4564
|
+
function zt(e, t = {}) {
|
|
4535
4565
|
if (!e) return null;
|
|
4536
|
-
let n = t.accept === void 0 ?
|
|
4537
|
-
return
|
|
4566
|
+
let n = t.accept === void 0 ? At : t.accept, r = t.maxSizeMb || 5;
|
|
4567
|
+
return Rt(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Lt(n)} file.`;
|
|
4538
4568
|
}
|
|
4539
4569
|
var X = (e, t) => {
|
|
4540
4570
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
4541
4571
|
};
|
|
4542
|
-
function
|
|
4543
|
-
X("wui-select",
|
|
4572
|
+
function Bt() {
|
|
4573
|
+
X("wui-select", pt), X("wui-phone", dt), X("wui-datepicker", Ge), X("wui-date-range", Ke), X("wui-dock", qe), X("wui-slider", ht), X("wui-timepicker", Tt), X("wui-autocomplete", Fe), X("wui-multiselect", Ye), X("wui-taginput", vt), X("wui-otp", et), X("wui-status-icon", we), X("wui-wizard-step", kt), X("wui-wizard", Dt);
|
|
4544
4574
|
}
|
|
4545
|
-
|
|
4575
|
+
Bt();
|
|
4546
4576
|
//#endregion
|
|
4547
4577
|
//#region src/components/AppPopover.jsx
|
|
4548
|
-
function
|
|
4578
|
+
function Vt({ trigger: e, children: t, title: r, placement: i = "bottom", triggerType: a = "click", onToggle: o, className: c = "", ...l }) {
|
|
4549
4579
|
N("AppPopover", l);
|
|
4550
4580
|
let u = s(), [f, h] = d(!1), g = (e) => {
|
|
4551
4581
|
h(e), o?.(e);
|
|
@@ -4580,13 +4610,13 @@ function Lt({ trigger: e, children: t, title: r, placement: i = "bottom", trigge
|
|
|
4580
4610
|
}
|
|
4581
4611
|
//#endregion
|
|
4582
4612
|
//#region src/components/AppInfoTip.jsx
|
|
4583
|
-
function
|
|
4613
|
+
function Ht({ label: e, children: t, placement: n = "auto", className: r = "", ...i }) {
|
|
4584
4614
|
N("AppInfoTip", i);
|
|
4585
4615
|
let [a, o] = d(!1), s = !!e;
|
|
4586
4616
|
return !s && !t ? null : /* @__PURE__ */ p("span", {
|
|
4587
4617
|
className: `infotip${r ? ` ${r}` : ""}`,
|
|
4588
4618
|
...i,
|
|
4589
|
-
children: /* @__PURE__ */ p(
|
|
4619
|
+
children: /* @__PURE__ */ p(Vt, {
|
|
4590
4620
|
trigger: /* @__PURE__ */ p("button", {
|
|
4591
4621
|
type: "button",
|
|
4592
4622
|
className: "infotip-btn",
|
|
@@ -4616,70 +4646,96 @@ function Z() {
|
|
|
4616
4646
|
}
|
|
4617
4647
|
//#endregion
|
|
4618
4648
|
//#region src/components/useWuiControl.js
|
|
4619
|
-
function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events:
|
|
4620
|
-
let
|
|
4621
|
-
|
|
4649
|
+
function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events: s = Ut, on: c, syncDeps: l = [] } = {}) {
|
|
4650
|
+
let d = u(null), f = r ?? Wt, p = i ?? Gt, m = (s || Ut).join("\0"), h = Object.keys(c ?? {}).join("\0"), g = u({});
|
|
4651
|
+
g.current = {
|
|
4652
|
+
ref: e,
|
|
4653
|
+
value: t,
|
|
4654
|
+
onChange: n,
|
|
4655
|
+
read: f,
|
|
4656
|
+
write: p,
|
|
4657
|
+
eventKey: m,
|
|
4658
|
+
on: c
|
|
4622
4659
|
};
|
|
4660
|
+
let _ = u(null), v = a(() => {
|
|
4661
|
+
let e = _.current;
|
|
4662
|
+
if (e) {
|
|
4663
|
+
for (let t of e.names) e.el.removeEventListener(t, e.handler);
|
|
4664
|
+
for (let t of e.extraNames) e.el.removeEventListener(t, e.extraHandler);
|
|
4665
|
+
_.current = null;
|
|
4666
|
+
}
|
|
4667
|
+
}, []), y = a((e) => {
|
|
4668
|
+
let t = g.current.eventKey ? g.current.eventKey.split("\0") : Ut, n = Object.keys(g.current.on ?? {}), r = {
|
|
4669
|
+
el: e,
|
|
4670
|
+
names: t,
|
|
4671
|
+
extraNames: n,
|
|
4672
|
+
last: void 0
|
|
4673
|
+
};
|
|
4674
|
+
r.handler = () => {
|
|
4675
|
+
let t = g.current.read(e);
|
|
4676
|
+
Object.is(t, r.last) || (r.last = t, g.current.onChange?.(t));
|
|
4677
|
+
}, r.extraHandler = (e) => g.current.on?.[e.type]?.(e);
|
|
4678
|
+
for (let n of t) e.addEventListener(n, r.handler);
|
|
4679
|
+
for (let t of n) e.addEventListener(t, r.extraHandler);
|
|
4680
|
+
_.current = r;
|
|
4681
|
+
}, []), b = a((e) => {
|
|
4682
|
+
d.current = e;
|
|
4683
|
+
let t = g.current.ref;
|
|
4684
|
+
typeof t == "function" ? t(e) : t && (t.current = e), v(), e && (y(e), g.current.value !== void 0 && g.current.write(e, g.current.value));
|
|
4685
|
+
}, [v, y]);
|
|
4623
4686
|
return o(() => {
|
|
4624
|
-
let e =
|
|
4625
|
-
!e || t === void 0 ||
|
|
4687
|
+
let e = d.current;
|
|
4688
|
+
!e || t === void 0 || p(e, t);
|
|
4626
4689
|
}, [
|
|
4627
4690
|
t,
|
|
4628
|
-
|
|
4629
|
-
...
|
|
4691
|
+
p,
|
|
4692
|
+
...l
|
|
4630
4693
|
]), o(() => {
|
|
4631
|
-
let e =
|
|
4632
|
-
|
|
4633
|
-
let t = f ? f.split("\0") : zt, r, i = () => {
|
|
4634
|
-
let t = l(e);
|
|
4635
|
-
Object.is(t, r) || (r = t, n?.(t));
|
|
4636
|
-
};
|
|
4637
|
-
for (let n of t) e.addEventListener(n, i);
|
|
4638
|
-
return () => {
|
|
4639
|
-
for (let n of t) e.removeEventListener(n, i);
|
|
4640
|
-
};
|
|
4694
|
+
let e = d.current, t = _.current;
|
|
4695
|
+
!e || !t || (t.names.join("\0") !== (m || Ut.join("\0")) || t.extraNames.join("\0") !== h) && (v(), y(e));
|
|
4641
4696
|
}, [
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4697
|
+
m,
|
|
4698
|
+
h,
|
|
4699
|
+
v,
|
|
4700
|
+
y
|
|
4645
4701
|
]), {
|
|
4646
|
-
setRef:
|
|
4647
|
-
innerRef:
|
|
4702
|
+
setRef: b,
|
|
4703
|
+
innerRef: d
|
|
4648
4704
|
};
|
|
4649
4705
|
}
|
|
4650
|
-
var
|
|
4651
|
-
function
|
|
4706
|
+
var Ut = ["change"];
|
|
4707
|
+
function Wt(e) {
|
|
4652
4708
|
return e.value;
|
|
4653
4709
|
}
|
|
4654
|
-
function
|
|
4710
|
+
function Gt(e, t) {
|
|
4655
4711
|
let n = t ?? "";
|
|
4656
4712
|
String(e.value ?? "") !== String(n) && (e.value = n);
|
|
4657
4713
|
}
|
|
4658
|
-
function
|
|
4714
|
+
function Kt(e, t) {
|
|
4659
4715
|
let n = e || [], r = t || [];
|
|
4660
4716
|
return n.length === r.length && n.every((e, t) => e?.value === r[t]?.value && e?.label === r[t]?.label);
|
|
4661
4717
|
}
|
|
4662
|
-
function
|
|
4718
|
+
function qt(e) {
|
|
4663
4719
|
return e.values;
|
|
4664
4720
|
}
|
|
4665
|
-
function
|
|
4721
|
+
function Jt(e, t) {
|
|
4666
4722
|
let n = t || [], r = e.values || [];
|
|
4667
4723
|
(n.length !== r.length || !n.every((e, t) => e === r[t])) && (e.values = n);
|
|
4668
4724
|
}
|
|
4669
|
-
function
|
|
4725
|
+
function Yt(e) {
|
|
4670
4726
|
return {
|
|
4671
4727
|
start: e.start,
|
|
4672
4728
|
end: e.end
|
|
4673
4729
|
};
|
|
4674
4730
|
}
|
|
4675
|
-
function
|
|
4731
|
+
function Xt(e, t) {
|
|
4676
4732
|
if (t === void 0) return;
|
|
4677
4733
|
let n = Number.parseFloat(t);
|
|
4678
4734
|
Number.isFinite(n) && e.value !== n && (e.value = n);
|
|
4679
4735
|
}
|
|
4680
4736
|
//#endregion
|
|
4681
4737
|
//#region src/components/AppAutocomplete.jsx
|
|
4682
|
-
var
|
|
4738
|
+
var Zt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeholder: i = "Search…", minChars: a, debounce: c, disabled: l = !1, size: u, allowCustom: d = !1, name: f, label: h, error: g, hint: _, required: v = !1, help: y, helpLabel: b = "More information", fieldClassName: x = "", ...S }, C) {
|
|
4683
4739
|
N("AppAutocomplete", S);
|
|
4684
4740
|
let w = typeof r == "function", T = s(), E = f || T, { setRef: D, innerRef: O } = Q({
|
|
4685
4741
|
ref: C,
|
|
@@ -4728,7 +4784,7 @@ var qt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
4728
4784
|
children: [
|
|
4729
4785
|
h,
|
|
4730
4786
|
v && /* @__PURE__ */ p(Z, {}),
|
|
4731
|
-
y && /* @__PURE__ */ p(
|
|
4787
|
+
y && /* @__PURE__ */ p(Ht, {
|
|
4732
4788
|
label: b,
|
|
4733
4789
|
children: y
|
|
4734
4790
|
})
|
|
@@ -4762,14 +4818,14 @@ var qt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
4762
4818
|
}) : null
|
|
4763
4819
|
]
|
|
4764
4820
|
});
|
|
4765
|
-
}),
|
|
4821
|
+
}), Qt = /* @__PURE__ */ new Set([
|
|
4766
4822
|
"xs",
|
|
4767
4823
|
"sm",
|
|
4768
4824
|
"md",
|
|
4769
4825
|
"lg",
|
|
4770
4826
|
"xl",
|
|
4771
4827
|
"2xl"
|
|
4772
|
-
]),
|
|
4828
|
+
]), $t = {
|
|
4773
4829
|
xs: 20,
|
|
4774
4830
|
sm: 24,
|
|
4775
4831
|
md: 32,
|
|
@@ -4777,30 +4833,30 @@ var qt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
4777
4833
|
xl: 64,
|
|
4778
4834
|
"2xl": 96
|
|
4779
4835
|
};
|
|
4780
|
-
function
|
|
4836
|
+
function en(e) {
|
|
4781
4837
|
let t = (e || "").trim();
|
|
4782
4838
|
if (!t) return "?";
|
|
4783
4839
|
let n = t.split(/\s+/).filter(Boolean);
|
|
4784
4840
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
4785
4841
|
}
|
|
4786
|
-
function
|
|
4842
|
+
function tn(e) {
|
|
4787
4843
|
let t = e || "", n = 0;
|
|
4788
4844
|
for (let e = 0; e < t.length; e += 1) n = Math.imul(n, 31) + t.charCodeAt(e) >>> 0;
|
|
4789
4845
|
return n % 360;
|
|
4790
4846
|
}
|
|
4791
|
-
function
|
|
4847
|
+
function nn(e) {
|
|
4792
4848
|
if (typeof e == "number") return e;
|
|
4793
|
-
if (
|
|
4849
|
+
if ($t[e] != null) return $t[e];
|
|
4794
4850
|
let t = Number.parseInt(e, 10);
|
|
4795
4851
|
return Number.isNaN(t) ? 32 : t;
|
|
4796
4852
|
}
|
|
4797
|
-
function
|
|
4853
|
+
function rn({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "primary", status: a = "none", ring: s = !1, label: c, icon: l, badge: u, href: h, onClick: g, linkComponent: _, className: v = "", ...y }) {
|
|
4798
4854
|
N("AppAvatar", y);
|
|
4799
4855
|
let { style: b, ...x } = y, [S, C] = d(!1);
|
|
4800
4856
|
o(() => {
|
|
4801
4857
|
C(!1);
|
|
4802
4858
|
}, [t]);
|
|
4803
|
-
let w = typeof n == "string" &&
|
|
4859
|
+
let w = typeof n == "string" && Qt.has(n), T = w ? null : typeof n == "number" || /^\d+$/.test(n) ? `${n}px` : n, E = h != null || g != null, D = t != null && t !== "" && !S, O = [
|
|
4804
4860
|
"avatar",
|
|
4805
4861
|
w && n !== "md" ? `avatar-${n}` : "",
|
|
4806
4862
|
r === "circle" ? "" : `avatar-${r}`,
|
|
@@ -4809,16 +4865,16 @@ function $t({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
4809
4865
|
E ? "avatar-clickable" : "",
|
|
4810
4866
|
v
|
|
4811
4867
|
].filter(Boolean).join(" "), k = {};
|
|
4812
|
-
T && (k["--avatar-size"] = T), i === "auto" && (k["--avatar-hue"] =
|
|
4868
|
+
T && (k["--avatar-size"] = T), i === "auto" && (k["--avatar-hue"] = tn(e));
|
|
4813
4869
|
let A = Object.keys(k).length || b ? {
|
|
4814
4870
|
...k,
|
|
4815
4871
|
...b
|
|
4816
4872
|
} : void 0, j = /* @__PURE__ */ p("span", {
|
|
4817
4873
|
className: "avatar-face",
|
|
4818
4874
|
"aria-hidden": "true",
|
|
4819
|
-
children: l == null ?
|
|
4875
|
+
children: l == null ? en(e) : /* @__PURE__ */ p(V, {
|
|
4820
4876
|
name: l,
|
|
4821
|
-
size: Math.round(
|
|
4877
|
+
size: Math.round(nn(n) * .55)
|
|
4822
4878
|
})
|
|
4823
4879
|
}), M = /* @__PURE__ */ m(f, { children: [
|
|
4824
4880
|
a !== "none" && /* @__PURE__ */ p("span", {
|
|
@@ -4880,7 +4936,7 @@ function $t({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
4880
4936
|
}
|
|
4881
4937
|
//#endregion
|
|
4882
4938
|
//#region src/components/AppAvatarGroup.jsx
|
|
4883
|
-
var
|
|
4939
|
+
var an = {
|
|
4884
4940
|
xs: 20,
|
|
4885
4941
|
sm: 24,
|
|
4886
4942
|
md: 32,
|
|
@@ -4888,16 +4944,16 @@ var en = {
|
|
|
4888
4944
|
xl: 64,
|
|
4889
4945
|
"2xl": 96
|
|
4890
4946
|
};
|
|
4891
|
-
function
|
|
4892
|
-
return e == null ? null : typeof e == "number" ? `${e}px` :
|
|
4947
|
+
function on(e) {
|
|
4948
|
+
return e == null ? null : typeof e == "number" ? `${e}px` : an[e] == null ? /^\d+$/.test(e) ? `${e}px` : e : `${an[e]}px`;
|
|
4893
4949
|
}
|
|
4894
|
-
function
|
|
4950
|
+
function sn({ children: e, size: t, spacing: n = "normal", overflow: r, className: i = "", ...a }) {
|
|
4895
4951
|
N("AppAvatarGroup", a);
|
|
4896
4952
|
let { style: o, ...s } = a, c = [
|
|
4897
4953
|
"avatar-group",
|
|
4898
4954
|
n === "normal" ? "" : `avatar-group-${n}`,
|
|
4899
4955
|
i
|
|
4900
|
-
].filter(Boolean).join(" "), l =
|
|
4956
|
+
].filter(Boolean).join(" "), l = on(t), u = l ? {
|
|
4901
4957
|
"--avatar-size": l,
|
|
4902
4958
|
...o
|
|
4903
4959
|
} : o, d = typeof r == "string" ? Number.parseInt(r, 10) : r;
|
|
@@ -4915,7 +4971,7 @@ function nn({ children: e, size: t, spacing: n = "normal", overflow: r, classNam
|
|
|
4915
4971
|
}
|
|
4916
4972
|
//#endregion
|
|
4917
4973
|
//#region src/components/AppBadge.jsx
|
|
4918
|
-
function
|
|
4974
|
+
function cn({ children: e, tone: t, dot: n = !1, className: r = "", ...i }) {
|
|
4919
4975
|
return N("AppBadge", i), /* @__PURE__ */ p(g, {
|
|
4920
4976
|
bg: !1,
|
|
4921
4977
|
className: [
|
|
@@ -4929,18 +4985,18 @@ function rn({ children: e, tone: t, dot: n = !1, className: r = "", ...i }) {
|
|
|
4929
4985
|
}
|
|
4930
4986
|
//#endregion
|
|
4931
4987
|
//#region src/components/AppBanner.jsx
|
|
4932
|
-
var
|
|
4988
|
+
var ln = [
|
|
4933
4989
|
"info",
|
|
4934
4990
|
"success",
|
|
4935
4991
|
"warning",
|
|
4936
4992
|
"danger",
|
|
4937
4993
|
"neutral"
|
|
4938
4994
|
];
|
|
4939
|
-
function
|
|
4995
|
+
function un({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDismiss: i, className: a = "", ...o }) {
|
|
4940
4996
|
N("AppBanner", o);
|
|
4941
4997
|
let [s, c] = d(!0);
|
|
4942
4998
|
if (!s) return null;
|
|
4943
|
-
let l =
|
|
4999
|
+
let l = ln.includes(e) ? e : "info", u = () => {
|
|
4944
5000
|
c(!1), i?.();
|
|
4945
5001
|
};
|
|
4946
5002
|
return /* @__PURE__ */ m("div", {
|
|
@@ -4971,7 +5027,7 @@ function on({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
4971
5027
|
}
|
|
4972
5028
|
//#endregion
|
|
4973
5029
|
//#region src/components/AppBreadcrumbs.jsx
|
|
4974
|
-
function
|
|
5030
|
+
function dn({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
4975
5031
|
return N("AppBreadcrumbs", r), /* @__PURE__ */ p(_, {
|
|
4976
5032
|
className: n || void 0,
|
|
4977
5033
|
...r,
|
|
@@ -4990,17 +5046,17 @@ function sn({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
|
4990
5046
|
}
|
|
4991
5047
|
//#endregion
|
|
4992
5048
|
//#region src/components/AppCallout.jsx
|
|
4993
|
-
var
|
|
5049
|
+
var fn = {
|
|
4994
5050
|
info: "info",
|
|
4995
5051
|
success: "check",
|
|
4996
5052
|
warning: "alert-triangle",
|
|
4997
5053
|
danger: "x"
|
|
4998
5054
|
};
|
|
4999
|
-
function
|
|
5055
|
+
function pn({ children: e, tone: t = "info", title: n, icon: r, image: i, imageAlt: a = "", size: o = "md", bordered: s = !0, action: c, dismissible: l = !1, onDismiss: u, className: f = "", ...h }) {
|
|
5000
5056
|
N("AppCallout", h);
|
|
5001
5057
|
let [g, _] = d(!0);
|
|
5002
5058
|
if (!g) return null;
|
|
5003
|
-
let v = r === void 0 ?
|
|
5059
|
+
let v = r === void 0 ? fn[t] : r === "none" ? null : r, y = !!i, b = y || !!v, x = b && !!n && e != null && e !== !1 && e !== "", S = x ? 13 : 11;
|
|
5004
5060
|
return /* @__PURE__ */ m("div", {
|
|
5005
5061
|
className: [
|
|
5006
5062
|
"info-callout",
|
|
@@ -5050,13 +5106,13 @@ function ln({ children: e, tone: t = "info", title: n, icon: r, image: i, imageA
|
|
|
5050
5106
|
}
|
|
5051
5107
|
//#endregion
|
|
5052
5108
|
//#region src/components/AppCard.jsx
|
|
5053
|
-
var
|
|
5109
|
+
var mn = {
|
|
5054
5110
|
xs: 320,
|
|
5055
5111
|
sm: 420,
|
|
5056
5112
|
md: 560,
|
|
5057
5113
|
lg: 720
|
|
5058
5114
|
};
|
|
5059
|
-
function
|
|
5115
|
+
function hn({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", header: i, headerExtra: a, headerActions: o, footer: s, media: c, children: l, variant: u = "default", tone: d = "primary", padding: h = "md", maxWidth: g, className: _ = "", bodyClassName: v = "", headerClassName: b = "", body: x = !0, lifted: S = !1, href: C, onClick: w, linkComponent: T, ...E }) {
|
|
5060
5116
|
N("AppCard", E);
|
|
5061
5117
|
let { style: D, ...O } = E, k = C != null || w != null, A = [
|
|
5062
5118
|
u && u !== "default" ? `card-${u}` : "",
|
|
@@ -5066,7 +5122,7 @@ function dn({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5066
5122
|
g == null ? "" : "card-constrained",
|
|
5067
5123
|
k ? "card-clickable" : "",
|
|
5068
5124
|
_
|
|
5069
|
-
].filter(Boolean).join(" ") || void 0, j = g == null ? void 0 :
|
|
5125
|
+
].filter(Boolean).join(" ") || void 0, j = g == null ? void 0 : mn[g] == null ? typeof g == "number" ? `${g}px` : g : `${mn[g]}px`, M = j ? {
|
|
5070
5126
|
"--card-max-width": j,
|
|
5071
5127
|
...D
|
|
5072
5128
|
} : D, P = {};
|
|
@@ -5137,7 +5193,7 @@ function dn({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5137
5193
|
}
|
|
5138
5194
|
//#endregion
|
|
5139
5195
|
//#region src/lib/CheckField.jsx
|
|
5140
|
-
var
|
|
5196
|
+
var gn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", rest: o = {}, inputType: c, wrapperClass: l }, u) {
|
|
5141
5197
|
let d = s(), f = t || d;
|
|
5142
5198
|
return /* @__PURE__ */ m("div", {
|
|
5143
5199
|
className: `${l}${a ? ` ${a}` : ""}`,
|
|
@@ -5165,8 +5221,8 @@ var fn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
5165
5221
|
}) : null
|
|
5166
5222
|
]
|
|
5167
5223
|
});
|
|
5168
|
-
}),
|
|
5169
|
-
return N("AppCheckbox", o), /* @__PURE__ */ p(
|
|
5224
|
+
}), _n = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
5225
|
+
return N("AppCheckbox", o), /* @__PURE__ */ p(gn, {
|
|
5170
5226
|
ref: s,
|
|
5171
5227
|
label: e,
|
|
5172
5228
|
id: t,
|
|
@@ -5181,7 +5237,7 @@ var fn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
5181
5237
|
});
|
|
5182
5238
|
//#endregion
|
|
5183
5239
|
//#region src/components/AppChip.jsx
|
|
5184
|
-
function
|
|
5240
|
+
function vn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", size: i = "md", leadingIcon: a, avatar: o, onRemove: s, onClick: c, disabled: l = !1, removeLabel: u, className: d = "", ...h }) {
|
|
5185
5241
|
N("AppChip", h);
|
|
5186
5242
|
let g = e ?? t, _ = [
|
|
5187
5243
|
"chip",
|
|
@@ -5235,7 +5291,7 @@ function mn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", s
|
|
|
5235
5291
|
}
|
|
5236
5292
|
//#endregion
|
|
5237
5293
|
//#region src/components/AppChoiceCard.jsx
|
|
5238
|
-
function
|
|
5294
|
+
function yn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon: a, iconNode: o, iconSize: s = 18, image: c, imageAlt: l = "", children: u, title: d, description: h, checkIcon: g = "check", checkSize: _ = 18, className: v = "", ...y }) {
|
|
5239
5295
|
return N("AppChoiceCard", y), /* @__PURE__ */ m("label", {
|
|
5240
5296
|
className: `struct-card${c ? " struct-card-img-card" : ""}${r ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
5241
5297
|
...y,
|
|
@@ -5284,7 +5340,7 @@ function hn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
5284
5340
|
}
|
|
5285
5341
|
//#endregion
|
|
5286
5342
|
//#region src/components/AppChoiceChip.jsx
|
|
5287
|
-
function
|
|
5343
|
+
function bn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChange: a, children: o, count: s, size: c = "md", className: l = "", ...u }) {
|
|
5288
5344
|
return N("AppChoiceChip", u), /* @__PURE__ */ m("label", {
|
|
5289
5345
|
className: `choice-chip${i ? " checked" : ""}${c === "sm" ? " choice-chip-sm" : c === "lg" ? " choice-chip-lg" : ""}${l ? ` ${l}` : ""}`,
|
|
5290
5346
|
...u,
|
|
@@ -5306,7 +5362,7 @@ function gn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChang
|
|
|
5306
5362
|
}
|
|
5307
5363
|
//#endregion
|
|
5308
5364
|
//#region src/components/AppColorField.jsx
|
|
5309
|
-
function
|
|
5365
|
+
function xn({ value: e = "#000000", onChange: t, label: n, required: r = !1, error: i, hint: a, name: o, id: c, disabled: l = !1, size: u = "md", className: d = "", ...f }) {
|
|
5310
5366
|
N("AppColorField", f);
|
|
5311
5367
|
let h = s(), g = c || h, _ = (e) => /^#[0-9a-f]{6}$/i.test(e), v = u === "sm" ? " color-field-sm" : u === "lg" ? " color-field-lg" : "", y = u === "sm" ? " input-sm" : u === "lg" ? " input-lg" : "";
|
|
5312
5368
|
return /* @__PURE__ */ m("div", {
|
|
@@ -5355,7 +5411,7 @@ function _n({ value: e = "#000000", onChange: t, label: n, required: r = !1, err
|
|
|
5355
5411
|
}
|
|
5356
5412
|
//#endregion
|
|
5357
5413
|
//#region src/components/AppCompareTable.jsx
|
|
5358
|
-
function
|
|
5414
|
+
function Sn({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i }) {
|
|
5359
5415
|
N("AppCompareTable", i);
|
|
5360
5416
|
let a = (e) => e === !0 ? /* @__PURE__ */ p("span", {
|
|
5361
5417
|
className: "compare-yes",
|
|
@@ -5392,23 +5448,23 @@ function vn({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
5392
5448
|
}
|
|
5393
5449
|
//#endregion
|
|
5394
5450
|
//#region src/components/AppInput.jsx
|
|
5395
|
-
var
|
|
5451
|
+
var Cn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", type: c = "text", size: l = "md", leftIcon: f, rightIcon: h, onRightIconClick: g, rightIconLabel: _, unit: v, id: y, name: b, className: S = "", fieldClassName: C = "", disabled: w = !1, clearable: T = !1, showCount: E = !1, maxLength: D, prefix: O, suffix: k, floatingLabel: A = !1, variant: j, ...M }, P) {
|
|
5396
5452
|
N("AppInput", M);
|
|
5397
|
-
let [F, I] = d(!1), L = s(), R = y || L, z = c === "password", ee = z && F ? "text" : c,
|
|
5398
|
-
|
|
5399
|
-
}, ne = String(M.value ?? M.defaultValue ?? ""), [re, ie] = d(() => !!ne), [ae, oe] = d(() => ne.length),
|
|
5453
|
+
let [F, I] = d(!1), L = s(), R = y || L, z = c === "password", ee = z && F ? "text" : c, B = u(null), te = (e) => {
|
|
5454
|
+
B.current = e, typeof P == "function" ? P(e) : P && (P.current = e);
|
|
5455
|
+
}, ne = String(M.value ?? M.defaultValue ?? ""), [re, ie] = d(() => !!ne), [ae, oe] = d(() => ne.length), se = T && !w, ce = T || E;
|
|
5400
5456
|
o(() => {
|
|
5401
|
-
if (!
|
|
5457
|
+
if (!ce || M.value === void 0) return;
|
|
5402
5458
|
let e = String(M.value ?? "");
|
|
5403
5459
|
ie(!!e), oe(e.length);
|
|
5404
|
-
}, [M.value,
|
|
5405
|
-
let
|
|
5460
|
+
}, [M.value, ce]);
|
|
5461
|
+
let le = (e) => {
|
|
5406
5462
|
ie(!!e.target.value), oe(e.target.value.length), M.onInput?.(e);
|
|
5407
|
-
},
|
|
5463
|
+
}, ue = se ? /* @__PURE__ */ p("button", {
|
|
5408
5464
|
type: "button",
|
|
5409
5465
|
className: "input-clear",
|
|
5410
5466
|
onClick: () => {
|
|
5411
|
-
let e =
|
|
5467
|
+
let e = B.current;
|
|
5412
5468
|
if (!e) return;
|
|
5413
5469
|
let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
5414
5470
|
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), ie(!1), e.focus();
|
|
@@ -5420,21 +5476,21 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5420
5476
|
name: "x",
|
|
5421
5477
|
size: 16
|
|
5422
5478
|
})
|
|
5423
|
-
}) : null,
|
|
5479
|
+
}) : null, H = n && R ? `${R}-error` : void 0, de = r && R ? `${R}-hint` : void 0, fe = H || de, pe = [
|
|
5424
5480
|
"input",
|
|
5425
5481
|
l === "sm" ? "input-sm" : "",
|
|
5426
5482
|
l === "lg" ? "input-lg" : "",
|
|
5427
5483
|
n ? "error" : "",
|
|
5428
5484
|
z ? "pw" : "",
|
|
5429
5485
|
v ? "num-input" : "",
|
|
5430
|
-
!(A && e || O || k || v || z || h) && T &&
|
|
5486
|
+
!(A && e || O || k || v || z || h) && T && se ? "has-clear" : "",
|
|
5431
5487
|
j === "bare" ? "input-bare" : "",
|
|
5432
5488
|
S
|
|
5433
|
-
].filter(Boolean).join(" "),
|
|
5489
|
+
].filter(Boolean).join(" "), U = /* @__PURE__ */ p(x.Control, {
|
|
5434
5490
|
id: R,
|
|
5435
5491
|
name: b,
|
|
5436
5492
|
type: ee,
|
|
5437
|
-
className:
|
|
5493
|
+
className: pe,
|
|
5438
5494
|
disabled: w,
|
|
5439
5495
|
required: t,
|
|
5440
5496
|
"aria-invalid": n ? "true" : "false",
|
|
@@ -5442,12 +5498,12 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5442
5498
|
maxLength: D,
|
|
5443
5499
|
...M,
|
|
5444
5500
|
placeholder: A ? " " : M.placeholder,
|
|
5445
|
-
ref:
|
|
5446
|
-
onInput:
|
|
5447
|
-
}),
|
|
5448
|
-
return
|
|
5501
|
+
ref: te,
|
|
5502
|
+
onInput: ce ? le : M.onInput
|
|
5503
|
+
}), me;
|
|
5504
|
+
return me = A && e ? /* @__PURE__ */ m("div", {
|
|
5449
5505
|
className: "field-float",
|
|
5450
|
-
children: [
|
|
5506
|
+
children: [U, /* @__PURE__ */ m("label", {
|
|
5451
5507
|
className: "float-label",
|
|
5452
5508
|
htmlFor: R,
|
|
5453
5509
|
children: [e, t && /* @__PURE__ */ p(Z, {})]
|
|
@@ -5459,7 +5515,7 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5459
5515
|
className: "affix affix-pre",
|
|
5460
5516
|
children: O
|
|
5461
5517
|
}),
|
|
5462
|
-
|
|
5518
|
+
U,
|
|
5463
5519
|
k != null && /* @__PURE__ */ p("span", {
|
|
5464
5520
|
className: "affix affix-suf",
|
|
5465
5521
|
children: k
|
|
@@ -5467,7 +5523,7 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5467
5523
|
]
|
|
5468
5524
|
}) : v ? /* @__PURE__ */ m("div", {
|
|
5469
5525
|
className: "input-with-unit",
|
|
5470
|
-
children: [
|
|
5526
|
+
children: [U, /* @__PURE__ */ p("span", {
|
|
5471
5527
|
className: "unit",
|
|
5472
5528
|
children: v
|
|
5473
5529
|
})]
|
|
@@ -5481,7 +5537,7 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5481
5537
|
size: 16
|
|
5482
5538
|
})
|
|
5483
5539
|
}),
|
|
5484
|
-
|
|
5540
|
+
U,
|
|
5485
5541
|
/* @__PURE__ */ p("button", {
|
|
5486
5542
|
type: "button",
|
|
5487
5543
|
className: "pw-toggle",
|
|
@@ -5496,7 +5552,7 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5496
5552
|
]
|
|
5497
5553
|
}) : h ? /* @__PURE__ */ m("div", {
|
|
5498
5554
|
className: "input-wrap",
|
|
5499
|
-
children: [
|
|
5555
|
+
children: [U, /* @__PURE__ */ p("button", {
|
|
5500
5556
|
type: "button",
|
|
5501
5557
|
className: "pw-toggle",
|
|
5502
5558
|
onClick: g,
|
|
@@ -5518,8 +5574,8 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5518
5574
|
size: 16
|
|
5519
5575
|
})
|
|
5520
5576
|
}),
|
|
5521
|
-
|
|
5522
|
-
|
|
5577
|
+
U,
|
|
5578
|
+
ue
|
|
5523
5579
|
]
|
|
5524
5580
|
}) : f ? /* @__PURE__ */ m("div", {
|
|
5525
5581
|
className: "input-icon",
|
|
@@ -5529,8 +5585,8 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5529
5585
|
name: f,
|
|
5530
5586
|
size: 16
|
|
5531
5587
|
})
|
|
5532
|
-
}),
|
|
5533
|
-
}) :
|
|
5588
|
+
}), U]
|
|
5589
|
+
}) : U, /* @__PURE__ */ m(x.Group, {
|
|
5534
5590
|
className: `field${C ? ` ${C}` : ""}`,
|
|
5535
5591
|
children: [
|
|
5536
5592
|
e && !A && /* @__PURE__ */ m(x.Label, {
|
|
@@ -5539,16 +5595,16 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5539
5595
|
children: [
|
|
5540
5596
|
e,
|
|
5541
5597
|
t && /* @__PURE__ */ p(Z, {}),
|
|
5542
|
-
i && /* @__PURE__ */ p(
|
|
5598
|
+
i && /* @__PURE__ */ p(Ht, {
|
|
5543
5599
|
label: a,
|
|
5544
5600
|
children: i
|
|
5545
5601
|
})
|
|
5546
5602
|
]
|
|
5547
5603
|
}),
|
|
5548
|
-
|
|
5604
|
+
me,
|
|
5549
5605
|
n ? /* @__PURE__ */ p("div", {
|
|
5550
5606
|
className: "field-error",
|
|
5551
|
-
id:
|
|
5607
|
+
id: H,
|
|
5552
5608
|
children: n
|
|
5553
5609
|
}) : r ? /* @__PURE__ */ p("div", {
|
|
5554
5610
|
className: "field-hint",
|
|
@@ -5561,34 +5617,34 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5561
5617
|
})
|
|
5562
5618
|
]
|
|
5563
5619
|
});
|
|
5564
|
-
}),
|
|
5620
|
+
}), wn = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", Tn = {
|
|
5565
5621
|
sm: 380,
|
|
5566
5622
|
md: 440,
|
|
5567
5623
|
lg: 640,
|
|
5568
5624
|
xl: 880
|
|
5569
|
-
},
|
|
5570
|
-
function
|
|
5625
|
+
}, En = !1;
|
|
5626
|
+
function Dn() {
|
|
5571
5627
|
let e = !0;
|
|
5572
5628
|
try {
|
|
5573
5629
|
e = process.env.NODE_ENV !== "production";
|
|
5574
5630
|
} catch {
|
|
5575
5631
|
e = !0;
|
|
5576
5632
|
}
|
|
5577
|
-
!e ||
|
|
5633
|
+
!e || En || (En = !0, console.warn("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."));
|
|
5578
5634
|
}
|
|
5579
|
-
function
|
|
5580
|
-
N("AppModal", b),
|
|
5635
|
+
function On({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a = "default", dismissible: s = !0, onClose: c, footer: l, size: d = "md", placement: f = "center", hideHeader: h = !1, staticBackdrop: g = !1, ariaLabel: _, className: v = "", children: y, ...b }) {
|
|
5636
|
+
N("AppModal", b), W("AppModal", "size", typeof d == "string" ? d : null, Object.keys(Tn));
|
|
5581
5637
|
let { style: x, ...C } = b;
|
|
5582
|
-
h && !_ && typeof n != "string" &&
|
|
5638
|
+
h && !_ && typeof n != "string" && Dn();
|
|
5583
5639
|
let w = u(null);
|
|
5584
5640
|
o(() => {
|
|
5585
5641
|
if (!e) return;
|
|
5586
5642
|
let t = w.current?.closest(".modal-content");
|
|
5587
5643
|
if (!t) return;
|
|
5588
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
5644
|
+
let n = () => Array.from(t.querySelectorAll(wn));
|
|
5589
5645
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
|
|
5590
5646
|
}, [e]);
|
|
5591
|
-
let T = typeof d == "number" ? d :
|
|
5647
|
+
let T = typeof d == "number" ? d : Tn[d] ?? Tn.md, E = [
|
|
5592
5648
|
"wui-modal",
|
|
5593
5649
|
a === "default" ? "" : `tone-${a}`,
|
|
5594
5650
|
v
|
|
@@ -5673,30 +5729,30 @@ function wn({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a
|
|
|
5673
5729
|
}
|
|
5674
5730
|
//#endregion
|
|
5675
5731
|
//#region src/components/ModalIcons.jsx
|
|
5676
|
-
var
|
|
5732
|
+
var kn = (e) => function({ size: t = 72 }) {
|
|
5677
5733
|
return /* @__PURE__ */ p("wui-status-icon", {
|
|
5678
5734
|
tone: e,
|
|
5679
5735
|
size: t
|
|
5680
5736
|
});
|
|
5681
|
-
},
|
|
5682
|
-
success:
|
|
5683
|
-
error:
|
|
5684
|
-
warning:
|
|
5685
|
-
info:
|
|
5686
|
-
delete:
|
|
5737
|
+
}, An = {
|
|
5738
|
+
success: kn("success"),
|
|
5739
|
+
error: kn("error"),
|
|
5740
|
+
warning: kn("warning"),
|
|
5741
|
+
info: kn("info"),
|
|
5742
|
+
delete: kn("delete")
|
|
5687
5743
|
};
|
|
5688
5744
|
//#endregion
|
|
5689
5745
|
//#region src/components/AppConfirmDialog.jsx
|
|
5690
|
-
function
|
|
5746
|
+
function jn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancelLabel: i = "Cancel", danger: a = !1, tone: s, confirmPhrase: c, onConfirm: l, onClose: u, loading: h = !1, staticBackdrop: g = !1, placement: _ = "center", className: v = "", ...y }) {
|
|
5691
5747
|
N("AppConfirmDialog", y);
|
|
5692
5748
|
let [b, x] = d("");
|
|
5693
5749
|
if (o(() => {
|
|
5694
5750
|
e || x("");
|
|
5695
5751
|
}, [e]), !e) return null;
|
|
5696
|
-
let S = !!c && b.trim() !== c, C =
|
|
5752
|
+
let S = !!c && b.trim() !== c, C = An[s || (a ? "delete" : "info")], w = () => {
|
|
5697
5753
|
h || u?.();
|
|
5698
5754
|
};
|
|
5699
|
-
return /* @__PURE__ */ p(
|
|
5755
|
+
return /* @__PURE__ */ p(On, {
|
|
5700
5756
|
...y,
|
|
5701
5757
|
open: e,
|
|
5702
5758
|
hideHeader: !0,
|
|
@@ -5707,12 +5763,12 @@ function Dn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5707
5763
|
className: ["wui-confirm", v].filter(Boolean).join(" "),
|
|
5708
5764
|
footer: /* @__PURE__ */ m("div", {
|
|
5709
5765
|
className: "wui-confirm-actions",
|
|
5710
|
-
children: [/* @__PURE__ */ p(
|
|
5766
|
+
children: [/* @__PURE__ */ p(ye, {
|
|
5711
5767
|
variant: "secondary",
|
|
5712
5768
|
disabled: h,
|
|
5713
5769
|
onClick: w,
|
|
5714
5770
|
children: i
|
|
5715
|
-
}), /* @__PURE__ */ p(
|
|
5771
|
+
}), /* @__PURE__ */ p(ye, {
|
|
5716
5772
|
variant: a ? "danger" : "primary",
|
|
5717
5773
|
disabled: S,
|
|
5718
5774
|
loading: h,
|
|
@@ -5737,7 +5793,7 @@ function Dn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5737
5793
|
className: "wui-confirm-msg",
|
|
5738
5794
|
children: n
|
|
5739
5795
|
}),
|
|
5740
|
-
c && /* @__PURE__ */ p(
|
|
5796
|
+
c && /* @__PURE__ */ p(Cn, {
|
|
5741
5797
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
5742
5798
|
label: /* @__PURE__ */ m(f, { children: [
|
|
5743
5799
|
"Type ",
|
|
@@ -5755,13 +5811,13 @@ function Dn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5755
5811
|
}
|
|
5756
5812
|
//#endregion
|
|
5757
5813
|
//#region src/components/AppCopyButton.jsx
|
|
5758
|
-
var
|
|
5814
|
+
var Mn = {
|
|
5759
5815
|
sm: 14,
|
|
5760
5816
|
md: 16,
|
|
5761
5817
|
lg: 20
|
|
5762
5818
|
};
|
|
5763
|
-
function
|
|
5764
|
-
N("AppCopyButton", l),
|
|
5819
|
+
function Nn({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r = !1, size: i = "md", variant: o = "ghost", onCopied: s, className: c = "", ...l }) {
|
|
5820
|
+
N("AppCopyButton", l), W("AppCopyButton", "size", i, Object.keys(Mn));
|
|
5765
5821
|
let [u, f] = d(!1), m = a(async () => {
|
|
5766
5822
|
try {
|
|
5767
5823
|
if (navigator.clipboard?.writeText) {
|
|
@@ -5776,14 +5832,14 @@ function kn({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5776
5832
|
document.body.removeChild(t), n && (f(!0), s?.(), setTimeout(() => f(!1), 2e3));
|
|
5777
5833
|
} catch {}
|
|
5778
5834
|
}, [e, s]), h = u ? n : t, g = u ? "check" : "files";
|
|
5779
|
-
return r ? /* @__PURE__ */ p(
|
|
5835
|
+
return r ? /* @__PURE__ */ p(de, {
|
|
5780
5836
|
icon: g,
|
|
5781
5837
|
label: h,
|
|
5782
|
-
size:
|
|
5838
|
+
size: Mn[i] ?? Mn.md,
|
|
5783
5839
|
onClick: m,
|
|
5784
5840
|
className: c,
|
|
5785
5841
|
...l
|
|
5786
|
-
}) : /* @__PURE__ */ p(
|
|
5842
|
+
}) : /* @__PURE__ */ p(ye, {
|
|
5787
5843
|
leftIcon: g,
|
|
5788
5844
|
variant: o,
|
|
5789
5845
|
size: i,
|
|
@@ -5796,7 +5852,7 @@ function kn({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5796
5852
|
}
|
|
5797
5853
|
//#endregion
|
|
5798
5854
|
//#region src/components/AppSkeleton.jsx
|
|
5799
|
-
function
|
|
5855
|
+
function Pn({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "", style: i, ...a }) {
|
|
5800
5856
|
return N("AppSkeleton", a), /* @__PURE__ */ p("span", {
|
|
5801
5857
|
className: `skeleton${r ? ` ${r}` : ""}`,
|
|
5802
5858
|
"aria-hidden": "true",
|
|
@@ -5809,28 +5865,28 @@ function An({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "
|
|
|
5809
5865
|
...a
|
|
5810
5866
|
});
|
|
5811
5867
|
}
|
|
5812
|
-
function
|
|
5813
|
-
return Array.from({ length: e }).map((e, n) => /* @__PURE__ */ p("tr", { children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p(
|
|
5868
|
+
function Fn({ rows: e = 4, cols: t = 5 }) {
|
|
5869
|
+
return Array.from({ length: e }).map((e, n) => /* @__PURE__ */ p("tr", { children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p(Pn, {
|
|
5814
5870
|
width: t === 0 ? "70%" : "50%",
|
|
5815
5871
|
height: 12
|
|
5816
5872
|
}) }, `col-${t}`)) }, `row-${n}`));
|
|
5817
5873
|
}
|
|
5818
5874
|
//#endregion
|
|
5819
5875
|
//#region src/lib/pageWindow.js
|
|
5820
|
-
var
|
|
5876
|
+
var In = (e, t) => {
|
|
5821
5877
|
let n = [];
|
|
5822
5878
|
for (let r = e; r <= t; r += 1) n.push(r);
|
|
5823
5879
|
return n;
|
|
5824
5880
|
};
|
|
5825
|
-
function
|
|
5881
|
+
function Ln(e, t, { siblingCount: n = 2, boundaryCount: r = 1 } = {}) {
|
|
5826
5882
|
let i = Math.max(1, t), a = Math.min(Math.max(1, e), i);
|
|
5827
|
-
if (i <= n * 2 + 3 + r * 2) return
|
|
5828
|
-
let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u =
|
|
5829
|
-
return u.push(...c ? ["ellipsis-left"] :
|
|
5883
|
+
if (i <= n * 2 + 3 + r * 2) return In(1, i);
|
|
5884
|
+
let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u = In(1, r);
|
|
5885
|
+
return u.push(...c ? ["ellipsis-left"] : In(r + 1, o - 1)), u.push(...In(o, s)), u.push(...l ? ["ellipsis-right"] : In(s + 1, i - r)), u.push(...In(i - r + 1, i)), u;
|
|
5830
5886
|
}
|
|
5831
5887
|
//#endregion
|
|
5832
5888
|
//#region src/components/AppSelectMini.jsx
|
|
5833
|
-
function
|
|
5889
|
+
function Rn({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", name: i, ariaLabel: a, id: s, disabled: c, size: l, icon: u, prefix: d, className: f, ...m }) {
|
|
5834
5890
|
N("AppSelectMini", m);
|
|
5835
5891
|
let { setRef: h, innerRef: g } = Q({
|
|
5836
5892
|
value: e ?? "",
|
|
@@ -5844,7 +5900,7 @@ function Pn({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
5844
5900
|
label: e.label ?? e.text ?? "",
|
|
5845
5901
|
icon: e.icon
|
|
5846
5902
|
}));
|
|
5847
|
-
|
|
5903
|
+
Kt(t, e.options) || (e.options = t);
|
|
5848
5904
|
}, [n, g]), o(() => {
|
|
5849
5905
|
let e = g.current;
|
|
5850
5906
|
if (e) for (let [t, n] of [["icon", u], ["prefix", d]]) n == null || n === "" ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
@@ -5867,22 +5923,22 @@ function Pn({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
5867
5923
|
}
|
|
5868
5924
|
//#endregion
|
|
5869
5925
|
//#region src/components/AppTablePagination.jsx
|
|
5870
|
-
var
|
|
5926
|
+
var zn = [
|
|
5871
5927
|
5,
|
|
5872
5928
|
10,
|
|
5873
5929
|
25,
|
|
5874
5930
|
50
|
|
5875
5931
|
];
|
|
5876
|
-
function
|
|
5932
|
+
function Bn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRow: a, onPageChange: o, onPageSizeChange: s, pageSizes: c = zn, mode: l = "prev-next", showPageSize: u = !0, className: d = "", ...f }) {
|
|
5877
5933
|
N("AppTablePagination", f);
|
|
5878
|
-
let h = l === "numbered", g = h ?
|
|
5934
|
+
let h = l === "numbered", g = h ? Ln(e, t) : null;
|
|
5879
5935
|
return /* @__PURE__ */ m("div", {
|
|
5880
5936
|
className: `table-pagination${d ? ` ${d}` : ""}`,
|
|
5881
5937
|
...f,
|
|
5882
5938
|
children: [
|
|
5883
5939
|
u && /* @__PURE__ */ m("span", {
|
|
5884
5940
|
className: "tpg-rows",
|
|
5885
|
-
children: ["Rows per page:", /* @__PURE__ */ p(
|
|
5941
|
+
children: ["Rows per page:", /* @__PURE__ */ p(Rn, {
|
|
5886
5942
|
value: n,
|
|
5887
5943
|
onChange: (e) => s(Number(e)),
|
|
5888
5944
|
ariaLabel: "Rows per page",
|
|
@@ -5946,13 +6002,13 @@ function In({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
5946
6002
|
}
|
|
5947
6003
|
//#endregion
|
|
5948
6004
|
//#region src/components/AppDataTable.jsx
|
|
5949
|
-
function
|
|
6005
|
+
function Vn(e) {
|
|
5950
6006
|
return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
5951
6007
|
}
|
|
5952
|
-
function
|
|
6008
|
+
function Hn(e) {
|
|
5953
6009
|
return e == null || e === "" ? "—" : typeof e == "boolean" ? String(e) : e;
|
|
5954
6010
|
}
|
|
5955
|
-
function
|
|
6011
|
+
function Un({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a, loading: o = !1, skeletonRows: s = 5, empty: c = "No records found.", emptyFiltered: l, sourceCount: u, rowActions: h, rowActionsLabel: g, pagination: _, ariaLabel: v, className: y = "", wrapperClassName: b = "", selectable: x = !1, selectedIds: S, onToggleRow: C, onToggleAll: w, renderExpanded: T, ...E }) {
|
|
5956
6012
|
N("AppDataTable", E);
|
|
5957
6013
|
let D = typeof T == "function", [O, k] = d(() => /* @__PURE__ */ new Set()), A = (e) => k((t) => {
|
|
5958
6014
|
let n = new Set(t);
|
|
@@ -5988,7 +6044,7 @@ function zn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5988
6044
|
e.map((e, t) => {
|
|
5989
6045
|
let n = !!(e.sortable && a), r = i && i.key === e.key;
|
|
5990
6046
|
return /* @__PURE__ */ m("th", {
|
|
5991
|
-
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") +
|
|
6047
|
+
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") + Vn(e.align),
|
|
5992
6048
|
style: e.width ? { width: e.width } : void 0,
|
|
5993
6049
|
tabIndex: n ? 0 : void 0,
|
|
5994
6050
|
"aria-sort": r ? i.dir === "asc" ? "ascending" : "descending" : n ? "none" : void 0,
|
|
@@ -6015,7 +6071,7 @@ function zn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6015
6071
|
children: "Actions"
|
|
6016
6072
|
})
|
|
6017
6073
|
}))
|
|
6018
|
-
] }) }), /* @__PURE__ */ p("tbody", { children: o ? /* @__PURE__ */ p(
|
|
6074
|
+
] }) }), /* @__PURE__ */ p("tbody", { children: o ? /* @__PURE__ */ p(Fn, {
|
|
6019
6075
|
rows: s,
|
|
6020
6076
|
cols: j
|
|
6021
6077
|
}) : n?.length ? n.map((n, i) => {
|
|
@@ -6049,9 +6105,9 @@ function zn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6049
6105
|
})
|
|
6050
6106
|
}),
|
|
6051
6107
|
e.map((e, t) => /* @__PURE__ */ p("td", {
|
|
6052
|
-
className: (t === 0 ? "wui-name-cell " : "") +
|
|
6108
|
+
className: (t === 0 ? "wui-name-cell " : "") + Vn(e.align) + (e.cellClassName ? ` ${e.cellClassName}` : ""),
|
|
6053
6109
|
style: e.cellStyle,
|
|
6054
|
-
children: e.render ? e.render(n) :
|
|
6110
|
+
children: e.render ? e.render(n) : Hn(n[e.key])
|
|
6055
6111
|
}, e.key)),
|
|
6056
6112
|
h && /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p("div", {
|
|
6057
6113
|
className: "u-row-actions",
|
|
@@ -6075,7 +6131,7 @@ function zn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6075
6131
|
}) : L
|
|
6076
6132
|
}) }) })]
|
|
6077
6133
|
})
|
|
6078
|
-
}), _ && !o && _.total > 0 && /* @__PURE__ */ p(
|
|
6134
|
+
}), _ && !o && _.total > 0 && /* @__PURE__ */ p(Bn, {
|
|
6079
6135
|
page: _.page,
|
|
6080
6136
|
totalPages: _.totalPages,
|
|
6081
6137
|
pageSize: _.pageSize,
|
|
@@ -6088,7 +6144,7 @@ function zn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6088
6144
|
}
|
|
6089
6145
|
//#endregion
|
|
6090
6146
|
//#region src/components/AppDatePicker.jsx
|
|
6091
|
-
var
|
|
6147
|
+
var Wn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, placeholder: u = "Enter Date", disabled: d, size: f, firstDay: h, id: g, ariaLabel: _, className: v = "", ...y }, b) {
|
|
6092
6148
|
N("AppDatePicker", y);
|
|
6093
6149
|
let x = s(), S = g || o || x, { setRef: C } = Q({
|
|
6094
6150
|
ref: b,
|
|
@@ -6132,7 +6188,7 @@ var Bn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6132
6188
|
})
|
|
6133
6189
|
]
|
|
6134
6190
|
});
|
|
6135
|
-
}),
|
|
6191
|
+
}), Gn = i(function({ start: e, end: t, onChange: n, label: r, required: i = !1, hint: a, error: c, startName: l, endName: u, min: d, max: f, placeholder: h = "Start – End", disabled: g, size: _, firstDay: v, id: y, ariaLabel: b, className: x = "", ...S }, C) {
|
|
6136
6192
|
N("AppDateRangePicker", S);
|
|
6137
6193
|
let w = s(), T = y || l || w, { setRef: E, innerRef: D } = Q({
|
|
6138
6194
|
ref: C,
|
|
@@ -6193,12 +6249,12 @@ var Bn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6193
6249
|
});
|
|
6194
6250
|
//#endregion
|
|
6195
6251
|
//#region src/lib/emptyValue.js
|
|
6196
|
-
function
|
|
6252
|
+
function Kn(e) {
|
|
6197
6253
|
return e == null || e === "";
|
|
6198
6254
|
}
|
|
6199
6255
|
//#endregion
|
|
6200
6256
|
//#region src/components/AppDescriptions.jsx
|
|
6201
|
-
function
|
|
6257
|
+
function qn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, title: i, className: a = "", ...o }) {
|
|
6202
6258
|
return N("AppDescriptions", o), /* @__PURE__ */ m("div", {
|
|
6203
6259
|
className: [
|
|
6204
6260
|
"descs",
|
|
@@ -6214,7 +6270,7 @@ function Un({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
6214
6270
|
}), /* @__PURE__ */ p("dl", {
|
|
6215
6271
|
className: "descs-list",
|
|
6216
6272
|
children: e.map((e, t) => {
|
|
6217
|
-
let n =
|
|
6273
|
+
let n = Kn(e.value), r = e.span ?? 1, i = e.key ?? `${e.label}-${t}`;
|
|
6218
6274
|
return /* @__PURE__ */ m("div", {
|
|
6219
6275
|
className: "descs-item",
|
|
6220
6276
|
style: { "--descs-span": r },
|
|
@@ -6232,24 +6288,24 @@ function Un({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
6232
6288
|
}
|
|
6233
6289
|
//#endregion
|
|
6234
6290
|
//#region src/components/AppDropdown.jsx
|
|
6235
|
-
var
|
|
6236
|
-
function
|
|
6291
|
+
var Jn = !1;
|
|
6292
|
+
function Yn() {
|
|
6237
6293
|
let e = !0;
|
|
6238
6294
|
try {
|
|
6239
6295
|
e = process.env.NODE_ENV !== "production";
|
|
6240
6296
|
} catch {
|
|
6241
6297
|
e = !0;
|
|
6242
6298
|
}
|
|
6243
|
-
!e ||
|
|
6299
|
+
!e || Jn || (Jn = !0, console.warn("[@webority/ui-react] <AppDropdown> icon-only toggle has no accessible name — pass `label` or `ariaLabel`."));
|
|
6244
6300
|
}
|
|
6245
|
-
function
|
|
6246
|
-
N("AppDropdown", d), !u && !i && !r &&
|
|
6301
|
+
function Xn({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i, align: a = "end", items: o = [], menuClassName: s = "", linkComponent: c, children: l, trigger: u, ...d }) {
|
|
6302
|
+
N("AppDropdown", d), !u && !i && !r && Yn();
|
|
6247
6303
|
let f = n ?? (u ? "wui-dropdown-trigger" : "topbar-icon-btn");
|
|
6248
6304
|
return /* @__PURE__ */ m(b, {
|
|
6249
6305
|
align: a,
|
|
6250
6306
|
...d,
|
|
6251
6307
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
6252
|
-
as:
|
|
6308
|
+
as: Zn,
|
|
6253
6309
|
icon: e,
|
|
6254
6310
|
iconSize: t,
|
|
6255
6311
|
btnClassName: f,
|
|
@@ -6284,7 +6340,7 @@ function Kn({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
6284
6340
|
})]
|
|
6285
6341
|
});
|
|
6286
6342
|
}
|
|
6287
|
-
var
|
|
6343
|
+
var Zn = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-btn", trigger: r, "aria-label": i, className: a, ...o }, s) {
|
|
6288
6344
|
return /* @__PURE__ */ p("button", {
|
|
6289
6345
|
ref: s,
|
|
6290
6346
|
type: "button",
|
|
@@ -6299,16 +6355,16 @@ var qn = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-
|
|
|
6299
6355
|
});
|
|
6300
6356
|
//#endregion
|
|
6301
6357
|
//#region src/lib/fileItem.js
|
|
6302
|
-
function
|
|
6358
|
+
function Qn(e) {
|
|
6303
6359
|
return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
|
|
6304
6360
|
}
|
|
6305
|
-
function
|
|
6361
|
+
function $n(e) {
|
|
6306
6362
|
return e instanceof File ? e.name : e?.name;
|
|
6307
6363
|
}
|
|
6308
|
-
function
|
|
6364
|
+
function er(e) {
|
|
6309
6365
|
return e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
|
|
6310
6366
|
}
|
|
6311
|
-
function
|
|
6367
|
+
function tr(e, t) {
|
|
6312
6368
|
let [n, r] = d(null);
|
|
6313
6369
|
return o(() => {
|
|
6314
6370
|
if (!t) {
|
|
@@ -6324,8 +6380,8 @@ function Zn(e, t) {
|
|
|
6324
6380
|
}
|
|
6325
6381
|
//#endregion
|
|
6326
6382
|
//#region src/lib/FileItemRow.jsx
|
|
6327
|
-
function
|
|
6328
|
-
let i =
|
|
6383
|
+
function nr({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
6384
|
+
let i = tr(e, t), a = $n(e), o = er(e);
|
|
6329
6385
|
return /* @__PURE__ */ m("div", {
|
|
6330
6386
|
className: "attach-item",
|
|
6331
6387
|
children: [
|
|
@@ -6364,15 +6420,15 @@ function Qn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6364
6420
|
}
|
|
6365
6421
|
//#endregion
|
|
6366
6422
|
//#region src/components/AppFileAttachment.jsx
|
|
6367
|
-
function
|
|
6423
|
+
function rr({ label: e = "Attachment", value: t, name: n, onChange: r, multiple: i = !1, accept: a = At, maxSizeMb: o = 5, optional: c = !1, error: l, id: u, ...h }) {
|
|
6368
6424
|
N("AppFileAttachment", h);
|
|
6369
|
-
let g = s(), _ = u || n || g, [v, y] = d(""), b = i && Array.isArray(t) ? t : t ? [t] : [], x =
|
|
6425
|
+
let g = s(), _ = u || n || g, [v, y] = d(""), b = i && Array.isArray(t) ? t : t ? [t] : [], x = It(a), S = (e) => e instanceof File ? Ft(e) : x || Ft(e), C = !i && b.length === 1 && S(b[0]);
|
|
6370
6426
|
function w(e) {
|
|
6371
6427
|
let n = Array.from(e.target.files || []);
|
|
6372
6428
|
if (e.target.value = "", !n.length) return;
|
|
6373
6429
|
let s = [], c = "";
|
|
6374
6430
|
for (let e of n) {
|
|
6375
|
-
let t =
|
|
6431
|
+
let t = zt(e, {
|
|
6376
6432
|
accept: a,
|
|
6377
6433
|
maxSizeMb: o
|
|
6378
6434
|
});
|
|
@@ -6383,8 +6439,8 @@ function $n({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6383
6439
|
s.push(e);
|
|
6384
6440
|
}
|
|
6385
6441
|
if (y(c), s.length) if (i) {
|
|
6386
|
-
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(
|
|
6387
|
-
r(e.concat(s.filter((e) => !n.has(
|
|
6442
|
+
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(Qn));
|
|
6443
|
+
r(e.concat(s.filter((e) => !n.has(Qn(e)))));
|
|
6388
6444
|
} else r(s[0]);
|
|
6389
6445
|
}
|
|
6390
6446
|
function T(e) {
|
|
@@ -6421,7 +6477,7 @@ function $n({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6421
6477
|
}), /* @__PURE__ */ m("span", {
|
|
6422
6478
|
className: "attach-drop-hint",
|
|
6423
6479
|
children: [
|
|
6424
|
-
|
|
6480
|
+
Lt(a),
|
|
6425
6481
|
", up to ",
|
|
6426
6482
|
o,
|
|
6427
6483
|
" MB"
|
|
@@ -6443,17 +6499,17 @@ function $n({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6443
6499
|
onChange: w,
|
|
6444
6500
|
...h
|
|
6445
6501
|
})] }),
|
|
6446
|
-
C ? /* @__PURE__ */ p(
|
|
6502
|
+
C ? /* @__PURE__ */ p(ir, {
|
|
6447
6503
|
item: b[0],
|
|
6448
6504
|
isImage: !0,
|
|
6449
6505
|
onRemove: () => T(0)
|
|
6450
6506
|
}) : b.length > 0 && /* @__PURE__ */ p("div", {
|
|
6451
6507
|
className: "attach-list",
|
|
6452
|
-
children: b.map((e, t) => /* @__PURE__ */ p(
|
|
6508
|
+
children: b.map((e, t) => /* @__PURE__ */ p(nr, {
|
|
6453
6509
|
item: e,
|
|
6454
6510
|
isImage: S(e),
|
|
6455
6511
|
onRemove: () => T(t)
|
|
6456
|
-
},
|
|
6512
|
+
}, Qn(e)))
|
|
6457
6513
|
}),
|
|
6458
6514
|
E && /* @__PURE__ */ p("div", {
|
|
6459
6515
|
className: "field-error",
|
|
@@ -6462,8 +6518,8 @@ function $n({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6462
6518
|
]
|
|
6463
6519
|
});
|
|
6464
6520
|
}
|
|
6465
|
-
function
|
|
6466
|
-
let r =
|
|
6521
|
+
function ir({ item: e, isImage: t, onRemove: n }) {
|
|
6522
|
+
let r = tr(e, t), i = $n(e), a = er(e);
|
|
6467
6523
|
return /* @__PURE__ */ m("div", {
|
|
6468
6524
|
className: "attach-preview",
|
|
6469
6525
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -6495,18 +6551,18 @@ function er({ item: e, isImage: t, onRemove: n }) {
|
|
|
6495
6551
|
}
|
|
6496
6552
|
//#endregion
|
|
6497
6553
|
//#region src/components/AppFilePicker.jsx
|
|
6498
|
-
function
|
|
6554
|
+
function ar({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles: a, accept: c = ".jpg,.jpeg,.png", maxSizeMb: l = 5, required: f, error: h, className: g = "", ..._ }) {
|
|
6499
6555
|
N("AppFilePicker", _);
|
|
6500
6556
|
let [v, y] = d(null), [b, x] = d(!1), [S, C] = d(""), w = u(null), T = s(), E = n || T;
|
|
6501
6557
|
o(() => {
|
|
6502
|
-
if (!i && t instanceof File &&
|
|
6558
|
+
if (!i && t instanceof File && Ft(t)) {
|
|
6503
6559
|
let e = URL.createObjectURL(t);
|
|
6504
6560
|
return y(e), () => URL.revokeObjectURL(e);
|
|
6505
6561
|
}
|
|
6506
6562
|
y(null);
|
|
6507
6563
|
}, [t, i]);
|
|
6508
|
-
let D = i ? Array.isArray(t) ? t : t ? [t] : [] : [], O = h || S, k =
|
|
6509
|
-
let t =
|
|
6564
|
+
let D = i ? Array.isArray(t) ? t : t ? [t] : [] : [], O = h || S, k = It(c), A = !i && !!t, j = A && (t instanceof File ? Ft(t) : k || Ft(t)), M = t?.name, P = j ? t?.url || v : null, F = (e) => {
|
|
6565
|
+
let t = zt(e, {
|
|
6510
6566
|
accept: c,
|
|
6511
6567
|
maxSizeMb: l
|
|
6512
6568
|
});
|
|
@@ -6514,9 +6570,9 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6514
6570
|
}, I = (e) => {
|
|
6515
6571
|
let n = Array.from(e || []);
|
|
6516
6572
|
if (!n.length) return;
|
|
6517
|
-
let i = Array.isArray(t) ? t : t ? [t] : [], o = new Set(i.map(
|
|
6573
|
+
let i = Array.isArray(t) ? t : t ? [t] : [], o = new Set(i.map(Qn)), s = "", u = [];
|
|
6518
6574
|
for (let e of n) {
|
|
6519
|
-
let t =
|
|
6575
|
+
let t = zt(e, {
|
|
6520
6576
|
accept: c,
|
|
6521
6577
|
maxSizeMb: l
|
|
6522
6578
|
});
|
|
@@ -6524,7 +6580,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6524
6580
|
s ||= t;
|
|
6525
6581
|
continue;
|
|
6526
6582
|
}
|
|
6527
|
-
o.has(
|
|
6583
|
+
o.has(Qn(e)) || (o.add(Qn(e)), u.push(e));
|
|
6528
6584
|
}
|
|
6529
6585
|
let d = i.concat(u);
|
|
6530
6586
|
a && d.length > a && (d = d.slice(0, a), s ||= `Up to ${a} files.`), C(s), r(d);
|
|
@@ -6544,7 +6600,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6544
6600
|
t && F(t);
|
|
6545
6601
|
}, z = (e) => {
|
|
6546
6602
|
C(""), r(D.filter((t, n) => n !== e));
|
|
6547
|
-
}, ee = () => w.current?.click(),
|
|
6603
|
+
}, ee = () => w.current?.click(), B = /* @__PURE__ */ p("input", {
|
|
6548
6604
|
id: E,
|
|
6549
6605
|
name: n,
|
|
6550
6606
|
ref: w,
|
|
@@ -6613,7 +6669,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6613
6669
|
size: 16
|
|
6614
6670
|
})
|
|
6615
6671
|
}),
|
|
6616
|
-
|
|
6672
|
+
B
|
|
6617
6673
|
]
|
|
6618
6674
|
}) : /* @__PURE__ */ m("div", {
|
|
6619
6675
|
className: `file-input file-input-tall${b ? " dragging" : ""}${O ? " error" : ""}${i && D.length > 0 ? " has-files" : ""}`,
|
|
@@ -6646,7 +6702,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6646
6702
|
/* @__PURE__ */ m("span", {
|
|
6647
6703
|
className: "file-input-text",
|
|
6648
6704
|
children: [
|
|
6649
|
-
|
|
6705
|
+
Lt(c),
|
|
6650
6706
|
" · up to ",
|
|
6651
6707
|
l,
|
|
6652
6708
|
" MB"
|
|
@@ -6654,15 +6710,15 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6654
6710
|
})
|
|
6655
6711
|
]
|
|
6656
6712
|
}),
|
|
6657
|
-
|
|
6713
|
+
B,
|
|
6658
6714
|
i && D.length > 0 && /* @__PURE__ */ p("div", {
|
|
6659
6715
|
className: "attach-list",
|
|
6660
|
-
children: D.map((e, t) => /* @__PURE__ */ p(
|
|
6716
|
+
children: D.map((e, t) => /* @__PURE__ */ p(nr, {
|
|
6661
6717
|
item: e,
|
|
6662
|
-
isImage: e instanceof File ?
|
|
6718
|
+
isImage: e instanceof File ? Ft(e) : k || Ft(e),
|
|
6663
6719
|
noun: "file",
|
|
6664
6720
|
onRemove: () => z(t)
|
|
6665
|
-
},
|
|
6721
|
+
}, Qn(e)))
|
|
6666
6722
|
})
|
|
6667
6723
|
]
|
|
6668
6724
|
}),
|
|
@@ -6675,7 +6731,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6675
6731
|
}
|
|
6676
6732
|
//#endregion
|
|
6677
6733
|
//#region src/components/AppFloatingDock.jsx
|
|
6678
|
-
function
|
|
6734
|
+
function or({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation", magnify: r = !0, maxScale: i, radius: a, className: o = "", ...s }) {
|
|
6679
6735
|
return N("AppFloatingDock", s), /* @__PURE__ */ p("wui-dock", {
|
|
6680
6736
|
role: "navigation",
|
|
6681
6737
|
"aria-label": n,
|
|
@@ -6717,7 +6773,7 @@ function nr({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
6717
6773
|
}
|
|
6718
6774
|
//#endregion
|
|
6719
6775
|
//#region src/components/AppFormActions.jsx
|
|
6720
|
-
function
|
|
6776
|
+
function sr({ children: e, sticky: t = !1, align: n = "end", className: r = "", ...i }) {
|
|
6721
6777
|
return N("AppFormActions", i), /* @__PURE__ */ p("div", {
|
|
6722
6778
|
className: [
|
|
6723
6779
|
"form-actions",
|
|
@@ -6731,7 +6787,7 @@ function rr({ children: e, sticky: t = !1, align: n = "end", className: r = "",
|
|
|
6731
6787
|
}
|
|
6732
6788
|
//#endregion
|
|
6733
6789
|
//#region src/components/AppFormRow.jsx
|
|
6734
|
-
function
|
|
6790
|
+
function cr({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
6735
6791
|
N("AppFormRow", r);
|
|
6736
6792
|
let { style: i, ...a } = r;
|
|
6737
6793
|
return /* @__PURE__ */ p("div", {
|
|
@@ -6746,7 +6802,7 @@ function ir({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
|
6746
6802
|
}
|
|
6747
6803
|
//#endregion
|
|
6748
6804
|
//#region src/components/AppFormSection.jsx
|
|
6749
|
-
function
|
|
6805
|
+
function lr({ children: e, title: t, description: n, className: r = "", ...i }) {
|
|
6750
6806
|
return N("AppFormSection", i), /* @__PURE__ */ m("section", {
|
|
6751
6807
|
className: ["form-section", r].filter(Boolean).join(" "),
|
|
6752
6808
|
...i,
|
|
@@ -6767,12 +6823,12 @@ function ar({ children: e, title: t, description: n, className: r = "", ...i })
|
|
|
6767
6823
|
}
|
|
6768
6824
|
//#endregion
|
|
6769
6825
|
//#region src/components/AppInfoList.jsx
|
|
6770
|
-
function
|
|
6826
|
+
function ur({ items: e = [], className: t = "", ...n }) {
|
|
6771
6827
|
return N("AppInfoList", n), /* @__PURE__ */ p("div", {
|
|
6772
6828
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
6773
6829
|
...n,
|
|
6774
6830
|
children: e.map((e, t) => {
|
|
6775
|
-
let n =
|
|
6831
|
+
let n = Kn(e.value), r = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
6776
6832
|
className: "info-icon",
|
|
6777
6833
|
children: H(e.icon, { size: 16 })
|
|
6778
6834
|
}), /* @__PURE__ */ m("span", {
|
|
@@ -6798,23 +6854,23 @@ function or({ items: e = [], className: t = "", ...n }) {
|
|
|
6798
6854
|
}
|
|
6799
6855
|
//#endregion
|
|
6800
6856
|
//#region src/components/AppKpiTile.jsx
|
|
6801
|
-
var
|
|
6802
|
-
function
|
|
6803
|
-
if (!e || e.length < 2) return `0,${
|
|
6804
|
-
let t = Math.min(...e), n = Math.max(...e) - t, r =
|
|
6805
|
-
return e.map((e, i) => `${i * r},${n === 0 ?
|
|
6857
|
+
var dr = 48, fr = 16;
|
|
6858
|
+
function pr(e) {
|
|
6859
|
+
if (!e || e.length < 2) return `0,${fr / 2} ${dr},${fr / 2}`;
|
|
6860
|
+
let t = Math.min(...e), n = Math.max(...e) - t, r = dr / (e.length - 1);
|
|
6861
|
+
return e.map((e, i) => `${i * r},${n === 0 ? fr / 2 : fr - (e - t) / n * fr}`).join(" ");
|
|
6806
6862
|
}
|
|
6807
|
-
function
|
|
6863
|
+
function mr(e) {
|
|
6808
6864
|
if (typeof e != "string") return "flat";
|
|
6809
6865
|
let t = e.trim();
|
|
6810
6866
|
return t.startsWith("+") ? "up" : t.startsWith("-") || t.startsWith("−") ? "down" : "flat";
|
|
6811
6867
|
}
|
|
6812
|
-
function
|
|
6868
|
+
function hr({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, deltaDirection: o, sparkline: s, variant: c = "plain", size: l = "md", valueSize: u, inline: d = !1, attention: f = !1, href: h, linkComponent: g, className: _ = "", style: v, iconClassName: y = "", labelClassName: b = "", valueClassName: x = "", captionClassName: S = "", deltaClassName: C = "", sparklineClassName: w = "", ...T }) {
|
|
6813
6869
|
N("AppKpiTile", T);
|
|
6814
6870
|
let E = `kpi${d ? " kpi-inline" : ""}${c === "filled" ? " kpi-filled" : c === "accent" ? " kpi-accent" : c === "spotlight" ? " kpi-spotlight" : ""}${l === "lg" ? " kpi-lg" : l === "sm" ? " kpi-sm" : ""}${f ? " kpi-attention" : ""}${_ ? ` ${_}` : ""}`, D = typeof u == "number" && u > 0 ? {
|
|
6815
6871
|
...v,
|
|
6816
6872
|
"--wui-kpi-value-size": `${u}px`
|
|
6817
|
-
} : v, O = o ??
|
|
6873
|
+
} : v, O = o ?? mr(a), k = O === "up" ? "arrow-up" : O === "down" ? "arrow-down" : null, A = {};
|
|
6818
6874
|
return h != null && (A = g ? {
|
|
6819
6875
|
as: g,
|
|
6820
6876
|
to: h
|
|
@@ -6852,12 +6908,12 @@ function dr({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6852
6908
|
}),
|
|
6853
6909
|
s && s.length > 0 && /* @__PURE__ */ p("svg", {
|
|
6854
6910
|
className: `kpi-sparkline${w ? ` ${w}` : ""}`,
|
|
6855
|
-
width:
|
|
6856
|
-
height:
|
|
6857
|
-
viewBox: `0 0 ${
|
|
6911
|
+
width: dr,
|
|
6912
|
+
height: fr,
|
|
6913
|
+
viewBox: `0 0 ${dr} ${fr}`,
|
|
6858
6914
|
"aria-hidden": "true",
|
|
6859
6915
|
children: /* @__PURE__ */ p("polyline", {
|
|
6860
|
-
points:
|
|
6916
|
+
points: pr(s),
|
|
6861
6917
|
stroke: "currentColor",
|
|
6862
6918
|
fill: "none"
|
|
6863
6919
|
})
|
|
@@ -6867,21 +6923,21 @@ function dr({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6867
6923
|
}
|
|
6868
6924
|
//#endregion
|
|
6869
6925
|
//#region src/components/AppLogoPicker.jsx
|
|
6870
|
-
var
|
|
6926
|
+
var gr = {
|
|
6871
6927
|
sm: 72,
|
|
6872
6928
|
md: 120,
|
|
6873
6929
|
lg: 160
|
|
6874
6930
|
};
|
|
6875
|
-
function
|
|
6876
|
-
N("AppLogoPicker", k),
|
|
6877
|
-
let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [R, z] = d(!1), [ee,
|
|
6931
|
+
function _r({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a = !1, disabled: c = !1, accept: l = "image/png,image/jpeg,image/webp", maxSizeMb: f = 5, overlayIcon: h = "image", overlayLabel: g = "Update photo", ariaLabel: _ = "Upload photo", label: v, hint: y, error: b, layout: x = "stacked", title: S, subtitle: C, required: w = !1, variant: T = "initials", size: E = "md", shape: D = "circle", className: O = "", ...k }) {
|
|
6932
|
+
N("AppLogoPicker", k), W("AppLogoPicker", "size", typeof E == "string" ? E : null, Object.keys(gr));
|
|
6933
|
+
let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [R, z] = d(!1), [ee, B] = d(!1);
|
|
6878
6934
|
o(() => () => P && URL.revokeObjectURL(P), [P]), o(() => {
|
|
6879
6935
|
F(null), z(!1);
|
|
6880
6936
|
}, [e]);
|
|
6881
|
-
let
|
|
6882
|
-
|
|
6937
|
+
let te = a || c, ne = P || (e && !R ? e : null), re = b || I, ie = !te && (!!P || !!ne && !!i), ae = () => {
|
|
6938
|
+
te || A.current?.click();
|
|
6883
6939
|
}, oe = (e) => {
|
|
6884
|
-
let t =
|
|
6940
|
+
let t = zt(e, {
|
|
6885
6941
|
accept: l,
|
|
6886
6942
|
maxSizeMb: f
|
|
6887
6943
|
});
|
|
@@ -6890,38 +6946,38 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6890
6946
|
return;
|
|
6891
6947
|
}
|
|
6892
6948
|
L(""), z(!1), F(URL.createObjectURL(e)), r(e);
|
|
6893
|
-
},
|
|
6949
|
+
}, se = (e) => {
|
|
6894
6950
|
let t = e.target.files?.[0];
|
|
6895
6951
|
e.target.value = "", t && oe(t);
|
|
6896
|
-
},
|
|
6897
|
-
if (e.preventDefault(),
|
|
6952
|
+
}, ce = (e) => {
|
|
6953
|
+
if (e.preventDefault(), B(!1), te) return;
|
|
6898
6954
|
let t = e.dataTransfer.files?.[0];
|
|
6899
6955
|
t && oe(t);
|
|
6900
|
-
},
|
|
6956
|
+
}, le = () => {
|
|
6901
6957
|
F(null), L(""), z(!1), A.current && (A.current.value = ""), i?.();
|
|
6902
|
-
},
|
|
6958
|
+
}, ue = typeof E == "number" ? E : gr[E] ?? gr.md, H = Math.max(14, Math.round(ue * .18)), de = Math.round(ue * .5), fe = [
|
|
6903
6959
|
"set-uploader",
|
|
6904
6960
|
T === "avatar" ? "set-uploader--avatar" : "",
|
|
6905
6961
|
D === "rounded" ? "set-uploader--rounded" : D === "square" ? "set-uploader--square" : "",
|
|
6906
6962
|
ee && "is-dragging"
|
|
6907
|
-
].filter(Boolean).join(" "),
|
|
6963
|
+
].filter(Boolean).join(" "), pe = x === "inline", U = x === "profile", me = /* @__PURE__ */ m("div", {
|
|
6908
6964
|
className: "set-uploader-shell",
|
|
6909
6965
|
children: [
|
|
6910
6966
|
/* @__PURE__ */ p("button", {
|
|
6911
6967
|
type: "button",
|
|
6912
6968
|
className: fe,
|
|
6913
|
-
style: { "--wui-logo-size": `${
|
|
6969
|
+
style: { "--wui-logo-size": `${ue}px` },
|
|
6914
6970
|
"aria-busy": a || void 0,
|
|
6915
|
-
disabled:
|
|
6971
|
+
disabled: te,
|
|
6916
6972
|
onClick: ae,
|
|
6917
6973
|
"aria-label": _,
|
|
6918
6974
|
onDragOver: (e) => {
|
|
6919
|
-
e.preventDefault(), !
|
|
6975
|
+
e.preventDefault(), !te && !ee && B(!0);
|
|
6920
6976
|
},
|
|
6921
6977
|
onDragLeave: (e) => {
|
|
6922
|
-
e.preventDefault(),
|
|
6978
|
+
e.preventDefault(), B(!1);
|
|
6923
6979
|
},
|
|
6924
|
-
onDrop:
|
|
6980
|
+
onDrop: ce,
|
|
6925
6981
|
...k,
|
|
6926
6982
|
children: /* @__PURE__ */ m("span", {
|
|
6927
6983
|
className: "set-uploader-ring",
|
|
@@ -6942,14 +6998,14 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6942
6998
|
"aria-hidden": "true",
|
|
6943
6999
|
children: /* @__PURE__ */ p(V, {
|
|
6944
7000
|
name: "refresh-cw",
|
|
6945
|
-
size:
|
|
7001
|
+
size: H,
|
|
6946
7002
|
className: "wui-spin"
|
|
6947
7003
|
})
|
|
6948
7004
|
}) : !c && /* @__PURE__ */ m("span", {
|
|
6949
7005
|
className: "set-uploader-overlay",
|
|
6950
7006
|
children: [/* @__PURE__ */ p(V, {
|
|
6951
7007
|
name: h,
|
|
6952
|
-
size:
|
|
7008
|
+
size: H
|
|
6953
7009
|
}), /* @__PURE__ */ p("span", { children: g })]
|
|
6954
7010
|
})]
|
|
6955
7011
|
})
|
|
@@ -6960,7 +7016,7 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6960
7016
|
hidden: !ie,
|
|
6961
7017
|
"aria-label": "Remove photo",
|
|
6962
7018
|
title: "Remove photo",
|
|
6963
|
-
onClick:
|
|
7019
|
+
onClick: le,
|
|
6964
7020
|
children: /* @__PURE__ */ p(V, {
|
|
6965
7021
|
name: "x",
|
|
6966
7022
|
size: 14
|
|
@@ -6973,8 +7029,8 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6973
7029
|
name: n,
|
|
6974
7030
|
hidden: !0,
|
|
6975
7031
|
accept: l,
|
|
6976
|
-
onChange:
|
|
6977
|
-
disabled:
|
|
7032
|
+
onChange: se,
|
|
7033
|
+
disabled: te
|
|
6978
7034
|
})
|
|
6979
7035
|
]
|
|
6980
7036
|
}), he = y && !re && /* @__PURE__ */ p("div", {
|
|
@@ -7002,13 +7058,13 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
7002
7058
|
ge
|
|
7003
7059
|
]
|
|
7004
7060
|
});
|
|
7005
|
-
return
|
|
7061
|
+
return pe ? /* @__PURE__ */ m("div", {
|
|
7006
7062
|
className: `field set-uploader-field set-uploader-field--inline${O ? ` ${O}` : ""}`,
|
|
7007
7063
|
children: [_e, /* @__PURE__ */ m("div", {
|
|
7008
7064
|
className: "set-uploader-row",
|
|
7009
7065
|
children: [me, ve]
|
|
7010
7066
|
})]
|
|
7011
|
-
}) :
|
|
7067
|
+
}) : U ? /* @__PURE__ */ m("div", {
|
|
7012
7068
|
className: `field set-uploader-field set-uploader-field--profile${O ? ` ${O}` : ""}`,
|
|
7013
7069
|
children: [
|
|
7014
7070
|
_e,
|
|
@@ -7027,27 +7083,27 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
7027
7083
|
}
|
|
7028
7084
|
//#endregion
|
|
7029
7085
|
//#region src/components/AppMeter.jsx
|
|
7030
|
-
var
|
|
7086
|
+
var vr = [
|
|
7031
7087
|
"info",
|
|
7032
7088
|
"success",
|
|
7033
7089
|
"warning",
|
|
7034
7090
|
"danger",
|
|
7035
7091
|
"neutral"
|
|
7036
7092
|
];
|
|
7037
|
-
function
|
|
7093
|
+
function yr(e, t, n) {
|
|
7038
7094
|
let r = n - t;
|
|
7039
7095
|
if (!(r > 0)) return 0;
|
|
7040
7096
|
let i = Math.min(100, Math.max(0, (e - t) / r * 100));
|
|
7041
7097
|
return Number(i.toFixed(2));
|
|
7042
7098
|
}
|
|
7043
|
-
function
|
|
7099
|
+
function br(e, t, n, r, i) {
|
|
7044
7100
|
if (t == null && n == null) return i;
|
|
7045
7101
|
let a = "mid";
|
|
7046
7102
|
return t != null && e <= t ? a = "low" : n != null && e >= n && (a = "high"), r === "low" ? a === "low" ? "success" : a === "high" ? "danger" : "warning" : a === "high" ? "success" : a === "low" ? "danger" : "warning";
|
|
7047
7103
|
}
|
|
7048
|
-
function
|
|
7104
|
+
function xr({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum: i = "high", low: a, high: o, size: s = "md", label: c, showLabel: l = !1, className: u = "", ...d }) {
|
|
7049
7105
|
N("AppMeter", d);
|
|
7050
|
-
let f =
|
|
7106
|
+
let f = br(e, a, o, i, vr.includes(r) ? r : "info"), m = yr(e, t, n);
|
|
7051
7107
|
return /* @__PURE__ */ p("div", {
|
|
7052
7108
|
className: `progress${s === "sm" ? " progress-sm" : ""}${u ? ` ${u}` : ""}`,
|
|
7053
7109
|
role: "meter",
|
|
@@ -7065,20 +7121,20 @@ function _r({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
7065
7121
|
}
|
|
7066
7122
|
//#endregion
|
|
7067
7123
|
//#region src/components/AppMultiSelect.jsx
|
|
7068
|
-
var
|
|
7124
|
+
var Sr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Select…", searchPlaceholder: i = "Search…", searchable: a = !0, disabled: c = !1, icon: l, size: u, collapseChips: d = !1, name: f, label: h, error: g, hint: _, required: v = !1, help: y, helpLabel: b = "More information", fieldClassName: x = "", ...S }, C) {
|
|
7069
7125
|
N("AppMultiSelect", S);
|
|
7070
7126
|
let w = s(), T = f || w, { setRef: E, innerRef: D } = Q({
|
|
7071
7127
|
ref: C,
|
|
7072
7128
|
value: e,
|
|
7073
7129
|
onChange: t,
|
|
7074
|
-
readValue:
|
|
7075
|
-
writeValue:
|
|
7130
|
+
readValue: qt,
|
|
7131
|
+
writeValue: Jt
|
|
7076
7132
|
});
|
|
7077
7133
|
return o(() => {
|
|
7078
7134
|
let e = D.current;
|
|
7079
7135
|
if (!e) return;
|
|
7080
7136
|
let t = n || [];
|
|
7081
|
-
|
|
7137
|
+
Kt(t, e.options) || (e.options = t);
|
|
7082
7138
|
}, [n, D]), /* @__PURE__ */ m("div", {
|
|
7083
7139
|
className: `field${x ? ` ${x}` : ""}`,
|
|
7084
7140
|
children: [
|
|
@@ -7088,7 +7144,7 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7088
7144
|
children: [
|
|
7089
7145
|
h,
|
|
7090
7146
|
v && /* @__PURE__ */ p(Z, {}),
|
|
7091
|
-
y && /* @__PURE__ */ p(
|
|
7147
|
+
y && /* @__PURE__ */ p(Ht, {
|
|
7092
7148
|
label: b,
|
|
7093
7149
|
children: y
|
|
7094
7150
|
})
|
|
@@ -7122,7 +7178,7 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7122
7178
|
}) : null
|
|
7123
7179
|
]
|
|
7124
7180
|
});
|
|
7125
|
-
}),
|
|
7181
|
+
}), Cr = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", value: c, onChange: l, min: u, max: f, step: h = 1, precision: g = 0, unit: _, size: v = "md", id: y, name: b, className: S = "", fieldClassName: C = "", disabled: w = !1, ...T }, E) {
|
|
7126
7182
|
N("AppNumberInput", T);
|
|
7127
7183
|
let D = s(), O = y || D, k = (e) => {
|
|
7128
7184
|
if (g === 0) return Math.round(e);
|
|
@@ -7142,7 +7198,7 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7142
7198
|
let F = (e) => {
|
|
7143
7199
|
let t = (j(M) ?? A(0)) + e * h, n = A(k(t));
|
|
7144
7200
|
P(String(n)), l?.(n);
|
|
7145
|
-
}, I = j(M), L = w || I !== null && typeof u == "number" && I <= u, R = w || I !== null && typeof f == "number" && I >= f, z = n && O ? `${O}-error` : void 0, ee = r && O ? `${O}-hint` : void 0,
|
|
7201
|
+
}, I = j(M), L = w || I !== null && typeof u == "number" && I <= u, R = w || I !== null && typeof f == "number" && I >= f, z = n && O ? `${O}-error` : void 0, ee = r && O ? `${O}-hint` : void 0, B = z || ee, te = [
|
|
7146
7202
|
"input",
|
|
7147
7203
|
v === "sm" ? "input-sm" : "",
|
|
7148
7204
|
v === "lg" ? "input-lg" : "",
|
|
@@ -7170,11 +7226,11 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7170
7226
|
name: b,
|
|
7171
7227
|
type: "text",
|
|
7172
7228
|
inputMode: g > 0 ? "decimal" : "numeric",
|
|
7173
|
-
className:
|
|
7229
|
+
className: te,
|
|
7174
7230
|
disabled: w,
|
|
7175
7231
|
required: t,
|
|
7176
7232
|
"aria-invalid": n ? "true" : "false",
|
|
7177
|
-
"aria-describedby":
|
|
7233
|
+
"aria-describedby": B,
|
|
7178
7234
|
value: M,
|
|
7179
7235
|
ref: E,
|
|
7180
7236
|
onChange: ne,
|
|
@@ -7227,7 +7283,7 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7227
7283
|
children: [
|
|
7228
7284
|
e,
|
|
7229
7285
|
t && /* @__PURE__ */ p(Z, {}),
|
|
7230
|
-
i && /* @__PURE__ */ p(
|
|
7286
|
+
i && /* @__PURE__ */ p(Ht, {
|
|
7231
7287
|
label: a,
|
|
7232
7288
|
children: i
|
|
7233
7289
|
})
|
|
@@ -7245,54 +7301,48 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7245
7301
|
}) : null
|
|
7246
7302
|
]
|
|
7247
7303
|
});
|
|
7248
|
-
}),
|
|
7249
|
-
N("AppOtpInput",
|
|
7250
|
-
let
|
|
7251
|
-
ref:
|
|
7304
|
+
}), wr = i(function({ value: e, onChange: t, onComplete: n, length: r = 6, mode: i = "numeric", label: a, required: o = !1, hint: c, error: l, disabled: u = !1, name: d, id: f, className: h = "", ...g }, _) {
|
|
7305
|
+
N("AppOtpInput", g);
|
|
7306
|
+
let v = s(), y = f || v, { setRef: b } = Q({
|
|
7307
|
+
ref: _,
|
|
7252
7308
|
value: e ?? "",
|
|
7253
|
-
onChange: t
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
let e = S.current;
|
|
7257
|
-
if (!e) return;
|
|
7258
|
-
let t = (e) => n?.(e.detail);
|
|
7259
|
-
return e.addEventListener("complete", t), () => e.removeEventListener("complete", t);
|
|
7260
|
-
}, [n, S]);
|
|
7261
|
-
let C = /* @__PURE__ */ p("wui-otp", {
|
|
7309
|
+
onChange: t,
|
|
7310
|
+
on: { complete: (e) => n?.(e.detail) }
|
|
7311
|
+
}), x = /* @__PURE__ */ p("wui-otp", {
|
|
7262
7312
|
"aria-label": typeof a == "string" ? a : void 0,
|
|
7263
|
-
ref:
|
|
7264
|
-
id:
|
|
7265
|
-
name:
|
|
7313
|
+
ref: b,
|
|
7314
|
+
id: y,
|
|
7315
|
+
name: d,
|
|
7266
7316
|
length: String(r),
|
|
7267
7317
|
mode: i,
|
|
7268
|
-
"aria-invalid":
|
|
7269
|
-
disabled:
|
|
7270
|
-
required:
|
|
7271
|
-
...
|
|
7318
|
+
"aria-invalid": l ? "true" : void 0,
|
|
7319
|
+
disabled: u ? "" : void 0,
|
|
7320
|
+
required: o ? "" : void 0,
|
|
7321
|
+
...g
|
|
7272
7322
|
});
|
|
7273
|
-
return !a && !
|
|
7274
|
-
className: `field${
|
|
7323
|
+
return !a && !l && !c ? x : /* @__PURE__ */ m("div", {
|
|
7324
|
+
className: `field${h ? ` ${h}` : ""}`,
|
|
7275
7325
|
children: [
|
|
7276
7326
|
a && /* @__PURE__ */ m("label", {
|
|
7277
7327
|
className: "label",
|
|
7278
|
-
htmlFor:
|
|
7279
|
-
children: [a,
|
|
7328
|
+
htmlFor: y,
|
|
7329
|
+
children: [a, o && /* @__PURE__ */ p(Z, {})]
|
|
7280
7330
|
}),
|
|
7281
|
-
|
|
7282
|
-
|
|
7331
|
+
x,
|
|
7332
|
+
l && /* @__PURE__ */ p("div", {
|
|
7283
7333
|
className: "field-error",
|
|
7284
|
-
children:
|
|
7334
|
+
children: l
|
|
7285
7335
|
}),
|
|
7286
|
-
!
|
|
7336
|
+
!l && c && /* @__PURE__ */ p("div", {
|
|
7287
7337
|
className: "field-hint",
|
|
7288
|
-
children:
|
|
7338
|
+
children: c
|
|
7289
7339
|
})
|
|
7290
7340
|
]
|
|
7291
7341
|
});
|
|
7292
7342
|
});
|
|
7293
7343
|
//#endregion
|
|
7294
7344
|
//#region src/components/AppPageHeader.jsx
|
|
7295
|
-
function
|
|
7345
|
+
function Tr({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", status: a, breadcrumbs: o, actions: s, size: c = "md", align: l = "start", divider: u = !1, sticky: d = !1, className: f = "", ...h }) {
|
|
7296
7346
|
N("AppPageHeader", h);
|
|
7297
7347
|
let g = [
|
|
7298
7348
|
"page-header",
|
|
@@ -7351,9 +7401,9 @@ function xr({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
7351
7401
|
}
|
|
7352
7402
|
//#endregion
|
|
7353
7403
|
//#region src/components/AppPagination.jsx
|
|
7354
|
-
function
|
|
7404
|
+
function Er({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
7355
7405
|
if (N("AppPagination", s), t <= 1) return null;
|
|
7356
|
-
let c =
|
|
7406
|
+
let c = Ln(e, t, { siblingCount: r });
|
|
7357
7407
|
return /* @__PURE__ */ p("nav", {
|
|
7358
7408
|
className: [
|
|
7359
7409
|
"pagination-nav",
|
|
@@ -7411,7 +7461,7 @@ function Sr({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
7411
7461
|
}
|
|
7412
7462
|
//#endregion
|
|
7413
7463
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
7414
|
-
var
|
|
7464
|
+
var Dr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name: i, label: a = "Phone number", placeholder: o, required: c = !1, error: l, showFlag: u = !0, showDialCode: d = !0, size: f = "md", fieldClassName: h = "", ...g }, _) {
|
|
7415
7465
|
N("AppPhoneNumberInput", g);
|
|
7416
7466
|
let v = s(), y = i || v, b = l && y ? `${y}-error` : void 0, { setRef: x } = Q({
|
|
7417
7467
|
ref: _,
|
|
@@ -7451,7 +7501,7 @@ var Cr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
7451
7501
|
});
|
|
7452
7502
|
//#endregion
|
|
7453
7503
|
//#region src/components/AppPricingCard.jsx
|
|
7454
|
-
function
|
|
7504
|
+
function Or({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a, featured: o = !1, current: s = !1, badge: c = "Most popular", className: l = "", ...u }) {
|
|
7455
7505
|
return N("AppPricingCard", u), /* @__PURE__ */ m("div", {
|
|
7456
7506
|
className: [
|
|
7457
7507
|
"plan-card",
|
|
@@ -7505,21 +7555,21 @@ function wr({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
7505
7555
|
}
|
|
7506
7556
|
//#endregion
|
|
7507
7557
|
//#region src/components/AppProgress.jsx
|
|
7508
|
-
var
|
|
7558
|
+
var kr = [
|
|
7509
7559
|
"info",
|
|
7510
7560
|
"success",
|
|
7511
7561
|
"warning",
|
|
7512
7562
|
"danger",
|
|
7513
7563
|
"neutral"
|
|
7514
7564
|
];
|
|
7515
|
-
function
|
|
7565
|
+
function Ar(e, t) {
|
|
7516
7566
|
if (!(t > 0)) return 0;
|
|
7517
7567
|
let n = Math.min(100, Math.max(0, e / t * 100));
|
|
7518
7568
|
return Number(n.toFixed(2));
|
|
7519
7569
|
}
|
|
7520
|
-
function
|
|
7570
|
+
function jr({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", label: i, showLabel: a = !1, striped: o = !1, animated: s = !1, indeterminate: c = !1, className: l = "", ...u }) {
|
|
7521
7571
|
N("AppProgress", u);
|
|
7522
|
-
let d =
|
|
7572
|
+
let d = kr.includes(n) ? n : "info", f = Ar(e, t), m = `progress${r === "sm" ? " progress-sm" : ""}${l ? ` ${l}` : ""}`, h = [
|
|
7523
7573
|
"progress-bar",
|
|
7524
7574
|
`wui-progress-${d}`,
|
|
7525
7575
|
o || s ? "progress-bar-striped" : "",
|
|
@@ -7543,8 +7593,8 @@ function Dr({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", labe
|
|
|
7543
7593
|
}
|
|
7544
7594
|
//#endregion
|
|
7545
7595
|
//#region src/components/AppRadio.jsx
|
|
7546
|
-
var
|
|
7547
|
-
return N("AppRadio", o), /* @__PURE__ */ p(
|
|
7596
|
+
var Mr = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
7597
|
+
return N("AppRadio", o), /* @__PURE__ */ p(gn, {
|
|
7548
7598
|
ref: s,
|
|
7549
7599
|
label: e,
|
|
7550
7600
|
id: t,
|
|
@@ -7559,7 +7609,7 @@ var Or = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
7559
7609
|
});
|
|
7560
7610
|
//#endregion
|
|
7561
7611
|
//#region src/components/AppRepeater.jsx
|
|
7562
|
-
function
|
|
7612
|
+
function Nr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "Add another", removeLabel: a = "Remove row", emptyText: o, min: s = 0, max: c, numbered: l = !0, className: u = "", ...d }) {
|
|
7563
7613
|
N("AppRepeater", d);
|
|
7564
7614
|
let f = typeof c == "number" && e.length >= c, h = !!r && e.length > s;
|
|
7565
7615
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7581,7 +7631,7 @@ function kr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7581
7631
|
className: "repeater-body",
|
|
7582
7632
|
children: t(e, n)
|
|
7583
7633
|
}),
|
|
7584
|
-
h && /* @__PURE__ */ p(
|
|
7634
|
+
h && /* @__PURE__ */ p(de, {
|
|
7585
7635
|
icon: "trash-2",
|
|
7586
7636
|
label: `${a} ${n + 1}`,
|
|
7587
7637
|
danger: !0,
|
|
@@ -7590,7 +7640,7 @@ function kr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7590
7640
|
})
|
|
7591
7641
|
]
|
|
7592
7642
|
}, e.id ?? n)),
|
|
7593
|
-
/* @__PURE__ */ p(
|
|
7643
|
+
/* @__PURE__ */ p(ye, {
|
|
7594
7644
|
variant: "secondary",
|
|
7595
7645
|
size: "sm",
|
|
7596
7646
|
leftIcon: "plus",
|
|
@@ -7604,7 +7654,7 @@ function kr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7604
7654
|
}
|
|
7605
7655
|
//#endregion
|
|
7606
7656
|
//#region src/components/AppResourceCard.jsx
|
|
7607
|
-
function
|
|
7657
|
+
function Pr({ icon: e, title: t, text: n, href: r, external: i = !1, linkComponent: a, className: o = "", ...s }) {
|
|
7608
7658
|
N("AppResourceCard", s);
|
|
7609
7659
|
let c = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
7610
7660
|
className: "res-card-icon",
|
|
@@ -7638,7 +7688,7 @@ function Ar({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
7638
7688
|
}
|
|
7639
7689
|
//#endregion
|
|
7640
7690
|
//#region src/components/AppResult.jsx
|
|
7641
|
-
var
|
|
7691
|
+
var Fr = {
|
|
7642
7692
|
success: {
|
|
7643
7693
|
icon: "check-circle",
|
|
7644
7694
|
tone: "success"
|
|
@@ -7659,9 +7709,9 @@ var jr = {
|
|
|
7659
7709
|
404: { tone: "muted" },
|
|
7660
7710
|
500: { tone: "muted" }
|
|
7661
7711
|
};
|
|
7662
|
-
function
|
|
7663
|
-
N("AppResult", s),
|
|
7664
|
-
let c =
|
|
7712
|
+
function Ir({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, children: a, className: o = "", ...s }) {
|
|
7713
|
+
N("AppResult", s), W("AppResult", "status", e, Object.keys(Fr));
|
|
7714
|
+
let c = Fr[e] || Fr.info, l = c.tone, u = /^\d+$/.test(e), d = r ?? (u ? null : c.icon);
|
|
7665
7715
|
return /* @__PURE__ */ m("div", {
|
|
7666
7716
|
className: [
|
|
7667
7717
|
"result",
|
|
@@ -7699,7 +7749,7 @@ function Mr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
7699
7749
|
}
|
|
7700
7750
|
//#endregion
|
|
7701
7751
|
//#region src/components/AppScrollbar.jsx
|
|
7702
|
-
function
|
|
7752
|
+
function Lr({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
7703
7753
|
return N("AppScrollbar", i), /* @__PURE__ */ p("div", {
|
|
7704
7754
|
className: t ? `wui-scroll ${t}` : "wui-scroll",
|
|
7705
7755
|
style: n == null ? r : {
|
|
@@ -7712,7 +7762,7 @@ function Nr({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
|
7712
7762
|
}
|
|
7713
7763
|
//#endregion
|
|
7714
7764
|
//#region src/components/AppSearch.jsx
|
|
7715
|
-
function
|
|
7765
|
+
function Rr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search…", ariaLabel: i, iconSize: a = 18, size: o, loading: s = !1, disabled: c = !1, className: l = "", ...u }) {
|
|
7716
7766
|
N("AppSearch", u);
|
|
7717
7767
|
let d = t || n;
|
|
7718
7768
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7759,7 +7809,7 @@ function Pr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
7759
7809
|
}
|
|
7760
7810
|
//#endregion
|
|
7761
7811
|
//#region src/components/AppSegmented.jsx
|
|
7762
|
-
function
|
|
7812
|
+
function zr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a = "md", fullWidth: l = !1, disabled: d = !1, className: f = "", ...h }) {
|
|
7763
7813
|
N("AppSegmented", h);
|
|
7764
7814
|
let g = s(), _ = i || g, v = u(null), y = u(null), b = [
|
|
7765
7815
|
"segmented",
|
|
@@ -7834,7 +7884,7 @@ function Fr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
7834
7884
|
}
|
|
7835
7885
|
//#endregion
|
|
7836
7886
|
//#region src/components/AppSelect.jsx
|
|
7837
|
-
var
|
|
7887
|
+
var Br = (e) => e == null ? "" : e.label ?? e.text ?? "", Vr = i(function({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", searchPlaceholder: i = "Search...", searchable: a = !1, clearable: c = !1, size: l, icon: u, floatingLabel: d = !1, disabled: f, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", "aria-label": T, "aria-labelledby": E, "aria-describedby": D, ...O }, k) {
|
|
7838
7888
|
N("AppSelect", O);
|
|
7839
7889
|
let A = s(), { setRef: j, innerRef: M } = Q({
|
|
7840
7890
|
ref: k,
|
|
@@ -7846,10 +7896,10 @@ var Ir = (e) => e == null ? "" : e.label ?? e.text ?? "", Lr = i(function({ valu
|
|
|
7846
7896
|
if (!e) return;
|
|
7847
7897
|
let t = n.map((e) => ({
|
|
7848
7898
|
value: e.value,
|
|
7849
|
-
label:
|
|
7899
|
+
label: Br(e),
|
|
7850
7900
|
icon: e.icon
|
|
7851
7901
|
}));
|
|
7852
|
-
|
|
7902
|
+
Kt(t, e.options) || (e.options = t);
|
|
7853
7903
|
}, [n, M]);
|
|
7854
7904
|
let P = x || S || A, F = d && h, I = _ && P ? `${P}-error` : void 0, L = v && P ? `${P}-hint` : void 0, R = /* @__PURE__ */ p("wui-select", {
|
|
7855
7905
|
"aria-label": T || (typeof h == "string" ? h : void 0),
|
|
@@ -7882,7 +7932,7 @@ var Ir = (e) => e == null ? "" : e.label ?? e.text ?? "", Lr = i(function({ valu
|
|
|
7882
7932
|
children: [
|
|
7883
7933
|
h,
|
|
7884
7934
|
g && /* @__PURE__ */ p(Z, {}),
|
|
7885
|
-
y && /* @__PURE__ */ p(
|
|
7935
|
+
y && /* @__PURE__ */ p(Ht, {
|
|
7886
7936
|
label: b,
|
|
7887
7937
|
children: y
|
|
7888
7938
|
})
|
|
@@ -7910,7 +7960,7 @@ var Ir = (e) => e == null ? "" : e.label ?? e.text ?? "", Lr = i(function({ valu
|
|
|
7910
7960
|
});
|
|
7911
7961
|
//#endregion
|
|
7912
7962
|
//#region src/components/AppShell.jsx
|
|
7913
|
-
function
|
|
7963
|
+
function Hr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r, sidebarFooter: i, topbarStart: a, topbarEnd: s, footer: c, children: l, collapsed: u, onCollapsedChange: f, noSidebar: h = !1, navLabel: g = "Main navigation", linkComponent: _, className: v = "", ...y }) {
|
|
7914
7964
|
N("AppShell", y);
|
|
7915
7965
|
let [b, x] = d(!1), [S, C] = d(!1), [w, T] = d(!1), E = u ?? b, D = () => {
|
|
7916
7966
|
let e = !E;
|
|
@@ -7958,7 +8008,7 @@ function Rr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
7958
8008
|
children: [e.label && /* @__PURE__ */ p("div", {
|
|
7959
8009
|
className: "app-nav-group-label",
|
|
7960
8010
|
children: e.label
|
|
7961
|
-
}), e.items.map((e) => /* @__PURE__ */ p(
|
|
8011
|
+
}), e.items.map((e) => /* @__PURE__ */ p(Ur, {
|
|
7962
8012
|
item: e,
|
|
7963
8013
|
linkComponent: _,
|
|
7964
8014
|
onNavigate: () => C(!1)
|
|
@@ -8025,7 +8075,7 @@ function Rr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
8025
8075
|
]
|
|
8026
8076
|
});
|
|
8027
8077
|
}
|
|
8028
|
-
function
|
|
8078
|
+
function Ur({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
8029
8079
|
let i = Array.isArray(e.children) && e.children.length > 0, a = i && e.children.some((e) => e.active), [s, c] = d(a);
|
|
8030
8080
|
o(() => {
|
|
8031
8081
|
a && !s && c(!0);
|
|
@@ -8065,7 +8115,7 @@ function zr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8065
8115
|
className: `app-nav-sub${s ? " expanded" : ""}`,
|
|
8066
8116
|
children: /* @__PURE__ */ p("div", {
|
|
8067
8117
|
className: "app-nav-sub-inner",
|
|
8068
|
-
children: e.children.map((e) => /* @__PURE__ */ p(
|
|
8118
|
+
children: e.children.map((e) => /* @__PURE__ */ p(Ur, {
|
|
8069
8119
|
item: e,
|
|
8070
8120
|
linkComponent: t,
|
|
8071
8121
|
onNavigate: n,
|
|
@@ -8106,7 +8156,7 @@ function zr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8106
8156
|
}
|
|
8107
8157
|
//#endregion
|
|
8108
8158
|
//#region src/components/AppSidebarMenu.jsx
|
|
8109
|
-
var
|
|
8159
|
+
var Wr = {
|
|
8110
8160
|
left: "start",
|
|
8111
8161
|
right: "end",
|
|
8112
8162
|
start: "start",
|
|
@@ -8114,9 +8164,9 @@ var Br = {
|
|
|
8114
8164
|
top: "top",
|
|
8115
8165
|
bottom: "bottom"
|
|
8116
8166
|
};
|
|
8117
|
-
function
|
|
8118
|
-
N("AppSidebarMenu", b),
|
|
8119
|
-
let { style: x, ...S } = b, w =
|
|
8167
|
+
function Gr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, header: a, children: o, footer: s, width: c, maxWidth: l, backdrop: u = !0, scroll: d = !1, keyboard: f = !0, closeButton: h = !0, responsive: g, className: _ = "", bodyClassName: v = "", ariaLabel: y, ...b }) {
|
|
8168
|
+
N("AppSidebarMenu", b), W("AppSidebarMenu", "side", n, Object.keys(Wr));
|
|
8169
|
+
let { style: x, ...S } = b, w = Wr[n] || "end", T = c || l || x ? {
|
|
8120
8170
|
...c && { "--asm-width": c },
|
|
8121
8171
|
...l && { "--asm-max-width": l },
|
|
8122
8172
|
...x
|
|
@@ -8145,7 +8195,7 @@ function Vr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8145
8195
|
size: 18
|
|
8146
8196
|
})
|
|
8147
8197
|
}), r]
|
|
8148
|
-
}), h && /* @__PURE__ */ p(
|
|
8198
|
+
}), h && /* @__PURE__ */ p(ye, {
|
|
8149
8199
|
variant: "ghost",
|
|
8150
8200
|
className: "btn-icon",
|
|
8151
8201
|
onClick: t,
|
|
@@ -8169,14 +8219,14 @@ function Vr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8169
8219
|
}
|
|
8170
8220
|
//#endregion
|
|
8171
8221
|
//#region src/components/AppSlider.jsx
|
|
8172
|
-
var
|
|
8222
|
+
var Kr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, label: a, required: c = !1, hint: l, error: u, name: d, startName: f, endName: h, min: g = 0, max: _ = 100, step: v = 1, disabled: y, size: b, showValue: x, unit: S, id: C, ariaLabel: w, className: T = "", ...E }, D) {
|
|
8173
8223
|
N("AppSlider", E);
|
|
8174
8224
|
let O = s(), k = C || d || r && f || O, A = r, { setRef: j, innerRef: M } = Q({
|
|
8175
8225
|
ref: D,
|
|
8176
8226
|
value: A ? void 0 : e,
|
|
8177
8227
|
onChange: i,
|
|
8178
|
-
readValue: A ?
|
|
8179
|
-
writeValue: A ? void 0 :
|
|
8228
|
+
readValue: A ? Yt : void 0,
|
|
8229
|
+
writeValue: A ? void 0 : Xt
|
|
8180
8230
|
});
|
|
8181
8231
|
o(() => {
|
|
8182
8232
|
if (!A) return;
|
|
@@ -8230,14 +8280,14 @@ var Hr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
8230
8280
|
})
|
|
8231
8281
|
]
|
|
8232
8282
|
});
|
|
8233
|
-
}),
|
|
8283
|
+
}), qr = {
|
|
8234
8284
|
sm: 44,
|
|
8235
8285
|
md: 56,
|
|
8236
8286
|
lg: 72
|
|
8237
8287
|
};
|
|
8238
|
-
function
|
|
8239
|
-
N("AppSplash", c),
|
|
8240
|
-
let { style: l, ...u } = c, d = typeof a == "number" ? a :
|
|
8288
|
+
function Jr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", size: a = "md", label: o = "Loading", className: s = "", ...c }) {
|
|
8289
|
+
N("AppSplash", c), W("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(qr));
|
|
8290
|
+
let { style: l, ...u } = c, d = typeof a == "number" ? a : qr[a] ?? qr.md, f = i === "ring" ? /* @__PURE__ */ p("span", {
|
|
8241
8291
|
className: "splash-ring",
|
|
8242
8292
|
"aria-hidden": "true"
|
|
8243
8293
|
}) : i === "dots" ? /* @__PURE__ */ m("span", {
|
|
@@ -8284,7 +8334,7 @@ function Wr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
8284
8334
|
}
|
|
8285
8335
|
//#endregion
|
|
8286
8336
|
//#region src/components/AppStatusBadge.jsx
|
|
8287
|
-
function
|
|
8337
|
+
function Yr({ label: e, tone: t = "neutral", className: n = "", ...r }) {
|
|
8288
8338
|
return N("AppStatusBadge", r), e == null || e === "" ? "—" : /* @__PURE__ */ p("span", {
|
|
8289
8339
|
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
8290
8340
|
...r,
|
|
@@ -8293,7 +8343,7 @@ function Gr({ label: e, tone: t = "neutral", className: n = "", ...r }) {
|
|
|
8293
8343
|
}
|
|
8294
8344
|
//#endregion
|
|
8295
8345
|
//#region src/components/AppStepper.jsx
|
|
8296
|
-
function
|
|
8346
|
+
function Xr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal", activeStep: r, onStepClick: i, label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
8297
8347
|
N("AppStepper", c);
|
|
8298
8348
|
let l = t === "journey";
|
|
8299
8349
|
return /* @__PURE__ */ p("nav", {
|
|
@@ -8306,7 +8356,7 @@ function Kr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8306
8356
|
"aria-label": a,
|
|
8307
8357
|
...c,
|
|
8308
8358
|
children: e.map((t, n) => {
|
|
8309
|
-
let a = t.status ||
|
|
8359
|
+
let a = t.status || Zr(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
8310
8360
|
c = a === "done" ? /* @__PURE__ */ p(V, {
|
|
8311
8361
|
name: "check",
|
|
8312
8362
|
size: 14
|
|
@@ -8370,13 +8420,13 @@ function Kr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8370
8420
|
})
|
|
8371
8421
|
});
|
|
8372
8422
|
}
|
|
8373
|
-
function
|
|
8423
|
+
function Zr(e, t) {
|
|
8374
8424
|
return typeof t == "number" ? e < t ? "done" : e === t ? "active" : "pending" : "pending";
|
|
8375
8425
|
}
|
|
8376
8426
|
//#endregion
|
|
8377
8427
|
//#region src/components/AppSwitch.jsx
|
|
8378
|
-
var
|
|
8379
|
-
return N("AppSwitch", s), /* @__PURE__ */ p(
|
|
8428
|
+
var Qr = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "pill", className: o = "", ...s }, c) {
|
|
8429
|
+
return N("AppSwitch", s), /* @__PURE__ */ p(gn, {
|
|
8380
8430
|
ref: c,
|
|
8381
8431
|
label: e,
|
|
8382
8432
|
id: t,
|
|
@@ -8391,7 +8441,7 @@ var Jr = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "p
|
|
|
8391
8441
|
});
|
|
8392
8442
|
//#endregion
|
|
8393
8443
|
//#region src/components/AppTableEmptyState.jsx
|
|
8394
|
-
function
|
|
8444
|
+
function $r({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
8395
8445
|
return N("AppTableEmptyState", i), /* @__PURE__ */ m("div", {
|
|
8396
8446
|
className: "tbl-empty",
|
|
8397
8447
|
...i,
|
|
@@ -8417,13 +8467,13 @@ function Yr({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
8417
8467
|
}
|
|
8418
8468
|
//#endregion
|
|
8419
8469
|
//#region src/components/AppTooltip.jsx
|
|
8420
|
-
var
|
|
8470
|
+
var ei = {
|
|
8421
8471
|
start: "left",
|
|
8422
8472
|
end: "right",
|
|
8423
8473
|
top: "top",
|
|
8424
8474
|
bottom: "bottom"
|
|
8425
8475
|
};
|
|
8426
|
-
function
|
|
8476
|
+
function ti({ content: e, children: t, placement: r = "top", tone: i = "default", size: a = "md", className: o = "", ...c }) {
|
|
8427
8477
|
N("AppTooltip", c);
|
|
8428
8478
|
let l = /* @__PURE__ */ p(E, {
|
|
8429
8479
|
id: s(),
|
|
@@ -8437,14 +8487,14 @@ function Zr({ content: e, children: t, placement: r = "top", tone: i = "default"
|
|
|
8437
8487
|
});
|
|
8438
8488
|
return /* @__PURE__ */ p(w, {
|
|
8439
8489
|
trigger: ["hover", "focus"],
|
|
8440
|
-
placement:
|
|
8490
|
+
placement: ei[r] || r,
|
|
8441
8491
|
overlay: l,
|
|
8442
8492
|
children: n(t, c)
|
|
8443
8493
|
});
|
|
8444
8494
|
}
|
|
8445
8495
|
//#endregion
|
|
8446
8496
|
//#region src/components/AppTabs.jsx
|
|
8447
|
-
function
|
|
8497
|
+
function ni({ tabs: e, value: t, onChange: n, variant: r = "underline", orientation: i = "horizontal", size: s = "md", fitted: l = !1, activation: f = "automatic", ariaLabel: h, className: g = "", style: _, ...v }) {
|
|
8448
8498
|
N("AppTabs", v);
|
|
8449
8499
|
let y = u(null), b = u(null), x = i === "vertical", [S, C] = d(t);
|
|
8450
8500
|
o(() => {
|
|
@@ -8551,7 +8601,7 @@ function Qr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8551
8601
|
})
|
|
8552
8602
|
]
|
|
8553
8603
|
}, e.key);
|
|
8554
|
-
return e.tooltip ? /* @__PURE__ */ p(
|
|
8604
|
+
return e.tooltip ? /* @__PURE__ */ p(ti, {
|
|
8555
8605
|
content: e.tooltip,
|
|
8556
8606
|
children: i
|
|
8557
8607
|
}, e.key) : i;
|
|
@@ -8593,14 +8643,14 @@ function Qr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8593
8643
|
}
|
|
8594
8644
|
//#endregion
|
|
8595
8645
|
//#region src/components/AppTagInput.jsx
|
|
8596
|
-
var
|
|
8646
|
+
var ri = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r, label: i, error: a, hint: o, required: c = !1, size: l, maxTags: u, allowDuplicates: d = !1, disabled: f = !1, id: h, ariaLabel: g, className: _ = "", fieldClassName: v = "", help: y, helpLabel: b = "More information", ...x }, S) {
|
|
8597
8647
|
N("AppTagInput", x);
|
|
8598
8648
|
let C = s(), w = h || r || C, { setRef: T } = Q({
|
|
8599
8649
|
ref: S,
|
|
8600
8650
|
value: e,
|
|
8601
8651
|
onChange: t,
|
|
8602
|
-
readValue:
|
|
8603
|
-
writeValue:
|
|
8652
|
+
readValue: qt,
|
|
8653
|
+
writeValue: Jt
|
|
8604
8654
|
});
|
|
8605
8655
|
return /* @__PURE__ */ m("div", {
|
|
8606
8656
|
className: `field${v ? ` ${v}` : ""}`,
|
|
@@ -8611,7 +8661,7 @@ var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8611
8661
|
children: [
|
|
8612
8662
|
i,
|
|
8613
8663
|
c && /* @__PURE__ */ p(Z, {}),
|
|
8614
|
-
y && /* @__PURE__ */ p(
|
|
8664
|
+
y && /* @__PURE__ */ p(Ht, {
|
|
8615
8665
|
label: b,
|
|
8616
8666
|
children: y
|
|
8617
8667
|
})
|
|
@@ -8644,7 +8694,7 @@ var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8644
8694
|
}) : null
|
|
8645
8695
|
]
|
|
8646
8696
|
});
|
|
8647
|
-
}),
|
|
8697
|
+
}), ii = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: o = "More information", id: l, name: d, rows: f = 4, autoGrow: h = !1, className: g = "", fieldClassName: _ = "", ...v }, y) {
|
|
8648
8698
|
N("AppTextarea", v);
|
|
8649
8699
|
let b = s(), S = l || b, C = [
|
|
8650
8700
|
"textarea",
|
|
@@ -8676,7 +8726,7 @@ var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8676
8726
|
children: [
|
|
8677
8727
|
e,
|
|
8678
8728
|
t && /* @__PURE__ */ p(Z, {}),
|
|
8679
|
-
i && /* @__PURE__ */ p(
|
|
8729
|
+
i && /* @__PURE__ */ p(Ht, {
|
|
8680
8730
|
label: o,
|
|
8681
8731
|
children: i
|
|
8682
8732
|
})
|
|
@@ -8706,7 +8756,7 @@ var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8706
8756
|
}) : null
|
|
8707
8757
|
]
|
|
8708
8758
|
});
|
|
8709
|
-
}),
|
|
8759
|
+
}), ai = {
|
|
8710
8760
|
done: "check",
|
|
8711
8761
|
current: "clock",
|
|
8712
8762
|
"on-hold": "lock",
|
|
@@ -8715,7 +8765,7 @@ var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8715
8765
|
skipped: "arrow-right",
|
|
8716
8766
|
upcoming: null
|
|
8717
8767
|
};
|
|
8718
|
-
function
|
|
8768
|
+
function oi({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
8719
8769
|
N("AppTimeline", o);
|
|
8720
8770
|
let s = t === "progress", c = `timeline${s ? " timeline--progress" : ""}${n === "horizontal" ? " timeline--horizontal" : ""}${i ? ` ${i}` : ""}`, l = typeof r == "number" && r > 0 ? r : void 0, u = l ? Math.round(l * .54) : s ? 13 : 12;
|
|
8721
8771
|
return /* @__PURE__ */ p("ol", {
|
|
@@ -8726,7 +8776,7 @@ function ni({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8726
8776
|
} : a,
|
|
8727
8777
|
...o,
|
|
8728
8778
|
children: e.map((e, t) => {
|
|
8729
|
-
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ?
|
|
8779
|
+
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ? ai[n] : void 0) : e.icon || "circle";
|
|
8730
8780
|
return /* @__PURE__ */ m("li", {
|
|
8731
8781
|
className: `timeline-item${r}${i}`,
|
|
8732
8782
|
children: [/* @__PURE__ */ p("span", {
|
|
@@ -8784,7 +8834,7 @@ function ni({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8784
8834
|
}
|
|
8785
8835
|
//#endregion
|
|
8786
8836
|
//#region src/components/AppTimePicker.jsx
|
|
8787
|
-
var
|
|
8837
|
+
var si = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, step: u, format: d = "24", placeholder: f = "Select time", disabled: h, size: g, id: _, ariaLabel: v, className: y = "", ...b }, x) {
|
|
8788
8838
|
N("AppTimePicker", b);
|
|
8789
8839
|
let S = s(), C = _ || o || S, { setRef: w } = Q({
|
|
8790
8840
|
ref: x,
|
|
@@ -8829,32 +8879,32 @@ var ri = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
8829
8879
|
})
|
|
8830
8880
|
]
|
|
8831
8881
|
});
|
|
8832
|
-
}),
|
|
8833
|
-
function
|
|
8834
|
-
for (let e of
|
|
8882
|
+
}), ci = 6, $ = [], li = /* @__PURE__ */ new Set(), ui = /* @__PURE__ */ new Map(), di = 0;
|
|
8883
|
+
function fi() {
|
|
8884
|
+
for (let e of li) e($);
|
|
8835
8885
|
}
|
|
8836
|
-
function
|
|
8837
|
-
let t =
|
|
8838
|
-
t !== void 0 && (clearTimeout(t),
|
|
8886
|
+
function pi(e) {
|
|
8887
|
+
let t = ui.get(e);
|
|
8888
|
+
t !== void 0 && (clearTimeout(t), ui.delete(e));
|
|
8839
8889
|
}
|
|
8840
|
-
function
|
|
8841
|
-
if (e.length <=
|
|
8890
|
+
function mi(e) {
|
|
8891
|
+
if (e.length <= ci) return e;
|
|
8842
8892
|
let t = [...e];
|
|
8843
|
-
for (; t.length >
|
|
8893
|
+
for (; t.length > ci;) {
|
|
8844
8894
|
let e = t.findIndex((e) => e.duration !== 0);
|
|
8845
8895
|
t.splice(e === -1 ? 0 : e, 1);
|
|
8846
8896
|
}
|
|
8847
8897
|
return t;
|
|
8848
8898
|
}
|
|
8849
|
-
function
|
|
8850
|
-
return
|
|
8899
|
+
function hi(e) {
|
|
8900
|
+
return li.add(e), e($), () => li.delete(e);
|
|
8851
8901
|
}
|
|
8852
|
-
function
|
|
8902
|
+
function gi(e, t, n = {}) {
|
|
8853
8903
|
let r = n.id, i = r || typeof e != "string" ? void 0 : `${t}:${e}`;
|
|
8854
8904
|
if (r) {
|
|
8855
8905
|
let i = $.find((e) => e.externalId === r);
|
|
8856
8906
|
if (i) {
|
|
8857
|
-
|
|
8907
|
+
pi(i.id);
|
|
8858
8908
|
let r = n.duration === void 0 ? 5e3 : n.duration;
|
|
8859
8909
|
$ = $.map((a) => a.id === i.id ? {
|
|
8860
8910
|
...a,
|
|
@@ -8867,12 +8917,12 @@ function fi(e, t, n = {}) {
|
|
|
8867
8917
|
shape: n.shape,
|
|
8868
8918
|
surface: n.surface,
|
|
8869
8919
|
progress: n.progress
|
|
8870
|
-
} : a),
|
|
8920
|
+
} : a), fi(), r > 0 && ui.set(i.id, setTimeout(() => _i(i.id), r));
|
|
8871
8921
|
return;
|
|
8872
8922
|
}
|
|
8873
8923
|
} else if (i && $.some((e) => e.key === i)) return;
|
|
8874
|
-
let a = ++
|
|
8875
|
-
$ =
|
|
8924
|
+
let a = ++di, o = n.duration === void 0 ? 5e3 : n.duration;
|
|
8925
|
+
$ = mi([...$, {
|
|
8876
8926
|
id: a,
|
|
8877
8927
|
externalId: r,
|
|
8878
8928
|
message: e,
|
|
@@ -8885,19 +8935,19 @@ function fi(e, t, n = {}) {
|
|
|
8885
8935
|
surface: n.surface,
|
|
8886
8936
|
progress: n.progress,
|
|
8887
8937
|
key: i
|
|
8888
|
-
}]),
|
|
8938
|
+
}]), fi(), o > 0 && ui.set(a, setTimeout(() => _i(a), o));
|
|
8889
8939
|
}
|
|
8890
|
-
function
|
|
8891
|
-
|
|
8940
|
+
function _i(e) {
|
|
8941
|
+
pi(e);
|
|
8892
8942
|
let t = $.filter((t) => t.id !== e);
|
|
8893
|
-
t.length !== $.length && ($ = t,
|
|
8943
|
+
t.length !== $.length && ($ = t, fi());
|
|
8894
8944
|
}
|
|
8895
|
-
function
|
|
8896
|
-
$.length !== 0 && ($ = [],
|
|
8945
|
+
function vi() {
|
|
8946
|
+
$.length !== 0 && ($ = [], fi());
|
|
8897
8947
|
}
|
|
8898
8948
|
//#endregion
|
|
8899
8949
|
//#region src/components/AppToast.jsx
|
|
8900
|
-
var
|
|
8950
|
+
var yi = {
|
|
8901
8951
|
success: {
|
|
8902
8952
|
icon: "check-circle",
|
|
8903
8953
|
assertive: !1
|
|
@@ -8914,7 +8964,7 @@ var hi = {
|
|
|
8914
8964
|
icon: "alert-circle",
|
|
8915
8965
|
assertive: !0
|
|
8916
8966
|
}
|
|
8917
|
-
},
|
|
8967
|
+
}, bi = {
|
|
8918
8968
|
"top-start": "top-0 start-0",
|
|
8919
8969
|
"top-center": "top-0 start-50 translate-middle-x",
|
|
8920
8970
|
"top-end": "top-0 end-0",
|
|
@@ -8922,21 +8972,21 @@ var hi = {
|
|
|
8922
8972
|
"bottom-start": "bottom-0 start-0",
|
|
8923
8973
|
"bottom-center": "bottom-0 start-50 translate-middle-x",
|
|
8924
8974
|
"bottom-end": "bottom-0 end-0"
|
|
8925
|
-
},
|
|
8975
|
+
}, xi = 64, Si = /* @__PURE__ */ new Set([
|
|
8926
8976
|
"rise",
|
|
8927
8977
|
"organic",
|
|
8928
8978
|
"jelly",
|
|
8929
8979
|
"spring"
|
|
8930
|
-
]),
|
|
8980
|
+
]), Ci = /* @__PURE__ */ new Set([
|
|
8931
8981
|
"rounded",
|
|
8932
8982
|
"pill",
|
|
8933
8983
|
"sharp"
|
|
8934
|
-
]),
|
|
8935
|
-
function
|
|
8936
|
-
N("AppToast", s),
|
|
8984
|
+
]), wi = /* @__PURE__ */ new Set(["auto", "inverse"]);
|
|
8985
|
+
function Ti({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "rise", shape: r = "rounded", surface: i = "auto", className: a = "", ...s }) {
|
|
8986
|
+
N("AppToast", s), W("AppToast", "position", e, Object.keys(bi)), W("AppToast", "animation", n, Si), W("AppToast", "shape", r, Ci), W("AppToast", "surface", i, wi);
|
|
8937
8987
|
let [c, l] = d([]);
|
|
8938
|
-
o(() =>
|
|
8939
|
-
let u = Math.max(0, c.length - t), f = u ? c.slice(u) : c, h =
|
|
8988
|
+
o(() => hi(l), []);
|
|
8989
|
+
let u = Math.max(0, c.length - t), f = u ? c.slice(u) : c, h = bi[e] ?? bi["bottom-end"];
|
|
8940
8990
|
return /* @__PURE__ */ m("div", {
|
|
8941
8991
|
...s,
|
|
8942
8992
|
className: `wui-toast-container toast-container position-fixed ${h} p-3 ${a}`.trim(),
|
|
@@ -8948,7 +8998,7 @@ function xi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
8948
8998
|
u,
|
|
8949
8999
|
" more"
|
|
8950
9000
|
]
|
|
8951
|
-
}), f.map((e) => /* @__PURE__ */ p(
|
|
9001
|
+
}), f.map((e) => /* @__PURE__ */ p(Ei, {
|
|
8952
9002
|
toast: e,
|
|
8953
9003
|
defaultAnimation: n,
|
|
8954
9004
|
defaultShape: r,
|
|
@@ -8956,8 +9006,8 @@ function xi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
8956
9006
|
}, e.id))]
|
|
8957
9007
|
});
|
|
8958
9008
|
}
|
|
8959
|
-
function
|
|
8960
|
-
let i =
|
|
9009
|
+
function Ei({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded", defaultSurface: r = "auto" }) {
|
|
9010
|
+
let i = yi[e.variant] ?? yi.success, a = Si.has(e.animation) ? e.animation : t, o = Ci.has(e.shape) ? e.shape : n, s = wi.has(e.surface) ? e.surface : r, c = (a !== "rise" && Si.has(a) ? ` wui-toast--anim-${a}` : "") + (o !== "rounded" && Ci.has(o) ? ` wui-toast--shape-${o}` : "") + (s === "inverse" ? " wui-toast--surface-inverse" : ""), l = e.duration === 0, [f, h] = d(0), [g, _] = d(!1), v = u(null), y = () => _i(e.id), b = (e) => {
|
|
8961
9011
|
e.button !== 0 || e.target.closest("button") || (v.current = e.clientX, _(!0), e.currentTarget.setPointerCapture?.(e.pointerId));
|
|
8962
9012
|
}, x = (e) => {
|
|
8963
9013
|
v.current !== null && h(e.clientX - v.current);
|
|
@@ -8966,7 +9016,7 @@ function Si({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
8966
9016
|
}, C = (e) => {
|
|
8967
9017
|
if (v.current === null) return;
|
|
8968
9018
|
let t = e.clientX - v.current;
|
|
8969
|
-
if (Math.abs(t) >
|
|
9019
|
+
if (Math.abs(t) > xi) {
|
|
8970
9020
|
y();
|
|
8971
9021
|
return;
|
|
8972
9022
|
}
|
|
@@ -9049,7 +9099,7 @@ function Si({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
9049
9099
|
}
|
|
9050
9100
|
//#endregion
|
|
9051
9101
|
//#region src/components/AppToolbar.jsx
|
|
9052
|
-
function
|
|
9102
|
+
function Di({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelect: i, label: a, name: o, disabled: c = !1, className: l = "", ...u }) {
|
|
9053
9103
|
N("AppToolbar", u);
|
|
9054
9104
|
let f = s(), h = o || f, [g, _] = d(r), v = n === void 0 ? g : n;
|
|
9055
9105
|
return /* @__PURE__ */ m("div", {
|
|
@@ -9107,7 +9157,7 @@ function Ci({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
9107
9157
|
}
|
|
9108
9158
|
//#endregion
|
|
9109
9159
|
//#region src/components/AppWizard.jsx
|
|
9110
|
-
var
|
|
9160
|
+
var Oi = i(function({ steps: t = [], children: n, active: r, defaultActive: i = 0, onStepChange: a, onFinish: s, onSkip: c, beforeNext: l, onInvalid: d, variant: f = "steps", tone: m, orientation: h = "horizontal", skippable: g = !1, nonLinear: _ = !1, hideStepper: v = !1, disabled: y = !1, label: b = "Progress", backLabel: x = "Back", nextLabel: S = "Next", skipLabel: C = "Skip", finishLabel: w = "Finish", className: T = "", ...E }, D) {
|
|
9111
9161
|
N("AppWizard", E);
|
|
9112
9162
|
let O = u(null), k = (e) => {
|
|
9113
9163
|
O.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
@@ -9162,7 +9212,7 @@ var wi = i(function({ steps: t = [], children: n, active: r, defaultActive: i =
|
|
|
9162
9212
|
});
|
|
9163
9213
|
//#endregion
|
|
9164
9214
|
//#region src/components/AppWorkspaceSwitcher.jsx
|
|
9165
|
-
function
|
|
9215
|
+
function ki({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAction: i, linkComponent: a, searchable: s = !1, onCreate: c, canCreate: f = !1, createLabel: h = "Create workspace", compact: g = !1, size: _ = "md", ariaLabel: v, ...y }) {
|
|
9166
9216
|
let { onToggle: x, ...S } = y;
|
|
9167
9217
|
N("AppWorkspaceSwitcher", S);
|
|
9168
9218
|
let [C, w] = d(""), [T, E] = d(!1), D = u(null), O = e.find((e) => e.id === t) ?? e[0], k = l(() => {
|
|
@@ -9190,7 +9240,7 @@ function Ti({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9190
9240
|
},
|
|
9191
9241
|
...S,
|
|
9192
9242
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
9193
|
-
as:
|
|
9243
|
+
as: Ni,
|
|
9194
9244
|
compact: g,
|
|
9195
9245
|
tenant: O,
|
|
9196
9246
|
"aria-label": j
|
|
@@ -9225,7 +9275,7 @@ function Ti({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9225
9275
|
className: `workspace-switcher-option${e.id === O?.id ? " is-active" : ""}`,
|
|
9226
9276
|
onClick: () => n?.(e),
|
|
9227
9277
|
children: [
|
|
9228
|
-
/* @__PURE__ */ p(
|
|
9278
|
+
/* @__PURE__ */ p(ji, { tenant: e }),
|
|
9229
9279
|
/* @__PURE__ */ p("span", {
|
|
9230
9280
|
className: "workspace-switcher-option-name",
|
|
9231
9281
|
children: e.name
|
|
@@ -9257,17 +9307,17 @@ function Ti({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9257
9307
|
}) : null,
|
|
9258
9308
|
i ? /* @__PURE__ */ p("div", {
|
|
9259
9309
|
className: "workspace-switcher-footer",
|
|
9260
|
-
children:
|
|
9310
|
+
children: Mi(i, a)
|
|
9261
9311
|
}) : null
|
|
9262
9312
|
]
|
|
9263
9313
|
})]
|
|
9264
9314
|
});
|
|
9265
9315
|
}
|
|
9266
|
-
function
|
|
9316
|
+
function Ai(e) {
|
|
9267
9317
|
let t = String(e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
9268
9318
|
return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
|
|
9269
9319
|
}
|
|
9270
|
-
function
|
|
9320
|
+
function ji({ tenant: e }) {
|
|
9271
9321
|
return e?.logoUrl ? /* @__PURE__ */ p("img", {
|
|
9272
9322
|
className: "workspace-switcher-mark",
|
|
9273
9323
|
src: e.logoUrl,
|
|
@@ -9275,10 +9325,10 @@ function Di({ tenant: e }) {
|
|
|
9275
9325
|
loading: "lazy"
|
|
9276
9326
|
}) : /* @__PURE__ */ p("span", {
|
|
9277
9327
|
className: "workspace-switcher-mark",
|
|
9278
|
-
children:
|
|
9328
|
+
children: Ai(e?.name)
|
|
9279
9329
|
});
|
|
9280
9330
|
}
|
|
9281
|
-
function
|
|
9331
|
+
function Mi(e, t) {
|
|
9282
9332
|
if (typeof e != "object" || !e || !("label" in e)) return e;
|
|
9283
9333
|
let { label: n, icon: r, href: i } = e;
|
|
9284
9334
|
return /* @__PURE__ */ m(i ? t ?? "a" : "button", {
|
|
@@ -9290,7 +9340,7 @@ function Oi(e, t) {
|
|
|
9290
9340
|
}) : null, n]
|
|
9291
9341
|
});
|
|
9292
9342
|
}
|
|
9293
|
-
var
|
|
9343
|
+
var Ni = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i }, a) {
|
|
9294
9344
|
return /* @__PURE__ */ m("button", {
|
|
9295
9345
|
ref: a,
|
|
9296
9346
|
type: "button",
|
|
@@ -9298,7 +9348,7 @@ var ki = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9298
9348
|
"aria-haspopup": "true",
|
|
9299
9349
|
"aria-label": n,
|
|
9300
9350
|
...i,
|
|
9301
|
-
children: [/* @__PURE__ */ p(
|
|
9351
|
+
children: [/* @__PURE__ */ p(ji, { tenant: t }), e ? null : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
9302
9352
|
className: "workspace-switcher-trigger-name",
|
|
9303
9353
|
children: t?.name
|
|
9304
9354
|
}), /* @__PURE__ */ p(V, {
|
|
@@ -9310,36 +9360,36 @@ var ki = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9310
9360
|
});
|
|
9311
9361
|
//#endregion
|
|
9312
9362
|
//#region src/components/toast.js
|
|
9313
|
-
function
|
|
9314
|
-
|
|
9363
|
+
function Pi() {
|
|
9364
|
+
vi();
|
|
9315
9365
|
}
|
|
9316
|
-
var
|
|
9366
|
+
var Fi = /* @__PURE__ */ new Set([
|
|
9317
9367
|
"success",
|
|
9318
9368
|
"info",
|
|
9319
9369
|
"warning",
|
|
9320
9370
|
"error"
|
|
9321
9371
|
]);
|
|
9322
|
-
function
|
|
9372
|
+
function Ii(e, t = "info") {
|
|
9323
9373
|
let n = "info", r = {};
|
|
9324
|
-
typeof t == "string" ? n =
|
|
9374
|
+
typeof t == "string" ? n = Fi.has(t) ? t : "info" : typeof t == "object" && t && (r = t, n = Fi.has(r.variant) ? r.variant : "info"), gi(e, n, r);
|
|
9325
9375
|
}
|
|
9326
|
-
function
|
|
9327
|
-
|
|
9376
|
+
function Li(e, t = {}) {
|
|
9377
|
+
gi(e, "error", t);
|
|
9328
9378
|
}
|
|
9329
|
-
|
|
9379
|
+
Ii.promise = (e, t, n = {}) => {
|
|
9330
9380
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
9331
|
-
return
|
|
9381
|
+
return Ii(t.loading || "Loading...", {
|
|
9332
9382
|
...n,
|
|
9333
9383
|
variant: "info",
|
|
9334
9384
|
id: r,
|
|
9335
9385
|
duration: 0
|
|
9336
|
-
}), e.then((e) => (
|
|
9386
|
+
}), e.then((e) => (Ii((typeof t.success == "function" ? t.success(e) : t.success) || "Done", {
|
|
9337
9387
|
...n,
|
|
9338
9388
|
variant: "success",
|
|
9339
9389
|
id: r,
|
|
9340
9390
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
9341
9391
|
}), e)).catch((e) => {
|
|
9342
|
-
throw
|
|
9392
|
+
throw Ii((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
9343
9393
|
...n,
|
|
9344
9394
|
variant: "error",
|
|
9345
9395
|
id: r,
|
|
@@ -9349,7 +9399,7 @@ Mi.promise = (e, t, n = {}) => {
|
|
|
9349
9399
|
};
|
|
9350
9400
|
//#endregion
|
|
9351
9401
|
//#region src/lib/usePagination.js
|
|
9352
|
-
function
|
|
9402
|
+
function Ri(e, t = 10) {
|
|
9353
9403
|
let [n, r] = d(1), [i, a] = d(t), s = e.length, c = Math.max(1, Math.ceil(s / i));
|
|
9354
9404
|
o(() => {
|
|
9355
9405
|
n > c && r(c);
|
|
@@ -9375,4 +9425,4 @@ function Pi(e, t = 10) {
|
|
|
9375
9425
|
};
|
|
9376
9426
|
}
|
|
9377
9427
|
//#endregion
|
|
9378
|
-
export {
|
|
9428
|
+
export { ue as AppAccordion, de as AppActionIcon, U as AppAlert, Se as AppAsyncBlock, Zt as AppAutocomplete, rn as AppAvatar, sn as AppAvatarGroup, cn as AppBadge, un as AppBanner, dn as AppBreadcrumbs, ye as AppButton, pn as AppCallout, hn as AppCard, _n as AppCheckbox, vn as AppChip, yn as AppChoiceCard, bn as AppChoiceChip, xn as AppColorField, Sn as AppCompareTable, jn as AppConfirmDialog, Nn as AppCopyButton, Un as AppDataTable, Wn as AppDatePicker, Gn as AppDateRangePicker, qn as AppDescriptions, Xn as AppDropdown, be as AppEmptyState, rr as AppFileAttachment, ar as AppFilePicker, or as AppFloatingDock, sr as AppFormActions, cr as AppFormRow, lr as AppFormSection, V as AppIcon, ur as AppInfoList, Ht as AppInfoTip, Cn as AppInput, hr as AppKpiTile, _r as AppLogoPicker, xr as AppMeter, On as AppModal, Sr as AppMultiSelect, Cr as AppNumberInput, wr as AppOtpInput, Tr as AppPageHeader, Er as AppPagination, Dr as AppPhoneNumberInput, Vt as AppPopover, Or as AppPricingCard, jr as AppProgress, Mr as AppRadio, Nr as AppRepeater, Z as AppRequiredMark, Pr as AppResourceCard, Ir as AppResult, Lr as AppScrollbar, Rr as AppSearch, zr as AppSegmented, Vr as AppSelect, Rn as AppSelectMini, Hr as AppShell, Gr as AppSidebarMenu, Pn as AppSkeleton, Fn as AppSkeletonRows, Kr as AppSlider, xe as AppSpinner, Jr as AppSplash, Yr as AppStatusBadge, Xr as AppStepper, Qr as AppSwitch, $r as AppTableEmptyState, Bn as AppTablePagination, ni as AppTabs, ri as AppTagInput, ii as AppTextarea, si as AppTimePicker, oi as AppTimeline, Ti as AppToast, Di as AppToolbar, ti as AppTooltip, Oi as AppWizard, ki as AppWorkspaceSwitcher, An as MODAL_ICONS, Pi as dismissAll, Li as errorToast, se as iconNames, le as registerIcons, Ii as toast, Ri as usePagination };
|