@webority/ui-react 0.9.4 → 0.9.6
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/AppTextarea.d.ts +2 -0
- 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 +738 -689
- 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, Ee = 300, De = 400;
|
|
605
|
+
function Oe(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 && (r.width >= Ee ? (t.style.minWidth = `${r.width}px`, t.style.width = `${r.width}px`, t.style.maxWidth = `${r.width}px`) : (t.style.minWidth = `${r.width}px`, t.style.width = "max-content", t.style.maxWidth = `${Math.min(De, 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 ke(e, t) {
|
|
613
|
+
Ae(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
|
|
595
614
|
}
|
|
596
|
-
function
|
|
615
|
+
function Ae(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 je = "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[${je}]`);
|
|
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(je, ""), 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 Me = {
|
|
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(Me);
|
|
755
774
|
function K(e, { size: t = 16, className: n = "", style: r = "" } = {}) {
|
|
756
|
-
let i =
|
|
775
|
+
let i = Me[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 Ne(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 Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), Fe = (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
|
+
}, Ie = (e) => {
|
|
793
812
|
if (e == null) return "";
|
|
794
|
-
let t = e[
|
|
813
|
+
let t = e[Pe] ? String(e.label ?? "") : q(e.label), n = Fe(e.icon);
|
|
795
814
|
return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
|
|
796
|
-
},
|
|
815
|
+
}, Le = 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 ? ze(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 = ze(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) => ze(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
|
+
[Pe]: !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="${Re(r)}" aria-label="${Re(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}>
|
|
933
|
+
<input class="search-select-input search-select-ac-input" placeholder="${Re(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="${Re(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) => ze(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,19 +977,19 @@ 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="${Re(n)}" class="search-select-option search-select-option-custom" data-value="${Re(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="${Re(n)}" class="search-select-option${r ? " selected" : ""}" data-value="${Re(e.value)}" aria-selected="${r}">${Ie(e)}</button>`;
|
|
965
984
|
}).join(""), this._active = -1, t.control?.removeAttribute("aria-activedescendant");
|
|
966
985
|
let c = r.length < this._minChars;
|
|
967
|
-
t.hint && (t.hint.hidden = !(this._remote && c && !i.length)), t.empty && (t.empty.hidden = this._loading || o.length > 0 || this._remote && c);
|
|
986
|
+
t.hint && (t.hint.hidden = !(this._remote && c && !i.length)), t.empty && (t.empty.hidden = this._loading || o.length > 0 || this._remote && c), this._reanchor?.();
|
|
968
987
|
}
|
|
969
988
|
_wire() {
|
|
970
989
|
this._teardown();
|
|
971
990
|
let e = this._refs();
|
|
972
991
|
if (!e.control || !e.input) return;
|
|
973
|
-
let t = () =>
|
|
992
|
+
let t = () => Oe(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 : ze(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 = Ne({
|
|
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), ke(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), Ae(this), clearTimeout(this._timer), this._navHandler?.teardown();
|
|
1067
1086
|
}
|
|
1068
1087
|
disconnectedCallback() {
|
|
1069
1088
|
this._teardown();
|
|
1070
1089
|
}
|
|
1071
|
-
},
|
|
1090
|
+
}, Re = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), ze = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), Be = [
|
|
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
|
+
], Ve = [
|
|
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
|
+
], He = (e) => String(e).padStart(2, "0"), Ue = (e, t, n) => `${e}-${He(t + 1)}-${He(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
|
+
}, We = (e) => {
|
|
1100
1119
|
let t = J(e);
|
|
1101
|
-
return t ? `${
|
|
1102
|
-
},
|
|
1120
|
+
return t ? `${He(t.d)} ${Be[t.m].slice(0, 3)} ${t.y}` : "";
|
|
1121
|
+
}, Ge = (e, t) => new Date(e, t + 1, 0).getDate(), Ke = (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
|
+
}, qe = 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 ? We(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 ? We(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, Ge(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 = Ge(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 = Ue(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 = Ke(this._viewY, this._viewM - 1), u = Ge(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 = Ke(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 = Ve.map((t, n) => Ve[(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">${Be[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" : ""}>${Be[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
|
+
Oe(e, t);
|
|
1276
1295
|
}
|
|
1277
1296
|
_setFocus(e, t, n, r) {
|
|
1278
|
-
let { y: i, m: a } =
|
|
1297
|
+
let { y: i, m: a } = Ke(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="${Ue(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 = Ke(t.y, t.m - (e.shiftKey ? 12 : 1));
|
|
1330
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, Ge(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 = Ke(t.y, t.m + (e.shiftKey ? 12 : 1));
|
|
1335
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, Ge(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 = Ue(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 = Ke(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 = Ue(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), ke(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), Ae(this);
|
|
1410
1429
|
}
|
|
1411
1430
|
disconnectedCallback() {
|
|
1412
1431
|
this._teardown();
|
|
1413
1432
|
}
|
|
1414
|
-
},
|
|
1433
|
+
}, Je = 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: `${We(this._start) || "Start"} – ${We(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 = Ge(e, t), a = this._limits(), o = Ve.map((e, t) => Ve[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
|
|
1540
|
+
let i = Ue(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 = Ke(e, t - 1), u = Ge(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 = Ke(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">${Be[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 = Ke(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 ? `${We(this._start)} – ${We(this._end)}` : "Pick an end date" : "Pick a start date");
|
|
1565
1584
|
}
|
|
1566
1585
|
_position(e, t) {
|
|
1567
|
-
|
|
1586
|
+
Oe(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 = Ke(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), ke(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), Ae(this);
|
|
1625
1644
|
}
|
|
1626
1645
|
disconnectedCallback() {
|
|
1627
1646
|
this._teardown();
|
|
1628
1647
|
}
|
|
1629
|
-
},
|
|
1648
|
+
}, Ye = 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 Xe(this.getAttribute("max-scale"), 1.6);
|
|
1651
1670
|
}
|
|
1652
1671
|
_radius() {
|
|
1653
|
-
return
|
|
1672
|
+
return Xe(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
|
+
}, Xe = (e, t) => {
|
|
1679
1698
|
let n = Number.parseFloat(e);
|
|
1680
1699
|
return Number.isFinite(n) ? n : t;
|
|
1681
|
-
},
|
|
1700
|
+
}, Ze = 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
|
+
[Pe]: !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 ? Ie(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="${Qe(a)}" aria-label="${Qe(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="${Qe(a)}" aria-multiselectable="true" tabindex="-1" hidden>
|
|
1806
|
+
${e ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${Qe(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="${Qe(e)}" aria-label="Remove ${Qe($e(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) => $e(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="${
|
|
1830
|
-
}).join(""), n && (n.hidden = i.length > 0), this._active = -1, this.querySelector(".search-select-control")?.removeAttribute("aria-activedescendant");
|
|
1848
|
+
return `<button type="button" role="option" id="${Qe(`${a}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${Qe(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${Ie(e)}</span><span class="ms-check">${K("check")}</span></button>`;
|
|
1849
|
+
}).join(""), n && (n.hidden = i.length > 0), this._active = -1, this.querySelector(".search-select-control")?.removeAttribute("aria-activedescendant"), this._reanchor?.();
|
|
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 = () => Oe(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 = Ne({
|
|
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), ke(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), Ae(this), this._navHandler?.teardown();
|
|
1905
1924
|
}
|
|
1906
1925
|
disconnectedCallback() {
|
|
1907
1926
|
this._teardown(), this._ro?.disconnect(), this._ro = null;
|
|
1908
1927
|
}
|
|
1909
|
-
},
|
|
1928
|
+
}, Qe = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), $e = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), et = /[^0-9]/g, tt = /[^0-9a-zA-Z]/g, nt = 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" ? tt : et, "").slice(0, this.length);
|
|
1941
1960
|
}
|
|
1942
1961
|
constructor() {
|
|
1943
1962
|
super();
|
|
@@ -2028,7 +2047,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
2028
2047
|
disconnectedCallback() {
|
|
2029
2048
|
this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange);
|
|
2030
2049
|
}
|
|
2031
|
-
},
|
|
2050
|
+
}, rt = [
|
|
2032
2051
|
[
|
|
2033
2052
|
"AF",
|
|
2034
2053
|
"Afghanistan",
|
|
@@ -3254,20 +3273,20 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
3254
3273
|
"Zimbabwe",
|
|
3255
3274
|
"263"
|
|
3256
3275
|
]
|
|
3257
|
-
],
|
|
3276
|
+
], it = (e) => (rt.find((t) => t[0] === e) || [
|
|
3258
3277
|
"",
|
|
3259
3278
|
"",
|
|
3260
3279
|
""
|
|
3261
|
-
])[2],
|
|
3262
|
-
function
|
|
3263
|
-
return Y ? Promise.resolve(Y) : (
|
|
3280
|
+
])[2], at = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, Y = null, ot = null;
|
|
3281
|
+
function st() {
|
|
3282
|
+
return Y ? Promise.resolve(Y) : (ot ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (Y = {
|
|
3264
3283
|
AsYouType: e.AsYouType,
|
|
3265
3284
|
getExampleNumber: e.getExampleNumber,
|
|
3266
3285
|
isValidPhoneNumber: e.isValidPhoneNumber,
|
|
3267
3286
|
examples: t.default || t
|
|
3268
|
-
}, Y)).catch(() => null),
|
|
3287
|
+
}, Y)).catch(() => null), ot);
|
|
3269
3288
|
}
|
|
3270
|
-
function
|
|
3289
|
+
function ct(e, t) {
|
|
3271
3290
|
if (!Y || !t) return t;
|
|
3272
3291
|
try {
|
|
3273
3292
|
return new Y.AsYouType(e).input(t);
|
|
@@ -3275,7 +3294,7 @@ function nt(e, t) {
|
|
|
3275
3294
|
return t;
|
|
3276
3295
|
}
|
|
3277
3296
|
}
|
|
3278
|
-
function
|
|
3297
|
+
function lt(e) {
|
|
3279
3298
|
if (!Y) return null;
|
|
3280
3299
|
try {
|
|
3281
3300
|
return Y.getExampleNumber(e, Y.examples)?.formatNational() || null;
|
|
@@ -3283,7 +3302,7 @@ function rt(e) {
|
|
|
3283
3302
|
return null;
|
|
3284
3303
|
}
|
|
3285
3304
|
}
|
|
3286
|
-
function
|
|
3305
|
+
function ut(e) {
|
|
3287
3306
|
if (!Y || !e) return null;
|
|
3288
3307
|
try {
|
|
3289
3308
|
return Y.isValidPhoneNumber(e);
|
|
@@ -3291,7 +3310,7 @@ function it(e) {
|
|
|
3291
3310
|
return null;
|
|
3292
3311
|
}
|
|
3293
3312
|
}
|
|
3294
|
-
function
|
|
3313
|
+
function dt(e) {
|
|
3295
3314
|
if (!Y) return null;
|
|
3296
3315
|
try {
|
|
3297
3316
|
let t = Y.getExampleNumber(e, Y.examples);
|
|
@@ -3300,7 +3319,7 @@ function at(e) {
|
|
|
3300
3319
|
return null;
|
|
3301
3320
|
}
|
|
3302
3321
|
}
|
|
3303
|
-
function
|
|
3322
|
+
function ft(e) {
|
|
3304
3323
|
if (!Y || !e?.trim().startsWith("+")) return null;
|
|
3305
3324
|
try {
|
|
3306
3325
|
let t = new Y.AsYouType();
|
|
@@ -3314,7 +3333,7 @@ function ot(e) {
|
|
|
3314
3333
|
return null;
|
|
3315
3334
|
}
|
|
3316
3335
|
}
|
|
3317
|
-
var
|
|
3336
|
+
var pt = class extends HTMLElement {
|
|
3318
3337
|
static formAssociated = !0;
|
|
3319
3338
|
static get observedAttributes() {
|
|
3320
3339
|
return [
|
|
@@ -3354,13 +3373,13 @@ var st = class extends HTMLElement {
|
|
|
3354
3373
|
this.value = this._defaultValue || "";
|
|
3355
3374
|
}
|
|
3356
3375
|
get value() {
|
|
3357
|
-
return this._national ? `+${
|
|
3376
|
+
return this._national ? `+${it(this._country)}${this._national}` : "";
|
|
3358
3377
|
}
|
|
3359
3378
|
set value(e) {
|
|
3360
|
-
let t = String(e ?? "").trim(), n =
|
|
3379
|
+
let t = String(e ?? "").trim(), n = ft(t);
|
|
3361
3380
|
if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
|
|
3362
3381
|
else if (t.startsWith("+")) {
|
|
3363
|
-
let e = t.replace(/[^0-9]/g, ""), n = String(
|
|
3382
|
+
let e = t.replace(/[^0-9]/g, ""), n = String(it(this._country));
|
|
3364
3383
|
n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
|
|
3365
3384
|
} else this._national = t.replace(/[^0-9]/g, "");
|
|
3366
3385
|
n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._committedValue = this.value, this._syncMirror();
|
|
@@ -3376,25 +3395,25 @@ var st = class extends HTMLElement {
|
|
|
3376
3395
|
}
|
|
3377
3396
|
render() {
|
|
3378
3397
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._country = this.getAttribute("country") || this._country;
|
|
3379
|
-
let e = this.getAttribute("placeholder") ||
|
|
3398
|
+
let e = this.getAttribute("placeholder") || lt(this._country) || "Enter phone number";
|
|
3380
3399
|
this.id ||= `wui-phone-${Math.random().toString(36).slice(2, 9)}`;
|
|
3381
3400
|
let t = `${this.id}-listbox`;
|
|
3382
3401
|
this._listboxId = t;
|
|
3383
|
-
let n =
|
|
3402
|
+
let n = rt.map(([e, n, r], i) => `<button type="button" role="option" id="${mt(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${at(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
|
|
3384
3403
|
this.innerHTML = `
|
|
3385
3404
|
<div class="phone-input-wrap">
|
|
3386
3405
|
<div class="phone-country-adornment">
|
|
3387
|
-
<button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
3388
|
-
<span class="${
|
|
3406
|
+
<button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${mt(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
3407
|
+
<span class="${at(this._country)}" data-flag aria-hidden="true"></span>
|
|
3389
3408
|
${K("chevron-down", { className: "phone-chevron" })}
|
|
3390
|
-
<span class="phone-dial" data-dial>+${
|
|
3409
|
+
<span class="phone-dial" data-dial>+${it(this._country)}</span>
|
|
3391
3410
|
</button>
|
|
3392
|
-
<div class="country-dropdown-menu" role="listbox" id="${
|
|
3393
|
-
<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="${mt(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="${mt(t)}" aria-autocomplete="list" /></div>
|
|
3394
3413
|
<div class="country-list-scroll">${n}<div class="country-empty" hidden>No countries found</div></div>
|
|
3395
3414
|
</div>
|
|
3396
3415
|
</div>
|
|
3397
|
-
<input type="tel" class="input" placeholder="${
|
|
3416
|
+
<input type="tel" class="input" placeholder="${mt(e)}" value="${mt(ct(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${mt(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${mt(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
3398
3417
|
</div>
|
|
3399
3418
|
<div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, G(this, this.value), this._wire();
|
|
3400
3419
|
}
|
|
@@ -3408,7 +3427,7 @@ var st = class extends HTMLElement {
|
|
|
3408
3427
|
this._teardown();
|
|
3409
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]");
|
|
3410
3429
|
if (!e || !n) return;
|
|
3411
|
-
let l = () => !n.hidden, u = () =>
|
|
3430
|
+
let l = () => !n.hidden, u = () => Oe(t || e, n), d = (e) => {
|
|
3412
3431
|
let t = this._visibleItems();
|
|
3413
3432
|
this._active = e;
|
|
3414
3433
|
for (let e of this._itemEls()) e.classList.remove("is-active");
|
|
@@ -3425,12 +3444,12 @@ var st = class extends HTMLElement {
|
|
|
3425
3444
|
}
|
|
3426
3445
|
a && (a.hidden = n > 0);
|
|
3427
3446
|
}, h = (e) => {
|
|
3428
|
-
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 = at(e)), c && (c.textContent = `+${it(e)}`);
|
|
3429
3448
|
for (let t of this._itemEls()) {
|
|
3430
3449
|
let n = t.dataset.iso === e;
|
|
3431
3450
|
t.classList.toggle("selected", n), t.setAttribute("aria-selected", String(n));
|
|
3432
3451
|
}
|
|
3433
|
-
!this.getAttribute("placeholder") && o && (o.placeholder =
|
|
3452
|
+
!this.getAttribute("placeholder") && o && (o.placeholder = lt(e) || "Enter phone number"), o && this._national && (o.value = ct(e, this._national)), p(), this._syncMirror(), this._emitChange(), o?.focus();
|
|
3434
3453
|
}, g = (t) => {
|
|
3435
3454
|
let n = this._visibleItems();
|
|
3436
3455
|
if (t.key === "ArrowDown") {
|
|
@@ -3464,7 +3483,7 @@ var st = class extends HTMLElement {
|
|
|
3464
3483
|
let _ = this.querySelector("[data-phone-error]"), v = (e) => {
|
|
3465
3484
|
if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), _) {
|
|
3466
3485
|
if (e) {
|
|
3467
|
-
let e =
|
|
3486
|
+
let e = lt(this._country);
|
|
3468
3487
|
_.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
|
|
3469
3488
|
}
|
|
3470
3489
|
_.hidden = !e;
|
|
@@ -3472,26 +3491,26 @@ var st = class extends HTMLElement {
|
|
|
3472
3491
|
};
|
|
3473
3492
|
o.addEventListener("input", (e) => {
|
|
3474
3493
|
e.stopPropagation();
|
|
3475
|
-
let t = o.value.replace(/[^0-9]/g, ""), n =
|
|
3494
|
+
let t = o.value.replace(/[^0-9]/g, ""), n = dt(this._country);
|
|
3476
3495
|
n && t.length > n && (t = t.slice(0, n)), this._national = t;
|
|
3477
|
-
let r =
|
|
3478
|
-
o.value !== r && (o.value = r), this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national ||
|
|
3496
|
+
let r = ct(this._country, this._national);
|
|
3497
|
+
o.value !== r && (o.value = r), this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || ut(this.value) === !0) && v(!1);
|
|
3479
3498
|
}), o.addEventListener("change", (e) => e.stopPropagation()), o.addEventListener("blur", () => {
|
|
3480
|
-
v(this._national.length > 0 &&
|
|
3499
|
+
v(this._national.length > 0 && ut(this.value) === !1), this.value !== this._committedValue && this._emitChange();
|
|
3481
3500
|
}), o.addEventListener("paste", (e) => {
|
|
3482
|
-
let t =
|
|
3483
|
-
t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value =
|
|
3501
|
+
let t = ft(e.clipboardData?.getData("text"));
|
|
3502
|
+
t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = ct(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
|
|
3484
3503
|
}), this._bindGlobal = () => {
|
|
3485
3504
|
this._teardownGlobals?.(), this._onDocClick = (e) => {
|
|
3486
3505
|
l() && !this.contains(e.target) && p();
|
|
3487
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
3506
|
+
}, document.addEventListener("click", this._onDocClick), ke(this, () => {
|
|
3488
3507
|
l() && u();
|
|
3489
3508
|
});
|
|
3490
3509
|
}, this._teardownGlobals = () => {
|
|
3491
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
3492
|
-
}, this._bindGlobal(),
|
|
3493
|
-
if (!(!e || !o.isConnected) && (this._national && (o.value =
|
|
3494
|
-
let e =
|
|
3510
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), Ae(this);
|
|
3511
|
+
}, this._bindGlobal(), st().then((e) => {
|
|
3512
|
+
if (!(!e || !o.isConnected) && (this._national && (o.value = ct(this._country, this._national)), !this.getAttribute("placeholder"))) {
|
|
3513
|
+
let e = lt(this._country);
|
|
3495
3514
|
e && (o.placeholder = e);
|
|
3496
3515
|
}
|
|
3497
3516
|
}), this._syncMirror();
|
|
@@ -3502,7 +3521,7 @@ var st = class extends HTMLElement {
|
|
|
3502
3521
|
disconnectedCallback() {
|
|
3503
3522
|
this._teardown();
|
|
3504
3523
|
}
|
|
3505
|
-
},
|
|
3524
|
+
}, mt = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), ht = class extends HTMLElement {
|
|
3506
3525
|
static formAssociated = !0;
|
|
3507
3526
|
static get observedAttributes() {
|
|
3508
3527
|
return [
|
|
@@ -3576,7 +3595,7 @@ var st = class extends HTMLElement {
|
|
|
3576
3595
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
3577
3596
|
label: e.innerHTML,
|
|
3578
3597
|
icon: e.getAttribute("icon") || void 0,
|
|
3579
|
-
[
|
|
3598
|
+
[Pe]: !0,
|
|
3580
3599
|
selected: e.hasAttribute("selected")
|
|
3581
3600
|
})));
|
|
3582
3601
|
}
|
|
@@ -3591,19 +3610,19 @@ var st = class extends HTMLElement {
|
|
|
3591
3610
|
this._listboxId = u;
|
|
3592
3611
|
let d = e.map((e, t) => {
|
|
3593
3612
|
let n = String(e.value) === String(this._value);
|
|
3594
|
-
return `<button type="button" role="option" id="${
|
|
3613
|
+
return `<button type="button" role="option" id="${gt(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${gt(e.value)}" aria-selected="${n}">${Ie(e)}</button>`;
|
|
3595
3614
|
}).join("");
|
|
3596
3615
|
this.innerHTML = `
|
|
3597
3616
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
|
|
3598
|
-
<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="${gt(u)}" aria-label="${gt(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
3599
3618
|
${a ? K(a, { className: "search-select-icon" }) : ""}
|
|
3600
3619
|
${o ? `<span class="search-select-prefix">${q(o)}</span>` : ""}
|
|
3601
|
-
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ?
|
|
3620
|
+
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? Ie(l) : q(s)}</span>
|
|
3602
3621
|
${n ? `<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${K("x")}</span>` : ""}
|
|
3603
3622
|
${K("chevron-down", { className: "search-select-caret" })}
|
|
3604
3623
|
</button>
|
|
3605
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
3606
|
-
${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="${gt(u)}" tabindex="-1" hidden>
|
|
3625
|
+
${t ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${gt(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${K("x")}</button></div>` : ""}
|
|
3607
3626
|
<div class="search-select-options">${d}<div class="search-select-empty" hidden>No matches</div></div>
|
|
3608
3627
|
</div>
|
|
3609
3628
|
</div>`, this._rendered = !0, G(this, this._value), this._wire(), this._syncReset();
|
|
@@ -3632,7 +3651,7 @@ var st = class extends HTMLElement {
|
|
|
3632
3651
|
let t = e.dataset.value === String(this._value);
|
|
3633
3652
|
e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
|
|
3634
3653
|
}
|
|
3635
|
-
e && (e.innerHTML = t ?
|
|
3654
|
+
e && (e.innerHTML = t ? Ie(t) : q(this.getAttribute("placeholder") || "Select..."), e.classList.toggle("search-select-placeholder", !t));
|
|
3636
3655
|
}
|
|
3637
3656
|
_syncReset() {
|
|
3638
3657
|
let { reset: e } = this._refs();
|
|
@@ -3645,20 +3664,20 @@ var st = class extends HTMLElement {
|
|
|
3645
3664
|
let t = () => {
|
|
3646
3665
|
if (this.hasAttribute("compact")) {
|
|
3647
3666
|
let t = e.control.getBoundingClientRect();
|
|
3648
|
-
e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px",
|
|
3649
|
-
} else
|
|
3667
|
+
e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", Oe(e.control, e.menu);
|
|
3668
|
+
} else Oe(e.control, e.menu, { matchWidth: !0 });
|
|
3650
3669
|
}, n = (t) => {
|
|
3651
3670
|
let n = this._visible();
|
|
3652
3671
|
this._active = t;
|
|
3653
3672
|
for (let e of this._optionEls()) e.classList.remove("is-active");
|
|
3654
3673
|
t >= 0 && n[t] ? (n[t].classList.add("is-active"), n[t].scrollIntoView({ block: "nearest" }), e.control.setAttribute("aria-activedescendant", n[t].id)) : e.control.removeAttribute("aria-activedescendant");
|
|
3655
|
-
}, r = (
|
|
3656
|
-
let
|
|
3674
|
+
}, r = (n) => {
|
|
3675
|
+
let r = n.trim().toLowerCase(), i = 0;
|
|
3657
3676
|
for (let e of this._optionEls()) {
|
|
3658
|
-
let t = !
|
|
3659
|
-
e.hidden = !t, t && (
|
|
3677
|
+
let t = !r || e.textContent.toLowerCase().includes(r);
|
|
3678
|
+
e.hidden = !t, t && (i += 1);
|
|
3660
3679
|
}
|
|
3661
|
-
e.empty && (e.empty.hidden =
|
|
3680
|
+
e.empty && (e.empty.hidden = i > 0), e.clear && (e.clear.hidden = !r), e.menu.hidden || t();
|
|
3662
3681
|
}, i = () => !e.menu.hidden, a = () => {
|
|
3663
3682
|
e.menu.hidden = !1, e.control.setAttribute("aria-expanded", "true"), e.control.classList.add("open"), t(), e.search && (e.search.value = "", r(""), e.search.focus()), n(this._optionEls().findIndex((e) => e.classList.contains("selected")));
|
|
3664
3683
|
}, o = () => {
|
|
@@ -3666,7 +3685,7 @@ var st = class extends HTMLElement {
|
|
|
3666
3685
|
}, s = (t) => {
|
|
3667
3686
|
this.value = t.dataset.value, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.control.focus();
|
|
3668
3687
|
};
|
|
3669
|
-
this._navHandler =
|
|
3688
|
+
this._navHandler = Ne({
|
|
3670
3689
|
getVisibleOptions: () => this._visible(),
|
|
3671
3690
|
getActive: () => this._active,
|
|
3672
3691
|
setActive: (e) => n(e),
|
|
@@ -3697,18 +3716,18 @@ var st = class extends HTMLElement {
|
|
|
3697
3716
|
}), e.menu.addEventListener("keydown", this._navHandler.handler), this._bindGlobal = () => {
|
|
3698
3717
|
this._teardown(), this._onDocClick = (e) => {
|
|
3699
3718
|
i() && !this.contains(e.target) && o();
|
|
3700
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
3719
|
+
}, document.addEventListener("click", this._onDocClick), ke(this, () => {
|
|
3701
3720
|
i() && t();
|
|
3702
3721
|
});
|
|
3703
3722
|
}, this._bindGlobal();
|
|
3704
3723
|
}
|
|
3705
3724
|
_teardown() {
|
|
3706
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
3725
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), Ae(this), this._navHandler?.teardown();
|
|
3707
3726
|
}
|
|
3708
3727
|
disconnectedCallback() {
|
|
3709
3728
|
this._teardown();
|
|
3710
3729
|
}
|
|
3711
|
-
},
|
|
3730
|
+
}, gt = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), _t = class extends HTMLElement {
|
|
3712
3731
|
static formAssociated = !0;
|
|
3713
3732
|
static get observedAttributes() {
|
|
3714
3733
|
return [
|
|
@@ -3748,19 +3767,19 @@ var st = class extends HTMLElement {
|
|
|
3748
3767
|
return this._value;
|
|
3749
3768
|
}
|
|
3750
3769
|
set value(e) {
|
|
3751
|
-
this._value = this._snapToStep(this._clamp(
|
|
3770
|
+
this._value = this._snapToStep(this._clamp(vt(e, this._value))), this._syncValue(), this._syncMirrors();
|
|
3752
3771
|
}
|
|
3753
3772
|
get start() {
|
|
3754
3773
|
return this._start;
|
|
3755
3774
|
}
|
|
3756
3775
|
set start(e) {
|
|
3757
|
-
this._start = Math.min(this._snapToStep(this._clamp(
|
|
3776
|
+
this._start = Math.min(this._snapToStep(this._clamp(vt(e, this._start))), this._end), this._syncValue(), this._syncMirrors();
|
|
3758
3777
|
}
|
|
3759
3778
|
get end() {
|
|
3760
3779
|
return this._end;
|
|
3761
3780
|
}
|
|
3762
3781
|
set end(e) {
|
|
3763
|
-
this._end = Math.max(this._snapToStep(this._clamp(
|
|
3782
|
+
this._end = Math.max(this._snapToStep(this._clamp(vt(e, this._end))), this._start), this._syncValue(), this._syncMirrors();
|
|
3764
3783
|
}
|
|
3765
3784
|
attributeChangedCallback(e, t, n) {
|
|
3766
3785
|
if (e === "value" || e === "start" || e === "end" || e === "min" || e === "max" || e === "step") {
|
|
@@ -3773,19 +3792,19 @@ var st = class extends HTMLElement {
|
|
|
3773
3792
|
this._isRange() ? this._resetRange() : this._resetSingle();
|
|
3774
3793
|
}
|
|
3775
3794
|
_updateFromAttribute(e) {
|
|
3776
|
-
e === "value" ? this._value = this._snapToStep(this._clamp(
|
|
3795
|
+
e === "value" ? this._value = this._snapToStep(this._clamp(vt(this.getAttribute("value"), this._value))) : e === "start" ? this._start = this._snapToStep(this._clamp(vt(this.getAttribute("start"), this._start))) : e === "end" && (this._end = this._snapToStep(this._clamp(vt(this.getAttribute("end"), this._end))));
|
|
3777
3796
|
}
|
|
3778
3797
|
_isRange() {
|
|
3779
3798
|
return this.hasAttribute("range");
|
|
3780
3799
|
}
|
|
3781
3800
|
_min() {
|
|
3782
|
-
return
|
|
3801
|
+
return vt(this.getAttribute("min"), 0);
|
|
3783
3802
|
}
|
|
3784
3803
|
_max() {
|
|
3785
|
-
return
|
|
3804
|
+
return vt(this.getAttribute("max"), 100);
|
|
3786
3805
|
}
|
|
3787
3806
|
_step() {
|
|
3788
|
-
return
|
|
3807
|
+
return vt(this.getAttribute("step"), 1);
|
|
3789
3808
|
}
|
|
3790
3809
|
_clamp(e) {
|
|
3791
3810
|
return Math.max(this._min(), Math.min(e, this._max()));
|
|
@@ -3850,7 +3869,7 @@ var st = class extends HTMLElement {
|
|
|
3850
3869
|
aria-valuenow="${this._value}"
|
|
3851
3870
|
aria-valuetext="${this._formatValue(this._value)}"
|
|
3852
3871
|
${a ? "disabled" : ""}
|
|
3853
|
-
aria-label="${
|
|
3872
|
+
aria-label="${yt(this.getAttribute("aria-label") || "Value")}"
|
|
3854
3873
|
></button>
|
|
3855
3874
|
`}
|
|
3856
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>` : ""}
|
|
@@ -3950,10 +3969,10 @@ var st = class extends HTMLElement {
|
|
|
3950
3969
|
disconnectedCallback() {
|
|
3951
3970
|
this._teardown();
|
|
3952
3971
|
}
|
|
3953
|
-
},
|
|
3972
|
+
}, vt = (e, t) => {
|
|
3954
3973
|
let n = Number.parseFloat(e);
|
|
3955
3974
|
return Number.isFinite(n) ? n : t;
|
|
3956
|
-
},
|
|
3975
|
+
}, yt = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), bt = class extends HTMLElement {
|
|
3957
3976
|
static formAssociated = !0;
|
|
3958
3977
|
_accessibleName() {
|
|
3959
3978
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Add tags";
|
|
@@ -4026,7 +4045,7 @@ var st = class extends HTMLElement {
|
|
|
4026
4045
|
G(this, this._values.join(",")), this.innerHTML = `
|
|
4027
4046
|
<div class="search-select${t}">
|
|
4028
4047
|
<div class="input search-select-control search-select-multi"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
|
|
4029
|
-
<input type="text" class="ms-input" data-input aria-label="${
|
|
4048
|
+
<input type="text" class="ms-input" data-input aria-label="${St(this._accessibleName())}" placeholder="${St(this.getAttribute("placeholder") || "Add…")}" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""}/>
|
|
4030
4049
|
<div class="ms-chips" data-chips></div>
|
|
4031
4050
|
</div>
|
|
4032
4051
|
</div>`, this._rendered = !0, G(this, this._values.join(",")), this._renderControl(), this._wire();
|
|
@@ -4038,7 +4057,7 @@ var st = class extends HTMLElement {
|
|
|
4038
4057
|
e.innerHTML = "";
|
|
4039
4058
|
return;
|
|
4040
4059
|
}
|
|
4041
|
-
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">${xt(e)}</span><button type="button" class="chip-remove" data-remove="${St(e)}" aria-label="Remove ${St(e)}">${K("x")}</button></span>`).join("");
|
|
4042
4061
|
}
|
|
4043
4062
|
}
|
|
4044
4063
|
_wire() {
|
|
@@ -4109,18 +4128,18 @@ var st = class extends HTMLElement {
|
|
|
4109
4128
|
disconnectedCallback() {
|
|
4110
4129
|
this._teardown();
|
|
4111
4130
|
}
|
|
4112
|
-
},
|
|
4131
|
+
}, xt = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), St = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), Ct = (e) => String(e).padStart(2, "0"), wt = (e, t) => `${Ct(e)}:${Ct(t)}`, Tt = (e) => {
|
|
4113
4132
|
let t = /^(\d{2}):(\d{2})$/.exec(e || "");
|
|
4114
4133
|
return t ? {
|
|
4115
4134
|
h: +t[1],
|
|
4116
4135
|
m: +t[2]
|
|
4117
4136
|
} : null;
|
|
4118
|
-
},
|
|
4137
|
+
}, Et = (e, t = "24") => {
|
|
4119
4138
|
if (!e) return "";
|
|
4120
|
-
if (t === "24") return
|
|
4139
|
+
if (t === "24") return wt(e.h, e.m);
|
|
4121
4140
|
let n = e.h % 12 || 12, r = e.h >= 12 ? "PM" : "AM";
|
|
4122
|
-
return `${n}:${
|
|
4123
|
-
},
|
|
4141
|
+
return `${n}:${Ct(e.m)} ${r}`;
|
|
4142
|
+
}, Dt = class extends HTMLElement {
|
|
4124
4143
|
static formAssociated = !0;
|
|
4125
4144
|
static get observedAttributes() {
|
|
4126
4145
|
return [
|
|
@@ -4167,11 +4186,11 @@ var st = class extends HTMLElement {
|
|
|
4167
4186
|
}
|
|
4168
4187
|
render() {
|
|
4169
4188
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
|
|
4170
|
-
let e = this.getAttribute("placeholder") || "Select time", t =
|
|
4189
|
+
let e = this.getAttribute("placeholder") || "Select time", t = Tt(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");
|
|
4171
4190
|
this.innerHTML = `
|
|
4172
4191
|
<div class="timepicker">
|
|
4173
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)}"` : ""}>
|
|
4174
|
-
<span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ?
|
|
4193
|
+
<span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? Et(t, n) : q(e)}</span>
|
|
4175
4194
|
${K("clock")}
|
|
4176
4195
|
</button>
|
|
4177
4196
|
<div class="timepicker-pop" role="listbox" tabindex="-1" hidden></div>
|
|
@@ -4183,14 +4202,14 @@ var st = class extends HTMLElement {
|
|
|
4183
4202
|
_syncTrigger() {
|
|
4184
4203
|
let e = this.querySelector(".timepicker-trigger"), t = this.querySelector("[data-trigger-label]");
|
|
4185
4204
|
if (!t) return;
|
|
4186
|
-
let n =
|
|
4187
|
-
t.textContent = n ?
|
|
4205
|
+
let n = Tt(this._value), r = this.getAttribute("format") || "24";
|
|
4206
|
+
t.textContent = n ? Et(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
|
|
4188
4207
|
}
|
|
4189
4208
|
_buildTimes() {
|
|
4190
|
-
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 = Tt(t) || {
|
|
4191
4210
|
h: 0,
|
|
4192
4211
|
m: 0
|
|
4193
|
-
}, i =
|
|
4212
|
+
}, i = Tt(n) || {
|
|
4194
4213
|
h: 23,
|
|
4195
4214
|
m: 59
|
|
4196
4215
|
}, a = [], o = r.h, s = r.m;
|
|
@@ -4203,10 +4222,10 @@ var st = class extends HTMLElement {
|
|
|
4203
4222
|
_renderOptions() {
|
|
4204
4223
|
let e = this.querySelector(".timepicker-pop");
|
|
4205
4224
|
if (!e) return;
|
|
4206
|
-
let t = this.getAttribute("format") || "24", n = this._buildTimes(), r =
|
|
4225
|
+
let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = Tt(this._value), i = this._focus, a = "";
|
|
4207
4226
|
for (let e = 0; e < n.length; e++) {
|
|
4208
|
-
let o = n[e], s =
|
|
4209
|
-
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 = wt(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\"" : ""}>${Et(o, t)}</button>`;
|
|
4210
4229
|
}
|
|
4211
4230
|
e.innerHTML = a, this._focusActive();
|
|
4212
4231
|
}
|
|
@@ -4215,7 +4234,7 @@ var st = class extends HTMLElement {
|
|
|
4215
4234
|
t && !e.hidden && t.focus();
|
|
4216
4235
|
}
|
|
4217
4236
|
_position(e, t) {
|
|
4218
|
-
|
|
4237
|
+
Oe(e, t);
|
|
4219
4238
|
}
|
|
4220
4239
|
_onKey(e) {
|
|
4221
4240
|
let t = [...this.querySelector(".timepicker-pop").querySelectorAll(".timepicker-option")];
|
|
@@ -4293,18 +4312,18 @@ var st = class extends HTMLElement {
|
|
|
4293
4312
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
4294
4313
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
4295
4314
|
r() && e.key === "Escape" && this._close();
|
|
4296
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
4315
|
+
}, document.addEventListener("keydown", this._onDocKey), ke(this, () => {
|
|
4297
4316
|
r() && this._position(e, t);
|
|
4298
4317
|
});
|
|
4299
4318
|
}, this._bindGlobal(), this._syncFormValue();
|
|
4300
4319
|
}
|
|
4301
4320
|
_teardown() {
|
|
4302
|
-
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), Ae(this), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
|
|
4303
4322
|
}
|
|
4304
4323
|
disconnectedCallback() {
|
|
4305
4324
|
this._teardown();
|
|
4306
4325
|
}
|
|
4307
|
-
},
|
|
4326
|
+
}, Ot = "wui-wizard-step", kt = class extends HTMLElement {
|
|
4308
4327
|
static get observedAttributes() {
|
|
4309
4328
|
return [
|
|
4310
4329
|
"active",
|
|
@@ -4338,7 +4357,7 @@ var st = class extends HTMLElement {
|
|
|
4338
4357
|
this._beforeNext = typeof e == "function" ? e : null;
|
|
4339
4358
|
}
|
|
4340
4359
|
get _steps() {
|
|
4341
|
-
return [...this.querySelectorAll(`:scope > ${
|
|
4360
|
+
return [...this.querySelectorAll(`:scope > ${Ot}`)];
|
|
4342
4361
|
}
|
|
4343
4362
|
refresh() {
|
|
4344
4363
|
this._rendered && this._renderChrome();
|
|
@@ -4397,13 +4416,13 @@ var st = class extends HTMLElement {
|
|
|
4397
4416
|
return e.map((e, r) => {
|
|
4398
4417
|
let a = this._stepStatus(e, r), o = e.getAttribute("label") || "", s = e.getAttribute("description") || "", c = e.getAttribute("icon") || "", l = r + 1, u;
|
|
4399
4418
|
u = a === "done" ? K("check") : a === "error" ? K("alert-triangle") : a === "skipped" ? K("minus") : c ? K(c) : String(l);
|
|
4400
|
-
let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", p = i || r < this._active, m = s ? `<span class="step-desc">${
|
|
4401
|
-
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">${At(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">${At(o)}</span>${m}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${At(o)}</span>${m}` : `<span class="step-circle">${u}</span><span class="step-label">${At(o)}</span>${m}`, p ? `<button type="button" class="${d}" data-step="${r}"${f}>${h}</button>` : `<div class="${d}"${f}>${h}</div>`;
|
|
4402
4421
|
}).join("");
|
|
4403
4422
|
}
|
|
4404
4423
|
_footerHtml(e) {
|
|
4405
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";
|
|
4406
|
-
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" })}${At(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${At(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${At(o)}${K("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${At(c)}</button>`}</span>`;
|
|
4407
4426
|
}
|
|
4408
4427
|
_wire() {
|
|
4409
4428
|
this._teardown(), this._onHeaderClick = (e) => {
|
|
@@ -4471,7 +4490,7 @@ var st = class extends HTMLElement {
|
|
|
4471
4490
|
_reflectActive(e) {
|
|
4472
4491
|
this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
|
|
4473
4492
|
}
|
|
4474
|
-
},
|
|
4493
|
+
}, At = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), jt = class extends HTMLElement {
|
|
4475
4494
|
static get observedAttributes() {
|
|
4476
4495
|
return [
|
|
4477
4496
|
"label",
|
|
@@ -4485,14 +4504,14 @@ var st = class extends HTMLElement {
|
|
|
4485
4504
|
let e = this.closest("wui-wizard");
|
|
4486
4505
|
e && typeof e.refresh == "function" && e.refresh();
|
|
4487
4506
|
}
|
|
4488
|
-
},
|
|
4507
|
+
}, Mt = "image/png,image/jpeg,image/webp", Nt = {
|
|
4489
4508
|
"image/png": [".png"],
|
|
4490
4509
|
"image/jpeg": [".jpg", ".jpeg"],
|
|
4491
4510
|
"image/webp": [".webp"],
|
|
4492
4511
|
"image/gif": [".gif"],
|
|
4493
4512
|
"image/svg+xml": [".svg"],
|
|
4494
4513
|
"application/pdf": [".pdf"]
|
|
4495
|
-
},
|
|
4514
|
+
}, Pt = {
|
|
4496
4515
|
"image/png": "PNG",
|
|
4497
4516
|
"image/jpeg": "JPG",
|
|
4498
4517
|
"image/webp": "WEBP",
|
|
@@ -4506,7 +4525,7 @@ var st = class extends HTMLElement {
|
|
|
4506
4525
|
".gif": "GIF",
|
|
4507
4526
|
".svg": "SVG",
|
|
4508
4527
|
".pdf": "PDF"
|
|
4509
|
-
},
|
|
4528
|
+
}, Ft = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), It = [
|
|
4510
4529
|
".png",
|
|
4511
4530
|
".jpg",
|
|
4512
4531
|
".jpeg",
|
|
@@ -4517,46 +4536,46 @@ var st = class extends HTMLElement {
|
|
|
4517
4536
|
".avif",
|
|
4518
4537
|
".heic"
|
|
4519
4538
|
];
|
|
4520
|
-
function
|
|
4539
|
+
function Lt(e) {
|
|
4521
4540
|
if (!e) return !1;
|
|
4522
4541
|
let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
|
|
4523
4542
|
if (t) return t.startsWith("image/");
|
|
4524
4543
|
let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
|
|
4525
|
-
return
|
|
4544
|
+
return It.some((e) => r.endsWith(e));
|
|
4526
4545
|
}
|
|
4527
|
-
function
|
|
4528
|
-
let t =
|
|
4529
|
-
return t.length ? t.every((e) => e.startsWith(".") ?
|
|
4546
|
+
function Rt(e) {
|
|
4547
|
+
let t = Ft(e);
|
|
4548
|
+
return t.length ? t.every((e) => e.startsWith(".") ? It.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
|
|
4530
4549
|
}
|
|
4531
|
-
function
|
|
4550
|
+
function zt(e) {
|
|
4532
4551
|
let t = [];
|
|
4533
|
-
for (let n of
|
|
4534
|
-
let e =
|
|
4552
|
+
for (let n of Ft(e)) {
|
|
4553
|
+
let e = Pt[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
4535
4554
|
t.includes(e) || t.push(e);
|
|
4536
4555
|
}
|
|
4537
4556
|
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
4538
4557
|
}
|
|
4539
|
-
function
|
|
4540
|
-
let n =
|
|
4558
|
+
function Bt(e, t) {
|
|
4559
|
+
let n = Ft(t);
|
|
4541
4560
|
if (!n.length) return !0;
|
|
4542
4561
|
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
4543
|
-
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 && (Nt[e] || []).some((e) => i.endsWith(e)));
|
|
4544
4563
|
}
|
|
4545
|
-
function
|
|
4564
|
+
function Vt(e, t = {}) {
|
|
4546
4565
|
if (!e) return null;
|
|
4547
|
-
let n = t.accept === void 0 ?
|
|
4548
|
-
return
|
|
4566
|
+
let n = t.accept === void 0 ? Mt : t.accept, r = t.maxSizeMb || 5;
|
|
4567
|
+
return Bt(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${zt(n)} file.`;
|
|
4549
4568
|
}
|
|
4550
4569
|
var X = (e, t) => {
|
|
4551
4570
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
4552
4571
|
};
|
|
4553
|
-
function
|
|
4554
|
-
X("wui-select",
|
|
4572
|
+
function Ht() {
|
|
4573
|
+
X("wui-select", ht), X("wui-phone", pt), X("wui-datepicker", qe), X("wui-date-range", Je), X("wui-dock", Ye), X("wui-slider", _t), X("wui-timepicker", Dt), X("wui-autocomplete", Le), X("wui-multiselect", Ze), X("wui-taginput", bt), X("wui-otp", nt), X("wui-status-icon", we), X("wui-wizard-step", jt), X("wui-wizard", kt);
|
|
4555
4574
|
}
|
|
4556
|
-
|
|
4575
|
+
Ht();
|
|
4557
4576
|
//#endregion
|
|
4558
4577
|
//#region src/components/AppPopover.jsx
|
|
4559
|
-
function
|
|
4578
|
+
function Ut({ trigger: e, children: t, title: r, placement: i = "bottom", triggerType: a = "click", onToggle: o, className: c = "", ...l }) {
|
|
4560
4579
|
N("AppPopover", l);
|
|
4561
4580
|
let u = s(), [f, h] = d(!1), g = (e) => {
|
|
4562
4581
|
h(e), o?.(e);
|
|
@@ -4591,13 +4610,13 @@ function Lt({ trigger: e, children: t, title: r, placement: i = "bottom", trigge
|
|
|
4591
4610
|
}
|
|
4592
4611
|
//#endregion
|
|
4593
4612
|
//#region src/components/AppInfoTip.jsx
|
|
4594
|
-
function
|
|
4613
|
+
function Wt({ label: e, children: t, placement: n = "auto", className: r = "", ...i }) {
|
|
4595
4614
|
N("AppInfoTip", i);
|
|
4596
4615
|
let [a, o] = d(!1), s = !!e;
|
|
4597
4616
|
return !s && !t ? null : /* @__PURE__ */ p("span", {
|
|
4598
4617
|
className: `infotip${r ? ` ${r}` : ""}`,
|
|
4599
4618
|
...i,
|
|
4600
|
-
children: /* @__PURE__ */ p(
|
|
4619
|
+
children: /* @__PURE__ */ p(Ut, {
|
|
4601
4620
|
trigger: /* @__PURE__ */ p("button", {
|
|
4602
4621
|
type: "button",
|
|
4603
4622
|
className: "infotip-btn",
|
|
@@ -4627,70 +4646,96 @@ function Z() {
|
|
|
4627
4646
|
}
|
|
4628
4647
|
//#endregion
|
|
4629
4648
|
//#region src/components/useWuiControl.js
|
|
4630
|
-
function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events:
|
|
4631
|
-
let
|
|
4632
|
-
|
|
4649
|
+
function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events: s = Gt, on: c, syncDeps: l = [] } = {}) {
|
|
4650
|
+
let d = u(null), f = r ?? Kt, p = i ?? qt, m = (s || Gt).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
|
|
4633
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") : Gt, 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]);
|
|
4634
4686
|
return o(() => {
|
|
4635
|
-
let e =
|
|
4636
|
-
!e || t === void 0 ||
|
|
4687
|
+
let e = d.current;
|
|
4688
|
+
!e || t === void 0 || p(e, t);
|
|
4637
4689
|
}, [
|
|
4638
4690
|
t,
|
|
4639
|
-
|
|
4640
|
-
...
|
|
4691
|
+
p,
|
|
4692
|
+
...l
|
|
4641
4693
|
]), o(() => {
|
|
4642
|
-
let e =
|
|
4643
|
-
|
|
4644
|
-
let t = f ? f.split("\0") : zt, r, i = () => {
|
|
4645
|
-
let t = l(e);
|
|
4646
|
-
Object.is(t, r) || (r = t, n?.(t));
|
|
4647
|
-
};
|
|
4648
|
-
for (let n of t) e.addEventListener(n, i);
|
|
4649
|
-
return () => {
|
|
4650
|
-
for (let n of t) e.removeEventListener(n, i);
|
|
4651
|
-
};
|
|
4694
|
+
let e = d.current, t = _.current;
|
|
4695
|
+
!e || !t || (t.names.join("\0") !== (m || Gt.join("\0")) || t.extraNames.join("\0") !== h) && (v(), y(e));
|
|
4652
4696
|
}, [
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4697
|
+
m,
|
|
4698
|
+
h,
|
|
4699
|
+
v,
|
|
4700
|
+
y
|
|
4656
4701
|
]), {
|
|
4657
|
-
setRef:
|
|
4658
|
-
innerRef:
|
|
4702
|
+
setRef: b,
|
|
4703
|
+
innerRef: d
|
|
4659
4704
|
};
|
|
4660
4705
|
}
|
|
4661
|
-
var
|
|
4662
|
-
function
|
|
4706
|
+
var Gt = ["change"];
|
|
4707
|
+
function Kt(e) {
|
|
4663
4708
|
return e.value;
|
|
4664
4709
|
}
|
|
4665
|
-
function
|
|
4710
|
+
function qt(e, t) {
|
|
4666
4711
|
let n = t ?? "";
|
|
4667
4712
|
String(e.value ?? "") !== String(n) && (e.value = n);
|
|
4668
4713
|
}
|
|
4669
|
-
function
|
|
4714
|
+
function Jt(e, t) {
|
|
4670
4715
|
let n = e || [], r = t || [];
|
|
4671
4716
|
return n.length === r.length && n.every((e, t) => e?.value === r[t]?.value && e?.label === r[t]?.label);
|
|
4672
4717
|
}
|
|
4673
|
-
function
|
|
4718
|
+
function Yt(e) {
|
|
4674
4719
|
return e.values;
|
|
4675
4720
|
}
|
|
4676
|
-
function
|
|
4721
|
+
function Xt(e, t) {
|
|
4677
4722
|
let n = t || [], r = e.values || [];
|
|
4678
4723
|
(n.length !== r.length || !n.every((e, t) => e === r[t])) && (e.values = n);
|
|
4679
4724
|
}
|
|
4680
|
-
function
|
|
4725
|
+
function Zt(e) {
|
|
4681
4726
|
return {
|
|
4682
4727
|
start: e.start,
|
|
4683
4728
|
end: e.end
|
|
4684
4729
|
};
|
|
4685
4730
|
}
|
|
4686
|
-
function
|
|
4731
|
+
function Qt(e, t) {
|
|
4687
4732
|
if (t === void 0) return;
|
|
4688
4733
|
let n = Number.parseFloat(t);
|
|
4689
4734
|
Number.isFinite(n) && e.value !== n && (e.value = n);
|
|
4690
4735
|
}
|
|
4691
4736
|
//#endregion
|
|
4692
4737
|
//#region src/components/AppAutocomplete.jsx
|
|
4693
|
-
var
|
|
4738
|
+
var $t = 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) {
|
|
4694
4739
|
N("AppAutocomplete", S);
|
|
4695
4740
|
let w = typeof r == "function", T = s(), E = f || T, { setRef: D, innerRef: O } = Q({
|
|
4696
4741
|
ref: C,
|
|
@@ -4739,7 +4784,7 @@ var qt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
4739
4784
|
children: [
|
|
4740
4785
|
h,
|
|
4741
4786
|
v && /* @__PURE__ */ p(Z, {}),
|
|
4742
|
-
y && /* @__PURE__ */ p(
|
|
4787
|
+
y && /* @__PURE__ */ p(Wt, {
|
|
4743
4788
|
label: b,
|
|
4744
4789
|
children: y
|
|
4745
4790
|
})
|
|
@@ -4773,14 +4818,14 @@ var qt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
4773
4818
|
}) : null
|
|
4774
4819
|
]
|
|
4775
4820
|
});
|
|
4776
|
-
}),
|
|
4821
|
+
}), en = /* @__PURE__ */ new Set([
|
|
4777
4822
|
"xs",
|
|
4778
4823
|
"sm",
|
|
4779
4824
|
"md",
|
|
4780
4825
|
"lg",
|
|
4781
4826
|
"xl",
|
|
4782
4827
|
"2xl"
|
|
4783
|
-
]),
|
|
4828
|
+
]), tn = {
|
|
4784
4829
|
xs: 20,
|
|
4785
4830
|
sm: 24,
|
|
4786
4831
|
md: 32,
|
|
@@ -4788,30 +4833,30 @@ var qt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
4788
4833
|
xl: 64,
|
|
4789
4834
|
"2xl": 96
|
|
4790
4835
|
};
|
|
4791
|
-
function
|
|
4836
|
+
function nn(e) {
|
|
4792
4837
|
let t = (e || "").trim();
|
|
4793
4838
|
if (!t) return "?";
|
|
4794
4839
|
let n = t.split(/\s+/).filter(Boolean);
|
|
4795
4840
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
4796
4841
|
}
|
|
4797
|
-
function
|
|
4842
|
+
function rn(e) {
|
|
4798
4843
|
let t = e || "", n = 0;
|
|
4799
4844
|
for (let e = 0; e < t.length; e += 1) n = Math.imul(n, 31) + t.charCodeAt(e) >>> 0;
|
|
4800
4845
|
return n % 360;
|
|
4801
4846
|
}
|
|
4802
|
-
function
|
|
4847
|
+
function an(e) {
|
|
4803
4848
|
if (typeof e == "number") return e;
|
|
4804
|
-
if (
|
|
4849
|
+
if (tn[e] != null) return tn[e];
|
|
4805
4850
|
let t = Number.parseInt(e, 10);
|
|
4806
4851
|
return Number.isNaN(t) ? 32 : t;
|
|
4807
4852
|
}
|
|
4808
|
-
function
|
|
4853
|
+
function on({ 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 }) {
|
|
4809
4854
|
N("AppAvatar", y);
|
|
4810
4855
|
let { style: b, ...x } = y, [S, C] = d(!1);
|
|
4811
4856
|
o(() => {
|
|
4812
4857
|
C(!1);
|
|
4813
4858
|
}, [t]);
|
|
4814
|
-
let w = typeof n == "string" &&
|
|
4859
|
+
let w = typeof n == "string" && en.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 = [
|
|
4815
4860
|
"avatar",
|
|
4816
4861
|
w && n !== "md" ? `avatar-${n}` : "",
|
|
4817
4862
|
r === "circle" ? "" : `avatar-${r}`,
|
|
@@ -4820,16 +4865,16 @@ function $t({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
4820
4865
|
E ? "avatar-clickable" : "",
|
|
4821
4866
|
v
|
|
4822
4867
|
].filter(Boolean).join(" "), k = {};
|
|
4823
|
-
T && (k["--avatar-size"] = T), i === "auto" && (k["--avatar-hue"] =
|
|
4868
|
+
T && (k["--avatar-size"] = T), i === "auto" && (k["--avatar-hue"] = rn(e));
|
|
4824
4869
|
let A = Object.keys(k).length || b ? {
|
|
4825
4870
|
...k,
|
|
4826
4871
|
...b
|
|
4827
4872
|
} : void 0, j = /* @__PURE__ */ p("span", {
|
|
4828
4873
|
className: "avatar-face",
|
|
4829
4874
|
"aria-hidden": "true",
|
|
4830
|
-
children: l == null ?
|
|
4875
|
+
children: l == null ? nn(e) : /* @__PURE__ */ p(V, {
|
|
4831
4876
|
name: l,
|
|
4832
|
-
size: Math.round(
|
|
4877
|
+
size: Math.round(an(n) * .55)
|
|
4833
4878
|
})
|
|
4834
4879
|
}), M = /* @__PURE__ */ m(f, { children: [
|
|
4835
4880
|
a !== "none" && /* @__PURE__ */ p("span", {
|
|
@@ -4891,7 +4936,7 @@ function $t({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
4891
4936
|
}
|
|
4892
4937
|
//#endregion
|
|
4893
4938
|
//#region src/components/AppAvatarGroup.jsx
|
|
4894
|
-
var
|
|
4939
|
+
var sn = {
|
|
4895
4940
|
xs: 20,
|
|
4896
4941
|
sm: 24,
|
|
4897
4942
|
md: 32,
|
|
@@ -4899,16 +4944,16 @@ var en = {
|
|
|
4899
4944
|
xl: 64,
|
|
4900
4945
|
"2xl": 96
|
|
4901
4946
|
};
|
|
4902
|
-
function
|
|
4903
|
-
return e == null ? null : typeof e == "number" ? `${e}px` :
|
|
4947
|
+
function cn(e) {
|
|
4948
|
+
return e == null ? null : typeof e == "number" ? `${e}px` : sn[e] == null ? /^\d+$/.test(e) ? `${e}px` : e : `${sn[e]}px`;
|
|
4904
4949
|
}
|
|
4905
|
-
function
|
|
4950
|
+
function ln({ children: e, size: t, spacing: n = "normal", overflow: r, className: i = "", ...a }) {
|
|
4906
4951
|
N("AppAvatarGroup", a);
|
|
4907
4952
|
let { style: o, ...s } = a, c = [
|
|
4908
4953
|
"avatar-group",
|
|
4909
4954
|
n === "normal" ? "" : `avatar-group-${n}`,
|
|
4910
4955
|
i
|
|
4911
|
-
].filter(Boolean).join(" "), l =
|
|
4956
|
+
].filter(Boolean).join(" "), l = cn(t), u = l ? {
|
|
4912
4957
|
"--avatar-size": l,
|
|
4913
4958
|
...o
|
|
4914
4959
|
} : o, d = typeof r == "string" ? Number.parseInt(r, 10) : r;
|
|
@@ -4926,7 +4971,7 @@ function nn({ children: e, size: t, spacing: n = "normal", overflow: r, classNam
|
|
|
4926
4971
|
}
|
|
4927
4972
|
//#endregion
|
|
4928
4973
|
//#region src/components/AppBadge.jsx
|
|
4929
|
-
function
|
|
4974
|
+
function un({ children: e, tone: t, dot: n = !1, className: r = "", ...i }) {
|
|
4930
4975
|
return N("AppBadge", i), /* @__PURE__ */ p(g, {
|
|
4931
4976
|
bg: !1,
|
|
4932
4977
|
className: [
|
|
@@ -4940,18 +4985,18 @@ function rn({ children: e, tone: t, dot: n = !1, className: r = "", ...i }) {
|
|
|
4940
4985
|
}
|
|
4941
4986
|
//#endregion
|
|
4942
4987
|
//#region src/components/AppBanner.jsx
|
|
4943
|
-
var
|
|
4988
|
+
var dn = [
|
|
4944
4989
|
"info",
|
|
4945
4990
|
"success",
|
|
4946
4991
|
"warning",
|
|
4947
4992
|
"danger",
|
|
4948
4993
|
"neutral"
|
|
4949
4994
|
];
|
|
4950
|
-
function
|
|
4995
|
+
function fn({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDismiss: i, className: a = "", ...o }) {
|
|
4951
4996
|
N("AppBanner", o);
|
|
4952
4997
|
let [s, c] = d(!0);
|
|
4953
4998
|
if (!s) return null;
|
|
4954
|
-
let l =
|
|
4999
|
+
let l = dn.includes(e) ? e : "info", u = () => {
|
|
4955
5000
|
c(!1), i?.();
|
|
4956
5001
|
};
|
|
4957
5002
|
return /* @__PURE__ */ m("div", {
|
|
@@ -4982,7 +5027,7 @@ function on({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
4982
5027
|
}
|
|
4983
5028
|
//#endregion
|
|
4984
5029
|
//#region src/components/AppBreadcrumbs.jsx
|
|
4985
|
-
function
|
|
5030
|
+
function pn({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
4986
5031
|
return N("AppBreadcrumbs", r), /* @__PURE__ */ p(_, {
|
|
4987
5032
|
className: n || void 0,
|
|
4988
5033
|
...r,
|
|
@@ -5001,17 +5046,17 @@ function sn({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
|
5001
5046
|
}
|
|
5002
5047
|
//#endregion
|
|
5003
5048
|
//#region src/components/AppCallout.jsx
|
|
5004
|
-
var
|
|
5049
|
+
var mn = {
|
|
5005
5050
|
info: "info",
|
|
5006
5051
|
success: "check",
|
|
5007
5052
|
warning: "alert-triangle",
|
|
5008
5053
|
danger: "x"
|
|
5009
5054
|
};
|
|
5010
|
-
function
|
|
5055
|
+
function hn({ 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 }) {
|
|
5011
5056
|
N("AppCallout", h);
|
|
5012
5057
|
let [g, _] = d(!0);
|
|
5013
5058
|
if (!g) return null;
|
|
5014
|
-
let v = r === void 0 ?
|
|
5059
|
+
let v = r === void 0 ? mn[t] : r === "none" ? null : r, y = !!i, b = y || !!v, x = b && !!n && e != null && e !== !1 && e !== "", S = x ? 13 : 11;
|
|
5015
5060
|
return /* @__PURE__ */ m("div", {
|
|
5016
5061
|
className: [
|
|
5017
5062
|
"info-callout",
|
|
@@ -5061,13 +5106,13 @@ function ln({ children: e, tone: t = "info", title: n, icon: r, image: i, imageA
|
|
|
5061
5106
|
}
|
|
5062
5107
|
//#endregion
|
|
5063
5108
|
//#region src/components/AppCard.jsx
|
|
5064
|
-
var
|
|
5109
|
+
var gn = {
|
|
5065
5110
|
xs: 320,
|
|
5066
5111
|
sm: 420,
|
|
5067
5112
|
md: 560,
|
|
5068
5113
|
lg: 720
|
|
5069
5114
|
};
|
|
5070
|
-
function
|
|
5115
|
+
function _n({ 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 }) {
|
|
5071
5116
|
N("AppCard", E);
|
|
5072
5117
|
let { style: D, ...O } = E, k = C != null || w != null, A = [
|
|
5073
5118
|
u && u !== "default" ? `card-${u}` : "",
|
|
@@ -5077,7 +5122,7 @@ function dn({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5077
5122
|
g == null ? "" : "card-constrained",
|
|
5078
5123
|
k ? "card-clickable" : "",
|
|
5079
5124
|
_
|
|
5080
|
-
].filter(Boolean).join(" ") || void 0, j = g == null ? void 0 :
|
|
5125
|
+
].filter(Boolean).join(" ") || void 0, j = g == null ? void 0 : gn[g] == null ? typeof g == "number" ? `${g}px` : g : `${gn[g]}px`, M = j ? {
|
|
5081
5126
|
"--card-max-width": j,
|
|
5082
5127
|
...D
|
|
5083
5128
|
} : D, P = {};
|
|
@@ -5148,7 +5193,7 @@ function dn({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5148
5193
|
}
|
|
5149
5194
|
//#endregion
|
|
5150
5195
|
//#region src/lib/CheckField.jsx
|
|
5151
|
-
var
|
|
5196
|
+
var vn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", rest: o = {}, inputType: c, wrapperClass: l }, u) {
|
|
5152
5197
|
let d = s(), f = t || d;
|
|
5153
5198
|
return /* @__PURE__ */ m("div", {
|
|
5154
5199
|
className: `${l}${a ? ` ${a}` : ""}`,
|
|
@@ -5176,8 +5221,8 @@ var fn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
5176
5221
|
}) : null
|
|
5177
5222
|
]
|
|
5178
5223
|
});
|
|
5179
|
-
}),
|
|
5180
|
-
return N("AppCheckbox", o), /* @__PURE__ */ p(
|
|
5224
|
+
}), yn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
5225
|
+
return N("AppCheckbox", o), /* @__PURE__ */ p(vn, {
|
|
5181
5226
|
ref: s,
|
|
5182
5227
|
label: e,
|
|
5183
5228
|
id: t,
|
|
@@ -5192,7 +5237,7 @@ var fn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
5192
5237
|
});
|
|
5193
5238
|
//#endregion
|
|
5194
5239
|
//#region src/components/AppChip.jsx
|
|
5195
|
-
function
|
|
5240
|
+
function bn({ 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 }) {
|
|
5196
5241
|
N("AppChip", h);
|
|
5197
5242
|
let g = e ?? t, _ = [
|
|
5198
5243
|
"chip",
|
|
@@ -5246,7 +5291,7 @@ function mn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", s
|
|
|
5246
5291
|
}
|
|
5247
5292
|
//#endregion
|
|
5248
5293
|
//#region src/components/AppChoiceCard.jsx
|
|
5249
|
-
function
|
|
5294
|
+
function xn({ 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 }) {
|
|
5250
5295
|
return N("AppChoiceCard", y), /* @__PURE__ */ m("label", {
|
|
5251
5296
|
className: `struct-card${c ? " struct-card-img-card" : ""}${r ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
5252
5297
|
...y,
|
|
@@ -5295,7 +5340,7 @@ function hn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
5295
5340
|
}
|
|
5296
5341
|
//#endregion
|
|
5297
5342
|
//#region src/components/AppChoiceChip.jsx
|
|
5298
|
-
function
|
|
5343
|
+
function Sn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChange: a, children: o, count: s, size: c = "md", className: l = "", ...u }) {
|
|
5299
5344
|
return N("AppChoiceChip", u), /* @__PURE__ */ m("label", {
|
|
5300
5345
|
className: `choice-chip${i ? " checked" : ""}${c === "sm" ? " choice-chip-sm" : c === "lg" ? " choice-chip-lg" : ""}${l ? ` ${l}` : ""}`,
|
|
5301
5346
|
...u,
|
|
@@ -5317,7 +5362,7 @@ function gn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChang
|
|
|
5317
5362
|
}
|
|
5318
5363
|
//#endregion
|
|
5319
5364
|
//#region src/components/AppColorField.jsx
|
|
5320
|
-
function
|
|
5365
|
+
function Cn({ 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 }) {
|
|
5321
5366
|
N("AppColorField", f);
|
|
5322
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" : "";
|
|
5323
5368
|
return /* @__PURE__ */ m("div", {
|
|
@@ -5366,7 +5411,7 @@ function _n({ value: e = "#000000", onChange: t, label: n, required: r = !1, err
|
|
|
5366
5411
|
}
|
|
5367
5412
|
//#endregion
|
|
5368
5413
|
//#region src/components/AppCompareTable.jsx
|
|
5369
|
-
function
|
|
5414
|
+
function wn({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i }) {
|
|
5370
5415
|
N("AppCompareTable", i);
|
|
5371
5416
|
let a = (e) => e === !0 ? /* @__PURE__ */ p("span", {
|
|
5372
5417
|
className: "compare-yes",
|
|
@@ -5403,23 +5448,23 @@ function vn({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
5403
5448
|
}
|
|
5404
5449
|
//#endregion
|
|
5405
5450
|
//#region src/components/AppInput.jsx
|
|
5406
|
-
var
|
|
5451
|
+
var Tn = 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) {
|
|
5407
5452
|
N("AppInput", M);
|
|
5408
|
-
let [F, I] = d(!1), L = s(), R = y || L, z = c === "password", ee = z && F ? "text" : c,
|
|
5409
|
-
|
|
5410
|
-
}, 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;
|
|
5411
5456
|
o(() => {
|
|
5412
|
-
if (!
|
|
5457
|
+
if (!ce || M.value === void 0) return;
|
|
5413
5458
|
let e = String(M.value ?? "");
|
|
5414
5459
|
ie(!!e), oe(e.length);
|
|
5415
|
-
}, [M.value,
|
|
5416
|
-
let
|
|
5460
|
+
}, [M.value, ce]);
|
|
5461
|
+
let le = (e) => {
|
|
5417
5462
|
ie(!!e.target.value), oe(e.target.value.length), M.onInput?.(e);
|
|
5418
|
-
},
|
|
5463
|
+
}, ue = se ? /* @__PURE__ */ p("button", {
|
|
5419
5464
|
type: "button",
|
|
5420
5465
|
className: "input-clear",
|
|
5421
5466
|
onClick: () => {
|
|
5422
|
-
let e =
|
|
5467
|
+
let e = B.current;
|
|
5423
5468
|
if (!e) return;
|
|
5424
5469
|
let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
5425
5470
|
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), ie(!1), e.focus();
|
|
@@ -5431,21 +5476,21 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5431
5476
|
name: "x",
|
|
5432
5477
|
size: 16
|
|
5433
5478
|
})
|
|
5434
|
-
}) : null,
|
|
5479
|
+
}) : null, H = n && R ? `${R}-error` : void 0, de = r && R ? `${R}-hint` : void 0, fe = H || de, pe = [
|
|
5435
5480
|
"input",
|
|
5436
5481
|
l === "sm" ? "input-sm" : "",
|
|
5437
5482
|
l === "lg" ? "input-lg" : "",
|
|
5438
5483
|
n ? "error" : "",
|
|
5439
5484
|
z ? "pw" : "",
|
|
5440
5485
|
v ? "num-input" : "",
|
|
5441
|
-
!(A && e || O || k || v || z || h) && T &&
|
|
5486
|
+
!(A && e || O || k || v || z || h) && T && se ? "has-clear" : "",
|
|
5442
5487
|
j === "bare" ? "input-bare" : "",
|
|
5443
5488
|
S
|
|
5444
|
-
].filter(Boolean).join(" "),
|
|
5489
|
+
].filter(Boolean).join(" "), U = /* @__PURE__ */ p(x.Control, {
|
|
5445
5490
|
id: R,
|
|
5446
5491
|
name: b,
|
|
5447
5492
|
type: ee,
|
|
5448
|
-
className:
|
|
5493
|
+
className: pe,
|
|
5449
5494
|
disabled: w,
|
|
5450
5495
|
required: t,
|
|
5451
5496
|
"aria-invalid": n ? "true" : "false",
|
|
@@ -5453,12 +5498,12 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5453
5498
|
maxLength: D,
|
|
5454
5499
|
...M,
|
|
5455
5500
|
placeholder: A ? " " : M.placeholder,
|
|
5456
|
-
ref:
|
|
5457
|
-
onInput:
|
|
5458
|
-
}),
|
|
5459
|
-
return
|
|
5501
|
+
ref: te,
|
|
5502
|
+
onInput: ce ? le : M.onInput
|
|
5503
|
+
}), me;
|
|
5504
|
+
return me = A && e ? /* @__PURE__ */ m("div", {
|
|
5460
5505
|
className: "field-float",
|
|
5461
|
-
children: [
|
|
5506
|
+
children: [U, /* @__PURE__ */ m("label", {
|
|
5462
5507
|
className: "float-label",
|
|
5463
5508
|
htmlFor: R,
|
|
5464
5509
|
children: [e, t && /* @__PURE__ */ p(Z, {})]
|
|
@@ -5470,7 +5515,7 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5470
5515
|
className: "affix affix-pre",
|
|
5471
5516
|
children: O
|
|
5472
5517
|
}),
|
|
5473
|
-
|
|
5518
|
+
U,
|
|
5474
5519
|
k != null && /* @__PURE__ */ p("span", {
|
|
5475
5520
|
className: "affix affix-suf",
|
|
5476
5521
|
children: k
|
|
@@ -5478,7 +5523,7 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5478
5523
|
]
|
|
5479
5524
|
}) : v ? /* @__PURE__ */ m("div", {
|
|
5480
5525
|
className: "input-with-unit",
|
|
5481
|
-
children: [
|
|
5526
|
+
children: [U, /* @__PURE__ */ p("span", {
|
|
5482
5527
|
className: "unit",
|
|
5483
5528
|
children: v
|
|
5484
5529
|
})]
|
|
@@ -5492,7 +5537,7 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5492
5537
|
size: 16
|
|
5493
5538
|
})
|
|
5494
5539
|
}),
|
|
5495
|
-
|
|
5540
|
+
U,
|
|
5496
5541
|
/* @__PURE__ */ p("button", {
|
|
5497
5542
|
type: "button",
|
|
5498
5543
|
className: "pw-toggle",
|
|
@@ -5507,7 +5552,7 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5507
5552
|
]
|
|
5508
5553
|
}) : h ? /* @__PURE__ */ m("div", {
|
|
5509
5554
|
className: "input-wrap",
|
|
5510
|
-
children: [
|
|
5555
|
+
children: [U, /* @__PURE__ */ p("button", {
|
|
5511
5556
|
type: "button",
|
|
5512
5557
|
className: "pw-toggle",
|
|
5513
5558
|
onClick: g,
|
|
@@ -5529,8 +5574,8 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5529
5574
|
size: 16
|
|
5530
5575
|
})
|
|
5531
5576
|
}),
|
|
5532
|
-
|
|
5533
|
-
|
|
5577
|
+
U,
|
|
5578
|
+
ue
|
|
5534
5579
|
]
|
|
5535
5580
|
}) : f ? /* @__PURE__ */ m("div", {
|
|
5536
5581
|
className: "input-icon",
|
|
@@ -5540,8 +5585,8 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5540
5585
|
name: f,
|
|
5541
5586
|
size: 16
|
|
5542
5587
|
})
|
|
5543
|
-
}),
|
|
5544
|
-
}) :
|
|
5588
|
+
}), U]
|
|
5589
|
+
}) : U, /* @__PURE__ */ m(x.Group, {
|
|
5545
5590
|
className: `field${C ? ` ${C}` : ""}`,
|
|
5546
5591
|
children: [
|
|
5547
5592
|
e && !A && /* @__PURE__ */ m(x.Label, {
|
|
@@ -5550,16 +5595,16 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5550
5595
|
children: [
|
|
5551
5596
|
e,
|
|
5552
5597
|
t && /* @__PURE__ */ p(Z, {}),
|
|
5553
|
-
i && /* @__PURE__ */ p(
|
|
5598
|
+
i && /* @__PURE__ */ p(Wt, {
|
|
5554
5599
|
label: a,
|
|
5555
5600
|
children: i
|
|
5556
5601
|
})
|
|
5557
5602
|
]
|
|
5558
5603
|
}),
|
|
5559
|
-
|
|
5604
|
+
me,
|
|
5560
5605
|
n ? /* @__PURE__ */ p("div", {
|
|
5561
5606
|
className: "field-error",
|
|
5562
|
-
id:
|
|
5607
|
+
id: H,
|
|
5563
5608
|
children: n
|
|
5564
5609
|
}) : r ? /* @__PURE__ */ p("div", {
|
|
5565
5610
|
className: "field-hint",
|
|
@@ -5572,34 +5617,34 @@ var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5572
5617
|
})
|
|
5573
5618
|
]
|
|
5574
5619
|
});
|
|
5575
|
-
}),
|
|
5620
|
+
}), En = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", Dn = {
|
|
5576
5621
|
sm: 380,
|
|
5577
5622
|
md: 440,
|
|
5578
5623
|
lg: 640,
|
|
5579
5624
|
xl: 880
|
|
5580
|
-
},
|
|
5581
|
-
function
|
|
5625
|
+
}, On = !1;
|
|
5626
|
+
function kn() {
|
|
5582
5627
|
let e = !0;
|
|
5583
5628
|
try {
|
|
5584
5629
|
e = process.env.NODE_ENV !== "production";
|
|
5585
5630
|
} catch {
|
|
5586
5631
|
e = !0;
|
|
5587
5632
|
}
|
|
5588
|
-
!e ||
|
|
5633
|
+
!e || On || (On = !0, console.warn("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."));
|
|
5589
5634
|
}
|
|
5590
|
-
function
|
|
5591
|
-
N("AppModal", b),
|
|
5635
|
+
function An({ 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(Dn));
|
|
5592
5637
|
let { style: x, ...C } = b;
|
|
5593
|
-
h && !_ && typeof n != "string" &&
|
|
5638
|
+
h && !_ && typeof n != "string" && kn();
|
|
5594
5639
|
let w = u(null);
|
|
5595
5640
|
o(() => {
|
|
5596
5641
|
if (!e) return;
|
|
5597
5642
|
let t = w.current?.closest(".modal-content");
|
|
5598
5643
|
if (!t) return;
|
|
5599
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
5644
|
+
let n = () => Array.from(t.querySelectorAll(En));
|
|
5600
5645
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
|
|
5601
5646
|
}, [e]);
|
|
5602
|
-
let T = typeof d == "number" ? d :
|
|
5647
|
+
let T = typeof d == "number" ? d : Dn[d] ?? Dn.md, E = [
|
|
5603
5648
|
"wui-modal",
|
|
5604
5649
|
a === "default" ? "" : `tone-${a}`,
|
|
5605
5650
|
v
|
|
@@ -5684,30 +5729,30 @@ function wn({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a
|
|
|
5684
5729
|
}
|
|
5685
5730
|
//#endregion
|
|
5686
5731
|
//#region src/components/ModalIcons.jsx
|
|
5687
|
-
var
|
|
5732
|
+
var jn = (e) => function({ size: t = 72 }) {
|
|
5688
5733
|
return /* @__PURE__ */ p("wui-status-icon", {
|
|
5689
5734
|
tone: e,
|
|
5690
5735
|
size: t
|
|
5691
5736
|
});
|
|
5692
|
-
},
|
|
5693
|
-
success:
|
|
5694
|
-
error:
|
|
5695
|
-
warning:
|
|
5696
|
-
info:
|
|
5697
|
-
delete:
|
|
5737
|
+
}, Mn = {
|
|
5738
|
+
success: jn("success"),
|
|
5739
|
+
error: jn("error"),
|
|
5740
|
+
warning: jn("warning"),
|
|
5741
|
+
info: jn("info"),
|
|
5742
|
+
delete: jn("delete")
|
|
5698
5743
|
};
|
|
5699
5744
|
//#endregion
|
|
5700
5745
|
//#region src/components/AppConfirmDialog.jsx
|
|
5701
|
-
function
|
|
5746
|
+
function Nn({ 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 }) {
|
|
5702
5747
|
N("AppConfirmDialog", y);
|
|
5703
5748
|
let [b, x] = d("");
|
|
5704
5749
|
if (o(() => {
|
|
5705
5750
|
e || x("");
|
|
5706
5751
|
}, [e]), !e) return null;
|
|
5707
|
-
let S = !!c && b.trim() !== c, C =
|
|
5752
|
+
let S = !!c && b.trim() !== c, C = Mn[s || (a ? "delete" : "info")], w = () => {
|
|
5708
5753
|
h || u?.();
|
|
5709
5754
|
};
|
|
5710
|
-
return /* @__PURE__ */ p(
|
|
5755
|
+
return /* @__PURE__ */ p(An, {
|
|
5711
5756
|
...y,
|
|
5712
5757
|
open: e,
|
|
5713
5758
|
hideHeader: !0,
|
|
@@ -5718,12 +5763,12 @@ function Dn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5718
5763
|
className: ["wui-confirm", v].filter(Boolean).join(" "),
|
|
5719
5764
|
footer: /* @__PURE__ */ m("div", {
|
|
5720
5765
|
className: "wui-confirm-actions",
|
|
5721
|
-
children: [/* @__PURE__ */ p(
|
|
5766
|
+
children: [/* @__PURE__ */ p(ye, {
|
|
5722
5767
|
variant: "secondary",
|
|
5723
5768
|
disabled: h,
|
|
5724
5769
|
onClick: w,
|
|
5725
5770
|
children: i
|
|
5726
|
-
}), /* @__PURE__ */ p(
|
|
5771
|
+
}), /* @__PURE__ */ p(ye, {
|
|
5727
5772
|
variant: a ? "danger" : "primary",
|
|
5728
5773
|
disabled: S,
|
|
5729
5774
|
loading: h,
|
|
@@ -5748,7 +5793,7 @@ function Dn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5748
5793
|
className: "wui-confirm-msg",
|
|
5749
5794
|
children: n
|
|
5750
5795
|
}),
|
|
5751
|
-
c && /* @__PURE__ */ p(
|
|
5796
|
+
c && /* @__PURE__ */ p(Tn, {
|
|
5752
5797
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
5753
5798
|
label: /* @__PURE__ */ m(f, { children: [
|
|
5754
5799
|
"Type ",
|
|
@@ -5766,13 +5811,13 @@ function Dn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5766
5811
|
}
|
|
5767
5812
|
//#endregion
|
|
5768
5813
|
//#region src/components/AppCopyButton.jsx
|
|
5769
|
-
var
|
|
5814
|
+
var Pn = {
|
|
5770
5815
|
sm: 14,
|
|
5771
5816
|
md: 16,
|
|
5772
5817
|
lg: 20
|
|
5773
5818
|
};
|
|
5774
|
-
function
|
|
5775
|
-
N("AppCopyButton", l),
|
|
5819
|
+
function Fn({ 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(Pn));
|
|
5776
5821
|
let [u, f] = d(!1), m = a(async () => {
|
|
5777
5822
|
try {
|
|
5778
5823
|
if (navigator.clipboard?.writeText) {
|
|
@@ -5787,14 +5832,14 @@ function kn({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5787
5832
|
document.body.removeChild(t), n && (f(!0), s?.(), setTimeout(() => f(!1), 2e3));
|
|
5788
5833
|
} catch {}
|
|
5789
5834
|
}, [e, s]), h = u ? n : t, g = u ? "check" : "files";
|
|
5790
|
-
return r ? /* @__PURE__ */ p(
|
|
5835
|
+
return r ? /* @__PURE__ */ p(de, {
|
|
5791
5836
|
icon: g,
|
|
5792
5837
|
label: h,
|
|
5793
|
-
size:
|
|
5838
|
+
size: Pn[i] ?? Pn.md,
|
|
5794
5839
|
onClick: m,
|
|
5795
5840
|
className: c,
|
|
5796
5841
|
...l
|
|
5797
|
-
}) : /* @__PURE__ */ p(
|
|
5842
|
+
}) : /* @__PURE__ */ p(ye, {
|
|
5798
5843
|
leftIcon: g,
|
|
5799
5844
|
variant: o,
|
|
5800
5845
|
size: i,
|
|
@@ -5807,7 +5852,7 @@ function kn({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5807
5852
|
}
|
|
5808
5853
|
//#endregion
|
|
5809
5854
|
//#region src/components/AppSkeleton.jsx
|
|
5810
|
-
function
|
|
5855
|
+
function In({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "", style: i, ...a }) {
|
|
5811
5856
|
return N("AppSkeleton", a), /* @__PURE__ */ p("span", {
|
|
5812
5857
|
className: `skeleton${r ? ` ${r}` : ""}`,
|
|
5813
5858
|
"aria-hidden": "true",
|
|
@@ -5820,28 +5865,28 @@ function An({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "
|
|
|
5820
5865
|
...a
|
|
5821
5866
|
});
|
|
5822
5867
|
}
|
|
5823
|
-
function
|
|
5824
|
-
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 Ln({ 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(In, {
|
|
5825
5870
|
width: t === 0 ? "70%" : "50%",
|
|
5826
5871
|
height: 12
|
|
5827
5872
|
}) }, `col-${t}`)) }, `row-${n}`));
|
|
5828
5873
|
}
|
|
5829
5874
|
//#endregion
|
|
5830
5875
|
//#region src/lib/pageWindow.js
|
|
5831
|
-
var
|
|
5876
|
+
var Rn = (e, t) => {
|
|
5832
5877
|
let n = [];
|
|
5833
5878
|
for (let r = e; r <= t; r += 1) n.push(r);
|
|
5834
5879
|
return n;
|
|
5835
5880
|
};
|
|
5836
|
-
function
|
|
5881
|
+
function zn(e, t, { siblingCount: n = 2, boundaryCount: r = 1 } = {}) {
|
|
5837
5882
|
let i = Math.max(1, t), a = Math.min(Math.max(1, e), i);
|
|
5838
|
-
if (i <= n * 2 + 3 + r * 2) return
|
|
5839
|
-
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 =
|
|
5840
|
-
return u.push(...c ? ["ellipsis-left"] :
|
|
5883
|
+
if (i <= n * 2 + 3 + r * 2) return Rn(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 = Rn(1, r);
|
|
5885
|
+
return u.push(...c ? ["ellipsis-left"] : Rn(r + 1, o - 1)), u.push(...Rn(o, s)), u.push(...l ? ["ellipsis-right"] : Rn(s + 1, i - r)), u.push(...Rn(i - r + 1, i)), u;
|
|
5841
5886
|
}
|
|
5842
5887
|
//#endregion
|
|
5843
5888
|
//#region src/components/AppSelectMini.jsx
|
|
5844
|
-
function
|
|
5889
|
+
function Bn({ 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 }) {
|
|
5845
5890
|
N("AppSelectMini", m);
|
|
5846
5891
|
let { setRef: h, innerRef: g } = Q({
|
|
5847
5892
|
value: e ?? "",
|
|
@@ -5855,7 +5900,7 @@ function Pn({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
5855
5900
|
label: e.label ?? e.text ?? "",
|
|
5856
5901
|
icon: e.icon
|
|
5857
5902
|
}));
|
|
5858
|
-
|
|
5903
|
+
Jt(t, e.options) || (e.options = t);
|
|
5859
5904
|
}, [n, g]), o(() => {
|
|
5860
5905
|
let e = g.current;
|
|
5861
5906
|
if (e) for (let [t, n] of [["icon", u], ["prefix", d]]) n == null || n === "" ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
@@ -5878,22 +5923,22 @@ function Pn({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
5878
5923
|
}
|
|
5879
5924
|
//#endregion
|
|
5880
5925
|
//#region src/components/AppTablePagination.jsx
|
|
5881
|
-
var
|
|
5926
|
+
var Vn = [
|
|
5882
5927
|
5,
|
|
5883
5928
|
10,
|
|
5884
5929
|
25,
|
|
5885
5930
|
50
|
|
5886
5931
|
];
|
|
5887
|
-
function
|
|
5932
|
+
function Hn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRow: a, onPageChange: o, onPageSizeChange: s, pageSizes: c = Vn, mode: l = "prev-next", showPageSize: u = !0, className: d = "", ...f }) {
|
|
5888
5933
|
N("AppTablePagination", f);
|
|
5889
|
-
let h = l === "numbered", g = h ?
|
|
5934
|
+
let h = l === "numbered", g = h ? zn(e, t) : null;
|
|
5890
5935
|
return /* @__PURE__ */ m("div", {
|
|
5891
5936
|
className: `table-pagination${d ? ` ${d}` : ""}`,
|
|
5892
5937
|
...f,
|
|
5893
5938
|
children: [
|
|
5894
5939
|
u && /* @__PURE__ */ m("span", {
|
|
5895
5940
|
className: "tpg-rows",
|
|
5896
|
-
children: ["Rows per page:", /* @__PURE__ */ p(
|
|
5941
|
+
children: ["Rows per page:", /* @__PURE__ */ p(Bn, {
|
|
5897
5942
|
value: n,
|
|
5898
5943
|
onChange: (e) => s(Number(e)),
|
|
5899
5944
|
ariaLabel: "Rows per page",
|
|
@@ -5957,13 +6002,13 @@ function In({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
5957
6002
|
}
|
|
5958
6003
|
//#endregion
|
|
5959
6004
|
//#region src/components/AppDataTable.jsx
|
|
5960
|
-
function
|
|
6005
|
+
function Un(e) {
|
|
5961
6006
|
return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
5962
6007
|
}
|
|
5963
|
-
function
|
|
6008
|
+
function Wn(e) {
|
|
5964
6009
|
return e == null || e === "" ? "—" : typeof e == "boolean" ? String(e) : e;
|
|
5965
6010
|
}
|
|
5966
|
-
function
|
|
6011
|
+
function Gn({ 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 }) {
|
|
5967
6012
|
N("AppDataTable", E);
|
|
5968
6013
|
let D = typeof T == "function", [O, k] = d(() => /* @__PURE__ */ new Set()), A = (e) => k((t) => {
|
|
5969
6014
|
let n = new Set(t);
|
|
@@ -5999,7 +6044,7 @@ function zn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5999
6044
|
e.map((e, t) => {
|
|
6000
6045
|
let n = !!(e.sortable && a), r = i && i.key === e.key;
|
|
6001
6046
|
return /* @__PURE__ */ m("th", {
|
|
6002
|
-
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") +
|
|
6047
|
+
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") + Un(e.align),
|
|
6003
6048
|
style: e.width ? { width: e.width } : void 0,
|
|
6004
6049
|
tabIndex: n ? 0 : void 0,
|
|
6005
6050
|
"aria-sort": r ? i.dir === "asc" ? "ascending" : "descending" : n ? "none" : void 0,
|
|
@@ -6026,7 +6071,7 @@ function zn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6026
6071
|
children: "Actions"
|
|
6027
6072
|
})
|
|
6028
6073
|
}))
|
|
6029
|
-
] }) }), /* @__PURE__ */ p("tbody", { children: o ? /* @__PURE__ */ p(
|
|
6074
|
+
] }) }), /* @__PURE__ */ p("tbody", { children: o ? /* @__PURE__ */ p(Ln, {
|
|
6030
6075
|
rows: s,
|
|
6031
6076
|
cols: j
|
|
6032
6077
|
}) : n?.length ? n.map((n, i) => {
|
|
@@ -6060,9 +6105,9 @@ function zn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6060
6105
|
})
|
|
6061
6106
|
}),
|
|
6062
6107
|
e.map((e, t) => /* @__PURE__ */ p("td", {
|
|
6063
|
-
className: (t === 0 ? "wui-name-cell " : "") +
|
|
6108
|
+
className: (t === 0 ? "wui-name-cell " : "") + Un(e.align) + (e.cellClassName ? ` ${e.cellClassName}` : ""),
|
|
6064
6109
|
style: e.cellStyle,
|
|
6065
|
-
children: e.render ? e.render(n) :
|
|
6110
|
+
children: e.render ? e.render(n) : Wn(n[e.key])
|
|
6066
6111
|
}, e.key)),
|
|
6067
6112
|
h && /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p("div", {
|
|
6068
6113
|
className: "u-row-actions",
|
|
@@ -6086,7 +6131,7 @@ function zn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6086
6131
|
}) : L
|
|
6087
6132
|
}) }) })]
|
|
6088
6133
|
})
|
|
6089
|
-
}), _ && !o && _.total > 0 && /* @__PURE__ */ p(
|
|
6134
|
+
}), _ && !o && _.total > 0 && /* @__PURE__ */ p(Hn, {
|
|
6090
6135
|
page: _.page,
|
|
6091
6136
|
totalPages: _.totalPages,
|
|
6092
6137
|
pageSize: _.pageSize,
|
|
@@ -6099,7 +6144,7 @@ function zn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6099
6144
|
}
|
|
6100
6145
|
//#endregion
|
|
6101
6146
|
//#region src/components/AppDatePicker.jsx
|
|
6102
|
-
var
|
|
6147
|
+
var Kn = 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) {
|
|
6103
6148
|
N("AppDatePicker", y);
|
|
6104
6149
|
let x = s(), S = g || o || x, { setRef: C } = Q({
|
|
6105
6150
|
ref: b,
|
|
@@ -6143,7 +6188,7 @@ var Bn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6143
6188
|
})
|
|
6144
6189
|
]
|
|
6145
6190
|
});
|
|
6146
|
-
}),
|
|
6191
|
+
}), qn = 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) {
|
|
6147
6192
|
N("AppDateRangePicker", S);
|
|
6148
6193
|
let w = s(), T = y || l || w, { setRef: E, innerRef: D } = Q({
|
|
6149
6194
|
ref: C,
|
|
@@ -6204,12 +6249,12 @@ var Bn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6204
6249
|
});
|
|
6205
6250
|
//#endregion
|
|
6206
6251
|
//#region src/lib/emptyValue.js
|
|
6207
|
-
function
|
|
6252
|
+
function Jn(e) {
|
|
6208
6253
|
return e == null || e === "";
|
|
6209
6254
|
}
|
|
6210
6255
|
//#endregion
|
|
6211
6256
|
//#region src/components/AppDescriptions.jsx
|
|
6212
|
-
function
|
|
6257
|
+
function Yn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, title: i, className: a = "", ...o }) {
|
|
6213
6258
|
return N("AppDescriptions", o), /* @__PURE__ */ m("div", {
|
|
6214
6259
|
className: [
|
|
6215
6260
|
"descs",
|
|
@@ -6225,7 +6270,7 @@ function Un({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
6225
6270
|
}), /* @__PURE__ */ p("dl", {
|
|
6226
6271
|
className: "descs-list",
|
|
6227
6272
|
children: e.map((e, t) => {
|
|
6228
|
-
let n =
|
|
6273
|
+
let n = Jn(e.value), r = e.span ?? 1, i = e.key ?? `${e.label}-${t}`;
|
|
6229
6274
|
return /* @__PURE__ */ m("div", {
|
|
6230
6275
|
className: "descs-item",
|
|
6231
6276
|
style: { "--descs-span": r },
|
|
@@ -6243,24 +6288,24 @@ function Un({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
6243
6288
|
}
|
|
6244
6289
|
//#endregion
|
|
6245
6290
|
//#region src/components/AppDropdown.jsx
|
|
6246
|
-
var
|
|
6247
|
-
function
|
|
6291
|
+
var Xn = !1;
|
|
6292
|
+
function Zn() {
|
|
6248
6293
|
let e = !0;
|
|
6249
6294
|
try {
|
|
6250
6295
|
e = process.env.NODE_ENV !== "production";
|
|
6251
6296
|
} catch {
|
|
6252
6297
|
e = !0;
|
|
6253
6298
|
}
|
|
6254
|
-
!e ||
|
|
6299
|
+
!e || Xn || (Xn = !0, console.warn("[@webority/ui-react] <AppDropdown> icon-only toggle has no accessible name — pass `label` or `ariaLabel`."));
|
|
6255
6300
|
}
|
|
6256
|
-
function
|
|
6257
|
-
N("AppDropdown", d), !u && !i && !r &&
|
|
6301
|
+
function Qn({ 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 && Zn();
|
|
6258
6303
|
let f = n ?? (u ? "wui-dropdown-trigger" : "topbar-icon-btn");
|
|
6259
6304
|
return /* @__PURE__ */ m(b, {
|
|
6260
6305
|
align: a,
|
|
6261
6306
|
...d,
|
|
6262
6307
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
6263
|
-
as:
|
|
6308
|
+
as: $n,
|
|
6264
6309
|
icon: e,
|
|
6265
6310
|
iconSize: t,
|
|
6266
6311
|
btnClassName: f,
|
|
@@ -6270,6 +6315,7 @@ function Kn({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
6270
6315
|
}), /* @__PURE__ */ p(b.Menu, {
|
|
6271
6316
|
className: s,
|
|
6272
6317
|
renderOnMount: !0,
|
|
6318
|
+
popperConfig: { strategy: "fixed" },
|
|
6273
6319
|
children: l ?? o.map((e) => {
|
|
6274
6320
|
if (e.divider) return /* @__PURE__ */ p(b.Divider, {}, e.key);
|
|
6275
6321
|
let t = e.to ? c ? {
|
|
@@ -6295,7 +6341,7 @@ function Kn({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
6295
6341
|
})]
|
|
6296
6342
|
});
|
|
6297
6343
|
}
|
|
6298
|
-
var
|
|
6344
|
+
var $n = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-btn", trigger: r, "aria-label": i, className: a, ...o }, s) {
|
|
6299
6345
|
return /* @__PURE__ */ p("button", {
|
|
6300
6346
|
ref: s,
|
|
6301
6347
|
type: "button",
|
|
@@ -6310,16 +6356,16 @@ var qn = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-
|
|
|
6310
6356
|
});
|
|
6311
6357
|
//#endregion
|
|
6312
6358
|
//#region src/lib/fileItem.js
|
|
6313
|
-
function
|
|
6359
|
+
function er(e) {
|
|
6314
6360
|
return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
|
|
6315
6361
|
}
|
|
6316
|
-
function
|
|
6362
|
+
function tr(e) {
|
|
6317
6363
|
return e instanceof File ? e.name : e?.name;
|
|
6318
6364
|
}
|
|
6319
|
-
function
|
|
6365
|
+
function nr(e) {
|
|
6320
6366
|
return e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
|
|
6321
6367
|
}
|
|
6322
|
-
function
|
|
6368
|
+
function rr(e, t) {
|
|
6323
6369
|
let [n, r] = d(null);
|
|
6324
6370
|
return o(() => {
|
|
6325
6371
|
if (!t) {
|
|
@@ -6335,8 +6381,8 @@ function Zn(e, t) {
|
|
|
6335
6381
|
}
|
|
6336
6382
|
//#endregion
|
|
6337
6383
|
//#region src/lib/FileItemRow.jsx
|
|
6338
|
-
function
|
|
6339
|
-
let i =
|
|
6384
|
+
function ir({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
6385
|
+
let i = rr(e, t), a = tr(e), o = nr(e);
|
|
6340
6386
|
return /* @__PURE__ */ m("div", {
|
|
6341
6387
|
className: "attach-item",
|
|
6342
6388
|
children: [
|
|
@@ -6375,15 +6421,15 @@ function Qn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6375
6421
|
}
|
|
6376
6422
|
//#endregion
|
|
6377
6423
|
//#region src/components/AppFileAttachment.jsx
|
|
6378
|
-
function
|
|
6424
|
+
function ar({ label: e = "Attachment", value: t, name: n, onChange: r, multiple: i = !1, accept: a = Mt, maxSizeMb: o = 5, optional: c = !1, error: l, id: u, ...h }) {
|
|
6379
6425
|
N("AppFileAttachment", h);
|
|
6380
|
-
let g = s(), _ = u || n || g, [v, y] = d(""), b = i && Array.isArray(t) ? t : t ? [t] : [], x =
|
|
6426
|
+
let g = s(), _ = u || n || g, [v, y] = d(""), b = i && Array.isArray(t) ? t : t ? [t] : [], x = Rt(a), S = (e) => e instanceof File ? Lt(e) : x || Lt(e), C = !i && b.length === 1 && S(b[0]);
|
|
6381
6427
|
function w(e) {
|
|
6382
6428
|
let n = Array.from(e.target.files || []);
|
|
6383
6429
|
if (e.target.value = "", !n.length) return;
|
|
6384
6430
|
let s = [], c = "";
|
|
6385
6431
|
for (let e of n) {
|
|
6386
|
-
let t =
|
|
6432
|
+
let t = Vt(e, {
|
|
6387
6433
|
accept: a,
|
|
6388
6434
|
maxSizeMb: o
|
|
6389
6435
|
});
|
|
@@ -6394,8 +6440,8 @@ function $n({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6394
6440
|
s.push(e);
|
|
6395
6441
|
}
|
|
6396
6442
|
if (y(c), s.length) if (i) {
|
|
6397
|
-
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(
|
|
6398
|
-
r(e.concat(s.filter((e) => !n.has(
|
|
6443
|
+
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(er));
|
|
6444
|
+
r(e.concat(s.filter((e) => !n.has(er(e)))));
|
|
6399
6445
|
} else r(s[0]);
|
|
6400
6446
|
}
|
|
6401
6447
|
function T(e) {
|
|
@@ -6432,7 +6478,7 @@ function $n({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6432
6478
|
}), /* @__PURE__ */ m("span", {
|
|
6433
6479
|
className: "attach-drop-hint",
|
|
6434
6480
|
children: [
|
|
6435
|
-
|
|
6481
|
+
zt(a),
|
|
6436
6482
|
", up to ",
|
|
6437
6483
|
o,
|
|
6438
6484
|
" MB"
|
|
@@ -6454,17 +6500,17 @@ function $n({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6454
6500
|
onChange: w,
|
|
6455
6501
|
...h
|
|
6456
6502
|
})] }),
|
|
6457
|
-
C ? /* @__PURE__ */ p(
|
|
6503
|
+
C ? /* @__PURE__ */ p(or, {
|
|
6458
6504
|
item: b[0],
|
|
6459
6505
|
isImage: !0,
|
|
6460
6506
|
onRemove: () => T(0)
|
|
6461
6507
|
}) : b.length > 0 && /* @__PURE__ */ p("div", {
|
|
6462
6508
|
className: "attach-list",
|
|
6463
|
-
children: b.map((e, t) => /* @__PURE__ */ p(
|
|
6509
|
+
children: b.map((e, t) => /* @__PURE__ */ p(ir, {
|
|
6464
6510
|
item: e,
|
|
6465
6511
|
isImage: S(e),
|
|
6466
6512
|
onRemove: () => T(t)
|
|
6467
|
-
},
|
|
6513
|
+
}, er(e)))
|
|
6468
6514
|
}),
|
|
6469
6515
|
E && /* @__PURE__ */ p("div", {
|
|
6470
6516
|
className: "field-error",
|
|
@@ -6473,8 +6519,8 @@ function $n({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6473
6519
|
]
|
|
6474
6520
|
});
|
|
6475
6521
|
}
|
|
6476
|
-
function
|
|
6477
|
-
let r =
|
|
6522
|
+
function or({ item: e, isImage: t, onRemove: n }) {
|
|
6523
|
+
let r = rr(e, t), i = tr(e), a = nr(e);
|
|
6478
6524
|
return /* @__PURE__ */ m("div", {
|
|
6479
6525
|
className: "attach-preview",
|
|
6480
6526
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -6506,18 +6552,18 @@ function er({ item: e, isImage: t, onRemove: n }) {
|
|
|
6506
6552
|
}
|
|
6507
6553
|
//#endregion
|
|
6508
6554
|
//#region src/components/AppFilePicker.jsx
|
|
6509
|
-
function
|
|
6555
|
+
function sr({ 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 = "", ..._ }) {
|
|
6510
6556
|
N("AppFilePicker", _);
|
|
6511
6557
|
let [v, y] = d(null), [b, x] = d(!1), [S, C] = d(""), w = u(null), T = s(), E = n || T;
|
|
6512
6558
|
o(() => {
|
|
6513
|
-
if (!i && t instanceof File &&
|
|
6559
|
+
if (!i && t instanceof File && Lt(t)) {
|
|
6514
6560
|
let e = URL.createObjectURL(t);
|
|
6515
6561
|
return y(e), () => URL.revokeObjectURL(e);
|
|
6516
6562
|
}
|
|
6517
6563
|
y(null);
|
|
6518
6564
|
}, [t, i]);
|
|
6519
|
-
let D = i ? Array.isArray(t) ? t : t ? [t] : [] : [], O = h || S, k =
|
|
6520
|
-
let t =
|
|
6565
|
+
let D = i ? Array.isArray(t) ? t : t ? [t] : [] : [], O = h || S, k = Rt(c), A = !i && !!t, j = A && (t instanceof File ? Lt(t) : k || Lt(t)), M = t?.name, P = j ? t?.url || v : null, F = (e) => {
|
|
6566
|
+
let t = Vt(e, {
|
|
6521
6567
|
accept: c,
|
|
6522
6568
|
maxSizeMb: l
|
|
6523
6569
|
});
|
|
@@ -6525,9 +6571,9 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6525
6571
|
}, I = (e) => {
|
|
6526
6572
|
let n = Array.from(e || []);
|
|
6527
6573
|
if (!n.length) return;
|
|
6528
|
-
let i = Array.isArray(t) ? t : t ? [t] : [], o = new Set(i.map(
|
|
6574
|
+
let i = Array.isArray(t) ? t : t ? [t] : [], o = new Set(i.map(er)), s = "", u = [];
|
|
6529
6575
|
for (let e of n) {
|
|
6530
|
-
let t =
|
|
6576
|
+
let t = Vt(e, {
|
|
6531
6577
|
accept: c,
|
|
6532
6578
|
maxSizeMb: l
|
|
6533
6579
|
});
|
|
@@ -6535,7 +6581,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6535
6581
|
s ||= t;
|
|
6536
6582
|
continue;
|
|
6537
6583
|
}
|
|
6538
|
-
o.has(
|
|
6584
|
+
o.has(er(e)) || (o.add(er(e)), u.push(e));
|
|
6539
6585
|
}
|
|
6540
6586
|
let d = i.concat(u);
|
|
6541
6587
|
a && d.length > a && (d = d.slice(0, a), s ||= `Up to ${a} files.`), C(s), r(d);
|
|
@@ -6555,7 +6601,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6555
6601
|
t && F(t);
|
|
6556
6602
|
}, z = (e) => {
|
|
6557
6603
|
C(""), r(D.filter((t, n) => n !== e));
|
|
6558
|
-
}, ee = () => w.current?.click(),
|
|
6604
|
+
}, ee = () => w.current?.click(), B = /* @__PURE__ */ p("input", {
|
|
6559
6605
|
id: E,
|
|
6560
6606
|
name: n,
|
|
6561
6607
|
ref: w,
|
|
@@ -6624,7 +6670,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6624
6670
|
size: 16
|
|
6625
6671
|
})
|
|
6626
6672
|
}),
|
|
6627
|
-
|
|
6673
|
+
B
|
|
6628
6674
|
]
|
|
6629
6675
|
}) : /* @__PURE__ */ m("div", {
|
|
6630
6676
|
className: `file-input file-input-tall${b ? " dragging" : ""}${O ? " error" : ""}${i && D.length > 0 ? " has-files" : ""}`,
|
|
@@ -6657,7 +6703,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6657
6703
|
/* @__PURE__ */ m("span", {
|
|
6658
6704
|
className: "file-input-text",
|
|
6659
6705
|
children: [
|
|
6660
|
-
|
|
6706
|
+
zt(c),
|
|
6661
6707
|
" · up to ",
|
|
6662
6708
|
l,
|
|
6663
6709
|
" MB"
|
|
@@ -6665,15 +6711,15 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6665
6711
|
})
|
|
6666
6712
|
]
|
|
6667
6713
|
}),
|
|
6668
|
-
|
|
6714
|
+
B,
|
|
6669
6715
|
i && D.length > 0 && /* @__PURE__ */ p("div", {
|
|
6670
6716
|
className: "attach-list",
|
|
6671
|
-
children: D.map((e, t) => /* @__PURE__ */ p(
|
|
6717
|
+
children: D.map((e, t) => /* @__PURE__ */ p(ir, {
|
|
6672
6718
|
item: e,
|
|
6673
|
-
isImage: e instanceof File ?
|
|
6719
|
+
isImage: e instanceof File ? Lt(e) : k || Lt(e),
|
|
6674
6720
|
noun: "file",
|
|
6675
6721
|
onRemove: () => z(t)
|
|
6676
|
-
},
|
|
6722
|
+
}, er(e)))
|
|
6677
6723
|
})
|
|
6678
6724
|
]
|
|
6679
6725
|
}),
|
|
@@ -6686,7 +6732,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6686
6732
|
}
|
|
6687
6733
|
//#endregion
|
|
6688
6734
|
//#region src/components/AppFloatingDock.jsx
|
|
6689
|
-
function
|
|
6735
|
+
function cr({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation", magnify: r = !0, maxScale: i, radius: a, className: o = "", ...s }) {
|
|
6690
6736
|
return N("AppFloatingDock", s), /* @__PURE__ */ p("wui-dock", {
|
|
6691
6737
|
role: "navigation",
|
|
6692
6738
|
"aria-label": n,
|
|
@@ -6728,7 +6774,7 @@ function nr({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
6728
6774
|
}
|
|
6729
6775
|
//#endregion
|
|
6730
6776
|
//#region src/components/AppFormActions.jsx
|
|
6731
|
-
function
|
|
6777
|
+
function lr({ children: e, sticky: t = !1, align: n = "end", className: r = "", ...i }) {
|
|
6732
6778
|
return N("AppFormActions", i), /* @__PURE__ */ p("div", {
|
|
6733
6779
|
className: [
|
|
6734
6780
|
"form-actions",
|
|
@@ -6742,7 +6788,7 @@ function rr({ children: e, sticky: t = !1, align: n = "end", className: r = "",
|
|
|
6742
6788
|
}
|
|
6743
6789
|
//#endregion
|
|
6744
6790
|
//#region src/components/AppFormRow.jsx
|
|
6745
|
-
function
|
|
6791
|
+
function ur({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
6746
6792
|
N("AppFormRow", r);
|
|
6747
6793
|
let { style: i, ...a } = r;
|
|
6748
6794
|
return /* @__PURE__ */ p("div", {
|
|
@@ -6757,7 +6803,7 @@ function ir({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
|
6757
6803
|
}
|
|
6758
6804
|
//#endregion
|
|
6759
6805
|
//#region src/components/AppFormSection.jsx
|
|
6760
|
-
function
|
|
6806
|
+
function dr({ children: e, title: t, description: n, className: r = "", ...i }) {
|
|
6761
6807
|
return N("AppFormSection", i), /* @__PURE__ */ m("section", {
|
|
6762
6808
|
className: ["form-section", r].filter(Boolean).join(" "),
|
|
6763
6809
|
...i,
|
|
@@ -6778,12 +6824,12 @@ function ar({ children: e, title: t, description: n, className: r = "", ...i })
|
|
|
6778
6824
|
}
|
|
6779
6825
|
//#endregion
|
|
6780
6826
|
//#region src/components/AppInfoList.jsx
|
|
6781
|
-
function
|
|
6827
|
+
function fr({ items: e = [], className: t = "", ...n }) {
|
|
6782
6828
|
return N("AppInfoList", n), /* @__PURE__ */ p("div", {
|
|
6783
6829
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
6784
6830
|
...n,
|
|
6785
6831
|
children: e.map((e, t) => {
|
|
6786
|
-
let n =
|
|
6832
|
+
let n = Jn(e.value), r = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
6787
6833
|
className: "info-icon",
|
|
6788
6834
|
children: H(e.icon, { size: 16 })
|
|
6789
6835
|
}), /* @__PURE__ */ m("span", {
|
|
@@ -6809,23 +6855,23 @@ function or({ items: e = [], className: t = "", ...n }) {
|
|
|
6809
6855
|
}
|
|
6810
6856
|
//#endregion
|
|
6811
6857
|
//#region src/components/AppKpiTile.jsx
|
|
6812
|
-
var
|
|
6813
|
-
function
|
|
6814
|
-
if (!e || e.length < 2) return `0,${
|
|
6815
|
-
let t = Math.min(...e), n = Math.max(...e) - t, r =
|
|
6816
|
-
return e.map((e, i) => `${i * r},${n === 0 ?
|
|
6858
|
+
var pr = 48, mr = 16;
|
|
6859
|
+
function hr(e) {
|
|
6860
|
+
if (!e || e.length < 2) return `0,${mr / 2} ${pr},${mr / 2}`;
|
|
6861
|
+
let t = Math.min(...e), n = Math.max(...e) - t, r = pr / (e.length - 1);
|
|
6862
|
+
return e.map((e, i) => `${i * r},${n === 0 ? mr / 2 : mr - (e - t) / n * mr}`).join(" ");
|
|
6817
6863
|
}
|
|
6818
|
-
function
|
|
6864
|
+
function gr(e) {
|
|
6819
6865
|
if (typeof e != "string") return "flat";
|
|
6820
6866
|
let t = e.trim();
|
|
6821
6867
|
return t.startsWith("+") ? "up" : t.startsWith("-") || t.startsWith("−") ? "down" : "flat";
|
|
6822
6868
|
}
|
|
6823
|
-
function
|
|
6869
|
+
function _r({ 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 }) {
|
|
6824
6870
|
N("AppKpiTile", T);
|
|
6825
6871
|
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 ? {
|
|
6826
6872
|
...v,
|
|
6827
6873
|
"--wui-kpi-value-size": `${u}px`
|
|
6828
|
-
} : v, O = o ??
|
|
6874
|
+
} : v, O = o ?? gr(a), k = O === "up" ? "arrow-up" : O === "down" ? "arrow-down" : null, A = {};
|
|
6829
6875
|
return h != null && (A = g ? {
|
|
6830
6876
|
as: g,
|
|
6831
6877
|
to: h
|
|
@@ -6863,12 +6909,12 @@ function dr({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6863
6909
|
}),
|
|
6864
6910
|
s && s.length > 0 && /* @__PURE__ */ p("svg", {
|
|
6865
6911
|
className: `kpi-sparkline${w ? ` ${w}` : ""}`,
|
|
6866
|
-
width:
|
|
6867
|
-
height:
|
|
6868
|
-
viewBox: `0 0 ${
|
|
6912
|
+
width: pr,
|
|
6913
|
+
height: mr,
|
|
6914
|
+
viewBox: `0 0 ${pr} ${mr}`,
|
|
6869
6915
|
"aria-hidden": "true",
|
|
6870
6916
|
children: /* @__PURE__ */ p("polyline", {
|
|
6871
|
-
points:
|
|
6917
|
+
points: hr(s),
|
|
6872
6918
|
stroke: "currentColor",
|
|
6873
6919
|
fill: "none"
|
|
6874
6920
|
})
|
|
@@ -6878,21 +6924,21 @@ function dr({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6878
6924
|
}
|
|
6879
6925
|
//#endregion
|
|
6880
6926
|
//#region src/components/AppLogoPicker.jsx
|
|
6881
|
-
var
|
|
6927
|
+
var vr = {
|
|
6882
6928
|
sm: 72,
|
|
6883
6929
|
md: 120,
|
|
6884
6930
|
lg: 160
|
|
6885
6931
|
};
|
|
6886
|
-
function
|
|
6887
|
-
N("AppLogoPicker", k),
|
|
6888
|
-
let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [R, z] = d(!1), [ee,
|
|
6932
|
+
function yr({ 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 }) {
|
|
6933
|
+
N("AppLogoPicker", k), W("AppLogoPicker", "size", typeof E == "string" ? E : null, Object.keys(vr));
|
|
6934
|
+
let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [R, z] = d(!1), [ee, B] = d(!1);
|
|
6889
6935
|
o(() => () => P && URL.revokeObjectURL(P), [P]), o(() => {
|
|
6890
6936
|
F(null), z(!1);
|
|
6891
6937
|
}, [e]);
|
|
6892
|
-
let
|
|
6893
|
-
|
|
6938
|
+
let te = a || c, ne = P || (e && !R ? e : null), re = b || I, ie = !te && (!!P || !!ne && !!i), ae = () => {
|
|
6939
|
+
te || A.current?.click();
|
|
6894
6940
|
}, oe = (e) => {
|
|
6895
|
-
let t =
|
|
6941
|
+
let t = Vt(e, {
|
|
6896
6942
|
accept: l,
|
|
6897
6943
|
maxSizeMb: f
|
|
6898
6944
|
});
|
|
@@ -6901,38 +6947,38 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6901
6947
|
return;
|
|
6902
6948
|
}
|
|
6903
6949
|
L(""), z(!1), F(URL.createObjectURL(e)), r(e);
|
|
6904
|
-
},
|
|
6950
|
+
}, se = (e) => {
|
|
6905
6951
|
let t = e.target.files?.[0];
|
|
6906
6952
|
e.target.value = "", t && oe(t);
|
|
6907
|
-
},
|
|
6908
|
-
if (e.preventDefault(),
|
|
6953
|
+
}, ce = (e) => {
|
|
6954
|
+
if (e.preventDefault(), B(!1), te) return;
|
|
6909
6955
|
let t = e.dataTransfer.files?.[0];
|
|
6910
6956
|
t && oe(t);
|
|
6911
|
-
},
|
|
6957
|
+
}, le = () => {
|
|
6912
6958
|
F(null), L(""), z(!1), A.current && (A.current.value = ""), i?.();
|
|
6913
|
-
},
|
|
6959
|
+
}, ue = typeof E == "number" ? E : vr[E] ?? vr.md, H = Math.max(14, Math.round(ue * .18)), de = Math.round(ue * .5), fe = [
|
|
6914
6960
|
"set-uploader",
|
|
6915
6961
|
T === "avatar" ? "set-uploader--avatar" : "",
|
|
6916
6962
|
D === "rounded" ? "set-uploader--rounded" : D === "square" ? "set-uploader--square" : "",
|
|
6917
6963
|
ee && "is-dragging"
|
|
6918
|
-
].filter(Boolean).join(" "),
|
|
6964
|
+
].filter(Boolean).join(" "), pe = x === "inline", U = x === "profile", me = /* @__PURE__ */ m("div", {
|
|
6919
6965
|
className: "set-uploader-shell",
|
|
6920
6966
|
children: [
|
|
6921
6967
|
/* @__PURE__ */ p("button", {
|
|
6922
6968
|
type: "button",
|
|
6923
6969
|
className: fe,
|
|
6924
|
-
style: { "--wui-logo-size": `${
|
|
6970
|
+
style: { "--wui-logo-size": `${ue}px` },
|
|
6925
6971
|
"aria-busy": a || void 0,
|
|
6926
|
-
disabled:
|
|
6972
|
+
disabled: te,
|
|
6927
6973
|
onClick: ae,
|
|
6928
6974
|
"aria-label": _,
|
|
6929
6975
|
onDragOver: (e) => {
|
|
6930
|
-
e.preventDefault(), !
|
|
6976
|
+
e.preventDefault(), !te && !ee && B(!0);
|
|
6931
6977
|
},
|
|
6932
6978
|
onDragLeave: (e) => {
|
|
6933
|
-
e.preventDefault(),
|
|
6979
|
+
e.preventDefault(), B(!1);
|
|
6934
6980
|
},
|
|
6935
|
-
onDrop:
|
|
6981
|
+
onDrop: ce,
|
|
6936
6982
|
...k,
|
|
6937
6983
|
children: /* @__PURE__ */ m("span", {
|
|
6938
6984
|
className: "set-uploader-ring",
|
|
@@ -6953,14 +6999,14 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6953
6999
|
"aria-hidden": "true",
|
|
6954
7000
|
children: /* @__PURE__ */ p(V, {
|
|
6955
7001
|
name: "refresh-cw",
|
|
6956
|
-
size:
|
|
7002
|
+
size: H,
|
|
6957
7003
|
className: "wui-spin"
|
|
6958
7004
|
})
|
|
6959
7005
|
}) : !c && /* @__PURE__ */ m("span", {
|
|
6960
7006
|
className: "set-uploader-overlay",
|
|
6961
7007
|
children: [/* @__PURE__ */ p(V, {
|
|
6962
7008
|
name: h,
|
|
6963
|
-
size:
|
|
7009
|
+
size: H
|
|
6964
7010
|
}), /* @__PURE__ */ p("span", { children: g })]
|
|
6965
7011
|
})]
|
|
6966
7012
|
})
|
|
@@ -6971,7 +7017,7 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6971
7017
|
hidden: !ie,
|
|
6972
7018
|
"aria-label": "Remove photo",
|
|
6973
7019
|
title: "Remove photo",
|
|
6974
|
-
onClick:
|
|
7020
|
+
onClick: le,
|
|
6975
7021
|
children: /* @__PURE__ */ p(V, {
|
|
6976
7022
|
name: "x",
|
|
6977
7023
|
size: 14
|
|
@@ -6984,8 +7030,8 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6984
7030
|
name: n,
|
|
6985
7031
|
hidden: !0,
|
|
6986
7032
|
accept: l,
|
|
6987
|
-
onChange:
|
|
6988
|
-
disabled:
|
|
7033
|
+
onChange: se,
|
|
7034
|
+
disabled: te
|
|
6989
7035
|
})
|
|
6990
7036
|
]
|
|
6991
7037
|
}), he = y && !re && /* @__PURE__ */ p("div", {
|
|
@@ -7013,13 +7059,13 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
7013
7059
|
ge
|
|
7014
7060
|
]
|
|
7015
7061
|
});
|
|
7016
|
-
return
|
|
7062
|
+
return pe ? /* @__PURE__ */ m("div", {
|
|
7017
7063
|
className: `field set-uploader-field set-uploader-field--inline${O ? ` ${O}` : ""}`,
|
|
7018
7064
|
children: [_e, /* @__PURE__ */ m("div", {
|
|
7019
7065
|
className: "set-uploader-row",
|
|
7020
7066
|
children: [me, ve]
|
|
7021
7067
|
})]
|
|
7022
|
-
}) :
|
|
7068
|
+
}) : U ? /* @__PURE__ */ m("div", {
|
|
7023
7069
|
className: `field set-uploader-field set-uploader-field--profile${O ? ` ${O}` : ""}`,
|
|
7024
7070
|
children: [
|
|
7025
7071
|
_e,
|
|
@@ -7038,27 +7084,27 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
7038
7084
|
}
|
|
7039
7085
|
//#endregion
|
|
7040
7086
|
//#region src/components/AppMeter.jsx
|
|
7041
|
-
var
|
|
7087
|
+
var br = [
|
|
7042
7088
|
"info",
|
|
7043
7089
|
"success",
|
|
7044
7090
|
"warning",
|
|
7045
7091
|
"danger",
|
|
7046
7092
|
"neutral"
|
|
7047
7093
|
];
|
|
7048
|
-
function
|
|
7094
|
+
function xr(e, t, n) {
|
|
7049
7095
|
let r = n - t;
|
|
7050
7096
|
if (!(r > 0)) return 0;
|
|
7051
7097
|
let i = Math.min(100, Math.max(0, (e - t) / r * 100));
|
|
7052
7098
|
return Number(i.toFixed(2));
|
|
7053
7099
|
}
|
|
7054
|
-
function
|
|
7100
|
+
function Sr(e, t, n, r, i) {
|
|
7055
7101
|
if (t == null && n == null) return i;
|
|
7056
7102
|
let a = "mid";
|
|
7057
7103
|
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";
|
|
7058
7104
|
}
|
|
7059
|
-
function
|
|
7105
|
+
function Cr({ 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 }) {
|
|
7060
7106
|
N("AppMeter", d);
|
|
7061
|
-
let f =
|
|
7107
|
+
let f = Sr(e, a, o, i, br.includes(r) ? r : "info"), m = xr(e, t, n);
|
|
7062
7108
|
return /* @__PURE__ */ p("div", {
|
|
7063
7109
|
className: `progress${s === "sm" ? " progress-sm" : ""}${u ? ` ${u}` : ""}`,
|
|
7064
7110
|
role: "meter",
|
|
@@ -7076,20 +7122,20 @@ function _r({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
7076
7122
|
}
|
|
7077
7123
|
//#endregion
|
|
7078
7124
|
//#region src/components/AppMultiSelect.jsx
|
|
7079
|
-
var
|
|
7125
|
+
var wr = 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) {
|
|
7080
7126
|
N("AppMultiSelect", S);
|
|
7081
7127
|
let w = s(), T = f || w, { setRef: E, innerRef: D } = Q({
|
|
7082
7128
|
ref: C,
|
|
7083
7129
|
value: e,
|
|
7084
7130
|
onChange: t,
|
|
7085
|
-
readValue:
|
|
7086
|
-
writeValue:
|
|
7131
|
+
readValue: Yt,
|
|
7132
|
+
writeValue: Xt
|
|
7087
7133
|
});
|
|
7088
7134
|
return o(() => {
|
|
7089
7135
|
let e = D.current;
|
|
7090
7136
|
if (!e) return;
|
|
7091
7137
|
let t = n || [];
|
|
7092
|
-
|
|
7138
|
+
Jt(t, e.options) || (e.options = t);
|
|
7093
7139
|
}, [n, D]), /* @__PURE__ */ m("div", {
|
|
7094
7140
|
className: `field${x ? ` ${x}` : ""}`,
|
|
7095
7141
|
children: [
|
|
@@ -7099,7 +7145,7 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7099
7145
|
children: [
|
|
7100
7146
|
h,
|
|
7101
7147
|
v && /* @__PURE__ */ p(Z, {}),
|
|
7102
|
-
y && /* @__PURE__ */ p(
|
|
7148
|
+
y && /* @__PURE__ */ p(Wt, {
|
|
7103
7149
|
label: b,
|
|
7104
7150
|
children: y
|
|
7105
7151
|
})
|
|
@@ -7133,7 +7179,7 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7133
7179
|
}) : null
|
|
7134
7180
|
]
|
|
7135
7181
|
});
|
|
7136
|
-
}),
|
|
7182
|
+
}), Tr = 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) {
|
|
7137
7183
|
N("AppNumberInput", T);
|
|
7138
7184
|
let D = s(), O = y || D, k = (e) => {
|
|
7139
7185
|
if (g === 0) return Math.round(e);
|
|
@@ -7153,7 +7199,7 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7153
7199
|
let F = (e) => {
|
|
7154
7200
|
let t = (j(M) ?? A(0)) + e * h, n = A(k(t));
|
|
7155
7201
|
P(String(n)), l?.(n);
|
|
7156
|
-
}, 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,
|
|
7202
|
+
}, 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 = [
|
|
7157
7203
|
"input",
|
|
7158
7204
|
v === "sm" ? "input-sm" : "",
|
|
7159
7205
|
v === "lg" ? "input-lg" : "",
|
|
@@ -7181,11 +7227,11 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7181
7227
|
name: b,
|
|
7182
7228
|
type: "text",
|
|
7183
7229
|
inputMode: g > 0 ? "decimal" : "numeric",
|
|
7184
|
-
className:
|
|
7230
|
+
className: te,
|
|
7185
7231
|
disabled: w,
|
|
7186
7232
|
required: t,
|
|
7187
7233
|
"aria-invalid": n ? "true" : "false",
|
|
7188
|
-
"aria-describedby":
|
|
7234
|
+
"aria-describedby": B,
|
|
7189
7235
|
value: M,
|
|
7190
7236
|
ref: E,
|
|
7191
7237
|
onChange: ne,
|
|
@@ -7238,7 +7284,7 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7238
7284
|
children: [
|
|
7239
7285
|
e,
|
|
7240
7286
|
t && /* @__PURE__ */ p(Z, {}),
|
|
7241
|
-
i && /* @__PURE__ */ p(
|
|
7287
|
+
i && /* @__PURE__ */ p(Wt, {
|
|
7242
7288
|
label: a,
|
|
7243
7289
|
children: i
|
|
7244
7290
|
})
|
|
@@ -7256,54 +7302,48 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7256
7302
|
}) : null
|
|
7257
7303
|
]
|
|
7258
7304
|
});
|
|
7259
|
-
}),
|
|
7260
|
-
N("AppOtpInput",
|
|
7261
|
-
let
|
|
7262
|
-
ref:
|
|
7305
|
+
}), Er = 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 }, _) {
|
|
7306
|
+
N("AppOtpInput", g);
|
|
7307
|
+
let v = s(), y = f || v, { setRef: b } = Q({
|
|
7308
|
+
ref: _,
|
|
7263
7309
|
value: e ?? "",
|
|
7264
|
-
onChange: t
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
let e = S.current;
|
|
7268
|
-
if (!e) return;
|
|
7269
|
-
let t = (e) => n?.(e.detail);
|
|
7270
|
-
return e.addEventListener("complete", t), () => e.removeEventListener("complete", t);
|
|
7271
|
-
}, [n, S]);
|
|
7272
|
-
let C = /* @__PURE__ */ p("wui-otp", {
|
|
7310
|
+
onChange: t,
|
|
7311
|
+
on: { complete: (e) => n?.(e.detail) }
|
|
7312
|
+
}), x = /* @__PURE__ */ p("wui-otp", {
|
|
7273
7313
|
"aria-label": typeof a == "string" ? a : void 0,
|
|
7274
|
-
ref:
|
|
7275
|
-
id:
|
|
7276
|
-
name:
|
|
7314
|
+
ref: b,
|
|
7315
|
+
id: y,
|
|
7316
|
+
name: d,
|
|
7277
7317
|
length: String(r),
|
|
7278
7318
|
mode: i,
|
|
7279
|
-
"aria-invalid":
|
|
7280
|
-
disabled:
|
|
7281
|
-
required:
|
|
7282
|
-
...
|
|
7319
|
+
"aria-invalid": l ? "true" : void 0,
|
|
7320
|
+
disabled: u ? "" : void 0,
|
|
7321
|
+
required: o ? "" : void 0,
|
|
7322
|
+
...g
|
|
7283
7323
|
});
|
|
7284
|
-
return !a && !
|
|
7285
|
-
className: `field${
|
|
7324
|
+
return !a && !l && !c ? x : /* @__PURE__ */ m("div", {
|
|
7325
|
+
className: `field${h ? ` ${h}` : ""}`,
|
|
7286
7326
|
children: [
|
|
7287
7327
|
a && /* @__PURE__ */ m("label", {
|
|
7288
7328
|
className: "label",
|
|
7289
|
-
htmlFor:
|
|
7290
|
-
children: [a,
|
|
7329
|
+
htmlFor: y,
|
|
7330
|
+
children: [a, o && /* @__PURE__ */ p(Z, {})]
|
|
7291
7331
|
}),
|
|
7292
|
-
|
|
7293
|
-
|
|
7332
|
+
x,
|
|
7333
|
+
l && /* @__PURE__ */ p("div", {
|
|
7294
7334
|
className: "field-error",
|
|
7295
|
-
children:
|
|
7335
|
+
children: l
|
|
7296
7336
|
}),
|
|
7297
|
-
!
|
|
7337
|
+
!l && c && /* @__PURE__ */ p("div", {
|
|
7298
7338
|
className: "field-hint",
|
|
7299
|
-
children:
|
|
7339
|
+
children: c
|
|
7300
7340
|
})
|
|
7301
7341
|
]
|
|
7302
7342
|
});
|
|
7303
7343
|
});
|
|
7304
7344
|
//#endregion
|
|
7305
7345
|
//#region src/components/AppPageHeader.jsx
|
|
7306
|
-
function
|
|
7346
|
+
function Dr({ 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 }) {
|
|
7307
7347
|
N("AppPageHeader", h);
|
|
7308
7348
|
let g = [
|
|
7309
7349
|
"page-header",
|
|
@@ -7362,9 +7402,9 @@ function xr({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
7362
7402
|
}
|
|
7363
7403
|
//#endregion
|
|
7364
7404
|
//#region src/components/AppPagination.jsx
|
|
7365
|
-
function
|
|
7405
|
+
function Or({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
7366
7406
|
if (N("AppPagination", s), t <= 1) return null;
|
|
7367
|
-
let c =
|
|
7407
|
+
let c = zn(e, t, { siblingCount: r });
|
|
7368
7408
|
return /* @__PURE__ */ p("nav", {
|
|
7369
7409
|
className: [
|
|
7370
7410
|
"pagination-nav",
|
|
@@ -7422,7 +7462,7 @@ function Sr({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
7422
7462
|
}
|
|
7423
7463
|
//#endregion
|
|
7424
7464
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
7425
|
-
var
|
|
7465
|
+
var kr = 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 }, _) {
|
|
7426
7466
|
N("AppPhoneNumberInput", g);
|
|
7427
7467
|
let v = s(), y = i || v, b = l && y ? `${y}-error` : void 0, { setRef: x } = Q({
|
|
7428
7468
|
ref: _,
|
|
@@ -7462,7 +7502,7 @@ var Cr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
7462
7502
|
});
|
|
7463
7503
|
//#endregion
|
|
7464
7504
|
//#region src/components/AppPricingCard.jsx
|
|
7465
|
-
function
|
|
7505
|
+
function Ar({ 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 }) {
|
|
7466
7506
|
return N("AppPricingCard", u), /* @__PURE__ */ m("div", {
|
|
7467
7507
|
className: [
|
|
7468
7508
|
"plan-card",
|
|
@@ -7516,21 +7556,21 @@ function wr({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
7516
7556
|
}
|
|
7517
7557
|
//#endregion
|
|
7518
7558
|
//#region src/components/AppProgress.jsx
|
|
7519
|
-
var
|
|
7559
|
+
var jr = [
|
|
7520
7560
|
"info",
|
|
7521
7561
|
"success",
|
|
7522
7562
|
"warning",
|
|
7523
7563
|
"danger",
|
|
7524
7564
|
"neutral"
|
|
7525
7565
|
];
|
|
7526
|
-
function
|
|
7566
|
+
function Mr(e, t) {
|
|
7527
7567
|
if (!(t > 0)) return 0;
|
|
7528
7568
|
let n = Math.min(100, Math.max(0, e / t * 100));
|
|
7529
7569
|
return Number(n.toFixed(2));
|
|
7530
7570
|
}
|
|
7531
|
-
function
|
|
7571
|
+
function Nr({ 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 }) {
|
|
7532
7572
|
N("AppProgress", u);
|
|
7533
|
-
let d =
|
|
7573
|
+
let d = jr.includes(n) ? n : "info", f = Mr(e, t), m = `progress${r === "sm" ? " progress-sm" : ""}${l ? ` ${l}` : ""}`, h = [
|
|
7534
7574
|
"progress-bar",
|
|
7535
7575
|
`wui-progress-${d}`,
|
|
7536
7576
|
o || s ? "progress-bar-striped" : "",
|
|
@@ -7554,8 +7594,8 @@ function Dr({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", labe
|
|
|
7554
7594
|
}
|
|
7555
7595
|
//#endregion
|
|
7556
7596
|
//#region src/components/AppRadio.jsx
|
|
7557
|
-
var
|
|
7558
|
-
return N("AppRadio", o), /* @__PURE__ */ p(
|
|
7597
|
+
var Pr = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
7598
|
+
return N("AppRadio", o), /* @__PURE__ */ p(vn, {
|
|
7559
7599
|
ref: s,
|
|
7560
7600
|
label: e,
|
|
7561
7601
|
id: t,
|
|
@@ -7570,7 +7610,7 @@ var Or = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
7570
7610
|
});
|
|
7571
7611
|
//#endregion
|
|
7572
7612
|
//#region src/components/AppRepeater.jsx
|
|
7573
|
-
function
|
|
7613
|
+
function Fr({ 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 }) {
|
|
7574
7614
|
N("AppRepeater", d);
|
|
7575
7615
|
let f = typeof c == "number" && e.length >= c, h = !!r && e.length > s;
|
|
7576
7616
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7592,7 +7632,7 @@ function kr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7592
7632
|
className: "repeater-body",
|
|
7593
7633
|
children: t(e, n)
|
|
7594
7634
|
}),
|
|
7595
|
-
h && /* @__PURE__ */ p(
|
|
7635
|
+
h && /* @__PURE__ */ p(de, {
|
|
7596
7636
|
icon: "trash-2",
|
|
7597
7637
|
label: `${a} ${n + 1}`,
|
|
7598
7638
|
danger: !0,
|
|
@@ -7601,7 +7641,7 @@ function kr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7601
7641
|
})
|
|
7602
7642
|
]
|
|
7603
7643
|
}, e.id ?? n)),
|
|
7604
|
-
/* @__PURE__ */ p(
|
|
7644
|
+
/* @__PURE__ */ p(ye, {
|
|
7605
7645
|
variant: "secondary",
|
|
7606
7646
|
size: "sm",
|
|
7607
7647
|
leftIcon: "plus",
|
|
@@ -7615,7 +7655,7 @@ function kr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7615
7655
|
}
|
|
7616
7656
|
//#endregion
|
|
7617
7657
|
//#region src/components/AppResourceCard.jsx
|
|
7618
|
-
function
|
|
7658
|
+
function Ir({ icon: e, title: t, text: n, href: r, external: i = !1, linkComponent: a, className: o = "", ...s }) {
|
|
7619
7659
|
N("AppResourceCard", s);
|
|
7620
7660
|
let c = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
7621
7661
|
className: "res-card-icon",
|
|
@@ -7649,7 +7689,7 @@ function Ar({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
7649
7689
|
}
|
|
7650
7690
|
//#endregion
|
|
7651
7691
|
//#region src/components/AppResult.jsx
|
|
7652
|
-
var
|
|
7692
|
+
var Lr = {
|
|
7653
7693
|
success: {
|
|
7654
7694
|
icon: "check-circle",
|
|
7655
7695
|
tone: "success"
|
|
@@ -7670,9 +7710,9 @@ var jr = {
|
|
|
7670
7710
|
404: { tone: "muted" },
|
|
7671
7711
|
500: { tone: "muted" }
|
|
7672
7712
|
};
|
|
7673
|
-
function
|
|
7674
|
-
N("AppResult", s),
|
|
7675
|
-
let c =
|
|
7713
|
+
function Rr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, children: a, className: o = "", ...s }) {
|
|
7714
|
+
N("AppResult", s), W("AppResult", "status", e, Object.keys(Lr));
|
|
7715
|
+
let c = Lr[e] || Lr.info, l = c.tone, u = /^\d+$/.test(e), d = r ?? (u ? null : c.icon);
|
|
7676
7716
|
return /* @__PURE__ */ m("div", {
|
|
7677
7717
|
className: [
|
|
7678
7718
|
"result",
|
|
@@ -7710,7 +7750,7 @@ function Mr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
7710
7750
|
}
|
|
7711
7751
|
//#endregion
|
|
7712
7752
|
//#region src/components/AppScrollbar.jsx
|
|
7713
|
-
function
|
|
7753
|
+
function zr({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
7714
7754
|
return N("AppScrollbar", i), /* @__PURE__ */ p("div", {
|
|
7715
7755
|
className: t ? `wui-scroll ${t}` : "wui-scroll",
|
|
7716
7756
|
style: n == null ? r : {
|
|
@@ -7723,7 +7763,7 @@ function Nr({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
|
7723
7763
|
}
|
|
7724
7764
|
//#endregion
|
|
7725
7765
|
//#region src/components/AppSearch.jsx
|
|
7726
|
-
function
|
|
7766
|
+
function Br({ 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 }) {
|
|
7727
7767
|
N("AppSearch", u);
|
|
7728
7768
|
let d = t || n;
|
|
7729
7769
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7770,7 +7810,7 @@ function Pr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
7770
7810
|
}
|
|
7771
7811
|
//#endregion
|
|
7772
7812
|
//#region src/components/AppSegmented.jsx
|
|
7773
|
-
function
|
|
7813
|
+
function Vr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a = "md", fullWidth: l = !1, disabled: d = !1, className: f = "", ...h }) {
|
|
7774
7814
|
N("AppSegmented", h);
|
|
7775
7815
|
let g = s(), _ = i || g, v = u(null), y = u(null), b = [
|
|
7776
7816
|
"segmented",
|
|
@@ -7845,7 +7885,7 @@ function Fr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
7845
7885
|
}
|
|
7846
7886
|
//#endregion
|
|
7847
7887
|
//#region src/components/AppSelect.jsx
|
|
7848
|
-
var
|
|
7888
|
+
var Hr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ur = 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) {
|
|
7849
7889
|
N("AppSelect", O);
|
|
7850
7890
|
let A = s(), { setRef: j, innerRef: M } = Q({
|
|
7851
7891
|
ref: k,
|
|
@@ -7857,10 +7897,10 @@ var Ir = (e) => e == null ? "" : e.label ?? e.text ?? "", Lr = i(function({ valu
|
|
|
7857
7897
|
if (!e) return;
|
|
7858
7898
|
let t = n.map((e) => ({
|
|
7859
7899
|
value: e.value,
|
|
7860
|
-
label:
|
|
7900
|
+
label: Hr(e),
|
|
7861
7901
|
icon: e.icon
|
|
7862
7902
|
}));
|
|
7863
|
-
|
|
7903
|
+
Jt(t, e.options) || (e.options = t);
|
|
7864
7904
|
}, [n, M]);
|
|
7865
7905
|
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", {
|
|
7866
7906
|
"aria-label": T || (typeof h == "string" ? h : void 0),
|
|
@@ -7893,7 +7933,7 @@ var Ir = (e) => e == null ? "" : e.label ?? e.text ?? "", Lr = i(function({ valu
|
|
|
7893
7933
|
children: [
|
|
7894
7934
|
h,
|
|
7895
7935
|
g && /* @__PURE__ */ p(Z, {}),
|
|
7896
|
-
y && /* @__PURE__ */ p(
|
|
7936
|
+
y && /* @__PURE__ */ p(Wt, {
|
|
7897
7937
|
label: b,
|
|
7898
7938
|
children: y
|
|
7899
7939
|
})
|
|
@@ -7921,7 +7961,7 @@ var Ir = (e) => e == null ? "" : e.label ?? e.text ?? "", Lr = i(function({ valu
|
|
|
7921
7961
|
});
|
|
7922
7962
|
//#endregion
|
|
7923
7963
|
//#region src/components/AppShell.jsx
|
|
7924
|
-
function
|
|
7964
|
+
function Wr({ 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 }) {
|
|
7925
7965
|
N("AppShell", y);
|
|
7926
7966
|
let [b, x] = d(!1), [S, C] = d(!1), [w, T] = d(!1), E = u ?? b, D = () => {
|
|
7927
7967
|
let e = !E;
|
|
@@ -7969,7 +8009,7 @@ function Rr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
7969
8009
|
children: [e.label && /* @__PURE__ */ p("div", {
|
|
7970
8010
|
className: "app-nav-group-label",
|
|
7971
8011
|
children: e.label
|
|
7972
|
-
}), e.items.map((e) => /* @__PURE__ */ p(
|
|
8012
|
+
}), e.items.map((e) => /* @__PURE__ */ p(Gr, {
|
|
7973
8013
|
item: e,
|
|
7974
8014
|
linkComponent: _,
|
|
7975
8015
|
onNavigate: () => C(!1)
|
|
@@ -8036,7 +8076,7 @@ function Rr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
8036
8076
|
]
|
|
8037
8077
|
});
|
|
8038
8078
|
}
|
|
8039
|
-
function
|
|
8079
|
+
function Gr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
8040
8080
|
let i = Array.isArray(e.children) && e.children.length > 0, a = i && e.children.some((e) => e.active), [s, c] = d(a);
|
|
8041
8081
|
o(() => {
|
|
8042
8082
|
a && !s && c(!0);
|
|
@@ -8076,7 +8116,7 @@ function zr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8076
8116
|
className: `app-nav-sub${s ? " expanded" : ""}`,
|
|
8077
8117
|
children: /* @__PURE__ */ p("div", {
|
|
8078
8118
|
className: "app-nav-sub-inner",
|
|
8079
|
-
children: e.children.map((e) => /* @__PURE__ */ p(
|
|
8119
|
+
children: e.children.map((e) => /* @__PURE__ */ p(Gr, {
|
|
8080
8120
|
item: e,
|
|
8081
8121
|
linkComponent: t,
|
|
8082
8122
|
onNavigate: n,
|
|
@@ -8117,7 +8157,7 @@ function zr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8117
8157
|
}
|
|
8118
8158
|
//#endregion
|
|
8119
8159
|
//#region src/components/AppSidebarMenu.jsx
|
|
8120
|
-
var
|
|
8160
|
+
var Kr = {
|
|
8121
8161
|
left: "start",
|
|
8122
8162
|
right: "end",
|
|
8123
8163
|
start: "start",
|
|
@@ -8125,9 +8165,9 @@ var Br = {
|
|
|
8125
8165
|
top: "top",
|
|
8126
8166
|
bottom: "bottom"
|
|
8127
8167
|
};
|
|
8128
|
-
function
|
|
8129
|
-
N("AppSidebarMenu", b),
|
|
8130
|
-
let { style: x, ...S } = b, w =
|
|
8168
|
+
function qr({ 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 }) {
|
|
8169
|
+
N("AppSidebarMenu", b), W("AppSidebarMenu", "side", n, Object.keys(Kr));
|
|
8170
|
+
let { style: x, ...S } = b, w = Kr[n] || "end", T = c || l || x ? {
|
|
8131
8171
|
...c && { "--asm-width": c },
|
|
8132
8172
|
...l && { "--asm-max-width": l },
|
|
8133
8173
|
...x
|
|
@@ -8156,7 +8196,7 @@ function Vr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8156
8196
|
size: 18
|
|
8157
8197
|
})
|
|
8158
8198
|
}), r]
|
|
8159
|
-
}), h && /* @__PURE__ */ p(
|
|
8199
|
+
}), h && /* @__PURE__ */ p(ye, {
|
|
8160
8200
|
variant: "ghost",
|
|
8161
8201
|
className: "btn-icon",
|
|
8162
8202
|
onClick: t,
|
|
@@ -8180,14 +8220,14 @@ function Vr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8180
8220
|
}
|
|
8181
8221
|
//#endregion
|
|
8182
8222
|
//#region src/components/AppSlider.jsx
|
|
8183
|
-
var
|
|
8223
|
+
var Jr = 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) {
|
|
8184
8224
|
N("AppSlider", E);
|
|
8185
8225
|
let O = s(), k = C || d || r && f || O, A = r, { setRef: j, innerRef: M } = Q({
|
|
8186
8226
|
ref: D,
|
|
8187
8227
|
value: A ? void 0 : e,
|
|
8188
8228
|
onChange: i,
|
|
8189
|
-
readValue: A ?
|
|
8190
|
-
writeValue: A ? void 0 :
|
|
8229
|
+
readValue: A ? Zt : void 0,
|
|
8230
|
+
writeValue: A ? void 0 : Qt
|
|
8191
8231
|
});
|
|
8192
8232
|
o(() => {
|
|
8193
8233
|
if (!A) return;
|
|
@@ -8241,14 +8281,14 @@ var Hr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
8241
8281
|
})
|
|
8242
8282
|
]
|
|
8243
8283
|
});
|
|
8244
|
-
}),
|
|
8284
|
+
}), Yr = {
|
|
8245
8285
|
sm: 44,
|
|
8246
8286
|
md: 56,
|
|
8247
8287
|
lg: 72
|
|
8248
8288
|
};
|
|
8249
|
-
function
|
|
8250
|
-
N("AppSplash", c),
|
|
8251
|
-
let { style: l, ...u } = c, d = typeof a == "number" ? a :
|
|
8289
|
+
function Xr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", size: a = "md", label: o = "Loading", className: s = "", ...c }) {
|
|
8290
|
+
N("AppSplash", c), W("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(Yr));
|
|
8291
|
+
let { style: l, ...u } = c, d = typeof a == "number" ? a : Yr[a] ?? Yr.md, f = i === "ring" ? /* @__PURE__ */ p("span", {
|
|
8252
8292
|
className: "splash-ring",
|
|
8253
8293
|
"aria-hidden": "true"
|
|
8254
8294
|
}) : i === "dots" ? /* @__PURE__ */ m("span", {
|
|
@@ -8295,7 +8335,7 @@ function Wr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
8295
8335
|
}
|
|
8296
8336
|
//#endregion
|
|
8297
8337
|
//#region src/components/AppStatusBadge.jsx
|
|
8298
|
-
function
|
|
8338
|
+
function Zr({ label: e, tone: t = "neutral", className: n = "", ...r }) {
|
|
8299
8339
|
return N("AppStatusBadge", r), e == null || e === "" ? "—" : /* @__PURE__ */ p("span", {
|
|
8300
8340
|
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
8301
8341
|
...r,
|
|
@@ -8304,7 +8344,7 @@ function Gr({ label: e, tone: t = "neutral", className: n = "", ...r }) {
|
|
|
8304
8344
|
}
|
|
8305
8345
|
//#endregion
|
|
8306
8346
|
//#region src/components/AppStepper.jsx
|
|
8307
|
-
function
|
|
8347
|
+
function Qr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal", activeStep: r, onStepClick: i, label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
8308
8348
|
N("AppStepper", c);
|
|
8309
8349
|
let l = t === "journey";
|
|
8310
8350
|
return /* @__PURE__ */ p("nav", {
|
|
@@ -8317,7 +8357,7 @@ function Kr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8317
8357
|
"aria-label": a,
|
|
8318
8358
|
...c,
|
|
8319
8359
|
children: e.map((t, n) => {
|
|
8320
|
-
let a = t.status ||
|
|
8360
|
+
let a = t.status || $r(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
8321
8361
|
c = a === "done" ? /* @__PURE__ */ p(V, {
|
|
8322
8362
|
name: "check",
|
|
8323
8363
|
size: 14
|
|
@@ -8381,13 +8421,13 @@ function Kr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8381
8421
|
})
|
|
8382
8422
|
});
|
|
8383
8423
|
}
|
|
8384
|
-
function
|
|
8424
|
+
function $r(e, t) {
|
|
8385
8425
|
return typeof t == "number" ? e < t ? "done" : e === t ? "active" : "pending" : "pending";
|
|
8386
8426
|
}
|
|
8387
8427
|
//#endregion
|
|
8388
8428
|
//#region src/components/AppSwitch.jsx
|
|
8389
|
-
var
|
|
8390
|
-
return N("AppSwitch", s), /* @__PURE__ */ p(
|
|
8429
|
+
var ei = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "pill", className: o = "", ...s }, c) {
|
|
8430
|
+
return N("AppSwitch", s), /* @__PURE__ */ p(vn, {
|
|
8391
8431
|
ref: c,
|
|
8392
8432
|
label: e,
|
|
8393
8433
|
id: t,
|
|
@@ -8402,7 +8442,7 @@ var Jr = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "p
|
|
|
8402
8442
|
});
|
|
8403
8443
|
//#endregion
|
|
8404
8444
|
//#region src/components/AppTableEmptyState.jsx
|
|
8405
|
-
function
|
|
8445
|
+
function ti({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
8406
8446
|
return N("AppTableEmptyState", i), /* @__PURE__ */ m("div", {
|
|
8407
8447
|
className: "tbl-empty",
|
|
8408
8448
|
...i,
|
|
@@ -8428,13 +8468,13 @@ function Yr({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
8428
8468
|
}
|
|
8429
8469
|
//#endregion
|
|
8430
8470
|
//#region src/components/AppTooltip.jsx
|
|
8431
|
-
var
|
|
8471
|
+
var ni = {
|
|
8432
8472
|
start: "left",
|
|
8433
8473
|
end: "right",
|
|
8434
8474
|
top: "top",
|
|
8435
8475
|
bottom: "bottom"
|
|
8436
8476
|
};
|
|
8437
|
-
function
|
|
8477
|
+
function ri({ content: e, children: t, placement: r = "top", tone: i = "default", size: a = "md", className: o = "", ...c }) {
|
|
8438
8478
|
N("AppTooltip", c);
|
|
8439
8479
|
let l = /* @__PURE__ */ p(E, {
|
|
8440
8480
|
id: s(),
|
|
@@ -8448,14 +8488,14 @@ function Zr({ content: e, children: t, placement: r = "top", tone: i = "default"
|
|
|
8448
8488
|
});
|
|
8449
8489
|
return /* @__PURE__ */ p(w, {
|
|
8450
8490
|
trigger: ["hover", "focus"],
|
|
8451
|
-
placement:
|
|
8491
|
+
placement: ni[r] || r,
|
|
8452
8492
|
overlay: l,
|
|
8453
8493
|
children: n(t, c)
|
|
8454
8494
|
});
|
|
8455
8495
|
}
|
|
8456
8496
|
//#endregion
|
|
8457
8497
|
//#region src/components/AppTabs.jsx
|
|
8458
|
-
function
|
|
8498
|
+
function ii({ 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 }) {
|
|
8459
8499
|
N("AppTabs", v);
|
|
8460
8500
|
let y = u(null), b = u(null), x = i === "vertical", [S, C] = d(t);
|
|
8461
8501
|
o(() => {
|
|
@@ -8562,7 +8602,7 @@ function Qr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8562
8602
|
})
|
|
8563
8603
|
]
|
|
8564
8604
|
}, e.key);
|
|
8565
|
-
return e.tooltip ? /* @__PURE__ */ p(
|
|
8605
|
+
return e.tooltip ? /* @__PURE__ */ p(ri, {
|
|
8566
8606
|
content: e.tooltip,
|
|
8567
8607
|
children: i
|
|
8568
8608
|
}, e.key) : i;
|
|
@@ -8604,14 +8644,14 @@ function Qr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8604
8644
|
}
|
|
8605
8645
|
//#endregion
|
|
8606
8646
|
//#region src/components/AppTagInput.jsx
|
|
8607
|
-
var
|
|
8647
|
+
var ai = 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) {
|
|
8608
8648
|
N("AppTagInput", x);
|
|
8609
8649
|
let C = s(), w = h || r || C, { setRef: T } = Q({
|
|
8610
8650
|
ref: S,
|
|
8611
8651
|
value: e,
|
|
8612
8652
|
onChange: t,
|
|
8613
|
-
readValue:
|
|
8614
|
-
writeValue:
|
|
8653
|
+
readValue: Yt,
|
|
8654
|
+
writeValue: Xt
|
|
8615
8655
|
});
|
|
8616
8656
|
return /* @__PURE__ */ m("div", {
|
|
8617
8657
|
className: `field${v ? ` ${v}` : ""}`,
|
|
@@ -8622,7 +8662,7 @@ var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8622
8662
|
children: [
|
|
8623
8663
|
i,
|
|
8624
8664
|
c && /* @__PURE__ */ p(Z, {}),
|
|
8625
|
-
y && /* @__PURE__ */ p(
|
|
8665
|
+
y && /* @__PURE__ */ p(Wt, {
|
|
8626
8666
|
label: b,
|
|
8627
8667
|
children: y
|
|
8628
8668
|
})
|
|
@@ -8655,69 +8695,78 @@ var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8655
8695
|
}) : null
|
|
8656
8696
|
]
|
|
8657
8697
|
});
|
|
8658
|
-
}),
|
|
8659
|
-
N("AppTextarea",
|
|
8660
|
-
let
|
|
8698
|
+
}), oi = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: l = "More information", id: f, name: h, rows: g = 4, autoGrow: _ = !1, showCount: v = !1, maxLength: y, className: b = "", fieldClassName: S = "", ...C }, w) {
|
|
8699
|
+
N("AppTextarea", C);
|
|
8700
|
+
let T = s(), E = f || T, D = [
|
|
8661
8701
|
"textarea",
|
|
8662
|
-
|
|
8702
|
+
_ ? "autosize" : "",
|
|
8663
8703
|
n ? "error" : "",
|
|
8664
|
-
|
|
8665
|
-
].filter(Boolean).join(" "),
|
|
8666
|
-
|
|
8667
|
-
},
|
|
8668
|
-
let e =
|
|
8704
|
+
b
|
|
8705
|
+
].filter(Boolean).join(" "), O = n && E ? `${E}-error` : void 0, k = r && E ? `${E}-hint` : void 0, A = O || k, j = u(null), M = (e) => {
|
|
8706
|
+
j.current = e, typeof w == "function" ? w(e) : w && (w.current = e);
|
|
8707
|
+
}, P = a(() => {
|
|
8708
|
+
let e = j.current;
|
|
8669
8709
|
e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
8670
8710
|
}, []);
|
|
8671
8711
|
c(() => {
|
|
8672
|
-
|
|
8712
|
+
_ && P();
|
|
8673
8713
|
}, [
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8714
|
+
_,
|
|
8715
|
+
P,
|
|
8716
|
+
C.value
|
|
8677
8717
|
]);
|
|
8678
|
-
let
|
|
8679
|
-
|
|
8718
|
+
let [F, I] = d(() => String(C.value ?? C.defaultValue ?? "").length);
|
|
8719
|
+
o(() => {
|
|
8720
|
+
!v || C.value === void 0 || I(String(C.value ?? "").length);
|
|
8721
|
+
}, [C.value, v]);
|
|
8722
|
+
let L = (e) => {
|
|
8723
|
+
_ && P(), v && I(e.target.value.length), C.onInput?.(e);
|
|
8680
8724
|
};
|
|
8681
8725
|
return /* @__PURE__ */ m(x.Group, {
|
|
8682
|
-
className: `field${
|
|
8726
|
+
className: `field${S ? ` ${S}` : ""}`,
|
|
8683
8727
|
children: [
|
|
8684
8728
|
e && /* @__PURE__ */ m(x.Label, {
|
|
8685
8729
|
className: "label",
|
|
8686
|
-
htmlFor:
|
|
8730
|
+
htmlFor: E,
|
|
8687
8731
|
children: [
|
|
8688
8732
|
e,
|
|
8689
8733
|
t && /* @__PURE__ */ p(Z, {}),
|
|
8690
|
-
i && /* @__PURE__ */ p(
|
|
8691
|
-
label:
|
|
8734
|
+
i && /* @__PURE__ */ p(Wt, {
|
|
8735
|
+
label: l,
|
|
8692
8736
|
children: i
|
|
8693
8737
|
})
|
|
8694
8738
|
]
|
|
8695
8739
|
}),
|
|
8696
8740
|
/* @__PURE__ */ p(x.Control, {
|
|
8697
8741
|
as: "textarea",
|
|
8698
|
-
id:
|
|
8699
|
-
name:
|
|
8700
|
-
rows:
|
|
8701
|
-
className:
|
|
8742
|
+
id: E,
|
|
8743
|
+
name: h,
|
|
8744
|
+
rows: g,
|
|
8745
|
+
className: D,
|
|
8702
8746
|
"aria-invalid": n ? "true" : "false",
|
|
8703
|
-
"aria-describedby":
|
|
8747
|
+
"aria-describedby": A,
|
|
8704
8748
|
required: t,
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8749
|
+
maxLength: y,
|
|
8750
|
+
...C,
|
|
8751
|
+
ref: M,
|
|
8752
|
+
onInput: L
|
|
8708
8753
|
}),
|
|
8709
8754
|
n ? /* @__PURE__ */ p("div", {
|
|
8710
8755
|
className: "field-error",
|
|
8711
|
-
id:
|
|
8756
|
+
id: O,
|
|
8712
8757
|
children: n
|
|
8713
8758
|
}) : r ? /* @__PURE__ */ p("div", {
|
|
8714
8759
|
className: "field-hint",
|
|
8715
|
-
id:
|
|
8760
|
+
id: k,
|
|
8716
8761
|
children: r
|
|
8717
|
-
}) : null
|
|
8762
|
+
}) : null,
|
|
8763
|
+
v && /* @__PURE__ */ m("div", {
|
|
8764
|
+
className: `field-count${y && F >= y ? " at-limit" : ""}`,
|
|
8765
|
+
children: [F, y ? ` / ${y}` : ""]
|
|
8766
|
+
})
|
|
8718
8767
|
]
|
|
8719
8768
|
});
|
|
8720
|
-
}),
|
|
8769
|
+
}), si = {
|
|
8721
8770
|
done: "check",
|
|
8722
8771
|
current: "clock",
|
|
8723
8772
|
"on-hold": "lock",
|
|
@@ -8726,7 +8775,7 @@ var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8726
8775
|
skipped: "arrow-right",
|
|
8727
8776
|
upcoming: null
|
|
8728
8777
|
};
|
|
8729
|
-
function
|
|
8778
|
+
function ci({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
8730
8779
|
N("AppTimeline", o);
|
|
8731
8780
|
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;
|
|
8732
8781
|
return /* @__PURE__ */ p("ol", {
|
|
@@ -8737,7 +8786,7 @@ function ni({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8737
8786
|
} : a,
|
|
8738
8787
|
...o,
|
|
8739
8788
|
children: e.map((e, t) => {
|
|
8740
|
-
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ?
|
|
8789
|
+
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ? si[n] : void 0) : e.icon || "circle";
|
|
8741
8790
|
return /* @__PURE__ */ m("li", {
|
|
8742
8791
|
className: `timeline-item${r}${i}`,
|
|
8743
8792
|
children: [/* @__PURE__ */ p("span", {
|
|
@@ -8795,7 +8844,7 @@ function ni({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8795
8844
|
}
|
|
8796
8845
|
//#endregion
|
|
8797
8846
|
//#region src/components/AppTimePicker.jsx
|
|
8798
|
-
var
|
|
8847
|
+
var li = 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) {
|
|
8799
8848
|
N("AppTimePicker", b);
|
|
8800
8849
|
let S = s(), C = _ || o || S, { setRef: w } = Q({
|
|
8801
8850
|
ref: x,
|
|
@@ -8840,32 +8889,32 @@ var ri = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
8840
8889
|
})
|
|
8841
8890
|
]
|
|
8842
8891
|
});
|
|
8843
|
-
}),
|
|
8844
|
-
function
|
|
8845
|
-
for (let e of
|
|
8892
|
+
}), ui = 6, $ = [], di = /* @__PURE__ */ new Set(), fi = /* @__PURE__ */ new Map(), pi = 0;
|
|
8893
|
+
function mi() {
|
|
8894
|
+
for (let e of di) e($);
|
|
8846
8895
|
}
|
|
8847
|
-
function
|
|
8848
|
-
let t =
|
|
8849
|
-
t !== void 0 && (clearTimeout(t),
|
|
8896
|
+
function hi(e) {
|
|
8897
|
+
let t = fi.get(e);
|
|
8898
|
+
t !== void 0 && (clearTimeout(t), fi.delete(e));
|
|
8850
8899
|
}
|
|
8851
|
-
function
|
|
8852
|
-
if (e.length <=
|
|
8900
|
+
function gi(e) {
|
|
8901
|
+
if (e.length <= ui) return e;
|
|
8853
8902
|
let t = [...e];
|
|
8854
|
-
for (; t.length >
|
|
8903
|
+
for (; t.length > ui;) {
|
|
8855
8904
|
let e = t.findIndex((e) => e.duration !== 0);
|
|
8856
8905
|
t.splice(e === -1 ? 0 : e, 1);
|
|
8857
8906
|
}
|
|
8858
8907
|
return t;
|
|
8859
8908
|
}
|
|
8860
|
-
function
|
|
8861
|
-
return
|
|
8909
|
+
function _i(e) {
|
|
8910
|
+
return di.add(e), e($), () => di.delete(e);
|
|
8862
8911
|
}
|
|
8863
|
-
function
|
|
8912
|
+
function vi(e, t, n = {}) {
|
|
8864
8913
|
let r = n.id, i = r || typeof e != "string" ? void 0 : `${t}:${e}`;
|
|
8865
8914
|
if (r) {
|
|
8866
8915
|
let i = $.find((e) => e.externalId === r);
|
|
8867
8916
|
if (i) {
|
|
8868
|
-
|
|
8917
|
+
hi(i.id);
|
|
8869
8918
|
let r = n.duration === void 0 ? 5e3 : n.duration;
|
|
8870
8919
|
$ = $.map((a) => a.id === i.id ? {
|
|
8871
8920
|
...a,
|
|
@@ -8878,12 +8927,12 @@ function fi(e, t, n = {}) {
|
|
|
8878
8927
|
shape: n.shape,
|
|
8879
8928
|
surface: n.surface,
|
|
8880
8929
|
progress: n.progress
|
|
8881
|
-
} : a),
|
|
8930
|
+
} : a), mi(), r > 0 && fi.set(i.id, setTimeout(() => yi(i.id), r));
|
|
8882
8931
|
return;
|
|
8883
8932
|
}
|
|
8884
8933
|
} else if (i && $.some((e) => e.key === i)) return;
|
|
8885
|
-
let a = ++
|
|
8886
|
-
$ =
|
|
8934
|
+
let a = ++pi, o = n.duration === void 0 ? 5e3 : n.duration;
|
|
8935
|
+
$ = gi([...$, {
|
|
8887
8936
|
id: a,
|
|
8888
8937
|
externalId: r,
|
|
8889
8938
|
message: e,
|
|
@@ -8896,19 +8945,19 @@ function fi(e, t, n = {}) {
|
|
|
8896
8945
|
surface: n.surface,
|
|
8897
8946
|
progress: n.progress,
|
|
8898
8947
|
key: i
|
|
8899
|
-
}]),
|
|
8948
|
+
}]), mi(), o > 0 && fi.set(a, setTimeout(() => yi(a), o));
|
|
8900
8949
|
}
|
|
8901
|
-
function
|
|
8902
|
-
|
|
8950
|
+
function yi(e) {
|
|
8951
|
+
hi(e);
|
|
8903
8952
|
let t = $.filter((t) => t.id !== e);
|
|
8904
|
-
t.length !== $.length && ($ = t,
|
|
8953
|
+
t.length !== $.length && ($ = t, mi());
|
|
8905
8954
|
}
|
|
8906
|
-
function
|
|
8907
|
-
$.length !== 0 && ($ = [],
|
|
8955
|
+
function bi() {
|
|
8956
|
+
$.length !== 0 && ($ = [], mi());
|
|
8908
8957
|
}
|
|
8909
8958
|
//#endregion
|
|
8910
8959
|
//#region src/components/AppToast.jsx
|
|
8911
|
-
var
|
|
8960
|
+
var xi = {
|
|
8912
8961
|
success: {
|
|
8913
8962
|
icon: "check-circle",
|
|
8914
8963
|
assertive: !1
|
|
@@ -8925,7 +8974,7 @@ var hi = {
|
|
|
8925
8974
|
icon: "alert-circle",
|
|
8926
8975
|
assertive: !0
|
|
8927
8976
|
}
|
|
8928
|
-
},
|
|
8977
|
+
}, Si = {
|
|
8929
8978
|
"top-start": "top-0 start-0",
|
|
8930
8979
|
"top-center": "top-0 start-50 translate-middle-x",
|
|
8931
8980
|
"top-end": "top-0 end-0",
|
|
@@ -8933,21 +8982,21 @@ var hi = {
|
|
|
8933
8982
|
"bottom-start": "bottom-0 start-0",
|
|
8934
8983
|
"bottom-center": "bottom-0 start-50 translate-middle-x",
|
|
8935
8984
|
"bottom-end": "bottom-0 end-0"
|
|
8936
|
-
},
|
|
8985
|
+
}, Ci = 64, wi = /* @__PURE__ */ new Set([
|
|
8937
8986
|
"rise",
|
|
8938
8987
|
"organic",
|
|
8939
8988
|
"jelly",
|
|
8940
8989
|
"spring"
|
|
8941
|
-
]),
|
|
8990
|
+
]), Ti = /* @__PURE__ */ new Set([
|
|
8942
8991
|
"rounded",
|
|
8943
8992
|
"pill",
|
|
8944
8993
|
"sharp"
|
|
8945
|
-
]),
|
|
8946
|
-
function
|
|
8947
|
-
N("AppToast", s),
|
|
8994
|
+
]), Ei = /* @__PURE__ */ new Set(["auto", "inverse"]);
|
|
8995
|
+
function Di({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "rise", shape: r = "rounded", surface: i = "auto", className: a = "", ...s }) {
|
|
8996
|
+
N("AppToast", s), W("AppToast", "position", e, Object.keys(Si)), W("AppToast", "animation", n, wi), W("AppToast", "shape", r, Ti), W("AppToast", "surface", i, Ei);
|
|
8948
8997
|
let [c, l] = d([]);
|
|
8949
|
-
o(() =>
|
|
8950
|
-
let u = Math.max(0, c.length - t), f = u ? c.slice(u) : c, h =
|
|
8998
|
+
o(() => _i(l), []);
|
|
8999
|
+
let u = Math.max(0, c.length - t), f = u ? c.slice(u) : c, h = Si[e] ?? Si["bottom-end"];
|
|
8951
9000
|
return /* @__PURE__ */ m("div", {
|
|
8952
9001
|
...s,
|
|
8953
9002
|
className: `wui-toast-container toast-container position-fixed ${h} p-3 ${a}`.trim(),
|
|
@@ -8959,7 +9008,7 @@ function xi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
8959
9008
|
u,
|
|
8960
9009
|
" more"
|
|
8961
9010
|
]
|
|
8962
|
-
}), f.map((e) => /* @__PURE__ */ p(
|
|
9011
|
+
}), f.map((e) => /* @__PURE__ */ p(Oi, {
|
|
8963
9012
|
toast: e,
|
|
8964
9013
|
defaultAnimation: n,
|
|
8965
9014
|
defaultShape: r,
|
|
@@ -8967,8 +9016,8 @@ function xi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
8967
9016
|
}, e.id))]
|
|
8968
9017
|
});
|
|
8969
9018
|
}
|
|
8970
|
-
function
|
|
8971
|
-
let i =
|
|
9019
|
+
function Oi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded", defaultSurface: r = "auto" }) {
|
|
9020
|
+
let i = xi[e.variant] ?? xi.success, a = wi.has(e.animation) ? e.animation : t, o = Ti.has(e.shape) ? e.shape : n, s = Ei.has(e.surface) ? e.surface : r, c = (a !== "rise" && wi.has(a) ? ` wui-toast--anim-${a}` : "") + (o !== "rounded" && Ti.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 = () => yi(e.id), b = (e) => {
|
|
8972
9021
|
e.button !== 0 || e.target.closest("button") || (v.current = e.clientX, _(!0), e.currentTarget.setPointerCapture?.(e.pointerId));
|
|
8973
9022
|
}, x = (e) => {
|
|
8974
9023
|
v.current !== null && h(e.clientX - v.current);
|
|
@@ -8977,7 +9026,7 @@ function Si({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
8977
9026
|
}, C = (e) => {
|
|
8978
9027
|
if (v.current === null) return;
|
|
8979
9028
|
let t = e.clientX - v.current;
|
|
8980
|
-
if (Math.abs(t) >
|
|
9029
|
+
if (Math.abs(t) > Ci) {
|
|
8981
9030
|
y();
|
|
8982
9031
|
return;
|
|
8983
9032
|
}
|
|
@@ -9060,7 +9109,7 @@ function Si({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
9060
9109
|
}
|
|
9061
9110
|
//#endregion
|
|
9062
9111
|
//#region src/components/AppToolbar.jsx
|
|
9063
|
-
function
|
|
9112
|
+
function ki({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelect: i, label: a, name: o, disabled: c = !1, className: l = "", ...u }) {
|
|
9064
9113
|
N("AppToolbar", u);
|
|
9065
9114
|
let f = s(), h = o || f, [g, _] = d(r), v = n === void 0 ? g : n;
|
|
9066
9115
|
return /* @__PURE__ */ m("div", {
|
|
@@ -9118,7 +9167,7 @@ function Ci({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
9118
9167
|
}
|
|
9119
9168
|
//#endregion
|
|
9120
9169
|
//#region src/components/AppWizard.jsx
|
|
9121
|
-
var
|
|
9170
|
+
var Ai = 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) {
|
|
9122
9171
|
N("AppWizard", E);
|
|
9123
9172
|
let O = u(null), k = (e) => {
|
|
9124
9173
|
O.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
@@ -9173,7 +9222,7 @@ var wi = i(function({ steps: t = [], children: n, active: r, defaultActive: i =
|
|
|
9173
9222
|
});
|
|
9174
9223
|
//#endregion
|
|
9175
9224
|
//#region src/components/AppWorkspaceSwitcher.jsx
|
|
9176
|
-
function
|
|
9225
|
+
function ji({ 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 }) {
|
|
9177
9226
|
let { onToggle: x, ...S } = y;
|
|
9178
9227
|
N("AppWorkspaceSwitcher", S);
|
|
9179
9228
|
let [C, w] = d(""), [T, E] = d(!1), D = u(null), O = e.find((e) => e.id === t) ?? e[0], k = l(() => {
|
|
@@ -9201,7 +9250,7 @@ function Ti({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9201
9250
|
},
|
|
9202
9251
|
...S,
|
|
9203
9252
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
9204
|
-
as:
|
|
9253
|
+
as: Fi,
|
|
9205
9254
|
compact: g,
|
|
9206
9255
|
tenant: O,
|
|
9207
9256
|
"aria-label": j
|
|
@@ -9236,7 +9285,7 @@ function Ti({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9236
9285
|
className: `workspace-switcher-option${e.id === O?.id ? " is-active" : ""}`,
|
|
9237
9286
|
onClick: () => n?.(e),
|
|
9238
9287
|
children: [
|
|
9239
|
-
/* @__PURE__ */ p(
|
|
9288
|
+
/* @__PURE__ */ p(Ni, { tenant: e }),
|
|
9240
9289
|
/* @__PURE__ */ p("span", {
|
|
9241
9290
|
className: "workspace-switcher-option-name",
|
|
9242
9291
|
children: e.name
|
|
@@ -9268,17 +9317,17 @@ function Ti({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9268
9317
|
}) : null,
|
|
9269
9318
|
i ? /* @__PURE__ */ p("div", {
|
|
9270
9319
|
className: "workspace-switcher-footer",
|
|
9271
|
-
children:
|
|
9320
|
+
children: Pi(i, a)
|
|
9272
9321
|
}) : null
|
|
9273
9322
|
]
|
|
9274
9323
|
})]
|
|
9275
9324
|
});
|
|
9276
9325
|
}
|
|
9277
|
-
function
|
|
9326
|
+
function Mi(e) {
|
|
9278
9327
|
let t = String(e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
9279
9328
|
return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
|
|
9280
9329
|
}
|
|
9281
|
-
function
|
|
9330
|
+
function Ni({ tenant: e }) {
|
|
9282
9331
|
return e?.logoUrl ? /* @__PURE__ */ p("img", {
|
|
9283
9332
|
className: "workspace-switcher-mark",
|
|
9284
9333
|
src: e.logoUrl,
|
|
@@ -9286,10 +9335,10 @@ function Di({ tenant: e }) {
|
|
|
9286
9335
|
loading: "lazy"
|
|
9287
9336
|
}) : /* @__PURE__ */ p("span", {
|
|
9288
9337
|
className: "workspace-switcher-mark",
|
|
9289
|
-
children:
|
|
9338
|
+
children: Mi(e?.name)
|
|
9290
9339
|
});
|
|
9291
9340
|
}
|
|
9292
|
-
function
|
|
9341
|
+
function Pi(e, t) {
|
|
9293
9342
|
if (typeof e != "object" || !e || !("label" in e)) return e;
|
|
9294
9343
|
let { label: n, icon: r, href: i } = e;
|
|
9295
9344
|
return /* @__PURE__ */ m(i ? t ?? "a" : "button", {
|
|
@@ -9301,7 +9350,7 @@ function Oi(e, t) {
|
|
|
9301
9350
|
}) : null, n]
|
|
9302
9351
|
});
|
|
9303
9352
|
}
|
|
9304
|
-
var
|
|
9353
|
+
var Fi = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i }, a) {
|
|
9305
9354
|
return /* @__PURE__ */ m("button", {
|
|
9306
9355
|
ref: a,
|
|
9307
9356
|
type: "button",
|
|
@@ -9309,7 +9358,7 @@ var ki = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9309
9358
|
"aria-haspopup": "true",
|
|
9310
9359
|
"aria-label": n,
|
|
9311
9360
|
...i,
|
|
9312
|
-
children: [/* @__PURE__ */ p(
|
|
9361
|
+
children: [/* @__PURE__ */ p(Ni, { tenant: t }), e ? null : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
9313
9362
|
className: "workspace-switcher-trigger-name",
|
|
9314
9363
|
children: t?.name
|
|
9315
9364
|
}), /* @__PURE__ */ p(V, {
|
|
@@ -9321,36 +9370,36 @@ var ki = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9321
9370
|
});
|
|
9322
9371
|
//#endregion
|
|
9323
9372
|
//#region src/components/toast.js
|
|
9324
|
-
function
|
|
9325
|
-
|
|
9373
|
+
function Ii() {
|
|
9374
|
+
bi();
|
|
9326
9375
|
}
|
|
9327
|
-
var
|
|
9376
|
+
var Li = /* @__PURE__ */ new Set([
|
|
9328
9377
|
"success",
|
|
9329
9378
|
"info",
|
|
9330
9379
|
"warning",
|
|
9331
9380
|
"error"
|
|
9332
9381
|
]);
|
|
9333
|
-
function
|
|
9382
|
+
function Ri(e, t = "info") {
|
|
9334
9383
|
let n = "info", r = {};
|
|
9335
|
-
typeof t == "string" ? n =
|
|
9384
|
+
typeof t == "string" ? n = Li.has(t) ? t : "info" : typeof t == "object" && t && (r = t, n = Li.has(r.variant) ? r.variant : "info"), vi(e, n, r);
|
|
9336
9385
|
}
|
|
9337
|
-
function
|
|
9338
|
-
|
|
9386
|
+
function zi(e, t = {}) {
|
|
9387
|
+
vi(e, "error", t);
|
|
9339
9388
|
}
|
|
9340
|
-
|
|
9389
|
+
Ri.promise = (e, t, n = {}) => {
|
|
9341
9390
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
9342
|
-
return
|
|
9391
|
+
return Ri(t.loading || "Loading...", {
|
|
9343
9392
|
...n,
|
|
9344
9393
|
variant: "info",
|
|
9345
9394
|
id: r,
|
|
9346
9395
|
duration: 0
|
|
9347
|
-
}), e.then((e) => (
|
|
9396
|
+
}), e.then((e) => (Ri((typeof t.success == "function" ? t.success(e) : t.success) || "Done", {
|
|
9348
9397
|
...n,
|
|
9349
9398
|
variant: "success",
|
|
9350
9399
|
id: r,
|
|
9351
9400
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
9352
9401
|
}), e)).catch((e) => {
|
|
9353
|
-
throw
|
|
9402
|
+
throw Ri((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
9354
9403
|
...n,
|
|
9355
9404
|
variant: "error",
|
|
9356
9405
|
id: r,
|
|
@@ -9360,7 +9409,7 @@ Mi.promise = (e, t, n = {}) => {
|
|
|
9360
9409
|
};
|
|
9361
9410
|
//#endregion
|
|
9362
9411
|
//#region src/lib/usePagination.js
|
|
9363
|
-
function
|
|
9412
|
+
function Bi(e, t = 10) {
|
|
9364
9413
|
let [n, r] = d(1), [i, a] = d(t), s = e.length, c = Math.max(1, Math.ceil(s / i));
|
|
9365
9414
|
o(() => {
|
|
9366
9415
|
n > c && r(c);
|
|
@@ -9386,4 +9435,4 @@ function Pi(e, t = 10) {
|
|
|
9386
9435
|
};
|
|
9387
9436
|
}
|
|
9388
9437
|
//#endregion
|
|
9389
|
-
export {
|
|
9438
|
+
export { ue as AppAccordion, de as AppActionIcon, U as AppAlert, Se as AppAsyncBlock, $t as AppAutocomplete, on as AppAvatar, ln as AppAvatarGroup, un as AppBadge, fn as AppBanner, pn as AppBreadcrumbs, ye as AppButton, hn as AppCallout, _n as AppCard, yn as AppCheckbox, bn as AppChip, xn as AppChoiceCard, Sn as AppChoiceChip, Cn as AppColorField, wn as AppCompareTable, Nn as AppConfirmDialog, Fn as AppCopyButton, Gn as AppDataTable, Kn as AppDatePicker, qn as AppDateRangePicker, Yn as AppDescriptions, Qn as AppDropdown, be as AppEmptyState, ar as AppFileAttachment, sr as AppFilePicker, cr as AppFloatingDock, lr as AppFormActions, ur as AppFormRow, dr as AppFormSection, V as AppIcon, fr as AppInfoList, Wt as AppInfoTip, Tn as AppInput, _r as AppKpiTile, yr as AppLogoPicker, Cr as AppMeter, An as AppModal, wr as AppMultiSelect, Tr as AppNumberInput, Er as AppOtpInput, Dr as AppPageHeader, Or as AppPagination, kr as AppPhoneNumberInput, Ut as AppPopover, Ar as AppPricingCard, Nr as AppProgress, Pr as AppRadio, Fr as AppRepeater, Z as AppRequiredMark, Ir as AppResourceCard, Rr as AppResult, zr as AppScrollbar, Br as AppSearch, Vr as AppSegmented, Ur as AppSelect, Bn as AppSelectMini, Wr as AppShell, qr as AppSidebarMenu, In as AppSkeleton, Ln as AppSkeletonRows, Jr as AppSlider, xe as AppSpinner, Xr as AppSplash, Zr as AppStatusBadge, Qr as AppStepper, ei as AppSwitch, ti as AppTableEmptyState, Hn as AppTablePagination, ii as AppTabs, ai as AppTagInput, oi as AppTextarea, li as AppTimePicker, ci as AppTimeline, Di as AppToast, ki as AppToolbar, ri as AppTooltip, Ai as AppWizard, ji as AppWorkspaceSwitcher, Mn as MODAL_ICONS, Ii as dismissAll, zi as errorToast, se as iconNames, le as registerIcons, Ri as toast, Bi as usePagination };
|