@webority/ui-react 0.8.5 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/types/components/AppAutocomplete.d.ts +1 -1
- package/dist/types/components/AppCallout.d.ts +3 -1
- package/dist/types/components/AppChoiceChip.d.ts +2 -1
- package/dist/types/components/AppDatePicker.d.ts +1 -1
- package/dist/types/components/AppDateRangePicker.d.ts +1 -1
- package/dist/types/components/AppFloatingDock.d.ts +1 -1
- package/dist/types/components/AppLogoPicker.d.ts +4 -1
- package/dist/types/components/AppMultiSelect.d.ts +1 -1
- package/dist/types/components/AppOtpInput.d.ts +1 -1
- package/dist/types/components/AppPhoneNumberInput.d.ts +1 -1
- package/dist/types/components/AppSelect.d.ts +1 -1
- package/dist/types/components/AppSelectMini.d.ts +1 -1
- package/dist/types/components/AppSlider.d.ts +1 -1
- package/dist/types/components/AppTagInput.d.ts +1 -1
- package/dist/types/components/AppTimePicker.d.ts +1 -1
- package/dist/types/components/AppTimeline.d.ts +5 -1
- package/dist/types/components/AppToast.d.ts +1 -1
- package/dist/types/components/AppWizard.d.ts +1 -1
- package/dist/types/components/ModalIcons.d.ts +1 -1
- package/dist/types/components/__tests__/restPassthrough.d.ts +3 -3
- package/dist/types/components/iconCatalogFull.g.d.ts +3906 -3906
- package/dist/types/components/iconGlyphs.g.d.ts +61 -61
- package/dist/types/components/iconVariants.g.d.ts +305 -305
- package/dist/types/components/useWuiControl.d.ts +1 -1
- package/dist/types/index.d.ts +84 -84
- package/dist/ui-react.js +528 -492
- package/package.json +3 -3
package/dist/ui-react.js
CHANGED
|
@@ -170,19 +170,19 @@ function L() {
|
|
|
170
170
|
I.clear();
|
|
171
171
|
}), F;
|
|
172
172
|
}
|
|
173
|
-
var R = new Set(D), z = null, ee = null, B = null,
|
|
174
|
-
function
|
|
173
|
+
var R = new Set(D), z = null, ee = null, B = null, V = /* @__PURE__ */ new Set();
|
|
174
|
+
function te() {
|
|
175
175
|
return B ||= import("./iconCatalogFull.g-ofRXGqrB.js").then((e) => {
|
|
176
176
|
z = e.FULL_GLYPHS, ee = e.FULL_VARIANT_GLYPHS;
|
|
177
|
-
for (let e of
|
|
178
|
-
|
|
177
|
+
for (let e of V) e();
|
|
178
|
+
V.clear();
|
|
179
179
|
}), B;
|
|
180
180
|
}
|
|
181
|
-
var
|
|
182
|
-
function
|
|
183
|
-
for (let [t, n] of Object.entries(e))
|
|
181
|
+
var ne = D, re = /* @__PURE__ */ new Map();
|
|
182
|
+
function ie(e) {
|
|
183
|
+
for (let [t, n] of Object.entries(e)) re.set(t, n);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function H({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color: a, style: s, ...c }) {
|
|
186
186
|
N("AppIcon", c);
|
|
187
187
|
let l = !!n && n !== "linear", u = r != null && r !== "", f = (e) => u ? /* @__PURE__ */ p("span", {
|
|
188
188
|
className: "wui-icon-tip",
|
|
@@ -193,15 +193,15 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
193
193
|
}) : e, h = O[e] !== void 0, g = !h && R.has(e), [, _] = d(0);
|
|
194
194
|
o(() => {
|
|
195
195
|
let e = () => _((e) => e + 1);
|
|
196
|
-
return l && h && !P && (I.add(e), L()), g && !z && (
|
|
197
|
-
I.delete(e),
|
|
196
|
+
return l && h && !P && (I.add(e), L()), g && !z && (V.add(e), te()), () => {
|
|
197
|
+
I.delete(e), V.delete(e);
|
|
198
198
|
};
|
|
199
199
|
}, [
|
|
200
200
|
l,
|
|
201
201
|
h,
|
|
202
202
|
g
|
|
203
203
|
]);
|
|
204
|
-
let v =
|
|
204
|
+
let v = re.get(e);
|
|
205
205
|
if (v) return f(v({
|
|
206
206
|
size: t,
|
|
207
207
|
color: a,
|
|
@@ -251,8 +251,8 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
251
251
|
}
|
|
252
252
|
//#endregion
|
|
253
253
|
//#region src/components/renderIconProp.js
|
|
254
|
-
function
|
|
255
|
-
return e == null || e === !1 ? null : typeof e == "string" ? r(
|
|
254
|
+
function U(e, { size: t = 16, className: n } = {}) {
|
|
255
|
+
return e == null || e === !1 ? null : typeof e == "string" ? r(H, {
|
|
256
256
|
name: e,
|
|
257
257
|
size: t,
|
|
258
258
|
className: n
|
|
@@ -260,7 +260,7 @@ function H(e, { size: t = 16, className: n } = {}) {
|
|
|
260
260
|
}
|
|
261
261
|
//#endregion
|
|
262
262
|
//#region src/components/ActionIcon.jsx
|
|
263
|
-
function
|
|
263
|
+
function ae({ icon: e, label: t, danger: n = !1, disabled: r = !1, size: i = 20, onClick: a, className: o = "", as: s, href: c, ...l }) {
|
|
264
264
|
N("ActionIcon", l);
|
|
265
265
|
let u = [
|
|
266
266
|
"u-action",
|
|
@@ -285,12 +285,12 @@ function oe({ icon: e, label: t, danger: n = !1, disabled: r = !1, size: i = 20,
|
|
|
285
285
|
a?.(e);
|
|
286
286
|
},
|
|
287
287
|
...l,
|
|
288
|
-
children:
|
|
288
|
+
children: U(e, { size: i })
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
291
|
//#endregion
|
|
292
292
|
//#region src/components/AppAccordion.jsx
|
|
293
|
-
function
|
|
293
|
+
function oe({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i }) {
|
|
294
294
|
N("AppAccordion", i);
|
|
295
295
|
let a = s(), o = n || a, [c, l] = d(() => {
|
|
296
296
|
let n = e.map((e, t) => ({
|
|
@@ -320,7 +320,7 @@ function se({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i })
|
|
|
320
320
|
onClick: () => f(n),
|
|
321
321
|
children: [e.title, /* @__PURE__ */ p("span", {
|
|
322
322
|
className: "faq-q-icon",
|
|
323
|
-
children: /* @__PURE__ */ p(
|
|
323
|
+
children: /* @__PURE__ */ p(H, {
|
|
324
324
|
name: "chevron-down",
|
|
325
325
|
size: 18
|
|
326
326
|
})
|
|
@@ -342,13 +342,13 @@ function se({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i })
|
|
|
342
342
|
}
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region src/components/AppAlert.jsx
|
|
345
|
-
var
|
|
345
|
+
var se = {
|
|
346
346
|
info: "info",
|
|
347
347
|
success: "check",
|
|
348
348
|
warning: "alert-triangle",
|
|
349
349
|
danger: "x"
|
|
350
350
|
};
|
|
351
|
-
function
|
|
351
|
+
function ce(e, t, n, r) {
|
|
352
352
|
return n ? /* @__PURE__ */ p("span", {
|
|
353
353
|
className: "alert-icon alert-icon-image",
|
|
354
354
|
children: /* @__PURE__ */ p("img", {
|
|
@@ -357,7 +357,7 @@ function le(e, t, n, r) {
|
|
|
357
357
|
})
|
|
358
358
|
}) : e ? typeof e == "string" ? /* @__PURE__ */ p("span", {
|
|
359
359
|
className: "alert-icon",
|
|
360
|
-
children: /* @__PURE__ */ p(
|
|
360
|
+
children: /* @__PURE__ */ p(H, {
|
|
361
361
|
name: e,
|
|
362
362
|
size: t
|
|
363
363
|
})
|
|
@@ -366,9 +366,9 @@ function le(e, t, n, r) {
|
|
|
366
366
|
children: e
|
|
367
367
|
}) : null;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function le({ 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 }) {
|
|
370
370
|
N("AppAlert", d);
|
|
371
|
-
let g = r === void 0 ?
|
|
371
|
+
let g = r === void 0 ? se[e] : r === "none" ? null : r, _ = !!i || !!g, v = n ? /* @__PURE__ */ p("div", {
|
|
372
372
|
className: "alert-heading",
|
|
373
373
|
children: n
|
|
374
374
|
}) : null, y = _ && !!v && !!t, b = y ? 13 : 11;
|
|
@@ -385,7 +385,7 @@ function ue({ variant: e = "info", children: t, title: n, icon: r, image: i, ima
|
|
|
385
385
|
transition: !1,
|
|
386
386
|
role: u,
|
|
387
387
|
...d,
|
|
388
|
-
children: _ ? /* @__PURE__ */ m(f, { children: [
|
|
388
|
+
children: _ ? /* @__PURE__ */ m(f, { children: [ce(g, b, i, a), /* @__PURE__ */ m("div", {
|
|
389
389
|
className: "alert-content",
|
|
390
390
|
children: [v, t]
|
|
391
391
|
})] }) : /* @__PURE__ */ m(f, { children: [v, t] })
|
|
@@ -393,7 +393,7 @@ function ue({ variant: e = "info", children: t, title: n, icon: r, image: i, ima
|
|
|
393
393
|
}
|
|
394
394
|
//#endregion
|
|
395
395
|
//#region src/components/AppButton.jsx
|
|
396
|
-
var
|
|
396
|
+
var ue = {
|
|
397
397
|
primary: "primary",
|
|
398
398
|
secondary: "secondary",
|
|
399
399
|
outline: "outline-primary",
|
|
@@ -404,32 +404,37 @@ var de = {
|
|
|
404
404
|
warning: "warning",
|
|
405
405
|
subtle: "subtle",
|
|
406
406
|
"outline-light": "outline-light"
|
|
407
|
-
},
|
|
407
|
+
}, de = {
|
|
408
408
|
sm: 14,
|
|
409
409
|
md: 16,
|
|
410
410
|
lg: 20
|
|
411
411
|
};
|
|
412
|
-
function
|
|
412
|
+
function fe(e, t, n) {
|
|
413
413
|
if (!e) return null;
|
|
414
414
|
let r = t === "left" ? "me-2" : "ms-2";
|
|
415
|
-
return typeof e == "string" ? /* @__PURE__ */ p(
|
|
415
|
+
return typeof e == "string" ? /* @__PURE__ */ p(H, {
|
|
416
416
|
name: e,
|
|
417
|
-
size:
|
|
417
|
+
size: de[n] ?? de.md,
|
|
418
418
|
className: r
|
|
419
419
|
}) : /* @__PURE__ */ p("span", {
|
|
420
420
|
className: `d-inline-flex ${r}`,
|
|
421
421
|
children: e
|
|
422
422
|
});
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function W({ 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 }) {
|
|
425
425
|
N("AppButton", d);
|
|
426
|
-
let f = [
|
|
426
|
+
let f = [
|
|
427
|
+
o ? "w-100" : "",
|
|
428
|
+
i ? "is-loading" : "",
|
|
429
|
+
u
|
|
430
|
+
].filter(Boolean).join(" ");
|
|
427
431
|
return /* @__PURE__ */ m(v, {
|
|
428
432
|
type: (d.as === void 0 || d.as === "button") && l === void 0 ? r : void 0,
|
|
429
433
|
href: l,
|
|
430
|
-
variant:
|
|
434
|
+
variant: ue[t] ?? "primary",
|
|
431
435
|
size: n === "md" ? void 0 : n,
|
|
432
436
|
disabled: a || i,
|
|
437
|
+
"aria-busy": i || void 0,
|
|
433
438
|
className: f || void 0,
|
|
434
439
|
...d,
|
|
435
440
|
children: [
|
|
@@ -437,15 +442,15 @@ function U({ children: e, variant: t = "primary", size: n = "md", type: r = "but
|
|
|
437
442
|
className: "spinner-border spinner-border-sm me-2",
|
|
438
443
|
"aria-hidden": "true"
|
|
439
444
|
}),
|
|
440
|
-
!i &&
|
|
445
|
+
!i && fe(s, "left", n),
|
|
441
446
|
e,
|
|
442
|
-
!i &&
|
|
447
|
+
!i && fe(c, "right", n)
|
|
443
448
|
]
|
|
444
449
|
});
|
|
445
450
|
}
|
|
446
451
|
//#endregion
|
|
447
452
|
//#region src/components/AppEmptyState.jsx
|
|
448
|
-
function
|
|
453
|
+
function pe({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, action: a, className: o = "", style: s, ...c }) {
|
|
449
454
|
return N("AppEmptyState", c), /* @__PURE__ */ m("div", {
|
|
450
455
|
className: [
|
|
451
456
|
"empty-state",
|
|
@@ -457,7 +462,7 @@ function me({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, acti
|
|
|
457
462
|
children: [
|
|
458
463
|
e ? /* @__PURE__ */ p("div", {
|
|
459
464
|
className: "empty-state-icon",
|
|
460
|
-
children:
|
|
465
|
+
children: U(e, { size: t })
|
|
461
466
|
}) : null,
|
|
462
467
|
r != null && /* @__PURE__ */ p("div", {
|
|
463
468
|
className: "empty-state-title",
|
|
@@ -476,7 +481,7 @@ function me({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, acti
|
|
|
476
481
|
}
|
|
477
482
|
//#endregion
|
|
478
483
|
//#region src/components/AppSpinner.jsx
|
|
479
|
-
function
|
|
484
|
+
function me({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
480
485
|
N("AppSpinner", r);
|
|
481
486
|
let { style: i, ...a } = r, o = Number(e), s = Number.isFinite(o) && o > 0;
|
|
482
487
|
return /* @__PURE__ */ p("span", {
|
|
@@ -494,7 +499,7 @@ function he({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
|
494
499
|
}
|
|
495
500
|
//#endregion
|
|
496
501
|
//#region src/components/AppAsyncBlock.jsx
|
|
497
|
-
function
|
|
502
|
+
function he({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRetry: i, skeleton: a, className: o = "", ...s }) {
|
|
498
503
|
N("AppAsyncBlock", s);
|
|
499
504
|
let c = `async-block${o ? ` ${o}` : ""}`;
|
|
500
505
|
return e ? /* @__PURE__ */ p("div", {
|
|
@@ -503,17 +508,17 @@ function ge({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
503
508
|
...s,
|
|
504
509
|
children: a ?? /* @__PURE__ */ p("div", {
|
|
505
510
|
className: "d-flex align-items-center justify-content-center py-5",
|
|
506
|
-
children: /* @__PURE__ */ p(
|
|
511
|
+
children: /* @__PURE__ */ p(me, { label: "Loading" })
|
|
507
512
|
})
|
|
508
513
|
}) : t ? /* @__PURE__ */ p("div", {
|
|
509
514
|
className: c,
|
|
510
515
|
"data-state": "error",
|
|
511
516
|
...s,
|
|
512
|
-
children: /* @__PURE__ */ p(
|
|
517
|
+
children: /* @__PURE__ */ p(pe, {
|
|
513
518
|
icon: "alert-circle",
|
|
514
519
|
title: "Something went wrong",
|
|
515
520
|
text: t,
|
|
516
|
-
action: i ? /* @__PURE__ */ p(
|
|
521
|
+
action: i ? /* @__PURE__ */ p(W, {
|
|
517
522
|
variant: "secondary",
|
|
518
523
|
onClick: i,
|
|
519
524
|
children: "Retry"
|
|
@@ -523,7 +528,7 @@ function ge({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
523
528
|
className: c,
|
|
524
529
|
"data-state": "empty",
|
|
525
530
|
...s,
|
|
526
|
-
children: /* @__PURE__ */ p(
|
|
531
|
+
children: /* @__PURE__ */ p(pe, {
|
|
527
532
|
icon: "inbox",
|
|
528
533
|
title: "Nothing to show yet"
|
|
529
534
|
})
|
|
@@ -536,15 +541,15 @@ function ge({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
536
541
|
}
|
|
537
542
|
//#endregion
|
|
538
543
|
//#region ../elements/dist/ui-elements.js
|
|
539
|
-
var
|
|
544
|
+
var ge = {
|
|
540
545
|
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>",
|
|
541
546
|
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>",
|
|
542
547
|
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>",
|
|
543
548
|
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>",
|
|
544
549
|
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>"
|
|
545
550
|
};
|
|
546
|
-
Object.keys(
|
|
547
|
-
var
|
|
551
|
+
Object.keys(ge);
|
|
552
|
+
var _e = class extends HTMLElement {
|
|
548
553
|
static get observedAttributes() {
|
|
549
554
|
return ["tone", "size"];
|
|
550
555
|
}
|
|
@@ -555,36 +560,36 @@ var ve = class extends HTMLElement {
|
|
|
555
560
|
this.isConnected && this.render();
|
|
556
561
|
}
|
|
557
562
|
render() {
|
|
558
|
-
let e = this.getAttribute("tone"), t = Number.parseInt(this.getAttribute("size"), 10) || 72, n =
|
|
563
|
+
let e = this.getAttribute("tone"), t = Number.parseInt(this.getAttribute("size"), 10) || 72, n = ge[e] || ge.info;
|
|
559
564
|
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>`;
|
|
560
565
|
}
|
|
561
|
-
},
|
|
562
|
-
function
|
|
566
|
+
}, ve = 4;
|
|
567
|
+
function ye(e, t, n = {}) {
|
|
563
568
|
if (!e || !t) return;
|
|
564
|
-
let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i +
|
|
565
|
-
t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(
|
|
566
|
-
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s -
|
|
567
|
-
t.style.left = `${Math.max(
|
|
569
|
+
let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + ve && r.top > a;
|
|
570
|
+
t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(ve, r.top - i - ve)}px` : `${r.bottom + ve}px`, n.matchWidth && (t.style.minWidth = `${r.width}px`, t.style.width = "max-content", t.style.maxWidth = `${window.innerWidth - ve * 2}px`);
|
|
571
|
+
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - ve);
|
|
572
|
+
t.style.left = `${Math.max(ve, c)}px`;
|
|
568
573
|
}
|
|
569
|
-
function
|
|
570
|
-
|
|
574
|
+
function be(e, t) {
|
|
575
|
+
xe(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
|
|
571
576
|
}
|
|
572
|
-
function
|
|
577
|
+
function xe(e) {
|
|
573
578
|
e?._reanchor && (window.removeEventListener("resize", e._reanchor), window.removeEventListener("scroll", e._reanchor, !0), e._reanchor = null);
|
|
574
579
|
}
|
|
575
|
-
var
|
|
576
|
-
function
|
|
577
|
-
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${
|
|
580
|
+
var Se = "data-wui-mirror";
|
|
581
|
+
function G(e, t) {
|
|
582
|
+
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${Se}]`);
|
|
578
583
|
if (!n) {
|
|
579
584
|
r?.remove();
|
|
580
585
|
return;
|
|
581
586
|
}
|
|
582
|
-
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(
|
|
587
|
+
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(Se, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
|
|
583
588
|
for (let t of [...r.attributes]) t.name.startsWith("data-val") && !e.hasAttribute(t.name) && r.removeAttribute(t.name);
|
|
584
589
|
for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
|
|
585
590
|
r.disabled = e.hasAttribute("disabled");
|
|
586
591
|
}
|
|
587
|
-
var
|
|
592
|
+
var Ce = {
|
|
588
593
|
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>",
|
|
589
594
|
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>",
|
|
590
595
|
"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>",
|
|
@@ -725,12 +730,12 @@ var we = {
|
|
|
725
730
|
"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>",
|
|
726
731
|
"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>"
|
|
727
732
|
};
|
|
728
|
-
Object.keys(
|
|
729
|
-
function
|
|
730
|
-
let i =
|
|
733
|
+
Object.keys(Ce);
|
|
734
|
+
function K(e, { size: t = 16, className: n = "", style: r = "" } = {}) {
|
|
735
|
+
let i = Ce[e];
|
|
731
736
|
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>` : "";
|
|
732
737
|
}
|
|
733
|
-
function
|
|
738
|
+
function we(e) {
|
|
734
739
|
let { getVisibleOptions: t, getActive: n, setActive: r, onEnter: i, onEscape: a, onTypeahead: o, typeaheadMs: s = 500 } = e, c = "", l = null, u = () => {
|
|
735
740
|
clearTimeout(l), l = null, c = "";
|
|
736
741
|
};
|
|
@@ -759,15 +764,15 @@ function Te(e) {
|
|
|
759
764
|
teardown: u
|
|
760
765
|
};
|
|
761
766
|
}
|
|
762
|
-
var
|
|
767
|
+
var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), Ee = (e) => {
|
|
763
768
|
if (!e) return "";
|
|
764
769
|
let t = String(e).toLowerCase().replace(/[^a-z0-9-]/g, "");
|
|
765
|
-
return t ?
|
|
766
|
-
},
|
|
770
|
+
return t ? K(t) : "";
|
|
771
|
+
}, De = (e) => {
|
|
767
772
|
if (e == null) return "";
|
|
768
|
-
let t = e[
|
|
773
|
+
let t = e[Te] ? String(e.label ?? "") : q(e.label), n = Ee(e.icon);
|
|
769
774
|
return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
|
|
770
|
-
},
|
|
775
|
+
}, Oe = class extends HTMLElement {
|
|
771
776
|
static formAssociated = !0;
|
|
772
777
|
_accessibleName() {
|
|
773
778
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
@@ -817,14 +822,14 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
817
822
|
return this._value;
|
|
818
823
|
}
|
|
819
824
|
set value(e) {
|
|
820
|
-
this._value = e == null ? "" : String(e),
|
|
825
|
+
this._value = e == null ? "" : String(e), G(this, this._value);
|
|
821
826
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
822
|
-
this._label = t ?
|
|
827
|
+
this._label = t ? Ae(t.label) : "", this._syncInput(), this._renderOptions("");
|
|
823
828
|
}
|
|
824
829
|
set options(e) {
|
|
825
830
|
this._optionsProp = Array.isArray(e) ? e : [];
|
|
826
831
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
827
|
-
t && (this._label =
|
|
832
|
+
t && (this._label = Ae(t.label)), this._renderOptions(), this._syncInput();
|
|
828
833
|
}
|
|
829
834
|
get options() {
|
|
830
835
|
return this._readOptions();
|
|
@@ -843,7 +848,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
843
848
|
}
|
|
844
849
|
_matchesKnownOption(e) {
|
|
845
850
|
let t = e.toLowerCase();
|
|
846
|
-
return this._readOptions().some((e) =>
|
|
851
|
+
return this._readOptions().some((e) => Ae(e.label).toLowerCase() === t || String(e.value ?? "").toLowerCase() === t);
|
|
847
852
|
}
|
|
848
853
|
get _minChars() {
|
|
849
854
|
return Math.max(0, Number(this.getAttribute("min-chars")) || +!!this._remote);
|
|
@@ -861,7 +866,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
861
866
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
862
867
|
label: e.innerHTML,
|
|
863
868
|
icon: e.getAttribute("icon") || void 0,
|
|
864
|
-
[
|
|
869
|
+
[Te]: !0,
|
|
865
870
|
selected: e.hasAttribute("selected")
|
|
866
871
|
})));
|
|
867
872
|
}
|
|
@@ -875,17 +880,17 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
875
880
|
let r = `${this.id}-listbox`;
|
|
876
881
|
this._listboxId = r, this.innerHTML = `
|
|
877
882
|
<div class="search-select${n}">
|
|
878
|
-
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
879
|
-
<input class="search-select-input search-select-ac-input" placeholder="${
|
|
883
|
+
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${ke(r)}" aria-label="${ke(this._accessibleName())}">
|
|
884
|
+
<input class="search-select-input search-select-ac-input" placeholder="${ke(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
880
885
|
<span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
|
|
881
|
-
<button type="button" class="search-select-clear" aria-label="Clear" hidden>${
|
|
886
|
+
<button type="button" class="search-select-clear" aria-label="Clear" hidden>${K("x")}</button>
|
|
882
887
|
</div>
|
|
883
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
888
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${ke(r)}" tabindex="-1" hidden>
|
|
884
889
|
<div class="search-select-options"></div>
|
|
885
890
|
<div class="search-select-empty" hidden>No matches</div>
|
|
886
891
|
<div class="search-select-hint" hidden>Type to search…</div>
|
|
887
892
|
</div>
|
|
888
|
-
</div>`, this._rendered = !0,
|
|
893
|
+
</div>`, this._rendered = !0, G(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
|
|
889
894
|
}
|
|
890
895
|
_refs() {
|
|
891
896
|
return {
|
|
@@ -914,7 +919,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
914
919
|
let t = this._refs();
|
|
915
920
|
if (!t.optionsWrap) return;
|
|
916
921
|
let n = e ?? (t.input ? t.input.value : ""), r = n.trim().toLowerCase(), i = this._readOptions();
|
|
917
|
-
!this._remote && r && (i = i.filter((e) =>
|
|
922
|
+
!this._remote && r && (i = i.filter((e) => Ae(e.label).toLowerCase().includes(r)));
|
|
918
923
|
let a = n.trim(), o = this._allowCustom && a && !this._matchesKnownOption(a) ? [...i, {
|
|
919
924
|
value: a,
|
|
920
925
|
custom: !0
|
|
@@ -922,11 +927,11 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
922
927
|
t.optionsWrap.innerHTML = o.map((e, t) => {
|
|
923
928
|
let n = `${s}-opt-${t}`;
|
|
924
929
|
if (e.custom) {
|
|
925
|
-
let t = `Add “${
|
|
926
|
-
return `<button type="button" role="option" id="${
|
|
930
|
+
let t = `Add “${q(e.value)}”`;
|
|
931
|
+
return `<button type="button" role="option" id="${ke(n)}" class="search-select-option search-select-option-custom" data-value="${ke(e.value)}" data-custom="true" aria-selected="false">${t}</button>`;
|
|
927
932
|
}
|
|
928
933
|
let r = String(e.value) === String(this._value);
|
|
929
|
-
return `<button type="button" role="option" id="${
|
|
934
|
+
return `<button type="button" role="option" id="${ke(n)}" class="search-select-option${r ? " selected" : ""}" data-value="${ke(e.value)}" aria-selected="${r}">${De(e)}</button>`;
|
|
930
935
|
}).join(""), this._active = -1, t.control?.removeAttribute("aria-activedescendant");
|
|
931
936
|
let c = r.length < this._minChars;
|
|
932
937
|
t.hint && (t.hint.hidden = !(this._remote && c && !i.length)), t.empty && (t.empty.hidden = this._loading || o.length > 0 || this._remote && c);
|
|
@@ -935,7 +940,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
935
940
|
this._teardown();
|
|
936
941
|
let e = this._refs();
|
|
937
942
|
if (!e.control || !e.input) return;
|
|
938
|
-
let t = () =>
|
|
943
|
+
let t = () => ye(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (t) => {
|
|
939
944
|
let r = n();
|
|
940
945
|
this._active = t;
|
|
941
946
|
for (let e of this._optionEls()) e.classList.remove("is-active");
|
|
@@ -946,12 +951,12 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
946
951
|
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();
|
|
947
952
|
}, s = (t) => {
|
|
948
953
|
let n = t.dataset.custom === "true";
|
|
949
|
-
this._value = t.dataset.value, this._label = n ? t.dataset.value :
|
|
954
|
+
this._value = t.dataset.value, this._label = n ? t.dataset.value : Ae(t.innerHTML), G(this, this._value), e.input.value = this._label, this.dispatchEvent(new CustomEvent("change", {
|
|
950
955
|
bubbles: !0,
|
|
951
956
|
detail: { isCustom: n }
|
|
952
957
|
})), o(), e.input.focus();
|
|
953
958
|
}, c = (t) => {
|
|
954
|
-
this._value = t, this._label = t,
|
|
959
|
+
this._value = t, this._label = t, G(this, t), e.input.value = t, this.dispatchEvent(new CustomEvent("change", {
|
|
955
960
|
bubbles: !0,
|
|
956
961
|
detail: { isCustom: !0 }
|
|
957
962
|
})), o();
|
|
@@ -969,7 +974,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
969
974
|
}, this._timer = setTimeout(() => this._fireSearch(t, e), this._debounceMs);
|
|
970
975
|
} else this._renderOptions(t);
|
|
971
976
|
};
|
|
972
|
-
this._navHandler =
|
|
977
|
+
this._navHandler = we({
|
|
973
978
|
getVisibleOptions: n,
|
|
974
979
|
getActive: () => this._active,
|
|
975
980
|
setActive: (e) => r(e),
|
|
@@ -1009,11 +1014,11 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1009
1014
|
let t = e.target.closest(".search-select-option");
|
|
1010
1015
|
t && r(this._optionEls().indexOf(t));
|
|
1011
1016
|
}), e.optionsWrap.addEventListener("mouseleave", () => r(-1)), e.clear?.addEventListener("click", () => {
|
|
1012
|
-
this._value = "", this._label = "",
|
|
1017
|
+
this._value = "", this._label = "", G(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
|
|
1013
1018
|
}), this._bindGlobal = () => {
|
|
1014
1019
|
this._teardown(), this._onDocClick = (e) => {
|
|
1015
1020
|
i() && !this.contains(e.target) && o();
|
|
1016
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
1021
|
+
}, document.addEventListener("click", this._onDocClick), be(this, () => {
|
|
1017
1022
|
i() && t();
|
|
1018
1023
|
});
|
|
1019
1024
|
}, this._bindGlobal();
|
|
@@ -1028,12 +1033,12 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1028
1033
|
}));
|
|
1029
1034
|
}
|
|
1030
1035
|
_teardown() {
|
|
1031
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
1036
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), xe(this), clearTimeout(this._timer), this._navHandler?.teardown();
|
|
1032
1037
|
}
|
|
1033
1038
|
disconnectedCallback() {
|
|
1034
1039
|
this._teardown();
|
|
1035
1040
|
}
|
|
1036
|
-
},
|
|
1041
|
+
}, ke = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), Ae = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), je = [
|
|
1037
1042
|
"January",
|
|
1038
1043
|
"February",
|
|
1039
1044
|
"March",
|
|
@@ -1046,7 +1051,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1046
1051
|
"October",
|
|
1047
1052
|
"November",
|
|
1048
1053
|
"December"
|
|
1049
|
-
],
|
|
1054
|
+
], Me = [
|
|
1050
1055
|
"Su",
|
|
1051
1056
|
"Mo",
|
|
1052
1057
|
"Tu",
|
|
@@ -1054,17 +1059,17 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1054
1059
|
"Th",
|
|
1055
1060
|
"Fr",
|
|
1056
1061
|
"Sa"
|
|
1057
|
-
],
|
|
1062
|
+
], Ne = (e) => String(e).padStart(2, "0"), Pe = (e, t, n) => `${e}-${Ne(t + 1)}-${Ne(n)}`, J = (e) => {
|
|
1058
1063
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
|
|
1059
1064
|
return t ? {
|
|
1060
1065
|
y: +t[1],
|
|
1061
1066
|
m: t[2] - 1,
|
|
1062
1067
|
d: +t[3]
|
|
1063
1068
|
} : null;
|
|
1064
|
-
},
|
|
1065
|
-
let t =
|
|
1066
|
-
return t ? `${
|
|
1067
|
-
},
|
|
1069
|
+
}, Fe = (e) => {
|
|
1070
|
+
let t = J(e);
|
|
1071
|
+
return t ? `${Ne(t.d)} ${je[t.m].slice(0, 3)} ${t.y}` : "";
|
|
1072
|
+
}, Ie = (e, t) => new Date(e, t + 1, 0).getDate(), Le = (e, t) => {
|
|
1068
1073
|
for (; t < 0;) t += 12, --e;
|
|
1069
1074
|
for (; t > 11;) t -= 12, e += 1;
|
|
1070
1075
|
return {
|
|
@@ -1114,7 +1119,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1114
1119
|
return this._value;
|
|
1115
1120
|
}
|
|
1116
1121
|
set value(e) {
|
|
1117
|
-
this._value = e || "",
|
|
1122
|
+
this._value = e || "", G(this, this._value), this._syncTrigger();
|
|
1118
1123
|
}
|
|
1119
1124
|
_firstDay() {
|
|
1120
1125
|
let e = Number.parseInt(this.getAttribute("first-day") ?? "", 10);
|
|
@@ -1122,29 +1127,29 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1122
1127
|
}
|
|
1123
1128
|
render() {
|
|
1124
1129
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
|
|
1125
|
-
let e = this.getAttribute("placeholder") || "Enter Date", t =
|
|
1130
|
+
let e = this.getAttribute("placeholder") || "Enter Date", t = J(this._value);
|
|
1126
1131
|
t && (this._viewY = t.y, this._viewM = t.m);
|
|
1127
1132
|
let n = this.getAttribute("size"), r = n === "sm" ? " input-sm" : n === "lg" ? " input-lg" : "", i = this.getAttribute("aria-label"), a = this.getAttribute("aria-describedby");
|
|
1128
1133
|
this.innerHTML = `
|
|
1129
1134
|
<div class="datepicker">
|
|
1130
|
-
<button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${i ? ` aria-label="${
|
|
1131
|
-
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ?
|
|
1132
|
-
${
|
|
1135
|
+
<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)}"` : ""}>
|
|
1136
|
+
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? Fe(this._value) : q(e)}</span>
|
|
1137
|
+
${K("calendar-dots")}
|
|
1133
1138
|
</button>
|
|
1134
1139
|
<div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
|
|
1135
|
-
</div>`, this._rendered = !0,
|
|
1140
|
+
</div>`, this._rendered = !0, G(this, this._value), this._wire();
|
|
1136
1141
|
}
|
|
1137
1142
|
_syncFormValue() {
|
|
1138
|
-
|
|
1143
|
+
G(this, this._value);
|
|
1139
1144
|
}
|
|
1140
1145
|
_syncTrigger() {
|
|
1141
1146
|
let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
|
|
1142
1147
|
if (!t) return;
|
|
1143
|
-
let n =
|
|
1144
|
-
t.textContent = n ?
|
|
1148
|
+
let n = J(this._value);
|
|
1149
|
+
t.textContent = n ? Fe(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
|
|
1145
1150
|
}
|
|
1146
1151
|
_limits() {
|
|
1147
|
-
let e =
|
|
1152
|
+
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;
|
|
1148
1153
|
return {
|
|
1149
1154
|
dayDisabled: (e, t, i) => {
|
|
1150
1155
|
let a = new Date(e, t, i).getTime();
|
|
@@ -1152,7 +1157,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1152
1157
|
},
|
|
1153
1158
|
monthDisabled: (e, t) => {
|
|
1154
1159
|
let i = new Date(e, t, 1).getTime();
|
|
1155
|
-
return new Date(e, t,
|
|
1160
|
+
return new Date(e, t, Ie(e, t)).getTime() < n || i > r;
|
|
1156
1161
|
},
|
|
1157
1162
|
yearDisabled: (e) => {
|
|
1158
1163
|
let t = new Date(e, 0, 1).getTime();
|
|
@@ -1165,29 +1170,29 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1165
1170
|
e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
|
|
1166
1171
|
}
|
|
1167
1172
|
_daysHtml() {
|
|
1168
|
-
let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n =
|
|
1173
|
+
let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = Ie(this._viewY, this._viewM), r = J(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
|
|
1169
1174
|
y: this._viewY,
|
|
1170
1175
|
m: this._viewM,
|
|
1171
1176
|
d: 1
|
|
1172
1177
|
}, s = (e, t, n, s) => {
|
|
1173
|
-
let c =
|
|
1178
|
+
let c = Pe(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);
|
|
1174
1179
|
return `<button type="button" class="${[
|
|
1175
1180
|
"datepicker-day",
|
|
1176
1181
|
s ? "is-outside" : "",
|
|
1177
1182
|
u ? "is-today" : "",
|
|
1178
1183
|
l ? "is-selected" : ""
|
|
1179
1184
|
].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
|
|
1180
|
-
}, c = "", l =
|
|
1185
|
+
}, c = "", l = Le(this._viewY, this._viewM - 1), u = Ie(l.y, l.m);
|
|
1181
1186
|
for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
|
|
1182
1187
|
for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
|
|
1183
|
-
let d =
|
|
1188
|
+
let d = Le(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
|
|
1184
1189
|
for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
|
|
1185
|
-
let p =
|
|
1190
|
+
let p = Me.map((t, n) => Me[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
|
|
1186
1191
|
return `
|
|
1187
1192
|
<div class="datepicker-head">
|
|
1188
|
-
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${
|
|
1189
|
-
<button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${
|
|
1190
|
-
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${
|
|
1193
|
+
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${K("chevron-left")}</button>
|
|
1194
|
+
<button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${je[this._viewM]} ${this._viewY}</button>
|
|
1195
|
+
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${K("chevron-right")}</button>
|
|
1191
1196
|
</div>
|
|
1192
1197
|
<div class="datepicker-weekdays">${p}</div>
|
|
1193
1198
|
<div class="datepicker-grid${this._slide ? ` ${this._slide}` : ""}" role="grid">${c}</div>
|
|
@@ -1197,25 +1202,25 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1197
1202
|
</div>`;
|
|
1198
1203
|
}
|
|
1199
1204
|
_monthsHtml() {
|
|
1200
|
-
let e =
|
|
1205
|
+
let e = J(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
|
|
1201
1206
|
for (let i = 0; i < 12; i++) {
|
|
1202
1207
|
let a = e && e.y === this._viewY && e.m === i, o = t.getFullYear() === this._viewY && t.getMonth() === i, s = n(this._viewY, i), c = [
|
|
1203
1208
|
"datepicker-cell",
|
|
1204
1209
|
o ? "is-today" : "",
|
|
1205
1210
|
a ? "is-selected" : ""
|
|
1206
1211
|
].filter(Boolean).join(" ");
|
|
1207
|
-
r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${
|
|
1212
|
+
r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${je[i].slice(0, 3)}</button>`;
|
|
1208
1213
|
}
|
|
1209
1214
|
return `
|
|
1210
1215
|
<div class="datepicker-head">
|
|
1211
|
-
<button type="button" class="datepicker-nav-btn" data-nav-year="-1" aria-label="Previous year">${
|
|
1216
|
+
<button type="button" class="datepicker-nav-btn" data-nav-year="-1" aria-label="Previous year">${K("chevron-left")}</button>
|
|
1212
1217
|
<button type="button" class="datepicker-month" data-view="years" aria-label="Choose year">${this._viewY}</button>
|
|
1213
|
-
<button type="button" class="datepicker-nav-btn" data-nav-year="1" aria-label="Next year">${
|
|
1218
|
+
<button type="button" class="datepicker-nav-btn" data-nav-year="1" aria-label="Next year">${K("chevron-right")}</button>
|
|
1214
1219
|
</div>
|
|
1215
1220
|
<div class="datepicker-cells">${r}</div>`;
|
|
1216
1221
|
}
|
|
1217
1222
|
_yearsHtml() {
|
|
1218
|
-
let e =
|
|
1223
|
+
let e = J(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
|
|
1219
1224
|
for (let a = 0; a < 12; a++) {
|
|
1220
1225
|
let o = r + a, s = e && e.y === o, c = t === o, l = n(o), u = [
|
|
1221
1226
|
"datepicker-cell",
|
|
@@ -1226,9 +1231,9 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1226
1231
|
}
|
|
1227
1232
|
return `
|
|
1228
1233
|
<div class="datepicker-head">
|
|
1229
|
-
<button type="button" class="datepicker-nav-btn" data-nav-decade="-1" aria-label="Previous decade">${
|
|
1234
|
+
<button type="button" class="datepicker-nav-btn" data-nav-decade="-1" aria-label="Previous decade">${K("chevron-left")}</button>
|
|
1230
1235
|
<span class="datepicker-month">${r + 1} – ${r + 10}</span>
|
|
1231
|
-
<button type="button" class="datepicker-nav-btn" data-nav-decade="1" aria-label="Next decade">${
|
|
1236
|
+
<button type="button" class="datepicker-nav-btn" data-nav-decade="1" aria-label="Next decade">${K("chevron-right")}</button>
|
|
1232
1237
|
</div>
|
|
1233
1238
|
<div class="datepicker-cells">${i}</div>`;
|
|
1234
1239
|
}
|
|
@@ -1237,24 +1242,24 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1237
1242
|
t && e.contains(document.activeElement) && t.focus();
|
|
1238
1243
|
}
|
|
1239
1244
|
_position(e, t) {
|
|
1240
|
-
|
|
1245
|
+
ye(e, t);
|
|
1241
1246
|
}
|
|
1242
1247
|
_setFocus(e, t, n, r) {
|
|
1243
|
-
let { y: i, m: a } =
|
|
1248
|
+
let { y: i, m: a } = Le(e, t);
|
|
1244
1249
|
this._focus = {
|
|
1245
1250
|
y: i,
|
|
1246
1251
|
m: a,
|
|
1247
1252
|
d: n
|
|
1248
1253
|
};
|
|
1249
1254
|
let o = i !== this._viewY || a !== this._viewM;
|
|
1250
|
-
this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${
|
|
1255
|
+
this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${Pe(i, a, n)}"]`)?.focus();
|
|
1251
1256
|
}
|
|
1252
1257
|
_onKey(e) {
|
|
1253
1258
|
if (this._mode !== "days") {
|
|
1254
1259
|
e.key === "Escape" && this._close();
|
|
1255
1260
|
return;
|
|
1256
1261
|
}
|
|
1257
|
-
let t = this._focus ||
|
|
1262
|
+
let t = this._focus || J(this._value) || {
|
|
1258
1263
|
y: this._viewY,
|
|
1259
1264
|
m: this._viewM,
|
|
1260
1265
|
d: 1
|
|
@@ -1272,17 +1277,17 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1272
1277
|
case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
|
|
1273
1278
|
case "PageUp": {
|
|
1274
1279
|
e.preventDefault();
|
|
1275
|
-
let n =
|
|
1276
|
-
return this._setFocus(n.y, n.m, Math.min(t.d,
|
|
1280
|
+
let n = Le(t.y, t.m - (e.shiftKey ? 12 : 1));
|
|
1281
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, Ie(n.y, n.m)), "slide-prev");
|
|
1277
1282
|
}
|
|
1278
1283
|
case "PageDown": {
|
|
1279
1284
|
e.preventDefault();
|
|
1280
|
-
let n =
|
|
1281
|
-
return this._setFocus(n.y, n.m, Math.min(t.d,
|
|
1285
|
+
let n = Le(t.y, t.m + (e.shiftKey ? 12 : 1));
|
|
1286
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, Ie(n.y, n.m)), "slide-next");
|
|
1282
1287
|
}
|
|
1283
1288
|
case "Enter":
|
|
1284
1289
|
case " ":
|
|
1285
|
-
e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value =
|
|
1290
|
+
e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = Pe(t.y, t.m, t.d), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
|
|
1286
1291
|
return;
|
|
1287
1292
|
case "Escape": return this._close();
|
|
1288
1293
|
default:
|
|
@@ -1294,11 +1299,11 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1294
1299
|
if (!e || !t) return;
|
|
1295
1300
|
let r = () => !t.hidden;
|
|
1296
1301
|
this._open = () => {
|
|
1297
|
-
if (!
|
|
1302
|
+
if (!J(this._value) && !this._viewNavigated) {
|
|
1298
1303
|
let e = /* @__PURE__ */ new Date();
|
|
1299
1304
|
this._viewY = e.getFullYear(), this._viewM = e.getMonth();
|
|
1300
1305
|
}
|
|
1301
|
-
let r =
|
|
1306
|
+
let r = J(this._value), i = /* @__PURE__ */ new Date();
|
|
1302
1307
|
this._mode = "days", this._focus = r || {
|
|
1303
1308
|
y: this._viewY,
|
|
1304
1309
|
m: this._viewM,
|
|
@@ -1311,7 +1316,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1311
1316
|
let t = e.target.closest("[data-nav]");
|
|
1312
1317
|
if (t) {
|
|
1313
1318
|
this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
|
|
1314
|
-
let e =
|
|
1319
|
+
let e = Le(this._viewY, this._viewM + Number(t.dataset.nav));
|
|
1315
1320
|
this._viewY = e.y, this._viewM = e.m, this._focus = {
|
|
1316
1321
|
y: e.y,
|
|
1317
1322
|
m: e.m,
|
|
@@ -1350,7 +1355,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1350
1355
|
}
|
|
1351
1356
|
if (e.target.closest("[data-today]")) {
|
|
1352
1357
|
let e = /* @__PURE__ */ new Date();
|
|
1353
|
-
this.value =
|
|
1358
|
+
this.value = Pe(e.getFullYear(), e.getMonth(), e.getDate()), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
|
|
1354
1359
|
return;
|
|
1355
1360
|
}
|
|
1356
1361
|
if (e.target.closest("[data-clear]")) {
|
|
@@ -1367,13 +1372,13 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1367
1372
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
1368
1373
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
1369
1374
|
r() && e.key === "Escape" && this._close();
|
|
1370
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
1375
|
+
}, document.addEventListener("keydown", this._onDocKey), be(this, () => {
|
|
1371
1376
|
r() && this._position(e, t);
|
|
1372
1377
|
});
|
|
1373
1378
|
}, this._bindGlobal(), this._syncFormValue();
|
|
1374
1379
|
}
|
|
1375
1380
|
_teardown() {
|
|
1376
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
1381
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), xe(this);
|
|
1377
1382
|
}
|
|
1378
1383
|
disconnectedCallback() {
|
|
1379
1384
|
this._teardown();
|
|
@@ -1437,20 +1442,20 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1437
1442
|
text: e,
|
|
1438
1443
|
empty: !0
|
|
1439
1444
|
} : {
|
|
1440
|
-
text: `${
|
|
1445
|
+
text: `${Fe(this._start) || "Start"} – ${Fe(this._end) || "End"}`,
|
|
1441
1446
|
empty: !1
|
|
1442
1447
|
};
|
|
1443
1448
|
}
|
|
1444
1449
|
render() {
|
|
1445
1450
|
this._defaultStart === void 0 && (this._defaultStart = this.getAttribute("start") || "", this._defaultEnd = this.getAttribute("end") || "", this._start = this._defaultStart || this._start, this._end = this._defaultEnd || this._end);
|
|
1446
|
-
let e =
|
|
1451
|
+
let e = J(this._start);
|
|
1447
1452
|
e && (this._viewY = e.y, this._viewM = e.m);
|
|
1448
1453
|
let t = this.getAttribute("size"), n = t === "sm" ? " input-sm" : t === "lg" ? " input-lg" : "", { text: r, empty: i } = this._label(), a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
|
|
1449
1454
|
this.innerHTML = `
|
|
1450
1455
|
<div class="daterange">
|
|
1451
|
-
<button type="button" class="input daterange-trigger${n}${i ? "" : " has-value"}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${
|
|
1452
|
-
<span data-range-label class="${i ? "search-select-placeholder" : ""}">${
|
|
1453
|
-
${
|
|
1456
|
+
<button type="button" class="input daterange-trigger${n}${i ? "" : " has-value"}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${q(a)}"` : ""}${o ? ` aria-describedby="${q(o)}"` : ""}>
|
|
1457
|
+
<span data-range-label class="${i ? "search-select-placeholder" : ""}">${q(r)}</span>
|
|
1458
|
+
${K("calendar")}
|
|
1454
1459
|
</button>
|
|
1455
1460
|
<div class="daterange-pop" role="dialog" aria-modal="false" hidden></div>
|
|
1456
1461
|
</div>`, this._rendered = !0, this._syncMirrors(), this._wire();
|
|
@@ -1477,24 +1482,24 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1477
1482
|
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute("data-range-mirror", e), this.appendChild(r)), r.name = t, r.value = n || "", r.disabled = this.hasAttribute("disabled");
|
|
1478
1483
|
}
|
|
1479
1484
|
_limits() {
|
|
1480
|
-
let e =
|
|
1485
|
+
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;
|
|
1481
1486
|
return (e, t, i) => {
|
|
1482
1487
|
let a = new Date(e, t, i).getTime();
|
|
1483
1488
|
return a < n || a > r;
|
|
1484
1489
|
};
|
|
1485
1490
|
}
|
|
1486
1491
|
_monthHtml(e, t) {
|
|
1487
|
-
let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i =
|
|
1488
|
-
let i =
|
|
1492
|
+
let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = Ie(e, t), a = this._limits(), o = Me.map((e, t) => Me[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
|
|
1493
|
+
let i = Pe(e, t, n), o = a(e, t, n);
|
|
1489
1494
|
return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
|
|
1490
|
-
}, c = "", l =
|
|
1495
|
+
}, c = "", l = Le(e, t - 1), u = Ie(l.y, l.m);
|
|
1491
1496
|
for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
|
|
1492
1497
|
for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
|
|
1493
|
-
let d =
|
|
1498
|
+
let d = Le(e, t + 1), f = (7 - (r + i) % 7) % 7;
|
|
1494
1499
|
for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
|
|
1495
1500
|
return `
|
|
1496
1501
|
<div class="daterange-cal">
|
|
1497
|
-
<div class="datepicker-month-label">${
|
|
1502
|
+
<div class="datepicker-month-label">${je[t]} ${e}</div>
|
|
1498
1503
|
<div class="datepicker-weekdays">${o}</div>
|
|
1499
1504
|
<div class="datepicker-grid" role="grid">${c}</div>
|
|
1500
1505
|
</div>`;
|
|
@@ -1502,11 +1507,11 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1502
1507
|
_renderView() {
|
|
1503
1508
|
let e = this.querySelector(".daterange-pop");
|
|
1504
1509
|
if (!e) return;
|
|
1505
|
-
let t =
|
|
1510
|
+
let t = Le(this._viewY, this._viewM + 1);
|
|
1506
1511
|
e.innerHTML = `
|
|
1507
1512
|
<div class="daterange-head">
|
|
1508
|
-
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${
|
|
1509
|
-
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${
|
|
1513
|
+
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${K("chevron-left")}</button>
|
|
1514
|
+
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${K("chevron-right")}</button>
|
|
1510
1515
|
</div>
|
|
1511
1516
|
<div class="daterange-cals">
|
|
1512
1517
|
${this._monthHtml(this._viewY, this._viewM)}
|
|
@@ -1528,10 +1533,10 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1528
1533
|
n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
|
|
1529
1534
|
}
|
|
1530
1535
|
let i = e.querySelector("[data-range-hint]");
|
|
1531
|
-
i && (i.textContent = this._start ? this._end ? `${
|
|
1536
|
+
i && (i.textContent = this._start ? this._end ? `${Fe(this._start)} – ${Fe(this._end)}` : "Pick an end date" : "Pick a start date");
|
|
1532
1537
|
}
|
|
1533
1538
|
_position(e, t) {
|
|
1534
|
-
|
|
1539
|
+
ye(e, t);
|
|
1535
1540
|
}
|
|
1536
1541
|
_pick(e) {
|
|
1537
1542
|
if (!this._start || this._start && this._end) {
|
|
@@ -1550,7 +1555,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1550
1555
|
if (!e || !t) return;
|
|
1551
1556
|
let r = () => !t.hidden;
|
|
1552
1557
|
this._open = () => {
|
|
1553
|
-
let r =
|
|
1558
|
+
let r = J(this._start);
|
|
1554
1559
|
if (r) this._viewY = r.y, this._viewM = r.m;
|
|
1555
1560
|
else {
|
|
1556
1561
|
let e = /* @__PURE__ */ new Date();
|
|
@@ -1563,7 +1568,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1563
1568
|
this._popClick = !0;
|
|
1564
1569
|
let t = e.target.closest("[data-nav]");
|
|
1565
1570
|
if (t) {
|
|
1566
|
-
let e =
|
|
1571
|
+
let e = Le(this._viewY, this._viewM + Number(t.dataset.nav));
|
|
1567
1572
|
this._viewY = e.y, this._viewM = e.m, this._renderView();
|
|
1568
1573
|
return;
|
|
1569
1574
|
}
|
|
@@ -1582,13 +1587,13 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1582
1587
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
1583
1588
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
1584
1589
|
r() && e.key === "Escape" && this._close();
|
|
1585
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
1590
|
+
}, document.addEventListener("keydown", this._onDocKey), be(this, () => {
|
|
1586
1591
|
r() && this._position(e, t);
|
|
1587
1592
|
});
|
|
1588
1593
|
}, this._bindGlobal(), this._syncMirrors();
|
|
1589
1594
|
}
|
|
1590
1595
|
_teardown() {
|
|
1591
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
1596
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), xe(this);
|
|
1592
1597
|
}
|
|
1593
1598
|
disconnectedCallback() {
|
|
1594
1599
|
this._teardown();
|
|
@@ -1695,7 +1700,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1695
1700
|
return this._values.slice();
|
|
1696
1701
|
}
|
|
1697
1702
|
set values(e) {
|
|
1698
|
-
if (this._values = Array.isArray(e) ? e.map(String) : [],
|
|
1703
|
+
if (this._values = Array.isArray(e) ? e.map(String) : [], G(this, this._values.join(",")), this._rendered) {
|
|
1699
1704
|
this._renderControl();
|
|
1700
1705
|
let e = this.querySelector(".search-select-input");
|
|
1701
1706
|
this._renderOptions(e ? e.value : "");
|
|
@@ -1714,7 +1719,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1714
1719
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
1715
1720
|
label: e.innerHTML,
|
|
1716
1721
|
icon: e.getAttribute("icon") || void 0,
|
|
1717
|
-
[
|
|
1722
|
+
[Te]: !0,
|
|
1718
1723
|
selected: e.hasAttribute("selected")
|
|
1719
1724
|
})));
|
|
1720
1725
|
}
|
|
@@ -1727,36 +1732,36 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1727
1732
|
}
|
|
1728
1733
|
_labelHtmlFor(e) {
|
|
1729
1734
|
let t = this._readOptions().find((t) => String(t.value) === String(e));
|
|
1730
|
-
return t ?
|
|
1735
|
+
return t ? De(t) : q(e);
|
|
1731
1736
|
}
|
|
1732
1737
|
render() {
|
|
1733
1738
|
this._snapshotDeclared();
|
|
1734
1739
|
let e = this.hasAttribute("searchable"), t = this.getAttribute("search-placeholder") || "Search…", n = this.getAttribute("icon"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "";
|
|
1735
|
-
|
|
1740
|
+
G(this, this._values.join(",")), this.id ||= `wui-multiselect-${Math.random().toString(36).slice(2, 9)}`;
|
|
1736
1741
|
let a = `${this.id}-listbox`;
|
|
1737
1742
|
this._listboxId = a, this.innerHTML = `
|
|
1738
1743
|
<div class="search-select${i}">
|
|
1739
1744
|
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Ue(a)}" aria-label="${Ue(this._accessibleName())}"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
|
|
1740
|
-
${n ?
|
|
1745
|
+
${n ? K(n, { className: "search-select-icon" }) : ""}
|
|
1741
1746
|
<div class="ms-chips" data-chips></div>
|
|
1742
|
-
${
|
|
1747
|
+
${K("chevron-down", { className: "search-select-caret" })}
|
|
1743
1748
|
</div>
|
|
1744
1749
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${Ue(a)}" aria-multiselectable="true" tabindex="-1" hidden>
|
|
1745
|
-
${e ? `<div class="search-select-search">${
|
|
1750
|
+
${e ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${Ue(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${K("x")}</button></div>` : ""}
|
|
1746
1751
|
<div class="search-select-options"></div>
|
|
1747
1752
|
<div class="search-select-empty" hidden>No matches</div>
|
|
1748
1753
|
</div>
|
|
1749
|
-
</div>`, this._rendered = !0,
|
|
1754
|
+
</div>`, this._rendered = !0, G(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
|
|
1750
1755
|
}
|
|
1751
1756
|
_renderControl() {
|
|
1752
1757
|
let e = this.querySelector("[data-chips]");
|
|
1753
1758
|
if (!e) return;
|
|
1754
1759
|
let t = this.getAttribute("placeholder") || "Select…";
|
|
1755
1760
|
if (!this._values.length) {
|
|
1756
|
-
e.innerHTML = `<span class="search-select-placeholder">${
|
|
1761
|
+
e.innerHTML = `<span class="search-select-placeholder">${q(t)}</span>`;
|
|
1757
1762
|
return;
|
|
1758
1763
|
}
|
|
1759
|
-
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="${Ue(e)}" aria-label="Remove ${Ue(We(this._labelFor(e)))}">${
|
|
1764
|
+
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="${Ue(e)}" aria-label="Remove ${Ue(We(this._labelFor(e)))}">${K("x")}</button></span>`).join(""), this._collapseChips();
|
|
1760
1765
|
}
|
|
1761
1766
|
_collapseChips() {
|
|
1762
1767
|
let e = this.querySelector("[data-chips]");
|
|
@@ -1784,14 +1789,14 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1784
1789
|
let a = this._listboxId || `${this.id || "wui-multiselect"}-listbox`;
|
|
1785
1790
|
t.innerHTML = i.map((e, t) => {
|
|
1786
1791
|
let n = this._values.includes(String(e.value));
|
|
1787
|
-
return `<button type="button" role="option" id="${Ue(`${a}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${Ue(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${
|
|
1792
|
+
return `<button type="button" role="option" id="${Ue(`${a}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${Ue(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${De(e)}</span><span class="ms-check">${K("check")}</span></button>`;
|
|
1788
1793
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1, this.querySelector(".search-select-control")?.removeAttribute("aria-activedescendant");
|
|
1789
1794
|
}
|
|
1790
1795
|
_wire() {
|
|
1791
1796
|
this._teardown();
|
|
1792
1797
|
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");
|
|
1793
1798
|
if (!e || !t) return;
|
|
1794
|
-
let a = () => this.hasAttribute("disabled"), o = () =>
|
|
1799
|
+
let a = () => this.hasAttribute("disabled"), o = () => ye(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (t) => {
|
|
1795
1800
|
let n = c();
|
|
1796
1801
|
this._active = t;
|
|
1797
1802
|
for (let e of s()) e.classList.remove("is-active");
|
|
@@ -1801,7 +1806,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1801
1806
|
}, f = () => {
|
|
1802
1807
|
t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
|
|
1803
1808
|
}, p = () => {
|
|
1804
|
-
|
|
1809
|
+
G(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1805
1810
|
}, m = (e) => {
|
|
1806
1811
|
let t = String(e);
|
|
1807
1812
|
this._values.includes(t) ? this._values = this._values.filter((e) => e !== t) : this._values = [...this._values, t], this._renderControl(), this._renderOptions(n ? n.value : ""), p();
|
|
@@ -1824,7 +1829,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1824
1829
|
t && l(c().indexOf(t));
|
|
1825
1830
|
}), i.addEventListener("mouseleave", () => l(-1)), n?.addEventListener("input", () => {
|
|
1826
1831
|
this._renderOptions(n.value), r && (r.hidden = !n.value), l(-1);
|
|
1827
|
-
}), this._navHandler =
|
|
1832
|
+
}), this._navHandler = we({
|
|
1828
1833
|
getVisibleOptions: c,
|
|
1829
1834
|
getActive: () => this._active,
|
|
1830
1835
|
setActive: (e) => l(e),
|
|
@@ -1853,13 +1858,13 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1853
1858
|
}), this._bindGlobal = () => {
|
|
1854
1859
|
this._teardown(), !this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this)), this._onDocClick = (e) => {
|
|
1855
1860
|
u() && !this.contains(e.target) && f();
|
|
1856
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
1861
|
+
}, document.addEventListener("click", this._onDocClick), be(this, () => {
|
|
1857
1862
|
u() && o();
|
|
1858
1863
|
});
|
|
1859
1864
|
}, this._bindGlobal();
|
|
1860
1865
|
}
|
|
1861
1866
|
_teardown() {
|
|
1862
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
1867
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), xe(this), this._navHandler?.teardown();
|
|
1863
1868
|
}
|
|
1864
1869
|
disconnectedCallback() {
|
|
1865
1870
|
this._teardown(), this._ro?.disconnect(), this._ro = null;
|
|
@@ -1892,7 +1897,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1892
1897
|
return this._value ?? "";
|
|
1893
1898
|
}
|
|
1894
1899
|
set value(e) {
|
|
1895
|
-
this._value = this._clean(e),
|
|
1900
|
+
this._value = this._clean(e), G(this, this._value), this._paint();
|
|
1896
1901
|
}
|
|
1897
1902
|
_clean(e) {
|
|
1898
1903
|
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? Ke : Ge, "").slice(0, this.length);
|
|
@@ -1909,10 +1914,10 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1909
1914
|
this._rendered ? this._onSelectionChange && document.addEventListener("selectionchange", this._onSelectionChange) : (this._defaultCaptured ||= (this._defaultValue = this._value, !0), this.render());
|
|
1910
1915
|
}
|
|
1911
1916
|
formResetCallback() {
|
|
1912
|
-
this._value = this._defaultValue || "",
|
|
1917
|
+
this._value = this._defaultValue || "", G(this, this._value), this._paint();
|
|
1913
1918
|
}
|
|
1914
1919
|
attributeChangedCallback(e, t, n) {
|
|
1915
|
-
this._rendered && (e === "value" ? (this._value = this._clean(n),
|
|
1920
|
+
this._rendered && (e === "value" ? (this._value = this._clean(n), G(this, this._value), this._paint()) : this.render());
|
|
1916
1921
|
}
|
|
1917
1922
|
render() {
|
|
1918
1923
|
this._value = this._clean(this.getAttribute("value") ?? this._value);
|
|
@@ -1930,7 +1935,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1930
1935
|
spellcheck="false"
|
|
1931
1936
|
${n ? "disabled" : ""} />
|
|
1932
1937
|
<div class="otp-slots" aria-hidden="true">${r}</div>
|
|
1933
|
-
</div>`, this._rendered = !0,
|
|
1938
|
+
</div>`, this._rendered = !0, G(this, this._value), this._wire(), this._paint();
|
|
1934
1939
|
}
|
|
1935
1940
|
_refs() {
|
|
1936
1941
|
return {
|
|
@@ -1952,7 +1957,7 @@ var Ee = Symbol("wui.trustedHtml"), K = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1952
1957
|
if (!e) return;
|
|
1953
1958
|
let t = (e) => {
|
|
1954
1959
|
let t = this._clean(e), n = t !== this._value;
|
|
1955
|
-
this._value = t,
|
|
1960
|
+
this._value = t, G(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
|
|
1956
1961
|
bubbles: !0,
|
|
1957
1962
|
detail: t
|
|
1958
1963
|
}));
|
|
@@ -3313,7 +3318,7 @@ var it = class extends HTMLElement {
|
|
|
3313
3318
|
n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._committedValue = this.value, this._syncMirror();
|
|
3314
3319
|
}
|
|
3315
3320
|
_syncMirror() {
|
|
3316
|
-
|
|
3321
|
+
G(this, this.value);
|
|
3317
3322
|
}
|
|
3318
3323
|
_emitInput() {
|
|
3319
3324
|
this.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
@@ -3333,17 +3338,17 @@ var it = class extends HTMLElement {
|
|
|
3333
3338
|
<div class="phone-country-adornment">
|
|
3334
3339
|
<button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${at(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
3335
3340
|
<span class="${Xe(this._country)}" data-flag aria-hidden="true"></span>
|
|
3336
|
-
${
|
|
3341
|
+
${K("chevron-down", { className: "phone-chevron" })}
|
|
3337
3342
|
<span class="phone-dial" data-dial>+${Ye(this._country)}</span>
|
|
3338
3343
|
</button>
|
|
3339
3344
|
<div class="country-dropdown-menu" role="listbox" id="${at(t)}" tabindex="-1" hidden>
|
|
3340
|
-
<div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${
|
|
3345
|
+
<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="${at(t)}" aria-autocomplete="list" /></div>
|
|
3341
3346
|
<div class="country-list-scroll">${n}<div class="country-empty" hidden>No countries found</div></div>
|
|
3342
3347
|
</div>
|
|
3343
3348
|
</div>
|
|
3344
3349
|
<input type="tel" class="input" placeholder="${at(e)}" value="${at($e(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${at(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${at(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
3345
3350
|
</div>
|
|
3346
|
-
<div class="field-error" data-phone-error hidden></div>`, this._rendered = !0,
|
|
3351
|
+
<div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, G(this, this.value), this._wire();
|
|
3347
3352
|
}
|
|
3348
3353
|
_itemEls() {
|
|
3349
3354
|
return [...this.querySelectorAll(".country-dropdown-item")];
|
|
@@ -3355,7 +3360,7 @@ var it = class extends HTMLElement {
|
|
|
3355
3360
|
this._teardown();
|
|
3356
3361
|
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]");
|
|
3357
3362
|
if (!e || !n) return;
|
|
3358
|
-
let l = () => !n.hidden, u = () =>
|
|
3363
|
+
let l = () => !n.hidden, u = () => ye(t || e, n), d = (e) => {
|
|
3359
3364
|
let t = this._visibleItems();
|
|
3360
3365
|
this._active = e;
|
|
3361
3366
|
for (let e of this._itemEls()) e.classList.remove("is-active");
|
|
@@ -3431,11 +3436,11 @@ var it = class extends HTMLElement {
|
|
|
3431
3436
|
}), this._bindGlobal = () => {
|
|
3432
3437
|
this._teardownGlobals?.(), this._onDocClick = (e) => {
|
|
3433
3438
|
l() && !this.contains(e.target) && p();
|
|
3434
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
3439
|
+
}, document.addEventListener("click", this._onDocClick), be(this, () => {
|
|
3435
3440
|
l() && u();
|
|
3436
3441
|
});
|
|
3437
3442
|
}, this._teardownGlobals = () => {
|
|
3438
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
3443
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), xe(this);
|
|
3439
3444
|
}, this._bindGlobal(), Qe().then((e) => {
|
|
3440
3445
|
if (!(!e || !o.isConnected) && (this._national && (o.value = $e(this._country, this._national)), !this.getAttribute("placeholder"))) {
|
|
3441
3446
|
let e = et(this._country);
|
|
@@ -3499,7 +3504,7 @@ var it = class extends HTMLElement {
|
|
|
3499
3504
|
return this._value;
|
|
3500
3505
|
}
|
|
3501
3506
|
set value(e) {
|
|
3502
|
-
this._value = e == null ? "" : String(e),
|
|
3507
|
+
this._value = e == null ? "" : String(e), G(this, this._value), this._syncSelected(), this._syncReset();
|
|
3503
3508
|
}
|
|
3504
3509
|
set options(e) {
|
|
3505
3510
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -3514,7 +3519,7 @@ var it = class extends HTMLElement {
|
|
|
3514
3519
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
3515
3520
|
label: e.innerHTML,
|
|
3516
3521
|
icon: e.getAttribute("icon") || void 0,
|
|
3517
|
-
[
|
|
3522
|
+
[Te]: !0,
|
|
3518
3523
|
selected: e.hasAttribute("selected")
|
|
3519
3524
|
})));
|
|
3520
3525
|
}
|
|
@@ -3524,27 +3529,27 @@ var it = class extends HTMLElement {
|
|
|
3524
3529
|
render() {
|
|
3525
3530
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._snapshotDeclared();
|
|
3526
3531
|
let e = this._readOptions(), t = this.hasAttribute("searchable"), n = this.hasAttribute("clearable"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "", a = this.getAttribute("icon"), o = this.getAttribute("prefix"), s = this.getAttribute("placeholder") || "Select...", c = this.getAttribute("search-placeholder") || "Search...", l = e.find((e) => String(e.value) === String(this._value)) || e.find((e) => e.selected);
|
|
3527
|
-
l && (this._value = String(l.value)),
|
|
3532
|
+
l && (this._value = String(l.value)), G(this, this._value), this.id ||= `wui-select-${Math.random().toString(36).slice(2, 9)}`;
|
|
3528
3533
|
let u = `${this.id}-listbox`;
|
|
3529
3534
|
this._listboxId = u;
|
|
3530
3535
|
let d = e.map((e, t) => {
|
|
3531
3536
|
let n = String(e.value) === String(this._value);
|
|
3532
|
-
return `<button type="button" role="option" id="${st(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${st(e.value)}" aria-selected="${n}">${
|
|
3537
|
+
return `<button type="button" role="option" id="${st(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${st(e.value)}" aria-selected="${n}">${De(e)}</button>`;
|
|
3533
3538
|
}).join("");
|
|
3534
3539
|
this.innerHTML = `
|
|
3535
3540
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
|
|
3536
3541
|
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${st(u)}" aria-label="${st(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
3537
|
-
${a ?
|
|
3538
|
-
${o ? `<span class="search-select-prefix">${
|
|
3539
|
-
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ?
|
|
3540
|
-
${n ? `<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${
|
|
3541
|
-
${
|
|
3542
|
+
${a ? K(a, { className: "search-select-icon" }) : ""}
|
|
3543
|
+
${o ? `<span class="search-select-prefix">${q(o)}</span>` : ""}
|
|
3544
|
+
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? De(l) : q(s)}</span>
|
|
3545
|
+
${n ? `<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${K("x")}</span>` : ""}
|
|
3546
|
+
${K("chevron-down", { className: "search-select-caret" })}
|
|
3542
3547
|
</button>
|
|
3543
3548
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${st(u)}" tabindex="-1" hidden>
|
|
3544
|
-
${t ? `<div class="search-select-search">${
|
|
3549
|
+
${t ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${st(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${K("x")}</button></div>` : ""}
|
|
3545
3550
|
<div class="search-select-options">${d}<div class="search-select-empty" hidden>No matches</div></div>
|
|
3546
3551
|
</div>
|
|
3547
|
-
</div>`, this._rendered = !0,
|
|
3552
|
+
</div>`, this._rendered = !0, G(this, this._value), this._wire(), this._syncReset();
|
|
3548
3553
|
}
|
|
3549
3554
|
_refs() {
|
|
3550
3555
|
return {
|
|
@@ -3570,7 +3575,7 @@ var it = class extends HTMLElement {
|
|
|
3570
3575
|
let t = e.dataset.value === String(this._value);
|
|
3571
3576
|
e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
|
|
3572
3577
|
}
|
|
3573
|
-
e && (e.innerHTML = t ?
|
|
3578
|
+
e && (e.innerHTML = t ? De(t) : q(this.getAttribute("placeholder") || "Select..."), e.classList.toggle("search-select-placeholder", !t));
|
|
3574
3579
|
}
|
|
3575
3580
|
_syncReset() {
|
|
3576
3581
|
let { reset: e } = this._refs();
|
|
@@ -3583,8 +3588,8 @@ var it = class extends HTMLElement {
|
|
|
3583
3588
|
let t = () => {
|
|
3584
3589
|
if (this.hasAttribute("compact")) {
|
|
3585
3590
|
let t = e.control.getBoundingClientRect();
|
|
3586
|
-
e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px",
|
|
3587
|
-
} else
|
|
3591
|
+
e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", ye(e.control, e.menu);
|
|
3592
|
+
} else ye(e.control, e.menu, { matchWidth: !0 });
|
|
3588
3593
|
}, n = (t) => {
|
|
3589
3594
|
let n = this._visible();
|
|
3590
3595
|
this._active = t;
|
|
@@ -3604,7 +3609,7 @@ var it = class extends HTMLElement {
|
|
|
3604
3609
|
}, s = (t) => {
|
|
3605
3610
|
this.value = t.dataset.value, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.control.focus();
|
|
3606
3611
|
};
|
|
3607
|
-
this._navHandler =
|
|
3612
|
+
this._navHandler = we({
|
|
3608
3613
|
getVisibleOptions: () => this._visible(),
|
|
3609
3614
|
getActive: () => this._active,
|
|
3610
3615
|
setActive: (e) => n(e),
|
|
@@ -3635,13 +3640,13 @@ var it = class extends HTMLElement {
|
|
|
3635
3640
|
}), e.menu.addEventListener("keydown", this._navHandler.handler), this._bindGlobal = () => {
|
|
3636
3641
|
this._teardown(), this._onDocClick = (e) => {
|
|
3637
3642
|
i() && !this.contains(e.target) && o();
|
|
3638
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
3643
|
+
}, document.addEventListener("click", this._onDocClick), be(this, () => {
|
|
3639
3644
|
i() && t();
|
|
3640
3645
|
});
|
|
3641
3646
|
}, this._bindGlobal();
|
|
3642
3647
|
}
|
|
3643
3648
|
_teardown() {
|
|
3644
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
3649
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), xe(this), this._navHandler?.teardown();
|
|
3645
3650
|
}
|
|
3646
3651
|
disconnectedCallback() {
|
|
3647
3652
|
this._teardown();
|
|
@@ -3821,7 +3826,7 @@ var it = class extends HTMLElement {
|
|
|
3821
3826
|
this._isRange() ? this._syncRangeMirrors() : this._syncSingleMirror();
|
|
3822
3827
|
}
|
|
3823
3828
|
_syncSingleMirror() {
|
|
3824
|
-
this.getAttribute("name") &&
|
|
3829
|
+
this.getAttribute("name") && G(this, String(this._value));
|
|
3825
3830
|
}
|
|
3826
3831
|
_syncRangeMirrors() {
|
|
3827
3832
|
let e = this.getAttribute("start-name") || this.getAttribute("name"), t = this.getAttribute("end-name");
|
|
@@ -3948,17 +3953,17 @@ var it = class extends HTMLElement {
|
|
|
3948
3953
|
return this._values.slice();
|
|
3949
3954
|
}
|
|
3950
3955
|
set values(e) {
|
|
3951
|
-
this._values = Array.isArray(e) ? e.map(String) : [],
|
|
3956
|
+
this._values = Array.isArray(e) ? e.map(String) : [], G(this, this._values.join(",")), this._rendered && this._renderControl();
|
|
3952
3957
|
}
|
|
3953
3958
|
render() {
|
|
3954
3959
|
let e = this.getAttribute("size"), t = e === "sm" ? " search-select-sm" : e === "lg" ? " search-select-lg" : "";
|
|
3955
|
-
|
|
3960
|
+
G(this, this._values.join(",")), this.innerHTML = `
|
|
3956
3961
|
<div class="search-select${t}">
|
|
3957
3962
|
<div class="input search-select-control search-select-multi"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
|
|
3958
3963
|
<input type="text" class="ms-input" data-input aria-label="${pt(this._accessibleName())}" placeholder="${pt(this.getAttribute("placeholder") || "Add…")}" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""}/>
|
|
3959
3964
|
<div class="ms-chips" data-chips></div>
|
|
3960
3965
|
</div>
|
|
3961
|
-
</div>`, this._rendered = !0,
|
|
3966
|
+
</div>`, this._rendered = !0, G(this, this._values.join(",")), this._renderControl(), this._wire();
|
|
3962
3967
|
}
|
|
3963
3968
|
_renderControl() {
|
|
3964
3969
|
let e = this.querySelector("[data-chips]");
|
|
@@ -3967,7 +3972,7 @@ var it = class extends HTMLElement {
|
|
|
3967
3972
|
e.innerHTML = "";
|
|
3968
3973
|
return;
|
|
3969
3974
|
}
|
|
3970
|
-
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${ft(e)}</span><button type="button" class="chip-remove" data-remove="${pt(e)}" aria-label="Remove ${pt(e)}">${
|
|
3975
|
+
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${ft(e)}</span><button type="button" class="chip-remove" data-remove="${pt(e)}" aria-label="Remove ${pt(e)}">${K("x")}</button></span>`).join("");
|
|
3971
3976
|
}
|
|
3972
3977
|
}
|
|
3973
3978
|
_wire() {
|
|
@@ -3977,7 +3982,7 @@ var it = class extends HTMLElement {
|
|
|
3977
3982
|
let n = () => this.hasAttribute("disabled"), r = (this.getAttribute("separators") || "enter,comma").split(",").map((e) => e.trim()), i = this.getAttribute("max-tags"), a = this.hasAttribute("allow-duplicates"), o = /* @__PURE__ */ new Set();
|
|
3978
3983
|
for (let e of r) e === "enter" ? o.add("Enter") : e === "comma" ? o.add(",") : e === "space" ? o.add(" ") : e === "tab" && o.add("Tab");
|
|
3979
3984
|
let s = () => {
|
|
3980
|
-
|
|
3985
|
+
G(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
3981
3986
|
}, c = (e) => {
|
|
3982
3987
|
let t = e.trim();
|
|
3983
3988
|
if (!t || i && this._values.length >= parseInt(i, 10)) return;
|
|
@@ -4092,22 +4097,22 @@ var it = class extends HTMLElement {
|
|
|
4092
4097
|
return this._value;
|
|
4093
4098
|
}
|
|
4094
4099
|
set value(e) {
|
|
4095
|
-
this._value = e || "",
|
|
4100
|
+
this._value = e || "", G(this, this._value), this._syncTrigger();
|
|
4096
4101
|
}
|
|
4097
4102
|
render() {
|
|
4098
4103
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
|
|
4099
4104
|
let e = this.getAttribute("placeholder") || "Select time", t = gt(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");
|
|
4100
4105
|
this.innerHTML = `
|
|
4101
4106
|
<div class="timepicker">
|
|
4102
|
-
<button type="button" class="input timepicker-trigger${i}${t ? " has-value" : ""}" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${
|
|
4103
|
-
<span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? _t(t, n) :
|
|
4104
|
-
${
|
|
4107
|
+
<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)}"` : ""}>
|
|
4108
|
+
<span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? _t(t, n) : q(e)}</span>
|
|
4109
|
+
${K("clock")}
|
|
4105
4110
|
</button>
|
|
4106
4111
|
<div class="timepicker-pop" role="listbox" tabindex="-1" hidden></div>
|
|
4107
|
-
</div>`, this._rendered = !0,
|
|
4112
|
+
</div>`, this._rendered = !0, G(this, this._value), this._wire();
|
|
4108
4113
|
}
|
|
4109
4114
|
_syncFormValue() {
|
|
4110
|
-
|
|
4115
|
+
G(this, this._value);
|
|
4111
4116
|
}
|
|
4112
4117
|
_syncTrigger() {
|
|
4113
4118
|
let e = this.querySelector(".timepicker-trigger"), t = this.querySelector("[data-trigger-label]");
|
|
@@ -4144,7 +4149,7 @@ var it = class extends HTMLElement {
|
|
|
4144
4149
|
t && !e.hidden && t.focus();
|
|
4145
4150
|
}
|
|
4146
4151
|
_position(e, t) {
|
|
4147
|
-
|
|
4152
|
+
ye(e, t);
|
|
4148
4153
|
}
|
|
4149
4154
|
_onKey(e) {
|
|
4150
4155
|
let t = [...this.querySelector(".timepicker-pop").querySelectorAll(".timepicker-option")];
|
|
@@ -4222,13 +4227,13 @@ var it = class extends HTMLElement {
|
|
|
4222
4227
|
this._popClick = !1, n() && !t && !this.contains(e.target) && this._close();
|
|
4223
4228
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
4224
4229
|
n() && e.key === "Escape" && this._close();
|
|
4225
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
4230
|
+
}, document.addEventListener("keydown", this._onDocKey), be(this, () => {
|
|
4226
4231
|
n() && this._position(e, t);
|
|
4227
4232
|
});
|
|
4228
4233
|
}, this._bindGlobal(), this._syncFormValue();
|
|
4229
4234
|
}
|
|
4230
4235
|
_teardown() {
|
|
4231
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
4236
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), xe(this), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
|
|
4232
4237
|
}
|
|
4233
4238
|
disconnectedCallback() {
|
|
4234
4239
|
this._teardown();
|
|
@@ -4325,14 +4330,14 @@ var it = class extends HTMLElement {
|
|
|
4325
4330
|
let i = this.hasAttribute("non-linear");
|
|
4326
4331
|
return e.map((e, r) => {
|
|
4327
4332
|
let a = this._stepStatus(e, r), o = e.getAttribute("label") || "", s = e.getAttribute("description") || "", c = e.getAttribute("icon") || "", l = r + 1, u;
|
|
4328
|
-
u = a === "done" ?
|
|
4333
|
+
u = a === "done" ? K("check") : a === "error" ? K("alert-triangle") : a === "skipped" ? K("minus") : c ? K(c) : String(l);
|
|
4329
4334
|
let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", p = i || r < this._active, m = s ? `<span class="step-desc">${xt(s)}</span>` : "", h;
|
|
4330
4335
|
return h = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${xt(o)}</span>${m}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${xt(o)}</span>${m}` : `<span class="step-circle">${u}</span><span class="step-label">${xt(o)}</span>${m}`, p ? `<button type="button" class="${d}" data-step="${r}"${f}>${h}</button>` : `<div class="${d}"${f}>${h}</div>`;
|
|
4331
4336
|
}).join("");
|
|
4332
4337
|
}
|
|
4333
4338
|
_footerHtml(e) {
|
|
4334
4339
|
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";
|
|
4335
|
-
return `${t > 0 ? `<button type="button" class="btn btn-
|
|
4340
|
+
return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${xt(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${xt(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${xt(o)}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${xt(c)}</button>`}</span>`;
|
|
4336
4341
|
}
|
|
4337
4342
|
_wire() {
|
|
4338
4343
|
this._teardown(), this._onHeaderClick = (e) => {
|
|
@@ -4480,7 +4485,7 @@ var X = (e, t) => {
|
|
|
4480
4485
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
4481
4486
|
};
|
|
4482
4487
|
function Nt() {
|
|
4483
|
-
X("wui-select", ot), X("wui-phone", it), X("wui-datepicker", Re), X("wui-date-range", ze), X("wui-dock", Be), X("wui-slider", ct), X("wui-timepicker", vt), X("wui-autocomplete",
|
|
4488
|
+
X("wui-select", ot), X("wui-phone", it), X("wui-datepicker", Re), X("wui-date-range", ze), X("wui-dock", Be), X("wui-slider", ct), X("wui-timepicker", vt), X("wui-autocomplete", Oe), X("wui-multiselect", He), X("wui-taginput", dt), X("wui-otp", qe), X("wui-status-icon", _e), X("wui-wizard-step", St), X("wui-wizard", bt);
|
|
4484
4489
|
}
|
|
4485
4490
|
Nt();
|
|
4486
4491
|
//#endregion
|
|
@@ -4527,7 +4532,7 @@ function Ft({ label: e, children: t, placement: n = "auto", className: r = "", .
|
|
|
4527
4532
|
type: "button",
|
|
4528
4533
|
className: "infotip-btn",
|
|
4529
4534
|
"aria-label": e || "More information",
|
|
4530
|
-
children: /* @__PURE__ */ p(
|
|
4535
|
+
children: /* @__PURE__ */ p(H, {
|
|
4531
4536
|
name: "info",
|
|
4532
4537
|
size: 16
|
|
4533
4538
|
})
|
|
@@ -4752,7 +4757,7 @@ function Xt({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
4752
4757
|
} : void 0, j = /* @__PURE__ */ p("span", {
|
|
4753
4758
|
className: "avatar-face",
|
|
4754
4759
|
"aria-hidden": "true",
|
|
4755
|
-
children: l == null ? qt(e) : /* @__PURE__ */ p(
|
|
4760
|
+
children: l == null ? qt(e) : /* @__PURE__ */ p(H, {
|
|
4756
4761
|
name: l,
|
|
4757
4762
|
size: Math.round(Yt(n) * .55)
|
|
4758
4763
|
})
|
|
@@ -4894,7 +4899,7 @@ function an({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
4894
4899
|
children: [
|
|
4895
4900
|
t && /* @__PURE__ */ p("span", {
|
|
4896
4901
|
className: "wui-banner-icon",
|
|
4897
|
-
children:
|
|
4902
|
+
children: U(t, { size: 18 })
|
|
4898
4903
|
}),
|
|
4899
4904
|
/* @__PURE__ */ p("div", {
|
|
4900
4905
|
className: "wui-banner-body",
|
|
@@ -4905,7 +4910,7 @@ function an({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
4905
4910
|
className: "wui-banner-dismiss",
|
|
4906
4911
|
"aria-label": "Dismiss",
|
|
4907
4912
|
onClick: f,
|
|
4908
|
-
children: /* @__PURE__ */ p(
|
|
4913
|
+
children: /* @__PURE__ */ p(H, {
|
|
4909
4914
|
name: "x",
|
|
4910
4915
|
size: 18
|
|
4911
4916
|
})
|
|
@@ -4920,7 +4925,7 @@ function on({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
|
4920
4925
|
className: n || void 0,
|
|
4921
4926
|
...r,
|
|
4922
4927
|
children: e.map((n, r) => {
|
|
4923
|
-
let i = r === e.length - 1, a = n.icon ?
|
|
4928
|
+
let i = r === e.length - 1, a = n.icon ? U(n.icon, { size: 14 }) : null, o = {};
|
|
4924
4929
|
return i || (n.to && t ? o = {
|
|
4925
4930
|
linkAs: t,
|
|
4926
4931
|
linkProps: { to: n.to }
|
|
@@ -4940,31 +4945,31 @@ var sn = {
|
|
|
4940
4945
|
warning: "alert-triangle",
|
|
4941
4946
|
danger: "x"
|
|
4942
4947
|
};
|
|
4943
|
-
function cn({ children: e, tone: t = "info", title: n, icon: r, image: i, imageAlt: a = "", size: o = "md", bordered: s = !0,
|
|
4944
|
-
N("AppCallout",
|
|
4945
|
-
let [
|
|
4946
|
-
if (!
|
|
4947
|
-
let
|
|
4948
|
+
function cn({ 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 }) {
|
|
4949
|
+
N("AppCallout", h);
|
|
4950
|
+
let [g, _] = d(!0);
|
|
4951
|
+
if (!g) return null;
|
|
4952
|
+
let v = r === void 0 ? sn[t] : r === "none" ? null : r, y = !!i, b = y || !!v, x = b && !!n && e != null && e !== !1 && e !== "", S = x ? 13 : 11;
|
|
4948
4953
|
return /* @__PURE__ */ m("div", {
|
|
4949
4954
|
className: [
|
|
4950
4955
|
"info-callout",
|
|
4951
4956
|
`tone-${t}`,
|
|
4952
4957
|
o === "sm" ? "info-callout-sm" : "",
|
|
4953
|
-
|
|
4958
|
+
x ? "info-callout-stack" : "",
|
|
4954
4959
|
s ? "" : "info-callout-borderless",
|
|
4955
|
-
|
|
4960
|
+
f
|
|
4956
4961
|
].filter(Boolean).join(" "),
|
|
4957
|
-
...
|
|
4962
|
+
...h,
|
|
4958
4963
|
children: [
|
|
4959
|
-
|
|
4960
|
-
className: `info-callout-icon${
|
|
4961
|
-
children:
|
|
4964
|
+
b && /* @__PURE__ */ p("span", {
|
|
4965
|
+
className: `info-callout-icon${y ? " info-callout-icon-image" : ""}`,
|
|
4966
|
+
children: y ? /* @__PURE__ */ p("img", {
|
|
4962
4967
|
src: i,
|
|
4963
4968
|
alt: a
|
|
4964
|
-
}) : typeof
|
|
4965
|
-
name:
|
|
4966
|
-
size:
|
|
4967
|
-
}) :
|
|
4969
|
+
}) : typeof v == "string" ? /* @__PURE__ */ p(H, {
|
|
4970
|
+
name: v,
|
|
4971
|
+
size: S
|
|
4972
|
+
}) : v
|
|
4968
4973
|
}),
|
|
4969
4974
|
/* @__PURE__ */ m("div", {
|
|
4970
4975
|
className: "info-callout-content",
|
|
@@ -4973,14 +4978,18 @@ function cn({ children: e, tone: t = "info", title: n, icon: r, image: i, imageA
|
|
|
4973
4978
|
children: n
|
|
4974
4979
|
}), e]
|
|
4975
4980
|
}),
|
|
4976
|
-
c
|
|
4981
|
+
c ? /* @__PURE__ */ p("div", {
|
|
4982
|
+
className: "info-callout-action",
|
|
4983
|
+
children: c
|
|
4984
|
+
}) : null,
|
|
4985
|
+
l && /* @__PURE__ */ p("button", {
|
|
4977
4986
|
type: "button",
|
|
4978
4987
|
className: "info-callout-close",
|
|
4979
4988
|
"aria-label": "Dismiss",
|
|
4980
4989
|
onClick: () => {
|
|
4981
|
-
|
|
4990
|
+
_(!1), u?.();
|
|
4982
4991
|
},
|
|
4983
|
-
children: /* @__PURE__ */ p(
|
|
4992
|
+
children: /* @__PURE__ */ p(H, {
|
|
4984
4993
|
name: "x",
|
|
4985
4994
|
size: 18
|
|
4986
4995
|
})
|
|
@@ -5024,7 +5033,7 @@ function un({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5024
5033
|
as: "a",
|
|
5025
5034
|
href: C
|
|
5026
5035
|
}, w && (P.onClick = w));
|
|
5027
|
-
let F = e != null || t != null || n != null, I = i != null || F || a != null || o != null, L = n == null ? null : typeof n == "string" ? /* @__PURE__ */ p(
|
|
5036
|
+
let F = e != null || t != null || n != null, I = i != null || F || a != null || o != null, L = n == null ? null : typeof n == "string" ? /* @__PURE__ */ p(H, {
|
|
5028
5037
|
name: n,
|
|
5029
5038
|
size: 18
|
|
5030
5039
|
}) : n;
|
|
@@ -5139,7 +5148,7 @@ function pn({ label: e, children: t, tone: n = "neutral", size: r = "md", leadin
|
|
|
5139
5148
|
}) : a
|
|
5140
5149
|
}) : i ? /* @__PURE__ */ p("span", {
|
|
5141
5150
|
className: "chip-ic",
|
|
5142
|
-
children: /* @__PURE__ */ p(
|
|
5151
|
+
children: /* @__PURE__ */ p(H, {
|
|
5143
5152
|
name: i,
|
|
5144
5153
|
size: r === "sm" ? 12 : 14
|
|
5145
5154
|
})
|
|
@@ -5165,7 +5174,7 @@ function pn({ label: e, children: t, tone: n = "neutral", size: r = "md", leadin
|
|
|
5165
5174
|
onClick: o,
|
|
5166
5175
|
disabled: c,
|
|
5167
5176
|
"aria-label": l || (typeof h == "string" ? `Remove ${h}` : "Remove"),
|
|
5168
|
-
children: /* @__PURE__ */ p(
|
|
5177
|
+
children: /* @__PURE__ */ p(H, {
|
|
5169
5178
|
name: "x",
|
|
5170
5179
|
size: r === "sm" ? 12 : 14
|
|
5171
5180
|
})
|
|
@@ -5196,7 +5205,7 @@ function mn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
5196
5205
|
})
|
|
5197
5206
|
}) : o || a ? /* @__PURE__ */ p("span", {
|
|
5198
5207
|
className: "struct-card-ic",
|
|
5199
|
-
children: o || /* @__PURE__ */ p(
|
|
5208
|
+
children: o || /* @__PURE__ */ p(H, {
|
|
5200
5209
|
name: a,
|
|
5201
5210
|
size: s
|
|
5202
5211
|
})
|
|
@@ -5213,7 +5222,7 @@ function mn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
5213
5222
|
}),
|
|
5214
5223
|
/* @__PURE__ */ p("span", {
|
|
5215
5224
|
className: "struct-card-check",
|
|
5216
|
-
children: /* @__PURE__ */ p(
|
|
5225
|
+
children: /* @__PURE__ */ p(H, {
|
|
5217
5226
|
name: g,
|
|
5218
5227
|
size: _
|
|
5219
5228
|
})
|
|
@@ -5223,10 +5232,10 @@ function mn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
5223
5232
|
}
|
|
5224
5233
|
//#endregion
|
|
5225
5234
|
//#region src/components/AppChoiceChip.jsx
|
|
5226
|
-
function hn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChange: a, children: o, count: s,
|
|
5227
|
-
return N("AppChoiceChip",
|
|
5228
|
-
className: `choice-chip${i ? " checked" : ""}${c ? ` ${
|
|
5229
|
-
...
|
|
5235
|
+
function hn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChange: a, children: o, count: s, size: c = "md", className: l = "", ...u }) {
|
|
5236
|
+
return N("AppChoiceChip", u), /* @__PURE__ */ m("label", {
|
|
5237
|
+
className: `choice-chip${i ? " checked" : ""}${c === "sm" ? " choice-chip-sm" : c === "lg" ? " choice-chip-lg" : ""}${l ? ` ${l}` : ""}`,
|
|
5238
|
+
...u,
|
|
5230
5239
|
children: [
|
|
5231
5240
|
/* @__PURE__ */ p("input", {
|
|
5232
5241
|
type: e ? "checkbox" : "radio",
|
|
@@ -5298,7 +5307,7 @@ function _n({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
5298
5307
|
N("AppCompareTable", i);
|
|
5299
5308
|
let a = (e) => e === !0 ? /* @__PURE__ */ p("span", {
|
|
5300
5309
|
className: "compare-yes",
|
|
5301
|
-
children: /* @__PURE__ */ p(
|
|
5310
|
+
children: /* @__PURE__ */ p(H, {
|
|
5302
5311
|
name: "check",
|
|
5303
5312
|
size: 16
|
|
5304
5313
|
})
|
|
@@ -5333,60 +5342,60 @@ function _n({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
5333
5342
|
//#region src/components/AppInput.jsx
|
|
5334
5343
|
var vn = 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) {
|
|
5335
5344
|
N("AppInput", M);
|
|
5336
|
-
let [F, I] = d(!1), L = s(), R = y || L, z = c === "password", ee = z && F ? "text" : c, B = u(null),
|
|
5345
|
+
let [F, I] = d(!1), L = s(), R = y || L, z = c === "password", ee = z && F ? "text" : c, B = u(null), V = (e) => {
|
|
5337
5346
|
B.current = e, typeof P == "function" ? P(e) : P && (P.current = e);
|
|
5338
|
-
},
|
|
5347
|
+
}, te = String(M.value ?? M.defaultValue ?? ""), [ne, re] = d(() => !!te), [ie, U] = d(() => te.length), ae = T && !w, oe = T || E;
|
|
5339
5348
|
o(() => {
|
|
5340
|
-
if (!
|
|
5349
|
+
if (!oe || M.value === void 0) return;
|
|
5341
5350
|
let e = String(M.value ?? "");
|
|
5342
|
-
|
|
5343
|
-
}, [M.value,
|
|
5344
|
-
let
|
|
5345
|
-
|
|
5346
|
-
},
|
|
5351
|
+
re(!!e), U(e.length);
|
|
5352
|
+
}, [M.value, oe]);
|
|
5353
|
+
let se = (e) => {
|
|
5354
|
+
re(!!e.target.value), U(e.target.value.length), M.onInput?.(e);
|
|
5355
|
+
}, ce = ae ? /* @__PURE__ */ p("button", {
|
|
5347
5356
|
type: "button",
|
|
5348
5357
|
className: "input-clear",
|
|
5349
5358
|
onClick: () => {
|
|
5350
5359
|
let e = B.current;
|
|
5351
5360
|
if (!e) return;
|
|
5352
5361
|
let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
5353
|
-
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })),
|
|
5362
|
+
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), re(!1), e.focus();
|
|
5354
5363
|
},
|
|
5355
5364
|
"aria-label": "Clear",
|
|
5356
5365
|
tabIndex: -1,
|
|
5357
|
-
hidden: !
|
|
5358
|
-
children: /* @__PURE__ */ p(
|
|
5366
|
+
hidden: !ne,
|
|
5367
|
+
children: /* @__PURE__ */ p(H, {
|
|
5359
5368
|
name: "x",
|
|
5360
5369
|
size: 16
|
|
5361
5370
|
})
|
|
5362
|
-
}) : null,
|
|
5371
|
+
}) : null, le = n && R ? `${R}-error` : void 0, ue = r && R ? `${R}-hint` : void 0, de = le || ue, fe = [
|
|
5363
5372
|
"input",
|
|
5364
5373
|
l === "sm" ? "input-sm" : "",
|
|
5365
5374
|
l === "lg" ? "input-lg" : "",
|
|
5366
5375
|
n ? "error" : "",
|
|
5367
5376
|
z ? "pw" : "",
|
|
5368
5377
|
v ? "num-input" : "",
|
|
5369
|
-
!(A && e || O || k || v || z || h) && T &&
|
|
5378
|
+
!(A && e || O || k || v || z || h) && T && ae ? "has-clear" : "",
|
|
5370
5379
|
j === "bare" ? "input-bare" : "",
|
|
5371
5380
|
S
|
|
5372
|
-
].filter(Boolean).join(" "),
|
|
5381
|
+
].filter(Boolean).join(" "), W = /* @__PURE__ */ p(x.Control, {
|
|
5373
5382
|
id: R,
|
|
5374
5383
|
name: b,
|
|
5375
5384
|
type: ee,
|
|
5376
|
-
className:
|
|
5385
|
+
className: fe,
|
|
5377
5386
|
disabled: w,
|
|
5378
5387
|
required: t,
|
|
5379
5388
|
"aria-invalid": n ? "true" : "false",
|
|
5380
|
-
"aria-describedby":
|
|
5389
|
+
"aria-describedby": de,
|
|
5381
5390
|
maxLength: D,
|
|
5382
5391
|
...M,
|
|
5383
5392
|
placeholder: A ? " " : M.placeholder,
|
|
5384
|
-
ref:
|
|
5385
|
-
onInput:
|
|
5386
|
-
}),
|
|
5387
|
-
return
|
|
5393
|
+
ref: V,
|
|
5394
|
+
onInput: oe ? se : M.onInput
|
|
5395
|
+
}), pe;
|
|
5396
|
+
return pe = A && e ? /* @__PURE__ */ m("div", {
|
|
5388
5397
|
className: "field-float",
|
|
5389
|
-
children: [
|
|
5398
|
+
children: [W, /* @__PURE__ */ m("label", {
|
|
5390
5399
|
className: "float-label",
|
|
5391
5400
|
htmlFor: R,
|
|
5392
5401
|
children: [e, t && /* @__PURE__ */ p(Z, {})]
|
|
@@ -5398,7 +5407,7 @@ var vn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5398
5407
|
className: "affix affix-pre",
|
|
5399
5408
|
children: O
|
|
5400
5409
|
}),
|
|
5401
|
-
|
|
5410
|
+
W,
|
|
5402
5411
|
k != null && /* @__PURE__ */ p("span", {
|
|
5403
5412
|
className: "affix affix-suf",
|
|
5404
5413
|
children: k
|
|
@@ -5406,7 +5415,7 @@ var vn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5406
5415
|
]
|
|
5407
5416
|
}) : v ? /* @__PURE__ */ m("div", {
|
|
5408
5417
|
className: "input-with-unit",
|
|
5409
|
-
children: [
|
|
5418
|
+
children: [W, /* @__PURE__ */ p("span", {
|
|
5410
5419
|
className: "unit",
|
|
5411
5420
|
children: v
|
|
5412
5421
|
})]
|
|
@@ -5415,19 +5424,19 @@ var vn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5415
5424
|
children: [
|
|
5416
5425
|
f && /* @__PURE__ */ p("span", {
|
|
5417
5426
|
className: "ic",
|
|
5418
|
-
children: /* @__PURE__ */ p(
|
|
5427
|
+
children: /* @__PURE__ */ p(H, {
|
|
5419
5428
|
name: f,
|
|
5420
5429
|
size: 16
|
|
5421
5430
|
})
|
|
5422
5431
|
}),
|
|
5423
|
-
|
|
5432
|
+
W,
|
|
5424
5433
|
/* @__PURE__ */ p("button", {
|
|
5425
5434
|
type: "button",
|
|
5426
5435
|
className: "pw-toggle",
|
|
5427
5436
|
onClick: () => I((e) => !e),
|
|
5428
5437
|
"aria-label": F ? "Hide password" : "Show password",
|
|
5429
5438
|
tabIndex: -1,
|
|
5430
|
-
children: /* @__PURE__ */ p(
|
|
5439
|
+
children: /* @__PURE__ */ p(H, {
|
|
5431
5440
|
name: F ? "eye-off" : "eye",
|
|
5432
5441
|
size: 18
|
|
5433
5442
|
})
|
|
@@ -5435,14 +5444,14 @@ var vn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5435
5444
|
]
|
|
5436
5445
|
}) : h ? /* @__PURE__ */ m("div", {
|
|
5437
5446
|
className: "input-wrap",
|
|
5438
|
-
children: [
|
|
5447
|
+
children: [W, /* @__PURE__ */ p("button", {
|
|
5439
5448
|
type: "button",
|
|
5440
5449
|
className: "pw-toggle",
|
|
5441
5450
|
onClick: g,
|
|
5442
5451
|
disabled: !g,
|
|
5443
5452
|
tabIndex: -1,
|
|
5444
5453
|
"aria-label": _ || h,
|
|
5445
|
-
children: /* @__PURE__ */ p(
|
|
5454
|
+
children: /* @__PURE__ */ p(H, {
|
|
5446
5455
|
name: h,
|
|
5447
5456
|
size: 18
|
|
5448
5457
|
})
|
|
@@ -5452,24 +5461,24 @@ var vn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5452
5461
|
children: [
|
|
5453
5462
|
f && /* @__PURE__ */ p("span", {
|
|
5454
5463
|
className: "ic",
|
|
5455
|
-
children: /* @__PURE__ */ p(
|
|
5464
|
+
children: /* @__PURE__ */ p(H, {
|
|
5456
5465
|
name: f,
|
|
5457
5466
|
size: 16
|
|
5458
5467
|
})
|
|
5459
5468
|
}),
|
|
5460
|
-
|
|
5461
|
-
|
|
5469
|
+
W,
|
|
5470
|
+
ce
|
|
5462
5471
|
]
|
|
5463
5472
|
}) : f ? /* @__PURE__ */ m("div", {
|
|
5464
5473
|
className: "input-icon",
|
|
5465
5474
|
children: [/* @__PURE__ */ p("span", {
|
|
5466
5475
|
className: "ic",
|
|
5467
|
-
children: /* @__PURE__ */ p(
|
|
5476
|
+
children: /* @__PURE__ */ p(H, {
|
|
5468
5477
|
name: f,
|
|
5469
5478
|
size: 16
|
|
5470
5479
|
})
|
|
5471
|
-
}),
|
|
5472
|
-
}) :
|
|
5480
|
+
}), W]
|
|
5481
|
+
}) : W, /* @__PURE__ */ m(x.Group, {
|
|
5473
5482
|
className: `field${C ? ` ${C}` : ""}`,
|
|
5474
5483
|
children: [
|
|
5475
5484
|
e && !A && /* @__PURE__ */ m(x.Label, {
|
|
@@ -5484,19 +5493,19 @@ var vn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5484
5493
|
})
|
|
5485
5494
|
]
|
|
5486
5495
|
}),
|
|
5487
|
-
|
|
5496
|
+
pe,
|
|
5488
5497
|
n ? /* @__PURE__ */ p("div", {
|
|
5489
5498
|
className: "field-error",
|
|
5490
|
-
id:
|
|
5499
|
+
id: le,
|
|
5491
5500
|
children: n
|
|
5492
5501
|
}) : r ? /* @__PURE__ */ p("div", {
|
|
5493
5502
|
className: "field-hint",
|
|
5494
|
-
id:
|
|
5503
|
+
id: ue,
|
|
5495
5504
|
children: r
|
|
5496
5505
|
}) : null,
|
|
5497
5506
|
E && /* @__PURE__ */ m("div", {
|
|
5498
|
-
className: `field-count${D &&
|
|
5499
|
-
children: [
|
|
5507
|
+
className: `field-count${D && ie >= D ? " at-limit" : ""}`,
|
|
5508
|
+
children: [ie, D ? ` / ${D}` : ""]
|
|
5500
5509
|
})
|
|
5501
5510
|
]
|
|
5502
5511
|
});
|
|
@@ -5558,7 +5567,7 @@ function Cn({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a
|
|
|
5558
5567
|
className: "wui-modal-heading",
|
|
5559
5568
|
children: [i && /* @__PURE__ */ p("span", {
|
|
5560
5569
|
className: "wui-modal-headicon",
|
|
5561
|
-
children: /* @__PURE__ */ p(
|
|
5570
|
+
children: /* @__PURE__ */ p(H, {
|
|
5562
5571
|
name: i,
|
|
5563
5572
|
size: 18
|
|
5564
5573
|
})
|
|
@@ -5646,12 +5655,12 @@ function En({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5646
5655
|
className: ["wui-confirm", v].filter(Boolean).join(" "),
|
|
5647
5656
|
footer: /* @__PURE__ */ m("div", {
|
|
5648
5657
|
className: "wui-confirm-actions",
|
|
5649
|
-
children: [/* @__PURE__ */ p(
|
|
5658
|
+
children: [/* @__PURE__ */ p(W, {
|
|
5650
5659
|
variant: "secondary",
|
|
5651
5660
|
disabled: h,
|
|
5652
5661
|
onClick: w,
|
|
5653
5662
|
children: i
|
|
5654
|
-
}), /* @__PURE__ */ p(
|
|
5663
|
+
}), /* @__PURE__ */ p(W, {
|
|
5655
5664
|
variant: a ? "danger" : "primary",
|
|
5656
5665
|
disabled: S,
|
|
5657
5666
|
loading: h,
|
|
@@ -5715,14 +5724,14 @@ function On({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5715
5724
|
document.body.removeChild(t), n && (f(!0), s?.(), setTimeout(() => f(!1), 2e3));
|
|
5716
5725
|
} catch {}
|
|
5717
5726
|
}, [e, s]), h = u ? n : t, g = u ? "check" : "files";
|
|
5718
|
-
return r ? /* @__PURE__ */ p(
|
|
5727
|
+
return r ? /* @__PURE__ */ p(ae, {
|
|
5719
5728
|
icon: g,
|
|
5720
5729
|
label: h,
|
|
5721
5730
|
size: Dn[i] ?? Dn.md,
|
|
5722
5731
|
onClick: m,
|
|
5723
5732
|
className: c,
|
|
5724
5733
|
...l
|
|
5725
|
-
}) : /* @__PURE__ */ p(
|
|
5734
|
+
}) : /* @__PURE__ */ p(W, {
|
|
5726
5735
|
leftIcon: g,
|
|
5727
5736
|
variant: o,
|
|
5728
5737
|
size: i,
|
|
@@ -5850,7 +5859,7 @@ function Fn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
5850
5859
|
onClick: () => o(Math.max(1, e - 1)),
|
|
5851
5860
|
disabled: e <= 1,
|
|
5852
5861
|
"aria-label": "Previous page",
|
|
5853
|
-
children: /* @__PURE__ */ p(
|
|
5862
|
+
children: /* @__PURE__ */ p(H, {
|
|
5854
5863
|
name: "arrow-left",
|
|
5855
5864
|
size: 18
|
|
5856
5865
|
})
|
|
@@ -5873,7 +5882,7 @@ function Fn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
5873
5882
|
onClick: () => o(Math.min(t, e + 1)),
|
|
5874
5883
|
disabled: e >= t,
|
|
5875
5884
|
"aria-label": "Next page",
|
|
5876
|
-
children: /* @__PURE__ */ p(
|
|
5885
|
+
children: /* @__PURE__ */ p(H, {
|
|
5877
5886
|
name: "arrow-right",
|
|
5878
5887
|
size: 18
|
|
5879
5888
|
})
|
|
@@ -5937,7 +5946,7 @@ function Rn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5937
5946
|
} : void 0,
|
|
5938
5947
|
children: [e.label, n && /* @__PURE__ */ p("span", {
|
|
5939
5948
|
className: "sort-icon",
|
|
5940
|
-
children: /* @__PURE__ */ p(
|
|
5949
|
+
children: /* @__PURE__ */ p(H, {
|
|
5941
5950
|
name: "chevrons-up-down",
|
|
5942
5951
|
size: 14
|
|
5943
5952
|
})
|
|
@@ -5971,7 +5980,7 @@ function Rn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5971
5980
|
"aria-controls": o ? `${s}-expanded` : void 0,
|
|
5972
5981
|
"aria-label": o ? "Collapse row" : "Expand row",
|
|
5973
5982
|
onClick: () => A(a),
|
|
5974
|
-
children: /* @__PURE__ */ p(
|
|
5983
|
+
children: /* @__PURE__ */ p(H, {
|
|
5975
5984
|
name: "chevron-down",
|
|
5976
5985
|
size: 16
|
|
5977
5986
|
})
|
|
@@ -6214,7 +6223,7 @@ function Gn({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
6214
6223
|
children: [e.image ? /* @__PURE__ */ p("img", {
|
|
6215
6224
|
src: e.image,
|
|
6216
6225
|
alt: ""
|
|
6217
|
-
}) :
|
|
6226
|
+
}) : U(e.icon, { size: 16 }), e.label]
|
|
6218
6227
|
}, e.key);
|
|
6219
6228
|
})
|
|
6220
6229
|
})]
|
|
@@ -6227,7 +6236,7 @@ var Kn = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-
|
|
|
6227
6236
|
className: n,
|
|
6228
6237
|
"aria-label": i,
|
|
6229
6238
|
...o,
|
|
6230
|
-
children: r ?? /* @__PURE__ */ p(
|
|
6239
|
+
children: r ?? /* @__PURE__ */ p(H, {
|
|
6231
6240
|
name: e,
|
|
6232
6241
|
size: t
|
|
6233
6242
|
})
|
|
@@ -6270,7 +6279,7 @@ function Zn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6270
6279
|
children: i ? /* @__PURE__ */ p("img", {
|
|
6271
6280
|
src: i,
|
|
6272
6281
|
alt: a
|
|
6273
|
-
}) : /* @__PURE__ */ p(
|
|
6282
|
+
}) : /* @__PURE__ */ p(H, {
|
|
6274
6283
|
name: "file-text",
|
|
6275
6284
|
size: 18
|
|
6276
6285
|
})
|
|
@@ -6290,7 +6299,7 @@ function Zn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6290
6299
|
className: "attach-item-remove",
|
|
6291
6300
|
"aria-label": `Remove ${a || r}`,
|
|
6292
6301
|
onClick: n,
|
|
6293
|
-
children: /* @__PURE__ */ p(
|
|
6302
|
+
children: /* @__PURE__ */ p(H, {
|
|
6294
6303
|
name: "x",
|
|
6295
6304
|
size: 16
|
|
6296
6305
|
})
|
|
@@ -6344,7 +6353,7 @@ function Qn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6344
6353
|
children: [
|
|
6345
6354
|
/* @__PURE__ */ p("span", {
|
|
6346
6355
|
className: "attach-drop-icon",
|
|
6347
|
-
children: /* @__PURE__ */ p(
|
|
6356
|
+
children: /* @__PURE__ */ p(H, {
|
|
6348
6357
|
name: x ? "image" : "file-text",
|
|
6349
6358
|
size: 18
|
|
6350
6359
|
})
|
|
@@ -6412,7 +6421,7 @@ function $n({ item: e, isImage: t, onRemove: n }) {
|
|
|
6412
6421
|
className: "attach-remove",
|
|
6413
6422
|
"aria-label": "Remove attachment",
|
|
6414
6423
|
onClick: n,
|
|
6415
|
-
children: /* @__PURE__ */ p(
|
|
6424
|
+
children: /* @__PURE__ */ p(H, {
|
|
6416
6425
|
name: "x",
|
|
6417
6426
|
size: 18
|
|
6418
6427
|
})
|
|
@@ -6516,7 +6525,7 @@ function er({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6516
6525
|
className: "file-preview-img"
|
|
6517
6526
|
}) : /* @__PURE__ */ m("span", {
|
|
6518
6527
|
className: "file-preview-file",
|
|
6519
|
-
children: [/* @__PURE__ */ p(
|
|
6528
|
+
children: [/* @__PURE__ */ p(H, {
|
|
6520
6529
|
name: "file-text",
|
|
6521
6530
|
size: 28
|
|
6522
6531
|
}), /* @__PURE__ */ p("span", {
|
|
@@ -6528,7 +6537,7 @@ function er({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6528
6537
|
children: /* @__PURE__ */ m("span", {
|
|
6529
6538
|
className: "file-preview-cta",
|
|
6530
6539
|
children: [
|
|
6531
|
-
/* @__PURE__ */ p(
|
|
6540
|
+
/* @__PURE__ */ p(H, {
|
|
6532
6541
|
name: j ? "image" : "file-text",
|
|
6533
6542
|
size: 16
|
|
6534
6543
|
}),
|
|
@@ -6544,7 +6553,7 @@ function er({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6544
6553
|
"aria-label": `Remove ${e}`,
|
|
6545
6554
|
title: "Remove image",
|
|
6546
6555
|
onClick: () => r(null),
|
|
6547
|
-
children: /* @__PURE__ */ p(
|
|
6556
|
+
children: /* @__PURE__ */ p(H, {
|
|
6548
6557
|
name: "x",
|
|
6549
6558
|
size: 16
|
|
6550
6559
|
})
|
|
@@ -6567,7 +6576,7 @@ function er({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6567
6576
|
children: [
|
|
6568
6577
|
/* @__PURE__ */ p("span", {
|
|
6569
6578
|
className: "file-input-icon",
|
|
6570
|
-
children: /* @__PURE__ */ p(
|
|
6579
|
+
children: /* @__PURE__ */ p(H, {
|
|
6571
6580
|
name: "upload",
|
|
6572
6581
|
size: 24
|
|
6573
6582
|
})
|
|
@@ -6627,7 +6636,7 @@ function tr({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
6627
6636
|
children: e.title
|
|
6628
6637
|
}), /* @__PURE__ */ p("span", {
|
|
6629
6638
|
className: "dock-item-icon",
|
|
6630
|
-
children:
|
|
6639
|
+
children: U(e.icon, { size: 18 })
|
|
6631
6640
|
})] });
|
|
6632
6641
|
if (e.to && t) return /* @__PURE__ */ p(t, {
|
|
6633
6642
|
className: "dock-item",
|
|
@@ -6710,7 +6719,7 @@ function ar({ items: e = [], className: t = "", ...n }) {
|
|
|
6710
6719
|
children: e.map((e, t) => {
|
|
6711
6720
|
let n = Vn(e.value), r = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
6712
6721
|
className: "info-icon",
|
|
6713
|
-
children:
|
|
6722
|
+
children: U(e.icon, { size: 16 })
|
|
6714
6723
|
}), /* @__PURE__ */ m("span", {
|
|
6715
6724
|
className: "info-meta",
|
|
6716
6725
|
children: [/* @__PURE__ */ p("span", {
|
|
@@ -6765,7 +6774,7 @@ function ur({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6765
6774
|
children: [
|
|
6766
6775
|
r && /* @__PURE__ */ p("span", {
|
|
6767
6776
|
className: `kpi-icon${i ? ` kpi-icon-${i}` : ""}${y ? ` ${y}` : ""}`,
|
|
6768
|
-
children:
|
|
6777
|
+
children: U(r, { size: 20 })
|
|
6769
6778
|
}),
|
|
6770
6779
|
/* @__PURE__ */ p("div", {
|
|
6771
6780
|
className: `kpi-label${b ? ` ${b}` : ""}`,
|
|
@@ -6781,7 +6790,7 @@ function ur({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6781
6790
|
}),
|
|
6782
6791
|
a && /* @__PURE__ */ m("div", {
|
|
6783
6792
|
className: `kpi-delta${O === "flat" ? "" : ` ${O}`}${C ? ` ${C}` : ""}`,
|
|
6784
|
-
children: [k && /* @__PURE__ */ p(
|
|
6793
|
+
children: [k && /* @__PURE__ */ p(H, {
|
|
6785
6794
|
name: k,
|
|
6786
6795
|
size: 13
|
|
6787
6796
|
}), a]
|
|
@@ -6808,129 +6817,156 @@ var dr = {
|
|
|
6808
6817
|
md: 120,
|
|
6809
6818
|
lg: 160
|
|
6810
6819
|
};
|
|
6811
|
-
function fr({ 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,
|
|
6812
|
-
N("AppLogoPicker",
|
|
6813
|
-
let
|
|
6814
|
-
o(() => () =>
|
|
6815
|
-
|
|
6820
|
+
function fr({ 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 }) {
|
|
6821
|
+
N("AppLogoPicker", k);
|
|
6822
|
+
let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [R, z] = d(!1), [ee, B] = d(!1);
|
|
6823
|
+
o(() => () => P && URL.revokeObjectURL(P), [P]), o(() => {
|
|
6824
|
+
F(null), z(!1);
|
|
6816
6825
|
}, [e]);
|
|
6817
|
-
let
|
|
6818
|
-
|
|
6819
|
-
},
|
|
6826
|
+
let V = a || c, te = P || (e && !R ? e : null), ne = b || I, re = !V && (!!P || !!te && !!i), ie = () => {
|
|
6827
|
+
V || A.current?.click();
|
|
6828
|
+
}, U = (e) => {
|
|
6820
6829
|
let t = Mt(e, {
|
|
6821
6830
|
accept: l,
|
|
6822
6831
|
maxSizeMb: f
|
|
6823
6832
|
});
|
|
6824
6833
|
if (t) {
|
|
6825
|
-
|
|
6834
|
+
L(t);
|
|
6826
6835
|
return;
|
|
6827
6836
|
}
|
|
6828
|
-
|
|
6829
|
-
}, ie = (e) => {
|
|
6830
|
-
let t = e.target.files?.[0];
|
|
6831
|
-
e.target.value = "", t && re(t);
|
|
6837
|
+
L(""), z(!1), F(URL.createObjectURL(e)), r(e);
|
|
6832
6838
|
}, ae = (e) => {
|
|
6833
|
-
|
|
6839
|
+
let t = e.target.files?.[0];
|
|
6840
|
+
e.target.value = "", t && U(t);
|
|
6841
|
+
}, oe = (e) => {
|
|
6842
|
+
if (e.preventDefault(), B(!1), V) return;
|
|
6834
6843
|
let t = e.dataTransfer.files?.[0];
|
|
6835
|
-
t &&
|
|
6836
|
-
},
|
|
6837
|
-
|
|
6838
|
-
},
|
|
6844
|
+
t && U(t);
|
|
6845
|
+
}, se = () => {
|
|
6846
|
+
F(null), L(""), z(!1), A.current && (A.current.value = ""), i?.();
|
|
6847
|
+
}, ce = typeof E == "number" ? E : dr[E] ?? dr.md, le = Math.max(14, Math.round(ce * .18)), ue = Math.round(ce * .5), de = [
|
|
6839
6848
|
"set-uploader",
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
].filter(Boolean).join(" ")
|
|
6844
|
-
|
|
6845
|
-
className: `field set-uploader-field${T ? ` ${T}` : ""}`,
|
|
6849
|
+
T === "avatar" ? "set-uploader--avatar" : "",
|
|
6850
|
+
D === "rounded" ? "set-uploader--rounded" : D === "square" ? "set-uploader--square" : "",
|
|
6851
|
+
ee && "is-dragging"
|
|
6852
|
+
].filter(Boolean).join(" "), fe = x === "inline", W = x === "profile", pe = /* @__PURE__ */ m("div", {
|
|
6853
|
+
className: "set-uploader-shell",
|
|
6846
6854
|
children: [
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
src: ee,
|
|
6876
|
-
alt: "",
|
|
6877
|
-
onError: () => I(!0)
|
|
6878
|
-
}) : /* @__PURE__ */ p("span", {
|
|
6879
|
-
className: "set-uploader-logo",
|
|
6880
|
-
children: t || S === "avatar" && /* @__PURE__ */ p(V, {
|
|
6881
|
-
name: "user",
|
|
6882
|
-
size: ce
|
|
6883
|
-
})
|
|
6884
|
-
}), a ? /* @__PURE__ */ p("span", {
|
|
6885
|
-
className: "set-uploader-overlay is-loading",
|
|
6886
|
-
"aria-hidden": "true",
|
|
6887
|
-
children: /* @__PURE__ */ p(V, {
|
|
6888
|
-
name: "refresh-cw",
|
|
6889
|
-
size: se,
|
|
6890
|
-
className: "wui-spin"
|
|
6891
|
-
})
|
|
6892
|
-
}) : !c && /* @__PURE__ */ m("span", {
|
|
6893
|
-
className: "set-uploader-overlay",
|
|
6894
|
-
children: [/* @__PURE__ */ p(V, {
|
|
6895
|
-
name: h,
|
|
6896
|
-
size: se
|
|
6897
|
-
}), /* @__PURE__ */ p("span", { children: g })]
|
|
6898
|
-
})]
|
|
6855
|
+
/* @__PURE__ */ p("button", {
|
|
6856
|
+
type: "button",
|
|
6857
|
+
className: de,
|
|
6858
|
+
style: { "--wui-logo-size": `${ce}px` },
|
|
6859
|
+
"aria-busy": a || void 0,
|
|
6860
|
+
disabled: V,
|
|
6861
|
+
onClick: ie,
|
|
6862
|
+
"aria-label": _,
|
|
6863
|
+
onDragOver: (e) => {
|
|
6864
|
+
e.preventDefault(), !V && !ee && B(!0);
|
|
6865
|
+
},
|
|
6866
|
+
onDragLeave: (e) => {
|
|
6867
|
+
e.preventDefault(), B(!1);
|
|
6868
|
+
},
|
|
6869
|
+
onDrop: oe,
|
|
6870
|
+
...k,
|
|
6871
|
+
children: /* @__PURE__ */ m("span", {
|
|
6872
|
+
className: "set-uploader-ring",
|
|
6873
|
+
children: [te ? /* @__PURE__ */ p("img", {
|
|
6874
|
+
className: "set-uploader-img",
|
|
6875
|
+
src: te,
|
|
6876
|
+
alt: "",
|
|
6877
|
+
onError: () => z(!0)
|
|
6878
|
+
}) : /* @__PURE__ */ p("span", {
|
|
6879
|
+
className: "set-uploader-logo",
|
|
6880
|
+
children: t || T === "avatar" && /* @__PURE__ */ p(H, {
|
|
6881
|
+
name: "user",
|
|
6882
|
+
size: ue
|
|
6899
6883
|
})
|
|
6900
|
-
}),
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
onClick: H,
|
|
6908
|
-
children: /* @__PURE__ */ p(V, {
|
|
6909
|
-
name: "x",
|
|
6910
|
-
size: 14
|
|
6884
|
+
}), a ? /* @__PURE__ */ p("span", {
|
|
6885
|
+
className: "set-uploader-overlay is-loading",
|
|
6886
|
+
"aria-hidden": "true",
|
|
6887
|
+
children: /* @__PURE__ */ p(H, {
|
|
6888
|
+
name: "refresh-cw",
|
|
6889
|
+
size: le,
|
|
6890
|
+
className: "wui-spin"
|
|
6911
6891
|
})
|
|
6912
|
-
}),
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
onChange: ie,
|
|
6921
|
-
disabled: z
|
|
6922
|
-
})
|
|
6923
|
-
]
|
|
6892
|
+
}) : !c && /* @__PURE__ */ m("span", {
|
|
6893
|
+
className: "set-uploader-overlay",
|
|
6894
|
+
children: [/* @__PURE__ */ p(H, {
|
|
6895
|
+
name: h,
|
|
6896
|
+
size: le
|
|
6897
|
+
}), /* @__PURE__ */ p("span", { children: g })]
|
|
6898
|
+
})]
|
|
6899
|
+
})
|
|
6924
6900
|
}),
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6901
|
+
/* @__PURE__ */ p("button", {
|
|
6902
|
+
type: "button",
|
|
6903
|
+
className: "set-uploader-remove",
|
|
6904
|
+
hidden: !re,
|
|
6905
|
+
"aria-label": "Remove photo",
|
|
6906
|
+
title: "Remove photo",
|
|
6907
|
+
onClick: se,
|
|
6908
|
+
children: /* @__PURE__ */ p(H, {
|
|
6909
|
+
name: "x",
|
|
6910
|
+
size: 14
|
|
6911
|
+
})
|
|
6928
6912
|
}),
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6913
|
+
/* @__PURE__ */ p("input", {
|
|
6914
|
+
id: M,
|
|
6915
|
+
ref: A,
|
|
6916
|
+
type: "file",
|
|
6917
|
+
name: n,
|
|
6918
|
+
hidden: !0,
|
|
6919
|
+
accept: l,
|
|
6920
|
+
onChange: ae,
|
|
6921
|
+
disabled: V
|
|
6932
6922
|
})
|
|
6933
6923
|
]
|
|
6924
|
+
}), me = y && !ne && /* @__PURE__ */ p("div", {
|
|
6925
|
+
className: "set-uploader-hint",
|
|
6926
|
+
children: y
|
|
6927
|
+
}), he = ne && /* @__PURE__ */ p("div", {
|
|
6928
|
+
className: "field-error",
|
|
6929
|
+
children: ne
|
|
6930
|
+
}), ge = v && /* @__PURE__ */ m("label", {
|
|
6931
|
+
className: "label",
|
|
6932
|
+
htmlFor: M,
|
|
6933
|
+
children: [v, w && /* @__PURE__ */ p(Z, {})]
|
|
6934
|
+
}), _e = /* @__PURE__ */ m("div", {
|
|
6935
|
+
className: "set-uploader-meta",
|
|
6936
|
+
children: [
|
|
6937
|
+
S && /* @__PURE__ */ p("div", {
|
|
6938
|
+
className: "set-uploader-title",
|
|
6939
|
+
children: S
|
|
6940
|
+
}),
|
|
6941
|
+
C && /* @__PURE__ */ p("div", {
|
|
6942
|
+
className: "set-uploader-subtitle",
|
|
6943
|
+
children: C
|
|
6944
|
+
}),
|
|
6945
|
+
me,
|
|
6946
|
+
he
|
|
6947
|
+
]
|
|
6948
|
+
});
|
|
6949
|
+
return fe ? /* @__PURE__ */ m("div", {
|
|
6950
|
+
className: `field set-uploader-field set-uploader-field--inline${O ? ` ${O}` : ""}`,
|
|
6951
|
+
children: [ge, /* @__PURE__ */ m("div", {
|
|
6952
|
+
className: "set-uploader-row",
|
|
6953
|
+
children: [pe, _e]
|
|
6954
|
+
})]
|
|
6955
|
+
}) : W ? /* @__PURE__ */ m("div", {
|
|
6956
|
+
className: `field set-uploader-field set-uploader-field--profile${O ? ` ${O}` : ""}`,
|
|
6957
|
+
children: [
|
|
6958
|
+
ge,
|
|
6959
|
+
pe,
|
|
6960
|
+
_e
|
|
6961
|
+
]
|
|
6962
|
+
}) : /* @__PURE__ */ m("div", {
|
|
6963
|
+
className: `field set-uploader-field${O ? ` ${O}` : ""}`,
|
|
6964
|
+
children: [
|
|
6965
|
+
ge,
|
|
6966
|
+
pe,
|
|
6967
|
+
me,
|
|
6968
|
+
he
|
|
6969
|
+
]
|
|
6934
6970
|
});
|
|
6935
6971
|
}
|
|
6936
6972
|
//#endregion
|
|
@@ -7050,19 +7086,19 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7050
7086
|
let F = (e) => {
|
|
7051
7087
|
let t = (j(M) ?? A(0)) + e * h, n = A(k(t));
|
|
7052
7088
|
P(String(n)), l?.(n);
|
|
7053
|
-
}, 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,
|
|
7089
|
+
}, 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, V = [
|
|
7054
7090
|
"input",
|
|
7055
7091
|
v === "sm" ? "input-sm" : "",
|
|
7056
7092
|
v === "lg" ? "input-lg" : "",
|
|
7057
7093
|
n ? "error" : "",
|
|
7058
7094
|
"num-input",
|
|
7059
7095
|
S
|
|
7060
|
-
].filter(Boolean).join(" "),
|
|
7096
|
+
].filter(Boolean).join(" "), te = (e) => {
|
|
7061
7097
|
let t = e.target.value;
|
|
7062
7098
|
P(t);
|
|
7063
7099
|
let n = j(t);
|
|
7064
7100
|
n !== null && l?.(n);
|
|
7065
|
-
},
|
|
7101
|
+
}, ne = (e) => {
|
|
7066
7102
|
let t = j(e.target.value);
|
|
7067
7103
|
if (t === null) P(""), l?.("");
|
|
7068
7104
|
else {
|
|
@@ -7070,25 +7106,25 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7070
7106
|
P(String(e)), l?.(e);
|
|
7071
7107
|
}
|
|
7072
7108
|
T.onBlur?.(e);
|
|
7073
|
-
},
|
|
7109
|
+
}, re = (e) => {
|
|
7074
7110
|
e.key === "ArrowUp" ? (e.preventDefault(), F(1)) : e.key === "ArrowDown" && (e.preventDefault(), F(-1)), T.onKeyDown?.(e);
|
|
7075
|
-
},
|
|
7111
|
+
}, ie = /* @__PURE__ */ p(x.Control, {
|
|
7076
7112
|
...T,
|
|
7077
7113
|
id: O,
|
|
7078
7114
|
name: b,
|
|
7079
7115
|
type: "text",
|
|
7080
7116
|
inputMode: g > 0 ? "decimal" : "numeric",
|
|
7081
|
-
className:
|
|
7117
|
+
className: V,
|
|
7082
7118
|
disabled: w,
|
|
7083
7119
|
required: t,
|
|
7084
7120
|
"aria-invalid": n ? "true" : "false",
|
|
7085
7121
|
"aria-describedby": B,
|
|
7086
7122
|
value: M,
|
|
7087
7123
|
ref: E,
|
|
7088
|
-
onChange:
|
|
7089
|
-
onBlur:
|
|
7090
|
-
onKeyDown:
|
|
7091
|
-
}),
|
|
7124
|
+
onChange: te,
|
|
7125
|
+
onBlur: ne,
|
|
7126
|
+
onKeyDown: re
|
|
7127
|
+
}), U = /* @__PURE__ */ m("div", {
|
|
7092
7128
|
className: [
|
|
7093
7129
|
"num-wrap",
|
|
7094
7130
|
v === "sm" ? "num-wrap-sm" : "",
|
|
@@ -7102,12 +7138,12 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7102
7138
|
tabIndex: -1,
|
|
7103
7139
|
disabled: L,
|
|
7104
7140
|
onClick: () => F(-1),
|
|
7105
|
-
children: /* @__PURE__ */ p(
|
|
7141
|
+
children: /* @__PURE__ */ p(H, {
|
|
7106
7142
|
name: "minus",
|
|
7107
7143
|
size: 16
|
|
7108
7144
|
})
|
|
7109
7145
|
}),
|
|
7110
|
-
|
|
7146
|
+
ie,
|
|
7111
7147
|
_ && /* @__PURE__ */ p("span", {
|
|
7112
7148
|
className: "affix",
|
|
7113
7149
|
children: _
|
|
@@ -7119,7 +7155,7 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7119
7155
|
tabIndex: -1,
|
|
7120
7156
|
disabled: R,
|
|
7121
7157
|
onClick: () => F(1),
|
|
7122
|
-
children: /* @__PURE__ */ p(
|
|
7158
|
+
children: /* @__PURE__ */ p(H, {
|
|
7123
7159
|
name: "plus",
|
|
7124
7160
|
size: 16
|
|
7125
7161
|
})
|
|
@@ -7141,7 +7177,7 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7141
7177
|
})
|
|
7142
7178
|
]
|
|
7143
7179
|
}),
|
|
7144
|
-
|
|
7180
|
+
U,
|
|
7145
7181
|
n ? /* @__PURE__ */ p("div", {
|
|
7146
7182
|
className: "field-error",
|
|
7147
7183
|
id: z,
|
|
@@ -7210,7 +7246,7 @@ function br({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
7210
7246
|
d ? "page-header-sticky" : "",
|
|
7211
7247
|
i && i !== "primary" ? `tone-${i}` : "",
|
|
7212
7248
|
f
|
|
7213
|
-
].filter(Boolean).join(" "), _ = r == null ? null : typeof r == "string" ? /* @__PURE__ */ p(
|
|
7249
|
+
].filter(Boolean).join(" "), _ = r == null ? null : typeof r == "string" ? /* @__PURE__ */ p(H, {
|
|
7214
7250
|
name: r,
|
|
7215
7251
|
size: 20
|
|
7216
7252
|
}) : r;
|
|
@@ -7319,26 +7355,26 @@ function xr({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
7319
7355
|
}
|
|
7320
7356
|
//#endregion
|
|
7321
7357
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
7322
|
-
var Sr = 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,
|
|
7323
|
-
N("AppPhoneNumberInput",
|
|
7324
|
-
let
|
|
7325
|
-
ref:
|
|
7358
|
+
var Sr = 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 }, _) {
|
|
7359
|
+
N("AppPhoneNumberInput", g);
|
|
7360
|
+
let v = s(), y = i || v, b = l && y ? `${y}-error` : void 0, { setRef: x } = Q({
|
|
7361
|
+
ref: _,
|
|
7326
7362
|
value: e ?? "",
|
|
7327
7363
|
onChange: t,
|
|
7328
7364
|
events: ["input", "change"]
|
|
7329
7365
|
});
|
|
7330
7366
|
return /* @__PURE__ */ m("div", {
|
|
7331
|
-
className: `field app-phone-number-input${f ?
|
|
7367
|
+
className: `field app-phone-number-input${f === "sm" ? " phone-sm" : ""}${f === "lg" ? " phone-lg" : ""}${h ? ` ${h}` : ""}`,
|
|
7332
7368
|
children: [
|
|
7333
7369
|
a && /* @__PURE__ */ m("label", {
|
|
7334
7370
|
className: "label",
|
|
7335
|
-
htmlFor:
|
|
7371
|
+
htmlFor: y,
|
|
7336
7372
|
children: [a, c && /* @__PURE__ */ p(Z, {})]
|
|
7337
7373
|
}),
|
|
7338
7374
|
/* @__PURE__ */ p("wui-phone", {
|
|
7339
7375
|
"aria-label": typeof a == "string" ? a : void 0,
|
|
7340
|
-
"aria-describedby":
|
|
7341
|
-
ref:
|
|
7376
|
+
"aria-describedby": b,
|
|
7377
|
+
ref: x,
|
|
7342
7378
|
name: i,
|
|
7343
7379
|
country: n,
|
|
7344
7380
|
placeholder: o,
|
|
@@ -7346,11 +7382,11 @@ var Sr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
7346
7382
|
disabled: r ? "" : void 0,
|
|
7347
7383
|
"hide-flag": u ? void 0 : "",
|
|
7348
7384
|
"hide-dial": d ? void 0 : "",
|
|
7349
|
-
...
|
|
7385
|
+
...g
|
|
7350
7386
|
}),
|
|
7351
7387
|
l && /* @__PURE__ */ p("div", {
|
|
7352
7388
|
className: "field-error",
|
|
7353
|
-
id:
|
|
7389
|
+
id: b,
|
|
7354
7390
|
children: l
|
|
7355
7391
|
})
|
|
7356
7392
|
]
|
|
@@ -7395,7 +7431,7 @@ function Cr({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
7395
7431
|
className: n ? void 0 : "excluded",
|
|
7396
7432
|
children: [/* @__PURE__ */ p("span", {
|
|
7397
7433
|
className: "plan-feature-icon",
|
|
7398
|
-
children: /* @__PURE__ */ p(
|
|
7434
|
+
children: /* @__PURE__ */ p(H, {
|
|
7399
7435
|
name: n ? "check" : "x",
|
|
7400
7436
|
size: 16
|
|
7401
7437
|
})
|
|
@@ -7488,7 +7524,7 @@ function Or({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7488
7524
|
className: "repeater-body",
|
|
7489
7525
|
children: t(e, n)
|
|
7490
7526
|
}),
|
|
7491
|
-
h && /* @__PURE__ */ p(
|
|
7527
|
+
h && /* @__PURE__ */ p(ae, {
|
|
7492
7528
|
icon: "trash-2",
|
|
7493
7529
|
label: `${a} ${n + 1}`,
|
|
7494
7530
|
danger: !0,
|
|
@@ -7497,7 +7533,7 @@ function Or({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7497
7533
|
})
|
|
7498
7534
|
]
|
|
7499
7535
|
}, e.id ?? n)),
|
|
7500
|
-
/* @__PURE__ */ p(
|
|
7536
|
+
/* @__PURE__ */ p(W, {
|
|
7501
7537
|
variant: "secondary",
|
|
7502
7538
|
size: "sm",
|
|
7503
7539
|
leftIcon: "plus",
|
|
@@ -7515,7 +7551,7 @@ function kr({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
7515
7551
|
N("AppResourceCard", s);
|
|
7516
7552
|
let c = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
7517
7553
|
className: "res-card-icon",
|
|
7518
|
-
children: /* @__PURE__ */ p(
|
|
7554
|
+
children: /* @__PURE__ */ p(H, {
|
|
7519
7555
|
name: e,
|
|
7520
7556
|
size: 18
|
|
7521
7557
|
})
|
|
@@ -7583,7 +7619,7 @@ function jr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
7583
7619
|
children: e
|
|
7584
7620
|
}) : d ? /* @__PURE__ */ p("div", {
|
|
7585
7621
|
className: "result-icon",
|
|
7586
|
-
children:
|
|
7622
|
+
children: U(d, { size: 48 })
|
|
7587
7623
|
}) : null,
|
|
7588
7624
|
t != null && /* @__PURE__ */ p("h2", {
|
|
7589
7625
|
className: "result-title",
|
|
@@ -7635,7 +7671,7 @@ function Nr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
7635
7671
|
className: "search-spinner",
|
|
7636
7672
|
"aria-hidden": "true"
|
|
7637
7673
|
}),
|
|
7638
|
-
/* @__PURE__ */ p(
|
|
7674
|
+
/* @__PURE__ */ p(H, {
|
|
7639
7675
|
name: "search",
|
|
7640
7676
|
size: a,
|
|
7641
7677
|
className: "search-icon"
|
|
@@ -7656,7 +7692,7 @@ function Nr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
7656
7692
|
"aria-label": "Clear search",
|
|
7657
7693
|
onClick: () => d?.(""),
|
|
7658
7694
|
hidden: !e,
|
|
7659
|
-
children: /* @__PURE__ */ p(
|
|
7695
|
+
children: /* @__PURE__ */ p(H, {
|
|
7660
7696
|
name: "x",
|
|
7661
7697
|
size: 16
|
|
7662
7698
|
})
|
|
@@ -7721,7 +7757,7 @@ function Pr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
7721
7757
|
disabled: d || e.disabled,
|
|
7722
7758
|
onChange: () => n?.(e.value)
|
|
7723
7759
|
}),
|
|
7724
|
-
e.icon && /* @__PURE__ */ p(
|
|
7760
|
+
e.icon && /* @__PURE__ */ p(H, {
|
|
7725
7761
|
name: e.icon,
|
|
7726
7762
|
size: 13
|
|
7727
7763
|
}),
|
|
@@ -7884,7 +7920,7 @@ function Lr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
7884
7920
|
onClick: D,
|
|
7885
7921
|
"aria-label": E ? "Expand navigation" : "Collapse navigation",
|
|
7886
7922
|
"aria-expanded": !E,
|
|
7887
|
-
children: /* @__PURE__ */ p(
|
|
7923
|
+
children: /* @__PURE__ */ p(H, {
|
|
7888
7924
|
name: "chevron-left",
|
|
7889
7925
|
size: 14
|
|
7890
7926
|
})
|
|
@@ -7902,7 +7938,7 @@ function Lr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
7902
7938
|
onClick: () => C(!0),
|
|
7903
7939
|
"aria-label": "Open navigation",
|
|
7904
7940
|
"aria-expanded": S,
|
|
7905
|
-
children: /* @__PURE__ */ p(
|
|
7941
|
+
children: /* @__PURE__ */ p(H, {
|
|
7906
7942
|
name: "menu",
|
|
7907
7943
|
size: 18
|
|
7908
7944
|
})
|
|
@@ -7939,7 +7975,7 @@ function Rr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
7939
7975
|
}, [a, s]);
|
|
7940
7976
|
let l = typeof e.label == "string" ? e.label : void 0, u = !r && e.icon && /* @__PURE__ */ p("span", {
|
|
7941
7977
|
className: "app-nav-icon",
|
|
7942
|
-
children: typeof e.icon == "string" ? /* @__PURE__ */ p(
|
|
7978
|
+
children: typeof e.icon == "string" ? /* @__PURE__ */ p(H, {
|
|
7943
7979
|
name: e.icon,
|
|
7944
7980
|
size: 22
|
|
7945
7981
|
}) : e.icon
|
|
@@ -7962,7 +7998,7 @@ function Rr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
7962
7998
|
h,
|
|
7963
7999
|
/* @__PURE__ */ p("span", {
|
|
7964
8000
|
className: "app-nav-caret",
|
|
7965
|
-
children: /* @__PURE__ */ p(
|
|
8001
|
+
children: /* @__PURE__ */ p(H, {
|
|
7966
8002
|
name: "chevron-right",
|
|
7967
8003
|
size: 16
|
|
7968
8004
|
})
|
|
@@ -7989,7 +8025,7 @@ function Rr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
7989
8025
|
h,
|
|
7990
8026
|
e.trailingIcon && /* @__PURE__ */ p("span", {
|
|
7991
8027
|
className: "app-nav-trailing",
|
|
7992
|
-
children: typeof e.trailingIcon == "string" ? /* @__PURE__ */ p(
|
|
8028
|
+
children: typeof e.trailingIcon == "string" ? /* @__PURE__ */ p(H, {
|
|
7993
8029
|
name: e.trailingIcon,
|
|
7994
8030
|
size: 16
|
|
7995
8031
|
}) : e.trailingIcon
|
|
@@ -8047,17 +8083,17 @@ function Br({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8047
8083
|
className: "drawer-title",
|
|
8048
8084
|
children: [i && /* @__PURE__ */ p("span", {
|
|
8049
8085
|
className: "drawer-title-ic",
|
|
8050
|
-
children: /* @__PURE__ */ p(
|
|
8086
|
+
children: /* @__PURE__ */ p(H, {
|
|
8051
8087
|
name: i,
|
|
8052
8088
|
size: 18
|
|
8053
8089
|
})
|
|
8054
8090
|
}), r]
|
|
8055
|
-
}), h && /* @__PURE__ */ p(
|
|
8091
|
+
}), h && /* @__PURE__ */ p(W, {
|
|
8056
8092
|
variant: "ghost",
|
|
8057
8093
|
className: "btn-icon",
|
|
8058
8094
|
onClick: t,
|
|
8059
8095
|
"aria-label": "Close",
|
|
8060
|
-
children: /* @__PURE__ */ p(
|
|
8096
|
+
children: /* @__PURE__ */ p(H, {
|
|
8061
8097
|
name: "x",
|
|
8062
8098
|
size: 16
|
|
8063
8099
|
})
|
|
@@ -8214,13 +8250,13 @@ function Gr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8214
8250
|
...c,
|
|
8215
8251
|
children: e.map((t, n) => {
|
|
8216
8252
|
let a = t.status || Kr(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
8217
|
-
c = a === "done" ? /* @__PURE__ */ p(
|
|
8253
|
+
c = a === "done" ? /* @__PURE__ */ p(H, {
|
|
8218
8254
|
name: "check",
|
|
8219
8255
|
size: 14
|
|
8220
|
-
}) : a === "error" ? /* @__PURE__ */ p(
|
|
8256
|
+
}) : a === "error" ? /* @__PURE__ */ p(H, {
|
|
8221
8257
|
name: "alert-triangle",
|
|
8222
8258
|
size: 14
|
|
8223
|
-
}) : t.icon ? /* @__PURE__ */ p(
|
|
8259
|
+
}) : t.icon ? /* @__PURE__ */ p(H, {
|
|
8224
8260
|
name: t.icon,
|
|
8225
8261
|
size: 14
|
|
8226
8262
|
}) : n + 1;
|
|
@@ -8305,7 +8341,7 @@ function Jr({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
8305
8341
|
children: [
|
|
8306
8342
|
/* @__PURE__ */ p("span", {
|
|
8307
8343
|
className: "tbl-empty-icon",
|
|
8308
|
-
children:
|
|
8344
|
+
children: U(e, { size: 24 })
|
|
8309
8345
|
}),
|
|
8310
8346
|
/* @__PURE__ */ p("div", {
|
|
8311
8347
|
className: "tbl-empty-title",
|
|
@@ -8447,7 +8483,7 @@ function Zr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8447
8483
|
className: "app-tab-img",
|
|
8448
8484
|
src: e.image,
|
|
8449
8485
|
alt: e.imageAlt ?? ""
|
|
8450
|
-
}) :
|
|
8486
|
+
}) : U(e.icon, {
|
|
8451
8487
|
size: 16,
|
|
8452
8488
|
className: "app-tab-icon"
|
|
8453
8489
|
}),
|
|
@@ -8478,7 +8514,7 @@ function Zr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8478
8514
|
"aria-label": "Scroll tabs backward",
|
|
8479
8515
|
tabIndex: -1,
|
|
8480
8516
|
onClick: () => F(-1),
|
|
8481
|
-
children: /* @__PURE__ */ p(
|
|
8517
|
+
children: /* @__PURE__ */ p(H, {
|
|
8482
8518
|
name: "chevron-left",
|
|
8483
8519
|
size: 16
|
|
8484
8520
|
})
|
|
@@ -8490,7 +8526,7 @@ function Zr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8490
8526
|
"aria-label": "Scroll tabs forward",
|
|
8491
8527
|
tabIndex: -1,
|
|
8492
8528
|
onClick: () => F(1),
|
|
8493
|
-
children: /* @__PURE__ */ p(
|
|
8529
|
+
children: /* @__PURE__ */ p(H, {
|
|
8494
8530
|
name: "chevron-right",
|
|
8495
8531
|
size: 16
|
|
8496
8532
|
})
|
|
@@ -8622,30 +8658,30 @@ var Qr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8622
8658
|
skipped: "arrow-right",
|
|
8623
8659
|
upcoming: null
|
|
8624
8660
|
};
|
|
8625
|
-
function ti({ items: e = [], variant: t = "feed",
|
|
8626
|
-
N("AppTimeline",
|
|
8627
|
-
let
|
|
8661
|
+
function ti({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
8662
|
+
N("AppTimeline", o);
|
|
8663
|
+
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;
|
|
8628
8664
|
return /* @__PURE__ */ p("ol", {
|
|
8629
|
-
className:
|
|
8630
|
-
style:
|
|
8631
|
-
...
|
|
8632
|
-
"--wui-timeline-dot": `${
|
|
8633
|
-
} :
|
|
8634
|
-
...
|
|
8665
|
+
className: c,
|
|
8666
|
+
style: l ? {
|
|
8667
|
+
...a,
|
|
8668
|
+
"--wui-timeline-dot": `${l}px`
|
|
8669
|
+
} : a,
|
|
8670
|
+
...o,
|
|
8635
8671
|
children: e.map((e, t) => {
|
|
8636
|
-
let n =
|
|
8672
|
+
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ? ei[n] : void 0) : e.icon || "circle";
|
|
8637
8673
|
return /* @__PURE__ */ m("li", {
|
|
8638
8674
|
className: `timeline-item${r}${i}`,
|
|
8639
8675
|
children: [/* @__PURE__ */ p("span", {
|
|
8640
8676
|
className: "timeline-dot",
|
|
8641
|
-
children: a ? /* @__PURE__ */ p(
|
|
8677
|
+
children: a ? /* @__PURE__ */ p(H, {
|
|
8642
8678
|
name: a,
|
|
8643
|
-
size:
|
|
8679
|
+
size: u
|
|
8644
8680
|
}) : null
|
|
8645
8681
|
}), /* @__PURE__ */ m("div", {
|
|
8646
8682
|
className: "timeline-body",
|
|
8647
8683
|
children: [
|
|
8648
|
-
|
|
8684
|
+
s ? /* @__PURE__ */ m("div", {
|
|
8649
8685
|
className: "timeline-head",
|
|
8650
8686
|
children: [/* @__PURE__ */ p("div", {
|
|
8651
8687
|
className: "timeline-title",
|
|
@@ -8662,7 +8698,7 @@ function ti({ items: e = [], variant: t = "feed", size: n, className: r = "", st
|
|
|
8662
8698
|
className: "timeline-desc",
|
|
8663
8699
|
children: e.description
|
|
8664
8700
|
}),
|
|
8665
|
-
!
|
|
8701
|
+
!s && (e.at || e.by) && /* @__PURE__ */ m("div", {
|
|
8666
8702
|
className: "timeline-meta",
|
|
8667
8703
|
children: [e.at && /* @__PURE__ */ p("span", {
|
|
8668
8704
|
className: "timeline-at",
|
|
@@ -8672,7 +8708,7 @@ function ti({ items: e = [], variant: t = "feed", size: n, className: r = "", st
|
|
|
8672
8708
|
children: e.by
|
|
8673
8709
|
})]
|
|
8674
8710
|
}),
|
|
8675
|
-
|
|
8711
|
+
s && e.by && /* @__PURE__ */ p("div", {
|
|
8676
8712
|
className: "timeline-meta",
|
|
8677
8713
|
children: /* @__PURE__ */ p("span", {
|
|
8678
8714
|
className: "timeline-by",
|
|
@@ -8894,7 +8930,7 @@ function xi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
8894
8930
|
/* @__PURE__ */ p("span", {
|
|
8895
8931
|
className: "wui-toast-icon",
|
|
8896
8932
|
"aria-hidden": "true",
|
|
8897
|
-
children: /* @__PURE__ */ p(
|
|
8933
|
+
children: /* @__PURE__ */ p(H, {
|
|
8898
8934
|
name: i.icon,
|
|
8899
8935
|
size: 20
|
|
8900
8936
|
})
|
|
@@ -8984,7 +9020,7 @@ function Si({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
8984
9020
|
}),
|
|
8985
9021
|
/* @__PURE__ */ p("span", {
|
|
8986
9022
|
className: "toolbar-item-icon",
|
|
8987
|
-
children:
|
|
9023
|
+
children: U(e.icon, { size: 16 })
|
|
8988
9024
|
}),
|
|
8989
9025
|
/* @__PURE__ */ p("span", {
|
|
8990
9026
|
className: "toolbar-item-label",
|
|
@@ -9004,7 +9040,7 @@ function Si({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
9004
9040
|
onClick: e.onClick,
|
|
9005
9041
|
children: /* @__PURE__ */ p("span", {
|
|
9006
9042
|
className: "toolbar-item-icon",
|
|
9007
|
-
children:
|
|
9043
|
+
children: U(e.icon, { size: 16 })
|
|
9008
9044
|
})
|
|
9009
9045
|
}, e.key ?? `${e.title}-${t}`))
|
|
9010
9046
|
]
|
|
@@ -9109,7 +9145,7 @@ function wi({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9109
9145
|
}) : null,
|
|
9110
9146
|
s ? /* @__PURE__ */ m("div", {
|
|
9111
9147
|
className: "workspace-switcher-search",
|
|
9112
|
-
children: [/* @__PURE__ */ p(
|
|
9148
|
+
children: [/* @__PURE__ */ p(H, {
|
|
9113
9149
|
name: "search",
|
|
9114
9150
|
size: 14
|
|
9115
9151
|
}), /* @__PURE__ */ p("input", {
|
|
@@ -9139,7 +9175,7 @@ function wi({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9139
9175
|
className: "workspace-switcher-badge",
|
|
9140
9176
|
children: e.badge
|
|
9141
9177
|
}) : null,
|
|
9142
|
-
e.id === O?.id ? /* @__PURE__ */ p(
|
|
9178
|
+
e.id === O?.id ? /* @__PURE__ */ p(H, {
|
|
9143
9179
|
name: "check",
|
|
9144
9180
|
size: 16,
|
|
9145
9181
|
className: "workspace-switcher-tick"
|
|
@@ -9155,7 +9191,7 @@ function wi({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9155
9191
|
type: "button",
|
|
9156
9192
|
className: "workspace-switcher-create",
|
|
9157
9193
|
onClick: () => c?.(),
|
|
9158
|
-
children: [/* @__PURE__ */ p(
|
|
9194
|
+
children: [/* @__PURE__ */ p(H, {
|
|
9159
9195
|
name: "plus",
|
|
9160
9196
|
size: 16
|
|
9161
9197
|
}), h]
|
|
@@ -9189,7 +9225,7 @@ function Di(e, t) {
|
|
|
9189
9225
|
return /* @__PURE__ */ m(i ? t ?? "a" : "button", {
|
|
9190
9226
|
className: "workspace-switcher-footer-action",
|
|
9191
9227
|
...i ? t ? { to: i } : { href: i } : { type: "button" },
|
|
9192
|
-
children: [r ? /* @__PURE__ */ p(
|
|
9228
|
+
children: [r ? /* @__PURE__ */ p(H, {
|
|
9193
9229
|
name: r,
|
|
9194
9230
|
size: 16
|
|
9195
9231
|
}) : null, n]
|
|
@@ -9206,7 +9242,7 @@ var Oi = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9206
9242
|
children: [/* @__PURE__ */ p(Ei, { tenant: t }), e ? null : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
9207
9243
|
className: "workspace-switcher-trigger-name",
|
|
9208
9244
|
children: t?.name
|
|
9209
|
-
}), /* @__PURE__ */ p(
|
|
9245
|
+
}), /* @__PURE__ */ p(H, {
|
|
9210
9246
|
name: "chevrons-up-down",
|
|
9211
9247
|
size: 16,
|
|
9212
9248
|
className: "workspace-switcher-chevron"
|
|
@@ -9280,4 +9316,4 @@ function Ni(e, t = 10) {
|
|
|
9280
9316
|
};
|
|
9281
9317
|
}
|
|
9282
9318
|
//#endregion
|
|
9283
|
-
export {
|
|
9319
|
+
export { ae as ActionIcon, oe as AppAccordion, le as AppAlert, he as AppAsyncBlock, Wt as AppAutocomplete, Xt as AppAvatar, $t as AppAvatarGroup, nn as AppBadge, an as AppBanner, on as AppBreadcrumbs, W as AppButton, cn as AppCallout, un as AppCard, fn as AppCheckbox, pn as AppChip, mn as AppChoiceCard, hn as AppChoiceChip, gn as AppColorField, _n as AppCompareTable, En as AppConfirmDialog, On as AppCopyButton, Rn as AppDataTable, zn as AppDatePicker, Bn as AppDateRangePicker, Hn as AppDescriptions, Gn as AppDropdown, pe as AppEmptyState, Qn as AppFileAttachment, er as AppFilePicker, tr as AppFloatingDock, nr as AppFormActions, rr as AppFormRow, ir as AppFormSection, H as AppIcon, ar as AppInfoList, Ft as AppInfoTip, vn as AppInput, ur as AppKpiTile, fr as AppLogoPicker, gr as AppMeter, Cn as AppModal, _r as AppMultiSelect, vr as AppNumberInput, yr as AppOtpInput, br as AppPageHeader, xr as AppPagination, Sr as AppPhoneNumberInput, Pt as AppPopover, Cr as AppPricingCard, Er as AppProgress, Dr as AppRadio, Or as AppRepeater, kr as AppResourceCard, jr as AppResult, Mr as AppScrollbar, Nr as AppSearch, Pr as AppSegmented, Ir as AppSelect, Nn as AppSelectMini, Lr as AppShell, Br as AppSidebarMenu, kn as AppSkeleton, An as AppSkeletonRows, Vr as AppSlider, me as AppSpinner, Ur as AppSplash, Wr as AppStatusBadge, Gr as AppStepper, qr as AppSwitch, Jr as AppTableEmptyState, Fn as AppTablePagination, Zr as AppTabs, Qr as AppTagInput, $r as AppTextarea, ni as AppTimePicker, ti as AppTimeline, bi as AppToast, bi as AppToastContainer, Si as AppToolbar, Xr as AppTooltip, Ci as AppWizard, wi as AppWorkspaceSwitcher, Tn as MODAL_ICONS, Z as RequiredMark, ki as dismissAll, Mi as errorToast, ne as iconNames, ie as registerIcons, ji as toast, Ni as usePagination };
|