@candy.thieves/ui-kit-lumos 0.0.69 → 0.0.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -48,13 +48,13 @@ var E = (e, t) => {
|
|
|
48
48
|
if (e.length <= t) return e;
|
|
49
49
|
let n = e.slice(0, t), r = n.lastIndexOf(" ");
|
|
50
50
|
return r === -1 ? `${n}...` : `${n.slice(0, r)}...`;
|
|
51
|
-
},
|
|
51
|
+
}, D = {
|
|
52
52
|
error: "var(--color-danger-500)",
|
|
53
53
|
inherit: "currentColor",
|
|
54
54
|
primary: "var(--color-accent-500)",
|
|
55
55
|
success: "var(--color-success-500)",
|
|
56
56
|
warning: "var(--color-warning-500)"
|
|
57
|
-
},
|
|
57
|
+
}, te = [
|
|
58
58
|
8,
|
|
59
59
|
11,
|
|
60
60
|
15,
|
|
@@ -136,32 +136,32 @@ var E = (e, t) => {
|
|
|
136
136
|
17,
|
|
137
137
|
13,
|
|
138
138
|
10
|
|
139
|
-
],
|
|
139
|
+
], ne = {
|
|
140
140
|
ENABLED: 0,
|
|
141
141
|
DISABLED: -1
|
|
142
|
-
},
|
|
143
|
-
let r =
|
|
144
|
-
return i > a ? new Date(Math.min(Math.max(r.getTime(),
|
|
145
|
-
},
|
|
146
|
-
let r =
|
|
147
|
-
return r >
|
|
142
|
+
}, O = (e) => e in D, k = (e) => e ? e.charAt(0).toUpperCase() : "?", re = (e) => e.type === "audio" && "component" in e, A = (e) => `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`, j = (e) => e.flatMap((e) => e.type === "group" ? e.options : e.type === "separator" ? [] : e), M = 6, N = 1900, ie = 2100, P = new Date(N, 0, 1), F = new Date(ie, 11, 31), I = new Intl.DateTimeFormat("en-GB"), L = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), ae = (e) => new Date(e.getFullYear(), e.getMonth(), 1), oe = (e, t, n) => {
|
|
143
|
+
let r = L(e), i = t ? new Date(Math.max(L(t).getTime(), P.getTime())) : P, a = n ? new Date(Math.min(L(n).getTime(), F.getTime())) : F;
|
|
144
|
+
return i > a ? new Date(Math.min(Math.max(r.getTime(), P.getTime()), F.getTime())) : r < i ? i : r > a ? a : r;
|
|
145
|
+
}, se = (e, t) => L(e).getTime() === L(t).getTime(), ce = (e, t, n) => {
|
|
146
|
+
let r = L(e).getTime();
|
|
147
|
+
return r > L(t).getTime() && r < L(n).getTime();
|
|
148
148
|
}, le = (e) => {
|
|
149
|
-
let t =
|
|
150
|
-
return r.setDate(t.getDate() - n), Array.from({ length: 7 *
|
|
149
|
+
let t = ae(e), n = (t.getDay() + 7 - 1) % 7, r = new Date(t);
|
|
150
|
+
return r.setDate(t.getDate() - n), Array.from({ length: 7 * M }, (e, t) => {
|
|
151
151
|
let n = new Date(r);
|
|
152
152
|
return n.setDate(r.getDate() + t), n;
|
|
153
153
|
});
|
|
154
154
|
}, ue = (e) => e instanceof Date ? { start: e } : e ?? {}, de = (e, t) => {
|
|
155
155
|
if (!e) return "";
|
|
156
|
-
if (t === "single") return e instanceof Date ?
|
|
156
|
+
if (t === "single") return e instanceof Date ? I.format(e) : e.start ? I.format(e.start) : "";
|
|
157
157
|
let { end: n, start: r } = ue(e);
|
|
158
|
-
return r ? n ? `${
|
|
159
|
-
}, fe = (e) => e.getFullYear() >=
|
|
158
|
+
return r ? n ? `${I.format(r)} - ${I.format(n)}` : I.format(r) : "";
|
|
159
|
+
}, fe = (e) => e.getFullYear() >= N && e.getFullYear() <= ie, pe = Array.from({ length: 12 }, (e, t) => ({
|
|
160
160
|
label: new Intl.DateTimeFormat("en", { month: "long" }).format(new Date(2026, t, 1)),
|
|
161
161
|
value: String(t)
|
|
162
162
|
})), me = Array.from({ length: 201 }, (e, t) => ({
|
|
163
|
-
label: String(
|
|
164
|
-
value: String(
|
|
163
|
+
label: String(N + t),
|
|
164
|
+
value: String(N + t)
|
|
165
165
|
})), he = (e) => {
|
|
166
166
|
let { fill: t } = e;
|
|
167
167
|
return /* @__PURE__ */ u("svg", {
|
|
@@ -3434,49 +3434,53 @@ var R = {
|
|
|
3434
3434
|
});
|
|
3435
3435
|
pi.displayName = "ButtonLegacy";
|
|
3436
3436
|
var mi = {
|
|
3437
|
-
trigger: "
|
|
3438
|
-
content: "
|
|
3439
|
-
item: "
|
|
3440
|
-
itemIcon: "
|
|
3441
|
-
itemLabel: "
|
|
3442
|
-
}, hi = ({ ariaLabel: e, className: t, contentClassName: n, contentProps: r, itemClassName: i, items: a,
|
|
3443
|
-
let { align:
|
|
3437
|
+
trigger: "_trigger_1vq4m_55",
|
|
3438
|
+
content: "_content_1vq4m_75",
|
|
3439
|
+
item: "_item_1vq4m_86",
|
|
3440
|
+
itemIcon: "_itemIcon_1vq4m_108",
|
|
3441
|
+
itemLabel: "_itemLabel_1vq4m_116"
|
|
3442
|
+
}, hi = ({ ariaLabel: e, className: t, contentClassName: n, contentProps: r, itemClassName: i, items: a, linkTag: o = "a", modal: s = !0, portalProps: c, trigger: p, triggerClassName: m, ...h }) => {
|
|
3443
|
+
let { align: _ = "end", className: v, side: y = "bottom", sideOffset: b = 6, ...x } = r ?? {};
|
|
3444
3444
|
return /* @__PURE__ */ d(g.Root, {
|
|
3445
|
-
modal:
|
|
3446
|
-
...
|
|
3445
|
+
modal: s,
|
|
3446
|
+
...h,
|
|
3447
3447
|
children: [/* @__PURE__ */ u(g.Trigger, {
|
|
3448
3448
|
asChild: !0,
|
|
3449
|
-
children:
|
|
3449
|
+
children: p ?? /* @__PURE__ */ u(z, {
|
|
3450
3450
|
type: "button",
|
|
3451
3451
|
variant: "text",
|
|
3452
|
-
className: f(mi.trigger,
|
|
3452
|
+
className: f(mi.trigger, m),
|
|
3453
3453
|
"aria-label": e,
|
|
3454
3454
|
children: /* @__PURE__ */ u(On, { size: 24 })
|
|
3455
3455
|
})
|
|
3456
3456
|
}), /* @__PURE__ */ u(g.Portal, {
|
|
3457
|
-
...
|
|
3457
|
+
...c,
|
|
3458
3458
|
children: /* @__PURE__ */ u(g.Content, {
|
|
3459
|
-
className: f(mi.content, t, n,
|
|
3460
|
-
side:
|
|
3461
|
-
align:
|
|
3462
|
-
sideOffset:
|
|
3463
|
-
...
|
|
3459
|
+
className: f(mi.content, t, n, v),
|
|
3460
|
+
side: y,
|
|
3461
|
+
align: _,
|
|
3462
|
+
sideOffset: b,
|
|
3463
|
+
...x,
|
|
3464
3464
|
children: a.map((e) => {
|
|
3465
|
-
let { className: t, ...n } = e.itemProps ?? {}
|
|
3466
|
-
|
|
3465
|
+
let { className: t, ...n } = e.itemProps ?? {}, r = e.disabled ? void 0 : e.href, a = /* @__PURE__ */ d(l, { children: [e.icon && /* @__PURE__ */ u("span", {
|
|
3466
|
+
className: mi.itemIcon,
|
|
3467
|
+
"aria-hidden": !0,
|
|
3468
|
+
children: e.icon
|
|
3469
|
+
}), /* @__PURE__ */ u("span", {
|
|
3470
|
+
className: mi.itemLabel,
|
|
3471
|
+
children: e.label
|
|
3472
|
+
})] });
|
|
3473
|
+
return /* @__PURE__ */ u(g.Item, {
|
|
3474
|
+
asChild: !!r,
|
|
3467
3475
|
disabled: e.disabled,
|
|
3468
3476
|
textValue: e.textValue,
|
|
3469
3477
|
className: f(mi.item, "typography-body1", i, t),
|
|
3470
3478
|
onSelect: e.onSelect,
|
|
3471
3479
|
...n,
|
|
3472
|
-
children:
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
}), /* @__PURE__ */ u("span", {
|
|
3477
|
-
className: mi.itemLabel,
|
|
3478
|
-
children: e.label
|
|
3479
|
-
})]
|
|
3480
|
+
children: r ? /* @__PURE__ */ u(o, {
|
|
3481
|
+
href: r,
|
|
3482
|
+
children: a
|
|
3483
|
+
}) : a
|
|
3480
3484
|
}, e.id);
|
|
3481
3485
|
})
|
|
3482
3486
|
})
|
|
@@ -3492,7 +3496,7 @@ var mi = {
|
|
|
3492
3496
|
footer: "_footer_m53un_110",
|
|
3493
3497
|
currentTime: "_currentTime_m53un_117",
|
|
3494
3498
|
divider: "_divider_m53un_121"
|
|
3495
|
-
}, gi = ({ src: e, waveform: t =
|
|
3499
|
+
}, gi = ({ src: e, waveform: t = te, className: n }) => {
|
|
3496
3500
|
let r = s(null), [i, a] = c(!1), [o, p] = c(0), [m, h] = c(0), [g, _] = c(0), v = Math.floor(o * t.length);
|
|
3497
3501
|
return /* @__PURE__ */ d("div", {
|
|
3498
3502
|
className: f(B.audio, n),
|
|
@@ -3540,14 +3544,14 @@ var mi = {
|
|
|
3540
3544
|
color: "var(--color-accent-100)",
|
|
3541
3545
|
variant: "caption1",
|
|
3542
3546
|
className: B.currentTime,
|
|
3543
|
-
children:
|
|
3547
|
+
children: A(m)
|
|
3544
3548
|
}), /* @__PURE__ */ u("span", {
|
|
3545
3549
|
className: B.divider,
|
|
3546
3550
|
children: "/"
|
|
3547
3551
|
})] }), /* @__PURE__ */ u(G, {
|
|
3548
3552
|
color: "var(--color-accent-100)",
|
|
3549
3553
|
variant: "caption1",
|
|
3550
|
-
children:
|
|
3554
|
+
children: A(g)
|
|
3551
3555
|
})]
|
|
3552
3556
|
})]
|
|
3553
3557
|
})
|
|
@@ -3578,7 +3582,7 @@ var mi = {
|
|
|
3578
3582
|
"modal-m": "_modal-m_1hp8k_209",
|
|
3579
3583
|
"modal-xl": "_modal-xl_1hp8k_213"
|
|
3580
3584
|
}, _i = t(({ src: e, alt: t, userName: n, delayMs: r = 600, size: i = "s", className: a, ...o }, s) => {
|
|
3581
|
-
let c =
|
|
3585
|
+
let c = k(n);
|
|
3582
3586
|
return /* @__PURE__ */ d(h.Root, {
|
|
3583
3587
|
ref: s,
|
|
3584
3588
|
className: f(V.root, V[i], a),
|
|
@@ -3794,7 +3798,7 @@ var Ei = {
|
|
|
3794
3798
|
md: "_md_8arkn_68",
|
|
3795
3799
|
lg: "_lg_8arkn_74"
|
|
3796
3800
|
}, Di = t(({ className: e, size: t = "md", color: n = "primary", style: r, ...i }, a) => {
|
|
3797
|
-
let o =
|
|
3801
|
+
let o = O(n) ? D[n] : n;
|
|
3798
3802
|
return /* @__PURE__ */ u("span", {
|
|
3799
3803
|
ref: a,
|
|
3800
3804
|
"aria-label": "Loading",
|
|
@@ -3825,9 +3829,9 @@ var U = {
|
|
|
3825
3829
|
separator: "_separator_uj5q7_170",
|
|
3826
3830
|
item: "_item_uj5q7_113"
|
|
3827
3831
|
}, Oi = t(({ className: e, contentClassName: t, contentProps: n, defaultValue: r, groupLabelClassName: i, iconProps: o, itemClassName: s, label: l, labelProps: p, onValueChange: m, options: h, placeholder: g = "Select-box", portalProps: v, separatorClassName: y, triggerIcon: b, triggerProps: x, valueProps: S, value: C, viewportProps: w, ...T }, ee) => {
|
|
3828
|
-
let E = a(), [
|
|
3829
|
-
|
|
3830
|
-
}, { className:
|
|
3832
|
+
let E = a(), [D, te] = c(r), ne = C ?? D, O = j(h).find((e) => e.value === ne), k = x?.id ?? `select-${E}`, re = (e) => {
|
|
3833
|
+
te(e), m?.(e);
|
|
3834
|
+
}, { className: A, ...M } = x ?? {}, { className: N, ...ie } = p ?? {}, { children: P, className: F, ...I } = o ?? {}, { className: L, position: ae = "popper", sideOffset: oe = -1, ...se } = n ?? {}, { className: ce, ...le } = w ?? {}, ue = (e) => {
|
|
3831
3835
|
let { className: t, ...n } = e.itemProps ?? {};
|
|
3832
3836
|
return /* @__PURE__ */ d(_.Item, {
|
|
3833
3837
|
value: e.value,
|
|
@@ -3857,46 +3861,46 @@ var U = {
|
|
|
3857
3861
|
...T,
|
|
3858
3862
|
defaultValue: r,
|
|
3859
3863
|
value: C,
|
|
3860
|
-
onValueChange:
|
|
3864
|
+
onValueChange: re,
|
|
3861
3865
|
children: [
|
|
3862
3866
|
l && /* @__PURE__ */ u("label", {
|
|
3863
|
-
htmlFor:
|
|
3864
|
-
className: f(U.label, "typography-body1",
|
|
3865
|
-
...
|
|
3867
|
+
htmlFor: k,
|
|
3868
|
+
className: f(U.label, "typography-body1", N),
|
|
3869
|
+
...ie,
|
|
3866
3870
|
children: l
|
|
3867
3871
|
}),
|
|
3868
3872
|
/* @__PURE__ */ d(_.Trigger, {
|
|
3869
3873
|
ref: ee,
|
|
3870
|
-
id:
|
|
3871
|
-
className: f(U.trigger, "typography-subtitle1", l && U.hasLabel, e,
|
|
3872
|
-
...
|
|
3874
|
+
id: k,
|
|
3875
|
+
className: f(U.trigger, "typography-subtitle1", l && U.hasLabel, e, A),
|
|
3876
|
+
...M,
|
|
3873
3877
|
children: [/* @__PURE__ */ u("span", {
|
|
3874
3878
|
className: U.textBlock,
|
|
3875
3879
|
children: /* @__PURE__ */ d("span", {
|
|
3876
3880
|
className: U.valueRow,
|
|
3877
|
-
children: [
|
|
3881
|
+
children: [O?.icon && /* @__PURE__ */ u("span", {
|
|
3878
3882
|
className: U.startIcon,
|
|
3879
3883
|
"aria-hidden": !0,
|
|
3880
|
-
children:
|
|
3884
|
+
children: O.icon
|
|
3881
3885
|
}), /* @__PURE__ */ u(_.Value, {
|
|
3882
3886
|
placeholder: g,
|
|
3883
3887
|
...S
|
|
3884
3888
|
})]
|
|
3885
3889
|
})
|
|
3886
3890
|
}), /* @__PURE__ */ u(_.Icon, {
|
|
3887
|
-
className: f(U.icon,
|
|
3891
|
+
className: f(U.icon, F),
|
|
3888
3892
|
"aria-hidden": !0,
|
|
3889
|
-
...
|
|
3890
|
-
children: b ??
|
|
3893
|
+
...I,
|
|
3894
|
+
children: b ?? P ?? /* @__PURE__ */ u("span", {})
|
|
3891
3895
|
})]
|
|
3892
3896
|
}),
|
|
3893
3897
|
/* @__PURE__ */ u(_.Portal, {
|
|
3894
3898
|
...v,
|
|
3895
3899
|
children: /* @__PURE__ */ u(_.Content, {
|
|
3896
|
-
className: f(U.content, t,
|
|
3897
|
-
position:
|
|
3898
|
-
sideOffset:
|
|
3899
|
-
...
|
|
3900
|
+
className: f(U.content, t, L),
|
|
3901
|
+
position: ae,
|
|
3902
|
+
sideOffset: oe,
|
|
3903
|
+
...se,
|
|
3900
3904
|
children: /* @__PURE__ */ u(_.Viewport, {
|
|
3901
3905
|
className: f(U.viewport, ce),
|
|
3902
3906
|
...le,
|
|
@@ -3966,20 +3970,20 @@ var W = {
|
|
|
3966
3970
|
month: "long",
|
|
3967
3971
|
year: "numeric"
|
|
3968
3972
|
}), Ai = ({ date: e, disabled: t, displayedMonth: n, focusedDate: r, mode: i, onFocus: a, onSelect: o, selectedRange: s, selectedValue: c }) => {
|
|
3969
|
-
let l = e.getMonth() === n.getMonth(), d = e.getDay() === 0 || e.getDay() === 6, p = i === "single" && c instanceof Date &&
|
|
3973
|
+
let l = e.getMonth() === n.getMonth(), d = e.getDay() === 0 || e.getDay() === 6, p = i === "single" && c instanceof Date && se(e, c), m = i === "range" && !!s.start && se(e, s.start), h = i === "range" && !!s.end && se(e, s.end), g = i === "range" && !!s.start && !!s.end && ce(e, s.start, s.end);
|
|
3970
3974
|
return /* @__PURE__ */ u("div", {
|
|
3971
3975
|
role: "gridcell",
|
|
3972
3976
|
"aria-selected": p || m || h,
|
|
3973
3977
|
children: /* @__PURE__ */ u(z, {
|
|
3974
3978
|
type: "button",
|
|
3975
|
-
"data-date":
|
|
3979
|
+
"data-date": L(e).getTime(),
|
|
3976
3980
|
disabled: t,
|
|
3977
|
-
tabIndex:
|
|
3981
|
+
tabIndex: se(e, r) ? 0 : -1,
|
|
3978
3982
|
"aria-label": ki.format(e),
|
|
3979
3983
|
variant: "text",
|
|
3980
3984
|
className: f(W.day, "typography-subtitle1", !l && W.otherMonth, d && W.weekend, (p || m || h) && W.selected, g && W.inRange, m && W.rangeStart, h && W.rangeEnd),
|
|
3981
3985
|
onClick: () => o(e),
|
|
3982
|
-
onFocus: () => a(
|
|
3986
|
+
onFocus: () => a(L(e)),
|
|
3983
3987
|
children: /* @__PURE__ */ u("span", { children: e.getDate() })
|
|
3984
3988
|
})
|
|
3985
3989
|
});
|
|
@@ -3995,62 +3999,62 @@ var W = {
|
|
|
3995
3999
|
month: "long",
|
|
3996
4000
|
year: "numeric"
|
|
3997
4001
|
}), Pi = ({ className: e, clearable: t = !1, defaultValue: n, disabled: o, error: l, label: p, maxDate: m, minDate: h, mode: g = "single", onChange: _, onClick: v, value: y, ...b }) => {
|
|
3998
|
-
let x = `date-picker-${a()}`, S = `${x}-error`, C = s(null), w = s(null), [T, ee] = c(null), [E,
|
|
4002
|
+
let x = `date-picker-${a()}`, S = `${x}-error`, C = s(null), w = s(null), [T, ee] = c(null), [E, D] = c(!1), [te, ne] = c(n), O = y ?? te, k = ue(O), re = g === "range" ? k.start : O instanceof Date ? O : k.start, [A, j] = c(() => ae(re ?? /* @__PURE__ */ new Date())), [M, N] = c(() => oe(re ?? /* @__PURE__ */ new Date(), h, m)), ie = r((e) => {
|
|
3999
4003
|
C.current = e, ee(e);
|
|
4000
|
-
}, []),
|
|
4001
|
-
|
|
4004
|
+
}, []), P = (e = !1) => {
|
|
4005
|
+
D(!1), e && window.requestAnimationFrame(() => w.current?.focus());
|
|
4002
4006
|
};
|
|
4003
4007
|
i(() => {
|
|
4004
4008
|
let e = (e) => {
|
|
4005
|
-
C.current?.contains(e.target) ||
|
|
4009
|
+
C.current?.contains(e.target) || P();
|
|
4006
4010
|
};
|
|
4007
4011
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
4008
4012
|
}, []), i(() => {
|
|
4009
|
-
E && C.current?.querySelector(`[data-date="${
|
|
4013
|
+
E && C.current?.querySelector(`[data-date="${M.getTime()}"]`)?.focus();
|
|
4010
4014
|
}, [
|
|
4011
|
-
|
|
4012
|
-
|
|
4015
|
+
A,
|
|
4016
|
+
M,
|
|
4013
4017
|
E
|
|
4014
4018
|
]);
|
|
4015
|
-
let
|
|
4016
|
-
y === void 0 &&
|
|
4017
|
-
},
|
|
4018
|
-
let t =
|
|
4019
|
-
|
|
4019
|
+
let F = (e) => {
|
|
4020
|
+
y === void 0 && ne(e), _?.(e);
|
|
4021
|
+
}, I = (e) => o || !fe(e) || !!h && e < L(h) || !!m && e > L(m), ce = (e) => {
|
|
4022
|
+
let t = L(e);
|
|
4023
|
+
N(t), j(ae(t));
|
|
4020
4024
|
}, he = (e) => {
|
|
4021
4025
|
if (g === "single") {
|
|
4022
|
-
|
|
4026
|
+
F(e), P(!0);
|
|
4023
4027
|
return;
|
|
4024
4028
|
}
|
|
4025
|
-
let { end: t, start: n } =
|
|
4029
|
+
let { end: t, start: n } = k, r = L(e);
|
|
4026
4030
|
if (!n || t) {
|
|
4027
|
-
|
|
4031
|
+
F({ start: r }), N(r);
|
|
4028
4032
|
return;
|
|
4029
4033
|
}
|
|
4030
|
-
let i =
|
|
4031
|
-
|
|
4034
|
+
let i = L(n);
|
|
4035
|
+
F(r < i ? {
|
|
4032
4036
|
end: i,
|
|
4033
4037
|
start: r
|
|
4034
4038
|
} : {
|
|
4035
4039
|
end: r,
|
|
4036
4040
|
start: i
|
|
4037
|
-
}),
|
|
4041
|
+
}), P(!0);
|
|
4038
4042
|
}, ge = (e) => {
|
|
4039
|
-
let t = le(
|
|
4040
|
-
!fe(t) ||
|
|
4043
|
+
let t = le(A), n = t.findIndex((e) => se(e, M)), r = (t) => {
|
|
4044
|
+
!fe(t) || I(t) || (e.preventDefault(), ce(t));
|
|
4041
4045
|
};
|
|
4042
4046
|
switch (e.key) {
|
|
4043
4047
|
case "ArrowDown":
|
|
4044
|
-
r(new Date(
|
|
4048
|
+
r(new Date(M.getFullYear(), M.getMonth(), M.getDate() + 7));
|
|
4045
4049
|
break;
|
|
4046
4050
|
case "ArrowLeft":
|
|
4047
|
-
r(new Date(
|
|
4051
|
+
r(new Date(M.getFullYear(), M.getMonth(), M.getDate() - 1));
|
|
4048
4052
|
break;
|
|
4049
4053
|
case "ArrowRight":
|
|
4050
|
-
r(new Date(
|
|
4054
|
+
r(new Date(M.getFullYear(), M.getMonth(), M.getDate() + 1));
|
|
4051
4055
|
break;
|
|
4052
4056
|
case "ArrowUp":
|
|
4053
|
-
r(new Date(
|
|
4057
|
+
r(new Date(M.getFullYear(), M.getMonth(), M.getDate() - 7));
|
|
4054
4058
|
break;
|
|
4055
4059
|
case "End":
|
|
4056
4060
|
r(t[Math.min(Math.ceil((n + 1) / 7) * 7 - 1, t.length - 1)]);
|
|
@@ -4059,16 +4063,16 @@ var W = {
|
|
|
4059
4063
|
r(t[Math.floor(n / 7) * 7]);
|
|
4060
4064
|
break;
|
|
4061
4065
|
case "PageDown":
|
|
4062
|
-
r(new Date(
|
|
4066
|
+
r(new Date(M.getFullYear() + +!!e.shiftKey, M.getMonth() + +!e.shiftKey, M.getDate()));
|
|
4063
4067
|
break;
|
|
4064
4068
|
case "PageUp":
|
|
4065
|
-
r(new Date(
|
|
4069
|
+
r(new Date(M.getFullYear() - +!!e.shiftKey, M.getMonth() - +!e.shiftKey, M.getDate()));
|
|
4066
4070
|
break;
|
|
4067
4071
|
default: break;
|
|
4068
4072
|
}
|
|
4069
|
-
}, _e = le(
|
|
4073
|
+
}, _e = le(A), ve = de(O, g), ye = new Date(A.getFullYear(), A.getMonth() - 1, 1), be = new Date(A.getFullYear(), A.getMonth() + 1, 1);
|
|
4070
4074
|
return /* @__PURE__ */ d("div", {
|
|
4071
|
-
ref:
|
|
4075
|
+
ref: ie,
|
|
4072
4076
|
className: f(W.wrapper, e),
|
|
4073
4077
|
children: [
|
|
4074
4078
|
p && /* @__PURE__ */ u("label", {
|
|
@@ -4092,10 +4096,10 @@ var W = {
|
|
|
4092
4096
|
className: f(W.trigger, "typography-subtitle1", l && W.error, o && W.disabled),
|
|
4093
4097
|
onClick: (e) => {
|
|
4094
4098
|
if (v?.(e), !E) {
|
|
4095
|
-
let e =
|
|
4096
|
-
|
|
4099
|
+
let e = oe(re ?? /* @__PURE__ */ new Date(), h, m);
|
|
4100
|
+
j(ae(e)), N(e);
|
|
4097
4101
|
}
|
|
4098
|
-
|
|
4102
|
+
D(!E);
|
|
4099
4103
|
},
|
|
4100
4104
|
children: [/* @__PURE__ */ u("span", {
|
|
4101
4105
|
className: f(W.value, !ve && W.placeholder),
|
|
@@ -4111,7 +4115,7 @@ var W = {
|
|
|
4111
4115
|
"aria-label": g === "range" ? "Clear date range" : "Clear date",
|
|
4112
4116
|
variant: "text",
|
|
4113
4117
|
onClick: () => {
|
|
4114
|
-
|
|
4118
|
+
F(void 0), P(!0);
|
|
4115
4119
|
},
|
|
4116
4120
|
children: /* @__PURE__ */ u(Se, {
|
|
4117
4121
|
autoSize: !1,
|
|
@@ -4130,7 +4134,7 @@ var W = {
|
|
|
4130
4134
|
role: "dialog",
|
|
4131
4135
|
"aria-label": g === "range" ? "Choose a date range" : "Choose a date",
|
|
4132
4136
|
onKeyDown: (e) => {
|
|
4133
|
-
e.key === "Escape" && (e.preventDefault(),
|
|
4137
|
+
e.key === "Escape" && (e.preventDefault(), P(!0));
|
|
4134
4138
|
},
|
|
4135
4139
|
children: [/* @__PURE__ */ d("div", {
|
|
4136
4140
|
className: W.header,
|
|
@@ -4141,18 +4145,18 @@ var W = {
|
|
|
4141
4145
|
contentClassName: W.monthYearContent,
|
|
4142
4146
|
options: pe,
|
|
4143
4147
|
portalProps: T ? { container: T } : void 0,
|
|
4144
|
-
value: String(
|
|
4148
|
+
value: String(A.getMonth()),
|
|
4145
4149
|
viewportProps: { className: W.monthViewport },
|
|
4146
|
-
onValueChange: (e) =>
|
|
4150
|
+
onValueChange: (e) => j((t) => new Date(t.getFullYear(), Number(e), 1)),
|
|
4147
4151
|
triggerProps: { "aria-label": "Month" }
|
|
4148
4152
|
}), /* @__PURE__ */ u(Oi, {
|
|
4149
4153
|
className: f(W.monthYearSelect, W.yearSelect),
|
|
4150
4154
|
contentClassName: W.monthYearContent,
|
|
4151
4155
|
options: me,
|
|
4152
4156
|
portalProps: T ? { container: T } : void 0,
|
|
4153
|
-
value: String(
|
|
4157
|
+
value: String(A.getFullYear()),
|
|
4154
4158
|
viewportProps: { className: W.yearViewport },
|
|
4155
|
-
onValueChange: (e) =>
|
|
4159
|
+
onValueChange: (e) => j((t) => new Date(Number(e), t.getMonth(), 1)),
|
|
4156
4160
|
triggerProps: { "aria-label": "Year" }
|
|
4157
4161
|
})]
|
|
4158
4162
|
}), /* @__PURE__ */ d("div", {
|
|
@@ -4162,7 +4166,7 @@ var W = {
|
|
|
4162
4166
|
className: W.navigationButton,
|
|
4163
4167
|
"aria-label": "Previous month",
|
|
4164
4168
|
disabled: !fe(ye),
|
|
4165
|
-
onClick: () =>
|
|
4169
|
+
onClick: () => j(ye),
|
|
4166
4170
|
variant: "text",
|
|
4167
4171
|
children: /* @__PURE__ */ u(Dt, {
|
|
4168
4172
|
autoSize: !1,
|
|
@@ -4173,7 +4177,7 @@ var W = {
|
|
|
4173
4177
|
className: W.navigationButton,
|
|
4174
4178
|
"aria-label": "Next month",
|
|
4175
4179
|
disabled: !fe(be),
|
|
4176
|
-
onClick: () =>
|
|
4180
|
+
onClick: () => j(be),
|
|
4177
4181
|
variant: "text",
|
|
4178
4182
|
children: /* @__PURE__ */ u(jt, {
|
|
4179
4183
|
autoSize: !1,
|
|
@@ -4184,7 +4188,7 @@ var W = {
|
|
|
4184
4188
|
}), /* @__PURE__ */ d("div", {
|
|
4185
4189
|
className: W.days,
|
|
4186
4190
|
role: "grid",
|
|
4187
|
-
"aria-label": Ni.format(
|
|
4191
|
+
"aria-label": Ni.format(A),
|
|
4188
4192
|
onKeyDown: ge,
|
|
4189
4193
|
children: [/* @__PURE__ */ u("div", {
|
|
4190
4194
|
className: W.weekdays,
|
|
@@ -4199,13 +4203,13 @@ var W = {
|
|
|
4199
4203
|
className: W.week,
|
|
4200
4204
|
children: _e.slice(t * 7, (t + 1) * 7).map((e) => /* @__PURE__ */ u(Ai, {
|
|
4201
4205
|
date: e,
|
|
4202
|
-
disabled:
|
|
4203
|
-
displayedMonth:
|
|
4204
|
-
focusedDate:
|
|
4206
|
+
disabled: I(e),
|
|
4207
|
+
displayedMonth: A,
|
|
4208
|
+
focusedDate: M,
|
|
4205
4209
|
mode: g,
|
|
4206
|
-
selectedRange:
|
|
4207
|
-
selectedValue:
|
|
4208
|
-
onFocus:
|
|
4210
|
+
selectedRange: k,
|
|
4211
|
+
selectedValue: O,
|
|
4212
|
+
onFocus: N,
|
|
4209
4213
|
onSelect: he
|
|
4210
4214
|
}, e.toISOString()))
|
|
4211
4215
|
}, t))]
|
|
@@ -4262,16 +4266,16 @@ var W = {
|
|
|
4262
4266
|
children: n
|
|
4263
4267
|
});
|
|
4264
4268
|
}, K = {
|
|
4265
|
-
header: "
|
|
4266
|
-
container: "
|
|
4267
|
-
logo: "
|
|
4268
|
-
logoLink: "
|
|
4269
|
-
actions: "
|
|
4270
|
-
notificationButton: "
|
|
4271
|
-
mobileMenuButton: "
|
|
4272
|
-
mobileMenu: "
|
|
4273
|
-
mobileMenuItem: "
|
|
4274
|
-
authActions: "
|
|
4269
|
+
header: "_header_10hvk_55",
|
|
4270
|
+
container: "_container_10hvk_23",
|
|
4271
|
+
logo: "_logo_10hvk_85",
|
|
4272
|
+
logoLink: "_logoLink_10hvk_89",
|
|
4273
|
+
actions: "_actions_10hvk_99",
|
|
4274
|
+
notificationButton: "_notificationButton_10hvk_106",
|
|
4275
|
+
mobileMenuButton: "_mobileMenuButton_10hvk_126",
|
|
4276
|
+
mobileMenu: "_mobileMenu_10hvk_126",
|
|
4277
|
+
mobileMenuItem: "_mobileMenuItem_10hvk_151",
|
|
4278
|
+
authActions: "_authActions_10hvk_158"
|
|
4275
4279
|
}, Li = ({ brandName: e = "Lumos", className: t, isAuthenticated: n = !0, logoHref: r = "/", logInLabel: i = "Log in", mobileAuthenticatedMenuItems: a, mobileMenuLabel: o = "Open menu", notificationCount: s = 0, notificationLabel: c = "Notifications", onLogInClick: l, onNotificationClick: p, onSignUpClick: m, signUpLabel: h = "Sign up", linkTag: g = "a", ..._ }) => {
|
|
4276
4280
|
let v = s > 0 ? `${c}, ${s} unread` : c, y = [{
|
|
4277
4281
|
id: "log-in",
|
|
@@ -4332,6 +4336,7 @@ var W = {
|
|
|
4332
4336
|
/* @__PURE__ */ u(hi, {
|
|
4333
4337
|
ariaLabel: o,
|
|
4334
4338
|
items: x,
|
|
4339
|
+
linkTag: g,
|
|
4335
4340
|
triggerClassName: K.mobileMenuButton,
|
|
4336
4341
|
contentClassName: K.mobileMenu
|
|
4337
4342
|
})
|
|
@@ -4403,7 +4408,7 @@ var zi = {
|
|
|
4403
4408
|
determinate: "_determinate_10gqv_84",
|
|
4404
4409
|
indeterminate: "_indeterminate_10gqv_95"
|
|
4405
4410
|
}, Bi = t(({ className: e, size: t = "md", color: n = "primary", value: r = 0, determinate: i = !1, ...a }, o) => {
|
|
4406
|
-
let s =
|
|
4411
|
+
let s = O(n) ? D[n] : n, c = Math.min(100, Math.max(0, r));
|
|
4407
4412
|
return /* @__PURE__ */ u("div", {
|
|
4408
4413
|
ref: o,
|
|
4409
4414
|
role: "progressbar",
|
|
@@ -4471,7 +4476,7 @@ var Vi = "#", Hi = (e, t) => {
|
|
|
4471
4476
|
status: "_status_1o2cp_150",
|
|
4472
4477
|
attachment: "_attachment_1o2cp_157"
|
|
4473
4478
|
}, Gi = ({ attachment: e }) => {
|
|
4474
|
-
if (
|
|
4479
|
+
if (re(e)) return /* @__PURE__ */ u(l, { children: e.component });
|
|
4475
4480
|
if (e.type === "image") return /* @__PURE__ */ u("div", {
|
|
4476
4481
|
className: J.attachment,
|
|
4477
4482
|
children: /* @__PURE__ */ u("img", {
|
|
@@ -4866,20 +4871,20 @@ var ea = { button: "_button_11i5l_1" }, ta = ({ text: e, maxLength: t, expandLab
|
|
|
4866
4871
|
}
|
|
4867
4872
|
return String(e.label).toLowerCase().includes(n) ? [e] : [];
|
|
4868
4873
|
});
|
|
4869
|
-
}, ua = t(({ className: e, contentClassName: t, contentProps: n, defaultValue: r, debounceDelay: l = 500, groupLabelClassName: p, iconProps: m, itemClassName: h, label: g, labelProps: v, onSearchChange: y, onValueChange: b, options: x, placeholder: S = "Select-box", portalProps: C, searchPlaceholder: w = "Search...", separatorClassName: T, triggerIcon: ee, triggerProps: E, valueProps:
|
|
4870
|
-
let
|
|
4874
|
+
}, ua = t(({ className: e, contentClassName: t, contentProps: n, defaultValue: r, debounceDelay: l = 500, groupLabelClassName: p, iconProps: m, itemClassName: h, label: g, labelProps: v, onSearchChange: y, onValueChange: b, options: x, placeholder: S = "Select-box", portalProps: C, searchPlaceholder: w = "Search...", separatorClassName: T, triggerIcon: ee, triggerProps: E, valueProps: D, value: te, viewportProps: ne, ...O }, k) => {
|
|
4875
|
+
let re = a(), [A, M] = c(r), [N, ie] = c(""), P = oa(N, l), F = te ?? A, I = j(x).find((e) => e.value === F), L = o(() => la(x, P), [x, P]), ae = E?.id ?? `searchable-select-${re}`, oe = s(y);
|
|
4871
4876
|
i(() => {
|
|
4872
|
-
|
|
4877
|
+
oe.current = y;
|
|
4873
4878
|
}, [y]), i(() => {
|
|
4874
|
-
|
|
4875
|
-
}, [
|
|
4876
|
-
let
|
|
4877
|
-
|
|
4879
|
+
oe.current?.(P);
|
|
4880
|
+
}, [P]);
|
|
4881
|
+
let se = (e) => {
|
|
4882
|
+
M(e), b?.(e);
|
|
4878
4883
|
}, ce = (e) => {
|
|
4879
|
-
e ||
|
|
4884
|
+
e || ie(""), O.onOpenChange?.(e);
|
|
4880
4885
|
}, le = (e) => {
|
|
4881
4886
|
e.key.length === 1 && !e.ctrlKey && !e.altKey && !e.metaKey && e.stopPropagation();
|
|
4882
|
-
}, { className: ue, ...de } = E ?? {}, { className: fe, ...pe } = v ?? {}, { children: me, className: he, ...ge } = m ?? {}, { className: _e, position: ve = "popper", sideOffset: ye = -1, ...be } = n ?? {}, { className: xe, ...Se } =
|
|
4887
|
+
}, { className: ue, ...de } = E ?? {}, { className: fe, ...pe } = v ?? {}, { children: me, className: he, ...ge } = m ?? {}, { className: _e, position: ve = "popper", sideOffset: ye = -1, ...be } = n ?? {}, { className: xe, ...Se } = ne ?? {}, Ce = (e) => {
|
|
4883
4888
|
let { className: t, ...n } = e.itemProps ?? {};
|
|
4884
4889
|
return /* @__PURE__ */ d(_.Item, {
|
|
4885
4890
|
value: e.value,
|
|
@@ -4906,34 +4911,34 @@ var ea = { button: "_button_11i5l_1" }, ta = ({ text: e, maxLength: t, expandLab
|
|
|
4906
4911
|
}, e.value);
|
|
4907
4912
|
};
|
|
4908
4913
|
return /* @__PURE__ */ d(_.Root, {
|
|
4909
|
-
...
|
|
4914
|
+
...O,
|
|
4910
4915
|
defaultValue: r,
|
|
4911
|
-
value:
|
|
4912
|
-
onValueChange:
|
|
4916
|
+
value: te,
|
|
4917
|
+
onValueChange: se,
|
|
4913
4918
|
onOpenChange: ce,
|
|
4914
4919
|
children: [
|
|
4915
4920
|
g && /* @__PURE__ */ u("label", {
|
|
4916
|
-
htmlFor:
|
|
4921
|
+
htmlFor: ae,
|
|
4917
4922
|
className: f(Q.label, "typography-body1", fe),
|
|
4918
4923
|
...pe,
|
|
4919
4924
|
children: g
|
|
4920
4925
|
}),
|
|
4921
4926
|
/* @__PURE__ */ d(_.Trigger, {
|
|
4922
|
-
ref:
|
|
4923
|
-
id:
|
|
4927
|
+
ref: k,
|
|
4928
|
+
id: ae,
|
|
4924
4929
|
className: f(Q.trigger, "typography-subtitle1", g && Q.hasLabel, e, ue),
|
|
4925
4930
|
...de,
|
|
4926
4931
|
children: [/* @__PURE__ */ u("span", {
|
|
4927
4932
|
className: Q.textBlock,
|
|
4928
4933
|
children: /* @__PURE__ */ d("span", {
|
|
4929
4934
|
className: Q.valueRow,
|
|
4930
|
-
children: [
|
|
4935
|
+
children: [I?.icon && /* @__PURE__ */ u("span", {
|
|
4931
4936
|
className: Q.startIcon,
|
|
4932
4937
|
"aria-hidden": !0,
|
|
4933
|
-
children:
|
|
4938
|
+
children: I.icon
|
|
4934
4939
|
}), /* @__PURE__ */ u(_.Value, {
|
|
4935
4940
|
placeholder: S,
|
|
4936
|
-
...
|
|
4941
|
+
...D
|
|
4937
4942
|
})]
|
|
4938
4943
|
})
|
|
4939
4944
|
}), /* @__PURE__ */ u(_.Icon, {
|
|
@@ -4954,17 +4959,17 @@ var ea = { button: "_button_11i5l_1" }, ta = ({ text: e, maxLength: t, expandLab
|
|
|
4954
4959
|
className: Q.searchField,
|
|
4955
4960
|
children: /* @__PURE__ */ u(Ri, {
|
|
4956
4961
|
type: "text",
|
|
4957
|
-
value:
|
|
4962
|
+
value: N,
|
|
4958
4963
|
placeholder: w,
|
|
4959
4964
|
className: Q.searchInput,
|
|
4960
4965
|
containerClassName: Q.searchInputContainer,
|
|
4961
|
-
onChange: (e) =>
|
|
4966
|
+
onChange: (e) => ie(e.target.value),
|
|
4962
4967
|
onKeyDown: le
|
|
4963
4968
|
})
|
|
4964
4969
|
}), /* @__PURE__ */ d(_.Viewport, {
|
|
4965
4970
|
className: f(Q.viewport, xe),
|
|
4966
4971
|
...Se,
|
|
4967
|
-
children: [
|
|
4972
|
+
children: [L.map((e, t) => {
|
|
4968
4973
|
if (e.type === "separator") {
|
|
4969
4974
|
let { className: n, ...r } = e.separatorProps ?? {};
|
|
4970
4975
|
return /* @__PURE__ */ u(_.Separator, {
|
|
@@ -4984,7 +4989,7 @@ var ea = { button: "_button_11i5l_1" }, ta = ({ text: e, maxLength: t, expandLab
|
|
|
4984
4989
|
}, `group-${t}`);
|
|
4985
4990
|
}
|
|
4986
4991
|
return Ce(e);
|
|
4987
|
-
}),
|
|
4992
|
+
}), L.length === 0 && /* @__PURE__ */ u("div", {
|
|
4988
4993
|
className: Q.noResults,
|
|
4989
4994
|
children: "No results found"
|
|
4990
4995
|
})]
|
|
@@ -5018,7 +5023,7 @@ var da = {
|
|
|
5018
5023
|
}
|
|
5019
5024
|
s(e);
|
|
5020
5025
|
},
|
|
5021
|
-
tabIndex: a ?
|
|
5026
|
+
tabIndex: a ? ne.DISABLED : ne.ENABLED,
|
|
5022
5027
|
"aria-disabled": a,
|
|
5023
5028
|
children: [i && e.activeIcon ? e.activeIcon : e.icon, /* @__PURE__ */ u(G, {
|
|
5024
5029
|
variant: "body2",
|
|
@@ -5103,10 +5108,11 @@ var xa = t(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u("td", {
|
|
|
5103
5108
|
}));
|
|
5104
5109
|
xa.displayName = "TableCell";
|
|
5105
5110
|
var Sa = {
|
|
5106
|
-
list: "
|
|
5107
|
-
trigger: "
|
|
5108
|
-
labelText: "
|
|
5109
|
-
|
|
5111
|
+
list: "_list_ns6i2_55",
|
|
5112
|
+
trigger: "_trigger_ns6i2_63",
|
|
5113
|
+
labelText: "_labelText_ns6i2_88",
|
|
5114
|
+
withIcon: "_withIcon_ns6i2_142",
|
|
5115
|
+
icon: "_icon_ns6i2_147"
|
|
5110
5116
|
}, Ca = t(({ tabs: e, defaultValue: t, onValueChange: n, className: r, ...i }, a) => /* @__PURE__ */ d(S.Root, {
|
|
5111
5117
|
ref: a,
|
|
5112
5118
|
defaultValue: t ?? e[0]?.value,
|
|
@@ -5124,7 +5130,7 @@ var Sa = {
|
|
|
5124
5130
|
className: Sa.icon,
|
|
5125
5131
|
children: e.icon
|
|
5126
5132
|
}), /* @__PURE__ */ u("span", {
|
|
5127
|
-
className: Sa.labelText,
|
|
5133
|
+
className: f(Sa.labelText, e.icon && Sa.withIcon),
|
|
5128
5134
|
children: e.label
|
|
5129
5135
|
})]
|
|
5130
5136
|
}, e.value))
|