@photonix/basic 1.7.0 → 1.7.1
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.css +37 -32
- package/dist/index.js +494 -495
- package/dist/index.mjs +494 -495
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -37792,13 +37792,13 @@ var ra = i.forwardRef(
|
|
|
37792
37792
|
onClick: h,
|
|
37793
37793
|
...d
|
|
37794
37794
|
}, s2) => {
|
|
37795
|
-
const p = o !== void 0, [u, m] = i.useState(n), [y6, b] = i.useState(false), v = i.useRef(null), _ = p ? o : u, L = r2, k6 = !r2 && _, S = !r2 && !_, w = l === "small" ? 20 : 24, T = (
|
|
37795
|
+
const p = o !== void 0, [u, m] = i.useState(n), [y6, b] = i.useState(false), v = i.useRef(null), _ = p ? o : u, L = r2, k6 = !r2 && _, S = !r2 && !_, w = l === "small" ? 20 : 24, T = (W) => {
|
|
37796
37796
|
if (f) return;
|
|
37797
37797
|
v.current && clearTimeout(v.current), b(true), v.current = setTimeout(() => {
|
|
37798
37798
|
b(false);
|
|
37799
37799
|
}, 400);
|
|
37800
|
-
const
|
|
37801
|
-
p || m(
|
|
37800
|
+
const P6 = r2 ? true : !_;
|
|
37801
|
+
p || m(P6), C && C(P6), h && h(W);
|
|
37802
37802
|
};
|
|
37803
37803
|
i.useEffect(() => () => {
|
|
37804
37804
|
v.current && clearTimeout(v.current);
|
|
@@ -38093,7 +38093,7 @@ var Pa = ({
|
|
|
38093
38093
|
}) => {
|
|
38094
38094
|
const M = C === "checkbox", N = (!!_ || M) && !L, H = () => {
|
|
38095
38095
|
L || (M && m?.(!u), _?.());
|
|
38096
|
-
},
|
|
38096
|
+
}, W = () => {
|
|
38097
38097
|
if (n === "none") return null;
|
|
38098
38098
|
switch (n) {
|
|
38099
38099
|
case "icon":
|
|
@@ -38120,15 +38120,15 @@ var Pa = ({
|
|
|
38120
38120
|
default:
|
|
38121
38121
|
return null;
|
|
38122
38122
|
}
|
|
38123
|
-
},
|
|
38124
|
-
const
|
|
38123
|
+
}, P6 = () => {
|
|
38124
|
+
const A = o !== void 0;
|
|
38125
38125
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: De.listItemBody, children: [
|
|
38126
38126
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: De.listItemContent, children: t }),
|
|
38127
|
-
a2 && !
|
|
38127
|
+
a2 && !A && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: [
|
|
38128
38128
|
De.listItemDescription,
|
|
38129
38129
|
S && De.listItemDescriptionMultiline
|
|
38130
38130
|
].filter(Boolean).join(" "), children: a2 }),
|
|
38131
|
-
|
|
38131
|
+
A && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(en, { value: o, className: De.listItemProgress })
|
|
38132
38132
|
] });
|
|
38133
38133
|
}, G = () => {
|
|
38134
38134
|
if (C === "none") return null;
|
|
@@ -38170,15 +38170,15 @@ var Pa = ({
|
|
|
38170
38170
|
case "check":
|
|
38171
38171
|
return y6 ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: De.listItemTrailingCheck, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(CheckSmallOutline, { size: 24 }) }) : null;
|
|
38172
38172
|
case "actions":
|
|
38173
|
-
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: De.listItemTrailingActions, children: b.slice(0, 3).map((
|
|
38173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: De.listItemTrailingActions, children: b.slice(0, 3).map((A, I) => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
38174
38174
|
ge,
|
|
38175
38175
|
{
|
|
38176
|
-
icon:
|
|
38176
|
+
icon: A,
|
|
38177
38177
|
variant: "tertiary",
|
|
38178
38178
|
size: "medium",
|
|
38179
38179
|
className: De.listItemActionButton,
|
|
38180
|
-
onClick: (
|
|
38181
|
-
|
|
38180
|
+
onClick: (K) => {
|
|
38181
|
+
K.stopPropagation(), v?.(I);
|
|
38182
38182
|
},
|
|
38183
38183
|
disabled: L,
|
|
38184
38184
|
"aria-label": `Action ${I + 1}`
|
|
@@ -38208,13 +38208,13 @@ var Pa = ({
|
|
|
38208
38208
|
onClick: H,
|
|
38209
38209
|
role: N ? "button" : void 0,
|
|
38210
38210
|
tabIndex: N ? 0 : void 0,
|
|
38211
|
-
onKeyDown: (
|
|
38212
|
-
N && (
|
|
38211
|
+
onKeyDown: (A) => {
|
|
38212
|
+
N && (A.key === "Enter" || A.key === " ") && (A.preventDefault(), H());
|
|
38213
38213
|
},
|
|
38214
38214
|
...T,
|
|
38215
38215
|
children: [
|
|
38216
|
-
z(),
|
|
38217
38216
|
W(),
|
|
38217
|
+
P6(),
|
|
38218
38218
|
G()
|
|
38219
38219
|
]
|
|
38220
38220
|
}
|
|
@@ -38666,45 +38666,45 @@ var Qt = (0, import_react65.forwardRef)(({
|
|
|
38666
38666
|
autoHide: s2 = true,
|
|
38667
38667
|
onScroll: p
|
|
38668
38668
|
}, u) => {
|
|
38669
|
-
const m = (0, import_react65.useRef)(null), y6 = (0, import_react65.useRef)(null), b = (0, import_react65.useRef)(null), [v, _] = (0, import_react65.useState)(0), [L, k6] = (0, import_react65.useState)(0), [S, w] = (0, import_react65.useState)(false), [T, M] = (0, import_react65.useState)(false), [N, H] = (0, import_react65.useState)(0), [
|
|
38670
|
-
const
|
|
38671
|
-
if (!
|
|
38672
|
-
const { scrollHeight: ce, clientHeight: xe, scrollTop: we, scrollWidth: te, clientWidth: ae, scrollLeft: le } =
|
|
38669
|
+
const m = (0, import_react65.useRef)(null), y6 = (0, import_react65.useRef)(null), b = (0, import_react65.useRef)(null), [v, _] = (0, import_react65.useState)(0), [L, k6] = (0, import_react65.useState)(0), [S, w] = (0, import_react65.useState)(false), [T, M] = (0, import_react65.useState)(false), [N, H] = (0, import_react65.useState)(0), [W, P6] = (0, import_react65.useState)(0), [G, E] = (0, import_react65.useState)(false), [J, A] = (0, import_react65.useState)(false), [I, K] = (0, import_react65.useState)(false), x6 = (0, import_react65.useRef)({ y: 0, scrollTop: 0 }), D = (0, import_react65.useRef)({ x: 0, scrollLeft: 0 }), F = (0, import_react65.useCallback)(() => {
|
|
38670
|
+
const z = m.current;
|
|
38671
|
+
if (!z) return;
|
|
38672
|
+
const { scrollHeight: ce, clientHeight: xe, scrollTop: we, scrollWidth: te, clientWidth: ae, scrollLeft: le } = z, Y = ce > xe + 1;
|
|
38673
38673
|
if (w(Y), Y) {
|
|
38674
38674
|
const ie = y6.current ? y6.current.clientHeight : xe, R = 4, X = Math.max(0, ie - R * 2), j = Math.max(xe / ce * X, 30);
|
|
38675
38675
|
_(j);
|
|
38676
|
-
const
|
|
38677
|
-
k6(R + we /
|
|
38676
|
+
const V = ce - xe, ne = X - j;
|
|
38677
|
+
k6(R + we / V * ne);
|
|
38678
38678
|
}
|
|
38679
38679
|
const ee = te > ae + 1;
|
|
38680
38680
|
if (E(ee), ee) {
|
|
38681
38681
|
const ie = b.current ? b.current.clientWidth : ae, R = 4, X = Math.max(0, ie - R * 2), j = Math.max(ae / te * X, 30);
|
|
38682
38682
|
H(j);
|
|
38683
|
-
const
|
|
38684
|
-
|
|
38683
|
+
const V = te - ae, ne = X - j;
|
|
38684
|
+
P6(R + le / V * ne);
|
|
38685
38685
|
}
|
|
38686
38686
|
}, []);
|
|
38687
38687
|
(0, import_react65.useEffect)(() => {
|
|
38688
38688
|
if (S || G) {
|
|
38689
|
-
const
|
|
38690
|
-
return () => clearTimeout(
|
|
38689
|
+
const z = setTimeout(F, 0);
|
|
38690
|
+
return () => clearTimeout(z);
|
|
38691
38691
|
}
|
|
38692
38692
|
}, [S, G, F]), (0, import_react65.useImperativeHandle)(u, () => ({
|
|
38693
38693
|
contentElement: m.current,
|
|
38694
|
-
scrollTo: (
|
|
38695
|
-
m.current?.scrollTo(
|
|
38694
|
+
scrollTo: (z) => {
|
|
38695
|
+
m.current?.scrollTo(z);
|
|
38696
38696
|
}
|
|
38697
38697
|
}), []);
|
|
38698
|
-
const
|
|
38699
|
-
F(), p?.(
|
|
38700
|
-
}, [F, p]), de = (0, import_react65.useCallback)((
|
|
38701
|
-
|
|
38702
|
-
}, []), O6 = (0, import_react65.useCallback)((
|
|
38703
|
-
|
|
38698
|
+
const Q = (0, import_react65.useCallback)((z) => {
|
|
38699
|
+
F(), p?.(z);
|
|
38700
|
+
}, [F, p]), de = (0, import_react65.useCallback)((z) => {
|
|
38701
|
+
z.preventDefault(), z.stopPropagation(), M(true), x6.current = { y: z.clientY, scrollTop: m.current?.scrollTop || 0 };
|
|
38702
|
+
}, []), O6 = (0, import_react65.useCallback)((z) => {
|
|
38703
|
+
z.preventDefault(), z.stopPropagation(), A(true), D.current = { x: z.clientX, scrollLeft: m.current?.scrollLeft || 0 };
|
|
38704
38704
|
}, []);
|
|
38705
38705
|
(0, import_react65.useEffect)(() => {
|
|
38706
38706
|
if (!T && !J) return;
|
|
38707
|
-
const
|
|
38707
|
+
const z = (xe) => {
|
|
38708
38708
|
const we = m.current;
|
|
38709
38709
|
if (we) {
|
|
38710
38710
|
if (T) {
|
|
@@ -38717,36 +38717,36 @@ var Qt = (0, import_react65.forwardRef)(({
|
|
|
38717
38717
|
}
|
|
38718
38718
|
}
|
|
38719
38719
|
}, ce = () => {
|
|
38720
|
-
M(false),
|
|
38720
|
+
M(false), A(false);
|
|
38721
38721
|
};
|
|
38722
|
-
return document.addEventListener("mousemove",
|
|
38723
|
-
document.removeEventListener("mousemove",
|
|
38722
|
+
return document.addEventListener("mousemove", z), document.addEventListener("mouseup", ce), () => {
|
|
38723
|
+
document.removeEventListener("mousemove", z), document.removeEventListener("mouseup", ce);
|
|
38724
38724
|
};
|
|
38725
38725
|
}, [T, J, v, N]);
|
|
38726
|
-
const q = (0, import_react65.useCallback)((
|
|
38727
|
-
const ce = m.current, xe =
|
|
38726
|
+
const q = (0, import_react65.useCallback)((z) => {
|
|
38727
|
+
const ce = m.current, xe = z.currentTarget;
|
|
38728
38728
|
if (!ce) return;
|
|
38729
|
-
const we = xe.getBoundingClientRect(), te =
|
|
38729
|
+
const we = xe.getBoundingClientRect(), te = z.clientY - we.top, { scrollHeight: ae, clientHeight: le } = ce, Y = 4, ee = ae - le, ie = te - v / 2 - Y, R = xe.clientHeight - Y * 2 - v;
|
|
38730
38730
|
ce.scrollTop = Math.max(0, Math.min(1, ie / R)) * ee;
|
|
38731
|
-
}, [v]), re2 = (0, import_react65.useCallback)((
|
|
38732
|
-
const ce = m.current, xe =
|
|
38731
|
+
}, [v]), re2 = (0, import_react65.useCallback)((z) => {
|
|
38732
|
+
const ce = m.current, xe = z.currentTarget;
|
|
38733
38733
|
if (!ce) return;
|
|
38734
|
-
const we = xe.getBoundingClientRect(), te =
|
|
38734
|
+
const we = xe.getBoundingClientRect(), te = z.clientX - we.left, { scrollWidth: ae, clientWidth: le } = ce, Y = 4, ee = ae - le, ie = te - N / 2 - Y, R = xe.clientWidth - Y * 2 - N;
|
|
38735
38735
|
ce.scrollLeft = Math.max(0, Math.min(1, ie / R)) * ee;
|
|
38736
38736
|
}, [N]);
|
|
38737
38737
|
(0, import_react65.useEffect)(() => {
|
|
38738
38738
|
F();
|
|
38739
|
-
const
|
|
38740
|
-
return m.current &&
|
|
38739
|
+
const z = new ResizeObserver(F);
|
|
38740
|
+
return m.current && z.observe(m.current), () => z.disconnect();
|
|
38741
38741
|
}, [F]);
|
|
38742
|
-
const
|
|
38742
|
+
const Z = !s2 || I || T || J, U = a2 === "sm" ? "Small" : "Medium", ue = r2 ? { flex: 1, minHeight: 0, minWidth: 0, height: "100%", ...n && { maxWidth: n } } : { height: o, maxWidth: n }, he = r2 ? { height: "100%", ...n && { maxWidth: n } } : { maxHeight: o, maxWidth: n };
|
|
38743
38743
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
|
|
38744
38744
|
"div",
|
|
38745
38745
|
{
|
|
38746
38746
|
className: `phx-custom-scrollbar ${rt.customScrollbarRoot} ${r2 ? rt.customScrollbarFill : ""} ${l || ""}`,
|
|
38747
38747
|
style: ue,
|
|
38748
|
-
onMouseEnter: () =>
|
|
38749
|
-
onMouseLeave: () =>
|
|
38748
|
+
onMouseEnter: () => K(true),
|
|
38749
|
+
onMouseLeave: () => K(false),
|
|
38750
38750
|
children: [
|
|
38751
38751
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
38752
38752
|
"div",
|
|
@@ -38754,7 +38754,7 @@ var Qt = (0, import_react65.forwardRef)(({
|
|
|
38754
38754
|
ref: m,
|
|
38755
38755
|
className: `${rt.customScrollbarContent} ${c2 || ""}`,
|
|
38756
38756
|
style: he,
|
|
38757
|
-
onScroll:
|
|
38757
|
+
onScroll: Q,
|
|
38758
38758
|
children: t
|
|
38759
38759
|
}
|
|
38760
38760
|
),
|
|
@@ -38762,7 +38762,7 @@ var Qt = (0, import_react65.forwardRef)(({
|
|
|
38762
38762
|
"div",
|
|
38763
38763
|
{
|
|
38764
38764
|
ref: y6,
|
|
38765
|
-
className: `${rt.customScrollbarTrackVertical} ${rt[`customScrollbarTrack${U}`]} ${
|
|
38765
|
+
className: `${rt.customScrollbarTrackVertical} ${rt[`customScrollbarTrack${U}`]} ${Z ? rt.customScrollbarTrackVisible : ""} ${f || ""}`,
|
|
38766
38766
|
style: C,
|
|
38767
38767
|
onClick: q,
|
|
38768
38768
|
children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
@@ -38782,7 +38782,7 @@ var Qt = (0, import_react65.forwardRef)(({
|
|
|
38782
38782
|
"div",
|
|
38783
38783
|
{
|
|
38784
38784
|
ref: b,
|
|
38785
|
-
className: `${rt.customScrollbarTrackHorizontal} ${rt[`customScrollbarTrack${U}`]} ${
|
|
38785
|
+
className: `${rt.customScrollbarTrackHorizontal} ${rt[`customScrollbarTrack${U}`]} ${Z ? rt.customScrollbarTrackVisible : ""} ${h || ""}`,
|
|
38786
38786
|
style: d,
|
|
38787
38787
|
onClick: re2,
|
|
38788
38788
|
children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
@@ -38791,7 +38791,7 @@ var Qt = (0, import_react65.forwardRef)(({
|
|
|
38791
38791
|
className: `${rt.customScrollbarThumbHorizontal} ${rt[`customScrollbarThumb${U}`]} ${J ? rt.customScrollbarThumbHorizontalDragging : ""}`,
|
|
38792
38792
|
style: {
|
|
38793
38793
|
width: N,
|
|
38794
|
-
transform: `translateX(${
|
|
38794
|
+
transform: `translateX(${W}px)`
|
|
38795
38795
|
},
|
|
38796
38796
|
onMouseDown: O6
|
|
38797
38797
|
}
|
|
@@ -38910,17 +38910,17 @@ function rn(t, a2, o, n = {}) {
|
|
|
38910
38910
|
u.current();
|
|
38911
38911
|
return;
|
|
38912
38912
|
}
|
|
38913
|
-
const T = a2.current?.getBoundingClientRect(), M = w.bottom - L.bottom, N = L.top - w.top, H = 8,
|
|
38913
|
+
const T = a2.current?.getBoundingClientRect(), M = w.bottom - L.bottom, N = L.top - w.top, H = 8, W = w.left + w.padding, P6 = w.right - w.padding;
|
|
38914
38914
|
let G = "bottom";
|
|
38915
38915
|
if (M < r2 && N > M && (G = "top"), d(G), c2 === "fixed") {
|
|
38916
|
-
let E = L.left, J,
|
|
38917
|
-
T && (E + T.width >
|
|
38916
|
+
let E = L.left, J, A;
|
|
38917
|
+
T && (E + T.width > P6 && (E = Math.max(W, P6 - T.width)), E < W && (E = W)), G === "bottom" ? J = L.bottom + H : A = k6 - L.top + H, y6({ top: J, bottom: A, left: E }), p("left");
|
|
38918
38918
|
} else {
|
|
38919
38919
|
let E = 0;
|
|
38920
38920
|
const J = "left";
|
|
38921
38921
|
if (T) {
|
|
38922
|
-
const
|
|
38923
|
-
I >
|
|
38922
|
+
const A = L.left, I = A + T.width;
|
|
38923
|
+
I > P6 && (E = -(I - P6)), A + E < W && (E = W - L.left);
|
|
38924
38924
|
}
|
|
38925
38925
|
y6({ horizontalOffset: E }), p(J);
|
|
38926
38926
|
}
|
|
@@ -39050,8 +39050,8 @@ var Fa = i.forwardRef(
|
|
|
39050
39050
|
}), L = i.useRef(null);
|
|
39051
39051
|
i.useEffect(() => {
|
|
39052
39052
|
if (!o || l) return;
|
|
39053
|
-
const H = (
|
|
39054
|
-
(
|
|
39053
|
+
const H = (W) => {
|
|
39054
|
+
(W.metaKey || W.ctrlKey) && W.key.toLowerCase() === "k" && (W.preventDefault(), L.current?.focus());
|
|
39055
39055
|
};
|
|
39056
39056
|
return window.addEventListener("keydown", H), () => window.removeEventListener("keydown", H);
|
|
39057
39057
|
}, [o, l]), i.useImperativeHandle(m, () => L.current);
|
|
@@ -39216,7 +39216,7 @@ var vo = i.forwardRef(
|
|
|
39216
39216
|
}, [w]), i.useEffect(() => {
|
|
39217
39217
|
if (s2 !== void 0 || !h || !b.current || a2 !== "large") return;
|
|
39218
39218
|
const x6 = Y1(b.current), D = 50, F = () => {
|
|
39219
|
-
const
|
|
39219
|
+
const Q = x6 === window ? window.scrollY : x6.scrollTop, de = Math.min(1, Math.max(0, Q / D));
|
|
39220
39220
|
N(de);
|
|
39221
39221
|
};
|
|
39222
39222
|
return x6.addEventListener("scroll", F, { passive: true }), F(), () => x6.removeEventListener("scroll", F);
|
|
@@ -39224,8 +39224,8 @@ var vo = i.forwardRef(
|
|
|
39224
39224
|
if (a2 !== "large" || w) return;
|
|
39225
39225
|
const x6 = requestAnimationFrame(() => {
|
|
39226
39226
|
if (v.current) {
|
|
39227
|
-
const D = 1 - H * 0.15, F = 1 - H,
|
|
39228
|
-
v.current.style.transform = `scale(${D}) translateY(${
|
|
39227
|
+
const D = 1 - H * 0.15, F = 1 - H, Q = H * -10;
|
|
39228
|
+
v.current.style.transform = `scale(${D}) translateY(${Q}px)`, v.current.style.opacity = String(F), v.current.style.maxHeight = H > 0.8 ? "0px" : "100px", v.current.style.visibility = H >= 1 ? "hidden" : "visible";
|
|
39229
39229
|
}
|
|
39230
39230
|
if (_.current) {
|
|
39231
39231
|
const D = H, F = (1 - H) * 8;
|
|
@@ -39245,22 +39245,22 @@ var vo = i.forwardRef(
|
|
|
39245
39245
|
});
|
|
39246
39246
|
return () => cancelAnimationFrame(x6);
|
|
39247
39247
|
}, [H, a2, w]);
|
|
39248
|
-
const
|
|
39248
|
+
const W = () => {
|
|
39249
39249
|
T(true);
|
|
39250
|
-
},
|
|
39250
|
+
}, P6 = () => {
|
|
39251
39251
|
setTimeout(() => T(false), 150);
|
|
39252
39252
|
}, G = () => {
|
|
39253
39253
|
T(false), k6.current?.blur();
|
|
39254
|
-
}, E = h && H > 0.1, J = d ?? E,
|
|
39254
|
+
}, E = h && H > 0.1, J = d ?? E, A = !t && l, I = [
|
|
39255
39255
|
"phx-app-bar",
|
|
39256
39256
|
ze.appBarRoot,
|
|
39257
39257
|
h && ze.appBarSticky,
|
|
39258
39258
|
J && ze.appBarElevated,
|
|
39259
39259
|
a2 === "large" ? ze.appBarSizeLarge : ze.appBarSizeMedium,
|
|
39260
39260
|
w && ze.appBarSearchFocusMode,
|
|
39261
|
-
|
|
39261
|
+
A && ze.appBarSearchOnlyMode,
|
|
39262
39262
|
m
|
|
39263
|
-
].filter(Boolean).join(" "),
|
|
39263
|
+
].filter(Boolean).join(" "), K = [
|
|
39264
39264
|
ze.appBarTitleSmall,
|
|
39265
39265
|
!o && !p && ze.appBarTitleSmallNoBack,
|
|
39266
39266
|
a2 === "medium" && ze.appBarTitleSmallVisible
|
|
@@ -39285,7 +39285,7 @@ var vo = i.forwardRef(
|
|
|
39285
39285
|
placeholder: c2,
|
|
39286
39286
|
value: f,
|
|
39287
39287
|
onChange: C,
|
|
39288
|
-
onBlur:
|
|
39288
|
+
onBlur: P6,
|
|
39289
39289
|
showClear: true
|
|
39290
39290
|
}
|
|
39291
39291
|
) })
|
|
@@ -39301,7 +39301,7 @@ var vo = i.forwardRef(
|
|
|
39301
39301
|
"aria-label": "Go back"
|
|
39302
39302
|
}
|
|
39303
39303
|
) }),
|
|
39304
|
-
t && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("h1", { ref: _, className:
|
|
39304
|
+
t && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("h1", { ref: _, className: K, children: t }),
|
|
39305
39305
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: ze.appBarSpacer }),
|
|
39306
39306
|
u ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: ze.appBarTrailing, children: u }) : r2.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: ze.appBarActions, children: r2.map((x6, D) => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: ze.appBarAction, children: x6 }, D)) }) : null
|
|
39307
39307
|
] }),
|
|
@@ -39315,7 +39315,7 @@ var vo = i.forwardRef(
|
|
|
39315
39315
|
placeholder: c2,
|
|
39316
39316
|
value: f,
|
|
39317
39317
|
onChange: C,
|
|
39318
|
-
onFocus:
|
|
39318
|
+
onFocus: W,
|
|
39319
39319
|
showClear: true
|
|
39320
39320
|
}
|
|
39321
39321
|
) })
|
|
@@ -39457,7 +39457,7 @@ function Xt() {
|
|
|
39457
39457
|
function Zt(...t) {
|
|
39458
39458
|
return Xt(t);
|
|
39459
39459
|
}
|
|
39460
|
-
function
|
|
39460
|
+
function $(t, a2, o = (n) => String(n)) {
|
|
39461
39461
|
if (a2 === void 0) return {};
|
|
39462
39462
|
const n = {};
|
|
39463
39463
|
if (typeof a2 == "object" && a2 !== null && !Array.isArray(a2))
|
|
@@ -39520,28 +39520,28 @@ var Lo = i.forwardRef(
|
|
|
39520
39520
|
maxH: M,
|
|
39521
39521
|
position: N,
|
|
39522
39522
|
top: H,
|
|
39523
|
-
right:
|
|
39524
|
-
bottom:
|
|
39523
|
+
right: W,
|
|
39524
|
+
bottom: P6,
|
|
39525
39525
|
left: G,
|
|
39526
39526
|
inset: E,
|
|
39527
39527
|
zIndex: J,
|
|
39528
|
-
overflow:
|
|
39528
|
+
overflow: A,
|
|
39529
39529
|
overflowX: I,
|
|
39530
|
-
overflowY:
|
|
39530
|
+
overflowY: K,
|
|
39531
39531
|
aspectRatio: x6,
|
|
39532
39532
|
// Flexbox
|
|
39533
39533
|
flexDirection: D,
|
|
39534
39534
|
flexWrap: F,
|
|
39535
|
-
flex:
|
|
39535
|
+
flex: Q,
|
|
39536
39536
|
flexGrow: de,
|
|
39537
39537
|
flexShrink: O6,
|
|
39538
39538
|
flexBasis: q,
|
|
39539
39539
|
order: re2,
|
|
39540
|
-
gap:
|
|
39540
|
+
gap: Z,
|
|
39541
39541
|
columnGap: U,
|
|
39542
39542
|
rowGap: ue,
|
|
39543
39543
|
alignItems: he,
|
|
39544
|
-
alignContent:
|
|
39544
|
+
alignContent: z,
|
|
39545
39545
|
alignSelf: ce,
|
|
39546
39546
|
justifyContent: xe,
|
|
39547
39547
|
justifyItems: we,
|
|
@@ -39555,7 +39555,7 @@ var Lo = i.forwardRef(
|
|
|
39555
39555
|
opacity: R,
|
|
39556
39556
|
border: X,
|
|
39557
39557
|
borderWidth: j,
|
|
39558
|
-
borderStyle:
|
|
39558
|
+
borderStyle: V,
|
|
39559
39559
|
borderColor: ne,
|
|
39560
39560
|
// Typography
|
|
39561
39561
|
textAlign: se,
|
|
@@ -39573,75 +39573,75 @@ var Lo = i.forwardRef(
|
|
|
39573
39573
|
...rr
|
|
39574
39574
|
}, ir) => {
|
|
39575
39575
|
const lr = t || "div", Ct = (Ee) => typeof Ee == "number" ? `${Ee}px` : Ee, $e = (Ee) => Ee === "auto" ? "auto" : ec(Ee), sr = (Ee) => tc(Ee), cr = (Ee) => ac(Ee), dr = (Ee) => K0(Ee), ur = (Ee) => $0(Ee), hr = (Ee) => typeof Ee == "boolean" ? Ee ? "wrap" : "nowrap" : Ee, pr = {
|
|
39576
|
-
|
|
39577
|
-
|
|
39578
|
-
|
|
39579
|
-
|
|
39580
|
-
|
|
39581
|
-
|
|
39582
|
-
|
|
39583
|
-
|
|
39584
|
-
|
|
39585
|
-
|
|
39586
|
-
|
|
39587
|
-
|
|
39588
|
-
|
|
39589
|
-
|
|
39590
|
-
|
|
39591
|
-
|
|
39592
|
-
|
|
39593
|
-
|
|
39594
|
-
|
|
39595
|
-
|
|
39596
|
-
|
|
39597
|
-
|
|
39598
|
-
|
|
39599
|
-
|
|
39600
|
-
|
|
39601
|
-
|
|
39602
|
-
|
|
39603
|
-
|
|
39604
|
-
|
|
39605
|
-
|
|
39606
|
-
|
|
39607
|
-
|
|
39608
|
-
|
|
39609
|
-
|
|
39610
|
-
|
|
39611
|
-
|
|
39612
|
-
|
|
39613
|
-
|
|
39614
|
-
|
|
39615
|
-
|
|
39616
|
-
|
|
39617
|
-
|
|
39618
|
-
|
|
39619
|
-
|
|
39620
|
-
|
|
39621
|
-
|
|
39622
|
-
|
|
39623
|
-
|
|
39624
|
-
|
|
39625
|
-
|
|
39626
|
-
|
|
39627
|
-
|
|
39628
|
-
|
|
39629
|
-
|
|
39630
|
-
|
|
39631
|
-
|
|
39632
|
-
|
|
39633
|
-
|
|
39576
|
+
...$("p", r2, $e),
|
|
39577
|
+
...$("px", l, $e),
|
|
39578
|
+
...$("py", c2, $e),
|
|
39579
|
+
...$("pt", f, $e),
|
|
39580
|
+
...$("pb", C, $e),
|
|
39581
|
+
...$("pl", h, $e),
|
|
39582
|
+
...$("pr", d, $e),
|
|
39583
|
+
...$("m", s2, $e),
|
|
39584
|
+
...$("mx", p, $e),
|
|
39585
|
+
...$("my", u, $e),
|
|
39586
|
+
...$("mt", m, $e),
|
|
39587
|
+
...$("mb", y6, $e),
|
|
39588
|
+
...$("ml", b, $e),
|
|
39589
|
+
...$("mr", v, $e),
|
|
39590
|
+
...$("display", _),
|
|
39591
|
+
...$("aspectRatio", x6),
|
|
39592
|
+
...$("w", L, Ct),
|
|
39593
|
+
...$("h", k6, Ct),
|
|
39594
|
+
...$("minW", S, Ct),
|
|
39595
|
+
...$("minH", w, Ct),
|
|
39596
|
+
...$("maxW", T, Ct),
|
|
39597
|
+
...$("maxH", M, Ct),
|
|
39598
|
+
...$("position", N),
|
|
39599
|
+
...$("top", H, Ct),
|
|
39600
|
+
...$("right", W, Ct),
|
|
39601
|
+
...$("bottom", P6, Ct),
|
|
39602
|
+
...$("left", G, Ct),
|
|
39603
|
+
...$("inset", E, Ct),
|
|
39604
|
+
...$("zIndex", J),
|
|
39605
|
+
...$("overflow", A),
|
|
39606
|
+
...$("overflowX", I),
|
|
39607
|
+
...$("overflowY", K),
|
|
39608
|
+
...$("flexDirection", D),
|
|
39609
|
+
...$("flexWrap", F, hr),
|
|
39610
|
+
...$("flex", Q),
|
|
39611
|
+
...$("flexGrow", de),
|
|
39612
|
+
...$("flexShrink", O6),
|
|
39613
|
+
...$("flexBasis", q, Ct),
|
|
39614
|
+
...$("order", re2),
|
|
39615
|
+
...$("gap", Z, $e),
|
|
39616
|
+
...$("columnGap", U, $e),
|
|
39617
|
+
...$("rowGap", ue, $e),
|
|
39618
|
+
...$("alignItems", he, (Ee) => ic[Ee] || Ee),
|
|
39619
|
+
...$("alignContent", z),
|
|
39620
|
+
...$("alignSelf", ce, (Ee) => Ee === "start" ? "flex-start" : Ee === "end" ? "flex-end" : Ee),
|
|
39621
|
+
...$("justifyContent", xe, (Ee) => lc[Ee] || Ee),
|
|
39622
|
+
...$("justifyItems", we),
|
|
39623
|
+
...$("placeItems", te),
|
|
39624
|
+
...$("placeContent", ae),
|
|
39625
|
+
...$("page-bg", Y, ur),
|
|
39626
|
+
...$("box-bg", le, dr),
|
|
39627
|
+
...$("box-borderRadius", ee, sr),
|
|
39628
|
+
...$("box-shadow", ie, cr),
|
|
39629
|
+
...$("box-opacity", R),
|
|
39630
|
+
...$("box-border", X),
|
|
39631
|
+
...$("box-borderWidth", j, nc),
|
|
39632
|
+
...$("box-borderStyle", V),
|
|
39633
|
+
...$("box-borderColor", ne),
|
|
39634
39634
|
// Could map to color vars if needed, currently string
|
|
39635
|
-
|
|
39636
|
-
|
|
39637
|
-
|
|
39638
|
-
|
|
39639
|
-
|
|
39640
|
-
|
|
39641
|
-
|
|
39642
|
-
|
|
39643
|
-
|
|
39644
|
-
|
|
39635
|
+
...$("textAlign", se),
|
|
39636
|
+
...$("fontSize", Ce),
|
|
39637
|
+
...$("fontWeight", be),
|
|
39638
|
+
...$("lineHeight", ke),
|
|
39639
|
+
...$("box-color", Be),
|
|
39640
|
+
...$("cursor", Ge),
|
|
39641
|
+
...$("pointerEvents", Je),
|
|
39642
|
+
...$("userSelect", ft),
|
|
39643
|
+
...$("transform", ln2),
|
|
39644
|
+
...$("transition", or)
|
|
39645
39645
|
}, mr = {
|
|
39646
39646
|
...n,
|
|
39647
39647
|
...pr
|
|
@@ -40288,23 +40288,23 @@ var Ha = i.forwardRef(
|
|
|
40288
40288
|
if (o === "single")
|
|
40289
40289
|
r2?.(x6);
|
|
40290
40290
|
else {
|
|
40291
|
-
const F = u.includes(x6) ? u.filter((
|
|
40291
|
+
const F = u.includes(x6) ? u.filter((Q) => Q !== x6) : [...u, x6];
|
|
40292
40292
|
r2?.(F);
|
|
40293
40293
|
}
|
|
40294
40294
|
}, b = (x6) => u.includes(x6), [v, _] = i.useState(false), [L, k6] = i.useState(false), S = i.useRef(null), w = i.useCallback(() => {
|
|
40295
40295
|
const x6 = S.current;
|
|
40296
40296
|
if (!x6) return;
|
|
40297
|
-
const D = x6.scrollTop, F = x6.scrollHeight,
|
|
40298
|
-
_(D > 10), k6(D +
|
|
40297
|
+
const D = x6.scrollTop, F = x6.scrollHeight, Q = x6.clientHeight;
|
|
40298
|
+
_(D > 10), k6(D + Q < F - 10);
|
|
40299
40299
|
}, []);
|
|
40300
40300
|
i.useEffect(() => {
|
|
40301
40301
|
w();
|
|
40302
40302
|
}, [m, w]);
|
|
40303
|
-
const T = 40, M = typeof l == "number" ? l : parseInt(l) || 400, { virtualItems: N, totalHeight: H, onScroll:
|
|
40303
|
+
const T = 40, M = typeof l == "number" ? l : parseInt(l) || 400, { virtualItems: N, totalHeight: H, onScroll: W, isVirtual: P6 } = C1({
|
|
40304
40304
|
itemCount: m.length,
|
|
40305
40305
|
itemHeight: T,
|
|
40306
40306
|
containerHeight: M
|
|
40307
|
-
}), [G, E] = i.useState(-1), [J,
|
|
40307
|
+
}), [G, E] = i.useState(-1), [J, A] = i.useState(false);
|
|
40308
40308
|
i.useEffect(() => {
|
|
40309
40309
|
if (m.length === 0) {
|
|
40310
40310
|
E(-1);
|
|
@@ -40320,15 +40320,15 @@ var Ha = i.forwardRef(
|
|
|
40320
40320
|
E((x6) => x6 >= m.length ? -1 : x6);
|
|
40321
40321
|
}, [m, a2, o]), i.useEffect(() => {
|
|
40322
40322
|
if (G !== -1 && S.current) {
|
|
40323
|
-
const x6 = G * T, D = x6 + T, F = S.current,
|
|
40324
|
-
x6 <
|
|
40323
|
+
const x6 = G * T, D = x6 + T, F = S.current, Q = F.scrollTop, de = F.clientHeight;
|
|
40324
|
+
x6 < Q ? F.scrollTop = x6 : D > Q + de && (F.scrollTop = D - de);
|
|
40325
40325
|
}
|
|
40326
40326
|
}, [G, T]);
|
|
40327
40327
|
const I = i.useCallback((x6) => {
|
|
40328
|
-
w(),
|
|
40329
|
-
}, [w,
|
|
40328
|
+
w(), P6 && W(x6);
|
|
40329
|
+
}, [w, P6, W]), K = (x6) => {
|
|
40330
40330
|
if (m.length === 0) return;
|
|
40331
|
-
["ArrowDown", "ArrowUp", "Home", "End", "Enter", " "].includes(x6.key) &&
|
|
40331
|
+
["ArrowDown", "ArrowUp", "Home", "End", "Enter", " "].includes(x6.key) && A(true);
|
|
40332
40332
|
const D = x6.target.tagName === "INPUT";
|
|
40333
40333
|
if (x6.key === "ArrowDown")
|
|
40334
40334
|
x6.preventDefault(), E((F) => Math.min(F + 1, m.length - 1));
|
|
@@ -40352,8 +40352,8 @@ var Ha = i.forwardRef(
|
|
|
40352
40352
|
ref: h,
|
|
40353
40353
|
className: ["phx-dropdown-list", Te.dropdownListRoot, f].filter(Boolean).join(" "),
|
|
40354
40354
|
style: C,
|
|
40355
|
-
onKeyDown:
|
|
40356
|
-
onMouseMove: () =>
|
|
40355
|
+
onKeyDown: K,
|
|
40356
|
+
onMouseMove: () => A(false),
|
|
40357
40357
|
children: [
|
|
40358
40358
|
p && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: Te.dropdownListSearchWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
40359
40359
|
Fa,
|
|
@@ -40380,10 +40380,10 @@ var Ha = i.forwardRef(
|
|
|
40380
40380
|
tabIndex: 0,
|
|
40381
40381
|
"aria-activedescendant": G !== -1 ? `dropdown-item-${m[G]?.value}` : void 0,
|
|
40382
40382
|
onScroll: I,
|
|
40383
|
-
children: m.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: Te.dropdownListEmptyState, children: "No results found" }) :
|
|
40383
|
+
children: m.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: Te.dropdownListEmptyState, children: "No results found" }) : P6 ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { style: { height: H, position: "relative" }, children: N.map(({ index: x6, style: D }) => {
|
|
40384
40384
|
const F = m[x6];
|
|
40385
40385
|
if (!F) return null;
|
|
40386
|
-
const
|
|
40386
|
+
const Q = x6 === G;
|
|
40387
40387
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { style: D, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
40388
40388
|
"div",
|
|
40389
40389
|
{
|
|
@@ -40399,7 +40399,7 @@ var Ha = i.forwardRef(
|
|
|
40399
40399
|
className: [
|
|
40400
40400
|
Te.dropdownListItem,
|
|
40401
40401
|
b(F.value) && Te.dropdownListItemSelected,
|
|
40402
|
-
|
|
40402
|
+
Q && J && Te.dropdownListItemFocused,
|
|
40403
40403
|
F.disabled && Te.dropdownListItemDisabled
|
|
40404
40404
|
].filter(Boolean).join(" "),
|
|
40405
40405
|
onClick: () => y6(F.value, F.disabled),
|
|
@@ -40702,11 +40702,11 @@ var Ta = ({
|
|
|
40702
40702
|
o && o(subMonths(a2, 1));
|
|
40703
40703
|
}, N = () => {
|
|
40704
40704
|
o && o(addMonths(a2, 1));
|
|
40705
|
-
}, H = (O6) => !!(h && isBefore(O6, h) && !isSameDay(O6, h) || d && isAfter(O6, d) && !isSameDay(O6, d)),
|
|
40705
|
+
}, H = (O6) => !!(h && isBefore(O6, h) && !isSameDay(O6, h) || d && isAfter(O6, d) && !isSameDay(O6, d)), W = (O6) => {
|
|
40706
40706
|
H(O6) || (f?.(O6), n === "range" && (!l || l && c2 ? C?.(O6, void 0) : isBefore(O6, l) ? C?.(O6, l) : C?.(l, O6)));
|
|
40707
|
-
}, [
|
|
40708
|
-
G(
|
|
40709
|
-
}, I = i.useMemo(() => Array.from({ length: 200 }, (O6, q) => 1900 + q), []),
|
|
40707
|
+
}, [P6, G] = i.useState("day"), E = i.useRef(null), J = i.useRef(null), A = () => {
|
|
40708
|
+
G(P6 === "day" ? "monthYear" : "day");
|
|
40709
|
+
}, I = i.useMemo(() => Array.from({ length: 200 }, (O6, q) => 1900 + q), []), K = [
|
|
40710
40710
|
"January",
|
|
40711
40711
|
"February",
|
|
40712
40712
|
"March",
|
|
@@ -40723,16 +40723,16 @@ var Ta = ({
|
|
|
40723
40723
|
i.useEffect(() => {
|
|
40724
40724
|
D(a2);
|
|
40725
40725
|
}, [a2]);
|
|
40726
|
-
const F = i.useRef(null),
|
|
40727
|
-
const re2 = O6.currentTarget,
|
|
40726
|
+
const F = i.useRef(null), Q = (O6, q) => {
|
|
40727
|
+
const re2 = O6.currentTarget, Z = 48, U = re2.scrollTop, ue = Math.round(U / Z), he = new Date(x6);
|
|
40728
40728
|
if (q === "month") {
|
|
40729
|
-
const
|
|
40730
|
-
if (
|
|
40731
|
-
he.setMonth(
|
|
40729
|
+
const z = Math.max(0, Math.min(11, ue));
|
|
40730
|
+
if (z !== x6.getMonth())
|
|
40731
|
+
he.setMonth(z), D(he);
|
|
40732
40732
|
else
|
|
40733
40733
|
return;
|
|
40734
40734
|
} else {
|
|
40735
|
-
const
|
|
40735
|
+
const z = Math.max(0, Math.min(I.length - 1, ue)), ce = I[z];
|
|
40736
40736
|
if (ce !== void 0 && ce !== x6.getFullYear())
|
|
40737
40737
|
he.setFullYear(ce), D(he);
|
|
40738
40738
|
else
|
|
@@ -40748,7 +40748,7 @@ var Ta = ({
|
|
|
40748
40748
|
}
|
|
40749
40749
|
};
|
|
40750
40750
|
return i.useEffect(() => {
|
|
40751
|
-
|
|
40751
|
+
P6 === "monthYear" && requestAnimationFrame(() => {
|
|
40752
40752
|
if (E.current) {
|
|
40753
40753
|
const O6 = E.current.children[a2.getMonth()];
|
|
40754
40754
|
O6 && O6.scrollIntoView({ block: "center", behavior: "instant" });
|
|
@@ -40758,7 +40758,7 @@ var Ta = ({
|
|
|
40758
40758
|
O6 && O6.scrollIntoView({ block: "center", behavior: "instant" });
|
|
40759
40759
|
}
|
|
40760
40760
|
});
|
|
40761
|
-
}, [
|
|
40761
|
+
}, [P6, a2]), P6 === "monthYear" ? /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: ["phx-calendar", Me.calendarRoot, !u && Me.calendarNoShadow, t].filter(Boolean).join(" "), children: [
|
|
40762
40762
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: Me.calendarHeader, children: [
|
|
40763
40763
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
40764
40764
|
ge,
|
|
@@ -40777,7 +40777,7 @@ var Ta = ({
|
|
|
40777
40777
|
variant: "tertiary",
|
|
40778
40778
|
size: "medium",
|
|
40779
40779
|
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(ChevronDownSmallFilled, { size: 20, style: { transform: "rotate(180deg)" } }),
|
|
40780
|
-
onClick:
|
|
40780
|
+
onClick: A,
|
|
40781
40781
|
children: format(x6, "MMMM yyyy")
|
|
40782
40782
|
}
|
|
40783
40783
|
) }),
|
|
@@ -40800,8 +40800,8 @@ var Ta = ({
|
|
|
40800
40800
|
{
|
|
40801
40801
|
className: `${Me.calendarPickerColumn} scrollbarHidden`,
|
|
40802
40802
|
ref: E,
|
|
40803
|
-
onScroll: (O6) =>
|
|
40804
|
-
children:
|
|
40803
|
+
onScroll: (O6) => Q(O6, "month"),
|
|
40804
|
+
children: K.map((O6, q) => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
40805
40805
|
"button",
|
|
40806
40806
|
{
|
|
40807
40807
|
type: "button",
|
|
@@ -40822,7 +40822,7 @@ var Ta = ({
|
|
|
40822
40822
|
{
|
|
40823
40823
|
className: `${Me.calendarPickerColumn} scrollbarHidden`,
|
|
40824
40824
|
ref: J,
|
|
40825
|
-
onScroll: (O6) =>
|
|
40825
|
+
onScroll: (O6) => Q(O6, "year"),
|
|
40826
40826
|
children: I.map((O6, q) => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
40827
40827
|
"button",
|
|
40828
40828
|
{
|
|
@@ -40860,7 +40860,7 @@ var Ta = ({
|
|
|
40860
40860
|
variant: "tertiary",
|
|
40861
40861
|
size: "medium",
|
|
40862
40862
|
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(ChevronDownSmallFilled, { size: 20 }),
|
|
40863
|
-
onClick:
|
|
40863
|
+
onClick: A,
|
|
40864
40864
|
children: format(a2, "MMMM yyyy")
|
|
40865
40865
|
}
|
|
40866
40866
|
) }),
|
|
@@ -40879,7 +40879,7 @@ var Ta = ({
|
|
|
40879
40879
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: Me.calendarGrid, children: [
|
|
40880
40880
|
!b && T.map((O6) => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: Me.calendarDayName, children: O6 }, O6)),
|
|
40881
40881
|
w.map((O6) => {
|
|
40882
|
-
const q = isSameMonth(O6, v), re2 = H(O6),
|
|
40882
|
+
const q = isSameMonth(O6, v), re2 = H(O6), Z = r2 ? isSameDay(O6, r2) : false, U = isToday(O6), ue = l ? isSameDay(O6, l) : false, he = c2 ? isSameDay(O6, c2) : false, z = l && c2 ? isWithinInterval(O6, { start: l, end: c2 }) && !ue && !he : false, ce = z && isSameDay(O6, _) && c2 && isAfter(c2, O6), xe = z && isSameDay(O6, v) && l && isBefore(l, O6);
|
|
40883
40883
|
return q ? /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
|
|
40884
40884
|
"div",
|
|
40885
40885
|
{
|
|
@@ -40889,13 +40889,13 @@ var Ta = ({
|
|
|
40889
40889
|
re2 && Me.calendarDisabled,
|
|
40890
40890
|
ue && Me.calendarRangeStart,
|
|
40891
40891
|
he && Me.calendarRangeEnd,
|
|
40892
|
-
|
|
40892
|
+
z && Me.calendarInRange,
|
|
40893
40893
|
xe && Me.calendarFadeStart,
|
|
40894
40894
|
ce && Me.calendarFadeEnd
|
|
40895
40895
|
].filter(Boolean).join(" "),
|
|
40896
|
-
onClick: () =>
|
|
40896
|
+
onClick: () => W(O6),
|
|
40897
40897
|
children: [
|
|
40898
|
-
(
|
|
40898
|
+
(z || ue || he) && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: Me.calendarRangeBackground }),
|
|
40899
40899
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
40900
40900
|
"button",
|
|
40901
40901
|
{
|
|
@@ -40903,7 +40903,7 @@ var Ta = ({
|
|
|
40903
40903
|
className: [
|
|
40904
40904
|
Me.calendarDayButton,
|
|
40905
40905
|
re2 && Me.calendarDisabled,
|
|
40906
|
-
|
|
40906
|
+
Z && Me.calendarSelected,
|
|
40907
40907
|
U && Me.calendarToday
|
|
40908
40908
|
].filter(Boolean).join(" "),
|
|
40909
40909
|
tabIndex: re2 ? -1 : 0,
|
|
@@ -41496,8 +41496,8 @@ var _8 = i.forwardRef(
|
|
|
41496
41496
|
if (!r2) return;
|
|
41497
41497
|
const T = _.current;
|
|
41498
41498
|
if (!T) return;
|
|
41499
|
-
const N = ((
|
|
41500
|
-
let G =
|
|
41499
|
+
const N = ((P6) => {
|
|
41500
|
+
let G = P6.parentElement;
|
|
41501
41501
|
for (; G; ) {
|
|
41502
41502
|
const E = window.getComputedStyle(G);
|
|
41503
41503
|
if (/(auto|scroll)/.test(E.overflow + E.overflowY))
|
|
@@ -41507,13 +41507,13 @@ var _8 = i.forwardRef(
|
|
|
41507
41507
|
return null;
|
|
41508
41508
|
})(T), H = () => {
|
|
41509
41509
|
if (!T) return;
|
|
41510
|
-
const
|
|
41510
|
+
const P6 = T.getBoundingClientRect(), G = N ? N.getBoundingClientRect() : { top: 0 }, E = P6.top <= G.top + 1;
|
|
41511
41511
|
y6(E);
|
|
41512
41512
|
};
|
|
41513
41513
|
H();
|
|
41514
|
-
const
|
|
41515
|
-
return
|
|
41516
|
-
|
|
41514
|
+
const W = N || window;
|
|
41515
|
+
return W.addEventListener("scroll", H, { passive: true }), window.addEventListener("resize", H), () => {
|
|
41516
|
+
W.removeEventListener("scroll", H), window.removeEventListener("resize", H);
|
|
41517
41517
|
};
|
|
41518
41518
|
}, [r2]);
|
|
41519
41519
|
const S = i.useCallback((T) => {
|
|
@@ -41812,7 +41812,7 @@ var U8 = i.forwardRef(
|
|
|
41812
41812
|
...h
|
|
41813
41813
|
}, d) => {
|
|
41814
41814
|
const u = {
|
|
41815
|
-
|
|
41815
|
+
...$("maxW", o ? "full" : a2 || t, (y6) => typeof y6 == "string" && jn[y6] ? jn[y6] : typeof y6 == "number" ? `${y6}px` : y6)
|
|
41816
41816
|
}, m = Zt(
|
|
41817
41817
|
"phx-container",
|
|
41818
41818
|
q8.containerRoot,
|
|
@@ -42076,35 +42076,35 @@ var ma = i.forwardRef(
|
|
|
42076
42076
|
} = t, [k6, S] = i.useState(false), [w, T] = i.useState(false), M = u === "multi" ? t.defaultValue || [] : t.defaultValue || "", [N, H] = ia({
|
|
42077
42077
|
value: t.value,
|
|
42078
42078
|
defaultValue: M,
|
|
42079
|
-
onChange: (
|
|
42080
|
-
t.onChange?.(
|
|
42079
|
+
onChange: (z) => {
|
|
42080
|
+
t.onChange?.(z);
|
|
42081
42081
|
}
|
|
42082
|
-
}),
|
|
42082
|
+
}), W = i.useRef(null), P6 = i.useRef(null), G = i.useRef(null), { style: E } = rn(P6, G, k6, {
|
|
42083
42083
|
margin: 32,
|
|
42084
42084
|
strategy: m ? "fixed" : "absolute",
|
|
42085
42085
|
matchTriggerWidth: b,
|
|
42086
42086
|
onClose: () => S(false)
|
|
42087
42087
|
}), J = N ?? (u === "multi" ? [] : "");
|
|
42088
|
-
let
|
|
42089
|
-
u === "multi" ?
|
|
42090
|
-
const I = u === "multi" ? t.defaultValue || [] : t.defaultValue || "",
|
|
42088
|
+
let A;
|
|
42089
|
+
u === "multi" ? A = Array.isArray(J) && J.length > 0 : A = J !== "" && J !== void 0 && (Array.isArray(J) ? J.length > 0 : true);
|
|
42090
|
+
const I = u === "multi" ? t.defaultValue || [] : t.defaultValue || "", K = u === "multi" ? JSON.stringify(J) !== JSON.stringify(I) : J !== I, x6 = d && A && K && w && !h, F = (() => {
|
|
42091
42091
|
if (u === "multi") {
|
|
42092
|
-
const
|
|
42093
|
-
return
|
|
42092
|
+
const z = J;
|
|
42093
|
+
return z.length === 0 ? "" : z.length === 1 ? C.find((xe) => xe.value === z[0])?.label || "" : `${z.length} selected`;
|
|
42094
42094
|
} else
|
|
42095
42095
|
return C.find((ce) => ce.value === J)?.label || "";
|
|
42096
|
-
})(),
|
|
42096
|
+
})(), Q = u === "single" && C.find((z) => z.value === J)?.icon || c2, de = o && n === "inside", O6 = o && n === "outside", q = n === "outside", re2 = () => {
|
|
42097
42097
|
h || S(!k6);
|
|
42098
|
-
},
|
|
42098
|
+
}, Z = (z) => {
|
|
42099
42099
|
if (u === "multi") {
|
|
42100
|
-
const ce = Array.isArray(
|
|
42100
|
+
const ce = Array.isArray(z) ? z : [z];
|
|
42101
42101
|
H(ce);
|
|
42102
42102
|
} else {
|
|
42103
|
-
const ce = Array.isArray(
|
|
42103
|
+
const ce = Array.isArray(z) ? z[0] || "" : z;
|
|
42104
42104
|
H(ce), S(false);
|
|
42105
42105
|
}
|
|
42106
|
-
}, U = (
|
|
42107
|
-
if (
|
|
42106
|
+
}, U = (z) => {
|
|
42107
|
+
if (z && z.stopPropagation(), u === "multi") {
|
|
42108
42108
|
const ce = t.defaultValue || [];
|
|
42109
42109
|
H(ce);
|
|
42110
42110
|
} else {
|
|
@@ -42113,23 +42113,23 @@ var ma = i.forwardRef(
|
|
|
42113
42113
|
}
|
|
42114
42114
|
};
|
|
42115
42115
|
In(
|
|
42116
|
-
m ? G :
|
|
42116
|
+
m ? G : W,
|
|
42117
42117
|
() => S(false),
|
|
42118
42118
|
k6,
|
|
42119
|
-
[
|
|
42119
|
+
[P6]
|
|
42120
42120
|
), i.useEffect(() => {
|
|
42121
|
-
const
|
|
42121
|
+
const z = (ce) => {
|
|
42122
42122
|
ce.key === "Escape" && S(false);
|
|
42123
42123
|
};
|
|
42124
|
-
return k6 && document.addEventListener("keydown",
|
|
42125
|
-
document.removeEventListener("keydown",
|
|
42124
|
+
return k6 && document.addEventListener("keydown", z), () => {
|
|
42125
|
+
document.removeEventListener("keydown", z);
|
|
42126
42126
|
};
|
|
42127
42127
|
}, [k6]);
|
|
42128
|
-
const ue = C.map((
|
|
42129
|
-
value:
|
|
42130
|
-
label:
|
|
42131
|
-
icon:
|
|
42132
|
-
disabled:
|
|
42128
|
+
const ue = C.map((z) => ({
|
|
42129
|
+
value: z.value,
|
|
42130
|
+
label: z.label,
|
|
42131
|
+
icon: z.icon,
|
|
42132
|
+
disabled: z.disabled
|
|
42133
42133
|
})), he = /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
42134
42134
|
"div",
|
|
42135
42135
|
{
|
|
@@ -42138,7 +42138,7 @@ var ma = i.forwardRef(
|
|
|
42138
42138
|
style: {
|
|
42139
42139
|
...E,
|
|
42140
42140
|
right: E.left ? "auto" : void 0,
|
|
42141
|
-
minWidth: m ?
|
|
42141
|
+
minWidth: m ? P6.current?.offsetWidth : "100%",
|
|
42142
42142
|
width: b ? m ? void 0 : "100%" : "auto"
|
|
42143
42143
|
},
|
|
42144
42144
|
children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
@@ -42147,12 +42147,12 @@ var ma = i.forwardRef(
|
|
|
42147
42147
|
items: ue,
|
|
42148
42148
|
value: J,
|
|
42149
42149
|
mode: u,
|
|
42150
|
-
onChange:
|
|
42150
|
+
onChange: Z,
|
|
42151
42151
|
maxHeight: 300,
|
|
42152
|
-
ref: (
|
|
42153
|
-
k6 &&
|
|
42154
|
-
const ce =
|
|
42155
|
-
ce ? ce.focus() :
|
|
42152
|
+
ref: (z) => {
|
|
42153
|
+
k6 && z && setTimeout(() => {
|
|
42154
|
+
const ce = z.querySelector('input[type="search"]');
|
|
42155
|
+
ce ? ce.focus() : z.querySelector('[role="listbox"]')?.focus();
|
|
42156
42156
|
}, 0);
|
|
42157
42157
|
}
|
|
42158
42158
|
}
|
|
@@ -42162,8 +42162,8 @@ var ma = i.forwardRef(
|
|
|
42162
42162
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
|
|
42163
42163
|
"div",
|
|
42164
42164
|
{
|
|
42165
|
-
ref: (
|
|
42166
|
-
|
|
42165
|
+
ref: (z) => {
|
|
42166
|
+
W.current = z, typeof a2 == "function" ? a2(z) : a2 && (a2.current = z);
|
|
42167
42167
|
},
|
|
42168
42168
|
className: Xt(
|
|
42169
42169
|
"phx-dropdown",
|
|
@@ -42180,12 +42180,12 @@ var ma = i.forwardRef(
|
|
|
42180
42180
|
Ve.dropdownLabelOutside,
|
|
42181
42181
|
y6 === "medium" && Ve.dropdownLabelOutsideMedium
|
|
42182
42182
|
), children: o }),
|
|
42183
|
-
/* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: Ve.dropdownTriggerWrapper, ref:
|
|
42183
|
+
/* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: Ve.dropdownTriggerWrapper, ref: P6, children: [
|
|
42184
42184
|
L ? L({
|
|
42185
42185
|
onClick: re2,
|
|
42186
42186
|
value: J,
|
|
42187
42187
|
isOpen: k6,
|
|
42188
|
-
ref:
|
|
42188
|
+
ref: P6
|
|
42189
42189
|
}) : /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
|
|
42190
42190
|
"div",
|
|
42191
42191
|
{
|
|
@@ -42200,18 +42200,18 @@ var ma = i.forwardRef(
|
|
|
42200
42200
|
),
|
|
42201
42201
|
onClick: re2,
|
|
42202
42202
|
children: [
|
|
42203
|
-
q &&
|
|
42203
|
+
q && Q && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: Ve.dropdownLeadingIcon, children: Q }),
|
|
42204
42204
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: Ve.dropdownTriggerContent, children: [
|
|
42205
42205
|
de && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: Xt(
|
|
42206
42206
|
Ve.dropdownInlineLabel,
|
|
42207
|
-
|
|
42207
|
+
A && Ve.dropdownInlineLabelShrunk
|
|
42208
42208
|
), children: o }),
|
|
42209
42209
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: Xt(
|
|
42210
42210
|
Ve.dropdownValueText,
|
|
42211
42211
|
de && Ve.dropdownValueTextWithInlineLabel,
|
|
42212
|
-
!
|
|
42213
|
-
de &&
|
|
42214
|
-
), children:
|
|
42212
|
+
!A && Ve.dropdownValueTextPlaceholder,
|
|
42213
|
+
de && A && Ve.dropdownValueTextVisible
|
|
42214
|
+
), children: A ? F : de ? "" : f })
|
|
42215
42215
|
] }),
|
|
42216
42216
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: Xt(Ve.dropdownTrailing, !d && Ve.dropdownTrailingCompact), children: [
|
|
42217
42217
|
x6 && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
@@ -42409,7 +42409,7 @@ function Do({
|
|
|
42409
42409
|
flush: T = false,
|
|
42410
42410
|
rowActions: M
|
|
42411
42411
|
}) {
|
|
42412
|
-
const N = a2.map((R) => On(R, o)), H = N.length > 0 && N.every((R) => r2.includes(R)),
|
|
42412
|
+
const N = a2.map((R) => On(R, o)), H = N.length > 0 && N.every((R) => r2.includes(R)), W = N.some((R) => r2.includes(R)) && !H, P6 = () => {
|
|
42413
42413
|
l && l(H ? [] : N);
|
|
42414
42414
|
}, G = (R) => {
|
|
42415
42415
|
l && (r2.includes(R) ? l(r2.filter((X) => X !== R)) : l([...r2, R]));
|
|
@@ -42418,8 +42418,8 @@ function Do({
|
|
|
42418
42418
|
let X = "asc";
|
|
42419
42419
|
c2 === R && (f === "asc" ? X = "desc" : f === "desc" && (X = null)), C(R, X);
|
|
42420
42420
|
}, J = t.filter((R) => R.sticky);
|
|
42421
|
-
let
|
|
42422
|
-
const I = n || J.length > 0,
|
|
42421
|
+
let A = n ? 48 : 0;
|
|
42422
|
+
const I = n || J.length > 0, K = b ? "small" : _, x6 = oe[`dataTable${K.charAt(0).toUpperCase() + K.slice(1)}`], [D, F] = i.useState({}), Q = i.useRef(null), [de, O6] = i.useState(null), q = i.useRef(null), re2 = i.useRef(null), [Z, U] = i.useState(false), [ue, he] = i.useState(false), [z, ce] = i.useState(null), [xe, we] = i.useState(false), te = i.useMemo(() => {
|
|
42423
42423
|
if (M) return null;
|
|
42424
42424
|
const R = t[t.length - 1];
|
|
42425
42425
|
return !R || R.cellVariant !== "actions" ? null : R;
|
|
@@ -42433,8 +42433,8 @@ function Do({
|
|
|
42433
42433
|
}, [te, M]), le = !!ae, Y = !!M || !!te && ue, ee = i.useCallback(() => {
|
|
42434
42434
|
const R = re2.current?.contentElement || q.current;
|
|
42435
42435
|
if (R) {
|
|
42436
|
-
const { scrollLeft: X, scrollWidth: j, clientWidth:
|
|
42437
|
-
if (U(X > 0), he(X < j -
|
|
42436
|
+
const { scrollLeft: X, scrollWidth: j, clientWidth: V } = R;
|
|
42437
|
+
if (U(X > 0), he(X < j - V - 2), X <= 0) {
|
|
42438
42438
|
ce(null), we(false);
|
|
42439
42439
|
return;
|
|
42440
42440
|
}
|
|
@@ -42464,7 +42464,7 @@ function Do({
|
|
|
42464
42464
|
R.preventDefault(), R.stopPropagation();
|
|
42465
42465
|
const j = R.target.closest("th");
|
|
42466
42466
|
if (!j) return;
|
|
42467
|
-
const
|
|
42467
|
+
const V = j.getBoundingClientRect().width, ne = j.parentElement;
|
|
42468
42468
|
if (ne) {
|
|
42469
42469
|
const be = Array.from(ne.children), ke = {};
|
|
42470
42470
|
t.forEach((Be, Ge) => {
|
|
@@ -42475,16 +42475,16 @@ function Do({
|
|
|
42475
42475
|
...ke
|
|
42476
42476
|
}));
|
|
42477
42477
|
}
|
|
42478
|
-
|
|
42478
|
+
Q.current = { startX: R.clientX, startWidth: V, colKey: X }, O6(X);
|
|
42479
42479
|
const se = (be) => {
|
|
42480
|
-
if (!
|
|
42481
|
-
const { startX: ke, startWidth: Be, colKey: Ge } =
|
|
42480
|
+
if (!Q.current) return;
|
|
42481
|
+
const { startX: ke, startWidth: Be, colKey: Ge } = Q.current, Je = be.clientX - ke, ft = Math.max(50, Be + Je);
|
|
42482
42482
|
F((ln2) => ({
|
|
42483
42483
|
...ln2,
|
|
42484
42484
|
[Ge]: ft
|
|
42485
42485
|
}));
|
|
42486
42486
|
}, Ce = () => {
|
|
42487
|
-
|
|
42487
|
+
Q.current = null, O6(null), document.removeEventListener("mousemove", se), document.removeEventListener("mouseup", Ce), document.body.style.cursor = "";
|
|
42488
42488
|
};
|
|
42489
42489
|
document.addEventListener("mousemove", se), document.addEventListener("mouseup", Ce), document.body.style.cursor = "col-resize";
|
|
42490
42490
|
}, [t, n]);
|
|
@@ -42505,7 +42505,7 @@ function Do({
|
|
|
42505
42505
|
className: [
|
|
42506
42506
|
oe.dataTableScrollGradient,
|
|
42507
42507
|
oe.dataTableScrollGradientLeft,
|
|
42508
|
-
|
|
42508
|
+
Z && !I && oe.dataTableScrollGradientVisible
|
|
42509
42509
|
].filter(Boolean).join(" ")
|
|
42510
42510
|
}
|
|
42511
42511
|
),
|
|
@@ -42525,7 +42525,7 @@ function Do({
|
|
|
42525
42525
|
ref: re2,
|
|
42526
42526
|
className: [
|
|
42527
42527
|
oe.dataTableContainer,
|
|
42528
|
-
|
|
42528
|
+
Z && oe.dataTableScrolled
|
|
42529
42529
|
].filter(Boolean).join(" "),
|
|
42530
42530
|
maxHeight: p,
|
|
42531
42531
|
onScroll: ee,
|
|
@@ -42579,32 +42579,32 @@ function Do({
|
|
|
42579
42579
|
ra,
|
|
42580
42580
|
{
|
|
42581
42581
|
checked: H,
|
|
42582
|
-
indeterminate:
|
|
42583
|
-
onChange:
|
|
42582
|
+
indeterminate: W,
|
|
42583
|
+
onChange: P6,
|
|
42584
42584
|
"aria-label": "Select all rows"
|
|
42585
42585
|
}
|
|
42586
42586
|
)
|
|
42587
42587
|
}
|
|
42588
42588
|
),
|
|
42589
42589
|
t.map((R, X) => {
|
|
42590
|
-
const j = c2 === R.key,
|
|
42590
|
+
const j = c2 === R.key, V = R.sticky;
|
|
42591
42591
|
let ne;
|
|
42592
|
-
return
|
|
42592
|
+
return V && (ne = A, A += parseInt(R.width || "150", 10)), /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
|
|
42593
42593
|
"th",
|
|
42594
42594
|
{
|
|
42595
42595
|
className: [
|
|
42596
42596
|
"phx-data-table-head-cell",
|
|
42597
42597
|
oe.dataTableHeadCell,
|
|
42598
42598
|
R.sortable && oe.dataTableThSortable,
|
|
42599
|
-
|
|
42600
|
-
|
|
42599
|
+
V && oe.dataTableThSticky,
|
|
42600
|
+
V && X === z && oe.dataTableThStickyLast,
|
|
42601
42601
|
R.align && oe[`dataTableThAlign${R.align.charAt(0).toUpperCase() + R.align.slice(1)}`]
|
|
42602
42602
|
].filter(Boolean).join(" "),
|
|
42603
42603
|
style: {
|
|
42604
42604
|
width: D[R.key] ?? R.width,
|
|
42605
42605
|
// Enforce minWidth from state if resizing/resized to prevent shrinking
|
|
42606
|
-
minWidth: D[R.key] ?? R.minWidth ?? (
|
|
42607
|
-
...
|
|
42606
|
+
minWidth: D[R.key] ?? R.minWidth ?? (V ? R.width : void 0),
|
|
42607
|
+
...V && { left: ne }
|
|
42608
42608
|
},
|
|
42609
42609
|
onClick: R.sortable ? () => E(R.key) : void 0,
|
|
42610
42610
|
"aria-sort": j ? f === "asc" ? "ascending" : "descending" : void 0,
|
|
@@ -42652,7 +42652,7 @@ function Do({
|
|
|
42652
42652
|
le && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("th", { style: { padding: 0, width: 0, border: "none" } })
|
|
42653
42653
|
] }) }),
|
|
42654
42654
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)("tbody", { className: ["phx-data-table-body", oe.dataTableBody].filter(Boolean).join(" "), children: a2.map((R, X) => {
|
|
42655
|
-
const j = On(R, o),
|
|
42655
|
+
const j = On(R, o), V = r2.includes(j);
|
|
42656
42656
|
let ne = n ? 48 : 0;
|
|
42657
42657
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
|
|
42658
42658
|
"tr",
|
|
@@ -42661,7 +42661,7 @@ function Do({
|
|
|
42661
42661
|
"phx-data-table-row",
|
|
42662
42662
|
oe.dataTableRow,
|
|
42663
42663
|
m && oe.dataTableRowHoverable,
|
|
42664
|
-
|
|
42664
|
+
V && oe.dataTableRowSelected,
|
|
42665
42665
|
w && oe.dataTableRowClickable,
|
|
42666
42666
|
le && oe.dataTableRowWithActions,
|
|
42667
42667
|
Y && oe.dataTableRowWithActionsActive
|
|
@@ -42682,7 +42682,7 @@ function Do({
|
|
|
42682
42682
|
children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
42683
42683
|
ra,
|
|
42684
42684
|
{
|
|
42685
|
-
checked:
|
|
42685
|
+
checked: V,
|
|
42686
42686
|
onChange: () => G(j),
|
|
42687
42687
|
"aria-label": `Select row ${j}`
|
|
42688
42688
|
}
|
|
@@ -42699,7 +42699,7 @@ function Do({
|
|
|
42699
42699
|
"phx-data-table-body-cell",
|
|
42700
42700
|
oe.dataTableBodyCell,
|
|
42701
42701
|
ke && oe.dataTableTdSticky,
|
|
42702
|
-
ke && Ce ===
|
|
42702
|
+
ke && Ce === z && oe.dataTableTdStickyLast,
|
|
42703
42703
|
se.align && oe[`dataTableTdAlign${se.align.charAt(0).toUpperCase() + se.align.slice(1)}`],
|
|
42704
42704
|
se.cellVariant === "avatar" && oe.dataTableTdWithAvatar,
|
|
42705
42705
|
se.cellVariant === "actions" && oe.dataTableTdWithActions,
|
|
@@ -42833,45 +42833,45 @@ var vu = i.forwardRef(
|
|
|
42833
42833
|
value: c2,
|
|
42834
42834
|
defaultValue: f,
|
|
42835
42835
|
onChange: C
|
|
42836
|
-
}),
|
|
42837
|
-
const Y =
|
|
42838
|
-
const ne =
|
|
42839
|
-
return !(!ne || !["d", "m", "y"].includes(ne) || !
|
|
42840
|
-
}), R = Y.map((
|
|
42836
|
+
}), W = typeof m == "string" ? m : "dd/MM/yyyy", [P6, G] = i.useState(() => c2 ? format(c2, W) : f ? format(f, W) : ""), E = i.useMemo(() => {
|
|
42837
|
+
const Y = W.match(/[A-Za-z]+/g) ?? [], ee = W.split(/[A-Za-z]+/).slice(1, -1), ie = Y.length > 0 && Y.every((V) => {
|
|
42838
|
+
const ne = V[0]?.toLowerCase();
|
|
42839
|
+
return !(!ne || !["d", "m", "y"].includes(ne) || !V.split("").every((se) => se.toLowerCase() === ne) || (ne === "d" || ne === "m") && V.length > 2 || ne === "y" && V.length > 4);
|
|
42840
|
+
}), R = Y.map((V) => V.length), X = R.reduce((V, ne) => V + ne, 0), j = ie && ee.length > 0;
|
|
42841
42841
|
return {
|
|
42842
42842
|
groupLengths: R,
|
|
42843
42843
|
separators: ee,
|
|
42844
42844
|
totalDigits: X,
|
|
42845
42845
|
canAutoFormat: j
|
|
42846
42846
|
};
|
|
42847
|
-
}, [
|
|
42847
|
+
}, [W]), J = i.useRef(null), A = i.useRef(null), I = i.useRef(null);
|
|
42848
42848
|
i.useRef(null);
|
|
42849
|
-
const { style:
|
|
42849
|
+
const { style: K } = rn(A, I, L, {
|
|
42850
42850
|
minHeight: 400,
|
|
42851
42851
|
margin: 32,
|
|
42852
42852
|
strategy: y6 ? "fixed" : "absolute",
|
|
42853
42853
|
onClose: () => k6(false)
|
|
42854
|
-
}), x6 = N, D = x6 != null, F =
|
|
42854
|
+
}), x6 = N, D = x6 != null, F = P6.trim().length > 0, [Q, de] = i.useState(
|
|
42855
42855
|
x6 || /* @__PURE__ */ new Date()
|
|
42856
42856
|
);
|
|
42857
42857
|
i.useEffect(() => {
|
|
42858
42858
|
L && x6 && de(x6);
|
|
42859
42859
|
}, [L, x6]), i.useEffect(() => {
|
|
42860
|
-
T || G(D ? format(x6,
|
|
42861
|
-
}, [x6,
|
|
42860
|
+
T || G(D ? format(x6, W) : "");
|
|
42861
|
+
}, [x6, W, D, T]);
|
|
42862
42862
|
const O6 = () => {
|
|
42863
42863
|
h || k6(!L);
|
|
42864
42864
|
}, q = (Y) => {
|
|
42865
|
-
H(Y), G(format(Y,
|
|
42865
|
+
H(Y), G(format(Y, W)), k6(false);
|
|
42866
42866
|
}, re2 = (Y) => {
|
|
42867
42867
|
Y.preventDefault(), Y.stopPropagation(), H(void 0), G("");
|
|
42868
|
-
},
|
|
42868
|
+
}, Z = i.useCallback((Y) => !(p && isBefore(Y, p) && !isSameDay(Y, p) || u && isAfter(Y, u) && !isSameDay(Y, u)), [p, u]), U = i.useCallback((Y) => {
|
|
42869
42869
|
const ee = Y.trim();
|
|
42870
|
-
if (!ee || !isMatch(ee,
|
|
42871
|
-
const ie = parse(ee,
|
|
42872
|
-
if (isValid(ie) &&
|
|
42870
|
+
if (!ee || !isMatch(ee, W)) return;
|
|
42871
|
+
const ie = parse(ee, W, /* @__PURE__ */ new Date());
|
|
42872
|
+
if (isValid(ie) && Z(ie))
|
|
42873
42873
|
return ie;
|
|
42874
|
-
}, [
|
|
42874
|
+
}, [W, Z]), ue = i.useCallback((Y) => {
|
|
42875
42875
|
if (!E.canAutoFormat) return Y;
|
|
42876
42876
|
const ee = Y.replace(/\D/g, "").slice(0, E.totalDigits);
|
|
42877
42877
|
if (!ee) return "";
|
|
@@ -42879,9 +42879,9 @@ var vu = i.forwardRef(
|
|
|
42879
42879
|
for (let X = 0; X < E.groupLengths.length; X += 1) {
|
|
42880
42880
|
const j = E.groupLengths[X];
|
|
42881
42881
|
if (j === void 0) break;
|
|
42882
|
-
const
|
|
42883
|
-
if (!
|
|
42884
|
-
if (ie +=
|
|
42882
|
+
const V = ee.slice(R, R + j);
|
|
42883
|
+
if (!V) break;
|
|
42884
|
+
if (ie += V, R += V.length, V.length === j && X < E.separators.length) {
|
|
42885
42885
|
const ne = E.separators[X];
|
|
42886
42886
|
ne && (ie += ne);
|
|
42887
42887
|
}
|
|
@@ -42892,46 +42892,46 @@ var vu = i.forwardRef(
|
|
|
42892
42892
|
const ee = Y.target, ie = ee.selectionStart ?? 0, R = ee.value, X = ue(R);
|
|
42893
42893
|
G(X);
|
|
42894
42894
|
const j = R.slice(0, ie).replace(/\D/g, "").length;
|
|
42895
|
-
let
|
|
42895
|
+
let V = 0, ne = 0;
|
|
42896
42896
|
for (let Ce = 0; Ce < X.length && ne !== j; Ce++)
|
|
42897
|
-
/\d/.test(X[Ce]) && ne++,
|
|
42898
|
-
for (;
|
|
42899
|
-
|
|
42897
|
+
/\d/.test(X[Ce]) && ne++, V = Ce + 1;
|
|
42898
|
+
for (; V < X.length && /\D/.test(X[V]); )
|
|
42899
|
+
V++;
|
|
42900
42900
|
if (requestAnimationFrame(() => {
|
|
42901
|
-
ee.setSelectionRange(
|
|
42901
|
+
ee.setSelectionRange(V, V);
|
|
42902
42902
|
}), !X.trim()) {
|
|
42903
42903
|
H(void 0);
|
|
42904
42904
|
return;
|
|
42905
42905
|
}
|
|
42906
42906
|
const se = U(X);
|
|
42907
42907
|
se && (H(se), de(se));
|
|
42908
|
-
},
|
|
42908
|
+
}, z = () => {
|
|
42909
42909
|
h || (M(true), k6(true));
|
|
42910
42910
|
}, ce = () => {
|
|
42911
|
-
if (M(false), !
|
|
42911
|
+
if (M(false), !P6.trim()) {
|
|
42912
42912
|
H(void 0), G("");
|
|
42913
42913
|
return;
|
|
42914
42914
|
}
|
|
42915
|
-
const Y = U(
|
|
42915
|
+
const Y = U(P6);
|
|
42916
42916
|
if (Y) {
|
|
42917
|
-
const ee = format(Y,
|
|
42918
|
-
ee !==
|
|
42917
|
+
const ee = format(Y, W);
|
|
42918
|
+
ee !== P6 && G(ee), H(Y);
|
|
42919
42919
|
return;
|
|
42920
42920
|
}
|
|
42921
|
-
G(D ? format(x6,
|
|
42921
|
+
G(D ? format(x6, W) : "");
|
|
42922
42922
|
}, xe = (Y) => {
|
|
42923
42923
|
if (Y.key === "Enter") {
|
|
42924
|
-
const X = U(
|
|
42925
|
-
X && (H(X), G(format(X,
|
|
42924
|
+
const X = U(P6);
|
|
42925
|
+
X && (H(X), G(format(X, W)), k6(false));
|
|
42926
42926
|
return;
|
|
42927
42927
|
}
|
|
42928
42928
|
const ee = Y.currentTarget, ie = ee.selectionStart ?? 0, R = ee.selectionEnd ?? 0;
|
|
42929
42929
|
if (ie === R) {
|
|
42930
42930
|
if (Y.key === "Backspace" && ie > 0) {
|
|
42931
|
-
const X =
|
|
42931
|
+
const X = P6[ie - 1];
|
|
42932
42932
|
if (X !== void 0 && /\D/.test(X)) {
|
|
42933
42933
|
Y.preventDefault();
|
|
42934
|
-
const j =
|
|
42934
|
+
const j = P6.slice(0, ie - 1), V = P6.slice(ie), se = j.replace(/\D+$/, "").slice(0, -1), Ce = se + V, be = ue(Ce);
|
|
42935
42935
|
G(be);
|
|
42936
42936
|
const ke = se.replace(/\D/g, "").length;
|
|
42937
42937
|
let Be = 0, Ge = 0;
|
|
@@ -42946,11 +42946,11 @@ var vu = i.forwardRef(
|
|
|
42946
42946
|
Je && (H(Je), de(Je));
|
|
42947
42947
|
}
|
|
42948
42948
|
}
|
|
42949
|
-
} else if (Y.key === "Delete" && ie <
|
|
42950
|
-
const X =
|
|
42949
|
+
} else if (Y.key === "Delete" && ie < P6.length) {
|
|
42950
|
+
const X = P6[ie];
|
|
42951
42951
|
if (X !== void 0 && /\D/.test(X)) {
|
|
42952
42952
|
Y.preventDefault();
|
|
42953
|
-
const j =
|
|
42953
|
+
const j = P6.slice(0, ie), ne = P6.slice(ie).replace(/^\D+/, "").slice(1), se = j + ne, Ce = ue(se);
|
|
42954
42954
|
G(Ce);
|
|
42955
42955
|
const be = j.replace(/\D/g, "").length;
|
|
42956
42956
|
let ke = 0, Be = 0;
|
|
@@ -42990,7 +42990,7 @@ var vu = i.forwardRef(
|
|
|
42990
42990
|
style: { ...s2, width: v },
|
|
42991
42991
|
children: [
|
|
42992
42992
|
te && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("label", { className: [je.datePickerLabel, je.datePickerLabelOutside].join(" "), children: t }),
|
|
42993
|
-
/* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: je.datePickerTriggerWrapper, ref:
|
|
42993
|
+
/* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: je.datePickerTriggerWrapper, ref: A, children: [
|
|
42994
42994
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
|
|
42995
42995
|
"div",
|
|
42996
42996
|
{
|
|
@@ -43029,9 +43029,9 @@ var vu = i.forwardRef(
|
|
|
43029
43029
|
we && ae && je.datePickerInputVisible
|
|
43030
43030
|
].filter(Boolean).join(" "),
|
|
43031
43031
|
placeholder: we ? "" : l,
|
|
43032
|
-
value:
|
|
43032
|
+
value: P6,
|
|
43033
43033
|
onChange: he,
|
|
43034
|
-
onFocus:
|
|
43034
|
+
onFocus: z,
|
|
43035
43035
|
onBlur: ce,
|
|
43036
43036
|
onKeyDown: xe,
|
|
43037
43037
|
onClick: (Y) => {
|
|
@@ -43067,14 +43067,14 @@ var vu = i.forwardRef(
|
|
|
43067
43067
|
ref: I,
|
|
43068
43068
|
className: je.datePickerPopover,
|
|
43069
43069
|
style: {
|
|
43070
|
-
|
|
43071
|
-
right:
|
|
43070
|
+
...K,
|
|
43071
|
+
right: K.left ? "auto" : void 0,
|
|
43072
43072
|
width: "auto"
|
|
43073
43073
|
},
|
|
43074
43074
|
children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
43075
43075
|
Ta,
|
|
43076
43076
|
{
|
|
43077
|
-
month:
|
|
43077
|
+
month: Q,
|
|
43078
43078
|
onMonthChange: de,
|
|
43079
43079
|
selectedDate: x6,
|
|
43080
43080
|
onDayClick: q,
|
|
@@ -43197,32 +43197,32 @@ var x7 = i.forwardRef(
|
|
|
43197
43197
|
t ? (T.current = document.activeElement, y6?.current && y6.current.focus()) : T.current && (T.current.focus(), T.current = null);
|
|
43198
43198
|
}, [t, y6]), i.useEffect(() => {
|
|
43199
43199
|
if (!t || !m) return;
|
|
43200
|
-
const
|
|
43200
|
+
const A = (I) => {
|
|
43201
43201
|
I.key === "Escape" && a2?.();
|
|
43202
43202
|
};
|
|
43203
|
-
return document.addEventListener("keydown",
|
|
43203
|
+
return document.addEventListener("keydown", A), () => document.removeEventListener("keydown", A);
|
|
43204
43204
|
}, [t, m, a2]), Co(t);
|
|
43205
43205
|
const M = i.useCallback(() => {
|
|
43206
|
-
const
|
|
43207
|
-
if (!
|
|
43208
|
-
const { scrollTop: I, scrollHeight:
|
|
43209
|
-
k6(D && !F), w(D && !
|
|
43206
|
+
const A = v.current;
|
|
43207
|
+
if (!A) return;
|
|
43208
|
+
const { scrollTop: I, scrollHeight: K, clientHeight: x6 } = A, D = K > x6, F = I <= 1, Q = I + x6 >= K - 1;
|
|
43209
|
+
k6(D && !F), w(D && !Q);
|
|
43210
43210
|
}, []);
|
|
43211
43211
|
i.useEffect(() => {
|
|
43212
43212
|
t && requestAnimationFrame(M);
|
|
43213
43213
|
}, [t, d, M]);
|
|
43214
|
-
const N = i.useCallback((
|
|
43215
|
-
_.current =
|
|
43214
|
+
const N = i.useCallback((A) => {
|
|
43215
|
+
_.current = A, typeof b == "function" ? b(A) : b && (b.current = A);
|
|
43216
43216
|
}, [b]);
|
|
43217
43217
|
if (!t) return null;
|
|
43218
|
-
const H = (
|
|
43219
|
-
u &&
|
|
43220
|
-
},
|
|
43218
|
+
const H = (A) => {
|
|
43219
|
+
u && A.target === A.currentTarget && a2?.();
|
|
43220
|
+
}, W = {
|
|
43221
43221
|
small: ve.dialogSizeSmall,
|
|
43222
43222
|
medium: ve.dialogSizeMedium,
|
|
43223
43223
|
large: ve.dialogSizeLarge,
|
|
43224
43224
|
xlarge: ve.dialogSizeXlarge
|
|
43225
|
-
}[r2],
|
|
43225
|
+
}[r2], P6 = {
|
|
43226
43226
|
center: ve.dialogHeaderCenter,
|
|
43227
43227
|
left: ve.dialogHeaderLeft
|
|
43228
43228
|
}[l], G = {
|
|
@@ -43231,22 +43231,22 @@ var x7 = i.forwardRef(
|
|
|
43231
43231
|
withCheckbox: ve.dialogFooterWithCheckbox
|
|
43232
43232
|
}[f], E = () => {
|
|
43233
43233
|
if (C.length === 0 && !h) return null;
|
|
43234
|
-
const
|
|
43234
|
+
const A = /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
43235
43235
|
"div",
|
|
43236
43236
|
{
|
|
43237
43237
|
className: [
|
|
43238
43238
|
ve.dialogButtonGroup,
|
|
43239
43239
|
f === "vertical" && ve.dialogButtonGroupVertical
|
|
43240
43240
|
].filter(Boolean).join(" "),
|
|
43241
|
-
children: C.map((
|
|
43241
|
+
children: C.map((K, x6) => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
43242
43242
|
Oe,
|
|
43243
43243
|
{
|
|
43244
|
-
variant:
|
|
43245
|
-
onClick:
|
|
43246
|
-
disabled:
|
|
43247
|
-
type:
|
|
43248
|
-
form:
|
|
43249
|
-
children:
|
|
43244
|
+
variant: K.variant || (x6 === C.length - 1 ? "primary" : "secondary"),
|
|
43245
|
+
onClick: K.onClick,
|
|
43246
|
+
disabled: K.disabled,
|
|
43247
|
+
type: K.type,
|
|
43248
|
+
form: K.form,
|
|
43249
|
+
children: K.label
|
|
43250
43250
|
},
|
|
43251
43251
|
x6
|
|
43252
43252
|
))
|
|
@@ -43265,8 +43265,8 @@ var x7 = i.forwardRef(
|
|
|
43265
43265
|
label: h.label
|
|
43266
43266
|
}
|
|
43267
43267
|
),
|
|
43268
|
-
|
|
43269
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: I, children:
|
|
43268
|
+
A
|
|
43269
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: I, children: A });
|
|
43270
43270
|
}, J = /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(import_jsx_runtime181.Fragment, { children: [
|
|
43271
43271
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: ve.dialogOverlay, "aria-hidden": "true" }),
|
|
43272
43272
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
@@ -43282,7 +43282,7 @@ var x7 = i.forwardRef(
|
|
|
43282
43282
|
"div",
|
|
43283
43283
|
{
|
|
43284
43284
|
ref: N,
|
|
43285
|
-
className: ["phx-dialog", ve.dialogRoot,
|
|
43285
|
+
className: ["phx-dialog", ve.dialogRoot, W, p].filter(Boolean).join(" "),
|
|
43286
43286
|
"data-popover-surface": "dialog",
|
|
43287
43287
|
"data-popover-surface-padding": "16",
|
|
43288
43288
|
children: [
|
|
@@ -43291,7 +43291,7 @@ var x7 = i.forwardRef(
|
|
|
43291
43291
|
{
|
|
43292
43292
|
className: [
|
|
43293
43293
|
ve.dialogHeader,
|
|
43294
|
-
|
|
43294
|
+
P6,
|
|
43295
43295
|
c2 && ve.dialogHeaderWithClose,
|
|
43296
43296
|
L && ve.dialogHeaderWithDivider
|
|
43297
43297
|
].filter(Boolean).join(" "),
|
|
@@ -43565,14 +43565,14 @@ var jo = i.forwardRef(
|
|
|
43565
43565
|
}, m) => {
|
|
43566
43566
|
const b = {
|
|
43567
43567
|
// Grid Template Columns (handled by columns or templateColumns)
|
|
43568
|
-
|
|
43569
|
-
|
|
43568
|
+
...$("gridTC", t, (v) => typeof v == "number" ? `repeat(${v}, minmax(0, 1fr))` : v),
|
|
43569
|
+
...$("gridTC", r2),
|
|
43570
43570
|
// Overrides columns if both exist
|
|
43571
|
-
|
|
43572
|
-
|
|
43573
|
-
|
|
43574
|
-
|
|
43575
|
-
|
|
43571
|
+
...$("gridTR", l),
|
|
43572
|
+
...$("gridTA", c2),
|
|
43573
|
+
...$("gridAR", f),
|
|
43574
|
+
...$("gridAC", C),
|
|
43575
|
+
...$("gridAF", h)
|
|
43576
43576
|
// Layout (handled by Box but Grid overrides gap specific handling if needed?
|
|
43577
43577
|
// Box handles gap, but Grid might need specific grid-gap aliases if not standard shorthand?)
|
|
43578
43578
|
// standard 'gap' works for grid too.
|
|
@@ -43628,11 +43628,11 @@ var hm = i.forwardRef(
|
|
|
43628
43628
|
...p(t),
|
|
43629
43629
|
...u(a2),
|
|
43630
43630
|
// Explicit colStart/colEnd overrule span defaults
|
|
43631
|
-
|
|
43632
|
-
|
|
43633
|
-
|
|
43634
|
-
|
|
43635
|
-
|
|
43631
|
+
...$("gridCS", o),
|
|
43632
|
+
...$("gridCE", n),
|
|
43633
|
+
...$("gridRS", r2),
|
|
43634
|
+
...$("gridRE", l),
|
|
43635
|
+
...$("gridArea", c2)
|
|
43636
43636
|
};
|
|
43637
43637
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
43638
43638
|
Fe,
|
|
@@ -43905,13 +43905,13 @@ var Tf = i.forwardRef(
|
|
|
43905
43905
|
style: T,
|
|
43906
43906
|
...M
|
|
43907
43907
|
}, N) => {
|
|
43908
|
-
const [H,
|
|
43908
|
+
const [H, W] = ia({
|
|
43909
43909
|
value: t,
|
|
43910
43910
|
defaultValue: a2,
|
|
43911
43911
|
onChange: o
|
|
43912
|
-
}),
|
|
43912
|
+
}), P6 = i.useRef(null), [G, E] = i.useState(false), [J, A] = i.useState(0), [I, K] = i.useState([]), [x6, D] = i.useState(""), [F, Q] = i.useState(""), de = i.useRef(""), O6 = i.useRef(null), q = i.useRef(null), re2 = i.useRef(null), Z = i.useRef(null), U = i.useRef(null), ue = i.useRef(null);
|
|
43913
43913
|
i.useEffect(() => {
|
|
43914
|
-
const j =
|
|
43914
|
+
const j = P6.current;
|
|
43915
43915
|
j && (j.style.height = "auto", j.style.height = `${j.scrollHeight}px`);
|
|
43916
43916
|
}, [H]), i.useEffect(() => () => {
|
|
43917
43917
|
ce();
|
|
@@ -43923,11 +43923,11 @@ var Tf = i.forwardRef(
|
|
|
43923
43923
|
return;
|
|
43924
43924
|
}
|
|
43925
43925
|
try {
|
|
43926
|
-
const
|
|
43927
|
-
|
|
43926
|
+
const V = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
43927
|
+
Z.current = V;
|
|
43928
43928
|
const ne = new AudioContext();
|
|
43929
43929
|
q.current = ne;
|
|
43930
|
-
const se = ne.createMediaStreamSource(
|
|
43930
|
+
const se = ne.createMediaStreamSource(V), Ce = ne.createAnalyser();
|
|
43931
43931
|
Ce.fftSize = 256, se.connect(Ce), re2.current = Ce;
|
|
43932
43932
|
const be = new j();
|
|
43933
43933
|
be.continuous = true, be.interimResults = true, be.lang = C, be.onresult = (ke) => {
|
|
@@ -43936,7 +43936,7 @@ var Tf = i.forwardRef(
|
|
|
43936
43936
|
const ft = ke.results[Je];
|
|
43937
43937
|
ft && ft[0] && (ft.isFinal ? Be += ft[0].transcript : Ge += ft[0].transcript);
|
|
43938
43938
|
}
|
|
43939
|
-
Be && D((Je) => Je + Be),
|
|
43939
|
+
Be && D((Je) => Je + Be), Q(Ge);
|
|
43940
43940
|
}, be.onerror = (ke) => {
|
|
43941
43941
|
console.error("Speech recognition error:", ke);
|
|
43942
43942
|
}, be.onend = () => {
|
|
@@ -43945,42 +43945,42 @@ var Tf = i.forwardRef(
|
|
|
43945
43945
|
O6.current.start();
|
|
43946
43946
|
} catch {
|
|
43947
43947
|
}
|
|
43948
|
-
}, O6.current = be, be.start(), de.current = H || "", E(true),
|
|
43949
|
-
|
|
43948
|
+
}, O6.current = be, be.start(), de.current = H || "", E(true), A(0), K([]), D(""), Q(""), U.current = setInterval(() => {
|
|
43949
|
+
A((ke) => ke + 1);
|
|
43950
43950
|
}, 1e3), ue.current = setInterval(() => {
|
|
43951
|
-
|
|
43951
|
+
z();
|
|
43952
43952
|
}, xf);
|
|
43953
|
-
} catch (
|
|
43954
|
-
console.error("Failed to start recording:",
|
|
43953
|
+
} catch (V) {
|
|
43954
|
+
console.error("Failed to start recording:", V);
|
|
43955
43955
|
}
|
|
43956
|
-
},
|
|
43956
|
+
}, z = () => {
|
|
43957
43957
|
if (!re2.current) return;
|
|
43958
|
-
const j = re2.current,
|
|
43959
|
-
j.getByteFrequencyData(
|
|
43958
|
+
const j = re2.current, V = new Uint8Array(j.frequencyBinCount);
|
|
43959
|
+
j.getByteFrequencyData(V);
|
|
43960
43960
|
let ne = 0;
|
|
43961
|
-
for (let Ce = 0; Ce <
|
|
43962
|
-
(
|
|
43961
|
+
for (let Ce = 0; Ce < V.length; Ce++)
|
|
43962
|
+
(V[Ce] ?? 0) > ne && (ne = V[Ce] ?? 0);
|
|
43963
43963
|
const se = ne / 255;
|
|
43964
|
-
|
|
43964
|
+
K((Ce) => Ce.length >= $n ? Ce : [...Ce, se]);
|
|
43965
43965
|
}, ce = () => {
|
|
43966
|
-
ue.current && (clearInterval(ue.current), ue.current = null), U.current && (clearInterval(U.current), U.current = null), O6.current && (O6.current.abort(), O6.current = null), q.current && q.current.state !== "closed" && q.current.close(),
|
|
43966
|
+
ue.current && (clearInterval(ue.current), ue.current = null), U.current && (clearInterval(U.current), U.current = null), O6.current && (O6.current.abort(), O6.current = null), q.current && q.current.state !== "closed" && q.current.close(), Z.current && (Z.current.getTracks().forEach((j) => j.stop()), Z.current = null), E(false);
|
|
43967
43967
|
}, xe = () => {
|
|
43968
43968
|
G || he();
|
|
43969
43969
|
}, we = () => {
|
|
43970
|
-
ce(),
|
|
43970
|
+
ce(), K([]), A(0), D(""), Q(""), W(de.current);
|
|
43971
43971
|
}, te = () => {
|
|
43972
43972
|
const j = x6 + F;
|
|
43973
|
-
ce(),
|
|
43974
|
-
const
|
|
43975
|
-
|
|
43973
|
+
ce(), K([]), A(0);
|
|
43974
|
+
const V = de.current.trim() ? " " : "", ne = de.current + V + j;
|
|
43975
|
+
W(ne.trim()), D(""), Q("");
|
|
43976
43976
|
}, ae = (j) => {
|
|
43977
|
-
const
|
|
43978
|
-
f?.(
|
|
43977
|
+
const V = c2.filter((ne) => ne.id !== j);
|
|
43978
|
+
f?.(V);
|
|
43979
43979
|
}, le = (j) => {
|
|
43980
43980
|
j.key === "Enter" && !j.shiftKey && (j.preventDefault(), Y());
|
|
43981
43981
|
}, Y = () => {
|
|
43982
|
-
const j = H?.trim(),
|
|
43983
|
-
(j ||
|
|
43982
|
+
const j = H?.trim(), V = c2.length > 0;
|
|
43983
|
+
(j || V) && (r2?.(H || "", c2.length > 0 ? c2 : void 0), t === void 0 && W(""), c2.length > 0 && f?.([]));
|
|
43984
43984
|
}, ie = H && H.length > 0 || c2.length > 0, R = Math.max(0, $n - I.length), X = x6 + F;
|
|
43985
43985
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
43986
43986
|
"div",
|
|
@@ -44010,8 +44010,8 @@ var Tf = i.forwardRef(
|
|
|
44010
44010
|
}
|
|
44011
44011
|
) }),
|
|
44012
44012
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: Ne.promptFieldWaveform, children: [
|
|
44013
|
-
[...Array(R)].map((j,
|
|
44014
|
-
I.map((j,
|
|
44013
|
+
[...Array(R)].map((j, V) => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: Ne.promptFieldWaveBarInactive }, `inactive-${V}`)),
|
|
44014
|
+
I.map((j, V) => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
44015
44015
|
"div",
|
|
44016
44016
|
{
|
|
44017
44017
|
className: Ne.promptFieldWaveBarLive,
|
|
@@ -44019,7 +44019,7 @@ var Tf = i.forwardRef(
|
|
|
44019
44019
|
height: `${Math.max(4, j * 20)}px`
|
|
44020
44020
|
}
|
|
44021
44021
|
},
|
|
44022
|
-
`recorded-${
|
|
44022
|
+
`recorded-${V}`
|
|
44023
44023
|
))
|
|
44024
44024
|
] }),
|
|
44025
44025
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: Ne.promptFieldRightActions, children: [
|
|
@@ -44062,11 +44062,11 @@ var Tf = i.forwardRef(
|
|
|
44062
44062
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
44063
44063
|
"textarea",
|
|
44064
44064
|
{
|
|
44065
|
-
ref:
|
|
44065
|
+
ref: P6,
|
|
44066
44066
|
className: Ne.promptFieldTextarea,
|
|
44067
44067
|
placeholder: n,
|
|
44068
44068
|
value: H || "",
|
|
44069
|
-
onChange: (j) =>
|
|
44069
|
+
onChange: (j) => W(j.target.value),
|
|
44070
44070
|
onKeyDown: le,
|
|
44071
44071
|
disabled: L,
|
|
44072
44072
|
rows: 1
|
|
@@ -45096,19 +45096,19 @@ var FC = i.forwardRef(
|
|
|
45096
45096
|
}
|
|
45097
45097
|
);
|
|
45098
45098
|
FC.displayName = "SelectCheck";
|
|
45099
|
-
var DC = "
|
|
45100
|
-
var PC = "
|
|
45101
|
-
var ZC = "
|
|
45102
|
-
var zC = "
|
|
45103
|
-
var WC = "
|
|
45104
|
-
var GC = "
|
|
45105
|
-
var jC = "
|
|
45106
|
-
var OC = "
|
|
45107
|
-
var qC = "
|
|
45108
|
-
var UC = "
|
|
45109
|
-
var JC = "
|
|
45110
|
-
var XC = "
|
|
45111
|
-
var YC = "
|
|
45099
|
+
var DC = "_sheetOverlay_r0hhh_63";
|
|
45100
|
+
var PC = "_sheetOverlayClosing_r0hhh_76";
|
|
45101
|
+
var ZC = "_sheetPanel_r0hhh_89";
|
|
45102
|
+
var zC = "_sheetPanelClosing_r0hhh_105";
|
|
45103
|
+
var WC = "_sheetPanelResponsive_r0hhh_128";
|
|
45104
|
+
var GC = "_sheetPanelFullHeight_r0hhh_149";
|
|
45105
|
+
var jC = "_sheetHeader_r0hhh_164";
|
|
45106
|
+
var OC = "_sheetContent_r0hhh_170";
|
|
45107
|
+
var qC = "_sheetContentNoPadding_r0hhh_177";
|
|
45108
|
+
var UC = "_sheetFooter_r0hhh_182";
|
|
45109
|
+
var JC = "_sheetFooterElevatedGradient_r0hhh_195";
|
|
45110
|
+
var XC = "_sheetGrabber_r0hhh_210";
|
|
45111
|
+
var YC = "_sheetGrabberBar_r0hhh_221";
|
|
45112
45112
|
var dt = {
|
|
45113
45113
|
sheetOverlay: DC,
|
|
45114
45114
|
sheetOverlayClosing: PC,
|
|
@@ -45147,7 +45147,7 @@ var Fn = i.forwardRef(
|
|
|
45147
45147
|
style: s2,
|
|
45148
45148
|
...p
|
|
45149
45149
|
}, u) => {
|
|
45150
|
-
const [m, y6] = i.useState(n), [b, v] = i.useState(false), [_, L] = i.useState(false), [k6, S] = i.useState(false), [w, T] = i.useState(false), [M, N] = i.useState(0), H = i.useRef(null),
|
|
45150
|
+
const [m, y6] = i.useState(n), [b, v] = i.useState(false), [_, L] = i.useState(false), [k6, S] = i.useState(false), [w, T] = i.useState(false), [M, N] = i.useState(0), H = i.useRef(null), W = 50;
|
|
45151
45151
|
i.useEffect(() => {
|
|
45152
45152
|
if (n)
|
|
45153
45153
|
y6(true), v(false);
|
|
@@ -45161,22 +45161,22 @@ var Fn = i.forwardRef(
|
|
|
45161
45161
|
}, [n, m]), Co(m), i.useEffect(() => {
|
|
45162
45162
|
const J = H.current;
|
|
45163
45163
|
if (!J || !m) return;
|
|
45164
|
-
const
|
|
45165
|
-
const { scrollTop: I, scrollHeight:
|
|
45164
|
+
const A = () => {
|
|
45165
|
+
const { scrollTop: I, scrollHeight: K, clientHeight: x6 } = J, D = K > x6;
|
|
45166
45166
|
S(I > 0);
|
|
45167
|
-
const F = Math.ceil(I + x6) >=
|
|
45167
|
+
const F = Math.ceil(I + x6) >= K;
|
|
45168
45168
|
T(D && !F);
|
|
45169
|
-
const
|
|
45170
|
-
N(
|
|
45169
|
+
const Q = Math.min(1, Math.max(0, I / W));
|
|
45170
|
+
N(Q);
|
|
45171
45171
|
};
|
|
45172
|
-
return
|
|
45172
|
+
return A(), J.addEventListener("scroll", A, { passive: true }), () => J.removeEventListener("scroll", A);
|
|
45173
45173
|
}, [m]), i.useEffect(() => {
|
|
45174
45174
|
if (n && H.current && c2 === "auto") {
|
|
45175
|
-
const J = H.current.scrollHeight,
|
|
45176
|
-
J >
|
|
45175
|
+
const J = H.current.scrollHeight, A = window.innerHeight;
|
|
45176
|
+
J > A * 0.6 ? L(true) : L(false);
|
|
45177
45177
|
} else n || L(false);
|
|
45178
45178
|
}, [n, c2, a2]);
|
|
45179
|
-
const
|
|
45179
|
+
const P6 = l === "auto", G = P6 ? void 0 : KC[l], E = (J) => {
|
|
45180
45180
|
J.target === J.currentTarget && r2 && r2();
|
|
45181
45181
|
};
|
|
45182
45182
|
return Bn(() => {
|
|
@@ -45198,7 +45198,7 @@ var Fn = i.forwardRef(
|
|
|
45198
45198
|
className: [
|
|
45199
45199
|
"phx-sheet",
|
|
45200
45200
|
dt.sheetPanel,
|
|
45201
|
-
|
|
45201
|
+
P6 && dt.sheetPanelResponsive,
|
|
45202
45202
|
(c2 === "full" || _) && dt.sheetPanelFullHeight,
|
|
45203
45203
|
b && dt.sheetPanelClosing,
|
|
45204
45204
|
d
|
|
@@ -45665,37 +45665,37 @@ var Kb = i.forwardRef(
|
|
|
45665
45665
|
left: 0,
|
|
45666
45666
|
width: 0,
|
|
45667
45667
|
opacity: 0
|
|
45668
|
-
}), [v, _] = i.useState(false), [L, k6] = i.useState(false), [S, w] = i.useState(false), T = c2 !== void 0 ? c2 : S, M = i.useRef([]), N = i.useRef([]), H = i.useRef(null),
|
|
45668
|
+
}), [v, _] = i.useState(false), [L, k6] = i.useState(false), [S, w] = i.useState(false), T = c2 !== void 0 ? c2 : S, M = i.useRef([]), N = i.useRef([]), H = i.useRef(null), W = i.useRef(null), P6 = u === "auto", G = i.useCallback(() => {
|
|
45669
45669
|
const I = H.current;
|
|
45670
45670
|
if (I) {
|
|
45671
|
-
if (!
|
|
45671
|
+
if (!P6) {
|
|
45672
45672
|
_(false), k6(false);
|
|
45673
45673
|
return;
|
|
45674
45674
|
}
|
|
45675
|
-
const { scrollLeft:
|
|
45676
|
-
_(
|
|
45677
|
-
}
|
|
45678
|
-
}, [
|
|
45679
|
-
const
|
|
45680
|
-
if (
|
|
45681
|
-
const x6 =
|
|
45682
|
-
|
|
45675
|
+
const { scrollLeft: K, scrollWidth: x6, clientWidth: D } = I, F = x6 - D, Q = F > 2;
|
|
45676
|
+
_(Q && K > 1), k6(Q && K < F - 1);
|
|
45677
|
+
}
|
|
45678
|
+
}, [P6]), E = (I) => {
|
|
45679
|
+
const K = H.current;
|
|
45680
|
+
if (K) {
|
|
45681
|
+
const x6 = K.clientWidth * 0.8;
|
|
45682
|
+
K.scrollBy({
|
|
45683
45683
|
left: I === "left" ? -x6 : x6,
|
|
45684
45684
|
behavior: "smooth"
|
|
45685
45685
|
});
|
|
45686
45686
|
}
|
|
45687
45687
|
};
|
|
45688
45688
|
i.useEffect(() => {
|
|
45689
|
-
const I = t.findIndex((D) => D.id === a2),
|
|
45690
|
-
if (
|
|
45689
|
+
const I = t.findIndex((D) => D.id === a2), K = M.current[I], x6 = N.current[I];
|
|
45690
|
+
if (K && x6) {
|
|
45691
45691
|
if (b({
|
|
45692
|
-
left:
|
|
45693
|
-
width: s2 === "pill" ?
|
|
45692
|
+
left: K.offsetLeft + (s2 === "pill" ? 0 : x6.offsetLeft + Xb),
|
|
45693
|
+
width: s2 === "pill" ? K.offsetWidth : x6.offsetWidth - Yb,
|
|
45694
45694
|
opacity: 1,
|
|
45695
|
-
...s2 === "pill" && { height:
|
|
45696
|
-
}),
|
|
45695
|
+
...s2 === "pill" && { height: K.offsetHeight }
|
|
45696
|
+
}), P6 && H.current) {
|
|
45697
45697
|
const D = H.current;
|
|
45698
|
-
D.scrollWidth > D.clientWidth + 2 &&
|
|
45698
|
+
D.scrollWidth > D.clientWidth + 2 && K.scrollIntoView({
|
|
45699
45699
|
behavior: "smooth",
|
|
45700
45700
|
block: "nearest",
|
|
45701
45701
|
inline: "center"
|
|
@@ -45703,21 +45703,21 @@ var Kb = i.forwardRef(
|
|
|
45703
45703
|
}
|
|
45704
45704
|
} else
|
|
45705
45705
|
b((D) => ({ ...D, opacity: 0 }));
|
|
45706
|
-
}, [a2, t, s2,
|
|
45706
|
+
}, [a2, t, s2, P6]), i.useEffect(() => {
|
|
45707
45707
|
const I = H.current;
|
|
45708
45708
|
if (I) {
|
|
45709
45709
|
G(), I.addEventListener("scroll", G);
|
|
45710
|
-
const
|
|
45711
|
-
return
|
|
45712
|
-
I.removeEventListener("scroll", G),
|
|
45710
|
+
const K = new ResizeObserver(G);
|
|
45711
|
+
return K.observe(I), () => {
|
|
45712
|
+
I.removeEventListener("scroll", G), K.disconnect();
|
|
45713
45713
|
};
|
|
45714
45714
|
}
|
|
45715
45715
|
}, [G, t]), i.useEffect(() => {
|
|
45716
45716
|
if (!l) return;
|
|
45717
|
-
const I =
|
|
45717
|
+
const I = W.current;
|
|
45718
45718
|
if (!I) return;
|
|
45719
|
-
const x6 = ((
|
|
45720
|
-
let de =
|
|
45719
|
+
const x6 = ((Q) => {
|
|
45720
|
+
let de = Q.parentElement;
|
|
45721
45721
|
for (; de; ) {
|
|
45722
45722
|
const O6 = window.getComputedStyle(de);
|
|
45723
45723
|
if (/(auto|scroll)/.test(O6.overflow + O6.overflowY))
|
|
@@ -45727,7 +45727,7 @@ var Kb = i.forwardRef(
|
|
|
45727
45727
|
return null;
|
|
45728
45728
|
})(I), D = () => {
|
|
45729
45729
|
if (!I) return;
|
|
45730
|
-
const
|
|
45730
|
+
const Q = I.getBoundingClientRect(), de = x6 ? x6.getBoundingClientRect() : { top: 0 }, O6 = Q.top <= de.top + 1;
|
|
45731
45731
|
w(O6);
|
|
45732
45732
|
};
|
|
45733
45733
|
D();
|
|
@@ -45737,10 +45737,10 @@ var Kb = i.forwardRef(
|
|
|
45737
45737
|
};
|
|
45738
45738
|
}, [l]);
|
|
45739
45739
|
const J = i.useCallback((I) => {
|
|
45740
|
-
|
|
45741
|
-
}, [m]),
|
|
45742
|
-
"--tabs-fade-left":
|
|
45743
|
-
"--tabs-fade-right":
|
|
45740
|
+
W.current = I, typeof m == "function" ? m(I) : m && (m.current = I);
|
|
45741
|
+
}, [m]), A = {
|
|
45742
|
+
"--tabs-fade-left": P6 && v ? "44px" : "0px",
|
|
45743
|
+
"--tabs-fade-right": P6 && L ? "44px" : "0px"
|
|
45744
45744
|
};
|
|
45745
45745
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
45746
45746
|
"div",
|
|
@@ -45758,7 +45758,7 @@ var Kb = i.forwardRef(
|
|
|
45758
45758
|
].filter(Boolean).join(" "),
|
|
45759
45759
|
style: h,
|
|
45760
45760
|
children: /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: Ie.tabsScrollOuter, children: [
|
|
45761
|
-
|
|
45761
|
+
P6 && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
45762
45762
|
"div",
|
|
45763
45763
|
{
|
|
45764
45764
|
className: [
|
|
@@ -45781,7 +45781,7 @@ var Kb = i.forwardRef(
|
|
|
45781
45781
|
)
|
|
45782
45782
|
}
|
|
45783
45783
|
),
|
|
45784
|
-
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: Ie.tabsScrollContainer, style:
|
|
45784
|
+
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: Ie.tabsScrollContainer, style: A, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: Ie.tabsMaskWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
|
|
45785
45785
|
"div",
|
|
45786
45786
|
{
|
|
45787
45787
|
ref: H,
|
|
@@ -45796,13 +45796,13 @@ var Kb = i.forwardRef(
|
|
|
45796
45796
|
"scrollbarHidden"
|
|
45797
45797
|
].filter(Boolean).join(" "),
|
|
45798
45798
|
children: [
|
|
45799
|
-
t.map((I,
|
|
45799
|
+
t.map((I, K) => {
|
|
45800
45800
|
const x6 = a2 === I.id, D = !I.icon, F = !I.label;
|
|
45801
45801
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
45802
45802
|
"button",
|
|
45803
45803
|
{
|
|
45804
|
-
ref: (
|
|
45805
|
-
M.current[
|
|
45804
|
+
ref: (Q) => {
|
|
45805
|
+
M.current[K] = Q;
|
|
45806
45806
|
},
|
|
45807
45807
|
role: "tab",
|
|
45808
45808
|
type: "button",
|
|
@@ -45818,9 +45818,9 @@ var Kb = i.forwardRef(
|
|
|
45818
45818
|
n && Ie.tabsTabStacked
|
|
45819
45819
|
].filter(Boolean).join(" "),
|
|
45820
45820
|
onClick: () => !I.disabled && o(I.id),
|
|
45821
|
-
onKeyDown: (
|
|
45821
|
+
onKeyDown: (Q) => {
|
|
45822
45822
|
let de = null;
|
|
45823
|
-
if (
|
|
45823
|
+
if (Q.key === "ArrowRight" || Q.key === "ArrowDown" ? (Q.preventDefault(), de = (K + 1) % t.length) : Q.key === "ArrowLeft" || Q.key === "ArrowUp" ? (Q.preventDefault(), de = (K - 1 + t.length) % t.length) : Q.key === "Home" ? (Q.preventDefault(), de = 0) : Q.key === "End" ? (Q.preventDefault(), de = t.length - 1) : (Q.key === "Enter" || Q.key === " ") && d === "manual" && (Q.preventDefault(), o(I.id)), de !== null) {
|
|
45824
45824
|
const O6 = t[de], q = M.current[de];
|
|
45825
45825
|
O6 && !O6.disabled && q && (q.focus(), d === "automatic" && o(O6.id));
|
|
45826
45826
|
}
|
|
@@ -45831,8 +45831,8 @@ var Kb = i.forwardRef(
|
|
|
45831
45831
|
"span",
|
|
45832
45832
|
{
|
|
45833
45833
|
className: Ie.tabsTabContent,
|
|
45834
|
-
ref: (
|
|
45835
|
-
N.current[
|
|
45834
|
+
ref: (Q) => {
|
|
45835
|
+
N.current[K] = Q;
|
|
45836
45836
|
},
|
|
45837
45837
|
children: [
|
|
45838
45838
|
I.icon && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: Ie.tabsTabIcon, children: I.icon }),
|
|
@@ -45844,8 +45844,8 @@ var Kb = i.forwardRef(
|
|
|
45844
45844
|
Ie.tabsTabChevron,
|
|
45845
45845
|
I.chevronRotated && Ie.tabsTabChevronRotated
|
|
45846
45846
|
].filter(Boolean).join(" "),
|
|
45847
|
-
onClick: (
|
|
45848
|
-
I.onChevronClick && (
|
|
45847
|
+
onClick: (Q) => {
|
|
45848
|
+
I.onChevronClick && (Q.stopPropagation(), I.onChevronClick(Q));
|
|
45849
45849
|
},
|
|
45850
45850
|
children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(ChevronDownSmallOutline, {})
|
|
45851
45851
|
}
|
|
@@ -45868,7 +45868,7 @@ var Kb = i.forwardRef(
|
|
|
45868
45868
|
]
|
|
45869
45869
|
}
|
|
45870
45870
|
) }) }),
|
|
45871
|
-
|
|
45871
|
+
P6 && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
45872
45872
|
"div",
|
|
45873
45873
|
{
|
|
45874
45874
|
className: [
|
|
@@ -45955,8 +45955,8 @@ var uy = i.forwardRef(
|
|
|
45955
45955
|
required: o,
|
|
45956
45956
|
helperText: n,
|
|
45957
45957
|
error: r2,
|
|
45958
|
-
maxLength: l
|
|
45959
|
-
showCount: c2
|
|
45958
|
+
maxLength: l,
|
|
45959
|
+
showCount: c2,
|
|
45960
45960
|
disabled: f,
|
|
45961
45961
|
className: C,
|
|
45962
45962
|
style: h,
|
|
@@ -45976,14 +45976,14 @@ var uy = i.forwardRef(
|
|
|
45976
45976
|
value: u,
|
|
45977
45977
|
defaultValue: m || "",
|
|
45978
45978
|
onChange: p
|
|
45979
|
-
}), H = M,
|
|
45980
|
-
T(true), d?.(
|
|
45981
|
-
},
|
|
45982
|
-
T(false), s2?.(
|
|
45983
|
-
},
|
|
45984
|
-
const
|
|
45985
|
-
l &&
|
|
45986
|
-
},
|
|
45979
|
+
}), H = M, W = H?.length || 0, P6 = c2 ?? l !== void 0, G = (I) => {
|
|
45980
|
+
T(true), d?.(I);
|
|
45981
|
+
}, E = (I) => {
|
|
45982
|
+
T(false), s2?.(I);
|
|
45983
|
+
}, J = (I) => {
|
|
45984
|
+
const K = I.target.value;
|
|
45985
|
+
l !== void 0 && K.length > l || N(K);
|
|
45986
|
+
}, A = t && a2 === "outside";
|
|
45987
45987
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
|
|
45988
45988
|
"div",
|
|
45989
45989
|
{
|
|
@@ -45995,7 +45995,7 @@ var uy = i.forwardRef(
|
|
|
45995
45995
|
].filter(Boolean).join(" "),
|
|
45996
45996
|
style: { ...h, width: _ },
|
|
45997
45997
|
children: [
|
|
45998
|
-
|
|
45998
|
+
A && /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("label", { className: Lt.textAreaOutsideLabel, children: [
|
|
45999
45999
|
t,
|
|
46000
46000
|
o && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: Lt.textAreaRequiredIndicator, children: " *" })
|
|
46001
46001
|
] }),
|
|
@@ -46011,26 +46011,25 @@ var uy = i.forwardRef(
|
|
|
46011
46011
|
f && Lt.disabled
|
|
46012
46012
|
].filter(Boolean).join(" "),
|
|
46013
46013
|
disabled: f,
|
|
46014
|
-
onFocus:
|
|
46015
|
-
onBlur:
|
|
46016
|
-
onChange:
|
|
46014
|
+
onFocus: G,
|
|
46015
|
+
onBlur: E,
|
|
46016
|
+
onChange: J,
|
|
46017
46017
|
value: H,
|
|
46018
46018
|
placeholder: y6,
|
|
46019
46019
|
rows: b,
|
|
46020
46020
|
style: { resize: v },
|
|
46021
|
-
maxLength: l,
|
|
46021
|
+
maxLength: l ?? void 0,
|
|
46022
46022
|
...k6
|
|
46023
46023
|
}
|
|
46024
46024
|
),
|
|
46025
|
-
(n ||
|
|
46025
|
+
(n || P6) && /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: Lt.textAreaFooter, children: [
|
|
46026
46026
|
n && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: [
|
|
46027
46027
|
Lt.textAreaHelperText,
|
|
46028
46028
|
r2 && Lt.textAreaErrorText
|
|
46029
46029
|
].filter(Boolean).join(" "), children: n }),
|
|
46030
|
-
|
|
46031
|
-
|
|
46032
|
-
"
|
|
46033
|
-
l
|
|
46030
|
+
P6 && /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("span", { className: Lt.textAreaCharCount, children: [
|
|
46031
|
+
W,
|
|
46032
|
+
l !== void 0 ? `/${l}` : ""
|
|
46034
46033
|
] })
|
|
46035
46034
|
] })
|
|
46036
46035
|
]
|
|
@@ -46148,68 +46147,68 @@ var Ky = i.forwardRef(
|
|
|
46148
46147
|
style: M,
|
|
46149
46148
|
onFocus: N,
|
|
46150
46149
|
onBlur: H,
|
|
46151
|
-
onChange:
|
|
46152
|
-
value:
|
|
46150
|
+
onChange: W,
|
|
46151
|
+
value: P6,
|
|
46153
46152
|
defaultValue: G,
|
|
46154
46153
|
defaultTrailingDropdownValue: E,
|
|
46155
46154
|
placeholder: J,
|
|
46156
|
-
maxLength:
|
|
46155
|
+
maxLength: A,
|
|
46157
46156
|
...I
|
|
46158
|
-
},
|
|
46159
|
-
const [x6, D] = i.useState(false), [F,
|
|
46160
|
-
value:
|
|
46157
|
+
}, K) => {
|
|
46158
|
+
const [x6, D] = i.useState(false), [F, Q] = i.useState(false), [de, O6] = ia({
|
|
46159
|
+
value: P6,
|
|
46161
46160
|
defaultValue: G || "",
|
|
46162
|
-
onChange:
|
|
46163
|
-
}), q = de, [re2,
|
|
46161
|
+
onChange: W
|
|
46162
|
+
}), q = de, [re2, Z] = ia({
|
|
46164
46163
|
value: d,
|
|
46165
46164
|
defaultValue: E || "",
|
|
46166
46165
|
onChange: s2
|
|
46167
46166
|
}), U = i.useRef(null), ue = i.useRef(null), { style: he } = rn(U, ue, F, {
|
|
46168
46167
|
margin: 32,
|
|
46169
46168
|
matchTriggerWidth: true,
|
|
46170
|
-
onClose: () =>
|
|
46171
|
-
}),
|
|
46172
|
-
D(true), N?.(
|
|
46173
|
-
}, ce = i.useMemo(() => f ? (f.startsWith("+") || /^\d+$/.test(f.replace(/[\s()]/g, ""))) && !f.includes("://") : false, [f]), xe = (
|
|
46169
|
+
onClose: () => Q(false)
|
|
46170
|
+
}), z = (V) => {
|
|
46171
|
+
D(true), N?.(V);
|
|
46172
|
+
}, ce = i.useMemo(() => f ? (f.startsWith("+") || /^\d+$/.test(f.replace(/[\s()]/g, ""))) && !f.includes("://") : false, [f]), xe = (V) => {
|
|
46174
46173
|
if (D(false), ce && q) {
|
|
46175
46174
|
let ne = String(q).replace(/[^0-9]/g, "");
|
|
46176
46175
|
ne.startsWith("0") && (ne = ne.slice(1));
|
|
46177
46176
|
const se = ne.slice(0, 15).replace(/(\d{1,3})(?=(\d{3,4})+(?!\d))/g, "$1 ").trim();
|
|
46178
46177
|
q !== se && O6(se);
|
|
46179
46178
|
}
|
|
46180
|
-
H?.(
|
|
46181
|
-
}, we = (
|
|
46179
|
+
H?.(V);
|
|
46180
|
+
}, we = (V) => {
|
|
46182
46181
|
if (w) return;
|
|
46183
|
-
let ne =
|
|
46182
|
+
let ne = V.target.value;
|
|
46184
46183
|
ce && (ne = ne.replace(/[^0-9]/g, "").slice(0, 15).replace(/(\d{1,3})(?=(\d{3,4})+(?!\d))/g, "$1 ").trim()), O6(ne);
|
|
46185
|
-
}, te = (
|
|
46186
|
-
|
|
46187
|
-
}, ae = (
|
|
46188
|
-
|
|
46189
|
-
}, le = (
|
|
46190
|
-
S || (
|
|
46191
|
-
}, Y = (
|
|
46192
|
-
const ne = Array.isArray(
|
|
46193
|
-
ne &&
|
|
46184
|
+
}, te = (V) => {
|
|
46185
|
+
V.preventDefault(), V.stopPropagation(), O6(""), m?.();
|
|
46186
|
+
}, ae = (V) => {
|
|
46187
|
+
V.key === "Enter" && V.target.blur();
|
|
46188
|
+
}, le = (V) => {
|
|
46189
|
+
S || (V.stopPropagation(), h ? Q(!F) : p?.());
|
|
46190
|
+
}, Y = (V) => {
|
|
46191
|
+
const ne = Array.isArray(V) ? V[0] : V;
|
|
46192
|
+
ne && Z(ne), Q(false);
|
|
46194
46193
|
};
|
|
46195
46194
|
i.useEffect(() => {
|
|
46196
|
-
const
|
|
46197
|
-
U.current && !U.current.contains(ne.target) &&
|
|
46195
|
+
const V = (ne) => {
|
|
46196
|
+
U.current && !U.current.contains(ne.target) && Q(false);
|
|
46198
46197
|
};
|
|
46199
|
-
return F && document.addEventListener("mousedown",
|
|
46200
|
-
document.removeEventListener("mousedown",
|
|
46198
|
+
return F && document.addEventListener("mousedown", V), () => {
|
|
46199
|
+
document.removeEventListener("mousedown", V);
|
|
46201
46200
|
};
|
|
46202
46201
|
}, [F]);
|
|
46203
|
-
const ee = t && a2 === "inside", ie = t && a2 === "outside", R = h?.map((
|
|
46204
|
-
value:
|
|
46205
|
-
label:
|
|
46206
|
-
icon:
|
|
46207
|
-
disabled:
|
|
46202
|
+
const ee = t && a2 === "inside", ie = t && a2 === "outside", R = h?.map((V) => ({
|
|
46203
|
+
value: V.value,
|
|
46204
|
+
label: V.label,
|
|
46205
|
+
icon: V.icon,
|
|
46206
|
+
disabled: V.disabled
|
|
46208
46207
|
})), X = re2;
|
|
46209
46208
|
let j = C;
|
|
46210
46209
|
if (X && h) {
|
|
46211
|
-
const
|
|
46212
|
-
|
|
46210
|
+
const V = h.find((ne) => ne.value === X);
|
|
46211
|
+
V && (j = V.label);
|
|
46213
46212
|
}
|
|
46214
46213
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
|
|
46215
46214
|
"div",
|
|
@@ -46244,7 +46243,7 @@ var Ky = i.forwardRef(
|
|
|
46244
46243
|
w && ye.readOnly,
|
|
46245
46244
|
ye[_]
|
|
46246
46245
|
].filter(Boolean).join(" "),
|
|
46247
|
-
onClick: () => !S && !w && !x6 &&
|
|
46246
|
+
onClick: () => !S && !w && !x6 && K?.current?.focus(),
|
|
46248
46247
|
children: [
|
|
46249
46248
|
!ee && c2 && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: ye.textFieldLeadingIcon, children: c2 }),
|
|
46250
46249
|
!ee && f && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: ye.textFieldLeadingText, children: f }),
|
|
@@ -46265,7 +46264,7 @@ var Ky = i.forwardRef(
|
|
|
46265
46264
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
46266
46265
|
"input",
|
|
46267
46266
|
{
|
|
46268
|
-
ref:
|
|
46267
|
+
ref: K,
|
|
46269
46268
|
className: [
|
|
46270
46269
|
ye.textFieldInput,
|
|
46271
46270
|
ee && ye.withInlineLabel,
|
|
@@ -46273,7 +46272,7 @@ var Ky = i.forwardRef(
|
|
|
46273
46272
|
].filter(Boolean).join(" "),
|
|
46274
46273
|
disabled: S,
|
|
46275
46274
|
readOnly: w,
|
|
46276
|
-
onFocus:
|
|
46275
|
+
onFocus: z,
|
|
46277
46276
|
onBlur: xe,
|
|
46278
46277
|
onChange: we,
|
|
46279
46278
|
onKeyDown: ae,
|
|
@@ -46281,7 +46280,7 @@ var Ky = i.forwardRef(
|
|
|
46281
46280
|
placeholder: ee ? "" : J,
|
|
46282
46281
|
inputMode: ce ? "numeric" : I.inputMode,
|
|
46283
46282
|
pattern: ce ? "[0-9]*" : I.pattern,
|
|
46284
|
-
maxLength:
|
|
46283
|
+
maxLength: A,
|
|
46285
46284
|
...I
|
|
46286
46285
|
}
|
|
46287
46286
|
)
|
|
@@ -46302,7 +46301,7 @@ var Ky = i.forwardRef(
|
|
|
46302
46301
|
variant: "primary",
|
|
46303
46302
|
shape: "pill",
|
|
46304
46303
|
icon: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(CloseSmallOutline, {}),
|
|
46305
|
-
onMouseDown: (
|
|
46304
|
+
onMouseDown: (V) => V.preventDefault(),
|
|
46306
46305
|
onClick: te,
|
|
46307
46306
|
"aria-label": "Clear input",
|
|
46308
46307
|
className: ye.textFieldClearButton
|
|
@@ -46360,8 +46359,8 @@ var Ky = i.forwardRef(
|
|
|
46360
46359
|
"div",
|
|
46361
46360
|
{
|
|
46362
46361
|
className: ye.textFieldTrailingIconWrapper,
|
|
46363
|
-
onClick: (
|
|
46364
|
-
S || (
|
|
46362
|
+
onClick: (V) => {
|
|
46363
|
+
S || (V.stopPropagation(), v?.());
|
|
46365
46364
|
},
|
|
46366
46365
|
children: [
|
|
46367
46366
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(Ka, { orientation: "vertical", className: ye.textFieldSuffixDivider }),
|
|
@@ -46373,15 +46372,15 @@ var Ky = i.forwardRef(
|
|
|
46373
46372
|
]
|
|
46374
46373
|
}
|
|
46375
46374
|
),
|
|
46376
|
-
(o || l &&
|
|
46375
|
+
(o || l && A) && /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: ye.textFieldFooter, children: [
|
|
46377
46376
|
o && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: [
|
|
46378
46377
|
ye.textFieldHelperText,
|
|
46379
46378
|
n && ye.errorText
|
|
46380
46379
|
].filter(Boolean).join(" "), children: o }),
|
|
46381
|
-
l &&
|
|
46380
|
+
l && A && /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("span", { className: ye.textFieldCharacterCount, children: [
|
|
46382
46381
|
String(q || "").length,
|
|
46383
46382
|
"/",
|
|
46384
|
-
|
|
46383
|
+
A
|
|
46385
46384
|
] })
|
|
46386
46385
|
] })
|
|
46387
46386
|
]
|