@pantheon-systems/pds-toolkit-react 1.0.0-dev.191 → 1.0.0-dev.192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/_dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var I = (t, s) => {
|
|
|
19
19
|
s.indexOf(a) < 0 && r1.call(t, a) && (n[a] = t[a]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
import e, { createContext as Ct, Children as J1, isValidElement as qe, useState as F, useContext as $e, forwardRef as je, useRef as ae, useEffect as
|
|
22
|
+
import e, { createContext as Ct, Children as J1, isValidElement as qe, useState as F, useContext as $e, forwardRef as je, useRef as ae, useEffect as oe, useCallback as Xt, cloneElement as We, useLayoutEffect as e2, createElement as t2, createRef as s2 } from "react";
|
|
23
23
|
import p from "prop-types";
|
|
24
24
|
import { NavLink as b1, MemoryRouter as n2 } from "react-router-dom";
|
|
25
25
|
import { useFloating as Se, offset as $t, flip as wt, shift as yt, autoUpdate as Be, useHover as gt, useFocus as v1, useDismiss as Te, useRole as De, useInteractions as Oe, FloatingPortal as C1, useId as $1, useClick as Ge, useListNavigation as ot, useTransitionStyles as Ke, safePolygon as w1, FloatingOverlay as a2, FloatingFocusManager as y1, arrow as l2, FloatingArrow as c2 } from "@floating-ui/react";
|
|
@@ -1122,7 +1122,7 @@ const w2 = new Intl.NumberFormat().formatToParts(100000089e-2), Dt = w2.find((t)
|
|
|
1122
1122
|
C,
|
|
1123
1123
|
f
|
|
1124
1124
|
]), [b, _] = F(""), [$, x] = F(null), [H, k] = F(null), N = ae(null), L = ae(null), z = ae("");
|
|
1125
|
-
|
|
1125
|
+
oe(() => {
|
|
1126
1126
|
switch (c && _(G(c)), z.numExtra = "", s) {
|
|
1127
1127
|
case "credit-card":
|
|
1128
1128
|
z.numExtra = 3, z.current = Ot;
|
|
@@ -1171,8 +1171,8 @@ const w2 = new Intl.NumberFormat().formatToParts(100000089e-2), Dt = w2.find((t)
|
|
|
1171
1171
|
if (L.current = A, A) {
|
|
1172
1172
|
if (new RegExp("^34|37", "g").test(A)) {
|
|
1173
1173
|
z.numExtra = 2, z.current = Ot - 1;
|
|
1174
|
-
const
|
|
1175
|
-
return
|
|
1174
|
+
const X = {};
|
|
1175
|
+
return X.first = A.substring(0, 4), X.middle = A.substring(4, 10), X.middle.length > 0 && (X.middle = ` ${X.middle}`), X.last = A.substring(10), X.last.length > 0 && (X.last = ` ${X.last}`), `${X.first}${X.middle}${X.last}`;
|
|
1176
1176
|
}
|
|
1177
1177
|
z.numExtra = 3, z.current = Ot;
|
|
1178
1178
|
const q = new RegExp(".{1,4}", "g");
|
|
@@ -1186,8 +1186,8 @@ const w2 = new Intl.NumberFormat().formatToParts(100000089e-2), Dt = w2.find((t)
|
|
|
1186
1186
|
z.numExtra = 4, z.current = d1;
|
|
1187
1187
|
let j = A.substring(0, 3), q = A.substring(3, 6);
|
|
1188
1188
|
q.length > 0 && (j = `(${j})`, q = ` ${q}`);
|
|
1189
|
-
let
|
|
1190
|
-
return
|
|
1189
|
+
let Y = A.substring(6);
|
|
1190
|
+
return Y.length > 0 && (Y = `-${Y}`), `${j}${q}${Y}`;
|
|
1191
1191
|
}
|
|
1192
1192
|
return A;
|
|
1193
1193
|
}
|
|
@@ -1344,7 +1344,7 @@ const N2 = (g) => {
|
|
|
1344
1344
|
"className"
|
|
1345
1345
|
]);
|
|
1346
1346
|
const w = "pds-input-obscured", u = ae(["pds-input-field", w, m]), [C, v] = F(c), [b, _] = F(t("")), [$, x] = F(), [H, k] = F(null), [N, L] = F(!1), z = ae(null), V = ae(null);
|
|
1347
|
-
|
|
1347
|
+
oe(() => {
|
|
1348
1348
|
c && t && _(t(c));
|
|
1349
1349
|
}, []);
|
|
1350
1350
|
const S = () => {
|
|
@@ -1725,9 +1725,9 @@ const Rt = 16, m1 = 10, k2 = (N) => {
|
|
|
1725
1725
|
"validationMessages",
|
|
1726
1726
|
"className"
|
|
1727
1727
|
]);
|
|
1728
|
-
const [z, V] = F(l), [S, M] = F(s("")), [O, D] = F(), [W, Z] = F(null), [U, G] = F(!1), K = ae(null), T = ae(null), A = ae(null), j = ae(null), q = "pds-input-text",
|
|
1729
|
-
let
|
|
1730
|
-
_ === "search" && (
|
|
1728
|
+
const [z, V] = F(l), [S, M] = F(s("")), [O, D] = F(), [W, Z] = F(null), [U, G] = F(!1), K = ae(null), T = ae(null), A = ae(null), j = ae(null), q = "pds-input-text", Y = C ? `${q}--${C}` : null;
|
|
1729
|
+
let X = null;
|
|
1730
|
+
_ === "search" && (X = "search"), W === "error" && (X = "error"), W === "success" && (X = "success"), C && v && oe(() => {
|
|
1731
1731
|
switch (l && V(ee(l)), j.numExtra = "", C) {
|
|
1732
1732
|
case "credit-card":
|
|
1733
1733
|
j.numExtra = 3, j.current = Rt;
|
|
@@ -1737,8 +1737,8 @@ const Rt = 16, m1 = 10, k2 = (N) => {
|
|
|
1737
1737
|
break;
|
|
1738
1738
|
}
|
|
1739
1739
|
}, []);
|
|
1740
|
-
let
|
|
1741
|
-
(C === "credit-card" || C === "phone") && j.current && (
|
|
1740
|
+
let re = null;
|
|
1741
|
+
(C === "credit-card" || C === "phone") && j.current && (re = j.current + j.numExtra);
|
|
1742
1742
|
const ee = (se) => {
|
|
1743
1743
|
if (se) {
|
|
1744
1744
|
if (C === "credit-card") {
|
|
@@ -1769,12 +1769,12 @@ const Rt = 16, m1 = 10, k2 = (N) => {
|
|
|
1769
1769
|
}
|
|
1770
1770
|
return se;
|
|
1771
1771
|
};
|
|
1772
|
-
|
|
1772
|
+
oe(() => {
|
|
1773
1773
|
l && s && M(s(l));
|
|
1774
1774
|
}, []);
|
|
1775
1775
|
const pe = () => {
|
|
1776
1776
|
D(""), Z(null);
|
|
1777
|
-
},
|
|
1777
|
+
}, ie = (se) => {
|
|
1778
1778
|
f && f(se.target);
|
|
1779
1779
|
}, le = (se) => {
|
|
1780
1780
|
C ? m && m({ formattedValue: se, rawValue: A.current }) : m && m(se);
|
|
@@ -1785,14 +1785,14 @@ const Rt = 16, m1 = 10, k2 = (N) => {
|
|
|
1785
1785
|
const ce = $(se.target.value) || {};
|
|
1786
1786
|
pe(), ce.error && Z("error"), ce.success && Z("success"), D(ce.message);
|
|
1787
1787
|
}
|
|
1788
|
-
C && v && !$ && (K.current.checkValidity() === !1 || se.target.value.length <
|
|
1788
|
+
C && v && !$ && (K.current.checkValidity() === !1 || se.target.value.length < re ? (Z("error"), C === "credit-card" && D(x.creditCardError), C === "phone" && D(x.phoneError)) : Z("success")), le(se.target.value);
|
|
1789
1789
|
}, he = (se) => {
|
|
1790
1790
|
var ce;
|
|
1791
1791
|
(!((ce = T.current) != null && ce.contains(se.relatedTarget)) || !se.relatedTarget) && G(!1);
|
|
1792
1792
|
}, te = () => {
|
|
1793
1793
|
pe(), V(""), A.current = "", K.current.focus(), s && M(s("")), le("");
|
|
1794
1794
|
};
|
|
1795
|
-
|
|
1795
|
+
oe(() => {
|
|
1796
1796
|
if (_ === "search" && c) {
|
|
1797
1797
|
const se = (ce) => {
|
|
1798
1798
|
ce.key === "/" && (/^(?:input|textarea|select|button)$/i.test(ce.target.tagName) || (ce.preventDefault(), document.getElementById(o).focus()));
|
|
@@ -1811,7 +1811,7 @@ const Rt = 16, m1 = 10, k2 = (N) => {
|
|
|
1811
1811
|
Yt,
|
|
1812
1812
|
y({
|
|
1813
1813
|
className: H,
|
|
1814
|
-
decorator:
|
|
1814
|
+
decorator: X,
|
|
1815
1815
|
disabled: n,
|
|
1816
1816
|
id: o,
|
|
1817
1817
|
inputFieldType: "text",
|
|
@@ -1829,7 +1829,7 @@ const Rt = 16, m1 = 10, k2 = (N) => {
|
|
|
1829
1829
|
/* @__PURE__ */ e.createElement(
|
|
1830
1830
|
"input",
|
|
1831
1831
|
{
|
|
1832
|
-
className: [q,
|
|
1832
|
+
className: [q, Y].join(" ").trim().replace(/\s+/g, " "),
|
|
1833
1833
|
type: _,
|
|
1834
1834
|
id: o,
|
|
1835
1835
|
name: o,
|
|
@@ -1840,13 +1840,13 @@ const Rt = 16, m1 = 10, k2 = (N) => {
|
|
|
1840
1840
|
value: z,
|
|
1841
1841
|
onBlur: ue,
|
|
1842
1842
|
onChange: we,
|
|
1843
|
-
onFocus:
|
|
1843
|
+
onFocus: ie,
|
|
1844
1844
|
ref: K,
|
|
1845
1845
|
"aria-invalid": W === "error",
|
|
1846
1846
|
"aria-describedby": ke ? `${o}__message` : null,
|
|
1847
1847
|
autoComplete: _ === "password" ? "off" : t,
|
|
1848
|
-
maxLength:
|
|
1849
|
-
minLength:
|
|
1848
|
+
maxLength: re,
|
|
1849
|
+
minLength: re
|
|
1850
1850
|
}
|
|
1851
1851
|
),
|
|
1852
1852
|
S && /* @__PURE__ */ e.createElement("div", { className: "pds-input__counter" }, S),
|
|
@@ -2232,22 +2232,22 @@ const J = {
|
|
|
2232
2232
|
E === "error" && (L = "error"), E === "success" && (L = "success");
|
|
2233
2233
|
const z = g || l, V = typeof w != "undefined", S = typeof t != "undefined", M = (_e) => h.findIndex((Me) => Me.value === _e), O = V && M(w) >= 0 ? M(w) : null, D = S ? M(t) : null, W = O || D, [Z, U] = F(!1), [G, K] = F(null), [T, A] = F(
|
|
2234
2234
|
W != null ? W : null
|
|
2235
|
-
), j = T !== null ? (Le = h[T]) == null ? void 0 : Le.label : void 0, q = T !== null ? (Ee = h[T]) == null ? void 0 : Ee.value : void 0,
|
|
2235
|
+
), j = T !== null ? (Le = h[T]) == null ? void 0 : Le.label : void 0, q = T !== null ? (Ee = h[T]) == null ? void 0 : Ee.value : void 0, Y = ae([]), { context: X, refs: re } = Se({
|
|
2236
2236
|
open: Z,
|
|
2237
2237
|
onOpenChange: U,
|
|
2238
2238
|
whileElementsMounted: Be
|
|
2239
|
-
}), ee = Ge(
|
|
2239
|
+
}), ee = Ge(X, {
|
|
2240
2240
|
enabled: !s,
|
|
2241
2241
|
event: "mousedown"
|
|
2242
|
-
}), pe = Te(
|
|
2243
|
-
listRef:
|
|
2242
|
+
}), pe = Te(X), ie = De(X, { role: "listbox" }), le = ot(X, {
|
|
2243
|
+
listRef: Y,
|
|
2244
2244
|
activeIndex: G,
|
|
2245
2245
|
selectedIndex: T,
|
|
2246
2246
|
onNavigate: K,
|
|
2247
2247
|
loop: !0
|
|
2248
2248
|
}), { getReferenceProps: we, getFloatingProps: ue, getItemProps: he } = Oe(
|
|
2249
|
-
[
|
|
2250
|
-
), { isMounted: te, styles: fe } = Ke(
|
|
2249
|
+
[ie, pe, le, ee]
|
|
2250
|
+
), { isMounted: te, styles: fe } = Ke(X, {
|
|
2251
2251
|
duration: {
|
|
2252
2252
|
open: 300,
|
|
2253
2253
|
close: 150
|
|
@@ -2265,7 +2265,7 @@ const J = {
|
|
|
2265
2265
|
const Me = h[_e];
|
|
2266
2266
|
V || (A(_e), U(!1)), i && i(Me);
|
|
2267
2267
|
};
|
|
2268
|
-
|
|
2268
|
+
oe(() => {
|
|
2269
2269
|
if (V) {
|
|
2270
2270
|
const _e = M(w);
|
|
2271
2271
|
A(_e), U(!1);
|
|
@@ -2276,13 +2276,13 @@ const J = {
|
|
|
2276
2276
|
}, ce = () => {
|
|
2277
2277
|
d && d(q);
|
|
2278
2278
|
}, xe = () => {
|
|
2279
|
-
|
|
2279
|
+
re.reference.current.focus();
|
|
2280
2280
|
}, He = h.map((_e, Me) => /* @__PURE__ */ e.createElement(
|
|
2281
2281
|
S1,
|
|
2282
2282
|
y({
|
|
2283
2283
|
key: Me,
|
|
2284
2284
|
ref: (Pe) => {
|
|
2285
|
-
|
|
2285
|
+
Y.current[Me] = Pe;
|
|
2286
2286
|
},
|
|
2287
2287
|
tabIndex: Me === G ? 0 : -1,
|
|
2288
2288
|
"aria-selected": Me === T && Me === G,
|
|
@@ -2292,7 +2292,7 @@ const J = {
|
|
|
2292
2292
|
ke(Me);
|
|
2293
2293
|
},
|
|
2294
2294
|
onKeyDown(Pe) {
|
|
2295
|
-
Pe.key === "Enter" && (Pe.preventDefault(), ke(Me),
|
|
2295
|
+
Pe.key === "Enter" && (Pe.preventDefault(), ke(Me), re.reference.current.focus()), Pe.key === "Escape" && (Pe.preventDefault(), re.reference.current.focus());
|
|
2296
2296
|
}
|
|
2297
2297
|
})),
|
|
2298
2298
|
_e.label,
|
|
@@ -2328,7 +2328,7 @@ const J = {
|
|
|
2328
2328
|
className: `${$}__input-wrapper`,
|
|
2329
2329
|
id: n,
|
|
2330
2330
|
tabIndex: 0,
|
|
2331
|
-
ref:
|
|
2331
|
+
ref: re.setReference,
|
|
2332
2332
|
"aria-labelledby": "select-label",
|
|
2333
2333
|
"aria-autocomplete": "none"
|
|
2334
2334
|
}, we({
|
|
@@ -2342,7 +2342,7 @@ const J = {
|
|
|
2342
2342
|
te && /* @__PURE__ */ e.createElement(
|
|
2343
2343
|
"div",
|
|
2344
2344
|
y({
|
|
2345
|
-
ref:
|
|
2345
|
+
ref: re.setFloating,
|
|
2346
2346
|
className: `${$}__dropdown`
|
|
2347
2347
|
}, ue({
|
|
2348
2348
|
style: {
|
|
@@ -2600,7 +2600,7 @@ const V2 = (s) => {
|
|
|
2600
2600
|
},
|
|
2601
2601
|
[n, a]
|
|
2602
2602
|
), [f] = F(h);
|
|
2603
|
-
return
|
|
2603
|
+
return oe(() => {
|
|
2604
2604
|
x2(
|
|
2605
2605
|
h,
|
|
2606
2606
|
o,
|
|
@@ -3398,7 +3398,7 @@ const F2 = p.exact({
|
|
|
3398
3398
|
const [t, s] = F(
|
|
3399
3399
|
window.innerWidth !== void 0 ? window.innerWidth : 1024
|
|
3400
3400
|
);
|
|
3401
|
-
return
|
|
3401
|
+
return oe(() => {
|
|
3402
3402
|
s(window.innerWidth);
|
|
3403
3403
|
const n = () => {
|
|
3404
3404
|
s(window.innerWidth);
|
|
@@ -3420,7 +3420,7 @@ const F2 = p.exact({
|
|
|
3420
3420
|
mobileMenuMaxWidth: s,
|
|
3421
3421
|
windowWidth: n
|
|
3422
3422
|
};
|
|
3423
|
-
return
|
|
3423
|
+
return oe(() => {
|
|
3424
3424
|
a ? document.body.classList.add("pds-no-scroll-x") : document.body.classList.remove("pds-no-scroll-x");
|
|
3425
3425
|
}, [a]), /* @__PURE__ */ e.createElement(Ae.Provider, { value: o }, t);
|
|
3426
3426
|
}, u1 = [
|
|
@@ -3632,20 +3632,20 @@ const At = (t) => t.isSeparator, Pt = (t) => t.isHeading, Ft = (t) => t.isLink,
|
|
|
3632
3632
|
let L = !1;
|
|
3633
3633
|
const z = $e(Ae);
|
|
3634
3634
|
z && (L = z.isMobile);
|
|
3635
|
-
const V = g && L, S = 'data:image/svg+xml,<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12.5" cy="12.5" r="12.5" fill="%23CFCFD3"/><path d="M12.5 11.75C11.2422 11.75 10.0938 11.0938 9.46484 10C8.83594 8.93359 8.83594 7.59375 9.46484 6.5C10.0938 5.43359 11.2422 4.75 12.5 4.75C13.7305 4.75 14.8789 5.43359 15.5078 6.5C16.1367 7.59375 16.1367 8.93359 15.5078 10C14.8789 11.0938 13.7305 11.75 12.5 11.75ZM11.2422 13.0625H13.7305C16.4375 13.0625 18.625 15.25 18.625 17.957C18.625 18.3945 18.2422 18.75 17.8047 18.75H7.16797C6.73047 18.75 6.375 18.3945 6.375 17.957C6.375 15.25 8.53516 13.0625 11.2422 13.0625Z" fill="%2323232D"/></svg>', M = "pds-menu-button", O = V ? `${M}--isMobile` : null, D = g ? `${M}--navbar` : null, W = Ue(), [Z] = F(`menu-button-${W}`), [U] = F(`menu-listbox-${W}`), G = c || Z, K = N.floating, T = ae(null), [A, j] = F(!1), [q,
|
|
3635
|
+
const V = g && L, S = 'data:image/svg+xml,<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12.5" cy="12.5" r="12.5" fill="%23CFCFD3"/><path d="M12.5 11.75C11.2422 11.75 10.0938 11.0938 9.46484 10C8.83594 8.93359 8.83594 7.59375 9.46484 6.5C10.0938 5.43359 11.2422 4.75 12.5 4.75C13.7305 4.75 14.8789 5.43359 15.5078 6.5C16.1367 7.59375 16.1367 8.93359 15.5078 10C14.8789 11.0938 13.7305 11.75 12.5 11.75ZM11.2422 13.0625H13.7305C16.4375 13.0625 18.625 15.25 18.625 17.957C18.625 18.3945 18.2422 18.75 17.8047 18.75H7.16797C6.73047 18.75 6.375 18.3945 6.375 17.957C6.375 15.25 8.53516 13.0625 11.2422 13.0625Z" fill="%2323232D"/></svg>', M = "pds-menu-button", O = V ? `${M}--isMobile` : null, D = g ? `${M}--navbar` : null, W = Ue(), [Z] = F(`menu-button-${W}`), [U] = F(`menu-listbox-${W}`), G = c || Z, K = N.floating, T = ae(null), [A, j] = F(!1), [q, Y] = F(!1), [X, re] = F(""), [ee, pe] = F(0), ie = ae([]), le = ae([]), we = ae([]);
|
|
3636
3636
|
e2(() => {
|
|
3637
3637
|
window.addEventListener("mousedown", Ee, !0), H();
|
|
3638
3638
|
const B = K.current;
|
|
3639
3639
|
return B && (B.dataset.fuiPlacement = k), q && (setTimeout(() => {
|
|
3640
3640
|
B.focus();
|
|
3641
|
-
}, 0),
|
|
3641
|
+
}, 0), Y(!1)), () => {
|
|
3642
3642
|
window.removeEventListener("mousedown", Ee, !0);
|
|
3643
3643
|
};
|
|
3644
3644
|
}, [A, k]);
|
|
3645
3645
|
const ue = (B, ne) => {
|
|
3646
|
-
|
|
3646
|
+
re(B), pe(ne);
|
|
3647
3647
|
}, he = () => {
|
|
3648
|
-
j(!0),
|
|
3648
|
+
j(!0), Y(!0);
|
|
3649
3649
|
}, te = () => {
|
|
3650
3650
|
j(!1), ue(void 0, -1), T.current.querySelector(`#${G}`).focus();
|
|
3651
3651
|
}, fe = (B) => {
|
|
@@ -3666,14 +3666,14 @@ const At = (t) => t.isSeparator, Pt = (t) => t.isHeading, Ft = (t) => t.isLink,
|
|
|
3666
3666
|
}, ke = (B) => {
|
|
3667
3667
|
const ne = le.current.indexOf(B), Q = we.current[ne];
|
|
3668
3668
|
if (Q.callback && !Q.disabled && Q.callback(Q), Q.linkContent && !Q.disabled) {
|
|
3669
|
-
const
|
|
3670
|
-
|
|
3669
|
+
const de = T.current.querySelector(`#${B} a`);
|
|
3670
|
+
de && de.click();
|
|
3671
3671
|
}
|
|
3672
3672
|
}, se = () => {
|
|
3673
3673
|
const B = le.current[ee];
|
|
3674
3674
|
ke(B);
|
|
3675
3675
|
}, ce = (B) => {
|
|
3676
|
-
A ? te() : he(),
|
|
3676
|
+
A ? te() : he(), Y((ne) => !ne), B.stopPropagation(), B.preventDefault();
|
|
3677
3677
|
}, xe = (B) => {
|
|
3678
3678
|
ke(B.currentTarget.id), V || te();
|
|
3679
3679
|
}, He = (B) => {
|
|
@@ -3691,14 +3691,14 @@ const At = (t) => t.isSeparator, Pt = (t) => t.isHeading, Ft = (t) => t.isLink,
|
|
|
3691
3691
|
break;
|
|
3692
3692
|
case "Up":
|
|
3693
3693
|
case "ArrowUp": {
|
|
3694
|
-
const
|
|
3695
|
-
he(), ue(le.current[
|
|
3694
|
+
const de = le.current.length - 1;
|
|
3695
|
+
he(), ue(le.current[de], de), Q = !0;
|
|
3696
3696
|
break;
|
|
3697
3697
|
}
|
|
3698
3698
|
}
|
|
3699
3699
|
Q && (B.stopPropagation(), B.preventDefault());
|
|
3700
3700
|
}, Le = (B) => {
|
|
3701
|
-
let ne = B.key, Q = !1,
|
|
3701
|
+
let ne = B.key, Q = !1, de = "", me = 0;
|
|
3702
3702
|
function ye(Ce) {
|
|
3703
3703
|
return Ce.length === 1 && Ce.match(/\S/);
|
|
3704
3704
|
}
|
|
@@ -3717,11 +3717,11 @@ const At = (t) => t.isSeparator, Pt = (t) => t.isHeading, Ft = (t) => t.isLink,
|
|
|
3717
3717
|
break;
|
|
3718
3718
|
case "Up":
|
|
3719
3719
|
case "ArrowUp":
|
|
3720
|
-
me = ee - 1, me < 0 && (me = le.current.length - 1),
|
|
3720
|
+
me = ee - 1, me < 0 && (me = le.current.length - 1), de = le.current[me], ue(de, me), Q = !0;
|
|
3721
3721
|
break;
|
|
3722
3722
|
case "ArrowDown":
|
|
3723
3723
|
case "Down":
|
|
3724
|
-
me = ee + 1, me > le.current.length - 1 && (me = 0),
|
|
3724
|
+
me = ee + 1, me > le.current.length - 1 && (me = 0), de = le.current[me], ue(de, me), Q = !0;
|
|
3725
3725
|
break;
|
|
3726
3726
|
case "Home":
|
|
3727
3727
|
case "PageUp":
|
|
@@ -3744,7 +3744,7 @@ const At = (t) => t.isSeparator, Pt = (t) => t.isHeading, Ft = (t) => t.isLink,
|
|
|
3744
3744
|
}
|
|
3745
3745
|
}, Ee = (B) => {
|
|
3746
3746
|
T.current && !T.current.contains(B.target) && A && te();
|
|
3747
|
-
}, _e = (B, ne, Q = "",
|
|
3747
|
+
}, _e = (B, ne, Q = "", de = "", ...me) => {
|
|
3748
3748
|
const ye = Q ? `-group-${Q}` : "", Ce = G + ye + "-item-" + (ne + 1), Ve = B.id ? B.id : Ce;
|
|
3749
3749
|
if (At(B))
|
|
3750
3750
|
return /* @__PURE__ */ e.createElement("li", { role: "separator", key: Ve });
|
|
@@ -3753,8 +3753,8 @@ const At = (t) => t.isSeparator, Pt = (t) => t.isHeading, Ft = (t) => t.isLink,
|
|
|
3753
3753
|
"li",
|
|
3754
3754
|
{
|
|
3755
3755
|
role: "presentation",
|
|
3756
|
-
id:
|
|
3757
|
-
key:
|
|
3756
|
+
id: de || null,
|
|
3757
|
+
key: de,
|
|
3758
3758
|
className: `${M}__listbox-heading`
|
|
3759
3759
|
},
|
|
3760
3760
|
B.label
|
|
@@ -3764,7 +3764,7 @@ const At = (t) => t.isSeparator, Pt = (t) => t.isHeading, Ft = (t) => t.isLink,
|
|
|
3764
3764
|
if (Ft(B) || B.label) {
|
|
3765
3765
|
le.current.push(Ve), we.current.push(B);
|
|
3766
3766
|
let Xe = !1;
|
|
3767
|
-
|
|
3767
|
+
X !== "" && !B.disabled && (Xe = X === Ve);
|
|
3768
3768
|
let Ie;
|
|
3769
3769
|
if (B.label && (Ie = [B.label]), Ft(B) && (Ie = [B.linkContent.props.children]), B.iconName) {
|
|
3770
3770
|
const at = /* @__PURE__ */ e.createElement(P, { key: `icon-${W}`, iconName: B.iconName, iconSize: "md" });
|
|
@@ -3795,22 +3795,22 @@ const At = (t) => t.isSeparator, Pt = (t) => t.isHeading, Ft = (t) => t.isLink,
|
|
|
3795
3795
|
}
|
|
3796
3796
|
}, Me = (B, ne) => {
|
|
3797
3797
|
const Q = [];
|
|
3798
|
-
let
|
|
3798
|
+
let de = ne.shift(), me = [];
|
|
3799
3799
|
return B.map((ye, Ce) => {
|
|
3800
|
-
ye !==
|
|
3800
|
+
ye !== de ? (me.push(ye), Ce + 1 === B.length && Q.push(me)) : (Q.push(me), me = [], me.push(ye), de = ne.shift());
|
|
3801
3801
|
}), Q.filter((ye) => ye.length > 0);
|
|
3802
3802
|
}, Pe = (B) => {
|
|
3803
3803
|
le.current = [], we.current = [];
|
|
3804
3804
|
const ne = B, Q = B.filter(
|
|
3805
3805
|
Pt || At
|
|
3806
|
-
),
|
|
3806
|
+
), de = Q.length > 0;
|
|
3807
3807
|
let me = [`${M}__listbox`];
|
|
3808
|
-
if (g && me.push(`${M}__listbox--navbar`), (n === "avatar" || n === "avatar-with-text") && me.push(`${M}__listbox--avatar`), d === "end" && me.push(`${M}__listbox--end`), n === "icon-only" && me.push(`${M}__listbox--icon-only`), me = me.join(" ").trim().replace(/\s+/g, " "),
|
|
3808
|
+
if (g && me.push(`${M}__listbox--navbar`), (n === "avatar" || n === "avatar-with-text") && me.push(`${M}__listbox--avatar`), d === "end" && me.push(`${M}__listbox--end`), n === "icon-only" && me.push(`${M}__listbox--icon-only`), me = me.join(" ").trim().replace(/\s+/g, " "), de) {
|
|
3809
3809
|
const ye = Me(B, Q);
|
|
3810
3810
|
ye.forEach(() => {
|
|
3811
|
-
|
|
3811
|
+
ie.current.push(Ue());
|
|
3812
3812
|
});
|
|
3813
|
-
let Ce =
|
|
3813
|
+
let Ce = ie.current[0];
|
|
3814
3814
|
const Ve = ye[0].findIndex(
|
|
3815
3815
|
(Ie) => !At(Ie) && !Pt(Ie)
|
|
3816
3816
|
), Xe = `${G}-group-${Ce}-item-${Ve + 1}`;
|
|
@@ -3822,7 +3822,7 @@ const At = (t) => t.isSeparator, Pt = (t) => t.isHeading, Ft = (t) => t.isLink,
|
|
|
3822
3822
|
role: "menu",
|
|
3823
3823
|
tabIndex: -1,
|
|
3824
3824
|
"aria-labelledby": G,
|
|
3825
|
-
"aria-activedescendant":
|
|
3825
|
+
"aria-activedescendant": X !== "" ? X : Xe,
|
|
3826
3826
|
style: {
|
|
3827
3827
|
visibility: A ? "visible" : "hidden",
|
|
3828
3828
|
opacity: A ? "1" : "0",
|
|
@@ -3835,7 +3835,7 @@ const At = (t) => t.isSeparator, Pt = (t) => t.isHeading, Ft = (t) => t.isLink,
|
|
|
3835
3835
|
ref: $
|
|
3836
3836
|
},
|
|
3837
3837
|
ye.map((Ie, st) => {
|
|
3838
|
-
Ce =
|
|
3838
|
+
Ce = ie.current[st];
|
|
3839
3839
|
const nt = Ie[0].isHeading, at = nt ? `${G}-group-${Ce}-heading` : "", Z1 = `${G}-group-${Ce}`, U1 = nt ? null : `${m} ${st + 1}`;
|
|
3840
3840
|
return /* @__PURE__ */ e.createElement(
|
|
3841
3841
|
"ul",
|
|
@@ -3864,7 +3864,7 @@ const At = (t) => t.isSeparator, Pt = (t) => t.isHeading, Ft = (t) => t.isLink,
|
|
|
3864
3864
|
role: "menu",
|
|
3865
3865
|
tabIndex: -1,
|
|
3866
3866
|
"aria-labelledby": G,
|
|
3867
|
-
"aria-activedescendant":
|
|
3867
|
+
"aria-activedescendant": X !== "" ? X : ye,
|
|
3868
3868
|
style: {
|
|
3869
3869
|
visibility: A ? "visible" : "hidden",
|
|
3870
3870
|
opacity: A ? "1" : "0",
|
|
@@ -4067,7 +4067,7 @@ P1.propTypes = {
|
|
|
4067
4067
|
};
|
|
4068
4068
|
const F1 = ({ items: t, label: s, mobileMenuMaxWidth: n = 640 }) => {
|
|
4069
4069
|
const [a, c] = F(!1), [o, l] = F(0);
|
|
4070
|
-
|
|
4070
|
+
oe(() => (l(window.innerWidth), window.addEventListener("resize", r), () => {
|
|
4071
4071
|
window.removeEventListener("resize", r);
|
|
4072
4072
|
}), []);
|
|
4073
4073
|
const r = () => {
|
|
@@ -4142,19 +4142,19 @@ const U2 = (l) => {
|
|
|
4142
4142
|
const [d, i] = F(1025), [h, m] = F(null), [f, g] = F(-1), [E, w] = F(null), [u, C] = F({
|
|
4143
4143
|
containerChildren: []
|
|
4144
4144
|
});
|
|
4145
|
-
|
|
4145
|
+
oe(() => (i(window.innerWidth), window.addEventListener("resize", v), () => {
|
|
4146
4146
|
window.removeEventListener("resize", v);
|
|
4147
4147
|
}), []);
|
|
4148
4148
|
const v = () => {
|
|
4149
4149
|
i(window.innerWidth);
|
|
4150
4150
|
}, b = d <= a;
|
|
4151
|
-
|
|
4151
|
+
oe(() => {
|
|
4152
4152
|
u.containerChildren[h] && (u.containerChildren[h].classList.contains(
|
|
4153
4153
|
"pds-nav-menu__dropdown--separator"
|
|
4154
4154
|
) && E == "down" ? m(h + 1) : u.containerChildren[h].classList.contains(
|
|
4155
4155
|
"pds-nav-menu__dropdown--separator"
|
|
4156
4156
|
) && E == "up" ? m(h - 1) : u.containerChildren[h].children[0].focus());
|
|
4157
|
-
}, [h]),
|
|
4157
|
+
}, [h]), oe(() => {
|
|
4158
4158
|
f != -1 && (H.current[f].children[0].blur(), H.current[f].children[0].focus({
|
|
4159
4159
|
focusVisible: !0
|
|
4160
4160
|
}));
|
|
@@ -5599,8 +5599,8 @@ const Gt = (o) => {
|
|
|
5599
5599
|
]);
|
|
5600
5600
|
const k = l ? { width: `${l / 16}rem` } : null, N = "pds-checkbox", L = n ? J.disabled : null, z = E && !n ? J.required : null, V = C === "error" ? J.error : null, S = C === "success" ? J.success : null, M = h > 0 ? `${N}--indent-${h}` : null, O = u || d, D = typeof t != "undefined", W = typeof s != "undefined", [Z, U] = F(
|
|
5601
5601
|
W ? s : !1
|
|
5602
|
-
), G = t || Z, K = (
|
|
5603
|
-
D || U(
|
|
5602
|
+
), G = t || Z, K = (Y) => {
|
|
5603
|
+
D || U(Y.target.checked), f && f(Y);
|
|
5604
5604
|
}, T = `${N}__box`, A = c ? null : G ? `${T}--checked` : null, j = c ? `${T}--indeterminate` : null, q = Xt(() => {
|
|
5605
5605
|
if (c)
|
|
5606
5606
|
return /* @__PURE__ */ e.createElement(
|
|
@@ -5922,15 +5922,15 @@ const Gt = (o) => {
|
|
|
5922
5922
|
const T = k || f, A = typeof H != "undefined", j = typeof t != "undefined", q = (ge) => {
|
|
5923
5923
|
const ve = b.find((B) => B.value === ge);
|
|
5924
5924
|
return ve ? ve.label : "";
|
|
5925
|
-
}, [
|
|
5925
|
+
}, [Y, X] = F(!1), [re, ee] = F(null), [pe, ie] = F(
|
|
5926
5926
|
j ? q(t) : ""
|
|
5927
5927
|
), [le, we] = F([]), ue = A ? H : pe, he = ae([]), { context: te, refs: fe } = Se({
|
|
5928
|
-
open:
|
|
5929
|
-
onOpenChange:
|
|
5928
|
+
open: Y,
|
|
5929
|
+
onOpenChange: X,
|
|
5930
5930
|
whileElementsMounted: Be
|
|
5931
5931
|
}), ke = De(te, { role: "listbox" }), se = Te(te), ce = ot(te, {
|
|
5932
5932
|
listRef: he,
|
|
5933
|
-
activeIndex:
|
|
5933
|
+
activeIndex: re,
|
|
5934
5934
|
onNavigate: ee,
|
|
5935
5935
|
virtual: !0,
|
|
5936
5936
|
loop: !0,
|
|
@@ -5950,22 +5950,22 @@ const Gt = (o) => {
|
|
|
5950
5950
|
opacity: 0
|
|
5951
5951
|
}
|
|
5952
5952
|
}), Me = () => {
|
|
5953
|
-
|
|
5953
|
+
X(!Y);
|
|
5954
5954
|
}, Pe = () => {
|
|
5955
5955
|
var ge;
|
|
5956
|
-
!A &&
|
|
5956
|
+
!A && ie(""), ee(null), X(!0), (ge = fe.domReference.current) == null || ge.focus(), u && u();
|
|
5957
5957
|
}, tt = (ge) => {
|
|
5958
5958
|
let ve = ge.target.value;
|
|
5959
|
-
E && E(ge), A || (ve.length > 0 && (ve = ve.trimStart()),
|
|
5959
|
+
E && E(ge), A || (ve.length > 0 && (ve = ve.trimStart()), ie(ve)), ve ? (ee(null), X(!0)) : X(!1);
|
|
5960
5960
|
}, xt = (ge) => {
|
|
5961
5961
|
w && w(ge);
|
|
5962
5962
|
}, Vt = (ge) => {
|
|
5963
5963
|
C && C(ge);
|
|
5964
5964
|
}, dt = (ge) => {
|
|
5965
5965
|
const ve = le[ge];
|
|
5966
|
-
!A &&
|
|
5966
|
+
!A && ie(ve.label), ee(null), X(!1), v && v(ve);
|
|
5967
5967
|
}, It = (ge) => ge.map((B) => {
|
|
5968
|
-
const Xe = B, { label: ne, optionDisplay: Q, value:
|
|
5968
|
+
const Xe = B, { label: ne, optionDisplay: Q, value: de, searchIndex: me } = Xe, ye = I(Xe, ["label", "optionDisplay", "value", "searchIndex"]), Ce = de || ne, Ve = [ne, de];
|
|
5969
5969
|
return me && Ve.push(...me), y({
|
|
5970
5970
|
label: ne,
|
|
5971
5971
|
value: Ce,
|
|
@@ -5973,14 +5973,14 @@ const Gt = (o) => {
|
|
|
5973
5973
|
optionDisplay: Q
|
|
5974
5974
|
}, ye);
|
|
5975
5975
|
});
|
|
5976
|
-
|
|
5976
|
+
oe(() => {
|
|
5977
5977
|
const ge = It(b).filter(
|
|
5978
5978
|
(ve) => {
|
|
5979
5979
|
var Q;
|
|
5980
5980
|
const B = (Q = ve.searchIndex) == null ? void 0 : Q.map(
|
|
5981
|
-
(
|
|
5981
|
+
(de) => de.toLowerCase()
|
|
5982
5982
|
), ne = ue.toLowerCase();
|
|
5983
|
-
return B.some((
|
|
5983
|
+
return B.some((de) => de.includes(ne));
|
|
5984
5984
|
}
|
|
5985
5985
|
);
|
|
5986
5986
|
we(ge);
|
|
@@ -5993,16 +5993,16 @@ const Gt = (o) => {
|
|
|
5993
5993
|
key: ge
|
|
5994
5994
|
}, Le({
|
|
5995
5995
|
key: ne,
|
|
5996
|
-
ref(
|
|
5997
|
-
he.current[ve] =
|
|
5996
|
+
ref(de) {
|
|
5997
|
+
he.current[ve] = de;
|
|
5998
5998
|
},
|
|
5999
5999
|
onClick() {
|
|
6000
|
-
var
|
|
6001
|
-
dt(ve), (
|
|
6000
|
+
var de;
|
|
6001
|
+
dt(ve), (de = fe.domReference.current) == null || de.focus();
|
|
6002
6002
|
}
|
|
6003
6003
|
})), {
|
|
6004
|
-
tabIndex:
|
|
6005
|
-
isActive:
|
|
6004
|
+
tabIndex: re === ve ? 0 : -1,
|
|
6005
|
+
isActive: re === ve
|
|
6006
6006
|
}),
|
|
6007
6007
|
Q || B
|
|
6008
6008
|
);
|
|
@@ -6060,7 +6060,7 @@ const Gt = (o) => {
|
|
|
6060
6060
|
onChange: tt,
|
|
6061
6061
|
onFocus: Vt,
|
|
6062
6062
|
onKeyDown(ge) {
|
|
6063
|
-
ge.key === "Enter" &&
|
|
6063
|
+
ge.key === "Enter" && re != null && le[re] && dt(re);
|
|
6064
6064
|
}
|
|
6065
6065
|
}))
|
|
6066
6066
|
),
|
|
@@ -6086,7 +6086,7 @@ const Gt = (o) => {
|
|
|
6086
6086
|
}, xe({
|
|
6087
6087
|
onClick: Me,
|
|
6088
6088
|
disabled: s,
|
|
6089
|
-
"aria-expanded":
|
|
6089
|
+
"aria-expanded": Y,
|
|
6090
6090
|
"aria-label": h.triggerButton
|
|
6091
6091
|
})), {
|
|
6092
6092
|
className: `${D}__trigger`
|
|
@@ -6546,10 +6546,10 @@ const Gt = (o) => {
|
|
|
6546
6546
|
]);
|
|
6547
6547
|
const L = et(c), z = "pds-textarea", V = o ? "pds-is-resizable" : null, S = n ? J.disabled : null, M = g && !n ? J.required : null, O = b === "error" ? J.error : null, D = b === "success" ? J.success : null, W = f ? J.readonly : null, Z = v || r, U = _ != null && i !== void 0, G = typeof s != "undefined", [K, T] = F(
|
|
6548
6548
|
G ? s : ""
|
|
6549
|
-
), A = _ || K, j = (
|
|
6550
|
-
U || T(
|
|
6551
|
-
}, q = (
|
|
6552
|
-
d && d(
|
|
6549
|
+
), A = _ || K, j = (Y) => {
|
|
6550
|
+
U || T(Y.target.value), i && i(Y);
|
|
6551
|
+
}, q = (Y) => {
|
|
6552
|
+
d && d(Y);
|
|
6553
6553
|
};
|
|
6554
6554
|
return /* @__PURE__ */ e.createElement(
|
|
6555
6555
|
"div",
|
|
@@ -6684,23 +6684,23 @@ const Gt = (o) => {
|
|
|
6684
6684
|
const M = et(d), O = "pds-text-input", D = a ? J.disabled : null, W = C && !a ? J.required : null, Z = H === "error" ? J.error : null, U = H === "success" ? J.success : null, G = u ? J.readonly : null;
|
|
6685
6685
|
let K = null;
|
|
6686
6686
|
$ === "search" && (K = "search"), H === "error" && (K = "error"), H === "success" && (K = "success");
|
|
6687
|
-
const T = x || h, A = typeof k != "undefined", j = typeof n != "undefined", [q,
|
|
6687
|
+
const T = x || h, A = typeof k != "undefined", j = typeof n != "undefined", [q, Y] = F(
|
|
6688
6688
|
j ? n : ""
|
|
6689
|
-
),
|
|
6690
|
-
b &&
|
|
6689
|
+
), X = k || q, re = (he) => {
|
|
6690
|
+
b && ie && le(!1), m && m(he);
|
|
6691
6691
|
}, ee = (he) => {
|
|
6692
|
-
A ||
|
|
6692
|
+
A || Y(he.target.value), f && f(he);
|
|
6693
6693
|
}, pe = () => {
|
|
6694
|
-
A ||
|
|
6694
|
+
A || Y(""), g && g();
|
|
6695
6695
|
const he = document.getElementById(l);
|
|
6696
6696
|
he && he.focus();
|
|
6697
|
-
}, [
|
|
6697
|
+
}, [ie, le] = F(!1), we = () => {
|
|
6698
6698
|
le((te) => !te);
|
|
6699
6699
|
const he = document.getElementById(l);
|
|
6700
6700
|
he && he.focus();
|
|
6701
6701
|
};
|
|
6702
6702
|
let ue = $;
|
|
6703
|
-
return b && $ === "password" && (
|
|
6703
|
+
return b && $ === "password" && (ie ? ue = "text" : ue = "password"), /* @__PURE__ */ e.createElement(
|
|
6704
6704
|
"div",
|
|
6705
6705
|
y({
|
|
6706
6706
|
className: R([
|
|
@@ -6725,7 +6725,7 @@ const Gt = (o) => {
|
|
|
6725
6725
|
disabled: a
|
|
6726
6726
|
}
|
|
6727
6727
|
),
|
|
6728
|
-
b && $ === "password" && /* @__PURE__ */ e.createElement("div", { className: "visually-hidden", "aria-live": "polite" }, `${_.visibilityStatus} ${
|
|
6728
|
+
b && $ === "password" && /* @__PURE__ */ e.createElement("div", { className: "visually-hidden", "aria-live": "polite" }, `${_.visibilityStatus} ${ie ? "visible" : "hidden"}.`),
|
|
6729
6729
|
/* @__PURE__ */ e.createElement("div", { className: `${O}__input-wrapper` }, K && /* @__PURE__ */ e.createElement(pt, { variant: K }), /* @__PURE__ */ e.createElement(
|
|
6730
6730
|
"input",
|
|
6731
6731
|
y({
|
|
@@ -6740,13 +6740,13 @@ const Gt = (o) => {
|
|
|
6740
6740
|
disabled: a,
|
|
6741
6741
|
required: C,
|
|
6742
6742
|
autoComplete: $ === "password" ? "off" : t,
|
|
6743
|
-
onBlur:
|
|
6743
|
+
onBlur: re,
|
|
6744
6744
|
onChange: ee,
|
|
6745
6745
|
onFocus: E,
|
|
6746
6746
|
"aria-invalid": H === "error" ? !0 : null,
|
|
6747
6747
|
"aria-describedby": T ? `${l}__message` : null
|
|
6748
6748
|
}, r)
|
|
6749
|
-
), c &&
|
|
6749
|
+
), c && X && /* @__PURE__ */ e.createElement(
|
|
6750
6750
|
Qt,
|
|
6751
6751
|
{
|
|
6752
6752
|
id: l,
|
|
@@ -6758,13 +6758,13 @@ const Gt = (o) => {
|
|
|
6758
6758
|
{
|
|
6759
6759
|
type: "button",
|
|
6760
6760
|
className: `${O}__visibility-toggle`,
|
|
6761
|
-
title:
|
|
6761
|
+
title: ie ? _.visibilityToggleHide : _.visibilityToggleShow,
|
|
6762
6762
|
"aria-controls": l,
|
|
6763
6763
|
onClick: we,
|
|
6764
6764
|
onMouseDown: (he) => he.preventDefault()
|
|
6765
6765
|
},
|
|
6766
|
-
/* @__PURE__ */ e.createElement(P, { iconName:
|
|
6767
|
-
), o && $ === "search" && !
|
|
6766
|
+
/* @__PURE__ */ e.createElement(P, { iconName: ie ? "eyeSlash" : "eye", iconSize: "md" })
|
|
6767
|
+
), o && $ === "search" && !X && /* @__PURE__ */ e.createElement(
|
|
6768
6768
|
V1,
|
|
6769
6769
|
{
|
|
6770
6770
|
inputId: l,
|
|
@@ -6774,7 +6774,7 @@ const Gt = (o) => {
|
|
|
6774
6774
|
I1,
|
|
6775
6775
|
{
|
|
6776
6776
|
id: l,
|
|
6777
|
-
currentLength:
|
|
6777
|
+
currentLength: X.length,
|
|
6778
6778
|
maxLength: s,
|
|
6779
6779
|
overLimitMessage: _.counterOverLimit
|
|
6780
6780
|
}
|
|
@@ -6845,9 +6845,9 @@ const Gt = (o) => {
|
|
|
6845
6845
|
"className"
|
|
6846
6846
|
]);
|
|
6847
6847
|
const m = "pds-modal", f = o !== "md" ? `${m}--${o}` : null, [g, E] = F(a);
|
|
6848
|
-
|
|
6848
|
+
oe(() => {
|
|
6849
6849
|
E(a);
|
|
6850
|
-
}, [a]),
|
|
6850
|
+
}, [a]), oe(() => {
|
|
6851
6851
|
c(g);
|
|
6852
6852
|
}, [g]);
|
|
6853
6853
|
const { refs: w, context: u, floatingStyles: C } = Se({
|
|
@@ -7177,7 +7177,7 @@ const Gt = (o) => {
|
|
|
7177
7177
|
}, u = (O) => {
|
|
7178
7178
|
O.target.nodeName === "A" && i(!1);
|
|
7179
7179
|
};
|
|
7180
|
-
|
|
7180
|
+
oe(() => {
|
|
7181
7181
|
if (d) {
|
|
7182
7182
|
const O = document.querySelector(".pds-dropdown-menu__dropdown");
|
|
7183
7183
|
return O.addEventListener("click", u), () => {
|
|
@@ -7788,24 +7788,25 @@ const Gt = (o) => {
|
|
|
7788
7788
|
}, G = (q) => {
|
|
7789
7789
|
b(q.value), d && d(q);
|
|
7790
7790
|
};
|
|
7791
|
-
|
|
7792
|
-
const q = (
|
|
7793
|
-
_.current && !_.current.contains(
|
|
7794
|
-
},
|
|
7791
|
+
oe(() => {
|
|
7792
|
+
const q = (X) => {
|
|
7793
|
+
_.current && !_.current.contains(X.target) && C(!1);
|
|
7794
|
+
}, Y = (X) => {
|
|
7795
7795
|
var ee;
|
|
7796
|
-
const
|
|
7797
|
-
|
|
7796
|
+
const re = (ee = _.current) == null ? void 0 : ee.querySelector("input");
|
|
7797
|
+
X.key === "Tab" && u && re === document.activeElement && C(!1);
|
|
7798
7798
|
};
|
|
7799
7799
|
if (u)
|
|
7800
|
-
return document.addEventListener("mousedown", q), document.addEventListener("keydown",
|
|
7801
|
-
document.removeEventListener("mousedown", q), document.removeEventListener("keydown",
|
|
7800
|
+
return document.addEventListener("mousedown", q), document.addEventListener("keydown", Y), () => {
|
|
7801
|
+
document.removeEventListener("mousedown", q), document.removeEventListener("keydown", Y);
|
|
7802
7802
|
};
|
|
7803
7803
|
}, [u]);
|
|
7804
7804
|
const K = h.map((q) => {
|
|
7805
|
-
const { machineName: X, name:
|
|
7805
|
+
const { id: Y, machineName: X, name: re } = q;
|
|
7806
7806
|
return {
|
|
7807
|
-
|
|
7808
|
-
|
|
7807
|
+
id: Y,
|
|
7808
|
+
label: re,
|
|
7809
|
+
value: X != null ? X : re,
|
|
7809
7810
|
optionDisplay: /* @__PURE__ */ e.createElement(is, { option: q })
|
|
7810
7811
|
};
|
|
7811
7812
|
}), T = /* @__PURE__ */ e.createElement("div", { ref: _, className: `${D}__combobox-wrapper` }, /* @__PURE__ */ e.createElement(
|
|
@@ -7925,11 +7926,11 @@ const Gt = (o) => {
|
|
|
7925
7926
|
}
|
|
7926
7927
|
j && (T.stopPropagation(), T.preventDefault());
|
|
7927
7928
|
};
|
|
7928
|
-
|
|
7929
|
+
oe(() => (window.addEventListener("keyup", H), () => {
|
|
7929
7930
|
window.removeEventListener("keyup", H);
|
|
7930
7931
|
}), []);
|
|
7931
7932
|
const k = () => w(!E), N = s2();
|
|
7932
|
-
|
|
7933
|
+
oe(() => {
|
|
7933
7934
|
if (u && t) {
|
|
7934
7935
|
const T = H1(
|
|
7935
7936
|
document.querySelector(".pds-navbar__mobile")
|
|
@@ -7944,14 +7945,14 @@ const Gt = (o) => {
|
|
|
7944
7945
|
const L = (T) => {
|
|
7945
7946
|
T.target.nodeName === "A" && w(!1);
|
|
7946
7947
|
};
|
|
7947
|
-
|
|
7948
|
+
oe(() => {
|
|
7948
7949
|
if (E) {
|
|
7949
7950
|
const T = document.querySelector(".pds-navbar__bar-mobile"), A = document.querySelector(".pds-navbar__mobile");
|
|
7950
7951
|
return T.addEventListener("click", L), A.addEventListener("click", L), () => {
|
|
7951
7952
|
T.removeEventListener("click", L), A.removeEventListener("click", L);
|
|
7952
7953
|
};
|
|
7953
7954
|
}
|
|
7954
|
-
}, [E]),
|
|
7955
|
+
}, [E]), oe(() => {
|
|
7955
7956
|
E ? document.body.classList.add("pds-no-scroll") : document.body.classList.remove("pds-no-scroll");
|
|
7956
7957
|
}, [E]);
|
|
7957
7958
|
const z = kt(t), V = z["items-left"], S = z["items-right"];
|
|
@@ -8030,7 +8031,7 @@ const Gt = (o) => {
|
|
|
8030
8031
|
"className"
|
|
8031
8032
|
]);
|
|
8032
8033
|
const m = "pds-side-nav", [f, g] = F(1025);
|
|
8033
|
-
|
|
8034
|
+
oe(() => (g(window.innerWidth), window.addEventListener("resize", E), () => {
|
|
8034
8035
|
window.removeEventListener("resize", E);
|
|
8035
8036
|
}), []);
|
|
8036
8037
|
const E = () => {
|
|
@@ -8135,7 +8136,7 @@ const Gt = (o) => {
|
|
|
8135
8136
|
"className"
|
|
8136
8137
|
]);
|
|
8137
8138
|
const m = "pds-side-nav-compact", [f, g] = F(1025);
|
|
8138
|
-
|
|
8139
|
+
oe(() => (g(window.innerWidth), window.addEventListener("resize", E), () => {
|
|
8139
8140
|
window.removeEventListener("resize", E);
|
|
8140
8141
|
}), []);
|
|
8141
8142
|
const E = () => {
|
|
@@ -8293,22 +8294,22 @@ const Gt = (o) => {
|
|
|
8293
8294
|
opacity: 0
|
|
8294
8295
|
}
|
|
8295
8296
|
}), O = (q) => {
|
|
8296
|
-
var
|
|
8297
|
-
q.preventDefault(), q.key === "Enter" && ((
|
|
8298
|
-
}, D = (q,
|
|
8299
|
-
const
|
|
8300
|
-
g(
|
|
8301
|
-
const
|
|
8302
|
-
m(
|
|
8297
|
+
var Y;
|
|
8298
|
+
q.preventDefault(), q.key === "Enter" && ((Y = b.current[d].querySelector("a")) == null || Y.click()), q.key === "Tab" && q.shiftKey && (E ? document.getElementById("links-filter").focus() : r(!1));
|
|
8299
|
+
}, D = (q, Y) => Fe(q.linkContent).toLowerCase().includes(Y.toLowerCase()), W = (q) => {
|
|
8300
|
+
const Y = q.target.value;
|
|
8301
|
+
g(Y);
|
|
8302
|
+
const X = a.filter((re) => D(re, Y));
|
|
8303
|
+
m(X);
|
|
8303
8304
|
};
|
|
8304
|
-
|
|
8305
|
-
const q = a.filter((
|
|
8305
|
+
oe(() => {
|
|
8306
|
+
const q = a.filter((Y) => D(Y, f));
|
|
8306
8307
|
m(q);
|
|
8307
8308
|
}, [a]);
|
|
8308
8309
|
const Z = () => {
|
|
8309
8310
|
g(""), m(a);
|
|
8310
8311
|
}, U = a.reduce(
|
|
8311
|
-
(q,
|
|
8312
|
+
(q, Y) => Fe(q.linkContent).length > Fe(Y.linkContent).length ? q : Y
|
|
8312
8313
|
), K = {
|
|
8313
8314
|
minWidth: "13rem",
|
|
8314
8315
|
width: `${Fe(
|
|
@@ -8327,17 +8328,17 @@ const Gt = (o) => {
|
|
|
8327
8328
|
type: "search",
|
|
8328
8329
|
autoComplete: "off"
|
|
8329
8330
|
}
|
|
8330
|
-
)), j = h.map((q,
|
|
8331
|
-
const
|
|
8331
|
+
)), j = h.map((q, Y) => {
|
|
8332
|
+
const X = q.isActive ? `${v}--active` : null;
|
|
8332
8333
|
return /* @__PURE__ */ e.createElement(
|
|
8333
8334
|
"li",
|
|
8334
8335
|
y({
|
|
8335
|
-
key:
|
|
8336
|
-
className: R([v,
|
|
8337
|
-
ref: (
|
|
8338
|
-
b.current[
|
|
8336
|
+
key: Y,
|
|
8337
|
+
className: R([v, X]),
|
|
8338
|
+
ref: (re) => {
|
|
8339
|
+
b.current[Y] = re;
|
|
8339
8340
|
},
|
|
8340
|
-
tabIndex:
|
|
8341
|
+
tabIndex: Y === d ? 0 : -1,
|
|
8341
8342
|
onKeyDown: O
|
|
8342
8343
|
}, V()),
|
|
8343
8344
|
q.linkContent,
|
|
@@ -8516,19 +8517,19 @@ const Gt = (o) => {
|
|
|
8516
8517
|
E.current.push(pe), w.current.push(ee);
|
|
8517
8518
|
});
|
|
8518
8519
|
const T = (ee) => {
|
|
8519
|
-
const pe = E.current.indexOf(ee),
|
|
8520
|
-
|
|
8520
|
+
const pe = E.current.indexOf(ee), ie = w.current[pe];
|
|
8521
|
+
ie.linkContent && !ie.disabled && (V.current[pe].querySelector("a").click(), g(!1)), ie.callback && !ie.disabled && (ie.callback(ie), g(!1));
|
|
8521
8522
|
}, A = (ee) => {
|
|
8522
8523
|
ee.preventDefault(), ee.key === "Enter" && T(ee.currentTarget.id);
|
|
8523
8524
|
}, j = (ee) => {
|
|
8524
8525
|
T(ee.currentTarget.id);
|
|
8525
8526
|
}, q = s.map((ee, pe) => {
|
|
8526
|
-
const
|
|
8527
|
+
const ie = E.current[pe], le = `${b}__item`, we = ee.disabled ? `${le}--disabled` : null;
|
|
8527
8528
|
return /* @__PURE__ */ e.createElement(
|
|
8528
8529
|
"li",
|
|
8529
8530
|
y({
|
|
8530
|
-
key:
|
|
8531
|
-
id:
|
|
8531
|
+
key: ie,
|
|
8532
|
+
id: ie,
|
|
8532
8533
|
className: R([le, we]),
|
|
8533
8534
|
role: "menuitem",
|
|
8534
8535
|
tabIndex: h === pe ? 0 : -1,
|
|
@@ -8547,7 +8548,7 @@ const Gt = (o) => {
|
|
|
8547
8548
|
),
|
|
8548
8549
|
ee.linkContent ? ee.linkContent : ee.label
|
|
8549
8550
|
);
|
|
8550
|
-
}),
|
|
8551
|
+
}), Y = /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
8551
8552
|
"button",
|
|
8552
8553
|
y({
|
|
8553
8554
|
className: `${b}__trigger`,
|
|
@@ -8565,19 +8566,19 @@ const Gt = (o) => {
|
|
|
8565
8566
|
})
|
|
8566
8567
|
}, O()),
|
|
8567
8568
|
/* @__PURE__ */ e.createElement("div", { style: y({}, Z) }, /* @__PURE__ */ e.createElement("ul", { className: $, role: "menu" }, K, /* @__PURE__ */ e.createElement("li", { role: "separator" }), q))
|
|
8568
|
-
)),
|
|
8569
|
+
)), X = (ee) => {
|
|
8569
8570
|
const pe = ee.currentTarget;
|
|
8570
8571
|
pe.classList.toggle(`${b}__toggle--expanded`), pe.setAttribute(
|
|
8571
8572
|
"aria-expanded",
|
|
8572
8573
|
pe.getAttribute("aria-expanded") === "true" ? "false" : "true"
|
|
8573
8574
|
), pe.nextElementSibling.classList.toggle(`${b}__mobile-menu--expanded`);
|
|
8574
|
-
},
|
|
8575
|
+
}, re = /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
8575
8576
|
"button",
|
|
8576
8577
|
{
|
|
8577
8578
|
className: `${b}__toggle`,
|
|
8578
8579
|
"aria-expanded": !1,
|
|
8579
8580
|
"aria-label": t,
|
|
8580
|
-
onClick:
|
|
8581
|
+
onClick: X
|
|
8581
8582
|
},
|
|
8582
8583
|
/* @__PURE__ */ e.createElement("span", { className: `${b}__toggle-left` }, U, c || n),
|
|
8583
8584
|
G
|
|
@@ -8596,7 +8597,7 @@ const Gt = (o) => {
|
|
|
8596
8597
|
y({
|
|
8597
8598
|
className: R([b, _, l != null ? l : ""])
|
|
8598
8599
|
}, r),
|
|
8599
|
-
v ?
|
|
8600
|
+
v ? re : Y
|
|
8600
8601
|
);
|
|
8601
8602
|
}, ms = {
|
|
8602
8603
|
silver: "Silver",
|
|
@@ -8662,19 +8663,19 @@ const Gt = (o) => {
|
|
|
8662
8663
|
});
|
|
8663
8664
|
let q = d.find((te) => te.isActive);
|
|
8664
8665
|
q || (q = d[0]);
|
|
8665
|
-
const
|
|
8666
|
+
const Y = (te) => {
|
|
8666
8667
|
const { value: fe } = te.target, ke = d.filter((se) => se.displayName.toLowerCase().includes(fe.toLowerCase()));
|
|
8667
8668
|
v(ke);
|
|
8668
8669
|
};
|
|
8669
|
-
|
|
8670
|
+
oe(() => {
|
|
8670
8671
|
const te = d.map((fe) => be(y({}, fe), {
|
|
8671
8672
|
isActive: fe.isActive
|
|
8672
8673
|
}));
|
|
8673
8674
|
v(te);
|
|
8674
8675
|
}, [d]);
|
|
8675
|
-
const
|
|
8676
|
+
const X = (te) => {
|
|
8676
8677
|
te.preventDefault(), te.key === "Enter" && b.current[w].querySelector("a").click(), te.key === "Tab" && (te.shiftKey ? $ ? document.getElementById("workspace-filter").focus() : E(!1) : s ? _.current.querySelector("a").focus() : E(!1));
|
|
8677
|
-
},
|
|
8678
|
+
}, re = /* @__PURE__ */ e.createElement("div", { className: `${N}__button-content` }, /* @__PURE__ */ e.createElement(
|
|
8678
8679
|
ut,
|
|
8679
8680
|
{
|
|
8680
8681
|
size: "sm",
|
|
@@ -8703,12 +8704,12 @@ const Gt = (o) => {
|
|
|
8703
8704
|
onClear: () => v(d),
|
|
8704
8705
|
id: "workspace-filter",
|
|
8705
8706
|
label: a,
|
|
8706
|
-
onChange:
|
|
8707
|
+
onChange: Y,
|
|
8707
8708
|
placeholder: n,
|
|
8708
8709
|
showLabel: !1,
|
|
8709
8710
|
type: "search"
|
|
8710
8711
|
}
|
|
8711
|
-
)),
|
|
8712
|
+
)), ie = C.map(
|
|
8712
8713
|
(te, fe) => {
|
|
8713
8714
|
const ke = `${N}__item`, se = te.isActive ? `${ke}--active` : null, ce = te.isUnprivileged ? `${ke}--unprivileged` : null, xe = /* @__PURE__ */ e.createElement(P, { iconName: "check", className: `${N}__active-icon` }), He = te.workspaceId, Le = te.workspaceLink.type, Ee = te.isUnprivileged ? null : (_e) => {
|
|
8714
8715
|
b.current[fe] = _e;
|
|
@@ -8726,7 +8727,7 @@ const Gt = (o) => {
|
|
|
8726
8727
|
role: "menuitem",
|
|
8727
8728
|
tabIndex: w === fe ? 0 : -1,
|
|
8728
8729
|
ref: Ee,
|
|
8729
|
-
onKeyDown:
|
|
8730
|
+
onKeyDown: X
|
|
8730
8731
|
}, T()),
|
|
8731
8732
|
/* @__PURE__ */ e.createElement(
|
|
8732
8733
|
Le,
|
|
@@ -8763,7 +8764,7 @@ const Gt = (o) => {
|
|
|
8763
8764
|
"aria-label": t,
|
|
8764
8765
|
ref: S.setReference
|
|
8765
8766
|
}, G()),
|
|
8766
|
-
|
|
8767
|
+
re,
|
|
8767
8768
|
ee
|
|
8768
8769
|
), A && /* @__PURE__ */ e.createElement(
|
|
8769
8770
|
"div",
|
|
@@ -8774,7 +8775,7 @@ const Gt = (o) => {
|
|
|
8774
8775
|
zIndex: "var(--pds-z-index-dropdown)"
|
|
8775
8776
|
}
|
|
8776
8777
|
}, K()),
|
|
8777
|
-
/* @__PURE__ */ e.createElement("div", { style: y({}, j) }, pe, /* @__PURE__ */ e.createElement("ul", { className: R([z, V]), role: "menu" }, /* @__PURE__ */ e.createElement("li", { className: `${N}__item-heading`, role: "presentation" }, c),
|
|
8778
|
+
/* @__PURE__ */ e.createElement("div", { style: y({}, j) }, pe, /* @__PURE__ */ e.createElement("ul", { className: R([z, V]), role: "menu" }, /* @__PURE__ */ e.createElement("li", { className: `${N}__item-heading`, role: "presentation" }, c), ie.length === 0 ? /* @__PURE__ */ e.createElement("p", { className: `${N}__no-results` }, l) : ie), le)
|
|
8778
8779
|
)), ue = (te) => {
|
|
8779
8780
|
const fe = te.target;
|
|
8780
8781
|
fe.classList.toggle(`${N}__toggle--expanded`), fe.setAttribute(
|
|
@@ -8789,7 +8790,7 @@ const Gt = (o) => {
|
|
|
8789
8790
|
"aria-label": t,
|
|
8790
8791
|
onClick: ue
|
|
8791
8792
|
},
|
|
8792
|
-
|
|
8793
|
+
re,
|
|
8793
8794
|
ee
|
|
8794
8795
|
), /* @__PURE__ */ e.createElement("div", { className: `${N}__mobile-menu` }, pe, /* @__PURE__ */ e.createElement(
|
|
8795
8796
|
"ul",
|
|
@@ -8798,7 +8799,7 @@ const Gt = (o) => {
|
|
|
8798
8799
|
role: "menu"
|
|
8799
8800
|
},
|
|
8800
8801
|
/* @__PURE__ */ e.createElement("li", { className: `${N}__item-heading`, role: "presentation" }, c),
|
|
8801
|
-
|
|
8802
|
+
ie.length === 0 ? /* @__PURE__ */ e.createElement("p", { className: `${N}__no-results` }, l) : ie
|
|
8802
8803
|
), le));
|
|
8803
8804
|
return /* @__PURE__ */ e.createElement(
|
|
8804
8805
|
"span",
|
|
@@ -8832,7 +8833,7 @@ const Gt = (o) => {
|
|
|
8832
8833
|
"className"
|
|
8833
8834
|
]);
|
|
8834
8835
|
const [i, h] = F(t);
|
|
8835
|
-
|
|
8836
|
+
oe(() => {
|
|
8836
8837
|
h(t);
|
|
8837
8838
|
}, [t]);
|
|
8838
8839
|
const m = i.length;
|
|
@@ -9204,9 +9205,9 @@ const hn = () => {
|
|
|
9204
9205
|
]);
|
|
9205
9206
|
var K, T, A, j;
|
|
9206
9207
|
const [w, u] = F(i);
|
|
9207
|
-
|
|
9208
|
+
oe(() => {
|
|
9208
9209
|
u(i);
|
|
9209
|
-
}, [i]),
|
|
9210
|
+
}, [i]), oe(() => {
|
|
9210
9211
|
h(w);
|
|
9211
9212
|
}, [w]);
|
|
9212
9213
|
const C = typeof s, v = "pds-popover", b = [
|
|
@@ -9744,7 +9745,7 @@ const hn = () => {
|
|
|
9744
9745
|
"~"
|
|
9745
9746
|
], g = `#${l} h2:not(.${c}), h3:not(.${c})`, E = () => {
|
|
9746
9747
|
const [k, N] = F([]);
|
|
9747
|
-
return
|
|
9748
|
+
return oe(() => {
|
|
9748
9749
|
const L = Array.from(
|
|
9749
9750
|
document.querySelectorAll(g)
|
|
9750
9751
|
);
|
|
@@ -9771,7 +9772,7 @@ const hn = () => {
|
|
|
9771
9772
|
}, { nestedHeadings: u } = E(), [C, v] = F();
|
|
9772
9773
|
((k) => {
|
|
9773
9774
|
const N = ae({});
|
|
9774
|
-
|
|
9775
|
+
oe(() => {
|
|
9775
9776
|
const L = (S) => {
|
|
9776
9777
|
N.current = S.reduce((D, W) => (D[W.target.id] = W, D), N.current);
|
|
9777
9778
|
const M = [];
|
|
@@ -9867,7 +9868,7 @@ const hn = () => {
|
|
|
9867
9868
|
"className"
|
|
9868
9869
|
]);
|
|
9869
9870
|
const i = "pds-tabs", [h, m] = F(a != null ? a : s);
|
|
9870
|
-
|
|
9871
|
+
oe(() => {
|
|
9871
9872
|
a !== void 0 && m(a);
|
|
9872
9873
|
}, [a]);
|
|
9873
9874
|
const f = (u) => {
|
|
@@ -9877,9 +9878,9 @@ const hn = () => {
|
|
|
9877
9878
|
m(v);
|
|
9878
9879
|
}
|
|
9879
9880
|
}, g = ae([]);
|
|
9880
|
-
|
|
9881
|
+
oe(() => {
|
|
9881
9882
|
n(h);
|
|
9882
|
-
}, [h, n]),
|
|
9883
|
+
}, [h, n]), oe(() => {
|
|
9883
9884
|
const u = g.current.length - 1;
|
|
9884
9885
|
if (h > u) {
|
|
9885
9886
|
m(0);
|