@webority/ui-react 0.9.4 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iconCatalogFull.bold.g-OK3eOiMp.js +947 -0
- package/dist/iconCatalogFull.broken.g-BZsyxXcp.js +947 -0
- package/dist/iconCatalogFull.bulk.g-B7wsb4AN.js +947 -0
- package/dist/iconCatalogFull.g-BKUr0SVj.js +947 -0
- package/dist/iconCatalogFull.outline.g-AOnxJAAj.js +947 -0
- package/dist/iconCatalogFull.twotone.g-DR6Qdpib.js +947 -0
- package/dist/{iconVariants.g-BL1d2HPV.js → iconVariants.g-CLikIWjb.js} +5 -5
- package/dist/types/components/iconCatalogFull.bold.g.d.ts +944 -0
- package/dist/types/components/iconCatalogFull.broken.g.d.ts +944 -0
- package/dist/types/components/iconCatalogFull.bulk.g.d.ts +944 -0
- package/dist/types/components/iconCatalogFull.g.d.ts +0 -4722
- package/dist/types/components/iconCatalogFull.outline.g.d.ts +944 -0
- package/dist/types/components/iconCatalogFull.twotone.g.d.ts +944 -0
- package/dist/types/components/useWuiControl.d.ts +15 -1
- package/dist/ui-react.js +693 -654
- package/package.json +3 -3
- package/dist/iconCatalogFull.g-DHZusHbO.js +0 -5668
package/dist/ui-react.js
CHANGED
|
@@ -78,7 +78,7 @@ var D = /* @__PURE__ */ "aave.activity.add.add-circle.add-square.additem.airdrop
|
|
|
78
78
|
house: "<path d=\"m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12ZM12 17.99v-3\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
79
79
|
image: "<path d=\"M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M9 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM2.67 18.95l4.93-3.31c.79-.53 1.93-.47 2.64.14l.33.29c.78.67 2.04.67 2.82 0l4.16-3.57c.78-.67 2.04-.67 2.82 0L22 13.9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
80
80
|
inbox: "<path d=\"M12 2v7l2-2M12 9l-2-2M1.98 13h4.41c.38 0 .72.21.89.55l1.17 2.34A2 2 0 0 0 10.24 17h3.53a2 2 0 0 0 1.79-1.11l1.17-2.34a1 1 0 0 1 .89-.55h4.36\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M7 4.13c-3.54.52-5 2.6-5 6.87v4c0 5 2 7 7 7h6c5 0 7-2 7-7v-4c0-4.27-1.46-6.35-5-6.87\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
81
|
-
info: "<path d=\"M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M11.995 16h.009\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
81
|
+
info: "<g transform=\"rotate(180 12 12)\"><path d=\"M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M11.995 16h.009\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path></g>",
|
|
82
82
|
key: "<path d=\"M19.79 14.93a7.575 7.575 0 0 1-7.6 1.87l-4.71 4.7c-.34.35-1.01.56-1.49.49l-2.18-.3c-.72-.1-1.39-.78-1.5-1.5l-.3-2.18c-.07-.48.16-1.15.49-1.49l4.7-4.7c-.8-2.6-.18-5.55 1.88-7.6 2.95-2.95 7.74-2.95 10.7 0 2.96 2.95 2.96 7.76.01 10.71ZM6.89 17.49l2.3 2.3\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M14.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
83
83
|
"layout-dashboard": "<path d=\"M5 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3H5C3 2 2 3 2 5v2c0 2 1 3 3 3ZM17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM17 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
84
84
|
"layout-grid": "<path d=\"M17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM6 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM18 22a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
@@ -166,23 +166,41 @@ function N(e, t) {
|
|
|
166
166
|
//#region src/components/AppIcon.jsx
|
|
167
167
|
var P = null, F = null, I = /* @__PURE__ */ new Set();
|
|
168
168
|
function L() {
|
|
169
|
-
return F ||= import("./iconVariants.g-
|
|
169
|
+
return F ||= import("./iconVariants.g-CLikIWjb.js").then((e) => {
|
|
170
170
|
P = e.VARIANT_GLYPHS;
|
|
171
171
|
for (let e of I) e();
|
|
172
172
|
I.clear();
|
|
173
173
|
}), F;
|
|
174
174
|
}
|
|
175
|
-
var R = new Set(D), z = null, ee = null,
|
|
176
|
-
function
|
|
177
|
-
return
|
|
178
|
-
z = e.FULL_GLYPHS
|
|
175
|
+
var R = new Set(D), z = null, ee = null, B = /* @__PURE__ */ new Set();
|
|
176
|
+
function te() {
|
|
177
|
+
return ee ||= import("./iconCatalogFull.g-BKUr0SVj.js").then((e) => {
|
|
178
|
+
z = e.FULL_GLYPHS;
|
|
179
179
|
for (let e of B) e();
|
|
180
180
|
B.clear();
|
|
181
|
-
}),
|
|
181
|
+
}), ee;
|
|
182
|
+
}
|
|
183
|
+
var ne = {
|
|
184
|
+
outline: () => import("./iconCatalogFull.outline.g-AOnxJAAj.js"),
|
|
185
|
+
bold: () => import("./iconCatalogFull.bold.g-OK3eOiMp.js"),
|
|
186
|
+
bulk: () => import("./iconCatalogFull.bulk.g-B7wsb4AN.js"),
|
|
187
|
+
broken: () => import("./iconCatalogFull.broken.g-BZsyxXcp.js"),
|
|
188
|
+
twotone: () => import("./iconCatalogFull.twotone.g-DR6Qdpib.js")
|
|
189
|
+
}, re = Object.create(null), ie = Object.create(null), ae = Object.create(null);
|
|
190
|
+
function oe(e) {
|
|
191
|
+
let t = ne[e];
|
|
192
|
+
return t ? (ie[e] ||= t().then((t) => {
|
|
193
|
+
re[e] = t.FULL_VARIANT_GLYPHS;
|
|
194
|
+
let n = ae[e];
|
|
195
|
+
if (n) {
|
|
196
|
+
for (let e of n) e();
|
|
197
|
+
n.clear();
|
|
198
|
+
}
|
|
199
|
+
}), ie[e]) : null;
|
|
182
200
|
}
|
|
183
|
-
var
|
|
184
|
-
function
|
|
185
|
-
for (let [t, n] of Object.entries(e))
|
|
201
|
+
var se = D, ce = /* @__PURE__ */ new Map();
|
|
202
|
+
function le(e) {
|
|
203
|
+
for (let [t, n] of Object.entries(e)) ce.set(t, n);
|
|
186
204
|
}
|
|
187
205
|
function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color: a, style: s, ...c }) {
|
|
188
206
|
N("AppIcon", c);
|
|
@@ -195,15 +213,16 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
195
213
|
}) : e, h = O[e] !== void 0, g = !h && R.has(e), [, _] = d(0);
|
|
196
214
|
o(() => {
|
|
197
215
|
let e = () => _((e) => e + 1);
|
|
198
|
-
return l && h && !P && (I.add(e), L()), g && !z && (B.add(e),
|
|
199
|
-
I.delete(e), B.delete(e);
|
|
216
|
+
return l && h && !P && (I.add(e), L()), g && !z && (B.add(e), te()), l && g && !re[n] && ((ae[n] ||= /* @__PURE__ */ new Set()).add(e), oe(n)), () => {
|
|
217
|
+
I.delete(e), B.delete(e), ae[n]?.delete(e);
|
|
200
218
|
};
|
|
201
219
|
}, [
|
|
202
220
|
l,
|
|
203
221
|
h,
|
|
204
|
-
g
|
|
222
|
+
g,
|
|
223
|
+
n
|
|
205
224
|
]);
|
|
206
|
-
let v =
|
|
225
|
+
let v = ce.get(e);
|
|
207
226
|
if (v) return f(v({
|
|
208
227
|
size: t,
|
|
209
228
|
color: a,
|
|
@@ -233,7 +252,7 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
233
252
|
}), /* @__PURE__ */ p("path", { d: "M3.2 22.5C3.2 17.4 7.5 14.9 11 14.7L12 17.4l1-2.7C16.5 14.9 20.8 17.4 20.8 22.5z" })]
|
|
234
253
|
})
|
|
235
254
|
}));
|
|
236
|
-
let y = l && (P?.[n]?.[e] ||
|
|
255
|
+
let y = l && (P?.[n]?.[e] || re?.[n]?.[e]) || O[e] || z?.[e];
|
|
237
256
|
return y ? f(/* @__PURE__ */ p("svg", {
|
|
238
257
|
width: t,
|
|
239
258
|
height: t,
|
|
@@ -253,7 +272,7 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
253
272
|
}
|
|
254
273
|
//#endregion
|
|
255
274
|
//#region src/components/AppAccordion.jsx
|
|
256
|
-
function
|
|
275
|
+
function ue({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i }) {
|
|
257
276
|
N("AppAccordion", i);
|
|
258
277
|
let a = s(), o = n || a, [c, l] = d(() => {
|
|
259
278
|
let n = e.map((e, t) => ({
|
|
@@ -314,7 +333,7 @@ function H(e, { size: t = 16, className: n } = {}) {
|
|
|
314
333
|
}
|
|
315
334
|
//#endregion
|
|
316
335
|
//#region src/components/AppActionIcon.jsx
|
|
317
|
-
function
|
|
336
|
+
function de({ icon: e, label: t, danger: n = !1, disabled: r = !1, size: i = 20, onClick: a, className: o = "", as: s, href: c, ...l }) {
|
|
318
337
|
N("AppActionIcon", l);
|
|
319
338
|
let u = [
|
|
320
339
|
"u-action",
|
|
@@ -344,13 +363,13 @@ function se({ icon: e, label: t, danger: n = !1, disabled: r = !1, size: i = 20,
|
|
|
344
363
|
}
|
|
345
364
|
//#endregion
|
|
346
365
|
//#region src/components/AppAlert.jsx
|
|
347
|
-
var
|
|
366
|
+
var fe = {
|
|
348
367
|
info: "info",
|
|
349
368
|
success: "check",
|
|
350
369
|
warning: "alert-triangle",
|
|
351
370
|
danger: "x"
|
|
352
371
|
};
|
|
353
|
-
function
|
|
372
|
+
function pe(e, t, n, r) {
|
|
354
373
|
return n ? /* @__PURE__ */ p("span", {
|
|
355
374
|
className: "alert-icon alert-icon-image",
|
|
356
375
|
children: /* @__PURE__ */ p("img", {
|
|
@@ -368,9 +387,9 @@ function le(e, t, n, r) {
|
|
|
368
387
|
children: e
|
|
369
388
|
}) : null;
|
|
370
389
|
}
|
|
371
|
-
function
|
|
390
|
+
function U({ variant: e = "info", children: t, title: n, icon: r, image: i, imageAlt: a = "", className: o = "", onClose: s, dismissible: c, bordered: l = !0, role: u = "alert", ...d }) {
|
|
372
391
|
N("AppAlert", d);
|
|
373
|
-
let g = r === void 0 ?
|
|
392
|
+
let g = r === void 0 ? fe[e] : r === "none" ? null : r, _ = !!i || !!g, v = n ? /* @__PURE__ */ p("div", {
|
|
374
393
|
className: "alert-heading",
|
|
375
394
|
children: n
|
|
376
395
|
}) : null, y = _ && !!v && !!t, b = y ? 13 : 11;
|
|
@@ -387,7 +406,7 @@ function ue({ variant: e = "info", children: t, title: n, icon: r, image: i, ima
|
|
|
387
406
|
transition: !1,
|
|
388
407
|
role: u,
|
|
389
408
|
...d,
|
|
390
|
-
children: _ ? /* @__PURE__ */ m(f, { children: [
|
|
409
|
+
children: _ ? /* @__PURE__ */ m(f, { children: [pe(g, b, i, a), /* @__PURE__ */ m("div", {
|
|
391
410
|
className: "alert-content",
|
|
392
411
|
children: [v, t]
|
|
393
412
|
})] }) : /* @__PURE__ */ m(f, { children: [v, t] })
|
|
@@ -395,23 +414,23 @@ function ue({ variant: e = "info", children: t, title: n, icon: r, image: i, ima
|
|
|
395
414
|
}
|
|
396
415
|
//#endregion
|
|
397
416
|
//#region src/components/warnInvalidValue.js
|
|
398
|
-
var
|
|
417
|
+
var me = () => {
|
|
399
418
|
try {
|
|
400
419
|
return process.env.NODE_ENV !== "production";
|
|
401
420
|
} catch {
|
|
402
421
|
return !0;
|
|
403
422
|
}
|
|
404
|
-
},
|
|
405
|
-
function
|
|
406
|
-
if (!
|
|
423
|
+
}, he = /* @__PURE__ */ new Set();
|
|
424
|
+
function W(e, t, n, r) {
|
|
425
|
+
if (!me() || n == null) return;
|
|
407
426
|
let i = r instanceof Set ? r : new Set(r);
|
|
408
427
|
if (i.has(n)) return;
|
|
409
428
|
let a = `${e}.${t}.${String(n)}`;
|
|
410
|
-
|
|
429
|
+
he.has(a) || (he.add(a), console.warn(`[@webority/ui-react] <${e}> received ${t}="${String(n)}", which is not one of ${[...i].map((e) => `"${e}"`).join(" | ")}. The component fell back to its default, so this renders something other than what the call site asks for — check the value against the component catalogue at https://ui-react.webority.dev.`));
|
|
411
430
|
}
|
|
412
431
|
//#endregion
|
|
413
432
|
//#region src/components/AppButton.jsx
|
|
414
|
-
var
|
|
433
|
+
var ge = {
|
|
415
434
|
primary: "primary",
|
|
416
435
|
secondary: "secondary",
|
|
417
436
|
outline: "outline-primary",
|
|
@@ -423,25 +442,25 @@ var W = {
|
|
|
423
442
|
warning: "warning",
|
|
424
443
|
subtle: "subtle",
|
|
425
444
|
"outline-light": "outline-light"
|
|
426
|
-
},
|
|
445
|
+
}, _e = {
|
|
427
446
|
sm: 14,
|
|
428
447
|
md: 16,
|
|
429
448
|
lg: 20
|
|
430
449
|
};
|
|
431
|
-
function
|
|
450
|
+
function ve(e, t, n) {
|
|
432
451
|
if (!e) return null;
|
|
433
452
|
let r = t === "left" ? "me-2" : "ms-2";
|
|
434
453
|
return typeof e == "string" ? /* @__PURE__ */ p(V, {
|
|
435
454
|
name: e,
|
|
436
|
-
size:
|
|
455
|
+
size: _e[n] ?? _e.md,
|
|
437
456
|
className: r
|
|
438
457
|
}) : /* @__PURE__ */ p("span", {
|
|
439
458
|
className: `d-inline-flex ${r}`,
|
|
440
459
|
children: e
|
|
441
460
|
});
|
|
442
461
|
}
|
|
443
|
-
function
|
|
444
|
-
N("AppButton", d),
|
|
462
|
+
function ye({ children: e, variant: t = "primary", size: n = "md", type: r = "button", loading: i = !1, disabled: a = !1, block: o = !1, leftIcon: s = null, rightIcon: c = null, href: l, className: u = "", ...d }) {
|
|
463
|
+
N("AppButton", d), W("AppButton", "variant", t, Object.keys(ge)), W("AppButton", "size", n, Object.keys(_e));
|
|
445
464
|
let f = [
|
|
446
465
|
o ? "w-100" : "",
|
|
447
466
|
i ? "is-loading" : "",
|
|
@@ -450,7 +469,7 @@ function he({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
450
469
|
return /* @__PURE__ */ m(v, {
|
|
451
470
|
type: (d.as === void 0 || d.as === "button") && l === void 0 ? r : void 0,
|
|
452
471
|
href: l,
|
|
453
|
-
variant:
|
|
472
|
+
variant: ge[t] ?? "primary",
|
|
454
473
|
size: n === "md" ? void 0 : n,
|
|
455
474
|
disabled: a || i,
|
|
456
475
|
"aria-busy": i || void 0,
|
|
@@ -461,15 +480,15 @@ function he({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
461
480
|
className: "spinner-border spinner-border-sm me-2",
|
|
462
481
|
"aria-hidden": "true"
|
|
463
482
|
}),
|
|
464
|
-
!i &&
|
|
483
|
+
!i && ve(s, "left", n),
|
|
465
484
|
e,
|
|
466
|
-
!i &&
|
|
485
|
+
!i && ve(c, "right", n)
|
|
467
486
|
]
|
|
468
487
|
});
|
|
469
488
|
}
|
|
470
489
|
//#endregion
|
|
471
490
|
//#region src/components/AppEmptyState.jsx
|
|
472
|
-
function
|
|
491
|
+
function be({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, action: a, className: o = "", style: s, ...c }) {
|
|
473
492
|
return N("AppEmptyState", c), /* @__PURE__ */ m("div", {
|
|
474
493
|
className: [
|
|
475
494
|
"empty-state",
|
|
@@ -500,7 +519,7 @@ function ge({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, acti
|
|
|
500
519
|
}
|
|
501
520
|
//#endregion
|
|
502
521
|
//#region src/components/AppSpinner.jsx
|
|
503
|
-
function
|
|
522
|
+
function xe({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
504
523
|
N("AppSpinner", r);
|
|
505
524
|
let { style: i, ...a } = r, o = Number(e), s = Number.isFinite(o) && o > 0;
|
|
506
525
|
return /* @__PURE__ */ p("span", {
|
|
@@ -518,7 +537,7 @@ function _e({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
|
518
537
|
}
|
|
519
538
|
//#endregion
|
|
520
539
|
//#region src/components/AppAsyncBlock.jsx
|
|
521
|
-
function
|
|
540
|
+
function Se({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRetry: i, skeleton: a, className: o = "", ...s }) {
|
|
522
541
|
N("AppAsyncBlock", s);
|
|
523
542
|
let c = `async-block${o ? ` ${o}` : ""}`;
|
|
524
543
|
return e ? /* @__PURE__ */ p("div", {
|
|
@@ -527,17 +546,17 @@ function ve({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
527
546
|
...s,
|
|
528
547
|
children: a ?? /* @__PURE__ */ p("div", {
|
|
529
548
|
className: "d-flex align-items-center justify-content-center py-5",
|
|
530
|
-
children: /* @__PURE__ */ p(
|
|
549
|
+
children: /* @__PURE__ */ p(xe, { label: "Loading" })
|
|
531
550
|
})
|
|
532
551
|
}) : t ? /* @__PURE__ */ p("div", {
|
|
533
552
|
className: c,
|
|
534
553
|
"data-state": "error",
|
|
535
554
|
...s,
|
|
536
|
-
children: /* @__PURE__ */ p(
|
|
555
|
+
children: /* @__PURE__ */ p(be, {
|
|
537
556
|
icon: "alert-circle",
|
|
538
557
|
title: "Something went wrong",
|
|
539
558
|
text: t,
|
|
540
|
-
action: i ? /* @__PURE__ */ p(
|
|
559
|
+
action: i ? /* @__PURE__ */ p(ye, {
|
|
541
560
|
variant: "secondary",
|
|
542
561
|
onClick: i,
|
|
543
562
|
children: "Retry"
|
|
@@ -547,7 +566,7 @@ function ve({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
547
566
|
className: c,
|
|
548
567
|
"data-state": "empty",
|
|
549
568
|
...s,
|
|
550
|
-
children: /* @__PURE__ */ p(
|
|
569
|
+
children: /* @__PURE__ */ p(be, {
|
|
551
570
|
icon: "inbox",
|
|
552
571
|
title: "Nothing to show yet"
|
|
553
572
|
})
|
|
@@ -560,15 +579,15 @@ function ve({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
560
579
|
}
|
|
561
580
|
//#endregion
|
|
562
581
|
//#region ../elements/dist/ui-elements.js
|
|
563
|
-
var
|
|
582
|
+
var Ce = {
|
|
564
583
|
success: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-success-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-success-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_success_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-success-active)\"/>\n<rect x=\"108.758\" y=\"67.5986\" width=\"75.5044\" height=\"49.155\" transform=\"rotate(45 108.758 67.5986)\" fill=\"var(--wui-success)\"/>\n<path d=\"M87.895 96.1046C89.7154 97.9249 89.7154 101.046 87.895 102.866L84.1243 106.637C82.3039 108.457 79.1833 108.457 77.3629 106.637L60.8496 89.9934C59.0293 88.173 59.0293 85.0524 60.8496 83.232L64.6204 79.4613C66.4408 77.6409 69.5614 77.6409 71.3817 79.4613L87.895 96.1046Z\" fill=\"white\"/>\n<path d=\"M102.324 67.3672C104.144 65.5469 107.265 65.5469 109.085 67.3672L112.856 71.138C114.676 72.9583 114.676 76.079 112.856 77.8993L84.2499 106.375C82.4296 108.195 79.3089 108.195 77.4886 106.375L73.7178 102.604C71.8975 100.784 71.8975 97.6633 73.7178 95.8429L102.324 67.3672Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_success_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
|
|
565
584
|
error: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_error_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<rect x=\"110.758\" y=\"62\" width=\"75.5044\" height=\"69.9535\" transform=\"rotate(45 110.758 62)\" fill=\"var(--wui-danger-active)\"/>\n<g clip-path=\"url(#wui_error_clip1)\">\n<path d=\"M95.9285 87.0037L112.943 69.9887C114.823 68.1087 114.823 65.0608 112.943 63.1838L110.675 60.9155C108.795 59.0349 105.747 59.0349 103.87 60.9155L86.8552 77.9298L69.8403 60.9119C67.9603 59.032 64.9124 59.032 63.0353 60.9119L60.7635 63.1802C58.8835 65.0608 58.8835 68.1087 60.7635 69.9858L77.7814 87.0037L60.767 104.018C58.8865 105.899 58.8865 108.947 60.767 110.824L63.0353 113.092C64.9153 114.972 67.9632 114.972 69.8403 113.092L86.8552 96.0769L103.87 113.092C105.75 114.972 108.798 114.972 110.675 113.092L112.943 110.824C114.823 108.943 114.823 105.895 112.943 104.018L95.9285 87.0037Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_error_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_error_clip1\"><rect width=\"55\" height=\"55\" fill=\"white\" transform=\"translate(59.3535 59.502)\"/></clipPath></defs>",
|
|
566
585
|
warning: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-warning-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-warning-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_warning_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-warning)\"/>\n<path d=\"M93.7812 60.9731L156.173 123.365L113.082 166.456L60 113.5L97 109L93.7812 60.9731Z\" fill=\"var(--wui-warning-active)\"/>\n<path d=\"M116.145 101.611L96.0431 62.7255C94.8912 60.6967 93.0607 59.1479 90.8656 58.3543C88.6768 57.5543 86.2768 57.5607 84.0945 58.3671C83.0001 58.7767 81.9953 59.3655 81.125 60.1079C80.2545 60.8567 79.5122 61.7527 78.9425 62.7703L57.8933 101.554C56.1525 104.594 56.1717 108.331 57.9317 111.358C59.6981 114.392 62.9427 116.248 66.4435 116.242H107.563C111.051 116.248 114.283 114.398 116.049 111.39C116.952 109.854 117.4 108.133 117.4 106.418C117.4 104.76 116.984 103.102 116.145 101.611ZM87.0064 105.714C85.0672 105.714 83.4929 104.146 83.4929 102.207C83.4929 100.267 85.0672 98.6993 87.0064 98.6993C88.9392 98.6993 90.5136 100.267 90.5136 102.207C90.5136 104.146 88.9392 105.714 87.0064 105.714ZM90.9104 78.098L88.0432 95.3266C88.0049 95.8706 87.5504 96.2994 87.0064 96.2994C86.4561 96.2994 86.0016 95.8706 85.9633 95.3266L83.0961 78.098C83.0385 77.8101 83.0065 77.522 83.0065 77.2405C83.0065 76.3125 83.3137 75.4037 83.8833 74.6485C84.6321 73.6629 85.7713 73.0549 87.0064 72.9717C88.2352 73.0549 89.3744 73.6629 90.1232 74.6485C90.872 75.6341 91.16 76.8885 90.9104 78.098Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_warning_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
|
|
567
586
|
info: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-info-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-info-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_info_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-info)\"/>\n<path d=\"M104.999 67.5L111.454 64L163.495 116.041L115.739 163.797L62.999 111L101.897 104.102L104.999 67.5Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M87 121C105.778 121 121 105.778 121 87C121 68.2223 105.778 53 87 53C68.2223 53 53 68.2223 53 87C53 105.778 68.2223 121 87 121Z\" fill=\"white\"/>\n<path d=\"M87 75.542C89.3472 75.542 91.25 73.6392 91.25 71.292C91.25 68.9448 89.3472 67.042 87 67.042C84.6528 67.042 82.75 68.9448 82.75 71.292C82.75 73.6392 84.6528 75.542 87 75.542Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M86.9992 106.992C86.0975 106.992 85.2327 106.634 84.5951 105.996C83.9574 105.359 83.5992 104.494 83.5992 103.592V86.592C82.6975 86.592 81.8327 86.2338 81.1951 85.5962C80.5574 84.9585 80.1992 84.0937 80.1992 83.192C80.1992 82.2903 80.5574 81.4255 81.1951 80.7878C81.8327 80.1502 82.6975 79.792 83.5992 79.792H86.9992C87.901 79.792 88.7658 80.1502 89.4034 80.7878C90.041 81.4255 90.3992 82.2903 90.3992 83.192V103.592C90.3992 104.494 90.041 105.359 89.4034 105.996C88.7658 106.634 87.901 106.992 86.9992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M90.3992 106.992H83.5992C82.6975 106.992 81.8327 106.634 81.1951 105.996C80.5574 105.358 80.1992 104.494 80.1992 103.592C80.1992 102.69 80.5574 101.825 81.1951 101.188C81.8327 100.55 82.6975 100.192 83.5992 100.192H90.3992C91.301 100.192 92.1658 100.55 92.8034 101.188C93.441 101.825 93.7992 102.69 93.7992 103.592C93.7992 104.494 93.441 105.358 92.8034 105.996C92.1658 106.634 91.301 106.992 90.3992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n</g>\n<defs><clipPath id=\"wui_info_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
|
|
568
587
|
delete: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_delete_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<path d=\"M114.529 67.5672L163.249 116.287L116.354 163.183L67.6336 114.463L100.999 81.0975L64.999 77.5L58.999 69.5L114.529 67.5672Z\" fill=\"var(--wui-danger-active)\"/>\n<path d=\"M103.5 79L100.5 105.5L76 113L69.5 83.5L103.5 79Z\" fill=\"var(--wui-danger)\"/>\n<g clip-path=\"url(#wui_delete_clip1)\">\n<path d=\"M113.652 66.9993C108.895 66.5266 104.139 66.1721 99.3522 65.9061V65.8766L98.7022 62.0357C98.259 59.3175 97.609 55.2402 90.6954 55.2402H82.9545C76.0704 55.2402 75.4204 59.1402 74.9477 62.0061L74.3272 65.788C71.5795 65.9652 68.8318 66.1425 66.084 66.4084L60.0568 66.9993C58.8159 67.1175 57.9295 68.2107 58.0477 69.4221C58.1659 70.6334 59.2295 71.5198 60.4704 71.4016L66.4977 70.8107C81.9795 69.2743 97.5795 69.8652 113.239 71.4311C113.327 71.4311 113.386 71.4311 113.475 71.4311C114.598 71.4311 115.573 70.5743 115.691 69.4221C115.779 68.2107 114.893 67.1175 113.652 66.9993Z\" fill=\"white\"/>\n<path d=\"M108.216 75.5971C107.507 74.8585 106.532 74.4448 105.527 74.4448H68.1816C67.177 74.4448 66.1725 74.8585 65.4929 75.5971C64.8134 76.3357 64.4293 77.3403 64.4884 78.3744L66.3202 108.688C66.6452 113.179 67.0588 118.793 77.3702 118.793H96.3384C106.65 118.793 107.063 113.208 107.388 108.688L109.22 78.4039C109.279 77.3403 108.895 76.3357 108.216 75.5971ZM91.7588 103.99H81.9202C80.7088 103.99 79.7043 102.986 79.7043 101.774C79.7043 100.563 80.7088 99.5585 81.9202 99.5585H91.7588C92.9702 99.5585 93.9747 100.563 93.9747 101.774C93.9747 102.986 92.9702 103.99 91.7588 103.99ZM94.2406 92.1721H79.4679C78.2566 92.1721 77.252 91.1676 77.252 89.9562C77.252 88.7448 78.2566 87.7403 79.4679 87.7403H94.2406C95.452 87.7403 96.4566 88.7448 96.4566 89.9562C96.4566 91.1676 95.452 92.1721 94.2406 92.1721Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_delete_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_delete_clip1\"><rect width=\"65\" height=\"65\" fill=\"white\" transform=\"translate(54.3535 54.502)\"/></clipPath></defs>"
|
|
569
588
|
};
|
|
570
|
-
Object.keys(
|
|
571
|
-
var
|
|
589
|
+
Object.keys(Ce);
|
|
590
|
+
var we = class extends HTMLElement {
|
|
572
591
|
static get observedAttributes() {
|
|
573
592
|
return ["tone", "size"];
|
|
574
593
|
}
|
|
@@ -579,36 +598,36 @@ var be = class extends HTMLElement {
|
|
|
579
598
|
this.isConnected && this.render();
|
|
580
599
|
}
|
|
581
600
|
render() {
|
|
582
|
-
let e = this.getAttribute("tone"), t = Number.parseInt(this.getAttribute("size"), 10) || 72, n =
|
|
601
|
+
let e = this.getAttribute("tone"), t = Number.parseInt(this.getAttribute("size"), 10) || 72, n = Ce[e] || Ce.info;
|
|
583
602
|
this.innerHTML = `<svg width="${t}" height="${t}" viewBox="0 0 174 174" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${n}</svg>`;
|
|
584
603
|
}
|
|
585
|
-
},
|
|
586
|
-
function
|
|
604
|
+
}, Te = 4;
|
|
605
|
+
function Ee(e, t, n = {}) {
|
|
587
606
|
if (!e || !t) return;
|
|
588
|
-
let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i +
|
|
589
|
-
t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(
|
|
590
|
-
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s -
|
|
591
|
-
t.style.left = `${Math.max(
|
|
607
|
+
let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + Te && r.top > a;
|
|
608
|
+
t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(Te, r.top - i - Te)}px` : `${r.bottom + Te}px`, n.matchWidth && (t.style.minWidth = `${r.width}px`, t.style.width = "max-content", t.style.maxWidth = `${window.innerWidth - Te * 2}px`);
|
|
609
|
+
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - Te);
|
|
610
|
+
t.style.left = `${Math.max(Te, c)}px`;
|
|
592
611
|
}
|
|
593
|
-
function
|
|
594
|
-
|
|
612
|
+
function De(e, t) {
|
|
613
|
+
Oe(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
|
|
595
614
|
}
|
|
596
|
-
function
|
|
615
|
+
function Oe(e) {
|
|
597
616
|
e?._reanchor && (window.removeEventListener("resize", e._reanchor), window.removeEventListener("scroll", e._reanchor, !0), e._reanchor = null);
|
|
598
617
|
}
|
|
599
|
-
var
|
|
618
|
+
var ke = "data-wui-mirror";
|
|
600
619
|
function G(e, t) {
|
|
601
|
-
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${
|
|
620
|
+
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${ke}]`);
|
|
602
621
|
if (!n) {
|
|
603
622
|
r?.remove();
|
|
604
623
|
return;
|
|
605
624
|
}
|
|
606
|
-
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(
|
|
625
|
+
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(ke, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
|
|
607
626
|
for (let t of [...r.attributes]) t.name.startsWith("data-val") && !e.hasAttribute(t.name) && r.removeAttribute(t.name);
|
|
608
627
|
for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
|
|
609
628
|
r.disabled = e.hasAttribute("disabled");
|
|
610
629
|
}
|
|
611
|
-
var
|
|
630
|
+
var Ae = {
|
|
612
631
|
activity: "<path d=\"M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"m7.33 14.49 2.38-3.09c.34-.44.97-.52 1.41-.18l1.83 1.44c.44.34 1.07.26 1.41-.17l2.31-2.98\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
613
632
|
alarm: "<path d=\"M2 22h20M12 6a9 9 0 0 0-9 9v7h18v-7a9 9 0 0 0-9-9ZM12 2v1M4 4l1 1M20 4l-1 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
614
633
|
"alert-circle": "<path d=\"M12 7.75V13M21.08 8.58v6.84c0 1.12-.6 2.16-1.57 2.73l-5.94 3.43c-.97.56-2.17.56-3.15 0l-5.94-3.43a3.15 3.15 0 0 1-1.57-2.73V8.58c0-1.12.6-2.16 1.57-2.73l5.94-3.43c.97-.56 2.17-.56 3.15 0l5.94 3.43c.97.57 1.57 1.6 1.57 2.73Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M12 16.2v.1\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
@@ -684,7 +703,7 @@ var Ee = {
|
|
|
684
703
|
house: "<path d=\"m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12ZM12 17.99v-3\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
685
704
|
image: "<path d=\"M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M9 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM2.67 18.95l4.93-3.31c.79-.53 1.93-.47 2.64.14l.33.29c.78.67 2.04.67 2.82 0l4.16-3.57c.78-.67 2.04-.67 2.82 0L22 13.9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
686
705
|
inbox: "<path d=\"M12 2v7l2-2M12 9l-2-2M1.98 13h4.41c.38 0 .72.21.89.55l1.17 2.34A2 2 0 0 0 10.24 17h3.53a2 2 0 0 0 1.79-1.11l1.17-2.34a1 1 0 0 1 .89-.55h4.36\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M7 4.13c-3.54.52-5 2.6-5 6.87v4c0 5 2 7 7 7h6c5 0 7-2 7-7v-4c0-4.27-1.46-6.35-5-6.87\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
687
|
-
info: "<path d=\"M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M11.995 16h.009\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
706
|
+
info: "<g transform=\"rotate(180 12 12)\"><path d=\"M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M11.995 16h.009\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path></g>",
|
|
688
707
|
key: "<path d=\"M19.79 14.93a7.575 7.575 0 0 1-7.6 1.87l-4.71 4.7c-.34.35-1.01.56-1.49.49l-2.18-.3c-.72-.1-1.39-.78-1.5-1.5l-.3-2.18c-.07-.48.16-1.15.49-1.49l4.7-4.7c-.8-2.6-.18-5.55 1.88-7.6 2.95-2.95 7.74-2.95 10.7 0 2.96 2.95 2.96 7.76.01 10.71ZM6.89 17.49l2.3 2.3\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M14.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
689
708
|
"layout-dashboard": "<path d=\"M5 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3H5C3 2 2 3 2 5v2c0 2 1 3 3 3ZM17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM17 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
690
709
|
"layout-grid": "<path d=\"M17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM6 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM18 22a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
@@ -751,12 +770,12 @@ var Ee = {
|
|
|
751
770
|
"zoom-in": "<path d=\"M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM8.5 11h5M11 13.5v-5M18.93 20.69c.53 1.6 1.74 1.76 2.67.36.85-1.28.29-2.33-1.25-2.33-1.14-.01-1.78.88-1.42 1.97Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
752
771
|
"zoom-out": "<path d=\"M9 11.7h5M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>"
|
|
753
772
|
};
|
|
754
|
-
Object.keys(
|
|
773
|
+
Object.keys(Ae);
|
|
755
774
|
function K(e, { size: t = 16, className: n = "", style: r = "" } = {}) {
|
|
756
|
-
let i =
|
|
775
|
+
let i = Ae[e];
|
|
757
776
|
return i ? `<svg class="${n ? `wui-icon ${n}` : "wui-icon"}" data-icon="${e}" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" aria-hidden="true" style="vertical-align:-.125em${r ? `;${r}` : ""}">${i}</svg>` : "";
|
|
758
777
|
}
|
|
759
|
-
function
|
|
778
|
+
function je(e) {
|
|
760
779
|
let { getVisibleOptions: t, getActive: n, setActive: r, onEnter: i, onEscape: a, onTypeahead: o, typeaheadMs: s = 500 } = e, c = "", l = null, u = () => {
|
|
761
780
|
clearTimeout(l), l = null, c = "";
|
|
762
781
|
};
|
|
@@ -785,15 +804,15 @@ function De(e) {
|
|
|
785
804
|
teardown: u
|
|
786
805
|
};
|
|
787
806
|
}
|
|
788
|
-
var
|
|
807
|
+
var Me = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), Ne = (e) => {
|
|
789
808
|
if (!e) return "";
|
|
790
809
|
let t = String(e).toLowerCase().replace(/[^a-z0-9-]/g, "");
|
|
791
810
|
return t ? K(t) : "";
|
|
792
|
-
},
|
|
811
|
+
}, Pe = (e) => {
|
|
793
812
|
if (e == null) return "";
|
|
794
|
-
let t = e[
|
|
813
|
+
let t = e[Me] ? String(e.label ?? "") : q(e.label), n = Ne(e.icon);
|
|
795
814
|
return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
|
|
796
|
-
},
|
|
815
|
+
}, Fe = class extends HTMLElement {
|
|
797
816
|
static formAssociated = !0;
|
|
798
817
|
_accessibleName() {
|
|
799
818
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
@@ -854,12 +873,12 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
854
873
|
set value(e) {
|
|
855
874
|
this._value = e == null ? "" : String(e), G(this, this._value);
|
|
856
875
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
857
|
-
this._label = t ?
|
|
876
|
+
this._label = t ? Le(t.label) : "", this._syncInput(), this._renderOptions("");
|
|
858
877
|
}
|
|
859
878
|
set options(e) {
|
|
860
879
|
this._optionsProp = Array.isArray(e) ? e : [];
|
|
861
880
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
862
|
-
t && (this._label =
|
|
881
|
+
t && (this._label = Le(t.label)), this._renderOptions(), this._syncInput();
|
|
863
882
|
}
|
|
864
883
|
get options() {
|
|
865
884
|
return this._readOptions();
|
|
@@ -878,7 +897,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
878
897
|
}
|
|
879
898
|
_matchesKnownOption(e) {
|
|
880
899
|
let t = e.toLowerCase();
|
|
881
|
-
return this._readOptions().some((e) =>
|
|
900
|
+
return this._readOptions().some((e) => Le(e.label).toLowerCase() === t || String(e.value ?? "").toLowerCase() === t);
|
|
882
901
|
}
|
|
883
902
|
get _minChars() {
|
|
884
903
|
return Math.max(0, Number(this.getAttribute("min-chars")) || +!!this._remote);
|
|
@@ -896,7 +915,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
896
915
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
897
916
|
label: e.innerHTML,
|
|
898
917
|
icon: e.getAttribute("icon") || void 0,
|
|
899
|
-
[
|
|
918
|
+
[Me]: !0,
|
|
900
919
|
selected: e.hasAttribute("selected")
|
|
901
920
|
})));
|
|
902
921
|
}
|
|
@@ -910,12 +929,12 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
910
929
|
let r = `${this.id}-listbox`;
|
|
911
930
|
this._listboxId = r, this.innerHTML = `
|
|
912
931
|
<div class="search-select${n}">
|
|
913
|
-
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
914
|
-
<input class="search-select-input search-select-ac-input" placeholder="${
|
|
932
|
+
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Ie(r)}" aria-label="${Ie(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}>
|
|
933
|
+
<input class="search-select-input search-select-ac-input" placeholder="${Ie(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
915
934
|
<span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
|
|
916
935
|
<button type="button" class="search-select-clear" aria-label="Clear" hidden>${K("x")}</button>
|
|
917
936
|
</div>
|
|
918
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
937
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${Ie(r)}" tabindex="-1" hidden>
|
|
919
938
|
<div class="search-select-options"></div>
|
|
920
939
|
<div class="search-select-empty" hidden>No matches</div>
|
|
921
940
|
<div class="search-select-hint" hidden>Type to search…</div>
|
|
@@ -949,7 +968,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
949
968
|
let t = this._refs();
|
|
950
969
|
if (!t.optionsWrap) return;
|
|
951
970
|
let n = e ?? (t.input ? t.input.value : ""), r = n.trim().toLowerCase(), i = this._readOptions();
|
|
952
|
-
!this._remote && r && (i = i.filter((e) =>
|
|
971
|
+
!this._remote && r && (i = i.filter((e) => Le(e.label).toLowerCase().includes(r)));
|
|
953
972
|
let a = n.trim(), o = this._allowCustom && a && !this._matchesKnownOption(a) ? [...i, {
|
|
954
973
|
value: a,
|
|
955
974
|
custom: !0
|
|
@@ -958,10 +977,10 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
958
977
|
let n = `${s}-opt-${t}`;
|
|
959
978
|
if (e.custom) {
|
|
960
979
|
let t = `Add “${q(e.value)}”`;
|
|
961
|
-
return `<button type="button" role="option" id="${
|
|
980
|
+
return `<button type="button" role="option" id="${Ie(n)}" class="search-select-option search-select-option-custom" data-value="${Ie(e.value)}" data-custom="true" aria-selected="false">${t}</button>`;
|
|
962
981
|
}
|
|
963
982
|
let r = String(e.value) === String(this._value);
|
|
964
|
-
return `<button type="button" role="option" id="${
|
|
983
|
+
return `<button type="button" role="option" id="${Ie(n)}" class="search-select-option${r ? " selected" : ""}" data-value="${Ie(e.value)}" aria-selected="${r}">${Pe(e)}</button>`;
|
|
965
984
|
}).join(""), this._active = -1, t.control?.removeAttribute("aria-activedescendant");
|
|
966
985
|
let c = r.length < this._minChars;
|
|
967
986
|
t.hint && (t.hint.hidden = !(this._remote && c && !i.length)), t.empty && (t.empty.hidden = this._loading || o.length > 0 || this._remote && c);
|
|
@@ -970,7 +989,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
970
989
|
this._teardown();
|
|
971
990
|
let e = this._refs();
|
|
972
991
|
if (!e.control || !e.input) return;
|
|
973
|
-
let t = () =>
|
|
992
|
+
let t = () => Ee(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (t) => {
|
|
974
993
|
let r = n();
|
|
975
994
|
this._active = t;
|
|
976
995
|
for (let e of this._optionEls()) e.classList.remove("is-active");
|
|
@@ -981,7 +1000,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
981
1000
|
e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "", this._syncInput();
|
|
982
1001
|
}, s = (t) => {
|
|
983
1002
|
let n = t.dataset.custom === "true";
|
|
984
|
-
this._value = t.dataset.value, this._label = n ? t.dataset.value :
|
|
1003
|
+
this._value = t.dataset.value, this._label = n ? t.dataset.value : Le(t.innerHTML), G(this, this._value), e.input.value = this._label, this.dispatchEvent(new CustomEvent("change", {
|
|
985
1004
|
bubbles: !0,
|
|
986
1005
|
detail: { isCustom: n }
|
|
987
1006
|
})), o(), e.input.focus();
|
|
@@ -1004,7 +1023,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1004
1023
|
}, this._timer = setTimeout(() => this._fireSearch(t, e), this._debounceMs);
|
|
1005
1024
|
} else this._renderOptions(t);
|
|
1006
1025
|
};
|
|
1007
|
-
this._navHandler =
|
|
1026
|
+
this._navHandler = je({
|
|
1008
1027
|
getVisibleOptions: n,
|
|
1009
1028
|
getActive: () => this._active,
|
|
1010
1029
|
setActive: (e) => r(e),
|
|
@@ -1048,7 +1067,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1048
1067
|
}), this._bindGlobal = () => {
|
|
1049
1068
|
this._teardown(), this._onDocClick = (e) => {
|
|
1050
1069
|
i() && !this.contains(e.target) && o();
|
|
1051
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
1070
|
+
}, document.addEventListener("click", this._onDocClick), De(this, () => {
|
|
1052
1071
|
i() && t();
|
|
1053
1072
|
});
|
|
1054
1073
|
}, this._bindGlobal();
|
|
@@ -1063,12 +1082,12 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1063
1082
|
}));
|
|
1064
1083
|
}
|
|
1065
1084
|
_teardown() {
|
|
1066
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
1085
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), Oe(this), clearTimeout(this._timer), this._navHandler?.teardown();
|
|
1067
1086
|
}
|
|
1068
1087
|
disconnectedCallback() {
|
|
1069
1088
|
this._teardown();
|
|
1070
1089
|
}
|
|
1071
|
-
},
|
|
1090
|
+
}, Ie = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), Le = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), Re = [
|
|
1072
1091
|
"January",
|
|
1073
1092
|
"February",
|
|
1074
1093
|
"March",
|
|
@@ -1081,7 +1100,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1081
1100
|
"October",
|
|
1082
1101
|
"November",
|
|
1083
1102
|
"December"
|
|
1084
|
-
],
|
|
1103
|
+
], ze = [
|
|
1085
1104
|
"Su",
|
|
1086
1105
|
"Mo",
|
|
1087
1106
|
"Tu",
|
|
@@ -1089,24 +1108,24 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1089
1108
|
"Th",
|
|
1090
1109
|
"Fr",
|
|
1091
1110
|
"Sa"
|
|
1092
|
-
],
|
|
1111
|
+
], Be = (e) => String(e).padStart(2, "0"), Ve = (e, t, n) => `${e}-${Be(t + 1)}-${Be(n)}`, J = (e) => {
|
|
1093
1112
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
|
|
1094
1113
|
return t ? {
|
|
1095
1114
|
y: +t[1],
|
|
1096
1115
|
m: t[2] - 1,
|
|
1097
1116
|
d: +t[3]
|
|
1098
1117
|
} : null;
|
|
1099
|
-
},
|
|
1118
|
+
}, He = (e) => {
|
|
1100
1119
|
let t = J(e);
|
|
1101
|
-
return t ? `${
|
|
1102
|
-
},
|
|
1120
|
+
return t ? `${Be(t.d)} ${Re[t.m].slice(0, 3)} ${t.y}` : "";
|
|
1121
|
+
}, Ue = (e, t) => new Date(e, t + 1, 0).getDate(), We = (e, t) => {
|
|
1103
1122
|
for (; t < 0;) t += 12, --e;
|
|
1104
1123
|
for (; t > 11;) t -= 12, e += 1;
|
|
1105
1124
|
return {
|
|
1106
1125
|
y: e,
|
|
1107
1126
|
m: t
|
|
1108
1127
|
};
|
|
1109
|
-
},
|
|
1128
|
+
}, Ge = class extends HTMLElement {
|
|
1110
1129
|
static formAssociated = !0;
|
|
1111
1130
|
static get observedAttributes() {
|
|
1112
1131
|
return [
|
|
@@ -1163,7 +1182,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1163
1182
|
this.innerHTML = `
|
|
1164
1183
|
<div class="datepicker">
|
|
1165
1184
|
<button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${i ? ` aria-label="${q(i)}"` : ""}${a ? ` aria-describedby="${q(a)}"` : ""}>
|
|
1166
|
-
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ?
|
|
1185
|
+
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? He(this._value) : q(e)}</span>
|
|
1167
1186
|
${K("calendar-dots")}
|
|
1168
1187
|
</button>
|
|
1169
1188
|
<div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
|
|
@@ -1176,7 +1195,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1176
1195
|
let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
|
|
1177
1196
|
if (!t) return;
|
|
1178
1197
|
let n = J(this._value);
|
|
1179
|
-
t.textContent = n ?
|
|
1198
|
+
t.textContent = n ? He(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
|
|
1180
1199
|
}
|
|
1181
1200
|
_limits() {
|
|
1182
1201
|
let e = J(this.getAttribute("min")), t = J(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
|
|
@@ -1187,7 +1206,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1187
1206
|
},
|
|
1188
1207
|
monthDisabled: (e, t) => {
|
|
1189
1208
|
let i = new Date(e, t, 1).getTime();
|
|
1190
|
-
return new Date(e, t,
|
|
1209
|
+
return new Date(e, t, Ue(e, t)).getTime() < n || i > r;
|
|
1191
1210
|
},
|
|
1192
1211
|
yearDisabled: (e) => {
|
|
1193
1212
|
let t = new Date(e, 0, 1).getTime();
|
|
@@ -1200,28 +1219,28 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1200
1219
|
e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
|
|
1201
1220
|
}
|
|
1202
1221
|
_daysHtml() {
|
|
1203
|
-
let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n =
|
|
1222
|
+
let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = Ue(this._viewY, this._viewM), r = J(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
|
|
1204
1223
|
y: this._viewY,
|
|
1205
1224
|
m: this._viewM,
|
|
1206
1225
|
d: 1
|
|
1207
1226
|
}, s = (e, t, n, s) => {
|
|
1208
|
-
let c =
|
|
1227
|
+
let c = Ve(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
|
|
1209
1228
|
return `<button type="button" class="${[
|
|
1210
1229
|
"datepicker-day",
|
|
1211
1230
|
s ? "is-outside" : "",
|
|
1212
1231
|
u ? "is-today" : "",
|
|
1213
1232
|
l ? "is-selected" : ""
|
|
1214
1233
|
].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
|
|
1215
|
-
}, c = "", l =
|
|
1234
|
+
}, c = "", l = We(this._viewY, this._viewM - 1), u = Ue(l.y, l.m);
|
|
1216
1235
|
for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
|
|
1217
1236
|
for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
|
|
1218
|
-
let d =
|
|
1237
|
+
let d = We(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
|
|
1219
1238
|
for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
|
|
1220
|
-
let p =
|
|
1239
|
+
let p = ze.map((t, n) => ze[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
|
|
1221
1240
|
return `
|
|
1222
1241
|
<div class="datepicker-head">
|
|
1223
1242
|
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${K("chevron-left")}</button>
|
|
1224
|
-
<button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${
|
|
1243
|
+
<button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${Re[this._viewM]} ${this._viewY}</button>
|
|
1225
1244
|
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${K("chevron-right")}</button>
|
|
1226
1245
|
</div>
|
|
1227
1246
|
<div class="datepicker-weekdays">${p}</div>
|
|
@@ -1239,7 +1258,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1239
1258
|
o ? "is-today" : "",
|
|
1240
1259
|
a ? "is-selected" : ""
|
|
1241
1260
|
].filter(Boolean).join(" ");
|
|
1242
|
-
r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${
|
|
1261
|
+
r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${Re[i].slice(0, 3)}</button>`;
|
|
1243
1262
|
}
|
|
1244
1263
|
return `
|
|
1245
1264
|
<div class="datepicker-head">
|
|
@@ -1272,17 +1291,17 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1272
1291
|
t && e.contains(document.activeElement) && t.focus();
|
|
1273
1292
|
}
|
|
1274
1293
|
_position(e, t) {
|
|
1275
|
-
|
|
1294
|
+
Ee(e, t);
|
|
1276
1295
|
}
|
|
1277
1296
|
_setFocus(e, t, n, r) {
|
|
1278
|
-
let { y: i, m: a } =
|
|
1297
|
+
let { y: i, m: a } = We(e, t);
|
|
1279
1298
|
this._focus = {
|
|
1280
1299
|
y: i,
|
|
1281
1300
|
m: a,
|
|
1282
1301
|
d: n
|
|
1283
1302
|
};
|
|
1284
1303
|
let o = i !== this._viewY || a !== this._viewM;
|
|
1285
|
-
this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${
|
|
1304
|
+
this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${Ve(i, a, n)}"]`)?.focus();
|
|
1286
1305
|
}
|
|
1287
1306
|
_onKey(e) {
|
|
1288
1307
|
if (this._mode !== "days") {
|
|
@@ -1307,17 +1326,17 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1307
1326
|
case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
|
|
1308
1327
|
case "PageUp": {
|
|
1309
1328
|
e.preventDefault();
|
|
1310
|
-
let n =
|
|
1311
|
-
return this._setFocus(n.y, n.m, Math.min(t.d,
|
|
1329
|
+
let n = We(t.y, t.m - (e.shiftKey ? 12 : 1));
|
|
1330
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, Ue(n.y, n.m)), "slide-prev");
|
|
1312
1331
|
}
|
|
1313
1332
|
case "PageDown": {
|
|
1314
1333
|
e.preventDefault();
|
|
1315
|
-
let n =
|
|
1316
|
-
return this._setFocus(n.y, n.m, Math.min(t.d,
|
|
1334
|
+
let n = We(t.y, t.m + (e.shiftKey ? 12 : 1));
|
|
1335
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, Ue(n.y, n.m)), "slide-next");
|
|
1317
1336
|
}
|
|
1318
1337
|
case "Enter":
|
|
1319
1338
|
case " ":
|
|
1320
|
-
e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value =
|
|
1339
|
+
e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = Ve(t.y, t.m, t.d), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
|
|
1321
1340
|
return;
|
|
1322
1341
|
case "Escape": return this._close();
|
|
1323
1342
|
default:
|
|
@@ -1344,7 +1363,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1344
1363
|
let t = e.target.closest("[data-nav]");
|
|
1345
1364
|
if (t) {
|
|
1346
1365
|
this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
|
|
1347
|
-
let e =
|
|
1366
|
+
let e = We(this._viewY, this._viewM + Number(t.dataset.nav));
|
|
1348
1367
|
this._viewY = e.y, this._viewM = e.m, this._focus = {
|
|
1349
1368
|
y: e.y,
|
|
1350
1369
|
m: e.m,
|
|
@@ -1383,7 +1402,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1383
1402
|
}
|
|
1384
1403
|
if (e.target.closest("[data-today]")) {
|
|
1385
1404
|
let e = /* @__PURE__ */ new Date();
|
|
1386
|
-
this.value =
|
|
1405
|
+
this.value = Ve(e.getFullYear(), e.getMonth(), e.getDate()), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
|
|
1387
1406
|
return;
|
|
1388
1407
|
}
|
|
1389
1408
|
if (e.target.closest("[data-clear]")) {
|
|
@@ -1400,18 +1419,18 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1400
1419
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
1401
1420
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
1402
1421
|
r() && e.key === "Escape" && this._close();
|
|
1403
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
1422
|
+
}, document.addEventListener("keydown", this._onDocKey), De(this, () => {
|
|
1404
1423
|
r() && this._position(e, t);
|
|
1405
1424
|
});
|
|
1406
1425
|
}, this._bindGlobal(), this._syncFormValue();
|
|
1407
1426
|
}
|
|
1408
1427
|
_teardown() {
|
|
1409
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
1428
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), Oe(this);
|
|
1410
1429
|
}
|
|
1411
1430
|
disconnectedCallback() {
|
|
1412
1431
|
this._teardown();
|
|
1413
1432
|
}
|
|
1414
|
-
},
|
|
1433
|
+
}, Ke = class extends HTMLElement {
|
|
1415
1434
|
static formAssociated = !0;
|
|
1416
1435
|
static get observedAttributes() {
|
|
1417
1436
|
return [
|
|
@@ -1470,7 +1489,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1470
1489
|
text: e,
|
|
1471
1490
|
empty: !0
|
|
1472
1491
|
} : {
|
|
1473
|
-
text: `${
|
|
1492
|
+
text: `${He(this._start) || "Start"} – ${He(this._end) || "End"}`,
|
|
1474
1493
|
empty: !1
|
|
1475
1494
|
};
|
|
1476
1495
|
}
|
|
@@ -1517,17 +1536,17 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1517
1536
|
};
|
|
1518
1537
|
}
|
|
1519
1538
|
_monthHtml(e, t) {
|
|
1520
|
-
let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i =
|
|
1521
|
-
let i =
|
|
1539
|
+
let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = Ue(e, t), a = this._limits(), o = ze.map((e, t) => ze[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
|
|
1540
|
+
let i = Ve(e, t, n), o = a(e, t, n);
|
|
1522
1541
|
return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
|
|
1523
|
-
}, c = "", l =
|
|
1542
|
+
}, c = "", l = We(e, t - 1), u = Ue(l.y, l.m);
|
|
1524
1543
|
for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
|
|
1525
1544
|
for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
|
|
1526
|
-
let d =
|
|
1545
|
+
let d = We(e, t + 1), f = (7 - (r + i) % 7) % 7;
|
|
1527
1546
|
for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
|
|
1528
1547
|
return `
|
|
1529
1548
|
<div class="daterange-cal">
|
|
1530
|
-
<div class="datepicker-month-label">${
|
|
1549
|
+
<div class="datepicker-month-label">${Re[t]} ${e}</div>
|
|
1531
1550
|
<div class="datepicker-weekdays">${o}</div>
|
|
1532
1551
|
<div class="datepicker-grid" role="grid">${c}</div>
|
|
1533
1552
|
</div>`;
|
|
@@ -1535,7 +1554,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1535
1554
|
_renderView() {
|
|
1536
1555
|
let e = this.querySelector(".daterange-pop");
|
|
1537
1556
|
if (!e) return;
|
|
1538
|
-
let t =
|
|
1557
|
+
let t = We(this._viewY, this._viewM + 1);
|
|
1539
1558
|
e.innerHTML = `
|
|
1540
1559
|
<div class="daterange-head">
|
|
1541
1560
|
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${K("chevron-left")}</button>
|
|
@@ -1561,10 +1580,10 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1561
1580
|
n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
|
|
1562
1581
|
}
|
|
1563
1582
|
let i = e.querySelector("[data-range-hint]");
|
|
1564
|
-
i && (i.textContent = this._start ? this._end ? `${
|
|
1583
|
+
i && (i.textContent = this._start ? this._end ? `${He(this._start)} – ${He(this._end)}` : "Pick an end date" : "Pick a start date");
|
|
1565
1584
|
}
|
|
1566
1585
|
_position(e, t) {
|
|
1567
|
-
|
|
1586
|
+
Ee(e, t);
|
|
1568
1587
|
}
|
|
1569
1588
|
_pick(e) {
|
|
1570
1589
|
if (!this._start || this._start && this._end) {
|
|
@@ -1596,7 +1615,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1596
1615
|
this._popClick = !0;
|
|
1597
1616
|
let t = e.target.closest("[data-nav]");
|
|
1598
1617
|
if (t) {
|
|
1599
|
-
let e =
|
|
1618
|
+
let e = We(this._viewY, this._viewM + Number(t.dataset.nav));
|
|
1600
1619
|
this._viewY = e.y, this._viewM = e.m, this._renderView();
|
|
1601
1620
|
return;
|
|
1602
1621
|
}
|
|
@@ -1615,18 +1634,18 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1615
1634
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
1616
1635
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
1617
1636
|
r() && e.key === "Escape" && this._close();
|
|
1618
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
1637
|
+
}, document.addEventListener("keydown", this._onDocKey), De(this, () => {
|
|
1619
1638
|
r() && this._position(e, t);
|
|
1620
1639
|
});
|
|
1621
1640
|
}, this._bindGlobal(), this._syncMirrors();
|
|
1622
1641
|
}
|
|
1623
1642
|
_teardown() {
|
|
1624
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
1643
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), Oe(this);
|
|
1625
1644
|
}
|
|
1626
1645
|
disconnectedCallback() {
|
|
1627
1646
|
this._teardown();
|
|
1628
1647
|
}
|
|
1629
|
-
},
|
|
1648
|
+
}, qe = class extends HTMLElement {
|
|
1630
1649
|
static get observedAttributes() {
|
|
1631
1650
|
return [
|
|
1632
1651
|
"static",
|
|
@@ -1647,10 +1666,10 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1647
1666
|
e === "static" && this.isConnected && this._wire();
|
|
1648
1667
|
}
|
|
1649
1668
|
_maxScale() {
|
|
1650
|
-
return
|
|
1669
|
+
return Je(this.getAttribute("max-scale"), 1.6);
|
|
1651
1670
|
}
|
|
1652
1671
|
_radius() {
|
|
1653
|
-
return
|
|
1672
|
+
return Je(this.getAttribute("radius"), 100);
|
|
1654
1673
|
}
|
|
1655
1674
|
_magnifyEnabled() {
|
|
1656
1675
|
return !(this.hasAttribute("static") || typeof matchMedia == "function" && (matchMedia("(pointer: coarse)").matches || matchMedia("(prefers-reduced-motion: reduce)").matches));
|
|
@@ -1675,10 +1694,10 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1675
1694
|
_teardown() {
|
|
1676
1695
|
this._pointerMoveListener &&= (this.removeEventListener("pointermove", this._pointerMoveListener), null), this._pointerLeaveListener &&= (this.removeEventListener("pointerleave", this._pointerLeaveListener), null), this._resetMagnification();
|
|
1677
1696
|
}
|
|
1678
|
-
},
|
|
1697
|
+
}, Je = (e, t) => {
|
|
1679
1698
|
let n = Number.parseFloat(e);
|
|
1680
1699
|
return Number.isFinite(n) ? n : t;
|
|
1681
|
-
},
|
|
1700
|
+
}, Ye = class extends HTMLElement {
|
|
1682
1701
|
static formAssociated = !0;
|
|
1683
1702
|
_accessibleName() {
|
|
1684
1703
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
@@ -1756,7 +1775,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1756
1775
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
1757
1776
|
label: e.innerHTML,
|
|
1758
1777
|
icon: e.getAttribute("icon") || void 0,
|
|
1759
|
-
[
|
|
1778
|
+
[Me]: !0,
|
|
1760
1779
|
selected: e.hasAttribute("selected")
|
|
1761
1780
|
})));
|
|
1762
1781
|
}
|
|
@@ -1769,7 +1788,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1769
1788
|
}
|
|
1770
1789
|
_labelHtmlFor(e) {
|
|
1771
1790
|
let t = this._readOptions().find((t) => String(t.value) === String(e));
|
|
1772
|
-
return t ?
|
|
1791
|
+
return t ? Pe(t) : q(e);
|
|
1773
1792
|
}
|
|
1774
1793
|
render() {
|
|
1775
1794
|
this._snapshotDeclared();
|
|
@@ -1778,13 +1797,13 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1778
1797
|
let a = `${this.id}-listbox`;
|
|
1779
1798
|
this._listboxId = a, this.innerHTML = `
|
|
1780
1799
|
<div class="search-select${i}">
|
|
1781
|
-
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
1800
|
+
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Xe(a)}" aria-label="${Xe(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
|
|
1782
1801
|
${n ? K(n, { className: "search-select-icon" }) : ""}
|
|
1783
1802
|
<div class="ms-chips" data-chips></div>
|
|
1784
1803
|
${K("chevron-down", { className: "search-select-caret" })}
|
|
1785
1804
|
</div>
|
|
1786
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
1787
|
-
${e ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${
|
|
1805
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${Xe(a)}" aria-multiselectable="true" tabindex="-1" hidden>
|
|
1806
|
+
${e ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${Xe(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${K("x")}</button></div>` : ""}
|
|
1788
1807
|
<div class="search-select-options"></div>
|
|
1789
1808
|
<div class="search-select-empty" hidden>No matches</div>
|
|
1790
1809
|
</div>
|
|
@@ -1798,7 +1817,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1798
1817
|
e.innerHTML = `<span class="search-select-placeholder">${q(t)}</span>`;
|
|
1799
1818
|
return;
|
|
1800
1819
|
}
|
|
1801
|
-
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${
|
|
1820
|
+
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${Xe(e)}" aria-label="Remove ${Xe(Ze(this._labelFor(e)))}">${K("x")}</button></span>`).join(""), this._collapseChips();
|
|
1802
1821
|
}
|
|
1803
1822
|
_collapseChips() {
|
|
1804
1823
|
let e = this.querySelector("[data-chips]");
|
|
@@ -1822,18 +1841,18 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1822
1841
|
let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
|
|
1823
1842
|
if (!t) return;
|
|
1824
1843
|
let r = (e || "").trim().toLowerCase(), i = this._readOptions();
|
|
1825
|
-
r && (i = i.filter((e) =>
|
|
1844
|
+
r && (i = i.filter((e) => Ze(e.label).toLowerCase().includes(r)));
|
|
1826
1845
|
let a = this._listboxId || `${this.id || "wui-multiselect"}-listbox`;
|
|
1827
1846
|
t.innerHTML = i.map((e, t) => {
|
|
1828
1847
|
let n = this._values.includes(String(e.value));
|
|
1829
|
-
return `<button type="button" role="option" id="${
|
|
1848
|
+
return `<button type="button" role="option" id="${Xe(`${a}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${Xe(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${Pe(e)}</span><span class="ms-check">${K("check")}</span></button>`;
|
|
1830
1849
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1, this.querySelector(".search-select-control")?.removeAttribute("aria-activedescendant");
|
|
1831
1850
|
}
|
|
1832
1851
|
_wire() {
|
|
1833
1852
|
this._teardown();
|
|
1834
1853
|
let e = this.querySelector(".search-select-control"), t = this.querySelector(".search-select-menu"), n = this.querySelector(".search-select-input"), r = this.querySelector(".search-select-clear"), i = this.querySelector(".search-select-options");
|
|
1835
1854
|
if (!e || !t) return;
|
|
1836
|
-
let a = () => this.hasAttribute("disabled"), o = () =>
|
|
1855
|
+
let a = () => this.hasAttribute("disabled"), o = () => Ee(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (t) => {
|
|
1837
1856
|
let n = c();
|
|
1838
1857
|
this._active = t;
|
|
1839
1858
|
for (let e of s()) e.classList.remove("is-active");
|
|
@@ -1866,7 +1885,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1866
1885
|
t && l(c().indexOf(t));
|
|
1867
1886
|
}), i.addEventListener("mouseleave", () => l(-1)), n?.addEventListener("input", () => {
|
|
1868
1887
|
this._renderOptions(n.value), r && (r.hidden = !n.value), l(-1);
|
|
1869
|
-
}), this._navHandler =
|
|
1888
|
+
}), this._navHandler = je({
|
|
1870
1889
|
getVisibleOptions: c,
|
|
1871
1890
|
getActive: () => this._active,
|
|
1872
1891
|
setActive: (e) => l(e),
|
|
@@ -1895,18 +1914,18 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1895
1914
|
}), this._bindGlobal = () => {
|
|
1896
1915
|
this._teardown(), !this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this)), this._onDocClick = (e) => {
|
|
1897
1916
|
u() && !this.contains(e.target) && f();
|
|
1898
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
1917
|
+
}, document.addEventListener("click", this._onDocClick), De(this, () => {
|
|
1899
1918
|
u() && o();
|
|
1900
1919
|
});
|
|
1901
1920
|
}, this._bindGlobal();
|
|
1902
1921
|
}
|
|
1903
1922
|
_teardown() {
|
|
1904
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
1923
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), Oe(this), this._navHandler?.teardown();
|
|
1905
1924
|
}
|
|
1906
1925
|
disconnectedCallback() {
|
|
1907
1926
|
this._teardown(), this._ro?.disconnect(), this._ro = null;
|
|
1908
1927
|
}
|
|
1909
|
-
},
|
|
1928
|
+
}, Xe = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), Ze = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), Qe = /[^0-9]/g, $e = /[^0-9a-zA-Z]/g, et = class extends HTMLElement {
|
|
1910
1929
|
static formAssociated = !0;
|
|
1911
1930
|
static get observedAttributes() {
|
|
1912
1931
|
return [
|
|
@@ -1937,7 +1956,7 @@ var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1937
1956
|
this._value = this._clean(e), G(this, this._value), this._paint();
|
|
1938
1957
|
}
|
|
1939
1958
|
_clean(e) {
|
|
1940
|
-
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ?
|
|
1959
|
+
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? $e : Qe, "").slice(0, this.length);
|
|
1941
1960
|
}
|
|
1942
1961
|
constructor() {
|
|
1943
1962
|
super();
|
|
@@ -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
|
+
}, tt = [
|
|
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
|
+
], nt = (e) => (tt.find((t) => t[0] === e) || [
|
|
3258
3277
|
"",
|
|
3259
3278
|
"",
|
|
3260
3279
|
""
|
|
3261
|
-
])[2],
|
|
3262
|
-
function
|
|
3263
|
-
return Y ? Promise.resolve(Y) : (
|
|
3280
|
+
])[2], rt = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, Y = null, it = null;
|
|
3281
|
+
function at() {
|
|
3282
|
+
return Y ? Promise.resolve(Y) : (it ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (Y = {
|
|
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), it);
|
|
3269
3288
|
}
|
|
3270
|
-
function
|
|
3289
|
+
function ot(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 st(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 ct(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 lt(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 ut(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 dt = 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 ? `+${nt(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 = ut(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(nt(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") || st(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 = tt.map(([e, n, r], i) => `<button type="button" role="option" id="${ft(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${rt(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
|
|
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="${ft(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
3407
|
+
<span class="${rt(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>+${nt(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="${ft(t)}" tabindex="-1" hidden>
|
|
3412
|
+
<div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${K("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${ft(t)}" aria-autocomplete="list" /></div>
|
|
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="${ft(e)}" value="${ft(ot(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${ft(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${ft(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
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 = () => Ee(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 = rt(e)), c && (c.textContent = `+${nt(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 = st(e) || "Enter phone number"), o && this._national && (o.value = ot(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 = st(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 = lt(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 = ot(this._country, this._national);
|
|
3497
|
+
o.value !== r && (o.value = r), this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || ct(this.value) === !0) && v(!1);
|
|
3479
3498
|
}), o.addEventListener("change", (e) => e.stopPropagation()), o.addEventListener("blur", () => {
|
|
3480
|
-
v(this._national.length > 0 &&
|
|
3499
|
+
v(this._national.length > 0 && ct(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 = ut(e.clipboardData?.getData("text"));
|
|
3502
|
+
t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = ot(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
|
|
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), De(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), Oe(this);
|
|
3511
|
+
}, this._bindGlobal(), at().then((e) => {
|
|
3512
|
+
if (!(!e || !o.isConnected) && (this._national && (o.value = ot(this._country, this._national)), !this.getAttribute("placeholder"))) {
|
|
3513
|
+
let e = st(this._country);
|
|
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
|
+
}, ft = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), pt = 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
|
+
[Me]: !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="${mt(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${mt(e.value)}" aria-selected="${n}">${Pe(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="${mt(u)}" aria-label="${mt(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 ? Pe(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="${mt(u)}" tabindex="-1" hidden>
|
|
3625
|
+
${t ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${mt(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${K("x")}</button></div>` : ""}
|
|
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 ? Pe(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,8 +3664,8 @@ 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", Ee(e.control, e.menu);
|
|
3668
|
+
} else Ee(e.control, e.menu, { matchWidth: !0 });
|
|
3650
3669
|
}, n = (t) => {
|
|
3651
3670
|
let n = this._visible();
|
|
3652
3671
|
this._active = t;
|
|
@@ -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 = je({
|
|
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), De(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), Oe(this), this._navHandler?.teardown();
|
|
3707
3726
|
}
|
|
3708
3727
|
disconnectedCallback() {
|
|
3709
3728
|
this._teardown();
|
|
3710
3729
|
}
|
|
3711
|
-
},
|
|
3730
|
+
}, mt = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), ht = 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(gt(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(gt(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(gt(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(gt(this.getAttribute("value"), this._value))) : e === "start" ? this._start = this._snapToStep(this._clamp(gt(this.getAttribute("start"), this._start))) : e === "end" && (this._end = this._snapToStep(this._clamp(gt(this.getAttribute("end"), this._end))));
|
|
3777
3796
|
}
|
|
3778
3797
|
_isRange() {
|
|
3779
3798
|
return this.hasAttribute("range");
|
|
3780
3799
|
}
|
|
3781
3800
|
_min() {
|
|
3782
|
-
return
|
|
3801
|
+
return gt(this.getAttribute("min"), 0);
|
|
3783
3802
|
}
|
|
3784
3803
|
_max() {
|
|
3785
|
-
return
|
|
3804
|
+
return gt(this.getAttribute("max"), 100);
|
|
3786
3805
|
}
|
|
3787
3806
|
_step() {
|
|
3788
|
-
return
|
|
3807
|
+
return gt(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="${_t(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
|
+
}, gt = (e, t) => {
|
|
3954
3973
|
let n = Number.parseFloat(e);
|
|
3955
3974
|
return Number.isFinite(n) ? n : t;
|
|
3956
|
-
},
|
|
3975
|
+
}, _t = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), vt = 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="${bt(this._accessibleName())}" placeholder="${bt(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">${yt(e)}</span><button type="button" class="chip-remove" data-remove="${bt(e)}" aria-label="Remove ${bt(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
|
+
}, yt = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), bt = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), xt = (e) => String(e).padStart(2, "0"), St = (e, t) => `${xt(e)}:${xt(t)}`, Ct = (e) => {
|
|
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
|
+
}, wt = (e, t = "24") => {
|
|
4119
4138
|
if (!e) return "";
|
|
4120
|
-
if (t === "24") return
|
|
4139
|
+
if (t === "24") return St(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}:${xt(e.m)} ${r}`;
|
|
4142
|
+
}, Tt = 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 = Ct(this._value), n = this.getAttribute("format") || "24", r = this.getAttribute("size"), i = r === "sm" ? " input-sm" : r === "lg" ? " input-lg" : "", a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
|
|
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 ? wt(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 = Ct(this._value), r = this.getAttribute("format") || "24";
|
|
4206
|
+
t.textContent = n ? wt(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
|
|
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 = Ct(t) || {
|
|
4191
4210
|
h: 0,
|
|
4192
4211
|
m: 0
|
|
4193
|
-
}, i =
|
|
4212
|
+
}, i = Ct(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 = Ct(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 = St(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
|
|
4228
|
+
a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${wt(o, t)}</button>`;
|
|
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
|
+
Ee(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), De(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), Oe(this), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
|
|
4303
4322
|
}
|
|
4304
4323
|
disconnectedCallback() {
|
|
4305
4324
|
this._teardown();
|
|
4306
4325
|
}
|
|
4307
|
-
},
|
|
4326
|
+
}, Et = "wui-wizard-step", Dt = 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 > ${Et}`)];
|
|
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">${Ot(s)}</span>` : "", h;
|
|
4420
|
+
return h = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${Ot(o)}</span>${m}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${Ot(o)}</span>${m}` : `<span class="step-circle">${u}</span><span class="step-label">${Ot(o)}</span>${m}`, p ? `<button type="button" class="${d}" data-step="${r}"${f}>${h}</button>` : `<div class="${d}"${f}>${h}</div>`;
|
|
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" })}${Ot(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${Ot(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${Ot(o)}${K("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${Ot(c)}</button>`}</span>`;
|
|
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
|
+
}, Ot = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), kt = 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
|
+
}, At = "image/png,image/jpeg,image/webp", jt = {
|
|
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
|
+
}, Mt = {
|
|
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
|
+
}, Nt = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), Pt = [
|
|
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 Ft(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 Pt.some((e) => r.endsWith(e));
|
|
4526
4545
|
}
|
|
4527
|
-
function
|
|
4528
|
-
let t =
|
|
4529
|
-
return t.length ? t.every((e) => e.startsWith(".") ?
|
|
4546
|
+
function It(e) {
|
|
4547
|
+
let t = Nt(e);
|
|
4548
|
+
return t.length ? t.every((e) => e.startsWith(".") ? Pt.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
|
|
4530
4549
|
}
|
|
4531
|
-
function
|
|
4550
|
+
function Lt(e) {
|
|
4532
4551
|
let t = [];
|
|
4533
|
-
for (let n of
|
|
4534
|
-
let e =
|
|
4552
|
+
for (let n of Nt(e)) {
|
|
4553
|
+
let e = Mt[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 Rt(e, t) {
|
|
4559
|
+
let n = Nt(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 && (jt[e] || []).some((e) => i.endsWith(e)));
|
|
4544
4563
|
}
|
|
4545
|
-
function
|
|
4564
|
+
function zt(e, t = {}) {
|
|
4546
4565
|
if (!e) return null;
|
|
4547
|
-
let n = t.accept === void 0 ?
|
|
4548
|
-
return
|
|
4566
|
+
let n = t.accept === void 0 ? At : t.accept, r = t.maxSizeMb || 5;
|
|
4567
|
+
return Rt(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Lt(n)} file.`;
|
|
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 Bt() {
|
|
4573
|
+
X("wui-select", pt), X("wui-phone", dt), X("wui-datepicker", Ge), X("wui-date-range", Ke), X("wui-dock", qe), X("wui-slider", ht), X("wui-timepicker", Tt), X("wui-autocomplete", Fe), X("wui-multiselect", Ye), X("wui-taginput", vt), X("wui-otp", et), X("wui-status-icon", we), X("wui-wizard-step", kt), X("wui-wizard", Dt);
|
|
4555
4574
|
}
|
|
4556
|
-
|
|
4575
|
+
Bt();
|
|
4557
4576
|
//#endregion
|
|
4558
4577
|
//#region src/components/AppPopover.jsx
|
|
4559
|
-
function
|
|
4578
|
+
function Vt({ 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 Ht({ 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(Vt, {
|
|
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 = Ut, on: c, syncDeps: l = [] } = {}) {
|
|
4650
|
+
let d = u(null), f = r ?? Wt, p = i ?? Gt, m = (s || Ut).join("\0"), h = Object.keys(c ?? {}).join("\0"), g = u({});
|
|
4651
|
+
g.current = {
|
|
4652
|
+
ref: e,
|
|
4653
|
+
value: t,
|
|
4654
|
+
onChange: n,
|
|
4655
|
+
read: f,
|
|
4656
|
+
write: p,
|
|
4657
|
+
eventKey: m,
|
|
4658
|
+
on: c
|
|
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") : Ut, n = Object.keys(g.current.on ?? {}), r = {
|
|
4669
|
+
el: e,
|
|
4670
|
+
names: t,
|
|
4671
|
+
extraNames: n,
|
|
4672
|
+
last: void 0
|
|
4673
|
+
};
|
|
4674
|
+
r.handler = () => {
|
|
4675
|
+
let t = g.current.read(e);
|
|
4676
|
+
Object.is(t, r.last) || (r.last = t, g.current.onChange?.(t));
|
|
4677
|
+
}, r.extraHandler = (e) => g.current.on?.[e.type]?.(e);
|
|
4678
|
+
for (let n of t) e.addEventListener(n, r.handler);
|
|
4679
|
+
for (let t of n) e.addEventListener(t, r.extraHandler);
|
|
4680
|
+
_.current = r;
|
|
4681
|
+
}, []), b = a((e) => {
|
|
4682
|
+
d.current = e;
|
|
4683
|
+
let t = g.current.ref;
|
|
4684
|
+
typeof t == "function" ? t(e) : t && (t.current = e), v(), e && (y(e), g.current.value !== void 0 && g.current.write(e, g.current.value));
|
|
4685
|
+
}, [v, y]);
|
|
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 || Ut.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 Ut = ["change"];
|
|
4707
|
+
function Wt(e) {
|
|
4663
4708
|
return e.value;
|
|
4664
4709
|
}
|
|
4665
|
-
function
|
|
4710
|
+
function Gt(e, t) {
|
|
4666
4711
|
let n = t ?? "";
|
|
4667
4712
|
String(e.value ?? "") !== String(n) && (e.value = n);
|
|
4668
4713
|
}
|
|
4669
|
-
function
|
|
4714
|
+
function Kt(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 qt(e) {
|
|
4674
4719
|
return e.values;
|
|
4675
4720
|
}
|
|
4676
|
-
function
|
|
4721
|
+
function Jt(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 Yt(e) {
|
|
4681
4726
|
return {
|
|
4682
4727
|
start: e.start,
|
|
4683
4728
|
end: e.end
|
|
4684
4729
|
};
|
|
4685
4730
|
}
|
|
4686
|
-
function
|
|
4731
|
+
function Xt(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 Zt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeholder: i = "Search…", minChars: a, debounce: c, disabled: l = !1, size: u, allowCustom: d = !1, name: f, label: h, error: g, hint: _, required: v = !1, help: y, helpLabel: b = "More information", fieldClassName: x = "", ...S }, C) {
|
|
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(Ht, {
|
|
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
|
+
}), Qt = /* @__PURE__ */ new Set([
|
|
4777
4822
|
"xs",
|
|
4778
4823
|
"sm",
|
|
4779
4824
|
"md",
|
|
4780
4825
|
"lg",
|
|
4781
4826
|
"xl",
|
|
4782
4827
|
"2xl"
|
|
4783
|
-
]),
|
|
4828
|
+
]), $t = {
|
|
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 en(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 tn(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 nn(e) {
|
|
4803
4848
|
if (typeof e == "number") return e;
|
|
4804
|
-
if (
|
|
4849
|
+
if ($t[e] != null) return $t[e];
|
|
4805
4850
|
let t = Number.parseInt(e, 10);
|
|
4806
4851
|
return Number.isNaN(t) ? 32 : t;
|
|
4807
4852
|
}
|
|
4808
|
-
function
|
|
4853
|
+
function rn({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "primary", status: a = "none", ring: s = !1, label: c, icon: l, badge: u, href: h, onClick: g, linkComponent: _, className: v = "", ...y }) {
|
|
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" && Qt.has(n), T = w ? null : typeof n == "number" || /^\d+$/.test(n) ? `${n}px` : n, E = h != null || g != null, D = t != null && t !== "" && !S, O = [
|
|
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"] = tn(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 ? en(e) : /* @__PURE__ */ p(V, {
|
|
4831
4876
|
name: l,
|
|
4832
|
-
size: Math.round(
|
|
4877
|
+
size: Math.round(nn(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 an = {
|
|
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 on(e) {
|
|
4948
|
+
return e == null ? null : typeof e == "number" ? `${e}px` : an[e] == null ? /^\d+$/.test(e) ? `${e}px` : e : `${an[e]}px`;
|
|
4904
4949
|
}
|
|
4905
|
-
function
|
|
4950
|
+
function sn({ 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 = on(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 cn({ 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 ln = [
|
|
4944
4989
|
"info",
|
|
4945
4990
|
"success",
|
|
4946
4991
|
"warning",
|
|
4947
4992
|
"danger",
|
|
4948
4993
|
"neutral"
|
|
4949
4994
|
];
|
|
4950
|
-
function
|
|
4995
|
+
function un({ 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 = ln.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 dn({ 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 fn = {
|
|
5005
5050
|
info: "info",
|
|
5006
5051
|
success: "check",
|
|
5007
5052
|
warning: "alert-triangle",
|
|
5008
5053
|
danger: "x"
|
|
5009
5054
|
};
|
|
5010
|
-
function
|
|
5055
|
+
function pn({ children: e, tone: t = "info", title: n, icon: r, image: i, imageAlt: a = "", size: o = "md", bordered: s = !0, action: c, dismissible: l = !1, onDismiss: u, className: f = "", ...h }) {
|
|
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 ? fn[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 mn = {
|
|
5065
5110
|
xs: 320,
|
|
5066
5111
|
sm: 420,
|
|
5067
5112
|
md: 560,
|
|
5068
5113
|
lg: 720
|
|
5069
5114
|
};
|
|
5070
|
-
function
|
|
5115
|
+
function hn({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", header: i, headerExtra: a, headerActions: o, footer: s, media: c, children: l, variant: u = "default", tone: d = "primary", padding: h = "md", maxWidth: g, className: _ = "", bodyClassName: v = "", headerClassName: b = "", body: x = !0, lifted: S = !1, href: C, onClick: w, linkComponent: T, ...E }) {
|
|
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 : mn[g] == null ? typeof g == "number" ? `${g}px` : g : `${mn[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 gn = 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
|
+
}), _n = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
5225
|
+
return N("AppCheckbox", o), /* @__PURE__ */ p(gn, {
|
|
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 vn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", size: i = "md", leadingIcon: a, avatar: o, onRemove: s, onClick: c, disabled: l = !1, removeLabel: u, className: d = "", ...h }) {
|
|
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 yn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon: a, iconNode: o, iconSize: s = 18, image: c, imageAlt: l = "", children: u, title: d, description: h, checkIcon: g = "check", checkSize: _ = 18, className: v = "", ...y }) {
|
|
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 bn({ 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 xn({ value: e = "#000000", onChange: t, label: n, required: r = !1, error: i, hint: a, name: o, id: c, disabled: l = !1, size: u = "md", className: d = "", ...f }) {
|
|
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 Sn({ 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 Cn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", type: c = "text", size: l = "md", leftIcon: f, rightIcon: h, onRightIconClick: g, rightIconLabel: _, unit: v, id: y, name: b, className: S = "", fieldClassName: C = "", disabled: w = !1, clearable: T = !1, showCount: E = !1, maxLength: D, prefix: O, suffix: k, floatingLabel: A = !1, variant: j, ...M }, P) {
|
|
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(Ht, {
|
|
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
|
+
}), wn = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", Tn = {
|
|
5576
5621
|
sm: 380,
|
|
5577
5622
|
md: 440,
|
|
5578
5623
|
lg: 640,
|
|
5579
5624
|
xl: 880
|
|
5580
|
-
},
|
|
5581
|
-
function
|
|
5625
|
+
}, En = !1;
|
|
5626
|
+
function Dn() {
|
|
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 || En || (En = !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 On({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a = "default", dismissible: s = !0, onClose: c, footer: l, size: d = "md", placement: f = "center", hideHeader: h = !1, staticBackdrop: g = !1, ariaLabel: _, className: v = "", children: y, ...b }) {
|
|
5636
|
+
N("AppModal", b), W("AppModal", "size", typeof d == "string" ? d : null, Object.keys(Tn));
|
|
5592
5637
|
let { style: x, ...C } = b;
|
|
5593
|
-
h && !_ && typeof n != "string" &&
|
|
5638
|
+
h && !_ && typeof n != "string" && Dn();
|
|
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(wn));
|
|
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 : Tn[d] ?? Tn.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 kn = (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
|
+
}, An = {
|
|
5738
|
+
success: kn("success"),
|
|
5739
|
+
error: kn("error"),
|
|
5740
|
+
warning: kn("warning"),
|
|
5741
|
+
info: kn("info"),
|
|
5742
|
+
delete: kn("delete")
|
|
5698
5743
|
};
|
|
5699
5744
|
//#endregion
|
|
5700
5745
|
//#region src/components/AppConfirmDialog.jsx
|
|
5701
|
-
function
|
|
5746
|
+
function jn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancelLabel: i = "Cancel", danger: a = !1, tone: s, confirmPhrase: c, onConfirm: l, onClose: u, loading: h = !1, staticBackdrop: g = !1, placement: _ = "center", className: v = "", ...y }) {
|
|
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 = An[s || (a ? "delete" : "info")], w = () => {
|
|
5708
5753
|
h || u?.();
|
|
5709
5754
|
};
|
|
5710
|
-
return /* @__PURE__ */ p(
|
|
5755
|
+
return /* @__PURE__ */ p(On, {
|
|
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(Cn, {
|
|
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 Mn = {
|
|
5770
5815
|
sm: 14,
|
|
5771
5816
|
md: 16,
|
|
5772
5817
|
lg: 20
|
|
5773
5818
|
};
|
|
5774
|
-
function
|
|
5775
|
-
N("AppCopyButton", l),
|
|
5819
|
+
function Nn({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r = !1, size: i = "md", variant: o = "ghost", onCopied: s, className: c = "", ...l }) {
|
|
5820
|
+
N("AppCopyButton", l), W("AppCopyButton", "size", i, Object.keys(Mn));
|
|
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: Mn[i] ?? Mn.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 Pn({ 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 Fn({ rows: e = 4, cols: t = 5 }) {
|
|
5869
|
+
return Array.from({ length: e }).map((e, n) => /* @__PURE__ */ p("tr", { children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p(Pn, {
|
|
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 In = (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 Ln(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 In(1, i);
|
|
5884
|
+
let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u = In(1, r);
|
|
5885
|
+
return u.push(...c ? ["ellipsis-left"] : In(r + 1, o - 1)), u.push(...In(o, s)), u.push(...l ? ["ellipsis-right"] : In(s + 1, i - r)), u.push(...In(i - r + 1, i)), u;
|
|
5841
5886
|
}
|
|
5842
5887
|
//#endregion
|
|
5843
5888
|
//#region src/components/AppSelectMini.jsx
|
|
5844
|
-
function
|
|
5889
|
+
function Rn({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", name: i, ariaLabel: a, id: s, disabled: c, size: l, icon: u, prefix: d, className: f, ...m }) {
|
|
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
|
+
Kt(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 zn = [
|
|
5882
5927
|
5,
|
|
5883
5928
|
10,
|
|
5884
5929
|
25,
|
|
5885
5930
|
50
|
|
5886
5931
|
];
|
|
5887
|
-
function
|
|
5932
|
+
function Bn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRow: a, onPageChange: o, onPageSizeChange: s, pageSizes: c = zn, mode: l = "prev-next", showPageSize: u = !0, className: d = "", ...f }) {
|
|
5888
5933
|
N("AppTablePagination", f);
|
|
5889
|
-
let h = l === "numbered", g = h ?
|
|
5934
|
+
let h = l === "numbered", g = h ? Ln(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(Rn, {
|
|
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 Vn(e) {
|
|
5961
6006
|
return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
5962
6007
|
}
|
|
5963
|
-
function
|
|
6008
|
+
function Hn(e) {
|
|
5964
6009
|
return e == null || e === "" ? "—" : typeof e == "boolean" ? String(e) : e;
|
|
5965
6010
|
}
|
|
5966
|
-
function
|
|
6011
|
+
function Un({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a, loading: o = !1, skeletonRows: s = 5, empty: c = "No records found.", emptyFiltered: l, sourceCount: u, rowActions: h, rowActionsLabel: g, pagination: _, ariaLabel: v, className: y = "", wrapperClassName: b = "", selectable: x = !1, selectedIds: S, onToggleRow: C, onToggleAll: w, renderExpanded: T, ...E }) {
|
|
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 " : "") + Vn(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(Fn, {
|
|
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 " : "") + Vn(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) : Hn(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(Bn, {
|
|
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 Wn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, placeholder: u = "Enter Date", disabled: d, size: f, firstDay: h, id: g, ariaLabel: _, className: v = "", ...y }, b) {
|
|
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
|
+
}), Gn = i(function({ start: e, end: t, onChange: n, label: r, required: i = !1, hint: a, error: c, startName: l, endName: u, min: d, max: f, placeholder: h = "Start – End", disabled: g, size: _, firstDay: v, id: y, ariaLabel: b, className: x = "", ...S }, C) {
|
|
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 Kn(e) {
|
|
6208
6253
|
return e == null || e === "";
|
|
6209
6254
|
}
|
|
6210
6255
|
//#endregion
|
|
6211
6256
|
//#region src/components/AppDescriptions.jsx
|
|
6212
|
-
function
|
|
6257
|
+
function qn({ 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 = Kn(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 Jn = !1;
|
|
6292
|
+
function Yn() {
|
|
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 || Jn || (Jn = !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 Xn({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i, align: a = "end", items: o = [], menuClassName: s = "", linkComponent: c, children: l, trigger: u, ...d }) {
|
|
6302
|
+
N("AppDropdown", d), !u && !i && !r && Yn();
|
|
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: Zn,
|
|
6264
6309
|
icon: e,
|
|
6265
6310
|
iconSize: t,
|
|
6266
6311
|
btnClassName: f,
|
|
@@ -6295,7 +6340,7 @@ function Kn({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
6295
6340
|
})]
|
|
6296
6341
|
});
|
|
6297
6342
|
}
|
|
6298
|
-
var
|
|
6343
|
+
var Zn = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-btn", trigger: r, "aria-label": i, className: a, ...o }, s) {
|
|
6299
6344
|
return /* @__PURE__ */ p("button", {
|
|
6300
6345
|
ref: s,
|
|
6301
6346
|
type: "button",
|
|
@@ -6310,16 +6355,16 @@ var qn = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-
|
|
|
6310
6355
|
});
|
|
6311
6356
|
//#endregion
|
|
6312
6357
|
//#region src/lib/fileItem.js
|
|
6313
|
-
function
|
|
6358
|
+
function Qn(e) {
|
|
6314
6359
|
return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
|
|
6315
6360
|
}
|
|
6316
|
-
function
|
|
6361
|
+
function $n(e) {
|
|
6317
6362
|
return e instanceof File ? e.name : e?.name;
|
|
6318
6363
|
}
|
|
6319
|
-
function
|
|
6364
|
+
function er(e) {
|
|
6320
6365
|
return e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
|
|
6321
6366
|
}
|
|
6322
|
-
function
|
|
6367
|
+
function tr(e, t) {
|
|
6323
6368
|
let [n, r] = d(null);
|
|
6324
6369
|
return o(() => {
|
|
6325
6370
|
if (!t) {
|
|
@@ -6335,8 +6380,8 @@ function Zn(e, t) {
|
|
|
6335
6380
|
}
|
|
6336
6381
|
//#endregion
|
|
6337
6382
|
//#region src/lib/FileItemRow.jsx
|
|
6338
|
-
function
|
|
6339
|
-
let i =
|
|
6383
|
+
function nr({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
6384
|
+
let i = tr(e, t), a = $n(e), o = er(e);
|
|
6340
6385
|
return /* @__PURE__ */ m("div", {
|
|
6341
6386
|
className: "attach-item",
|
|
6342
6387
|
children: [
|
|
@@ -6375,15 +6420,15 @@ function Qn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6375
6420
|
}
|
|
6376
6421
|
//#endregion
|
|
6377
6422
|
//#region src/components/AppFileAttachment.jsx
|
|
6378
|
-
function
|
|
6423
|
+
function rr({ label: e = "Attachment", value: t, name: n, onChange: r, multiple: i = !1, accept: a = At, maxSizeMb: o = 5, optional: c = !1, error: l, id: u, ...h }) {
|
|
6379
6424
|
N("AppFileAttachment", h);
|
|
6380
|
-
let g = s(), _ = u || n || g, [v, y] = d(""), b = i && Array.isArray(t) ? t : t ? [t] : [], x =
|
|
6425
|
+
let g = s(), _ = u || n || g, [v, y] = d(""), b = i && Array.isArray(t) ? t : t ? [t] : [], x = It(a), S = (e) => e instanceof File ? Ft(e) : x || Ft(e), C = !i && b.length === 1 && S(b[0]);
|
|
6381
6426
|
function w(e) {
|
|
6382
6427
|
let n = Array.from(e.target.files || []);
|
|
6383
6428
|
if (e.target.value = "", !n.length) return;
|
|
6384
6429
|
let s = [], c = "";
|
|
6385
6430
|
for (let e of n) {
|
|
6386
|
-
let t =
|
|
6431
|
+
let t = zt(e, {
|
|
6387
6432
|
accept: a,
|
|
6388
6433
|
maxSizeMb: o
|
|
6389
6434
|
});
|
|
@@ -6394,8 +6439,8 @@ function $n({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6394
6439
|
s.push(e);
|
|
6395
6440
|
}
|
|
6396
6441
|
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(
|
|
6442
|
+
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(Qn));
|
|
6443
|
+
r(e.concat(s.filter((e) => !n.has(Qn(e)))));
|
|
6399
6444
|
} else r(s[0]);
|
|
6400
6445
|
}
|
|
6401
6446
|
function T(e) {
|
|
@@ -6432,7 +6477,7 @@ function $n({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6432
6477
|
}), /* @__PURE__ */ m("span", {
|
|
6433
6478
|
className: "attach-drop-hint",
|
|
6434
6479
|
children: [
|
|
6435
|
-
|
|
6480
|
+
Lt(a),
|
|
6436
6481
|
", up to ",
|
|
6437
6482
|
o,
|
|
6438
6483
|
" MB"
|
|
@@ -6454,17 +6499,17 @@ function $n({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6454
6499
|
onChange: w,
|
|
6455
6500
|
...h
|
|
6456
6501
|
})] }),
|
|
6457
|
-
C ? /* @__PURE__ */ p(
|
|
6502
|
+
C ? /* @__PURE__ */ p(ir, {
|
|
6458
6503
|
item: b[0],
|
|
6459
6504
|
isImage: !0,
|
|
6460
6505
|
onRemove: () => T(0)
|
|
6461
6506
|
}) : b.length > 0 && /* @__PURE__ */ p("div", {
|
|
6462
6507
|
className: "attach-list",
|
|
6463
|
-
children: b.map((e, t) => /* @__PURE__ */ p(
|
|
6508
|
+
children: b.map((e, t) => /* @__PURE__ */ p(nr, {
|
|
6464
6509
|
item: e,
|
|
6465
6510
|
isImage: S(e),
|
|
6466
6511
|
onRemove: () => T(t)
|
|
6467
|
-
},
|
|
6512
|
+
}, Qn(e)))
|
|
6468
6513
|
}),
|
|
6469
6514
|
E && /* @__PURE__ */ p("div", {
|
|
6470
6515
|
className: "field-error",
|
|
@@ -6473,8 +6518,8 @@ function $n({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6473
6518
|
]
|
|
6474
6519
|
});
|
|
6475
6520
|
}
|
|
6476
|
-
function
|
|
6477
|
-
let r =
|
|
6521
|
+
function ir({ item: e, isImage: t, onRemove: n }) {
|
|
6522
|
+
let r = tr(e, t), i = $n(e), a = er(e);
|
|
6478
6523
|
return /* @__PURE__ */ m("div", {
|
|
6479
6524
|
className: "attach-preview",
|
|
6480
6525
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -6506,18 +6551,18 @@ function er({ item: e, isImage: t, onRemove: n }) {
|
|
|
6506
6551
|
}
|
|
6507
6552
|
//#endregion
|
|
6508
6553
|
//#region src/components/AppFilePicker.jsx
|
|
6509
|
-
function
|
|
6554
|
+
function ar({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles: a, accept: c = ".jpg,.jpeg,.png", maxSizeMb: l = 5, required: f, error: h, className: g = "", ..._ }) {
|
|
6510
6555
|
N("AppFilePicker", _);
|
|
6511
6556
|
let [v, y] = d(null), [b, x] = d(!1), [S, C] = d(""), w = u(null), T = s(), E = n || T;
|
|
6512
6557
|
o(() => {
|
|
6513
|
-
if (!i && t instanceof File &&
|
|
6558
|
+
if (!i && t instanceof File && Ft(t)) {
|
|
6514
6559
|
let e = URL.createObjectURL(t);
|
|
6515
6560
|
return y(e), () => URL.revokeObjectURL(e);
|
|
6516
6561
|
}
|
|
6517
6562
|
y(null);
|
|
6518
6563
|
}, [t, i]);
|
|
6519
|
-
let D = i ? Array.isArray(t) ? t : t ? [t] : [] : [], O = h || S, k =
|
|
6520
|
-
let t =
|
|
6564
|
+
let D = i ? Array.isArray(t) ? t : t ? [t] : [] : [], O = h || S, k = It(c), A = !i && !!t, j = A && (t instanceof File ? Ft(t) : k || Ft(t)), M = t?.name, P = j ? t?.url || v : null, F = (e) => {
|
|
6565
|
+
let t = zt(e, {
|
|
6521
6566
|
accept: c,
|
|
6522
6567
|
maxSizeMb: l
|
|
6523
6568
|
});
|
|
@@ -6525,9 +6570,9 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6525
6570
|
}, I = (e) => {
|
|
6526
6571
|
let n = Array.from(e || []);
|
|
6527
6572
|
if (!n.length) return;
|
|
6528
|
-
let i = Array.isArray(t) ? t : t ? [t] : [], o = new Set(i.map(
|
|
6573
|
+
let i = Array.isArray(t) ? t : t ? [t] : [], o = new Set(i.map(Qn)), s = "", u = [];
|
|
6529
6574
|
for (let e of n) {
|
|
6530
|
-
let t =
|
|
6575
|
+
let t = zt(e, {
|
|
6531
6576
|
accept: c,
|
|
6532
6577
|
maxSizeMb: l
|
|
6533
6578
|
});
|
|
@@ -6535,7 +6580,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6535
6580
|
s ||= t;
|
|
6536
6581
|
continue;
|
|
6537
6582
|
}
|
|
6538
|
-
o.has(
|
|
6583
|
+
o.has(Qn(e)) || (o.add(Qn(e)), u.push(e));
|
|
6539
6584
|
}
|
|
6540
6585
|
let d = i.concat(u);
|
|
6541
6586
|
a && d.length > a && (d = d.slice(0, a), s ||= `Up to ${a} files.`), C(s), r(d);
|
|
@@ -6555,7 +6600,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6555
6600
|
t && F(t);
|
|
6556
6601
|
}, z = (e) => {
|
|
6557
6602
|
C(""), r(D.filter((t, n) => n !== e));
|
|
6558
|
-
}, ee = () => w.current?.click(),
|
|
6603
|
+
}, ee = () => w.current?.click(), B = /* @__PURE__ */ p("input", {
|
|
6559
6604
|
id: E,
|
|
6560
6605
|
name: n,
|
|
6561
6606
|
ref: w,
|
|
@@ -6624,7 +6669,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6624
6669
|
size: 16
|
|
6625
6670
|
})
|
|
6626
6671
|
}),
|
|
6627
|
-
|
|
6672
|
+
B
|
|
6628
6673
|
]
|
|
6629
6674
|
}) : /* @__PURE__ */ m("div", {
|
|
6630
6675
|
className: `file-input file-input-tall${b ? " dragging" : ""}${O ? " error" : ""}${i && D.length > 0 ? " has-files" : ""}`,
|
|
@@ -6657,7 +6702,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6657
6702
|
/* @__PURE__ */ m("span", {
|
|
6658
6703
|
className: "file-input-text",
|
|
6659
6704
|
children: [
|
|
6660
|
-
|
|
6705
|
+
Lt(c),
|
|
6661
6706
|
" · up to ",
|
|
6662
6707
|
l,
|
|
6663
6708
|
" MB"
|
|
@@ -6665,15 +6710,15 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6665
6710
|
})
|
|
6666
6711
|
]
|
|
6667
6712
|
}),
|
|
6668
|
-
|
|
6713
|
+
B,
|
|
6669
6714
|
i && D.length > 0 && /* @__PURE__ */ p("div", {
|
|
6670
6715
|
className: "attach-list",
|
|
6671
|
-
children: D.map((e, t) => /* @__PURE__ */ p(
|
|
6716
|
+
children: D.map((e, t) => /* @__PURE__ */ p(nr, {
|
|
6672
6717
|
item: e,
|
|
6673
|
-
isImage: e instanceof File ?
|
|
6718
|
+
isImage: e instanceof File ? Ft(e) : k || Ft(e),
|
|
6674
6719
|
noun: "file",
|
|
6675
6720
|
onRemove: () => z(t)
|
|
6676
|
-
},
|
|
6721
|
+
}, Qn(e)))
|
|
6677
6722
|
})
|
|
6678
6723
|
]
|
|
6679
6724
|
}),
|
|
@@ -6686,7 +6731,7 @@ function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6686
6731
|
}
|
|
6687
6732
|
//#endregion
|
|
6688
6733
|
//#region src/components/AppFloatingDock.jsx
|
|
6689
|
-
function
|
|
6734
|
+
function or({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation", magnify: r = !0, maxScale: i, radius: a, className: o = "", ...s }) {
|
|
6690
6735
|
return N("AppFloatingDock", s), /* @__PURE__ */ p("wui-dock", {
|
|
6691
6736
|
role: "navigation",
|
|
6692
6737
|
"aria-label": n,
|
|
@@ -6728,7 +6773,7 @@ function nr({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
6728
6773
|
}
|
|
6729
6774
|
//#endregion
|
|
6730
6775
|
//#region src/components/AppFormActions.jsx
|
|
6731
|
-
function
|
|
6776
|
+
function sr({ children: e, sticky: t = !1, align: n = "end", className: r = "", ...i }) {
|
|
6732
6777
|
return N("AppFormActions", i), /* @__PURE__ */ p("div", {
|
|
6733
6778
|
className: [
|
|
6734
6779
|
"form-actions",
|
|
@@ -6742,7 +6787,7 @@ function rr({ children: e, sticky: t = !1, align: n = "end", className: r = "",
|
|
|
6742
6787
|
}
|
|
6743
6788
|
//#endregion
|
|
6744
6789
|
//#region src/components/AppFormRow.jsx
|
|
6745
|
-
function
|
|
6790
|
+
function cr({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
6746
6791
|
N("AppFormRow", r);
|
|
6747
6792
|
let { style: i, ...a } = r;
|
|
6748
6793
|
return /* @__PURE__ */ p("div", {
|
|
@@ -6757,7 +6802,7 @@ function ir({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
|
6757
6802
|
}
|
|
6758
6803
|
//#endregion
|
|
6759
6804
|
//#region src/components/AppFormSection.jsx
|
|
6760
|
-
function
|
|
6805
|
+
function lr({ children: e, title: t, description: n, className: r = "", ...i }) {
|
|
6761
6806
|
return N("AppFormSection", i), /* @__PURE__ */ m("section", {
|
|
6762
6807
|
className: ["form-section", r].filter(Boolean).join(" "),
|
|
6763
6808
|
...i,
|
|
@@ -6778,12 +6823,12 @@ function ar({ children: e, title: t, description: n, className: r = "", ...i })
|
|
|
6778
6823
|
}
|
|
6779
6824
|
//#endregion
|
|
6780
6825
|
//#region src/components/AppInfoList.jsx
|
|
6781
|
-
function
|
|
6826
|
+
function ur({ items: e = [], className: t = "", ...n }) {
|
|
6782
6827
|
return N("AppInfoList", n), /* @__PURE__ */ p("div", {
|
|
6783
6828
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
6784
6829
|
...n,
|
|
6785
6830
|
children: e.map((e, t) => {
|
|
6786
|
-
let n =
|
|
6831
|
+
let n = Kn(e.value), r = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
6787
6832
|
className: "info-icon",
|
|
6788
6833
|
children: H(e.icon, { size: 16 })
|
|
6789
6834
|
}), /* @__PURE__ */ m("span", {
|
|
@@ -6809,23 +6854,23 @@ function or({ items: e = [], className: t = "", ...n }) {
|
|
|
6809
6854
|
}
|
|
6810
6855
|
//#endregion
|
|
6811
6856
|
//#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 ?
|
|
6857
|
+
var dr = 48, fr = 16;
|
|
6858
|
+
function pr(e) {
|
|
6859
|
+
if (!e || e.length < 2) return `0,${fr / 2} ${dr},${fr / 2}`;
|
|
6860
|
+
let t = Math.min(...e), n = Math.max(...e) - t, r = dr / (e.length - 1);
|
|
6861
|
+
return e.map((e, i) => `${i * r},${n === 0 ? fr / 2 : fr - (e - t) / n * fr}`).join(" ");
|
|
6817
6862
|
}
|
|
6818
|
-
function
|
|
6863
|
+
function mr(e) {
|
|
6819
6864
|
if (typeof e != "string") return "flat";
|
|
6820
6865
|
let t = e.trim();
|
|
6821
6866
|
return t.startsWith("+") ? "up" : t.startsWith("-") || t.startsWith("−") ? "down" : "flat";
|
|
6822
6867
|
}
|
|
6823
|
-
function
|
|
6868
|
+
function hr({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, deltaDirection: o, sparkline: s, variant: c = "plain", size: l = "md", valueSize: u, inline: d = !1, attention: f = !1, href: h, linkComponent: g, className: _ = "", style: v, iconClassName: y = "", labelClassName: b = "", valueClassName: x = "", captionClassName: S = "", deltaClassName: C = "", sparklineClassName: w = "", ...T }) {
|
|
6824
6869
|
N("AppKpiTile", T);
|
|
6825
6870
|
let E = `kpi${d ? " kpi-inline" : ""}${c === "filled" ? " kpi-filled" : c === "accent" ? " kpi-accent" : c === "spotlight" ? " kpi-spotlight" : ""}${l === "lg" ? " kpi-lg" : l === "sm" ? " kpi-sm" : ""}${f ? " kpi-attention" : ""}${_ ? ` ${_}` : ""}`, D = typeof u == "number" && u > 0 ? {
|
|
6826
6871
|
...v,
|
|
6827
6872
|
"--wui-kpi-value-size": `${u}px`
|
|
6828
|
-
} : v, O = o ??
|
|
6873
|
+
} : v, O = o ?? mr(a), k = O === "up" ? "arrow-up" : O === "down" ? "arrow-down" : null, A = {};
|
|
6829
6874
|
return h != null && (A = g ? {
|
|
6830
6875
|
as: g,
|
|
6831
6876
|
to: h
|
|
@@ -6863,12 +6908,12 @@ function dr({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6863
6908
|
}),
|
|
6864
6909
|
s && s.length > 0 && /* @__PURE__ */ p("svg", {
|
|
6865
6910
|
className: `kpi-sparkline${w ? ` ${w}` : ""}`,
|
|
6866
|
-
width:
|
|
6867
|
-
height:
|
|
6868
|
-
viewBox: `0 0 ${
|
|
6911
|
+
width: dr,
|
|
6912
|
+
height: fr,
|
|
6913
|
+
viewBox: `0 0 ${dr} ${fr}`,
|
|
6869
6914
|
"aria-hidden": "true",
|
|
6870
6915
|
children: /* @__PURE__ */ p("polyline", {
|
|
6871
|
-
points:
|
|
6916
|
+
points: pr(s),
|
|
6872
6917
|
stroke: "currentColor",
|
|
6873
6918
|
fill: "none"
|
|
6874
6919
|
})
|
|
@@ -6878,21 +6923,21 @@ function dr({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6878
6923
|
}
|
|
6879
6924
|
//#endregion
|
|
6880
6925
|
//#region src/components/AppLogoPicker.jsx
|
|
6881
|
-
var
|
|
6926
|
+
var gr = {
|
|
6882
6927
|
sm: 72,
|
|
6883
6928
|
md: 120,
|
|
6884
6929
|
lg: 160
|
|
6885
6930
|
};
|
|
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,
|
|
6931
|
+
function _r({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a = !1, disabled: c = !1, accept: l = "image/png,image/jpeg,image/webp", maxSizeMb: f = 5, overlayIcon: h = "image", overlayLabel: g = "Update photo", ariaLabel: _ = "Upload photo", label: v, hint: y, error: b, layout: x = "stacked", title: S, subtitle: C, required: w = !1, variant: T = "initials", size: E = "md", shape: D = "circle", className: O = "", ...k }) {
|
|
6932
|
+
N("AppLogoPicker", k), W("AppLogoPicker", "size", typeof E == "string" ? E : null, Object.keys(gr));
|
|
6933
|
+
let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [R, z] = d(!1), [ee, B] = d(!1);
|
|
6889
6934
|
o(() => () => P && URL.revokeObjectURL(P), [P]), o(() => {
|
|
6890
6935
|
F(null), z(!1);
|
|
6891
6936
|
}, [e]);
|
|
6892
|
-
let
|
|
6893
|
-
|
|
6937
|
+
let te = a || c, ne = P || (e && !R ? e : null), re = b || I, ie = !te && (!!P || !!ne && !!i), ae = () => {
|
|
6938
|
+
te || A.current?.click();
|
|
6894
6939
|
}, oe = (e) => {
|
|
6895
|
-
let t =
|
|
6940
|
+
let t = zt(e, {
|
|
6896
6941
|
accept: l,
|
|
6897
6942
|
maxSizeMb: f
|
|
6898
6943
|
});
|
|
@@ -6901,38 +6946,38 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6901
6946
|
return;
|
|
6902
6947
|
}
|
|
6903
6948
|
L(""), z(!1), F(URL.createObjectURL(e)), r(e);
|
|
6904
|
-
},
|
|
6949
|
+
}, se = (e) => {
|
|
6905
6950
|
let t = e.target.files?.[0];
|
|
6906
6951
|
e.target.value = "", t && oe(t);
|
|
6907
|
-
},
|
|
6908
|
-
if (e.preventDefault(),
|
|
6952
|
+
}, ce = (e) => {
|
|
6953
|
+
if (e.preventDefault(), B(!1), te) return;
|
|
6909
6954
|
let t = e.dataTransfer.files?.[0];
|
|
6910
6955
|
t && oe(t);
|
|
6911
|
-
},
|
|
6956
|
+
}, le = () => {
|
|
6912
6957
|
F(null), L(""), z(!1), A.current && (A.current.value = ""), i?.();
|
|
6913
|
-
},
|
|
6958
|
+
}, ue = typeof E == "number" ? E : gr[E] ?? gr.md, H = Math.max(14, Math.round(ue * .18)), de = Math.round(ue * .5), fe = [
|
|
6914
6959
|
"set-uploader",
|
|
6915
6960
|
T === "avatar" ? "set-uploader--avatar" : "",
|
|
6916
6961
|
D === "rounded" ? "set-uploader--rounded" : D === "square" ? "set-uploader--square" : "",
|
|
6917
6962
|
ee && "is-dragging"
|
|
6918
|
-
].filter(Boolean).join(" "),
|
|
6963
|
+
].filter(Boolean).join(" "), pe = x === "inline", U = x === "profile", me = /* @__PURE__ */ m("div", {
|
|
6919
6964
|
className: "set-uploader-shell",
|
|
6920
6965
|
children: [
|
|
6921
6966
|
/* @__PURE__ */ p("button", {
|
|
6922
6967
|
type: "button",
|
|
6923
6968
|
className: fe,
|
|
6924
|
-
style: { "--wui-logo-size": `${
|
|
6969
|
+
style: { "--wui-logo-size": `${ue}px` },
|
|
6925
6970
|
"aria-busy": a || void 0,
|
|
6926
|
-
disabled:
|
|
6971
|
+
disabled: te,
|
|
6927
6972
|
onClick: ae,
|
|
6928
6973
|
"aria-label": _,
|
|
6929
6974
|
onDragOver: (e) => {
|
|
6930
|
-
e.preventDefault(), !
|
|
6975
|
+
e.preventDefault(), !te && !ee && B(!0);
|
|
6931
6976
|
},
|
|
6932
6977
|
onDragLeave: (e) => {
|
|
6933
|
-
e.preventDefault(),
|
|
6978
|
+
e.preventDefault(), B(!1);
|
|
6934
6979
|
},
|
|
6935
|
-
onDrop:
|
|
6980
|
+
onDrop: ce,
|
|
6936
6981
|
...k,
|
|
6937
6982
|
children: /* @__PURE__ */ m("span", {
|
|
6938
6983
|
className: "set-uploader-ring",
|
|
@@ -6953,14 +6998,14 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6953
6998
|
"aria-hidden": "true",
|
|
6954
6999
|
children: /* @__PURE__ */ p(V, {
|
|
6955
7000
|
name: "refresh-cw",
|
|
6956
|
-
size:
|
|
7001
|
+
size: H,
|
|
6957
7002
|
className: "wui-spin"
|
|
6958
7003
|
})
|
|
6959
7004
|
}) : !c && /* @__PURE__ */ m("span", {
|
|
6960
7005
|
className: "set-uploader-overlay",
|
|
6961
7006
|
children: [/* @__PURE__ */ p(V, {
|
|
6962
7007
|
name: h,
|
|
6963
|
-
size:
|
|
7008
|
+
size: H
|
|
6964
7009
|
}), /* @__PURE__ */ p("span", { children: g })]
|
|
6965
7010
|
})]
|
|
6966
7011
|
})
|
|
@@ -6971,7 +7016,7 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6971
7016
|
hidden: !ie,
|
|
6972
7017
|
"aria-label": "Remove photo",
|
|
6973
7018
|
title: "Remove photo",
|
|
6974
|
-
onClick:
|
|
7019
|
+
onClick: le,
|
|
6975
7020
|
children: /* @__PURE__ */ p(V, {
|
|
6976
7021
|
name: "x",
|
|
6977
7022
|
size: 14
|
|
@@ -6984,8 +7029,8 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6984
7029
|
name: n,
|
|
6985
7030
|
hidden: !0,
|
|
6986
7031
|
accept: l,
|
|
6987
|
-
onChange:
|
|
6988
|
-
disabled:
|
|
7032
|
+
onChange: se,
|
|
7033
|
+
disabled: te
|
|
6989
7034
|
})
|
|
6990
7035
|
]
|
|
6991
7036
|
}), he = y && !re && /* @__PURE__ */ p("div", {
|
|
@@ -7013,13 +7058,13 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
7013
7058
|
ge
|
|
7014
7059
|
]
|
|
7015
7060
|
});
|
|
7016
|
-
return
|
|
7061
|
+
return pe ? /* @__PURE__ */ m("div", {
|
|
7017
7062
|
className: `field set-uploader-field set-uploader-field--inline${O ? ` ${O}` : ""}`,
|
|
7018
7063
|
children: [_e, /* @__PURE__ */ m("div", {
|
|
7019
7064
|
className: "set-uploader-row",
|
|
7020
7065
|
children: [me, ve]
|
|
7021
7066
|
})]
|
|
7022
|
-
}) :
|
|
7067
|
+
}) : U ? /* @__PURE__ */ m("div", {
|
|
7023
7068
|
className: `field set-uploader-field set-uploader-field--profile${O ? ` ${O}` : ""}`,
|
|
7024
7069
|
children: [
|
|
7025
7070
|
_e,
|
|
@@ -7038,27 +7083,27 @@ function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
7038
7083
|
}
|
|
7039
7084
|
//#endregion
|
|
7040
7085
|
//#region src/components/AppMeter.jsx
|
|
7041
|
-
var
|
|
7086
|
+
var vr = [
|
|
7042
7087
|
"info",
|
|
7043
7088
|
"success",
|
|
7044
7089
|
"warning",
|
|
7045
7090
|
"danger",
|
|
7046
7091
|
"neutral"
|
|
7047
7092
|
];
|
|
7048
|
-
function
|
|
7093
|
+
function yr(e, t, n) {
|
|
7049
7094
|
let r = n - t;
|
|
7050
7095
|
if (!(r > 0)) return 0;
|
|
7051
7096
|
let i = Math.min(100, Math.max(0, (e - t) / r * 100));
|
|
7052
7097
|
return Number(i.toFixed(2));
|
|
7053
7098
|
}
|
|
7054
|
-
function
|
|
7099
|
+
function br(e, t, n, r, i) {
|
|
7055
7100
|
if (t == null && n == null) return i;
|
|
7056
7101
|
let a = "mid";
|
|
7057
7102
|
return t != null && e <= t ? a = "low" : n != null && e >= n && (a = "high"), r === "low" ? a === "low" ? "success" : a === "high" ? "danger" : "warning" : a === "high" ? "success" : a === "low" ? "danger" : "warning";
|
|
7058
7103
|
}
|
|
7059
|
-
function
|
|
7104
|
+
function xr({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum: i = "high", low: a, high: o, size: s = "md", label: c, showLabel: l = !1, className: u = "", ...d }) {
|
|
7060
7105
|
N("AppMeter", d);
|
|
7061
|
-
let f =
|
|
7106
|
+
let f = br(e, a, o, i, vr.includes(r) ? r : "info"), m = yr(e, t, n);
|
|
7062
7107
|
return /* @__PURE__ */ p("div", {
|
|
7063
7108
|
className: `progress${s === "sm" ? " progress-sm" : ""}${u ? ` ${u}` : ""}`,
|
|
7064
7109
|
role: "meter",
|
|
@@ -7076,20 +7121,20 @@ function _r({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
7076
7121
|
}
|
|
7077
7122
|
//#endregion
|
|
7078
7123
|
//#region src/components/AppMultiSelect.jsx
|
|
7079
|
-
var
|
|
7124
|
+
var Sr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Select…", searchPlaceholder: i = "Search…", searchable: a = !0, disabled: c = !1, icon: l, size: u, collapseChips: d = !1, name: f, label: h, error: g, hint: _, required: v = !1, help: y, helpLabel: b = "More information", fieldClassName: x = "", ...S }, C) {
|
|
7080
7125
|
N("AppMultiSelect", S);
|
|
7081
7126
|
let w = s(), T = f || w, { setRef: E, innerRef: D } = Q({
|
|
7082
7127
|
ref: C,
|
|
7083
7128
|
value: e,
|
|
7084
7129
|
onChange: t,
|
|
7085
|
-
readValue:
|
|
7086
|
-
writeValue:
|
|
7130
|
+
readValue: qt,
|
|
7131
|
+
writeValue: Jt
|
|
7087
7132
|
});
|
|
7088
7133
|
return o(() => {
|
|
7089
7134
|
let e = D.current;
|
|
7090
7135
|
if (!e) return;
|
|
7091
7136
|
let t = n || [];
|
|
7092
|
-
|
|
7137
|
+
Kt(t, e.options) || (e.options = t);
|
|
7093
7138
|
}, [n, D]), /* @__PURE__ */ m("div", {
|
|
7094
7139
|
className: `field${x ? ` ${x}` : ""}`,
|
|
7095
7140
|
children: [
|
|
@@ -7099,7 +7144,7 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7099
7144
|
children: [
|
|
7100
7145
|
h,
|
|
7101
7146
|
v && /* @__PURE__ */ p(Z, {}),
|
|
7102
|
-
y && /* @__PURE__ */ p(
|
|
7147
|
+
y && /* @__PURE__ */ p(Ht, {
|
|
7103
7148
|
label: b,
|
|
7104
7149
|
children: y
|
|
7105
7150
|
})
|
|
@@ -7133,7 +7178,7 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7133
7178
|
}) : null
|
|
7134
7179
|
]
|
|
7135
7180
|
});
|
|
7136
|
-
}),
|
|
7181
|
+
}), Cr = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", value: c, onChange: l, min: u, max: f, step: h = 1, precision: g = 0, unit: _, size: v = "md", id: y, name: b, className: S = "", fieldClassName: C = "", disabled: w = !1, ...T }, E) {
|
|
7137
7182
|
N("AppNumberInput", T);
|
|
7138
7183
|
let D = s(), O = y || D, k = (e) => {
|
|
7139
7184
|
if (g === 0) return Math.round(e);
|
|
@@ -7153,7 +7198,7 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7153
7198
|
let F = (e) => {
|
|
7154
7199
|
let t = (j(M) ?? A(0)) + e * h, n = A(k(t));
|
|
7155
7200
|
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,
|
|
7201
|
+
}, I = j(M), L = w || I !== null && typeof u == "number" && I <= u, R = w || I !== null && typeof f == "number" && I >= f, z = n && O ? `${O}-error` : void 0, ee = r && O ? `${O}-hint` : void 0, B = z || ee, te = [
|
|
7157
7202
|
"input",
|
|
7158
7203
|
v === "sm" ? "input-sm" : "",
|
|
7159
7204
|
v === "lg" ? "input-lg" : "",
|
|
@@ -7181,11 +7226,11 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7181
7226
|
name: b,
|
|
7182
7227
|
type: "text",
|
|
7183
7228
|
inputMode: g > 0 ? "decimal" : "numeric",
|
|
7184
|
-
className:
|
|
7229
|
+
className: te,
|
|
7185
7230
|
disabled: w,
|
|
7186
7231
|
required: t,
|
|
7187
7232
|
"aria-invalid": n ? "true" : "false",
|
|
7188
|
-
"aria-describedby":
|
|
7233
|
+
"aria-describedby": B,
|
|
7189
7234
|
value: M,
|
|
7190
7235
|
ref: E,
|
|
7191
7236
|
onChange: ne,
|
|
@@ -7238,7 +7283,7 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7238
7283
|
children: [
|
|
7239
7284
|
e,
|
|
7240
7285
|
t && /* @__PURE__ */ p(Z, {}),
|
|
7241
|
-
i && /* @__PURE__ */ p(
|
|
7286
|
+
i && /* @__PURE__ */ p(Ht, {
|
|
7242
7287
|
label: a,
|
|
7243
7288
|
children: i
|
|
7244
7289
|
})
|
|
@@ -7256,54 +7301,48 @@ var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7256
7301
|
}) : null
|
|
7257
7302
|
]
|
|
7258
7303
|
});
|
|
7259
|
-
}),
|
|
7260
|
-
N("AppOtpInput",
|
|
7261
|
-
let
|
|
7262
|
-
ref:
|
|
7304
|
+
}), wr = i(function({ value: e, onChange: t, onComplete: n, length: r = 6, mode: i = "numeric", label: a, required: o = !1, hint: c, error: l, disabled: u = !1, name: d, id: f, className: h = "", ...g }, _) {
|
|
7305
|
+
N("AppOtpInput", g);
|
|
7306
|
+
let v = s(), y = f || v, { setRef: b } = Q({
|
|
7307
|
+
ref: _,
|
|
7263
7308
|
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", {
|
|
7309
|
+
onChange: t,
|
|
7310
|
+
on: { complete: (e) => n?.(e.detail) }
|
|
7311
|
+
}), x = /* @__PURE__ */ p("wui-otp", {
|
|
7273
7312
|
"aria-label": typeof a == "string" ? a : void 0,
|
|
7274
|
-
ref:
|
|
7275
|
-
id:
|
|
7276
|
-
name:
|
|
7313
|
+
ref: b,
|
|
7314
|
+
id: y,
|
|
7315
|
+
name: d,
|
|
7277
7316
|
length: String(r),
|
|
7278
7317
|
mode: i,
|
|
7279
|
-
"aria-invalid":
|
|
7280
|
-
disabled:
|
|
7281
|
-
required:
|
|
7282
|
-
...
|
|
7318
|
+
"aria-invalid": l ? "true" : void 0,
|
|
7319
|
+
disabled: u ? "" : void 0,
|
|
7320
|
+
required: o ? "" : void 0,
|
|
7321
|
+
...g
|
|
7283
7322
|
});
|
|
7284
|
-
return !a && !
|
|
7285
|
-
className: `field${
|
|
7323
|
+
return !a && !l && !c ? x : /* @__PURE__ */ m("div", {
|
|
7324
|
+
className: `field${h ? ` ${h}` : ""}`,
|
|
7286
7325
|
children: [
|
|
7287
7326
|
a && /* @__PURE__ */ m("label", {
|
|
7288
7327
|
className: "label",
|
|
7289
|
-
htmlFor:
|
|
7290
|
-
children: [a,
|
|
7328
|
+
htmlFor: y,
|
|
7329
|
+
children: [a, o && /* @__PURE__ */ p(Z, {})]
|
|
7291
7330
|
}),
|
|
7292
|
-
|
|
7293
|
-
|
|
7331
|
+
x,
|
|
7332
|
+
l && /* @__PURE__ */ p("div", {
|
|
7294
7333
|
className: "field-error",
|
|
7295
|
-
children:
|
|
7334
|
+
children: l
|
|
7296
7335
|
}),
|
|
7297
|
-
!
|
|
7336
|
+
!l && c && /* @__PURE__ */ p("div", {
|
|
7298
7337
|
className: "field-hint",
|
|
7299
|
-
children:
|
|
7338
|
+
children: c
|
|
7300
7339
|
})
|
|
7301
7340
|
]
|
|
7302
7341
|
});
|
|
7303
7342
|
});
|
|
7304
7343
|
//#endregion
|
|
7305
7344
|
//#region src/components/AppPageHeader.jsx
|
|
7306
|
-
function
|
|
7345
|
+
function Tr({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", status: a, breadcrumbs: o, actions: s, size: c = "md", align: l = "start", divider: u = !1, sticky: d = !1, className: f = "", ...h }) {
|
|
7307
7346
|
N("AppPageHeader", h);
|
|
7308
7347
|
let g = [
|
|
7309
7348
|
"page-header",
|
|
@@ -7362,9 +7401,9 @@ function xr({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
7362
7401
|
}
|
|
7363
7402
|
//#endregion
|
|
7364
7403
|
//#region src/components/AppPagination.jsx
|
|
7365
|
-
function
|
|
7404
|
+
function Er({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
7366
7405
|
if (N("AppPagination", s), t <= 1) return null;
|
|
7367
|
-
let c =
|
|
7406
|
+
let c = Ln(e, t, { siblingCount: r });
|
|
7368
7407
|
return /* @__PURE__ */ p("nav", {
|
|
7369
7408
|
className: [
|
|
7370
7409
|
"pagination-nav",
|
|
@@ -7422,7 +7461,7 @@ function Sr({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
7422
7461
|
}
|
|
7423
7462
|
//#endregion
|
|
7424
7463
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
7425
|
-
var
|
|
7464
|
+
var Dr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name: i, label: a = "Phone number", placeholder: o, required: c = !1, error: l, showFlag: u = !0, showDialCode: d = !0, size: f = "md", fieldClassName: h = "", ...g }, _) {
|
|
7426
7465
|
N("AppPhoneNumberInput", g);
|
|
7427
7466
|
let v = s(), y = i || v, b = l && y ? `${y}-error` : void 0, { setRef: x } = Q({
|
|
7428
7467
|
ref: _,
|
|
@@ -7462,7 +7501,7 @@ var Cr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
7462
7501
|
});
|
|
7463
7502
|
//#endregion
|
|
7464
7503
|
//#region src/components/AppPricingCard.jsx
|
|
7465
|
-
function
|
|
7504
|
+
function Or({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a, featured: o = !1, current: s = !1, badge: c = "Most popular", className: l = "", ...u }) {
|
|
7466
7505
|
return N("AppPricingCard", u), /* @__PURE__ */ m("div", {
|
|
7467
7506
|
className: [
|
|
7468
7507
|
"plan-card",
|
|
@@ -7516,21 +7555,21 @@ function wr({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
7516
7555
|
}
|
|
7517
7556
|
//#endregion
|
|
7518
7557
|
//#region src/components/AppProgress.jsx
|
|
7519
|
-
var
|
|
7558
|
+
var kr = [
|
|
7520
7559
|
"info",
|
|
7521
7560
|
"success",
|
|
7522
7561
|
"warning",
|
|
7523
7562
|
"danger",
|
|
7524
7563
|
"neutral"
|
|
7525
7564
|
];
|
|
7526
|
-
function
|
|
7565
|
+
function Ar(e, t) {
|
|
7527
7566
|
if (!(t > 0)) return 0;
|
|
7528
7567
|
let n = Math.min(100, Math.max(0, e / t * 100));
|
|
7529
7568
|
return Number(n.toFixed(2));
|
|
7530
7569
|
}
|
|
7531
|
-
function
|
|
7570
|
+
function jr({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", label: i, showLabel: a = !1, striped: o = !1, animated: s = !1, indeterminate: c = !1, className: l = "", ...u }) {
|
|
7532
7571
|
N("AppProgress", u);
|
|
7533
|
-
let d =
|
|
7572
|
+
let d = kr.includes(n) ? n : "info", f = Ar(e, t), m = `progress${r === "sm" ? " progress-sm" : ""}${l ? ` ${l}` : ""}`, h = [
|
|
7534
7573
|
"progress-bar",
|
|
7535
7574
|
`wui-progress-${d}`,
|
|
7536
7575
|
o || s ? "progress-bar-striped" : "",
|
|
@@ -7554,8 +7593,8 @@ function Dr({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", labe
|
|
|
7554
7593
|
}
|
|
7555
7594
|
//#endregion
|
|
7556
7595
|
//#region src/components/AppRadio.jsx
|
|
7557
|
-
var
|
|
7558
|
-
return N("AppRadio", o), /* @__PURE__ */ p(
|
|
7596
|
+
var Mr = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
7597
|
+
return N("AppRadio", o), /* @__PURE__ */ p(gn, {
|
|
7559
7598
|
ref: s,
|
|
7560
7599
|
label: e,
|
|
7561
7600
|
id: t,
|
|
@@ -7570,7 +7609,7 @@ var Or = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
7570
7609
|
});
|
|
7571
7610
|
//#endregion
|
|
7572
7611
|
//#region src/components/AppRepeater.jsx
|
|
7573
|
-
function
|
|
7612
|
+
function Nr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "Add another", removeLabel: a = "Remove row", emptyText: o, min: s = 0, max: c, numbered: l = !0, className: u = "", ...d }) {
|
|
7574
7613
|
N("AppRepeater", d);
|
|
7575
7614
|
let f = typeof c == "number" && e.length >= c, h = !!r && e.length > s;
|
|
7576
7615
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7592,7 +7631,7 @@ function kr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7592
7631
|
className: "repeater-body",
|
|
7593
7632
|
children: t(e, n)
|
|
7594
7633
|
}),
|
|
7595
|
-
h && /* @__PURE__ */ p(
|
|
7634
|
+
h && /* @__PURE__ */ p(de, {
|
|
7596
7635
|
icon: "trash-2",
|
|
7597
7636
|
label: `${a} ${n + 1}`,
|
|
7598
7637
|
danger: !0,
|
|
@@ -7601,7 +7640,7 @@ function kr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7601
7640
|
})
|
|
7602
7641
|
]
|
|
7603
7642
|
}, e.id ?? n)),
|
|
7604
|
-
/* @__PURE__ */ p(
|
|
7643
|
+
/* @__PURE__ */ p(ye, {
|
|
7605
7644
|
variant: "secondary",
|
|
7606
7645
|
size: "sm",
|
|
7607
7646
|
leftIcon: "plus",
|
|
@@ -7615,7 +7654,7 @@ function kr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7615
7654
|
}
|
|
7616
7655
|
//#endregion
|
|
7617
7656
|
//#region src/components/AppResourceCard.jsx
|
|
7618
|
-
function
|
|
7657
|
+
function Pr({ icon: e, title: t, text: n, href: r, external: i = !1, linkComponent: a, className: o = "", ...s }) {
|
|
7619
7658
|
N("AppResourceCard", s);
|
|
7620
7659
|
let c = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
7621
7660
|
className: "res-card-icon",
|
|
@@ -7649,7 +7688,7 @@ function Ar({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
7649
7688
|
}
|
|
7650
7689
|
//#endregion
|
|
7651
7690
|
//#region src/components/AppResult.jsx
|
|
7652
|
-
var
|
|
7691
|
+
var Fr = {
|
|
7653
7692
|
success: {
|
|
7654
7693
|
icon: "check-circle",
|
|
7655
7694
|
tone: "success"
|
|
@@ -7670,9 +7709,9 @@ var jr = {
|
|
|
7670
7709
|
404: { tone: "muted" },
|
|
7671
7710
|
500: { tone: "muted" }
|
|
7672
7711
|
};
|
|
7673
|
-
function
|
|
7674
|
-
N("AppResult", s),
|
|
7675
|
-
let c =
|
|
7712
|
+
function Ir({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, children: a, className: o = "", ...s }) {
|
|
7713
|
+
N("AppResult", s), W("AppResult", "status", e, Object.keys(Fr));
|
|
7714
|
+
let c = Fr[e] || Fr.info, l = c.tone, u = /^\d+$/.test(e), d = r ?? (u ? null : c.icon);
|
|
7676
7715
|
return /* @__PURE__ */ m("div", {
|
|
7677
7716
|
className: [
|
|
7678
7717
|
"result",
|
|
@@ -7710,7 +7749,7 @@ function Mr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
7710
7749
|
}
|
|
7711
7750
|
//#endregion
|
|
7712
7751
|
//#region src/components/AppScrollbar.jsx
|
|
7713
|
-
function
|
|
7752
|
+
function Lr({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
7714
7753
|
return N("AppScrollbar", i), /* @__PURE__ */ p("div", {
|
|
7715
7754
|
className: t ? `wui-scroll ${t}` : "wui-scroll",
|
|
7716
7755
|
style: n == null ? r : {
|
|
@@ -7723,7 +7762,7 @@ function Nr({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
|
7723
7762
|
}
|
|
7724
7763
|
//#endregion
|
|
7725
7764
|
//#region src/components/AppSearch.jsx
|
|
7726
|
-
function
|
|
7765
|
+
function Rr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search…", ariaLabel: i, iconSize: a = 18, size: o, loading: s = !1, disabled: c = !1, className: l = "", ...u }) {
|
|
7727
7766
|
N("AppSearch", u);
|
|
7728
7767
|
let d = t || n;
|
|
7729
7768
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7770,7 +7809,7 @@ function Pr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
7770
7809
|
}
|
|
7771
7810
|
//#endregion
|
|
7772
7811
|
//#region src/components/AppSegmented.jsx
|
|
7773
|
-
function
|
|
7812
|
+
function zr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a = "md", fullWidth: l = !1, disabled: d = !1, className: f = "", ...h }) {
|
|
7774
7813
|
N("AppSegmented", h);
|
|
7775
7814
|
let g = s(), _ = i || g, v = u(null), y = u(null), b = [
|
|
7776
7815
|
"segmented",
|
|
@@ -7845,7 +7884,7 @@ function Fr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
7845
7884
|
}
|
|
7846
7885
|
//#endregion
|
|
7847
7886
|
//#region src/components/AppSelect.jsx
|
|
7848
|
-
var
|
|
7887
|
+
var Br = (e) => e == null ? "" : e.label ?? e.text ?? "", Vr = i(function({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", searchPlaceholder: i = "Search...", searchable: a = !1, clearable: c = !1, size: l, icon: u, floatingLabel: d = !1, disabled: f, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", "aria-label": T, "aria-labelledby": E, "aria-describedby": D, ...O }, k) {
|
|
7849
7888
|
N("AppSelect", O);
|
|
7850
7889
|
let A = s(), { setRef: j, innerRef: M } = Q({
|
|
7851
7890
|
ref: k,
|
|
@@ -7857,10 +7896,10 @@ var Ir = (e) => e == null ? "" : e.label ?? e.text ?? "", Lr = i(function({ valu
|
|
|
7857
7896
|
if (!e) return;
|
|
7858
7897
|
let t = n.map((e) => ({
|
|
7859
7898
|
value: e.value,
|
|
7860
|
-
label:
|
|
7899
|
+
label: Br(e),
|
|
7861
7900
|
icon: e.icon
|
|
7862
7901
|
}));
|
|
7863
|
-
|
|
7902
|
+
Kt(t, e.options) || (e.options = t);
|
|
7864
7903
|
}, [n, M]);
|
|
7865
7904
|
let P = x || S || A, F = d && h, I = _ && P ? `${P}-error` : void 0, L = v && P ? `${P}-hint` : void 0, R = /* @__PURE__ */ p("wui-select", {
|
|
7866
7905
|
"aria-label": T || (typeof h == "string" ? h : void 0),
|
|
@@ -7893,7 +7932,7 @@ var Ir = (e) => e == null ? "" : e.label ?? e.text ?? "", Lr = i(function({ valu
|
|
|
7893
7932
|
children: [
|
|
7894
7933
|
h,
|
|
7895
7934
|
g && /* @__PURE__ */ p(Z, {}),
|
|
7896
|
-
y && /* @__PURE__ */ p(
|
|
7935
|
+
y && /* @__PURE__ */ p(Ht, {
|
|
7897
7936
|
label: b,
|
|
7898
7937
|
children: y
|
|
7899
7938
|
})
|
|
@@ -7921,7 +7960,7 @@ var Ir = (e) => e == null ? "" : e.label ?? e.text ?? "", Lr = i(function({ valu
|
|
|
7921
7960
|
});
|
|
7922
7961
|
//#endregion
|
|
7923
7962
|
//#region src/components/AppShell.jsx
|
|
7924
|
-
function
|
|
7963
|
+
function Hr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r, sidebarFooter: i, topbarStart: a, topbarEnd: s, footer: c, children: l, collapsed: u, onCollapsedChange: f, noSidebar: h = !1, navLabel: g = "Main navigation", linkComponent: _, className: v = "", ...y }) {
|
|
7925
7964
|
N("AppShell", y);
|
|
7926
7965
|
let [b, x] = d(!1), [S, C] = d(!1), [w, T] = d(!1), E = u ?? b, D = () => {
|
|
7927
7966
|
let e = !E;
|
|
@@ -7969,7 +8008,7 @@ function Rr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
7969
8008
|
children: [e.label && /* @__PURE__ */ p("div", {
|
|
7970
8009
|
className: "app-nav-group-label",
|
|
7971
8010
|
children: e.label
|
|
7972
|
-
}), e.items.map((e) => /* @__PURE__ */ p(
|
|
8011
|
+
}), e.items.map((e) => /* @__PURE__ */ p(Ur, {
|
|
7973
8012
|
item: e,
|
|
7974
8013
|
linkComponent: _,
|
|
7975
8014
|
onNavigate: () => C(!1)
|
|
@@ -8036,7 +8075,7 @@ function Rr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
8036
8075
|
]
|
|
8037
8076
|
});
|
|
8038
8077
|
}
|
|
8039
|
-
function
|
|
8078
|
+
function Ur({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
8040
8079
|
let i = Array.isArray(e.children) && e.children.length > 0, a = i && e.children.some((e) => e.active), [s, c] = d(a);
|
|
8041
8080
|
o(() => {
|
|
8042
8081
|
a && !s && c(!0);
|
|
@@ -8076,7 +8115,7 @@ function zr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8076
8115
|
className: `app-nav-sub${s ? " expanded" : ""}`,
|
|
8077
8116
|
children: /* @__PURE__ */ p("div", {
|
|
8078
8117
|
className: "app-nav-sub-inner",
|
|
8079
|
-
children: e.children.map((e) => /* @__PURE__ */ p(
|
|
8118
|
+
children: e.children.map((e) => /* @__PURE__ */ p(Ur, {
|
|
8080
8119
|
item: e,
|
|
8081
8120
|
linkComponent: t,
|
|
8082
8121
|
onNavigate: n,
|
|
@@ -8117,7 +8156,7 @@ function zr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8117
8156
|
}
|
|
8118
8157
|
//#endregion
|
|
8119
8158
|
//#region src/components/AppSidebarMenu.jsx
|
|
8120
|
-
var
|
|
8159
|
+
var Wr = {
|
|
8121
8160
|
left: "start",
|
|
8122
8161
|
right: "end",
|
|
8123
8162
|
start: "start",
|
|
@@ -8125,9 +8164,9 @@ var Br = {
|
|
|
8125
8164
|
top: "top",
|
|
8126
8165
|
bottom: "bottom"
|
|
8127
8166
|
};
|
|
8128
|
-
function
|
|
8129
|
-
N("AppSidebarMenu", b),
|
|
8130
|
-
let { style: x, ...S } = b, w =
|
|
8167
|
+
function Gr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, header: a, children: o, footer: s, width: c, maxWidth: l, backdrop: u = !0, scroll: d = !1, keyboard: f = !0, closeButton: h = !0, responsive: g, className: _ = "", bodyClassName: v = "", ariaLabel: y, ...b }) {
|
|
8168
|
+
N("AppSidebarMenu", b), W("AppSidebarMenu", "side", n, Object.keys(Wr));
|
|
8169
|
+
let { style: x, ...S } = b, w = Wr[n] || "end", T = c || l || x ? {
|
|
8131
8170
|
...c && { "--asm-width": c },
|
|
8132
8171
|
...l && { "--asm-max-width": l },
|
|
8133
8172
|
...x
|
|
@@ -8156,7 +8195,7 @@ function Vr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8156
8195
|
size: 18
|
|
8157
8196
|
})
|
|
8158
8197
|
}), r]
|
|
8159
|
-
}), h && /* @__PURE__ */ p(
|
|
8198
|
+
}), h && /* @__PURE__ */ p(ye, {
|
|
8160
8199
|
variant: "ghost",
|
|
8161
8200
|
className: "btn-icon",
|
|
8162
8201
|
onClick: t,
|
|
@@ -8180,14 +8219,14 @@ function Vr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8180
8219
|
}
|
|
8181
8220
|
//#endregion
|
|
8182
8221
|
//#region src/components/AppSlider.jsx
|
|
8183
|
-
var
|
|
8222
|
+
var Kr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, label: a, required: c = !1, hint: l, error: u, name: d, startName: f, endName: h, min: g = 0, max: _ = 100, step: v = 1, disabled: y, size: b, showValue: x, unit: S, id: C, ariaLabel: w, className: T = "", ...E }, D) {
|
|
8184
8223
|
N("AppSlider", E);
|
|
8185
8224
|
let O = s(), k = C || d || r && f || O, A = r, { setRef: j, innerRef: M } = Q({
|
|
8186
8225
|
ref: D,
|
|
8187
8226
|
value: A ? void 0 : e,
|
|
8188
8227
|
onChange: i,
|
|
8189
|
-
readValue: A ?
|
|
8190
|
-
writeValue: A ? void 0 :
|
|
8228
|
+
readValue: A ? Yt : void 0,
|
|
8229
|
+
writeValue: A ? void 0 : Xt
|
|
8191
8230
|
});
|
|
8192
8231
|
o(() => {
|
|
8193
8232
|
if (!A) return;
|
|
@@ -8241,14 +8280,14 @@ var Hr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
8241
8280
|
})
|
|
8242
8281
|
]
|
|
8243
8282
|
});
|
|
8244
|
-
}),
|
|
8283
|
+
}), qr = {
|
|
8245
8284
|
sm: 44,
|
|
8246
8285
|
md: 56,
|
|
8247
8286
|
lg: 72
|
|
8248
8287
|
};
|
|
8249
|
-
function
|
|
8250
|
-
N("AppSplash", c),
|
|
8251
|
-
let { style: l, ...u } = c, d = typeof a == "number" ? a :
|
|
8288
|
+
function Jr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", size: a = "md", label: o = "Loading", className: s = "", ...c }) {
|
|
8289
|
+
N("AppSplash", c), W("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(qr));
|
|
8290
|
+
let { style: l, ...u } = c, d = typeof a == "number" ? a : qr[a] ?? qr.md, f = i === "ring" ? /* @__PURE__ */ p("span", {
|
|
8252
8291
|
className: "splash-ring",
|
|
8253
8292
|
"aria-hidden": "true"
|
|
8254
8293
|
}) : i === "dots" ? /* @__PURE__ */ m("span", {
|
|
@@ -8295,7 +8334,7 @@ function Wr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
8295
8334
|
}
|
|
8296
8335
|
//#endregion
|
|
8297
8336
|
//#region src/components/AppStatusBadge.jsx
|
|
8298
|
-
function
|
|
8337
|
+
function Yr({ label: e, tone: t = "neutral", className: n = "", ...r }) {
|
|
8299
8338
|
return N("AppStatusBadge", r), e == null || e === "" ? "—" : /* @__PURE__ */ p("span", {
|
|
8300
8339
|
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
8301
8340
|
...r,
|
|
@@ -8304,7 +8343,7 @@ function Gr({ label: e, tone: t = "neutral", className: n = "", ...r }) {
|
|
|
8304
8343
|
}
|
|
8305
8344
|
//#endregion
|
|
8306
8345
|
//#region src/components/AppStepper.jsx
|
|
8307
|
-
function
|
|
8346
|
+
function Xr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal", activeStep: r, onStepClick: i, label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
8308
8347
|
N("AppStepper", c);
|
|
8309
8348
|
let l = t === "journey";
|
|
8310
8349
|
return /* @__PURE__ */ p("nav", {
|
|
@@ -8317,7 +8356,7 @@ function Kr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8317
8356
|
"aria-label": a,
|
|
8318
8357
|
...c,
|
|
8319
8358
|
children: e.map((t, n) => {
|
|
8320
|
-
let a = t.status ||
|
|
8359
|
+
let a = t.status || Zr(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
8321
8360
|
c = a === "done" ? /* @__PURE__ */ p(V, {
|
|
8322
8361
|
name: "check",
|
|
8323
8362
|
size: 14
|
|
@@ -8381,13 +8420,13 @@ function Kr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8381
8420
|
})
|
|
8382
8421
|
});
|
|
8383
8422
|
}
|
|
8384
|
-
function
|
|
8423
|
+
function Zr(e, t) {
|
|
8385
8424
|
return typeof t == "number" ? e < t ? "done" : e === t ? "active" : "pending" : "pending";
|
|
8386
8425
|
}
|
|
8387
8426
|
//#endregion
|
|
8388
8427
|
//#region src/components/AppSwitch.jsx
|
|
8389
|
-
var
|
|
8390
|
-
return N("AppSwitch", s), /* @__PURE__ */ p(
|
|
8428
|
+
var Qr = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "pill", className: o = "", ...s }, c) {
|
|
8429
|
+
return N("AppSwitch", s), /* @__PURE__ */ p(gn, {
|
|
8391
8430
|
ref: c,
|
|
8392
8431
|
label: e,
|
|
8393
8432
|
id: t,
|
|
@@ -8402,7 +8441,7 @@ var Jr = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "p
|
|
|
8402
8441
|
});
|
|
8403
8442
|
//#endregion
|
|
8404
8443
|
//#region src/components/AppTableEmptyState.jsx
|
|
8405
|
-
function
|
|
8444
|
+
function $r({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
8406
8445
|
return N("AppTableEmptyState", i), /* @__PURE__ */ m("div", {
|
|
8407
8446
|
className: "tbl-empty",
|
|
8408
8447
|
...i,
|
|
@@ -8428,13 +8467,13 @@ function Yr({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
8428
8467
|
}
|
|
8429
8468
|
//#endregion
|
|
8430
8469
|
//#region src/components/AppTooltip.jsx
|
|
8431
|
-
var
|
|
8470
|
+
var ei = {
|
|
8432
8471
|
start: "left",
|
|
8433
8472
|
end: "right",
|
|
8434
8473
|
top: "top",
|
|
8435
8474
|
bottom: "bottom"
|
|
8436
8475
|
};
|
|
8437
|
-
function
|
|
8476
|
+
function ti({ content: e, children: t, placement: r = "top", tone: i = "default", size: a = "md", className: o = "", ...c }) {
|
|
8438
8477
|
N("AppTooltip", c);
|
|
8439
8478
|
let l = /* @__PURE__ */ p(E, {
|
|
8440
8479
|
id: s(),
|
|
@@ -8448,14 +8487,14 @@ function Zr({ content: e, children: t, placement: r = "top", tone: i = "default"
|
|
|
8448
8487
|
});
|
|
8449
8488
|
return /* @__PURE__ */ p(w, {
|
|
8450
8489
|
trigger: ["hover", "focus"],
|
|
8451
|
-
placement:
|
|
8490
|
+
placement: ei[r] || r,
|
|
8452
8491
|
overlay: l,
|
|
8453
8492
|
children: n(t, c)
|
|
8454
8493
|
});
|
|
8455
8494
|
}
|
|
8456
8495
|
//#endregion
|
|
8457
8496
|
//#region src/components/AppTabs.jsx
|
|
8458
|
-
function
|
|
8497
|
+
function ni({ tabs: e, value: t, onChange: n, variant: r = "underline", orientation: i = "horizontal", size: s = "md", fitted: l = !1, activation: f = "automatic", ariaLabel: h, className: g = "", style: _, ...v }) {
|
|
8459
8498
|
N("AppTabs", v);
|
|
8460
8499
|
let y = u(null), b = u(null), x = i === "vertical", [S, C] = d(t);
|
|
8461
8500
|
o(() => {
|
|
@@ -8562,7 +8601,7 @@ function Qr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8562
8601
|
})
|
|
8563
8602
|
]
|
|
8564
8603
|
}, e.key);
|
|
8565
|
-
return e.tooltip ? /* @__PURE__ */ p(
|
|
8604
|
+
return e.tooltip ? /* @__PURE__ */ p(ti, {
|
|
8566
8605
|
content: e.tooltip,
|
|
8567
8606
|
children: i
|
|
8568
8607
|
}, e.key) : i;
|
|
@@ -8604,14 +8643,14 @@ function Qr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8604
8643
|
}
|
|
8605
8644
|
//#endregion
|
|
8606
8645
|
//#region src/components/AppTagInput.jsx
|
|
8607
|
-
var
|
|
8646
|
+
var ri = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r, label: i, error: a, hint: o, required: c = !1, size: l, maxTags: u, allowDuplicates: d = !1, disabled: f = !1, id: h, ariaLabel: g, className: _ = "", fieldClassName: v = "", help: y, helpLabel: b = "More information", ...x }, S) {
|
|
8608
8647
|
N("AppTagInput", x);
|
|
8609
8648
|
let C = s(), w = h || r || C, { setRef: T } = Q({
|
|
8610
8649
|
ref: S,
|
|
8611
8650
|
value: e,
|
|
8612
8651
|
onChange: t,
|
|
8613
|
-
readValue:
|
|
8614
|
-
writeValue:
|
|
8652
|
+
readValue: qt,
|
|
8653
|
+
writeValue: Jt
|
|
8615
8654
|
});
|
|
8616
8655
|
return /* @__PURE__ */ m("div", {
|
|
8617
8656
|
className: `field${v ? ` ${v}` : ""}`,
|
|
@@ -8622,7 +8661,7 @@ var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8622
8661
|
children: [
|
|
8623
8662
|
i,
|
|
8624
8663
|
c && /* @__PURE__ */ p(Z, {}),
|
|
8625
|
-
y && /* @__PURE__ */ p(
|
|
8664
|
+
y && /* @__PURE__ */ p(Ht, {
|
|
8626
8665
|
label: b,
|
|
8627
8666
|
children: y
|
|
8628
8667
|
})
|
|
@@ -8655,7 +8694,7 @@ var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8655
8694
|
}) : null
|
|
8656
8695
|
]
|
|
8657
8696
|
});
|
|
8658
|
-
}),
|
|
8697
|
+
}), ii = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: o = "More information", id: l, name: d, rows: f = 4, autoGrow: h = !1, className: g = "", fieldClassName: _ = "", ...v }, y) {
|
|
8659
8698
|
N("AppTextarea", v);
|
|
8660
8699
|
let b = s(), S = l || b, C = [
|
|
8661
8700
|
"textarea",
|
|
@@ -8687,7 +8726,7 @@ var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8687
8726
|
children: [
|
|
8688
8727
|
e,
|
|
8689
8728
|
t && /* @__PURE__ */ p(Z, {}),
|
|
8690
|
-
i && /* @__PURE__ */ p(
|
|
8729
|
+
i && /* @__PURE__ */ p(Ht, {
|
|
8691
8730
|
label: o,
|
|
8692
8731
|
children: i
|
|
8693
8732
|
})
|
|
@@ -8717,7 +8756,7 @@ var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8717
8756
|
}) : null
|
|
8718
8757
|
]
|
|
8719
8758
|
});
|
|
8720
|
-
}),
|
|
8759
|
+
}), ai = {
|
|
8721
8760
|
done: "check",
|
|
8722
8761
|
current: "clock",
|
|
8723
8762
|
"on-hold": "lock",
|
|
@@ -8726,7 +8765,7 @@ var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8726
8765
|
skipped: "arrow-right",
|
|
8727
8766
|
upcoming: null
|
|
8728
8767
|
};
|
|
8729
|
-
function
|
|
8768
|
+
function oi({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
8730
8769
|
N("AppTimeline", o);
|
|
8731
8770
|
let s = t === "progress", c = `timeline${s ? " timeline--progress" : ""}${n === "horizontal" ? " timeline--horizontal" : ""}${i ? ` ${i}` : ""}`, l = typeof r == "number" && r > 0 ? r : void 0, u = l ? Math.round(l * .54) : s ? 13 : 12;
|
|
8732
8771
|
return /* @__PURE__ */ p("ol", {
|
|
@@ -8737,7 +8776,7 @@ function ni({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8737
8776
|
} : a,
|
|
8738
8777
|
...o,
|
|
8739
8778
|
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 ?
|
|
8779
|
+
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ? ai[n] : void 0) : e.icon || "circle";
|
|
8741
8780
|
return /* @__PURE__ */ m("li", {
|
|
8742
8781
|
className: `timeline-item${r}${i}`,
|
|
8743
8782
|
children: [/* @__PURE__ */ p("span", {
|
|
@@ -8795,7 +8834,7 @@ function ni({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8795
8834
|
}
|
|
8796
8835
|
//#endregion
|
|
8797
8836
|
//#region src/components/AppTimePicker.jsx
|
|
8798
|
-
var
|
|
8837
|
+
var si = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, step: u, format: d = "24", placeholder: f = "Select time", disabled: h, size: g, id: _, ariaLabel: v, className: y = "", ...b }, x) {
|
|
8799
8838
|
N("AppTimePicker", b);
|
|
8800
8839
|
let S = s(), C = _ || o || S, { setRef: w } = Q({
|
|
8801
8840
|
ref: x,
|
|
@@ -8840,32 +8879,32 @@ var ri = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
8840
8879
|
})
|
|
8841
8880
|
]
|
|
8842
8881
|
});
|
|
8843
|
-
}),
|
|
8844
|
-
function
|
|
8845
|
-
for (let e of
|
|
8882
|
+
}), ci = 6, $ = [], li = /* @__PURE__ */ new Set(), ui = /* @__PURE__ */ new Map(), di = 0;
|
|
8883
|
+
function fi() {
|
|
8884
|
+
for (let e of li) e($);
|
|
8846
8885
|
}
|
|
8847
|
-
function
|
|
8848
|
-
let t =
|
|
8849
|
-
t !== void 0 && (clearTimeout(t),
|
|
8886
|
+
function pi(e) {
|
|
8887
|
+
let t = ui.get(e);
|
|
8888
|
+
t !== void 0 && (clearTimeout(t), ui.delete(e));
|
|
8850
8889
|
}
|
|
8851
|
-
function
|
|
8852
|
-
if (e.length <=
|
|
8890
|
+
function mi(e) {
|
|
8891
|
+
if (e.length <= ci) return e;
|
|
8853
8892
|
let t = [...e];
|
|
8854
|
-
for (; t.length >
|
|
8893
|
+
for (; t.length > ci;) {
|
|
8855
8894
|
let e = t.findIndex((e) => e.duration !== 0);
|
|
8856
8895
|
t.splice(e === -1 ? 0 : e, 1);
|
|
8857
8896
|
}
|
|
8858
8897
|
return t;
|
|
8859
8898
|
}
|
|
8860
|
-
function
|
|
8861
|
-
return
|
|
8899
|
+
function hi(e) {
|
|
8900
|
+
return li.add(e), e($), () => li.delete(e);
|
|
8862
8901
|
}
|
|
8863
|
-
function
|
|
8902
|
+
function gi(e, t, n = {}) {
|
|
8864
8903
|
let r = n.id, i = r || typeof e != "string" ? void 0 : `${t}:${e}`;
|
|
8865
8904
|
if (r) {
|
|
8866
8905
|
let i = $.find((e) => e.externalId === r);
|
|
8867
8906
|
if (i) {
|
|
8868
|
-
|
|
8907
|
+
pi(i.id);
|
|
8869
8908
|
let r = n.duration === void 0 ? 5e3 : n.duration;
|
|
8870
8909
|
$ = $.map((a) => a.id === i.id ? {
|
|
8871
8910
|
...a,
|
|
@@ -8878,12 +8917,12 @@ function fi(e, t, n = {}) {
|
|
|
8878
8917
|
shape: n.shape,
|
|
8879
8918
|
surface: n.surface,
|
|
8880
8919
|
progress: n.progress
|
|
8881
|
-
} : a),
|
|
8920
|
+
} : a), fi(), r > 0 && ui.set(i.id, setTimeout(() => _i(i.id), r));
|
|
8882
8921
|
return;
|
|
8883
8922
|
}
|
|
8884
8923
|
} else if (i && $.some((e) => e.key === i)) return;
|
|
8885
|
-
let a = ++
|
|
8886
|
-
$ =
|
|
8924
|
+
let a = ++di, o = n.duration === void 0 ? 5e3 : n.duration;
|
|
8925
|
+
$ = mi([...$, {
|
|
8887
8926
|
id: a,
|
|
8888
8927
|
externalId: r,
|
|
8889
8928
|
message: e,
|
|
@@ -8896,19 +8935,19 @@ function fi(e, t, n = {}) {
|
|
|
8896
8935
|
surface: n.surface,
|
|
8897
8936
|
progress: n.progress,
|
|
8898
8937
|
key: i
|
|
8899
|
-
}]),
|
|
8938
|
+
}]), fi(), o > 0 && ui.set(a, setTimeout(() => _i(a), o));
|
|
8900
8939
|
}
|
|
8901
|
-
function
|
|
8902
|
-
|
|
8940
|
+
function _i(e) {
|
|
8941
|
+
pi(e);
|
|
8903
8942
|
let t = $.filter((t) => t.id !== e);
|
|
8904
|
-
t.length !== $.length && ($ = t,
|
|
8943
|
+
t.length !== $.length && ($ = t, fi());
|
|
8905
8944
|
}
|
|
8906
|
-
function
|
|
8907
|
-
$.length !== 0 && ($ = [],
|
|
8945
|
+
function vi() {
|
|
8946
|
+
$.length !== 0 && ($ = [], fi());
|
|
8908
8947
|
}
|
|
8909
8948
|
//#endregion
|
|
8910
8949
|
//#region src/components/AppToast.jsx
|
|
8911
|
-
var
|
|
8950
|
+
var yi = {
|
|
8912
8951
|
success: {
|
|
8913
8952
|
icon: "check-circle",
|
|
8914
8953
|
assertive: !1
|
|
@@ -8925,7 +8964,7 @@ var hi = {
|
|
|
8925
8964
|
icon: "alert-circle",
|
|
8926
8965
|
assertive: !0
|
|
8927
8966
|
}
|
|
8928
|
-
},
|
|
8967
|
+
}, bi = {
|
|
8929
8968
|
"top-start": "top-0 start-0",
|
|
8930
8969
|
"top-center": "top-0 start-50 translate-middle-x",
|
|
8931
8970
|
"top-end": "top-0 end-0",
|
|
@@ -8933,21 +8972,21 @@ var hi = {
|
|
|
8933
8972
|
"bottom-start": "bottom-0 start-0",
|
|
8934
8973
|
"bottom-center": "bottom-0 start-50 translate-middle-x",
|
|
8935
8974
|
"bottom-end": "bottom-0 end-0"
|
|
8936
|
-
},
|
|
8975
|
+
}, xi = 64, Si = /* @__PURE__ */ new Set([
|
|
8937
8976
|
"rise",
|
|
8938
8977
|
"organic",
|
|
8939
8978
|
"jelly",
|
|
8940
8979
|
"spring"
|
|
8941
|
-
]),
|
|
8980
|
+
]), Ci = /* @__PURE__ */ new Set([
|
|
8942
8981
|
"rounded",
|
|
8943
8982
|
"pill",
|
|
8944
8983
|
"sharp"
|
|
8945
|
-
]),
|
|
8946
|
-
function
|
|
8947
|
-
N("AppToast", s),
|
|
8984
|
+
]), wi = /* @__PURE__ */ new Set(["auto", "inverse"]);
|
|
8985
|
+
function Ti({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "rise", shape: r = "rounded", surface: i = "auto", className: a = "", ...s }) {
|
|
8986
|
+
N("AppToast", s), W("AppToast", "position", e, Object.keys(bi)), W("AppToast", "animation", n, Si), W("AppToast", "shape", r, Ci), W("AppToast", "surface", i, wi);
|
|
8948
8987
|
let [c, l] = d([]);
|
|
8949
|
-
o(() =>
|
|
8950
|
-
let u = Math.max(0, c.length - t), f = u ? c.slice(u) : c, h =
|
|
8988
|
+
o(() => hi(l), []);
|
|
8989
|
+
let u = Math.max(0, c.length - t), f = u ? c.slice(u) : c, h = bi[e] ?? bi["bottom-end"];
|
|
8951
8990
|
return /* @__PURE__ */ m("div", {
|
|
8952
8991
|
...s,
|
|
8953
8992
|
className: `wui-toast-container toast-container position-fixed ${h} p-3 ${a}`.trim(),
|
|
@@ -8959,7 +8998,7 @@ function xi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
8959
8998
|
u,
|
|
8960
8999
|
" more"
|
|
8961
9000
|
]
|
|
8962
|
-
}), f.map((e) => /* @__PURE__ */ p(
|
|
9001
|
+
}), f.map((e) => /* @__PURE__ */ p(Ei, {
|
|
8963
9002
|
toast: e,
|
|
8964
9003
|
defaultAnimation: n,
|
|
8965
9004
|
defaultShape: r,
|
|
@@ -8967,8 +9006,8 @@ function xi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
8967
9006
|
}, e.id))]
|
|
8968
9007
|
});
|
|
8969
9008
|
}
|
|
8970
|
-
function
|
|
8971
|
-
let i =
|
|
9009
|
+
function Ei({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded", defaultSurface: r = "auto" }) {
|
|
9010
|
+
let i = yi[e.variant] ?? yi.success, a = Si.has(e.animation) ? e.animation : t, o = Ci.has(e.shape) ? e.shape : n, s = wi.has(e.surface) ? e.surface : r, c = (a !== "rise" && Si.has(a) ? ` wui-toast--anim-${a}` : "") + (o !== "rounded" && Ci.has(o) ? ` wui-toast--shape-${o}` : "") + (s === "inverse" ? " wui-toast--surface-inverse" : ""), l = e.duration === 0, [f, h] = d(0), [g, _] = d(!1), v = u(null), y = () => _i(e.id), b = (e) => {
|
|
8972
9011
|
e.button !== 0 || e.target.closest("button") || (v.current = e.clientX, _(!0), e.currentTarget.setPointerCapture?.(e.pointerId));
|
|
8973
9012
|
}, x = (e) => {
|
|
8974
9013
|
v.current !== null && h(e.clientX - v.current);
|
|
@@ -8977,7 +9016,7 @@ function Si({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
8977
9016
|
}, C = (e) => {
|
|
8978
9017
|
if (v.current === null) return;
|
|
8979
9018
|
let t = e.clientX - v.current;
|
|
8980
|
-
if (Math.abs(t) >
|
|
9019
|
+
if (Math.abs(t) > xi) {
|
|
8981
9020
|
y();
|
|
8982
9021
|
return;
|
|
8983
9022
|
}
|
|
@@ -9060,7 +9099,7 @@ function Si({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
9060
9099
|
}
|
|
9061
9100
|
//#endregion
|
|
9062
9101
|
//#region src/components/AppToolbar.jsx
|
|
9063
|
-
function
|
|
9102
|
+
function Di({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelect: i, label: a, name: o, disabled: c = !1, className: l = "", ...u }) {
|
|
9064
9103
|
N("AppToolbar", u);
|
|
9065
9104
|
let f = s(), h = o || f, [g, _] = d(r), v = n === void 0 ? g : n;
|
|
9066
9105
|
return /* @__PURE__ */ m("div", {
|
|
@@ -9118,7 +9157,7 @@ function Ci({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
9118
9157
|
}
|
|
9119
9158
|
//#endregion
|
|
9120
9159
|
//#region src/components/AppWizard.jsx
|
|
9121
|
-
var
|
|
9160
|
+
var Oi = i(function({ steps: t = [], children: n, active: r, defaultActive: i = 0, onStepChange: a, onFinish: s, onSkip: c, beforeNext: l, onInvalid: d, variant: f = "steps", tone: m, orientation: h = "horizontal", skippable: g = !1, nonLinear: _ = !1, hideStepper: v = !1, disabled: y = !1, label: b = "Progress", backLabel: x = "Back", nextLabel: S = "Next", skipLabel: C = "Skip", finishLabel: w = "Finish", className: T = "", ...E }, D) {
|
|
9122
9161
|
N("AppWizard", E);
|
|
9123
9162
|
let O = u(null), k = (e) => {
|
|
9124
9163
|
O.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
@@ -9173,7 +9212,7 @@ var wi = i(function({ steps: t = [], children: n, active: r, defaultActive: i =
|
|
|
9173
9212
|
});
|
|
9174
9213
|
//#endregion
|
|
9175
9214
|
//#region src/components/AppWorkspaceSwitcher.jsx
|
|
9176
|
-
function
|
|
9215
|
+
function ki({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAction: i, linkComponent: a, searchable: s = !1, onCreate: c, canCreate: f = !1, createLabel: h = "Create workspace", compact: g = !1, size: _ = "md", ariaLabel: v, ...y }) {
|
|
9177
9216
|
let { onToggle: x, ...S } = y;
|
|
9178
9217
|
N("AppWorkspaceSwitcher", S);
|
|
9179
9218
|
let [C, w] = d(""), [T, E] = d(!1), D = u(null), O = e.find((e) => e.id === t) ?? e[0], k = l(() => {
|
|
@@ -9201,7 +9240,7 @@ function Ti({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9201
9240
|
},
|
|
9202
9241
|
...S,
|
|
9203
9242
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
9204
|
-
as:
|
|
9243
|
+
as: Ni,
|
|
9205
9244
|
compact: g,
|
|
9206
9245
|
tenant: O,
|
|
9207
9246
|
"aria-label": j
|
|
@@ -9236,7 +9275,7 @@ function Ti({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9236
9275
|
className: `workspace-switcher-option${e.id === O?.id ? " is-active" : ""}`,
|
|
9237
9276
|
onClick: () => n?.(e),
|
|
9238
9277
|
children: [
|
|
9239
|
-
/* @__PURE__ */ p(
|
|
9278
|
+
/* @__PURE__ */ p(ji, { tenant: e }),
|
|
9240
9279
|
/* @__PURE__ */ p("span", {
|
|
9241
9280
|
className: "workspace-switcher-option-name",
|
|
9242
9281
|
children: e.name
|
|
@@ -9268,17 +9307,17 @@ function Ti({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9268
9307
|
}) : null,
|
|
9269
9308
|
i ? /* @__PURE__ */ p("div", {
|
|
9270
9309
|
className: "workspace-switcher-footer",
|
|
9271
|
-
children:
|
|
9310
|
+
children: Mi(i, a)
|
|
9272
9311
|
}) : null
|
|
9273
9312
|
]
|
|
9274
9313
|
})]
|
|
9275
9314
|
});
|
|
9276
9315
|
}
|
|
9277
|
-
function
|
|
9316
|
+
function Ai(e) {
|
|
9278
9317
|
let t = String(e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
9279
9318
|
return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
|
|
9280
9319
|
}
|
|
9281
|
-
function
|
|
9320
|
+
function ji({ tenant: e }) {
|
|
9282
9321
|
return e?.logoUrl ? /* @__PURE__ */ p("img", {
|
|
9283
9322
|
className: "workspace-switcher-mark",
|
|
9284
9323
|
src: e.logoUrl,
|
|
@@ -9286,10 +9325,10 @@ function Di({ tenant: e }) {
|
|
|
9286
9325
|
loading: "lazy"
|
|
9287
9326
|
}) : /* @__PURE__ */ p("span", {
|
|
9288
9327
|
className: "workspace-switcher-mark",
|
|
9289
|
-
children:
|
|
9328
|
+
children: Ai(e?.name)
|
|
9290
9329
|
});
|
|
9291
9330
|
}
|
|
9292
|
-
function
|
|
9331
|
+
function Mi(e, t) {
|
|
9293
9332
|
if (typeof e != "object" || !e || !("label" in e)) return e;
|
|
9294
9333
|
let { label: n, icon: r, href: i } = e;
|
|
9295
9334
|
return /* @__PURE__ */ m(i ? t ?? "a" : "button", {
|
|
@@ -9301,7 +9340,7 @@ function Oi(e, t) {
|
|
|
9301
9340
|
}) : null, n]
|
|
9302
9341
|
});
|
|
9303
9342
|
}
|
|
9304
|
-
var
|
|
9343
|
+
var Ni = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i }, a) {
|
|
9305
9344
|
return /* @__PURE__ */ m("button", {
|
|
9306
9345
|
ref: a,
|
|
9307
9346
|
type: "button",
|
|
@@ -9309,7 +9348,7 @@ var ki = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9309
9348
|
"aria-haspopup": "true",
|
|
9310
9349
|
"aria-label": n,
|
|
9311
9350
|
...i,
|
|
9312
|
-
children: [/* @__PURE__ */ p(
|
|
9351
|
+
children: [/* @__PURE__ */ p(ji, { tenant: t }), e ? null : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
9313
9352
|
className: "workspace-switcher-trigger-name",
|
|
9314
9353
|
children: t?.name
|
|
9315
9354
|
}), /* @__PURE__ */ p(V, {
|
|
@@ -9321,36 +9360,36 @@ var ki = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9321
9360
|
});
|
|
9322
9361
|
//#endregion
|
|
9323
9362
|
//#region src/components/toast.js
|
|
9324
|
-
function
|
|
9325
|
-
|
|
9363
|
+
function Pi() {
|
|
9364
|
+
vi();
|
|
9326
9365
|
}
|
|
9327
|
-
var
|
|
9366
|
+
var Fi = /* @__PURE__ */ new Set([
|
|
9328
9367
|
"success",
|
|
9329
9368
|
"info",
|
|
9330
9369
|
"warning",
|
|
9331
9370
|
"error"
|
|
9332
9371
|
]);
|
|
9333
|
-
function
|
|
9372
|
+
function Ii(e, t = "info") {
|
|
9334
9373
|
let n = "info", r = {};
|
|
9335
|
-
typeof t == "string" ? n =
|
|
9374
|
+
typeof t == "string" ? n = Fi.has(t) ? t : "info" : typeof t == "object" && t && (r = t, n = Fi.has(r.variant) ? r.variant : "info"), gi(e, n, r);
|
|
9336
9375
|
}
|
|
9337
|
-
function
|
|
9338
|
-
|
|
9376
|
+
function Li(e, t = {}) {
|
|
9377
|
+
gi(e, "error", t);
|
|
9339
9378
|
}
|
|
9340
|
-
|
|
9379
|
+
Ii.promise = (e, t, n = {}) => {
|
|
9341
9380
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
9342
|
-
return
|
|
9381
|
+
return Ii(t.loading || "Loading...", {
|
|
9343
9382
|
...n,
|
|
9344
9383
|
variant: "info",
|
|
9345
9384
|
id: r,
|
|
9346
9385
|
duration: 0
|
|
9347
|
-
}), e.then((e) => (
|
|
9386
|
+
}), e.then((e) => (Ii((typeof t.success == "function" ? t.success(e) : t.success) || "Done", {
|
|
9348
9387
|
...n,
|
|
9349
9388
|
variant: "success",
|
|
9350
9389
|
id: r,
|
|
9351
9390
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
9352
9391
|
}), e)).catch((e) => {
|
|
9353
|
-
throw
|
|
9392
|
+
throw Ii((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
9354
9393
|
...n,
|
|
9355
9394
|
variant: "error",
|
|
9356
9395
|
id: r,
|
|
@@ -9360,7 +9399,7 @@ Mi.promise = (e, t, n = {}) => {
|
|
|
9360
9399
|
};
|
|
9361
9400
|
//#endregion
|
|
9362
9401
|
//#region src/lib/usePagination.js
|
|
9363
|
-
function
|
|
9402
|
+
function Ri(e, t = 10) {
|
|
9364
9403
|
let [n, r] = d(1), [i, a] = d(t), s = e.length, c = Math.max(1, Math.ceil(s / i));
|
|
9365
9404
|
o(() => {
|
|
9366
9405
|
n > c && r(c);
|
|
@@ -9386,4 +9425,4 @@ function Pi(e, t = 10) {
|
|
|
9386
9425
|
};
|
|
9387
9426
|
}
|
|
9388
9427
|
//#endregion
|
|
9389
|
-
export {
|
|
9428
|
+
export { ue as AppAccordion, de as AppActionIcon, U as AppAlert, Se as AppAsyncBlock, Zt as AppAutocomplete, rn as AppAvatar, sn as AppAvatarGroup, cn as AppBadge, un as AppBanner, dn as AppBreadcrumbs, ye as AppButton, pn as AppCallout, hn as AppCard, _n as AppCheckbox, vn as AppChip, yn as AppChoiceCard, bn as AppChoiceChip, xn as AppColorField, Sn as AppCompareTable, jn as AppConfirmDialog, Nn as AppCopyButton, Un as AppDataTable, Wn as AppDatePicker, Gn as AppDateRangePicker, qn as AppDescriptions, Xn as AppDropdown, be as AppEmptyState, rr as AppFileAttachment, ar as AppFilePicker, or as AppFloatingDock, sr as AppFormActions, cr as AppFormRow, lr as AppFormSection, V as AppIcon, ur as AppInfoList, Ht as AppInfoTip, Cn as AppInput, hr as AppKpiTile, _r as AppLogoPicker, xr as AppMeter, On as AppModal, Sr as AppMultiSelect, Cr as AppNumberInput, wr as AppOtpInput, Tr as AppPageHeader, Er as AppPagination, Dr as AppPhoneNumberInput, Vt as AppPopover, Or as AppPricingCard, jr as AppProgress, Mr as AppRadio, Nr as AppRepeater, Z as AppRequiredMark, Pr as AppResourceCard, Ir as AppResult, Lr as AppScrollbar, Rr as AppSearch, zr as AppSegmented, Vr as AppSelect, Rn as AppSelectMini, Hr as AppShell, Gr as AppSidebarMenu, Pn as AppSkeleton, Fn as AppSkeletonRows, Kr as AppSlider, xe as AppSpinner, Jr as AppSplash, Yr as AppStatusBadge, Xr as AppStepper, Qr as AppSwitch, $r as AppTableEmptyState, Bn as AppTablePagination, ni as AppTabs, ri as AppTagInput, ii as AppTextarea, si as AppTimePicker, oi as AppTimeline, Ti as AppToast, Di as AppToolbar, ti as AppTooltip, Oi as AppWizard, ki as AppWorkspaceSwitcher, An as MODAL_ICONS, Pi as dismissAll, Li as errorToast, se as iconNames, le as registerIcons, Ii as toast, Ri as usePagination };
|