@pantheon-systems/pds-toolkit-react 2.0.0-beta.3 → 2.0.0-beta.4
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/components/icons/Icon/generated-icon-data.d.ts +1 -1
- package/dist/components/inputs/Datepicker/Datepicker.d.ts +18 -18
- package/dist/css/component-css/pds-datepicker.css +1 -1
- package/dist/css/component-css/pds-index.css +3 -3
- package/dist/css/component-css/pds-segmented-button.css +2 -2
- package/dist/css/pds-components.css +3 -3
- package/dist/index.css +1 -1
- package/dist/index.js +611 -594
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import e, { Children as t, Fragment as n, cloneElement as r, createContext as i, createElement as a, forwardRef as o, isValidElement as s, memo as c, useCallback as l, useContext as u, useEffect as d, useId as f, useImperativeHandle as p, useLayoutEffect as m, useMemo as h, useRef as g, useState as _, useSyncExternalStore as v } from "react";
|
|
2
2
|
import { FloatingArrow as y, FloatingFocusManager as b, FloatingNode as x, FloatingOverlay as S, FloatingPortal as C, FloatingTree as w, arrow as T, autoUpdate as E, flip as D, offset as O, safePolygon as k, shift as A, size as j, useClick as M, useDismiss as N, useFloating as P, useFloatingNodeId as F, useFloatingParentNodeId as I, useFocus as L, useHover as R, useId as z, useInteractions as ee, useListNavigation as B, useMergeRefs as V, useRole as H, useTransitionStyles as U, useTypeahead as W } from "@floating-ui/react";
|
|
3
3
|
import { useHotkeys as G } from "react-hotkeys-hook";
|
|
4
|
-
import { Bar as K, BarChart as q, CartesianGrid as te, Cell as
|
|
4
|
+
import { Bar as K, BarChart as q, CartesianGrid as te, Cell as J, Line as ne, LineChart as re, Pie as ie, PieChart as Y, Rectangle as ae, ReferenceLine as oe, ResponsiveContainer as se, Tooltip as ce, XAxis as le, YAxis as ue } from "recharts";
|
|
5
5
|
import { CodeBlock as de } from "react-code-block";
|
|
6
6
|
import fe from "hash-sum";
|
|
7
7
|
import { useCombobox as pe, useMultipleSelection as me } from "downshift";
|
|
8
|
-
import { CalendarDate as he, Time as ge, createCalendar as _e, endOfMonth as ve, endOfWeek as
|
|
8
|
+
import { CalendarDate as he, Time as ge, createCalendar as _e, endOfMonth as ve, endOfWeek as ye, fromDate as be, getLocalTimeZone as xe, startOfMonth as X, startOfWeek as Se, toCalendarDateTime as Ce, toTimeZone as we, toZoned as Te, today as Ee } from "@internationalized/date";
|
|
9
9
|
import { format as De } from "date-fns";
|
|
10
10
|
import { I18nProvider as Oe, mergeProps as ke, useButton as Ae, useCalendar as je, useCalendarCell as Me, useCalendarGrid as Ne, useDateSegment as Pe, useFocusRing as Fe, useLocale as Ie, useRangeCalendar as Le, useTimeField as Re } from "react-aria";
|
|
11
11
|
import { useCalendarState as ze, useRangeCalendarState as Be, useTimeFieldState as Ve } from "react-stately";
|
|
@@ -3240,9 +3240,9 @@ var En = ({ className: t, componentWidth: n, isLoading: r, loadingText: i = "Loa
|
|
|
3240
3240
|
})(l);
|
|
3241
3241
|
let te = (e) => {
|
|
3242
3242
|
"disabled" in e && e.disabled || ("callback" in e && e.callback && e.callback(e), I(!1));
|
|
3243
|
-
},
|
|
3243
|
+
}, J = () => {
|
|
3244
3244
|
u && u();
|
|
3245
|
-
},
|
|
3245
|
+
}, ne = (t, n, r = "", i = "") => {
|
|
3246
3246
|
let a = W + (r ? `-group-${r}` : "") + "-item-" + (n + 1), o = "id" in t && t.id ? t.id : a;
|
|
3247
3247
|
if (Un(t)) return /* @__PURE__ */ e.createElement("li", {
|
|
3248
3248
|
key: o,
|
|
@@ -3308,7 +3308,7 @@ var En = ({ className: t, componentWidth: n, isLoading: r, loadingText: i = "Loa
|
|
|
3308
3308
|
})
|
|
3309
3309
|
}, l);
|
|
3310
3310
|
}
|
|
3311
|
-
},
|
|
3311
|
+
}, re = (t, n) => {
|
|
3312
3312
|
let r = "id" in t && t.id ? t.id : `${W}-accordion-item-${n + 1}`;
|
|
3313
3313
|
if (Un(t)) return /* @__PURE__ */ e.createElement("li", {
|
|
3314
3314
|
key: r,
|
|
@@ -3365,7 +3365,7 @@ var En = ({ className: t, componentWidth: n, isLoading: r, loadingText: i = "Loa
|
|
|
3365
3365
|
i ? `${V}__listbox--icon-only` : null
|
|
3366
3366
|
]), o = 0;
|
|
3367
3367
|
if (r) {
|
|
3368
|
-
let r =
|
|
3368
|
+
let r = Y(t, n);
|
|
3369
3369
|
return r.forEach((e, t) => {
|
|
3370
3370
|
K.push(`${t}`);
|
|
3371
3371
|
}), /* @__PURE__ */ e.createElement("div", {
|
|
@@ -3388,7 +3388,7 @@ var En = ({ className: t, componentWidth: n, isLoading: r, loadingText: i = "Loa
|
|
|
3388
3388
|
"aria-labelledby": a || void 0,
|
|
3389
3389
|
role: "group"
|
|
3390
3390
|
}, t.map((e) => {
|
|
3391
|
-
let t =
|
|
3391
|
+
let t = ne(e, o, r, a);
|
|
3392
3392
|
return !Un(e) && !Wn(e) && !Kn(e) && o++, t;
|
|
3393
3393
|
}));
|
|
3394
3394
|
}));
|
|
@@ -3405,15 +3405,15 @@ var En = ({ className: t, componentWidth: n, isLoading: r, loadingText: i = "Loa
|
|
|
3405
3405
|
},
|
|
3406
3406
|
...O()
|
|
3407
3407
|
}, t.map((e) => {
|
|
3408
|
-
let t =
|
|
3408
|
+
let t = ne(e, o);
|
|
3409
3409
|
return !Un(e) && !Wn(e) && !Kn(e) && o++, t;
|
|
3410
3410
|
}));
|
|
3411
|
-
},
|
|
3411
|
+
}, Y = (e, t) => {
|
|
3412
3412
|
let n = [], r = [...t], i = r.shift(), a = [];
|
|
3413
3413
|
return e.forEach((t, o) => {
|
|
3414
3414
|
t === i ? (n.push(a), a = [], a.push(t), i = r.shift()) : (a.push(t), o + 1 === e.length && n.push(a));
|
|
3415
3415
|
}), n.filter((e) => e.length > 0);
|
|
3416
|
-
},
|
|
3416
|
+
}, ae, oe = h === "m" ? "s" : "xs", se = y ? /* @__PURE__ */ e.createElement(e.Fragment, null, c, /* @__PURE__ */ e.createElement(Tn, {
|
|
3417
3417
|
className: "pds-button__tally",
|
|
3418
3418
|
label: y.label,
|
|
3419
3419
|
size: oe,
|
|
@@ -3424,7 +3424,7 @@ var En = ({ className: t, componentWidth: n, isLoading: r, loadingText: i = "Loa
|
|
|
3424
3424
|
size: "s",
|
|
3425
3425
|
type: y.type
|
|
3426
3426
|
})) : c;
|
|
3427
|
-
if (i || (
|
|
3427
|
+
if (i || (ae = /* @__PURE__ */ e.createElement(An, {
|
|
3428
3428
|
ref: F.setReference,
|
|
3429
3429
|
"aria-controls": G,
|
|
3430
3430
|
"aria-expanded": M,
|
|
@@ -3440,10 +3440,10 @@ var En = ({ className: t, componentWidth: n, isLoading: r, loadingText: i = "Loa
|
|
|
3440
3440
|
statusDot: v,
|
|
3441
3441
|
type: "button",
|
|
3442
3442
|
variant: U,
|
|
3443
|
-
...A({ onClick:
|
|
3443
|
+
...A({ onClick: J })
|
|
3444
3444
|
})), i) {
|
|
3445
3445
|
let t = kn(c);
|
|
3446
|
-
|
|
3446
|
+
ae = /* @__PURE__ */ e.createElement(Nn, {
|
|
3447
3447
|
ref: F.setReference,
|
|
3448
3448
|
"aria-controls": G,
|
|
3449
3449
|
"aria-expanded": M,
|
|
@@ -3457,7 +3457,7 @@ var En = ({ className: t, componentWidth: n, isLoading: r, loadingText: i = "Loa
|
|
|
3457
3457
|
size: h,
|
|
3458
3458
|
type: "button",
|
|
3459
3459
|
variant: "standard",
|
|
3460
|
-
...A({ onClick:
|
|
3460
|
+
...A({ onClick: J })
|
|
3461
3461
|
});
|
|
3462
3462
|
}
|
|
3463
3463
|
let le = i ? /* @__PURE__ */ e.createElement("span", { className: `${V}__icon-label` }, /* @__PURE__ */ e.createElement(Q, { iconName: r }), " ", c) : ce, ue = M ? `${V}--expanded` : null;
|
|
@@ -3475,7 +3475,7 @@ var En = ({ className: t, componentWidth: n, isLoading: r, loadingText: i = "Loa
|
|
|
3475
3475
|
}, /* @__PURE__ */ e.createElement("ul", {
|
|
3476
3476
|
className: `${V}__mobile-menu`,
|
|
3477
3477
|
role: "menu"
|
|
3478
|
-
}, l.map((e, t) =>
|
|
3478
|
+
}, l.map((e, t) => re(e, t)))) : /* @__PURE__ */ e.createElement(e.Fragment, null, ae, /* @__PURE__ */ e.createElement(x, { id: P }, j && /* @__PURE__ */ e.createElement(C, null, ie(l)))));
|
|
3479
3479
|
}, Zn = i(null), Qn = () => {
|
|
3480
3480
|
let e = u(Zn);
|
|
3481
3481
|
if (!e) throw Error("Dropdown sub-components must be used within a <Dropdown> provider.");
|
|
@@ -4325,7 +4325,7 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4325
4325
|
}, message: p, onBlur: m, onFocus: h, onOptionSelect: g, options: v, required: y = !1, showLabel: b = !0, showSelectedIcon: x = !0, size: S = "s", tooltipText: w = null, validationMessage: T, validationStatus: E, value: D, ...O }) => {
|
|
4326
4326
|
let k = sn(c, l), A = "pds-select", j = t ? `${A}--auto-width` : null, M = S === "s" ? null : `${A}--${S}`, N = i ? $.disabled : null, P = y && !i ? $.required : null, F = E === "error" ? $.error : null, I = E === "success" ? $.success : null, L = null;
|
|
4327
4327
|
E === "error" && (L = "error"), E === "success" && (L = "success");
|
|
4328
|
-
let R = T || p, z = D !== void 0, ee = r !== void 0, B = ((e) => e.reduce((e, t) => vn(t) ? [...e, ...t.options] : [...e, t], []))(v), V = (e) => B.findIndex((t) => t.value === e), H = z && V(D) >= 0 ? V(D) : null, U = ee ? V(r) : null, [W, G] = _((H || U) ?? null), { activeIndex: K, floatingStyles: q, getFloatingProps: te, getItemProps:
|
|
4328
|
+
let R = T || p, z = D !== void 0, ee = r !== void 0, B = ((e) => e.reduce((e, t) => vn(t) ? [...e, ...t.options] : [...e, t], []))(v), V = (e) => B.findIndex((t) => t.value === e), H = z && V(D) >= 0 ? V(D) : null, U = ee ? V(r) : null, [W, G] = _((H || U) ?? null), { activeIndex: K, floatingStyles: q, getFloatingProps: te, getItemProps: J, getReferenceProps: ne, isMounted: re, listRef: ie, refs: Y, setIsOpen: ae, transitionStyles: oe } = Ln({
|
|
4329
4329
|
enableClick: !i,
|
|
4330
4330
|
enableTypeahead: !0,
|
|
4331
4331
|
role: "listbox",
|
|
@@ -4333,17 +4333,17 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4333
4333
|
variant: "input"
|
|
4334
4334
|
}), se = Vn("var(--pds-z-index-dropdown)"), ce = W === null ? void 0 : B[W]?.label, le = W === null ? void 0 : B[W]?.icon, ue = W === null ? void 0 : B[W]?.value, de = (e) => {
|
|
4335
4335
|
let t = B[e];
|
|
4336
|
-
z || (G(e),
|
|
4336
|
+
z || (G(e), ae(!1)), g && g(t);
|
|
4337
4337
|
};
|
|
4338
4338
|
d(() => {
|
|
4339
|
-
z && (G(V(D)),
|
|
4339
|
+
z && (G(V(D)), ae(!1));
|
|
4340
4340
|
}, [D]);
|
|
4341
4341
|
let fe = () => {
|
|
4342
4342
|
m && m(ue);
|
|
4343
4343
|
}, pe = () => {
|
|
4344
4344
|
h && h(ue);
|
|
4345
4345
|
}, me = () => {
|
|
4346
|
-
|
|
4346
|
+
Y.reference.current.focus();
|
|
4347
4347
|
}, he = (t, n) => t === "google" || t === "microsoft" ? /* @__PURE__ */ e.createElement(mr, {
|
|
4348
4348
|
className: n,
|
|
4349
4349
|
platformType: t,
|
|
@@ -4366,12 +4366,12 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4366
4366
|
"aria-disabled": t?.disabled,
|
|
4367
4367
|
"aria-selected": r === W && r === K,
|
|
4368
4368
|
tabIndex: r === K ? 0 : -1,
|
|
4369
|
-
...!t?.disabled &&
|
|
4369
|
+
...!t?.disabled && J({
|
|
4370
4370
|
onClick() {
|
|
4371
4371
|
de(r);
|
|
4372
4372
|
},
|
|
4373
4373
|
onKeyDown(e) {
|
|
4374
|
-
e.key === "Enter" && (e.preventDefault(), de(r),
|
|
4374
|
+
e.key === "Enter" && (e.preventDefault(), de(r), Y.reference.current.focus()), e.key === "Escape" && (e.preventDefault(), Y.reference.current.focus());
|
|
4375
4375
|
}
|
|
4376
4376
|
})
|
|
4377
4377
|
}, /* @__PURE__ */ e.createElement("span", { className: `${A}__option-label` }, t.icon && he(t.icon, `${A}__option-icon`), t.label), x && W === r && /* @__PURE__ */ e.createElement(lr, null));
|
|
@@ -4390,12 +4390,12 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4390
4390
|
"aria-disabled": t?.disabled,
|
|
4391
4391
|
"aria-selected": r === W && r === K,
|
|
4392
4392
|
tabIndex: r === K ? 0 : -1,
|
|
4393
|
-
...!t?.disabled &&
|
|
4393
|
+
...!t?.disabled && J({
|
|
4394
4394
|
onClick() {
|
|
4395
4395
|
de(r);
|
|
4396
4396
|
},
|
|
4397
4397
|
onKeyDown(e) {
|
|
4398
|
-
e.key === "Enter" && (e.preventDefault(), de(r),
|
|
4398
|
+
e.key === "Enter" && (e.preventDefault(), de(r), Y.reference.current.focus()), e.key === "Escape" && (e.preventDefault(), Y.reference.current.focus());
|
|
4399
4399
|
}
|
|
4400
4400
|
})
|
|
4401
4401
|
}, /* @__PURE__ */ e.createElement("span", { className: `${A}__option-label` }, t.icon && he(t.icon, `${A}__option-icon`), t.label), x && W === r && /* @__PURE__ */ e.createElement(lr, null));
|
|
@@ -4432,13 +4432,13 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4432
4432
|
showLabel: b,
|
|
4433
4433
|
tooltipText: w
|
|
4434
4434
|
}), /* @__PURE__ */ e.createElement("span", {
|
|
4435
|
-
ref:
|
|
4435
|
+
ref: Y.setReference,
|
|
4436
4436
|
"aria-autocomplete": "none",
|
|
4437
4437
|
"aria-labelledby": `${s}-label`,
|
|
4438
4438
|
className: `${A}__input-wrapper`,
|
|
4439
4439
|
id: s,
|
|
4440
4440
|
tabIndex: 0,
|
|
4441
|
-
...
|
|
4441
|
+
...ne({
|
|
4442
4442
|
onClick: me,
|
|
4443
4443
|
onBlur: fe,
|
|
4444
4444
|
onFocus: pe
|
|
@@ -4446,8 +4446,8 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4446
4446
|
}, L && /* @__PURE__ */ e.createElement(pn, { variant: L }), /* @__PURE__ */ e.createElement("span", { className: `${A}__input-inner` }, /* @__PURE__ */ e.createElement("span", { className: `${A}__option-text` }, (le || !ce && o) && he(le || o, `${A}__icon`), /* @__PURE__ */ e.createElement("span", { className: `${A}__option-label-text` }, ce ?? f.selectOptionText)), /* @__PURE__ */ e.createElement(Q, {
|
|
4447
4447
|
className: `${A}__trigger-icon`,
|
|
4448
4448
|
iconName: "angleDown"
|
|
4449
|
-
}))),
|
|
4450
|
-
ref:
|
|
4449
|
+
}))), re && /* @__PURE__ */ e.createElement(C, null, /* @__PURE__ */ e.createElement("div", {
|
|
4450
|
+
ref: Y.setFloating,
|
|
4451
4451
|
className: `pds-dropdown__panel ${A}__dropdown ${a ? `${A}__dropdown--has-footer` : ""}`,
|
|
4452
4452
|
style: {
|
|
4453
4453
|
...q,
|
|
@@ -4769,7 +4769,7 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4769
4769
|
let t = Math.abs(e);
|
|
4770
4770
|
return t >= 1e9 ? `${(e / 1e9).toFixed(1).replace(/\.0$/, "")}B` : t >= 1e6 ? `${(e / 1e6).toFixed(1).replace(/\.0$/, "")}M` : t >= 1e3 ? `${(e / 1e3).toFixed(1).replace(/\.0$/, "")}K` : String(e);
|
|
4771
4771
|
}, Ur = ({ barRadius: t = 2, chartHeight: n, chartWidth: r, className: i, colorPalette: a = "categorical", data: o = [], isLoading: s = !1, isThumbnail: c = !1, labelStrings: u = {}, layout: f = "horizontal", legendVariant: p = "inline", onTimePeriodChange: m, selectedTimePeriod: h, series: v = [], showAccessibleTable: y, showAxisLines: b, showGrid: x, showLegend: S, showTooltip: C, timePeriodOptions: w, tooltipContent: T, variant: k = "stacked", xAxisLabel: j, xAxisTickInterval: M, yAxisDomain: N, yAxisFormatter: F = Hr, yAxisLabel: I, yAxisTickInterval: L, ...R }) => {
|
|
4772
|
-
let { accessibleTableDescription: z = "Bar chart data", emptyStateHeading: ee = "No data available", emptyStateMessage: B, legendTableHeader: V, loadingLabel: H = "Loading chart data" } = u, W = g(null), G = Dr(a, Nr(W, a)),
|
|
4772
|
+
let { accessibleTableDescription: z = "Bar chart data", emptyStateHeading: ee = "No data available", emptyStateMessage: B, legendTableHeader: V, loadingLabel: H = "Loading chart data" } = u, W = g(null), G = Dr(a, Nr(W, a)), J = n ?? (c ? 60 : 360), ne = r ?? (c ? 60 : void 0), re = x ?? !c, ie = b ?? !c, Y = S ?? !c, oe = C ?? !c, de = y ?? !0, [fe, pe] = _(null), me = g(fe);
|
|
4773
4773
|
fe && (me.current = fe);
|
|
4774
4774
|
let he = g({ getBoundingClientRect: () => ({
|
|
4775
4775
|
bottom: 0,
|
|
@@ -4780,7 +4780,7 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4780
4780
|
width: 0,
|
|
4781
4781
|
x: 0,
|
|
4782
4782
|
y: 0
|
|
4783
|
-
}) }), { context: ge, floatingStyles: _e, refs: ve, update:
|
|
4783
|
+
}) }), { context: ge, floatingStyles: _e, refs: ve, update: ye } = P({
|
|
4784
4784
|
middleware: [
|
|
4785
4785
|
O(8),
|
|
4786
4786
|
D(),
|
|
@@ -4789,7 +4789,7 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4789
4789
|
open: !!fe,
|
|
4790
4790
|
placement: "top",
|
|
4791
4791
|
whileElementsMounted: E
|
|
4792
|
-
}), { isMounted:
|
|
4792
|
+
}), { isMounted: be, styles: xe } = U(ge, {
|
|
4793
4793
|
duration: {
|
|
4794
4794
|
close: 150,
|
|
4795
4795
|
open: 150
|
|
@@ -4802,7 +4802,7 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4802
4802
|
let e = () => pe(null);
|
|
4803
4803
|
return window.addEventListener("scroll", e, !0), () => window.removeEventListener("scroll", e, !0);
|
|
4804
4804
|
}, []);
|
|
4805
|
-
let
|
|
4805
|
+
let X = "pds-bar-chart", Se = k === "stacked" ? "stack" : void 0, Ce = l((e) => {
|
|
4806
4806
|
he.current.getBoundingClientRect = () => ({
|
|
4807
4807
|
bottom: e.clientY,
|
|
4808
4808
|
height: 0,
|
|
@@ -4812,43 +4812,55 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4812
4812
|
width: 0,
|
|
4813
4813
|
x: e.clientX,
|
|
4814
4814
|
y: e.clientY
|
|
4815
|
-
}),
|
|
4816
|
-
}, [
|
|
4815
|
+
}), ye();
|
|
4816
|
+
}, [ye]), we = l(() => {
|
|
4817
4817
|
pe(null);
|
|
4818
|
-
}, [])
|
|
4818
|
+
}, []), Te = l((e, t, n) => {
|
|
4819
|
+
let r = n.payload;
|
|
4820
|
+
oe && r && pe({
|
|
4821
|
+
color: jr(e, G, t.color, Or(a, t.paletteIndex)),
|
|
4822
|
+
label: String(r.label ?? ""),
|
|
4823
|
+
name: t.label,
|
|
4824
|
+
value: Number(r[t.dataKey] ?? 0)
|
|
4825
|
+
});
|
|
4826
|
+
}, [
|
|
4827
|
+
G,
|
|
4828
|
+
a,
|
|
4829
|
+
oe
|
|
4830
|
+
]);
|
|
4819
4831
|
if (s) return /* @__PURE__ */ e.createElement("div", {
|
|
4820
4832
|
ref: W,
|
|
4821
4833
|
"aria-busy": "true",
|
|
4822
4834
|
"aria-label": H,
|
|
4823
4835
|
className: Z([
|
|
4824
|
-
|
|
4825
|
-
`${
|
|
4836
|
+
X,
|
|
4837
|
+
`${X}--loading`,
|
|
4826
4838
|
i ?? ""
|
|
4827
4839
|
]),
|
|
4828
|
-
style: { maxWidth:
|
|
4840
|
+
style: { maxWidth: ne },
|
|
4829
4841
|
...R
|
|
4830
4842
|
}, /* @__PURE__ */ e.createElement(Vr, {
|
|
4831
|
-
height:
|
|
4843
|
+
height: J,
|
|
4832
4844
|
legendVariant: p,
|
|
4833
|
-
showLegend:
|
|
4845
|
+
showLegend: Y
|
|
4834
4846
|
}));
|
|
4835
4847
|
if (!o || o.length === 0) return /* @__PURE__ */ e.createElement("div", {
|
|
4836
4848
|
ref: W,
|
|
4837
4849
|
className: Z([
|
|
4838
|
-
|
|
4839
|
-
`${
|
|
4850
|
+
X,
|
|
4851
|
+
`${X}--empty`,
|
|
4840
4852
|
i ?? ""
|
|
4841
4853
|
]),
|
|
4842
4854
|
style: {
|
|
4843
|
-
height:
|
|
4844
|
-
maxWidth:
|
|
4855
|
+
height: J,
|
|
4856
|
+
maxWidth: ne
|
|
4845
4857
|
},
|
|
4846
4858
|
...R
|
|
4847
4859
|
}, /* @__PURE__ */ e.createElement(Cr, {
|
|
4848
4860
|
heading: ee,
|
|
4849
4861
|
message: B
|
|
4850
4862
|
}));
|
|
4851
|
-
let
|
|
4863
|
+
let Ee = f === "vertical", De = (e) => k === "grouped" || k === "stacked" && e === v.length - 1 ? Ee ? [
|
|
4852
4864
|
0,
|
|
4853
4865
|
t,
|
|
4854
4866
|
t,
|
|
@@ -4858,16 +4870,16 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4858
4870
|
t,
|
|
4859
4871
|
0,
|
|
4860
4872
|
0
|
|
4861
|
-
] : 0,
|
|
4873
|
+
] : 0, Oe = (t) => ({ fill: n, height: r, radius: i, width: a, x: o, y: s }) => {
|
|
4862
4874
|
let c = t > 0, l = t < v.length - 1;
|
|
4863
|
-
return /* @__PURE__ */ e.createElement("g", null, /* @__PURE__ */ e.createElement(
|
|
4875
|
+
return /* @__PURE__ */ e.createElement("g", null, /* @__PURE__ */ e.createElement(ae, {
|
|
4864
4876
|
fill: n,
|
|
4865
4877
|
height: r,
|
|
4866
4878
|
radius: i,
|
|
4867
4879
|
width: a,
|
|
4868
4880
|
x: o,
|
|
4869
4881
|
y: s
|
|
4870
|
-
}),
|
|
4882
|
+
}), Ee ? /* @__PURE__ */ e.createElement(e.Fragment, null, c && /* @__PURE__ */ e.createElement("line", {
|
|
4871
4883
|
stroke: "var(--pds-color-surface-default)",
|
|
4872
4884
|
strokeWidth: 1,
|
|
4873
4885
|
x1: o,
|
|
@@ -4899,12 +4911,12 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4899
4911
|
};
|
|
4900
4912
|
return /* @__PURE__ */ e.createElement("div", {
|
|
4901
4913
|
ref: W,
|
|
4902
|
-
className: Z([
|
|
4903
|
-
style:
|
|
4914
|
+
className: Z([X, i ?? ""]),
|
|
4915
|
+
style: ne ? { maxWidth: ne } : void 0,
|
|
4904
4916
|
...R
|
|
4905
|
-
}, !c && w && w.length > 0 && /* @__PURE__ */ e.createElement("div", { className: `${
|
|
4917
|
+
}, !c && w && w.length > 0 && /* @__PURE__ */ e.createElement("div", { className: `${X}__header` }, /* @__PURE__ */ e.createElement(Tr, {
|
|
4906
4918
|
autoWidth: !0,
|
|
4907
|
-
id: `${
|
|
4919
|
+
id: `${X}-time-period`,
|
|
4908
4920
|
label: "Time period",
|
|
4909
4921
|
onOptionSelect: (e) => m?.(e.value),
|
|
4910
4922
|
options: w.map((e) => ({
|
|
@@ -4919,12 +4931,12 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4919
4931
|
onMouseMove: oe && !T ? Ce : void 0,
|
|
4920
4932
|
style: {
|
|
4921
4933
|
contain: "layout size",
|
|
4922
|
-
height:
|
|
4934
|
+
height: J
|
|
4923
4935
|
}
|
|
4924
4936
|
}, /* @__PURE__ */ e.createElement(se, {
|
|
4925
4937
|
debounce: 150,
|
|
4926
|
-
height:
|
|
4927
|
-
minHeight:
|
|
4938
|
+
height: J,
|
|
4939
|
+
minHeight: J,
|
|
4928
4940
|
minWidth: 50,
|
|
4929
4941
|
width: "100%"
|
|
4930
4942
|
}, /* @__PURE__ */ e.createElement(q, {
|
|
@@ -4932,7 +4944,7 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4932
4944
|
barCategoryGap: "25%",
|
|
4933
4945
|
barGap: 6,
|
|
4934
4946
|
data: o,
|
|
4935
|
-
layout:
|
|
4947
|
+
layout: Ee ? "vertical" : "horizontal",
|
|
4936
4948
|
margin: c ? {
|
|
4937
4949
|
bottom: 0,
|
|
4938
4950
|
left: 0,
|
|
@@ -4944,14 +4956,14 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4944
4956
|
right: 4,
|
|
4945
4957
|
top: 20
|
|
4946
4958
|
}
|
|
4947
|
-
},
|
|
4948
|
-
horizontal: !
|
|
4959
|
+
}, re && /* @__PURE__ */ e.createElement(te, {
|
|
4960
|
+
horizontal: !Ee,
|
|
4949
4961
|
stroke: "var(--pds-color-border-default)",
|
|
4950
4962
|
strokeDasharray: "3 3",
|
|
4951
|
-
vertical:
|
|
4963
|
+
vertical: Ee
|
|
4952
4964
|
}), /* @__PURE__ */ e.createElement(le, {
|
|
4953
4965
|
axisLine: ie,
|
|
4954
|
-
dataKey:
|
|
4966
|
+
dataKey: Ee ? void 0 : "label",
|
|
4955
4967
|
hide: !ie,
|
|
4956
4968
|
interval: M,
|
|
4957
4969
|
label: j && ie ? {
|
|
@@ -4960,15 +4972,15 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4960
4972
|
position: "insideBottom",
|
|
4961
4973
|
value: j
|
|
4962
4974
|
} : void 0,
|
|
4963
|
-
padding:
|
|
4975
|
+
padding: Ee ? void 0 : "no-gap",
|
|
4964
4976
|
tick: ie ? Pr : !1,
|
|
4965
|
-
tickFormatter:
|
|
4977
|
+
tickFormatter: Ee ? F : void 0,
|
|
4966
4978
|
tickLine: !1,
|
|
4967
4979
|
tickMargin: 10,
|
|
4968
|
-
type:
|
|
4980
|
+
type: Ee ? "number" : "category"
|
|
4969
4981
|
}), /* @__PURE__ */ e.createElement(ue, {
|
|
4970
4982
|
axisLine: ie,
|
|
4971
|
-
dataKey:
|
|
4983
|
+
dataKey: Ee ? "label" : void 0,
|
|
4972
4984
|
domain: N,
|
|
4973
4985
|
hide: !ie,
|
|
4974
4986
|
interval: L,
|
|
@@ -4979,12 +4991,12 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4979
4991
|
position: "center",
|
|
4980
4992
|
value: I
|
|
4981
4993
|
} : void 0,
|
|
4982
|
-
padding:
|
|
4994
|
+
padding: Ee ? "no-gap" : void 0,
|
|
4983
4995
|
tick: ie ? Pr : !1,
|
|
4984
|
-
tickFormatter:
|
|
4996
|
+
tickFormatter: Ee ? void 0 : F,
|
|
4985
4997
|
tickLine: !1,
|
|
4986
4998
|
tickMargin: 6,
|
|
4987
|
-
type:
|
|
4999
|
+
type: Ee ? "category" : "number"
|
|
4988
5000
|
}), oe && T && /* @__PURE__ */ e.createElement(ce, {
|
|
4989
5001
|
content: (e) => !e.active || !e.payload?.length ? null : T({
|
|
4990
5002
|
entries: e.payload.map((e) => ({
|
|
@@ -5001,33 +5013,28 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5001
5013
|
dataKey: t.dataKey,
|
|
5002
5014
|
fill: jr(n, G, t.color, Or(a, t.paletteIndex)),
|
|
5003
5015
|
name: t.label,
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
oe && r && pe({
|
|
5007
|
-
color: jr(n, G, t.color, Or(a, t.paletteIndex)),
|
|
5008
|
-
label: String(r.label ?? ""),
|
|
5009
|
-
name: t.label,
|
|
5010
|
-
value: Number(r[t.dataKey] ?? 0)
|
|
5011
|
-
});
|
|
5016
|
+
onClick: T ? void 0 : (e, r, i) => {
|
|
5017
|
+
Ce(i), Te(n, t, e);
|
|
5012
5018
|
},
|
|
5019
|
+
onMouseEnter: T ? void 0 : (e) => Te(n, t, e),
|
|
5013
5020
|
onMouseLeave: T ? void 0 : () => pe(null),
|
|
5014
|
-
radius:
|
|
5015
|
-
shape: k === "stacked" ?
|
|
5021
|
+
radius: De(n),
|
|
5022
|
+
shape: k === "stacked" ? Oe(n) : void 0,
|
|
5016
5023
|
stackId: Se
|
|
5017
|
-
}))))), oe && !T &&
|
|
5024
|
+
}))))), oe && !T && be && me.current && /* @__PURE__ */ e.createElement("div", {
|
|
5018
5025
|
ref: ve.setFloating,
|
|
5019
5026
|
className: "recharts-default-tooltip",
|
|
5020
5027
|
role: "tooltip",
|
|
5021
5028
|
style: {
|
|
5022
5029
|
..._e,
|
|
5023
|
-
...
|
|
5030
|
+
...xe,
|
|
5024
5031
|
pointerEvents: "none",
|
|
5025
5032
|
zIndex: "var(--pds-z-index-notifications)"
|
|
5026
5033
|
}
|
|
5027
5034
|
}, /* @__PURE__ */ e.createElement("p", { className: "recharts-tooltip-label" }, me.current.label), /* @__PURE__ */ e.createElement("p", { className: "recharts-tooltip-item" }, /* @__PURE__ */ e.createElement("span", {
|
|
5028
5035
|
className: "recharts-tooltip-item__color",
|
|
5029
5036
|
style: { backgroundColor: me.current.color }
|
|
5030
|
-
}), /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-name" }, me.current.name), /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-separator" }, ": "), /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-value" }, F(me.current.value)))),
|
|
5037
|
+
}), /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-name" }, me.current.name), /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-separator" }, ": "), /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-value" }, F(me.current.value)))), Y && /* @__PURE__ */ e.createElement(Lr, {
|
|
5031
5038
|
ariaHidden: p === "table" && de,
|
|
5032
5039
|
data: o,
|
|
5033
5040
|
series: v,
|
|
@@ -5047,32 +5054,32 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5047
5054
|
default: return;
|
|
5048
5055
|
}
|
|
5049
5056
|
}, Gr = ({ annotations: t, chartHeight: n, chartWidth: r, className: i, colorPalette: a = "categorical", data: o = [], isLoading: s = !1, isThumbnail: c = !1, labelStrings: l = {}, legendVariant: u = "inline", lineStyle: d = "smooth", onTimePeriodChange: f, referenceLines: p, selectedTimePeriod: m, series: h = [], showAccessibleTable: _, showAxisLines: v, showDataPoints: y, showGrid: b, showLegend: x, showTooltip: S, timePeriodOptions: C, tooltipContent: w, xAxisLabel: T, xAxisTickInterval: E, yAxisDomain: D, yAxisFormatter: O = Hr, yAxisLabel: k, yAxisTickInterval: A, ...j }) => {
|
|
5050
|
-
let { accessibleTableDescription: M = "Line chart data", emptyStateHeading: N = "No data available", emptyStateMessage: P, legendTableHeader: F, loadingLabel: I = "Loading chart data" } = l, L = g(null), R = Dr(a, Nr(L, a)), z = n ?? (c ? 60 : 360),
|
|
5057
|
+
let { accessibleTableDescription: M = "Line chart data", emptyStateHeading: N = "No data available", emptyStateMessage: P, legendTableHeader: F, loadingLabel: I = "Loading chart data" } = l, L = g(null), R = Dr(a, Nr(L, a)), z = an("(hover: hover)"), ee = n ?? (c ? 60 : 360), B = r ?? (c ? 60 : void 0), V = b ?? !c, H = v ?? !c, U = x ?? !c, W = S ?? !c, G = y ?? !c, K = _ ?? !0, q = "pds-line-chart";
|
|
5051
5058
|
return s ? /* @__PURE__ */ e.createElement("div", {
|
|
5052
5059
|
ref: L,
|
|
5053
5060
|
"aria-busy": "true",
|
|
5054
5061
|
"aria-label": I,
|
|
5055
5062
|
className: Z([
|
|
5056
|
-
|
|
5057
|
-
`${
|
|
5063
|
+
q,
|
|
5064
|
+
`${q}--loading`,
|
|
5058
5065
|
i ?? ""
|
|
5059
5066
|
]),
|
|
5060
|
-
style: { maxWidth:
|
|
5067
|
+
style: { maxWidth: B },
|
|
5061
5068
|
...j
|
|
5062
5069
|
}, /* @__PURE__ */ e.createElement(Vr, {
|
|
5063
|
-
height:
|
|
5070
|
+
height: ee,
|
|
5064
5071
|
legendVariant: u,
|
|
5065
|
-
showLegend:
|
|
5072
|
+
showLegend: U
|
|
5066
5073
|
})) : !o || o.length === 0 ? /* @__PURE__ */ e.createElement("div", {
|
|
5067
5074
|
ref: L,
|
|
5068
5075
|
className: Z([
|
|
5069
|
-
|
|
5070
|
-
`${
|
|
5076
|
+
q,
|
|
5077
|
+
`${q}--empty`,
|
|
5071
5078
|
i ?? ""
|
|
5072
5079
|
]),
|
|
5073
5080
|
style: {
|
|
5074
|
-
height:
|
|
5075
|
-
maxWidth:
|
|
5081
|
+
height: ee,
|
|
5082
|
+
maxWidth: B
|
|
5076
5083
|
},
|
|
5077
5084
|
...j
|
|
5078
5085
|
}, /* @__PURE__ */ e.createElement(Cr, {
|
|
@@ -5080,12 +5087,12 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5080
5087
|
message: P
|
|
5081
5088
|
})) : /* @__PURE__ */ e.createElement("div", {
|
|
5082
5089
|
ref: L,
|
|
5083
|
-
className: Z([
|
|
5084
|
-
style:
|
|
5090
|
+
className: Z([q, i ?? ""]),
|
|
5091
|
+
style: B ? { maxWidth: B } : void 0,
|
|
5085
5092
|
...j
|
|
5086
|
-
}, !c && C && C.length > 0 && /* @__PURE__ */ e.createElement("div", { className: `${
|
|
5093
|
+
}, !c && C && C.length > 0 && /* @__PURE__ */ e.createElement("div", { className: `${q}__header` }, /* @__PURE__ */ e.createElement(Tr, {
|
|
5087
5094
|
autoWidth: !0,
|
|
5088
|
-
id: `${
|
|
5095
|
+
id: `${q}-time-period`,
|
|
5089
5096
|
label: "Time period",
|
|
5090
5097
|
onOptionSelect: (e) => f?.(e.value),
|
|
5091
5098
|
options: C.map((e) => ({
|
|
@@ -5098,15 +5105,15 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5098
5105
|
"aria-hidden": "true",
|
|
5099
5106
|
style: {
|
|
5100
5107
|
contain: "layout size",
|
|
5101
|
-
height:
|
|
5108
|
+
height: ee
|
|
5102
5109
|
}
|
|
5103
5110
|
}, /* @__PURE__ */ e.createElement(se, {
|
|
5104
5111
|
debounce: 150,
|
|
5105
|
-
height:
|
|
5106
|
-
minHeight:
|
|
5112
|
+
height: ee,
|
|
5113
|
+
minHeight: ee,
|
|
5107
5114
|
minWidth: 50,
|
|
5108
5115
|
width: "100%"
|
|
5109
|
-
}, /* @__PURE__ */ e.createElement(
|
|
5116
|
+
}, /* @__PURE__ */ e.createElement(re, {
|
|
5110
5117
|
accessibilityLayer: !1,
|
|
5111
5118
|
data: o,
|
|
5112
5119
|
margin: c ? {
|
|
@@ -5120,62 +5127,65 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5120
5127
|
right: 4,
|
|
5121
5128
|
top: 20
|
|
5122
5129
|
}
|
|
5123
|
-
},
|
|
5130
|
+
}, V && /* @__PURE__ */ e.createElement(te, {
|
|
5124
5131
|
stroke: "var(--pds-color-border-default)",
|
|
5125
5132
|
strokeDasharray: "3 3"
|
|
5126
5133
|
}), /* @__PURE__ */ e.createElement(le, {
|
|
5127
|
-
axisLine:
|
|
5134
|
+
axisLine: H,
|
|
5128
5135
|
dataKey: "label",
|
|
5129
|
-
hide: !
|
|
5136
|
+
hide: !H,
|
|
5130
5137
|
interval: E,
|
|
5131
|
-
label: T &&
|
|
5138
|
+
label: T && H ? {
|
|
5132
5139
|
...Fr,
|
|
5133
5140
|
offset: -15,
|
|
5134
5141
|
position: "insideBottom",
|
|
5135
5142
|
value: T
|
|
5136
5143
|
} : void 0,
|
|
5137
|
-
tick:
|
|
5144
|
+
tick: H ? Pr : !1,
|
|
5138
5145
|
tickLine: !1,
|
|
5139
5146
|
tickMargin: 10
|
|
5140
5147
|
}), /* @__PURE__ */ e.createElement(ue, {
|
|
5141
|
-
axisLine:
|
|
5148
|
+
axisLine: H,
|
|
5142
5149
|
domain: D,
|
|
5143
|
-
hide: !
|
|
5150
|
+
hide: !H,
|
|
5144
5151
|
interval: A,
|
|
5145
|
-
label: k &&
|
|
5152
|
+
label: k && H ? {
|
|
5146
5153
|
...Fr,
|
|
5147
5154
|
angle: -90,
|
|
5148
5155
|
dx: -44,
|
|
5149
5156
|
position: "center",
|
|
5150
5157
|
value: k
|
|
5151
5158
|
} : void 0,
|
|
5152
|
-
tick:
|
|
5159
|
+
tick: H ? Pr : !1,
|
|
5153
5160
|
tickFormatter: O,
|
|
5154
5161
|
tickLine: !1,
|
|
5155
5162
|
tickMargin: 6
|
|
5156
|
-
}),
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5163
|
+
}), W && /* @__PURE__ */ e.createElement(ce, {
|
|
5164
|
+
content: (t) => {
|
|
5165
|
+
if (!t.active || !t.payload?.length) return null;
|
|
5166
|
+
let n = t.payload.map((e) => ({
|
|
5167
|
+
color: String(e.color ?? ""),
|
|
5168
|
+
dataKey: String(e.dataKey ?? ""),
|
|
5169
|
+
name: String(e.name ?? ""),
|
|
5170
|
+
value: Number(e.value ?? 0)
|
|
5171
|
+
})), r = String(t.label ?? "");
|
|
5172
|
+
return w ? w({
|
|
5173
|
+
entries: n,
|
|
5174
|
+
label: r
|
|
5175
|
+
}) : /* @__PURE__ */ e.createElement("div", { className: "recharts-default-tooltip" }, /* @__PURE__ */ e.createElement("p", { className: "recharts-tooltip-label" }, r), n.map((t) => /* @__PURE__ */ e.createElement("p", {
|
|
5176
|
+
key: t.dataKey,
|
|
5177
|
+
className: "recharts-tooltip-item"
|
|
5178
|
+
}, /* @__PURE__ */ e.createElement("span", {
|
|
5179
|
+
className: "recharts-tooltip-item__color",
|
|
5180
|
+
style: { backgroundColor: t.color }
|
|
5181
|
+
}), t.name, /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-separator" }, " ", ":", " "), O(t.value))));
|
|
5182
|
+
},
|
|
5183
|
+
trigger: z ? "hover" : "click"
|
|
5184
|
+
}), h.map((t, n) => /* @__PURE__ */ e.createElement(ne, {
|
|
5175
5185
|
key: t.dataKey,
|
|
5176
|
-
activeDot:
|
|
5186
|
+
activeDot: G ? { r: 6 } : !1,
|
|
5177
5187
|
dataKey: t.dataKey,
|
|
5178
|
-
dot:
|
|
5188
|
+
dot: G ? {
|
|
5179
5189
|
fill: jr(n, R, t.color, Or(a, t.paletteIndex)),
|
|
5180
5190
|
r: 4,
|
|
5181
5191
|
strokeWidth: 0
|
|
@@ -5225,24 +5235,24 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5225
5235
|
strokeDasharray: Wr(t.strokeStyle ?? "dashed"),
|
|
5226
5236
|
x: t.atLabel
|
|
5227
5237
|
});
|
|
5228
|
-
})))),
|
|
5229
|
-
ariaHidden: u === "table" &&
|
|
5238
|
+
})))), U && /* @__PURE__ */ e.createElement(Lr, {
|
|
5239
|
+
ariaHidden: u === "table" && K,
|
|
5230
5240
|
data: o,
|
|
5231
5241
|
series: h,
|
|
5232
5242
|
seriesColors: R,
|
|
5233
5243
|
tableHeader: F,
|
|
5234
5244
|
valueFormatter: O,
|
|
5235
5245
|
variant: u
|
|
5236
|
-
}),
|
|
5246
|
+
}), K && /* @__PURE__ */ e.createElement(Ir, {
|
|
5237
5247
|
data: o,
|
|
5238
5248
|
description: M,
|
|
5239
5249
|
series: h,
|
|
5240
5250
|
valueFormatter: O
|
|
5241
5251
|
}));
|
|
5242
5252
|
}, Kr = (e, t) => `(${t > 0 ? Math.round(e / t * 100) : 0}%)`, qr = ({ chartHeight: t, chartWidth: n, className: r, colorPalette: i = "categorical", data: a = [], isLoading: o = !1, isThumbnail: s = !1, labelStrings: c = {}, legendVariant: l = "inline", showAccessibleTable: u = !0, showLegend: d, showTooltip: f, valueFormatter: p = Kr, variant: m = "pie", ...h }) => {
|
|
5243
|
-
let { accessibleTableDescription: _ = "Pie chart data", emptyStateHeading: v = "No data available", emptyStateMessage: y, loadingLabel: b = "Loading chart data" } = c, x = g(null), S = Dr(i, Nr(x, i)), C = "pds-pie-chart", w = t ?? (s ? 80 : 300),
|
|
5253
|
+
let { accessibleTableDescription: _ = "Pie chart data", emptyStateHeading: v = "No data available", emptyStateMessage: y, loadingLabel: b = "Loading chart data" } = c, x = g(null), S = Dr(i, Nr(x, i)), C = "pds-pie-chart", w = an("(hover: hover)"), T = t ?? (s ? 80 : 300), E = n ?? (s ? 80 : void 0), D = d ?? !s, O = f ?? !s, k = a.reduce((e, t) => e + t.value, 0), A = (e, t) => jr(e, S, t.color, Or(i, t.paletteIndex));
|
|
5244
5254
|
if (o) {
|
|
5245
|
-
let t = `${Math.round(
|
|
5255
|
+
let t = `${Math.round(T * .8)}px`;
|
|
5246
5256
|
return /* @__PURE__ */ e.createElement("div", {
|
|
5247
5257
|
ref: x,
|
|
5248
5258
|
"aria-busy": "true",
|
|
@@ -5252,18 +5262,18 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5252
5262
|
`${C}--loading`,
|
|
5253
5263
|
r ?? ""
|
|
5254
5264
|
]),
|
|
5255
|
-
style:
|
|
5265
|
+
style: E ? { maxWidth: E } : void 0,
|
|
5256
5266
|
...h
|
|
5257
5267
|
}, /* @__PURE__ */ e.createElement("div", { className: `${C}__skeleton` }, /* @__PURE__ */ e.createElement("div", {
|
|
5258
5268
|
className: `${C}__skeleton-chart`,
|
|
5259
|
-
style: { height:
|
|
5269
|
+
style: { height: T }
|
|
5260
5270
|
}, /* @__PURE__ */ e.createElement(zr, {
|
|
5261
5271
|
shape: "circular",
|
|
5262
5272
|
style: {
|
|
5263
5273
|
height: t,
|
|
5264
5274
|
width: t
|
|
5265
5275
|
}
|
|
5266
|
-
})),
|
|
5276
|
+
})), D && /* @__PURE__ */ e.createElement("div", { className: "pds-chart__skeleton-legend pds-chart__skeleton-legend--inline" }, /* @__PURE__ */ e.createElement(zr, {
|
|
5267
5277
|
shape: "rounded",
|
|
5268
5278
|
size: {
|
|
5269
5279
|
height: .75,
|
|
@@ -5283,7 +5293,7 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5283
5293
|
}
|
|
5284
5294
|
}))));
|
|
5285
5295
|
}
|
|
5286
|
-
if (!a || a.length === 0 ||
|
|
5296
|
+
if (!a || a.length === 0 || k === 0) return /* @__PURE__ */ e.createElement("div", {
|
|
5287
5297
|
ref: x,
|
|
5288
5298
|
className: Z([
|
|
5289
5299
|
C,
|
|
@@ -5291,64 +5301,65 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5291
5301
|
r ?? ""
|
|
5292
5302
|
]),
|
|
5293
5303
|
style: {
|
|
5294
|
-
height:
|
|
5295
|
-
maxWidth:
|
|
5304
|
+
height: T,
|
|
5305
|
+
maxWidth: E
|
|
5296
5306
|
},
|
|
5297
5307
|
...h
|
|
5298
5308
|
}, /* @__PURE__ */ e.createElement(Cr, {
|
|
5299
5309
|
heading: v,
|
|
5300
5310
|
message: y
|
|
5301
5311
|
}));
|
|
5302
|
-
let
|
|
5312
|
+
let j = a.map((e) => ({
|
|
5303
5313
|
name: e.label,
|
|
5304
5314
|
value: e.value
|
|
5305
5315
|
}));
|
|
5306
5316
|
return /* @__PURE__ */ e.createElement("div", {
|
|
5307
5317
|
ref: x,
|
|
5308
5318
|
className: Z([C, r ?? ""]),
|
|
5309
|
-
style:
|
|
5319
|
+
style: E ? { maxWidth: E } : void 0,
|
|
5310
5320
|
...h
|
|
5311
5321
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
5312
5322
|
"aria-hidden": "true",
|
|
5313
5323
|
style: {
|
|
5314
5324
|
contain: "layout size",
|
|
5315
|
-
height:
|
|
5325
|
+
height: T,
|
|
5316
5326
|
margin: "0 auto",
|
|
5317
|
-
width: `min(100%, ${
|
|
5327
|
+
width: `min(100%, ${T}px)`
|
|
5318
5328
|
}
|
|
5319
5329
|
}, /* @__PURE__ */ e.createElement(se, {
|
|
5320
5330
|
debounce: 150,
|
|
5321
|
-
height:
|
|
5322
|
-
minHeight:
|
|
5331
|
+
height: T,
|
|
5332
|
+
minHeight: T,
|
|
5323
5333
|
minWidth: 50,
|
|
5324
5334
|
width: "100%"
|
|
5325
|
-
}, /* @__PURE__ */ e.createElement(
|
|
5335
|
+
}, /* @__PURE__ */ e.createElement(Y, { accessibilityLayer: !1 }, /* @__PURE__ */ e.createElement(ie, {
|
|
5326
5336
|
cx: "50%",
|
|
5327
5337
|
cy: "50%",
|
|
5328
|
-
data:
|
|
5338
|
+
data: j,
|
|
5329
5339
|
dataKey: "value",
|
|
5330
5340
|
innerRadius: m === "donut" ? "55%" : 0,
|
|
5331
5341
|
isAnimationActive: !s,
|
|
5332
5342
|
outerRadius: "80%",
|
|
5333
5343
|
stroke: "none"
|
|
5334
|
-
}, a.map((t, n) => /* @__PURE__ */ e.createElement(
|
|
5344
|
+
}, a.map((t, n) => /* @__PURE__ */ e.createElement(J, {
|
|
5335
5345
|
key: t.label,
|
|
5336
|
-
fill:
|
|
5337
|
-
}))),
|
|
5346
|
+
fill: A(n, t)
|
|
5347
|
+
}))), O && /* @__PURE__ */ e.createElement(ce, {
|
|
5338
5348
|
content: (t) => {
|
|
5339
5349
|
if (!t.active || !t.payload?.length) return null;
|
|
5340
|
-
let n = t.payload[0], r = Number(n.value ?? 0), i =
|
|
5350
|
+
let n = t.payload[0], r = Number(n.value ?? 0), i = k > 0 ? Math.round(r / k * 100) : 0, a = String(n.payload?.fill ?? "");
|
|
5341
5351
|
return /* @__PURE__ */ e.createElement("div", { className: "recharts-default-tooltip" }, /* @__PURE__ */ e.createElement("p", { className: "recharts-tooltip-label" }, String(n.name ?? "")), /* @__PURE__ */ e.createElement("p", { className: "recharts-tooltip-item" }, /* @__PURE__ */ e.createElement("span", {
|
|
5342
5352
|
className: "recharts-tooltip-item__color",
|
|
5343
5353
|
style: { backgroundColor: a }
|
|
5344
5354
|
}), /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-value" }, i, "%"), /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-separator" }, " ", "—", " "), /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-name" }, r.toLocaleString())));
|
|
5345
5355
|
},
|
|
5346
|
-
cursor: !1
|
|
5347
|
-
|
|
5356
|
+
cursor: !1,
|
|
5357
|
+
trigger: w ? "hover" : "click"
|
|
5358
|
+
})))), D && /* @__PURE__ */ e.createElement("div", {
|
|
5348
5359
|
"aria-hidden": l === "table" && u ? "true" : void 0,
|
|
5349
5360
|
className: Z([`${C}__legend`, l === "table" ? `${C}__legend--table` : `${C}__legend--inline`])
|
|
5350
5361
|
}, a.map((t, n) => {
|
|
5351
|
-
let r =
|
|
5362
|
+
let r = A(n, t), i = p(t.value, k, t.label);
|
|
5352
5363
|
return l === "table" ? /* @__PURE__ */ e.createElement("div", {
|
|
5353
5364
|
key: t.label,
|
|
5354
5365
|
className: `${C}__legend-row`
|
|
@@ -5366,7 +5377,7 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5366
5377
|
"aria-label": _,
|
|
5367
5378
|
role: "table"
|
|
5368
5379
|
}, /* @__PURE__ */ e.createElement("thead", null, /* @__PURE__ */ e.createElement("tr", null, /* @__PURE__ */ e.createElement("th", { scope: "col" }, "Category"), /* @__PURE__ */ e.createElement("th", { scope: "col" }, "Value"), /* @__PURE__ */ e.createElement("th", { scope: "col" }, "Percentage"))), /* @__PURE__ */ e.createElement("tbody", null, a.map((t) => {
|
|
5369
|
-
let n =
|
|
5380
|
+
let n = k > 0 ? Math.round(t.value / k * 100) : 0;
|
|
5370
5381
|
return /* @__PURE__ */ e.createElement("tr", { key: t.label }, /* @__PURE__ */ e.createElement("td", null, t.label), /* @__PURE__ */ e.createElement("td", null, t.value.toLocaleString()), /* @__PURE__ */ e.createElement("td", null, n, "%"));
|
|
5371
5382
|
})))));
|
|
5372
5383
|
}, Jr = (e, t) => `(${t > 0 ? Math.round(e / t * 100) : 0}%)`, Yr = ({ barHeight: t = 16, chartWidth: n, className: r, colorPalette: i = "categorical", data: a = [], isLoading: o = !1, isThumbnail: s = !1, labelStrings: c = {}, legendAlignment: u = "left", showAccessibleTable: f = !0, showLegend: p, showTooltip: m, valueFormatter: h = Jr, ...v }) => {
|
|
@@ -5399,7 +5410,10 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5399
5410
|
});
|
|
5400
5411
|
d(() => {
|
|
5401
5412
|
V.setReference(z.current);
|
|
5402
|
-
}, [V])
|
|
5413
|
+
}, [V]), d(() => {
|
|
5414
|
+
let e = () => L(null);
|
|
5415
|
+
return window.addEventListener("scroll", e, !0), () => window.removeEventListener("scroll", e, !0);
|
|
5416
|
+
}, []);
|
|
5403
5417
|
let K = l((e) => {
|
|
5404
5418
|
z.current.getBoundingClientRect = () => ({
|
|
5405
5419
|
bottom: e.clientY,
|
|
@@ -5453,16 +5467,19 @@ var lr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5453
5467
|
onMouseMove: M ? K : void 0,
|
|
5454
5468
|
style: { height: t }
|
|
5455
5469
|
}, a.map((t, n) => {
|
|
5456
|
-
let r = F(n, t), i = Math.round(t.value / N * 100)
|
|
5470
|
+
let r = F(n, t), i = Math.round(t.value / N * 100), a = () => L({
|
|
5471
|
+
color: r,
|
|
5472
|
+
label: t.label,
|
|
5473
|
+
percent: i,
|
|
5474
|
+
value: t.value
|
|
5475
|
+
});
|
|
5457
5476
|
return /* @__PURE__ */ e.createElement("div", {
|
|
5458
5477
|
key: t.label,
|
|
5459
5478
|
className: `${T}__segment`,
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
value: t.value
|
|
5465
|
-
}) : void 0,
|
|
5479
|
+
onClick: M ? (e) => {
|
|
5480
|
+
K(e), a();
|
|
5481
|
+
} : void 0,
|
|
5482
|
+
onMouseEnter: M ? a : void 0,
|
|
5466
5483
|
style: {
|
|
5467
5484
|
backgroundColor: r,
|
|
5468
5485
|
flex: t.value
|
|
@@ -7247,9 +7264,9 @@ var Qr = {
|
|
|
7247
7264
|
searchShortcut: "Press / to focus the search field",
|
|
7248
7265
|
triggerButton: "Toggle dropdown menu"
|
|
7249
7266
|
}, loadingText: b = "Loading results...", message: x, noResultsText: S = "No results found", onBlur: w, onChange: T, onClear: k, onFocus: A, onOptionSelect: M, options: N, placeholder: F, required: I = !1, showLabel: L = !0, showUnfilteredOptions: R = !1, size: z = "s", tooltipText: ee = null, validationMessage: B, validationStatus: V, value: H, ...W }, G) => {
|
|
7250
|
-
let K = sn(f, p), q = "pds-combobox", te = z === "s" ? null : `${q}--${z}`,
|
|
7251
|
-
s && (
|
|
7252
|
-
let
|
|
7267
|
+
let K = sn(f, p), q = "pds-combobox", te = z === "s" ? null : `${q}--${z}`, J = r ? $.disabled : null, ne = I && !r ? $.required : null, re = V === "error" ? $.error : null, ie = V === "success" ? $.success : null, Y = null;
|
|
7268
|
+
s && (Y = "search"), V === "error" && (Y = "error"), V === "success" && (Y = "success");
|
|
7269
|
+
let ae = B || x, oe = H !== void 0, se = n !== void 0, ce = (e) => {
|
|
7253
7270
|
let t = N.find((t) => t.value === e);
|
|
7254
7271
|
return t ? t.label : "";
|
|
7255
7272
|
}, [le, ue] = _(se ? n : void 0), [de, fe] = _(oe ? H ?? "" : se ? ce(n) : ""), me = c && !de;
|
|
@@ -7274,7 +7291,7 @@ var Qr = {
|
|
|
7274
7291
|
N,
|
|
7275
7292
|
de,
|
|
7276
7293
|
R
|
|
7277
|
-
]), { getInputProps: ve, getItemProps:
|
|
7294
|
+
]), { getInputProps: ve, getItemProps: ye, getMenuProps: be, highlightedIndex: xe, isOpen: X, openMenu: Se, reset: Ce } = pe({
|
|
7278
7295
|
id: u,
|
|
7279
7296
|
inputId: `input-${u}`,
|
|
7280
7297
|
items: _e,
|
|
@@ -7304,7 +7321,7 @@ var Qr = {
|
|
|
7304
7321
|
return t;
|
|
7305
7322
|
}
|
|
7306
7323
|
}), { context: we, floatingStyles: Te, refs: Ee } = P({
|
|
7307
|
-
open:
|
|
7324
|
+
open: X,
|
|
7308
7325
|
whileElementsMounted: E,
|
|
7309
7326
|
placement: "bottom-start",
|
|
7310
7327
|
strategy: "fixed",
|
|
@@ -7338,7 +7355,7 @@ var Qr = {
|
|
|
7338
7355
|
}), ke = Vn("var(--pds-z-index-dropdown)"), Ae = l((e) => {
|
|
7339
7356
|
Ee.setReference(e), typeof G == "function" ? G(e) : G && "current" in G && (G.current = e);
|
|
7340
7357
|
}, [G, Ee]), je = () => {
|
|
7341
|
-
|
|
7358
|
+
X ? Ce() : Se();
|
|
7342
7359
|
}, Me = () => {
|
|
7343
7360
|
oe || fe(""), ue(void 0), Ce(), he.current?.focus(), R && Se(), k?.();
|
|
7344
7361
|
}, Ne = (e) => {
|
|
@@ -7347,8 +7364,8 @@ var Qr = {
|
|
|
7347
7364
|
R && Se(), A?.(le);
|
|
7348
7365
|
}, Fe = () => _e.map((t, n) => /* @__PURE__ */ e.createElement(yn, {
|
|
7349
7366
|
key: t.value,
|
|
7350
|
-
className:
|
|
7351
|
-
...
|
|
7367
|
+
className: xe === n ? "pds-dropdown__item--focused" : "",
|
|
7368
|
+
...ye({
|
|
7352
7369
|
item: t,
|
|
7353
7370
|
index: n
|
|
7354
7371
|
})
|
|
@@ -7358,9 +7375,9 @@ var Qr = {
|
|
|
7358
7375
|
$.base,
|
|
7359
7376
|
q,
|
|
7360
7377
|
te,
|
|
7378
|
+
J,
|
|
7361
7379
|
ne,
|
|
7362
7380
|
re,
|
|
7363
|
-
J,
|
|
7364
7381
|
ie,
|
|
7365
7382
|
t ?? ""
|
|
7366
7383
|
]),
|
|
@@ -7375,13 +7392,13 @@ var Qr = {
|
|
|
7375
7392
|
tooltipText: ee
|
|
7376
7393
|
}), /* @__PURE__ */ e.createElement("span", {
|
|
7377
7394
|
ref: Ae,
|
|
7378
|
-
"aria-describedby":
|
|
7395
|
+
"aria-describedby": ae ? `${u}__message` : null,
|
|
7379
7396
|
"aria-disabled": r ? !0 : null,
|
|
7380
7397
|
"aria-invalid": V === "error" ? !0 : null,
|
|
7381
7398
|
"aria-required": I ? !0 : null,
|
|
7382
7399
|
className: Z([`${q}__input-wrapper`, me ? `${q}__input-wrapper--has-search-shortcut` : null]),
|
|
7383
7400
|
id: u
|
|
7384
|
-
},
|
|
7401
|
+
}, Y && /* @__PURE__ */ e.createElement(pn, { variant: Y }), /* @__PURE__ */ e.createElement("input", {
|
|
7385
7402
|
ref: he,
|
|
7386
7403
|
autoComplete: "off",
|
|
7387
7404
|
className: `${q}__input`,
|
|
@@ -7404,7 +7421,7 @@ var Qr = {
|
|
|
7404
7421
|
inputId: `input-${u}`,
|
|
7405
7422
|
shortcutLabel: y.searchShortcut
|
|
7406
7423
|
}), o && /* @__PURE__ */ e.createElement("button", {
|
|
7407
|
-
"aria-expanded":
|
|
7424
|
+
"aria-expanded": X,
|
|
7408
7425
|
"aria-label": y.triggerButton,
|
|
7409
7426
|
className: `${q}__trigger`,
|
|
7410
7427
|
disabled: r,
|
|
@@ -7424,15 +7441,15 @@ var Qr = {
|
|
|
7424
7441
|
} : { display: "none" }
|
|
7425
7442
|
}, De && m && /* @__PURE__ */ e.createElement("div", { className: `${q}__loading` }, b), De && !m && _e.length === 0 && /* @__PURE__ */ e.createElement("div", { className: "pds-dropdown__no-results" }, S), /* @__PURE__ */ e.createElement("ul", {
|
|
7426
7443
|
className: `${q}__options`,
|
|
7427
|
-
...
|
|
7444
|
+
...be({}, { suppressRefError: !0 }),
|
|
7428
7445
|
style: De && (i || !m && _e.length > 0) ? void 0 : { display: "none" }
|
|
7429
7446
|
}, De && !m && Fe(), De && i && /* @__PURE__ */ e.createElement("li", {
|
|
7430
7447
|
className: "pds-dropdown__footer",
|
|
7431
7448
|
role: "presentation"
|
|
7432
|
-
}, i)))),
|
|
7449
|
+
}, i)))), ae && /* @__PURE__ */ e.createElement(dn, {
|
|
7433
7450
|
hasValidationMessage: !!B,
|
|
7434
7451
|
id: u,
|
|
7435
|
-
message:
|
|
7452
|
+
message: ae,
|
|
7436
7453
|
validationMessageHasDecorators: !1,
|
|
7437
7454
|
validationStatus: V
|
|
7438
7455
|
}));
|
|
@@ -7457,9 +7474,9 @@ var Qr = {
|
|
|
7457
7474
|
]), te = h(() => t?.items?.map((e) => ({
|
|
7458
7475
|
...e,
|
|
7459
7476
|
isAlreadySelected: B.some((t) => t.id === e.id)
|
|
7460
|
-
})) || [], [t?.items, B]),
|
|
7477
|
+
})) || [], [t?.items, B]), J = (e) => {
|
|
7461
7478
|
H(e), m?.(e);
|
|
7462
|
-
}, { getDropdownProps:
|
|
7479
|
+
}, { getDropdownProps: ne, getSelectedItemProps: re, removeSelectedItem: ie } = me({
|
|
7463
7480
|
selectedItems: B,
|
|
7464
7481
|
onStateChange: ({ selectedItems: e, type: t }) => {
|
|
7465
7482
|
if (!r) switch (t) {
|
|
@@ -7467,12 +7484,12 @@ var Qr = {
|
|
|
7467
7484
|
case me.stateChangeTypes.SelectedItemKeyDownDelete:
|
|
7468
7485
|
case me.stateChangeTypes.DropdownKeyDownBackspace:
|
|
7469
7486
|
case me.stateChangeTypes.FunctionRemoveSelectedItem:
|
|
7470
|
-
|
|
7487
|
+
J(e || []);
|
|
7471
7488
|
break;
|
|
7472
7489
|
default: break;
|
|
7473
7490
|
}
|
|
7474
7491
|
}
|
|
7475
|
-
}), { closeMenu:
|
|
7492
|
+
}), { closeMenu: Y, getInputProps: ae, getItemProps: oe, getMenuProps: se, getToggleButtonProps: ce, highlightedIndex: le, isOpen: ue, openMenu: de, selectedItem: fe } = pe({
|
|
7476
7493
|
items: q,
|
|
7477
7494
|
itemToString: (e) => e ? e.label : "",
|
|
7478
7495
|
selectedItem: null,
|
|
@@ -7495,7 +7512,7 @@ var Qr = {
|
|
|
7495
7512
|
case pe.stateChangeTypes.InputKeyDownEnter:
|
|
7496
7513
|
case pe.stateChangeTypes.ItemClick:
|
|
7497
7514
|
case pe.stateChangeTypes.InputBlur:
|
|
7498
|
-
n && (n.isAlreadySelected ?
|
|
7515
|
+
n && (n.isAlreadySelected ? J(B.filter((e) => e.id !== n.id)) : J([...B, n]), z(""), W(null));
|
|
7499
7516
|
break;
|
|
7500
7517
|
case pe.stateChangeTypes.InputChange:
|
|
7501
7518
|
z(e || ""), W(null);
|
|
@@ -7530,7 +7547,7 @@ var Qr = {
|
|
|
7530
7547
|
}
|
|
7531
7548
|
})
|
|
7532
7549
|
]
|
|
7533
|
-
}), { context: _e, floatingStyles: ve, refs:
|
|
7550
|
+
}), { context: _e, floatingStyles: ve, refs: ye } = P({
|
|
7534
7551
|
open: G,
|
|
7535
7552
|
onOpenChange: K,
|
|
7536
7553
|
whileElementsMounted: E,
|
|
@@ -7543,12 +7560,12 @@ var Qr = {
|
|
|
7543
7560
|
Object.assign(e.floating.style, { width: `${t.reference.width}px` });
|
|
7544
7561
|
} })
|
|
7545
7562
|
]
|
|
7546
|
-
}), { getFloatingProps:
|
|
7563
|
+
}), { getFloatingProps: be } = ee([N(_e)]), xe = Vn("var(--pds-z-index-dropdown)"), X = (e) => {
|
|
7547
7564
|
if (e.stopPropagation(), r) return;
|
|
7548
7565
|
let t = !G;
|
|
7549
|
-
K(t), t && ue &&
|
|
7566
|
+
K(t), t && ue && Y();
|
|
7550
7567
|
}, Se = (e) => {
|
|
7551
|
-
r || (e.isAlreadySelected ?
|
|
7568
|
+
r || (e.isAlreadySelected ? J(B.filter((t) => t.id !== e.id)) : J([...B, e]));
|
|
7552
7569
|
}, Ce = () => {
|
|
7553
7570
|
K(!1), t?.onClose?.();
|
|
7554
7571
|
}, we = () => {
|
|
@@ -7557,19 +7574,19 @@ var Qr = {
|
|
|
7557
7574
|
if (U === null) W(B.length - 1);
|
|
7558
7575
|
else {
|
|
7559
7576
|
let e = [...B];
|
|
7560
|
-
e.splice(U, 1),
|
|
7577
|
+
e.splice(U, 1), J(e), W(null);
|
|
7561
7578
|
}
|
|
7562
7579
|
}, Ee = g(!1), De = () => {
|
|
7563
|
-
r || (Ee.current ?
|
|
7580
|
+
r || (Ee.current ? Y() : de());
|
|
7564
7581
|
}, Oe = (e) => {
|
|
7565
7582
|
Ee.current = ue, !r && e.currentTarget.setAttribute("data-focus-method", "mouse");
|
|
7566
7583
|
}, ke = (e) => {
|
|
7567
7584
|
e.currentTarget.setAttribute("data-focus-method", "keyboard"), !r && ((e.key === "Backspace" || e.key === "Delete") && !R && B.length > 0 && (e.preventDefault(), Te()), e.key === "Enter" && U !== null && (e.preventDefault(), Te()), !ue && (e.key === "Enter" || e.key === "ArrowDown") && (e.preventDefault(), de()));
|
|
7568
|
-
}, Ae =
|
|
7569
|
-
...
|
|
7585
|
+
}, Ae = ae({
|
|
7586
|
+
...ne({ preventKeyAction: ue }, { suppressRefError: !0 }),
|
|
7570
7587
|
disabled: r,
|
|
7571
7588
|
onKeyDown: ke
|
|
7572
|
-
}, { suppressRefError: !0 }), je = B.length === 2 ? /* @__PURE__ */ e.createElement("span", { className: `${A}__counter-item` }, B.length - 1) : B.length === 3 ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: `${A}__counter-layer` }), /* @__PURE__ */ e.createElement("span", { className: `${A}__counter-item` }, B.length - 1)) : B.length > 3 ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: `${A}__counter-layer` }), /* @__PURE__ */ e.createElement("span", { className: `${A}__counter-layer` }), /* @__PURE__ */ e.createElement("span", { className: `${A}__counter-item` }, B.length - 1)) : "", Me =
|
|
7589
|
+
}, { suppressRefError: !0 }), je = B.length === 2 ? /* @__PURE__ */ e.createElement("span", { className: `${A}__counter-item` }, B.length - 1) : B.length === 3 ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: `${A}__counter-layer` }), /* @__PURE__ */ e.createElement("span", { className: `${A}__counter-item` }, B.length - 1)) : B.length > 3 ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: `${A}__counter-layer` }), /* @__PURE__ */ e.createElement("span", { className: `${A}__counter-layer` }), /* @__PURE__ */ e.createElement("span", { className: `${A}__counter-item` }, B.length - 1)) : "", Me = ne({}, { suppressRefError: !0 }), Ne = V([Me.ref, ge.setFloating]);
|
|
7573
7590
|
return /* @__PURE__ */ e.createElement("div", {
|
|
7574
7591
|
className: Z([
|
|
7575
7592
|
$.base,
|
|
@@ -7590,7 +7607,7 @@ var Qr = {
|
|
|
7590
7607
|
showLabel: S
|
|
7591
7608
|
}), /* @__PURE__ */ e.createElement("div", {
|
|
7592
7609
|
ref: (e) => {
|
|
7593
|
-
ge.setReference(e),
|
|
7610
|
+
ge.setReference(e), ye.setReference(e);
|
|
7594
7611
|
},
|
|
7595
7612
|
"aria-disabled": r ? !0 : null,
|
|
7596
7613
|
"aria-required": b ? !0 : null,
|
|
@@ -7605,7 +7622,7 @@ var Qr = {
|
|
|
7605
7622
|
${A}__selected-item
|
|
7606
7623
|
${n === U ? `${A}__selected-item--marked-for-deletion` : ""}
|
|
7607
7624
|
`,
|
|
7608
|
-
...
|
|
7625
|
+
...re({
|
|
7609
7626
|
selectedItem: t,
|
|
7610
7627
|
index: n
|
|
7611
7628
|
}),
|
|
@@ -7627,7 +7644,7 @@ var Qr = {
|
|
|
7627
7644
|
"aria-label": d.aiPanelButton,
|
|
7628
7645
|
className: Z([`${A}__ai-button`, F ?? ""]),
|
|
7629
7646
|
disabled: r,
|
|
7630
|
-
onClick:
|
|
7647
|
+
onClick: X,
|
|
7631
7648
|
type: "button"
|
|
7632
7649
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
7633
7650
|
className: `${A}__ai-icon`,
|
|
@@ -7649,7 +7666,7 @@ var Qr = {
|
|
|
7649
7666
|
className: `pds-dropdown__panel ${A}__dropdown ${i ? `${A}__dropdown--has-footer` : ""}`,
|
|
7650
7667
|
style: ue ? {
|
|
7651
7668
|
...he,
|
|
7652
|
-
zIndex:
|
|
7669
|
+
zIndex: xe
|
|
7653
7670
|
} : { display: "none" }
|
|
7654
7671
|
}, /* @__PURE__ */ e.createElement("div", { className: `${A}__dropdown-input-wrapper` }, /* @__PURE__ */ e.createElement(pn, { variant: "search" }), /* @__PURE__ */ e.createElement("input", {
|
|
7655
7672
|
"aria-label": d.inputInstructions,
|
|
@@ -7680,13 +7697,13 @@ var Qr = {
|
|
|
7680
7697
|
className: "pds-dropdown__footer",
|
|
7681
7698
|
role: "presentation"
|
|
7682
7699
|
}, i)))), G && t && /* @__PURE__ */ e.createElement(C, null, /* @__PURE__ */ e.createElement("div", {
|
|
7683
|
-
ref:
|
|
7700
|
+
ref: ye.setFloating,
|
|
7684
7701
|
className: `${A}__aux-panel`,
|
|
7685
7702
|
style: {
|
|
7686
7703
|
...ve,
|
|
7687
|
-
zIndex:
|
|
7704
|
+
zIndex: xe
|
|
7688
7705
|
},
|
|
7689
|
-
...
|
|
7706
|
+
...be()
|
|
7690
7707
|
}, t.content ? /* @__PURE__ */ e.createElement("div", { className: `${A}__aux-panel-content` }, t.content) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(Q, {
|
|
7691
7708
|
className: `${A}__aux-panel-icon`,
|
|
7692
7709
|
iconName: "sparkles",
|
|
@@ -7715,12 +7732,23 @@ var Qr = {
|
|
|
7715
7732
|
iconName: "xmark",
|
|
7716
7733
|
size: "m"
|
|
7717
7734
|
}))))));
|
|
7718
|
-
}, yi = (
|
|
7735
|
+
}, yi = () => {
|
|
7736
|
+
let e = typeof window < "u", t = (e) => e >= 1440 ? "xl" : e >= 1280 ? "lg" : e >= 768 ? "md" : "sm", [n, r] = _(e ? t(window.innerWidth) : "lg");
|
|
7737
|
+
return d(() => {
|
|
7738
|
+
if (!e) return;
|
|
7739
|
+
let n = () => {
|
|
7740
|
+
r(t(window.innerWidth));
|
|
7741
|
+
};
|
|
7742
|
+
return n(), window.addEventListener("resize", n), () => {
|
|
7743
|
+
window.removeEventListener("resize", n);
|
|
7744
|
+
};
|
|
7745
|
+
}, [e]), n;
|
|
7746
|
+
}, bi = (e) => String(e).padStart(2, "0"), xi = (e) => {
|
|
7719
7747
|
let t = e ? /^(\d{1,2}):(\d{2})$/.exec(e) : null;
|
|
7720
7748
|
if (!t) return null;
|
|
7721
7749
|
let n = parseInt(t[1], 10), r = parseInt(t[2], 10);
|
|
7722
7750
|
return n > 23 || r > 59 ? null : new ge(n, r);
|
|
7723
|
-
},
|
|
7751
|
+
}, Si = (e) => e ? `${bi(e.hour)}:${bi(e.minute)}` : void 0, Ci = ({ baseClass: t, segment: n, state: r }) => {
|
|
7724
7752
|
let i = g(null), { segmentProps: a } = Pe(n, r, i), { focusProps: o, isFocusVisible: s } = Fe(), c = n.isPlaceholder ? n.type === "dayPeriod" ? "--" : "00" : n.text;
|
|
7725
7753
|
return /* @__PURE__ */ e.createElement("div", {
|
|
7726
7754
|
...ke(a, o),
|
|
@@ -7731,7 +7759,7 @@ var Qr = {
|
|
|
7731
7759
|
s ? `${t}__segment--focus-visible` : null
|
|
7732
7760
|
])
|
|
7733
7761
|
}, c);
|
|
7734
|
-
},
|
|
7762
|
+
}, wi = ({ anchorDate: t, className: n, defaultValue: r, disabled: i = !1, hourCycle: a = 12, id: o, inputWidth: s, inputWidthMin: c, label: l, message: u, onBlur: f, onChange: p, onFocus: m, required: v = !1, showLabel: y = !0, size: b = "s", timeZone: x, tooltipText: S = null, validationMessage: C, validationStatus: w, value: T }) => {
|
|
7735
7763
|
let E = sn(s, c), D = "pds-timepicker", O = b === "s" ? null : `${D}--${b}`, k = i ? $.disabled : null, A = v && !i ? $.required : null, j = w === "error" ? $.error : null, M = w === "success" ? $.success : null, N = C || u, P = T !== void 0, { locale: F } = Ie(), [I, L] = _(r), R = P ? T : I, z = Ve({
|
|
7736
7764
|
granularity: "minute",
|
|
7737
7765
|
hourCycle: a,
|
|
@@ -7739,14 +7767,14 @@ var Qr = {
|
|
|
7739
7767
|
locale: F,
|
|
7740
7768
|
onBlur: f,
|
|
7741
7769
|
onChange: (e) => {
|
|
7742
|
-
let t =
|
|
7770
|
+
let t = Si(e);
|
|
7743
7771
|
t && (P || L(t), p && p(t));
|
|
7744
7772
|
},
|
|
7745
7773
|
onFocusChange: (e) => {
|
|
7746
7774
|
e && m && m();
|
|
7747
7775
|
},
|
|
7748
7776
|
shouldForceLeadingZeros: !0,
|
|
7749
|
-
value: h(() =>
|
|
7777
|
+
value: h(() => xi(R), [R])
|
|
7750
7778
|
}), ee = g(null), { fieldProps: B } = Re({
|
|
7751
7779
|
"aria-describedby": N ? `${o}__message` : void 0,
|
|
7752
7780
|
"aria-labelledby": `${o}-label`,
|
|
@@ -7757,7 +7785,7 @@ var Qr = {
|
|
|
7757
7785
|
if (V.current = x, !x || !e || x === e) return;
|
|
7758
7786
|
let n = z.value;
|
|
7759
7787
|
if (!n) return;
|
|
7760
|
-
let r = we(Te(Ce(t ?? Ee(e), n), e), x), i =
|
|
7788
|
+
let r = we(Te(Ce(t ?? Ee(e), n), e), x), i = Si(new ge(r.hour, r.minute));
|
|
7761
7789
|
i && (P || L(i), p && p(i));
|
|
7762
7790
|
}, [x]);
|
|
7763
7791
|
let H = h(() => {
|
|
@@ -7807,7 +7835,7 @@ var Qr = {
|
|
|
7807
7835
|
}), /* @__PURE__ */ e.createElement("div", { className: `${D}__value` }, z.segments.map((t, n) => t.type === "literal" ? /* @__PURE__ */ e.createElement("div", {
|
|
7808
7836
|
key: n,
|
|
7809
7837
|
className: Z([`${D}__separator`, t.text === ":" ? `${D}__separator--colon` : null])
|
|
7810
|
-
}, t.text) : /* @__PURE__ */ e.createElement(
|
|
7838
|
+
}, t.text) : /* @__PURE__ */ e.createElement(Ci, {
|
|
7811
7839
|
key: n,
|
|
7812
7840
|
baseClass: D,
|
|
7813
7841
|
segment: t,
|
|
@@ -7819,31 +7847,31 @@ var Qr = {
|
|
|
7819
7847
|
validationMessageHasDecorators: !1,
|
|
7820
7848
|
validationStatus: w
|
|
7821
7849
|
}));
|
|
7822
|
-
},
|
|
7850
|
+
}, Ti = (e, t = xe()) => {
|
|
7823
7851
|
if (!e) return;
|
|
7824
|
-
let n =
|
|
7852
|
+
let n = be(e, t);
|
|
7825
7853
|
return new he(n.year, n.month, n.day);
|
|
7826
|
-
},
|
|
7854
|
+
}, Ei = (e, t = xe()) => e ? e.toDate(t) : void 0, Di = (e) => String(e).padStart(2, "0"), Oi = (e) => {
|
|
7827
7855
|
let t = e ? /^(\d{1,2}):(\d{2})$/.exec(e) : null;
|
|
7828
7856
|
if (!t) return;
|
|
7829
7857
|
let n = parseInt(t[1], 10), r = parseInt(t[2], 10);
|
|
7830
7858
|
if (!(n > 23 || r > 59)) return new ge(n, r);
|
|
7831
|
-
},
|
|
7859
|
+
}, ki = (e, t = xe()) => {
|
|
7832
7860
|
if (!e) return;
|
|
7833
|
-
let n =
|
|
7834
|
-
return `${
|
|
7835
|
-
},
|
|
7861
|
+
let n = be(e, t);
|
|
7862
|
+
return `${Di(n.hour)}:${Di(n.minute)}`;
|
|
7863
|
+
}, Ai = (e, t, n = xe()) => {
|
|
7836
7864
|
if (!e) return;
|
|
7837
|
-
let r =
|
|
7838
|
-
return r ? Ce(e, r).toDate(n) :
|
|
7839
|
-
},
|
|
7865
|
+
let r = Oi(t);
|
|
7866
|
+
return r ? Ce(e, r).toDate(n) : Ei(e, n);
|
|
7867
|
+
}, ji = "00:00", Mi = "23:59", Ni = (e, t, n = xe()) => {
|
|
7840
7868
|
if (!e) return "";
|
|
7841
|
-
let r =
|
|
7869
|
+
let r = be(e, n);
|
|
7842
7870
|
return De(new Date(r.year, r.month - 1, r.day), "PP", { locale: t });
|
|
7843
|
-
},
|
|
7871
|
+
}, Pi = (e, t) => {
|
|
7844
7872
|
let n = Ee(t).year;
|
|
7845
|
-
return e.some((e) => !!e &&
|
|
7846
|
-
},
|
|
7873
|
+
return e.some((e) => !!e && be(e, t).year !== n);
|
|
7874
|
+
}, Fi = (e, { hourCycle: t, includeYear: n, localeString: r, timeZone: i = xe() }) => e ? new Intl.DateTimeFormat(r, {
|
|
7847
7875
|
day: "numeric",
|
|
7848
7876
|
hour: t === 24 ? "2-digit" : "numeric",
|
|
7849
7877
|
hourCycle: t === 24 ? "h23" : "h12",
|
|
@@ -7851,15 +7879,15 @@ var Qr = {
|
|
|
7851
7879
|
month: "short",
|
|
7852
7880
|
timeZone: i,
|
|
7853
7881
|
...n ? { year: "numeric" } : {}
|
|
7854
|
-
}).format(e) : "",
|
|
7882
|
+
}).format(e) : "", Ii = (e, t) => {
|
|
7855
7883
|
if (e.custom) return e.custom();
|
|
7856
|
-
let n = t?.timeZone ??
|
|
7884
|
+
let n = t?.timeZone ?? xe(), r = t?.locale ?? "en-US", i = Ee(n);
|
|
7857
7885
|
if (e.days !== void 0) return e.days < 0 ? {
|
|
7858
|
-
from:
|
|
7859
|
-
to:
|
|
7886
|
+
from: Ei(i.add({ days: e.days + 1 }), n),
|
|
7887
|
+
to: Ei(i, n)
|
|
7860
7888
|
} : {
|
|
7861
|
-
from:
|
|
7862
|
-
to:
|
|
7889
|
+
from: Ei(i, n),
|
|
7890
|
+
to: Ei(i.add({ days: e.days - 1 }), n)
|
|
7863
7891
|
};
|
|
7864
7892
|
if (e.hours !== void 0) {
|
|
7865
7893
|
let t = /* @__PURE__ */ new Date(), n = new Date(t.getTime() + e.hours * 60 * 60 * 1e3);
|
|
@@ -7883,37 +7911,37 @@ var Qr = {
|
|
|
7883
7911
|
}
|
|
7884
7912
|
switch (e.type) {
|
|
7885
7913
|
case "today": return {
|
|
7886
|
-
from:
|
|
7887
|
-
to:
|
|
7914
|
+
from: Ei(i, n),
|
|
7915
|
+
to: Ei(i, n)
|
|
7888
7916
|
};
|
|
7889
7917
|
case "current-week": return {
|
|
7890
|
-
from:
|
|
7891
|
-
to:
|
|
7918
|
+
from: Ei(Se(i, r), n),
|
|
7919
|
+
to: Ei(ye(i, r), n)
|
|
7892
7920
|
};
|
|
7893
7921
|
case "current-month": return {
|
|
7894
|
-
from:
|
|
7895
|
-
to:
|
|
7922
|
+
from: Ei(X(i), n),
|
|
7923
|
+
to: Ei(ve(i), n)
|
|
7896
7924
|
};
|
|
7897
7925
|
case "last-week": {
|
|
7898
7926
|
let e = i.subtract({ weeks: 1 });
|
|
7899
7927
|
return {
|
|
7900
|
-
from:
|
|
7901
|
-
to:
|
|
7928
|
+
from: Ei(Se(e, r), n),
|
|
7929
|
+
to: Ei(ye(e, r), n)
|
|
7902
7930
|
};
|
|
7903
7931
|
}
|
|
7904
7932
|
case "last-month": {
|
|
7905
7933
|
let e = i.subtract({ months: 1 });
|
|
7906
7934
|
return {
|
|
7907
|
-
from:
|
|
7908
|
-
to:
|
|
7935
|
+
from: Ei(X(e), n),
|
|
7936
|
+
to: Ei(ve(e), n)
|
|
7909
7937
|
};
|
|
7910
7938
|
}
|
|
7911
7939
|
default: return {
|
|
7912
|
-
from:
|
|
7913
|
-
to:
|
|
7940
|
+
from: Ei(i, n),
|
|
7941
|
+
to: Ei(i, n)
|
|
7914
7942
|
};
|
|
7915
7943
|
}
|
|
7916
|
-
},
|
|
7944
|
+
}, Li = {
|
|
7917
7945
|
clearButton: "Clear",
|
|
7918
7946
|
customPresetLabel: "Custom",
|
|
7919
7947
|
doneButton: "Done",
|
|
@@ -7934,7 +7962,7 @@ var Qr = {
|
|
|
7934
7962
|
to: " to ",
|
|
7935
7963
|
todayButton: "Today",
|
|
7936
7964
|
utcTimeZoneLabel: "UTC"
|
|
7937
|
-
},
|
|
7965
|
+
}, Ri = ({ baseClass: t, currentMonth: n, date: r, state: i, timeZone: a }) => {
|
|
7938
7966
|
let o = g(null), { buttonProps: s, cellProps: c, formattedDate: l, isDisabled: u, isOutsideVisibleRange: d, isSelected: f, isUnavailable: p } = Me({ date: r }, i, o), m = r.month !== n.month || r.year !== n.year, h = "highlightedRange" in i ? i : null, _ = !!h?.highlightedRange && r.compare(h.highlightedRange.start) === 0, v = !!h?.highlightedRange && r.compare(h.highlightedRange.end) === 0, y = f && h && !_ && !v, b = d || m, x = r.compare(Ee(a)) === 0;
|
|
7939
7967
|
return /* @__PURE__ */ e.createElement("td", {
|
|
7940
7968
|
...c,
|
|
@@ -7956,7 +7984,7 @@ var Qr = {
|
|
|
7956
7984
|
]),
|
|
7957
7985
|
hidden: b
|
|
7958
7986
|
}, l));
|
|
7959
|
-
},
|
|
7987
|
+
}, zi = ({ baseClass: t, monthOffset: n = 0, state: r, timeZone: i }) => {
|
|
7960
7988
|
let a = r.visibleRange.start.add({ months: n }), { gridProps: o, headerProps: s, weekDays: c, weeksInMonth: l } = Ne({ startDate: a }, r);
|
|
7961
7989
|
return /* @__PURE__ */ e.createElement("table", {
|
|
7962
7990
|
...o,
|
|
@@ -7964,7 +7992,7 @@ var Qr = {
|
|
|
7964
7992
|
}, /* @__PURE__ */ e.createElement("thead", s, /* @__PURE__ */ e.createElement("tr", null, c.map((n, r) => /* @__PURE__ */ e.createElement("th", {
|
|
7965
7993
|
key: r,
|
|
7966
7994
|
className: `${t}__weekday`
|
|
7967
|
-
}, n)))), /* @__PURE__ */ e.createElement("tbody", null, [...Array(l).keys()].map((n) => /* @__PURE__ */ e.createElement("tr", { key: n }, r.getDatesInWeek(n, a).map((n, o) => n ? /* @__PURE__ */ e.createElement(
|
|
7995
|
+
}, n)))), /* @__PURE__ */ e.createElement("tbody", null, [...Array(l).keys()].map((n) => /* @__PURE__ */ e.createElement("tr", { key: n }, r.getDatesInWeek(n, a).map((n, o) => n ? /* @__PURE__ */ e.createElement(Ri, {
|
|
7968
7996
|
key: o,
|
|
7969
7997
|
baseClass: t,
|
|
7970
7998
|
currentMonth: a,
|
|
@@ -7972,31 +8000,31 @@ var Qr = {
|
|
|
7972
8000
|
state: r,
|
|
7973
8001
|
timeZone: i
|
|
7974
8002
|
}) : /* @__PURE__ */ e.createElement("td", { key: o }))))));
|
|
7975
|
-
},
|
|
8003
|
+
}, Bi = ({ allowCustomRange: t = !0, allowDateRangeSelection: n = !0, className: r, defaultPresetLabel: i, defaultTimeZoneMode: a = "utc", disabled: o = !1, footerNote: s, hourCycle: c = 12, id: l, inputWidth: u, inputWidthMin: f, label: p, locale: m, maxDate: v, message: y, minDate: b, mode: x = "single", onChange: S, onTimeZoneChange: w, placeholder: T, presets: E, required: D = !1, showLabel: O = !0, showPresetCalendar: k = !0, showTime: A = !1, showTimeZoneSwitcher: j = !1, showTodayButton: M = !0, timeZone: N = xe(), tooltipText: P, translationStrings: F, validationMessage: I, validationStatus: L, value: R, visibleMonths: z = 2, ...ee }) => {
|
|
7976
8004
|
let B = x === "range", V = {
|
|
7977
|
-
...
|
|
8005
|
+
...Li,
|
|
7978
8006
|
...F
|
|
7979
|
-
}, H = B && !!E && E.length > 0;
|
|
8007
|
+
}, H = B && !!E && E.length > 0, U = yi() === "sm", W = k && !U;
|
|
7980
8008
|
j && !A && process.env.NODE_ENV !== "production" && console.warn("[Datepicker] `showTimeZoneSwitcher` has no effect unless `showTime` is also true."), E && E.length > 0 && !B && process.env.NODE_ENV !== "production" && console.warn("[Datepicker] `presets` requires `mode=\"range\"` — every preset computes a date range."), !t && !H && process.env.NODE_ENV !== "production" && console.warn("[Datepicker] `allowCustomRange` has no effect unless `presets` is also set."), i !== void 0 && !(H && E?.some((e) => e.label === i)) && process.env.NODE_ENV !== "production" && console.warn(`[Datepicker] \`defaultPresetLabel\` "${i}" matches no entry in \`presets\` — nothing is seeded as active.`);
|
|
7981
|
-
let { locale:
|
|
8009
|
+
let { locale: G } = Ie(), K = m?.code ?? G, q = h(() => B ? E?.find((e) => e.label === i) : void 0, [
|
|
7982
8010
|
i,
|
|
7983
8011
|
B,
|
|
7984
8012
|
E
|
|
7985
|
-
]),
|
|
7986
|
-
let t =
|
|
7987
|
-
locale:
|
|
8013
|
+
]), te = (e) => {
|
|
8014
|
+
let t = Ii(e, {
|
|
8015
|
+
locale: K,
|
|
7988
8016
|
timeZone: N
|
|
7989
8017
|
}), n = e.hours !== void 0 || e.minutes !== void 0;
|
|
7990
8018
|
return !A || n ? t : {
|
|
7991
|
-
from:
|
|
7992
|
-
to:
|
|
8019
|
+
from: Ai(Ti(t.from, N), ji, N),
|
|
8020
|
+
to: Ai(Ti(t.to, N), Mi, N)
|
|
7993
8021
|
};
|
|
7994
|
-
}, [
|
|
8022
|
+
}, [J, ne] = _(() => R ?? (q ? te(q) : void 0)), [re, ie] = _(a), Y = j ? re === "utc" ? "UTC" : xe() : N, [ae, oe] = _(q?.label), [se, ce] = _(W), le = !H || se, ue = !H || k || t, de = z === 1 ? B && A ? 400 : 280 : 550, fe = g(null), pe = ae === void 0 && (B ? !!J?.from : !!J), me = (e, t) => B && A ? e ?? t : e, [he, ge] = _(() => me(ki(B ? J?.from : J, Y), ji)), [ve, ye] = _(() => me(ki(J?.to, Y), Mi)), be = sn(u, f), X = "pds-datepicker", Se = o ? $.disabled : null, Ce = D && !o ? $.required : null, we = L === "error" ? $.error : null, Te = L === "success" ? $.success : null, De = I || y, ke = /* @__PURE__ */ e.createElement("div", { className: `${X}__timezone-switcher` }, /* @__PURE__ */ e.createElement("span", { className: `${X}__timezone-switcher-label` }, V.timeZoneSwitcherLabel), /* @__PURE__ */ e.createElement(dr, {
|
|
7995
8023
|
id: `${l}-timezone-switcher`,
|
|
7996
8024
|
label: V.timeZoneSwitcherLabel || "",
|
|
7997
8025
|
onChange: (e) => {
|
|
7998
8026
|
let t = e;
|
|
7999
|
-
|
|
8027
|
+
ie(t), w?.(t === "utc" ? "UTC" : xe(), t);
|
|
8000
8028
|
},
|
|
8001
8029
|
options: [{
|
|
8002
8030
|
label: V.localTimeZoneLabel || "",
|
|
@@ -8006,155 +8034,155 @@ var Qr = {
|
|
|
8006
8034
|
value: "utc"
|
|
8007
8035
|
}],
|
|
8008
8036
|
size: "s",
|
|
8009
|
-
value:
|
|
8010
|
-
})), { floatingStyles:
|
|
8037
|
+
value: re
|
|
8038
|
+
})), { floatingStyles: Me, getFloatingProps: Ne, getReferenceProps: Pe, isMounted: Fe, isOpen: Re, refs: Ve, setIsOpen: He } = Ln({
|
|
8011
8039
|
enableListNavigation: !1,
|
|
8012
8040
|
offsetValue: 8,
|
|
8013
8041
|
placement: "bottom-start",
|
|
8014
8042
|
role: "dialog",
|
|
8015
8043
|
shiftPadding: 16,
|
|
8016
8044
|
variant: "default"
|
|
8017
|
-
}),
|
|
8018
|
-
|
|
8019
|
-
|
|
8045
|
+
}), Ue = Vn("var(--pds-z-index-overlay)"), We = Ti(b, Y), Ge = Ti(v, Y), Ke = (e, t, n = !1) => {
|
|
8046
|
+
ne(e), oe(t), S?.(e), !B && n && setTimeout(() => {
|
|
8047
|
+
He(!1);
|
|
8020
8048
|
}, 300);
|
|
8021
|
-
},
|
|
8049
|
+
}, qe = ze({
|
|
8022
8050
|
createCalendar: _e,
|
|
8023
|
-
locale:
|
|
8024
|
-
maxValue:
|
|
8025
|
-
minValue:
|
|
8051
|
+
locale: K,
|
|
8052
|
+
maxValue: Ge,
|
|
8053
|
+
minValue: We,
|
|
8026
8054
|
onChange: (e) => {
|
|
8027
|
-
B ||
|
|
8055
|
+
B || Ke(Ai(e, A ? he : void 0, Y), void 0, !A);
|
|
8028
8056
|
},
|
|
8029
|
-
value: B ? null :
|
|
8030
|
-
}),
|
|
8057
|
+
value: B ? null : Ti(J, Y) ?? null
|
|
8058
|
+
}), Je = g(null), Ye = Be({
|
|
8031
8059
|
createCalendar: _e,
|
|
8032
|
-
locale:
|
|
8033
|
-
maxValue:
|
|
8034
|
-
minValue:
|
|
8060
|
+
locale: K,
|
|
8061
|
+
maxValue: Ge,
|
|
8062
|
+
minValue: We,
|
|
8035
8063
|
visibleDuration: { months: z },
|
|
8036
8064
|
onChange: (e) => {
|
|
8037
|
-
B && e &&
|
|
8038
|
-
from:
|
|
8039
|
-
to:
|
|
8065
|
+
B && e && Ke({
|
|
8066
|
+
from: Ai(e.start, A ? he : void 0, Y),
|
|
8067
|
+
to: Ai(e.end, A ? ve : void 0, Y)
|
|
8040
8068
|
});
|
|
8041
8069
|
},
|
|
8042
8070
|
value: B ? (() => {
|
|
8043
|
-
let e =
|
|
8071
|
+
let e = J, t = Ti(e?.from, Y), n = Ti(e?.to, Y);
|
|
8044
8072
|
return t && n ? {
|
|
8045
8073
|
start: t,
|
|
8046
8074
|
end: n
|
|
8047
8075
|
} : null;
|
|
8048
8076
|
})() : null
|
|
8049
|
-
}),
|
|
8077
|
+
}), Xe = B ? Ye : qe, { calendarProps: Ze, nextButtonProps: Qe, prevButtonProps: $e } = je({}, qe), { calendarProps: et, nextButtonProps: tt, prevButtonProps: nt } = Le({}, Ye, Je), rt = B ? et : Ze, it = B ? tt : Qe, at = B ? nt : $e, ot = (e) => new Intl.DateTimeFormat(K, {
|
|
8050
8078
|
month: "long",
|
|
8051
8079
|
year: "numeric"
|
|
8052
|
-
}).format(e.toDate(
|
|
8053
|
-
|
|
8054
|
-
},
|
|
8055
|
-
|
|
8056
|
-
},
|
|
8057
|
-
let e = Ee(
|
|
8058
|
-
|
|
8059
|
-
},
|
|
8060
|
-
let t =
|
|
8061
|
-
locale:
|
|
8062
|
-
timeZone:
|
|
8080
|
+
}).format(e.toDate(xe())), st = B ? Array.from({ length: z }, (e, t) => t) : [0], ct = st.map((e) => ot(Xe.visibleRange.start.add({ months: e }))), lt = g(null), ut = g(null), { buttonProps: dt } = Ae(at, lt), { buttonProps: ft } = Ae(it, ut), pt = () => {
|
|
8081
|
+
ne(void 0), oe(void 0), S?.(void 0), A && (ge(B ? ji : void 0), ye(B ? Mi : void 0)), B ? Ye.setValue(null) : qe.setValue(null);
|
|
8082
|
+
}, mt = () => !B || !Ye.anchorDate ? !1 : (Ye.selectDate(Ye.anchorDate), !0), ht = () => {
|
|
8083
|
+
mt(), He(!1);
|
|
8084
|
+
}, gt = () => {
|
|
8085
|
+
let e = Ee(Y);
|
|
8086
|
+
Xe.setFocusedDate(e), B ? (Ye.setValue(null), ne(void 0), oe(void 0), S?.(void 0)) : (qe.setValue(e), Ke(Ai(e, A ? he : void 0, Y), void 0, !A));
|
|
8087
|
+
}, _t = (e) => {
|
|
8088
|
+
let t = Ii(e, {
|
|
8089
|
+
locale: K,
|
|
8090
|
+
timeZone: Y
|
|
8063
8091
|
}), n = e.hours !== void 0 || e.minutes !== void 0;
|
|
8064
|
-
|
|
8065
|
-
from:
|
|
8066
|
-
to:
|
|
8092
|
+
ce(W), A && n ? (ge(ki(t.from, Y)), ye(ki(t.to, Y)), Ke(t, e.label)) : Ke(A ? {
|
|
8093
|
+
from: Ai(Ti(t.from, Y), he, Y),
|
|
8094
|
+
to: Ai(Ti(t.to, Y), ve, Y)
|
|
8067
8095
|
} : t, e.label);
|
|
8068
|
-
let r =
|
|
8069
|
-
r &&
|
|
8070
|
-
|
|
8096
|
+
let r = Ti(t.from, Y);
|
|
8097
|
+
r && Xe.setFocusedDate(r), W || setTimeout(() => {
|
|
8098
|
+
He(!1);
|
|
8071
8099
|
}, 300);
|
|
8072
|
-
},
|
|
8073
|
-
if (
|
|
8074
|
-
let t =
|
|
8100
|
+
}, vt = (e, t) => ki(e, Y) === t, yt = (e) => {
|
|
8101
|
+
if (ge(e), B) {
|
|
8102
|
+
let t = J;
|
|
8075
8103
|
if (t?.from && t?.to) {
|
|
8076
|
-
if (
|
|
8077
|
-
|
|
8078
|
-
from:
|
|
8104
|
+
if (vt(t.from, e)) return;
|
|
8105
|
+
Ke({
|
|
8106
|
+
from: Ai(Ti(t.from, Y), e, Y),
|
|
8079
8107
|
to: t.to
|
|
8080
8108
|
});
|
|
8081
8109
|
}
|
|
8082
8110
|
} else {
|
|
8083
|
-
let t =
|
|
8111
|
+
let t = J;
|
|
8084
8112
|
if (t) {
|
|
8085
|
-
if (
|
|
8086
|
-
|
|
8113
|
+
if (vt(t, e)) return;
|
|
8114
|
+
Ke(Ai(Ti(t, Y), e, Y));
|
|
8087
8115
|
}
|
|
8088
8116
|
}
|
|
8089
|
-
},
|
|
8090
|
-
|
|
8091
|
-
let t =
|
|
8117
|
+
}, bt = (e) => {
|
|
8118
|
+
ye(e);
|
|
8119
|
+
let t = J;
|
|
8092
8120
|
if (t?.from && t?.to) {
|
|
8093
|
-
if (
|
|
8094
|
-
|
|
8121
|
+
if (vt(t.to, e)) return;
|
|
8122
|
+
Ke({
|
|
8095
8123
|
from: t.from,
|
|
8096
|
-
to:
|
|
8124
|
+
to: Ai(Ti(t.to, Y), e, Y)
|
|
8097
8125
|
});
|
|
8098
8126
|
}
|
|
8099
|
-
},
|
|
8127
|
+
}, xt = g(R);
|
|
8100
8128
|
d(() => {
|
|
8101
|
-
|
|
8129
|
+
xt.current !== R && (xt.current = R, ne(R));
|
|
8102
8130
|
}, [R]), d(() => {
|
|
8103
8131
|
if (A) if (B) {
|
|
8104
|
-
let e =
|
|
8105
|
-
|
|
8106
|
-
} else
|
|
8132
|
+
let e = J;
|
|
8133
|
+
ge(ki(e?.from, Y) ?? ji), ye(ki(e?.to, Y) ?? Mi);
|
|
8134
|
+
} else ge(ki(J, Y));
|
|
8107
8135
|
}, [
|
|
8108
|
-
q,
|
|
8109
8136
|
J,
|
|
8137
|
+
Y,
|
|
8110
8138
|
B,
|
|
8111
8139
|
A
|
|
8112
8140
|
]), d(() => {
|
|
8113
|
-
n ||
|
|
8141
|
+
n || mt();
|
|
8114
8142
|
}, [
|
|
8115
8143
|
B,
|
|
8116
8144
|
n,
|
|
8117
|
-
|
|
8145
|
+
Ye.anchorDate
|
|
8118
8146
|
]), d(() => {
|
|
8119
|
-
if (
|
|
8120
|
-
let e =
|
|
8121
|
-
|
|
8147
|
+
if (Re) {
|
|
8148
|
+
let e = Ti(B ? J?.from : J, Y);
|
|
8149
|
+
Xe.setFocusedDate(e ?? Ee(Y)), ce(W);
|
|
8122
8150
|
}
|
|
8123
|
-
}, [
|
|
8124
|
-
|
|
8125
|
-
}, [
|
|
8126
|
-
let
|
|
8151
|
+
}, [Re]), d(() => {
|
|
8152
|
+
fe.current && (fe.current.inert = !le);
|
|
8153
|
+
}, [le]);
|
|
8154
|
+
let St = E?.find((e) => e.label === ae), Ct = St && (St.showLabelInTrigger ?? (St.hours !== void 0 || St.minutes !== void 0)) ? St.label : void 0, wt = Pi(B ? [J?.from, J?.to] : [J], Y), Tt = (e) => A ? Fi(e, {
|
|
8127
8155
|
hourCycle: c,
|
|
8128
|
-
includeYear:
|
|
8129
|
-
localeString:
|
|
8130
|
-
timeZone:
|
|
8131
|
-
}) :
|
|
8132
|
-
if (
|
|
8156
|
+
includeYear: wt,
|
|
8157
|
+
localeString: K,
|
|
8158
|
+
timeZone: Y
|
|
8159
|
+
}) : Ni(e, m, Y), Et = () => {
|
|
8160
|
+
if (Ct !== void 0) return Ct;
|
|
8133
8161
|
if (B) {
|
|
8134
|
-
let t =
|
|
8135
|
-
return t?.from ? t.to ? /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
8162
|
+
let t = J;
|
|
8163
|
+
return t?.from ? t.to ? /* @__PURE__ */ e.createElement(e.Fragment, null, Tt(t.from), /* @__PURE__ */ e.createElement("span", { className: `${X}__separator` }, " – "), Tt(t.to)) : Tt(t.from) : T || "";
|
|
8136
8164
|
} else {
|
|
8137
|
-
let e =
|
|
8138
|
-
return e ?
|
|
8165
|
+
let e = J;
|
|
8166
|
+
return e ? Tt(e) : T || "";
|
|
8139
8167
|
}
|
|
8140
|
-
},
|
|
8168
|
+
}, Dt = () => Ct === void 0 ? B ? !J?.from : !J : !1, Ot = () => {
|
|
8141
8169
|
if (B) {
|
|
8142
|
-
let e =
|
|
8143
|
-
return !e?.from && t ? `${V.selectedStartDate}${
|
|
8170
|
+
let e = J, t = Ye.anchorDate;
|
|
8171
|
+
return !e?.from && t ? `${V.selectedStartDate}${Ni(Ei(t, Y), m, Y)}${V.pleaseSelectEndDate}` : e?.from ? e.to ? `${V.selectedDateRange}${Tt(e.from)}${V.to}${Tt(e.to)}` : `${V.selectedStartDate}${Tt(e.from)}${V.pleaseSelectEndDate}` : V.noDateRangeSelected || "";
|
|
8144
8172
|
} else {
|
|
8145
|
-
let e =
|
|
8146
|
-
return e ? `${V.selectedDate}${
|
|
8173
|
+
let e = J;
|
|
8174
|
+
return e ? `${V.selectedDate}${Tt(e)}` : V.noDateSelected || "";
|
|
8147
8175
|
}
|
|
8148
|
-
},
|
|
8149
|
-
...
|
|
8150
|
-
ref: B ?
|
|
8176
|
+
}, kt = B ? J : void 0, At = /* @__PURE__ */ e.createElement("div", {
|
|
8177
|
+
...rt,
|
|
8178
|
+
ref: B ? Je : void 0,
|
|
8151
8179
|
className: `${X}__calendar`
|
|
8152
|
-
}, /* @__PURE__ */ e.createElement("div", { className: `${X}__grids` },
|
|
8180
|
+
}, /* @__PURE__ */ e.createElement("div", { className: `${X}__grids` }, st.map((t, n) => /* @__PURE__ */ e.createElement("div", {
|
|
8153
8181
|
key: t,
|
|
8154
8182
|
className: `${X}__month`
|
|
8155
8183
|
}, /* @__PURE__ */ e.createElement("div", { className: `${X}__nav` }, n === 0 ? /* @__PURE__ */ e.createElement("button", {
|
|
8156
|
-
...
|
|
8157
|
-
ref:
|
|
8184
|
+
...dt,
|
|
8185
|
+
ref: lt,
|
|
8158
8186
|
"aria-label": V.previousMonthLabel,
|
|
8159
8187
|
className: `${X}__nav-button`,
|
|
8160
8188
|
type: "button"
|
|
@@ -8167,9 +8195,9 @@ var Qr = {
|
|
|
8167
8195
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
8168
8196
|
iconName: "angleLeft",
|
|
8169
8197
|
size: "m"
|
|
8170
|
-
})), /* @__PURE__ */ e.createElement("div", { className: `${X}__nav-title` },
|
|
8171
|
-
...
|
|
8172
|
-
ref:
|
|
8198
|
+
})), /* @__PURE__ */ e.createElement("div", { className: `${X}__nav-title` }, ct[n]), n === st.length - 1 ? /* @__PURE__ */ e.createElement("button", {
|
|
8199
|
+
...ft,
|
|
8200
|
+
ref: ut,
|
|
8173
8201
|
"aria-label": V.nextMonthLabel,
|
|
8174
8202
|
className: `${X}__nav-button`,
|
|
8175
8203
|
type: "button"
|
|
@@ -8182,71 +8210,71 @@ var Qr = {
|
|
|
8182
8210
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
8183
8211
|
iconName: "angleRight",
|
|
8184
8212
|
size: "m"
|
|
8185
|
-
}))), /* @__PURE__ */ e.createElement(
|
|
8213
|
+
}))), /* @__PURE__ */ e.createElement(zi, {
|
|
8186
8214
|
baseClass: X,
|
|
8187
8215
|
monthOffset: t,
|
|
8188
|
-
state:
|
|
8189
|
-
timeZone:
|
|
8190
|
-
})))), A && /* @__PURE__ */ e.createElement("div", { className: `${X}__time-section` }, B ? /* @__PURE__ */ e.createElement("div", { className: `${X}__time-fields` }, /* @__PURE__ */ e.createElement(
|
|
8191
|
-
anchorDate:
|
|
8216
|
+
state: Xe,
|
|
8217
|
+
timeZone: Y
|
|
8218
|
+
})))), A && /* @__PURE__ */ e.createElement("div", { className: `${X}__time-section` }, B ? /* @__PURE__ */ e.createElement("div", { className: `${X}__time-fields` }, /* @__PURE__ */ e.createElement(wi, {
|
|
8219
|
+
anchorDate: Ti(kt?.from, Y),
|
|
8192
8220
|
hourCycle: c,
|
|
8193
8221
|
id: `${l}-start-time`,
|
|
8194
8222
|
label: V.startTimeLabel || "",
|
|
8195
|
-
onChange:
|
|
8223
|
+
onChange: yt,
|
|
8196
8224
|
size: "s",
|
|
8197
|
-
timeZone:
|
|
8198
|
-
value:
|
|
8199
|
-
}), /* @__PURE__ */ e.createElement(
|
|
8200
|
-
anchorDate:
|
|
8225
|
+
timeZone: Y,
|
|
8226
|
+
value: he
|
|
8227
|
+
}), /* @__PURE__ */ e.createElement(wi, {
|
|
8228
|
+
anchorDate: Ti(kt?.to, Y),
|
|
8201
8229
|
hourCycle: c,
|
|
8202
8230
|
id: `${l}-end-time`,
|
|
8203
8231
|
label: V.endTimeLabel || "",
|
|
8204
|
-
onChange:
|
|
8232
|
+
onChange: bt,
|
|
8205
8233
|
size: "s",
|
|
8206
|
-
timeZone:
|
|
8207
|
-
value:
|
|
8208
|
-
})) :
|
|
8209
|
-
anchorDate:
|
|
8234
|
+
timeZone: Y,
|
|
8235
|
+
value: ve
|
|
8236
|
+
})) : J && /* @__PURE__ */ e.createElement("div", { className: `${X}__time-fields` }, /* @__PURE__ */ e.createElement(wi, {
|
|
8237
|
+
anchorDate: Ti(J, Y),
|
|
8210
8238
|
hourCycle: c,
|
|
8211
8239
|
id: `${l}-time`,
|
|
8212
8240
|
label: V.timeLabel || "",
|
|
8213
|
-
onChange:
|
|
8241
|
+
onChange: yt,
|
|
8214
8242
|
size: "s",
|
|
8215
|
-
timeZone:
|
|
8216
|
-
value:
|
|
8217
|
-
})), j && !H &&
|
|
8243
|
+
timeZone: Y,
|
|
8244
|
+
value: he
|
|
8245
|
+
})), j && !H && ke), s && /* @__PURE__ */ e.createElement("div", { className: `${X}__footer-note` }, s), /* @__PURE__ */ e.createElement("div", { className: `${X}__actions` }, M && /* @__PURE__ */ e.createElement(An, {
|
|
8218
8246
|
className: `${X}__action-button ${X}__action-button--today`,
|
|
8219
8247
|
label: V.todayButton,
|
|
8220
|
-
onClick:
|
|
8248
|
+
onClick: gt,
|
|
8221
8249
|
size: "xs",
|
|
8222
8250
|
type: "button",
|
|
8223
8251
|
variant: "secondary"
|
|
8224
8252
|
}), /* @__PURE__ */ e.createElement("div", { className: `${X}__actions-group` }, /* @__PURE__ */ e.createElement(An, {
|
|
8225
8253
|
className: `${X}__action-button ${X}__action-button--clear`,
|
|
8226
8254
|
label: V.clearButton,
|
|
8227
|
-
onClick:
|
|
8255
|
+
onClick: pt,
|
|
8228
8256
|
size: "xs",
|
|
8229
8257
|
type: "button",
|
|
8230
8258
|
variant: "secondary"
|
|
8231
8259
|
}), (B || A) && /* @__PURE__ */ e.createElement(An, {
|
|
8232
8260
|
className: `${X}__action-button ${X}__action-button--done`,
|
|
8233
8261
|
label: V.doneButton,
|
|
8234
|
-
onClick:
|
|
8262
|
+
onClick: ht,
|
|
8235
8263
|
size: "xs",
|
|
8236
8264
|
type: "button",
|
|
8237
8265
|
variant: "highlight"
|
|
8238
8266
|
}))));
|
|
8239
|
-
return /* @__PURE__ */ e.createElement(Oe, { locale:
|
|
8267
|
+
return /* @__PURE__ */ e.createElement(Oe, { locale: K }, /* @__PURE__ */ e.createElement("div", {
|
|
8240
8268
|
className: Z([
|
|
8241
8269
|
$.base,
|
|
8242
8270
|
X,
|
|
8243
|
-
ye,
|
|
8244
8271
|
Se,
|
|
8245
|
-
|
|
8272
|
+
we,
|
|
8246
8273
|
Ce,
|
|
8274
|
+
Te,
|
|
8247
8275
|
r ?? ""
|
|
8248
8276
|
]),
|
|
8249
|
-
style: u ?
|
|
8277
|
+
style: u ? be : null,
|
|
8250
8278
|
...ee
|
|
8251
8279
|
}, /* @__PURE__ */ e.createElement(un, {
|
|
8252
8280
|
disabled: o,
|
|
@@ -8256,67 +8284,67 @@ var Qr = {
|
|
|
8256
8284
|
showLabel: O,
|
|
8257
8285
|
tooltipText: P
|
|
8258
8286
|
}), /* @__PURE__ */ e.createElement("div", { className: `${X}__input-wrapper` }, /* @__PURE__ */ e.createElement("button", {
|
|
8259
|
-
ref:
|
|
8260
|
-
"aria-describedby":
|
|
8261
|
-
"aria-expanded":
|
|
8287
|
+
ref: Ve.setReference,
|
|
8288
|
+
"aria-describedby": De ? `${l}__message` : null,
|
|
8289
|
+
"aria-expanded": Re,
|
|
8262
8290
|
"aria-haspopup": "dialog",
|
|
8263
8291
|
"aria-invalid": L === "error" ? !0 : null,
|
|
8264
|
-
className: Z([`${X}__trigger`,
|
|
8292
|
+
className: Z([`${X}__trigger`, Re ? `${X}__trigger--open` : null]),
|
|
8265
8293
|
disabled: o,
|
|
8266
8294
|
type: "button",
|
|
8267
|
-
...
|
|
8295
|
+
...Pe()
|
|
8268
8296
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
8269
8297
|
className: `${X}__trigger-icon`,
|
|
8270
8298
|
iconName: "calendarDays"
|
|
8271
|
-
}), /* @__PURE__ */ e.createElement("span", { className: Z([`${X}__trigger-text`,
|
|
8299
|
+
}), /* @__PURE__ */ e.createElement("span", { className: Z([`${X}__trigger-text`, Dt() ? `${X}__trigger-text--placeholder` : null]) }, Et()))), De && /* @__PURE__ */ e.createElement(dn, {
|
|
8272
8300
|
hasValidationMessage: !!I,
|
|
8273
8301
|
id: l,
|
|
8274
|
-
message:
|
|
8302
|
+
message: De,
|
|
8275
8303
|
validationStatus: L
|
|
8276
|
-
}),
|
|
8277
|
-
ref:
|
|
8304
|
+
}), Fe && /* @__PURE__ */ e.createElement(C, null, /* @__PURE__ */ e.createElement("div", {
|
|
8305
|
+
ref: Ve.setFloating,
|
|
8278
8306
|
className: `${X}__popover`,
|
|
8279
8307
|
style: {
|
|
8280
|
-
...
|
|
8281
|
-
zIndex:
|
|
8308
|
+
...Me,
|
|
8309
|
+
zIndex: Ue
|
|
8282
8310
|
},
|
|
8283
|
-
...
|
|
8284
|
-
}, H && /* @__PURE__ */ e.createElement("div", { className: Z([`${X}__presets`,
|
|
8311
|
+
...Ne()
|
|
8312
|
+
}, H && /* @__PURE__ */ e.createElement("div", { className: Z([`${X}__presets`, le ? null : `${X}__presets--collapsed`]) }, /* @__PURE__ */ e.createElement("div", {
|
|
8285
8313
|
"aria-label": V.presetsGroupLabel,
|
|
8286
8314
|
className: `${X}__preset-list`,
|
|
8287
8315
|
role: "group"
|
|
8288
8316
|
}, E?.map((t) => /* @__PURE__ */ e.createElement("button", {
|
|
8289
8317
|
key: t.label,
|
|
8290
|
-
"aria-pressed":
|
|
8291
|
-
className: Z([`${X}__preset-item`,
|
|
8292
|
-
onClick: () =>
|
|
8318
|
+
"aria-pressed": ae === t.label,
|
|
8319
|
+
className: Z([`${X}__preset-item`, ae === t.label ? `${X}__preset-item--active` : null]),
|
|
8320
|
+
onClick: () => _t(t),
|
|
8293
8321
|
type: "button"
|
|
8294
8322
|
}, t.label)), t && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
|
|
8295
8323
|
"aria-hidden": "true",
|
|
8296
8324
|
className: `${X}__preset-divider`
|
|
8297
8325
|
}), /* @__PURE__ */ e.createElement("button", {
|
|
8298
|
-
"aria-pressed":
|
|
8299
|
-
className: Z([`${X}__preset-item`,
|
|
8326
|
+
"aria-pressed": pe,
|
|
8327
|
+
className: Z([`${X}__preset-item`, pe ? `${X}__preset-item--active` : null]),
|
|
8300
8328
|
onClick: () => {
|
|
8301
|
-
|
|
8329
|
+
oe(void 0), ce(!0);
|
|
8302
8330
|
},
|
|
8303
8331
|
type: "button"
|
|
8304
|
-
}, V.customPresetLabel, !
|
|
8332
|
+
}, V.customPresetLabel, !W && /* @__PURE__ */ e.createElement(Q, {
|
|
8305
8333
|
iconName: "angleRight",
|
|
8306
8334
|
size: "xs"
|
|
8307
|
-
})))), A && j &&
|
|
8335
|
+
})))), A && j && ke), /* @__PURE__ */ e.createElement("div", {
|
|
8308
8336
|
"aria-atomic": "true",
|
|
8309
8337
|
"aria-live": "polite",
|
|
8310
8338
|
className: "visually-hidden"
|
|
8311
|
-
},
|
|
8312
|
-
ref:
|
|
8313
|
-
className: `${X}__calendar-wrapper`,
|
|
8314
|
-
style: { flexBasis:
|
|
8339
|
+
}, Ot()), H ? ue && /* @__PURE__ */ e.createElement("div", {
|
|
8340
|
+
ref: fe,
|
|
8341
|
+
className: Z([`${X}__calendar-wrapper`, U && !le ? `${X}__calendar-wrapper--collapsed` : null]),
|
|
8342
|
+
style: U ? void 0 : { flexBasis: le ? de : 0 }
|
|
8315
8343
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
8316
8344
|
className: `${X}__calendar-wrapper-inner`,
|
|
8317
|
-
style: { width:
|
|
8318
|
-
},
|
|
8319
|
-
},
|
|
8345
|
+
style: U ? void 0 : { width: de }
|
|
8346
|
+
}, At)) : At))));
|
|
8347
|
+
}, Vi = o(({ accept: t, className: n, defaultValue: r, disabled: i = !1, fieldLabel: a, id: o, inputProps: s, inputWidth: c, inputWidthMin: l, labelStrings: u = {
|
|
8320
8348
|
chooseFile: "Choose file",
|
|
8321
8349
|
clearButton: "Clear selected file"
|
|
8322
8350
|
}, message: f, multiple: p = !1, onClear: m, onFileChange: h, required: g = !1, showFullPath: v, showLabel: y = !0, size: b = "s", tooltipText: x = null, validationMessage: S, validationStatus: C, ...w }, T) => {
|
|
@@ -8400,7 +8428,7 @@ var Qr = {
|
|
|
8400
8428
|
validationMessageHasDecorators: !1,
|
|
8401
8429
|
validationStatus: C
|
|
8402
8430
|
}));
|
|
8403
|
-
}),
|
|
8431
|
+
}), Hi = ({ children: t, className: n, ...r }) => {
|
|
8404
8432
|
let i = "pds-input-group", a = [t[0], t[1]], o = t[0].props.id ?? null, s = t[0].props.message ?? null, c = t[0].props.validationMessage ?? null, l = t[0].props.validationStatus ?? null, u = c || s, d = u ? `${i}--has-message` : null;
|
|
8405
8433
|
return /* @__PURE__ */ e.createElement("div", {
|
|
8406
8434
|
className: Z([
|
|
@@ -8417,7 +8445,7 @@ var Qr = {
|
|
|
8417
8445
|
validationMessageHasDecorators: !1,
|
|
8418
8446
|
validationStatus: l
|
|
8419
8447
|
}));
|
|
8420
|
-
},
|
|
8448
|
+
}, Ui = ({ className: t, defaultValue: n, disabled: r = !1, fieldsetProps: i, id: a, inputWidth: o, inputWidthMin: s, label: c, labelVariant: l, message: u, onBlur: d, onChange: f, onValueChange: p, options: m, required: h = !1, showLabel: g = !0, tooltipText: v = null, validationMessage: y, validationStatus: b, value: x, ...S }) => {
|
|
8421
8449
|
let C = "pds-radio-group", w = r ? $.disabled : null, T = h && !r ? $.required : null, E = b === "error" ? $.error : null, D = b === "success" ? $.success : null, O = x !== void 0, [k, A] = _(n === void 0 ? "" : n), j = y || u, M = (e) => {
|
|
8422
8450
|
O || A(e.target.value), f && f(e), p && p(e.target.value);
|
|
8423
8451
|
}, N = (e) => {
|
|
@@ -8467,7 +8495,7 @@ var Qr = {
|
|
|
8467
8495
|
message: j,
|
|
8468
8496
|
validationStatus: b
|
|
8469
8497
|
}));
|
|
8470
|
-
},
|
|
8498
|
+
}, Wi = o(({ checked: t, className: n, defaultChecked: r, disabled: i = !1, id: a, inputProps: o, inputWidth: s, inputWidthMin: c, label: l, message: u, offLabel: d = "Off", onChange: f, onLabel: p = "On", required: m = !1, showLabel: h = !0, showStatusLabel: g = !0, statusLabelPlacement: v = "right", switchPlacement: y = "right", ...b }, x) => {
|
|
8471
8499
|
let S = sn(s, c), C = "pds-switch", w = `${C}--${y}`, T = u ? `${C}--message` : null, E = i ? $.disabled : null, D = m && !i ? $.required : null, O = t !== void 0, [k, A] = _(!O && r ? r : !1), j = t || k ? p : d, M = (e) => {
|
|
8472
8500
|
O || A(e.target.checked), f && f(e);
|
|
8473
8501
|
}, N = g ? /* @__PURE__ */ e.createElement("span", {
|
|
@@ -8522,7 +8550,7 @@ var Qr = {
|
|
|
8522
8550
|
required: m,
|
|
8523
8551
|
showLabel: h
|
|
8524
8552
|
}), /* @__PURE__ */ e.createElement("div", { className: `${C}__content` }, I, F));
|
|
8525
|
-
}),
|
|
8553
|
+
}), Gi = ({ disabled: t, dropTargetDirection: n, focusedIndex: r, index: i, isDragging: a, isSortable: o, onDragEnd: s, onDragOver: c, onDragStart: l, onFocusInput: u, onKeyboardMove: f, onRemove: p, setFocusedIndex: m, tag: h, totalTags: _, translationStrings: v }) => {
|
|
8526
8554
|
let y = g(null), b = "pds-tags-input__tag";
|
|
8527
8555
|
d(() => {
|
|
8528
8556
|
r === i && y.current && y.current.focus();
|
|
@@ -8589,7 +8617,7 @@ var Qr = {
|
|
|
8589
8617
|
iconName: "xmark",
|
|
8590
8618
|
size: "xs"
|
|
8591
8619
|
})));
|
|
8592
|
-
},
|
|
8620
|
+
}, Ki = o(({ addMorePlaceholder: t = "Add another", className: n, disabled: r = !1, id: i, inputMinHeight: a, inputWidth: o, inputWidthMin: s, isSortable: c = !1, label: l, message: u, onChange: d, placeholder: f, required: p = !1, showLabel: m = !0, size: h = "s", tags: v, tooltipText: y = null, translationStrings: b = {
|
|
8593
8621
|
inputInstructions: "Type a tag name and press Enter to add. Press Backspace on empty input to remove last tag. Press left arrow on empty input to navigate to tags.",
|
|
8594
8622
|
tagAriaLabel: "tag {index} of {total}. Press Shift plus arrow keys to reorder, Delete to remove.",
|
|
8595
8623
|
tagAriaLabelSimple: "tag {index} of {total}. Press Delete to remove.",
|
|
@@ -8602,11 +8630,11 @@ var Qr = {
|
|
|
8602
8630
|
d(e);
|
|
8603
8631
|
}, te = (e) => {
|
|
8604
8632
|
I(e);
|
|
8605
|
-
},
|
|
8633
|
+
}, J = () => {
|
|
8606
8634
|
I(null), R(null), ee(null);
|
|
8607
|
-
},
|
|
8635
|
+
}, ne = (e, t) => {
|
|
8608
8636
|
F === null || F === e || (R(e), ee(t));
|
|
8609
|
-
},
|
|
8637
|
+
}, re = (e) => {
|
|
8610
8638
|
if (e.preventDefault(), F === null || L === null || z === null) return;
|
|
8611
8639
|
let t = v.findIndex((e) => e.id === F), n = v.findIndex((e) => e.id === L);
|
|
8612
8640
|
if (t === -1 || n === -1) return;
|
|
@@ -8615,10 +8643,10 @@ var Qr = {
|
|
|
8615
8643
|
}, ie = (e, t) => {
|
|
8616
8644
|
let n = [...v], [r] = n.splice(e, 1);
|
|
8617
8645
|
n.splice(t, 0, r), K(`${r.value} moved to position ${t + 1} of ${v.length}`), q(n);
|
|
8618
|
-
},
|
|
8646
|
+
}, Y = (e) => {
|
|
8619
8647
|
let t = v.find((t) => t.id === e);
|
|
8620
8648
|
q(v.filter((t) => t.id !== e)), t && K(`${t.value} removed`);
|
|
8621
|
-
},
|
|
8649
|
+
}, ae = () => {
|
|
8622
8650
|
V(null), setTimeout(() => {
|
|
8623
8651
|
W.current?.focus();
|
|
8624
8652
|
}, 0);
|
|
@@ -8668,26 +8696,26 @@ var Qr = {
|
|
|
8668
8696
|
"aria-label": b.tagsListLabel,
|
|
8669
8697
|
className: `${E}__tags`,
|
|
8670
8698
|
onDragOver: c ? (e) => e.preventDefault() : void 0,
|
|
8671
|
-
onDrop: c ?
|
|
8699
|
+
onDrop: c ? re : void 0,
|
|
8672
8700
|
role: "list"
|
|
8673
8701
|
}, v.map((t, n) => {
|
|
8674
8702
|
let i = null;
|
|
8675
8703
|
return F && F !== t.id && (L === t.id && z === "before" ? i = "before" : L === t.id && z === "after" && n === v.length - 1 ? i = "after" : n > 0 && L === v[n - 1].id && z === "after" && (i = "before")), /* @__PURE__ */ e.createElement("div", {
|
|
8676
8704
|
key: t.id,
|
|
8677
8705
|
role: "listitem"
|
|
8678
|
-
}, /* @__PURE__ */ e.createElement(
|
|
8706
|
+
}, /* @__PURE__ */ e.createElement(Gi, {
|
|
8679
8707
|
disabled: r,
|
|
8680
8708
|
dropTargetDirection: i,
|
|
8681
8709
|
focusedIndex: B,
|
|
8682
8710
|
index: n,
|
|
8683
8711
|
isDragging: F === t.id,
|
|
8684
8712
|
isSortable: c,
|
|
8685
|
-
onDragEnd:
|
|
8686
|
-
onDragOver:
|
|
8713
|
+
onDragEnd: J,
|
|
8714
|
+
onDragOver: ne,
|
|
8687
8715
|
onDragStart: te,
|
|
8688
|
-
onFocusInput:
|
|
8716
|
+
onFocusInput: ae,
|
|
8689
8717
|
onKeyboardMove: ie,
|
|
8690
|
-
onRemove:
|
|
8718
|
+
onRemove: Y,
|
|
8691
8719
|
setFocusedIndex: V,
|
|
8692
8720
|
tag: t,
|
|
8693
8721
|
totalTags: v.length,
|
|
@@ -8719,7 +8747,7 @@ var Qr = {
|
|
|
8719
8747
|
validationMessageHasDecorators: !1,
|
|
8720
8748
|
validationStatus: S
|
|
8721
8749
|
}));
|
|
8722
|
-
}),
|
|
8750
|
+
}), qi = o(({ className: t, counterMaxLength: n, defaultValue: r, disabled: i = !1, id: a, inputWidth: o, inputWidthMin: s, isResizable: c = !0, label: l, message: u, onBlur: d, onChange: f, onFocus: p, placeholder: m, readonly: h = !1, required: g = !1, rows: v = 5, showLabel: y, size: b = "s", textareaProps: x, tooltipText: S = null, translationStrings: C = {
|
|
8723
8751
|
clearButton: "Clear input text",
|
|
8724
8752
|
counterOverLimit: "Character limit exceeded by",
|
|
8725
8753
|
searchShortcut: "Press / to focus the search field",
|
|
@@ -8786,7 +8814,7 @@ var Qr = {
|
|
|
8786
8814
|
message: R,
|
|
8787
8815
|
validationStatus: T
|
|
8788
8816
|
}));
|
|
8789
|
-
}),
|
|
8817
|
+
}), Ji = () => /* @__PURE__ */ e.createElement("div", { className: "pds-text-input__url-prefix" }, "https://"), Yi = o(({ autoComplete: t, className: n, counterMaxLength: r, defaultValue: i, disabled: a = !1, hasClearButton: o = !1, hasSearchShortcut: s = !1, hasUrlPrefix: c = !1, id: l, inputProps: u, inputWidth: d, inputWidthMin: f, label: p, message: m, onBlur: h, onChange: g, onClear: v, onFocus: y, placeholder: b, readonly: x = !1, required: S = !1, searchIcon: C = "search", showLabel: w = !0, showVisibilityToggle: T = !1, size: E = "s", tooltipText: D = null, translationStrings: O = {
|
|
8790
8818
|
clearButton: "Clear input text",
|
|
8791
8819
|
counterOverLimit: "Character limit exceeded by",
|
|
8792
8820
|
searchShortcut: "Press / to focus the search field",
|
|
@@ -8796,10 +8824,10 @@ var Qr = {
|
|
|
8796
8824
|
}, type: k = "text", validationMessage: A, validationStatus: j, value: M, ...N }, P) => {
|
|
8797
8825
|
let F = sn(d, f), I = "pds-text-input", L = a ? $.disabled : null, R = S && !a ? $.required : null, z = j === "error" ? $.error : null, ee = j === "success" ? $.success : null, B = x ? $.readonly : null, V = E === "s" ? null : `${I}--${E}`, H = c && k === "url" ? `${I}--has-url-prefix` : null, U = null;
|
|
8798
8826
|
k === "search" && (U = "search"), k === "search" && C === "filter" && (U = "filter"), j === "error" && (U = "error"), j === "success" && (U = "success");
|
|
8799
|
-
let W = A || m, G = M !== void 0, [K, q] = _(i === void 0 ? "" : i), te = M || K,
|
|
8827
|
+
let W = A || m, G = M !== void 0, [K, q] = _(i === void 0 ? "" : i), te = M || K, J = s && k === "search" && !te, ne = (e) => {
|
|
8800
8828
|
x && e.preventDefault();
|
|
8801
|
-
},
|
|
8802
|
-
if (T &&
|
|
8829
|
+
}, re = (e) => {
|
|
8830
|
+
if (T && ae && oe(!1), c && k === "url") {
|
|
8803
8831
|
let t = cn(e.target.value), n = {
|
|
8804
8832
|
...e,
|
|
8805
8833
|
target: {
|
|
@@ -8820,16 +8848,16 @@ var Qr = {
|
|
|
8820
8848
|
};
|
|
8821
8849
|
G || q(t), g && g(n);
|
|
8822
8850
|
} else G || q(e.target.value), g && g(e);
|
|
8823
|
-
},
|
|
8851
|
+
}, Y = () => {
|
|
8824
8852
|
G || q(""), v && v();
|
|
8825
8853
|
let e = document.getElementById(l);
|
|
8826
8854
|
e && e.focus();
|
|
8827
|
-
}, [
|
|
8855
|
+
}, [ae, oe] = _(!1), se = () => {
|
|
8828
8856
|
oe((e) => !e);
|
|
8829
8857
|
let e = document.getElementById(l);
|
|
8830
8858
|
e && e.focus();
|
|
8831
8859
|
}, ce = k;
|
|
8832
|
-
return T && k === "password" && (ce =
|
|
8860
|
+
return T && k === "password" && (ce = ae ? "text" : "password"), /* @__PURE__ */ e.createElement("div", {
|
|
8833
8861
|
className: Z([
|
|
8834
8862
|
$.base,
|
|
8835
8863
|
I,
|
|
@@ -8854,11 +8882,11 @@ var Qr = {
|
|
|
8854
8882
|
}), T && k === "password" && /* @__PURE__ */ e.createElement("div", {
|
|
8855
8883
|
"aria-live": "polite",
|
|
8856
8884
|
className: "visually-hidden"
|
|
8857
|
-
}, `${O.visibilityStatus} ${
|
|
8885
|
+
}, `${O.visibilityStatus} ${ae ? "visible" : "hidden"}.`), /* @__PURE__ */ e.createElement("div", { className: Z([
|
|
8858
8886
|
`${I}__input-wrapper`,
|
|
8859
8887
|
c && k === "url" ? `${I}__input-wrapper--has-prefix` : null,
|
|
8860
|
-
|
|
8861
|
-
]) }, U && /* @__PURE__ */ e.createElement(pn, { variant: U }), c && k === "url" && /* @__PURE__ */ e.createElement(
|
|
8888
|
+
J ? `${I}__input-wrapper--has-search-shortcut` : null
|
|
8889
|
+
]) }, U && /* @__PURE__ */ e.createElement(pn, { variant: U }), c && k === "url" && /* @__PURE__ */ e.createElement(Ji, null), /* @__PURE__ */ e.createElement("input", {
|
|
8862
8890
|
ref: P,
|
|
8863
8891
|
"aria-describedby": W ? `${l}__message` : null,
|
|
8864
8892
|
"aria-invalid": j === "error" ? !0 : null,
|
|
@@ -8867,10 +8895,10 @@ var Qr = {
|
|
|
8867
8895
|
disabled: a,
|
|
8868
8896
|
id: l,
|
|
8869
8897
|
name: l,
|
|
8870
|
-
onBlur:
|
|
8898
|
+
onBlur: re,
|
|
8871
8899
|
onChange: ie,
|
|
8872
8900
|
onFocus: y,
|
|
8873
|
-
onMouseDown:
|
|
8901
|
+
onMouseDown: ne,
|
|
8874
8902
|
placeholder: b,
|
|
8875
8903
|
readOnly: x,
|
|
8876
8904
|
required: S,
|
|
@@ -8879,19 +8907,19 @@ var Qr = {
|
|
|
8879
8907
|
...u
|
|
8880
8908
|
}), o && te && /* @__PURE__ */ e.createElement(hn, {
|
|
8881
8909
|
clearLabel: O.clearButton,
|
|
8882
|
-
handleClearInput:
|
|
8910
|
+
handleClearInput: Y,
|
|
8883
8911
|
id: l
|
|
8884
8912
|
}), T && k === "password" && /* @__PURE__ */ e.createElement("button", {
|
|
8885
8913
|
"aria-controls": l,
|
|
8886
8914
|
className: `${I}__visibility-toggle`,
|
|
8887
8915
|
onClick: se,
|
|
8888
8916
|
onMouseDown: (e) => e.preventDefault(),
|
|
8889
|
-
title:
|
|
8917
|
+
title: ae ? O.visibilityToggleHide : O.visibilityToggleShow,
|
|
8890
8918
|
type: "button"
|
|
8891
8919
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
8892
|
-
iconName:
|
|
8920
|
+
iconName: ae ? "eyeSlash" : "eye",
|
|
8893
8921
|
size: "m"
|
|
8894
|
-
})),
|
|
8922
|
+
})), J && /* @__PURE__ */ e.createElement(mn, {
|
|
8895
8923
|
inputId: l,
|
|
8896
8924
|
shortcutLabel: O.searchShortcut
|
|
8897
8925
|
}), r && k !== "password" && /* @__PURE__ */ e.createElement(gn, {
|
|
@@ -8906,7 +8934,7 @@ var Qr = {
|
|
|
8906
8934
|
validationMessageHasDecorators: !1,
|
|
8907
8935
|
validationStatus: j
|
|
8908
8936
|
}));
|
|
8909
|
-
}),
|
|
8937
|
+
}), Xi = ({ className: t, linkContent: n, size: i = "s", ...a }) => {
|
|
8910
8938
|
let o = "pds-cta-link", c = i === "s" ? null : `${o}--${i}`, l = /* @__PURE__ */ e.createElement(Q, {
|
|
8911
8939
|
className: `${o}__icon`,
|
|
8912
8940
|
iconName: "arrowRight",
|
|
@@ -8920,7 +8948,7 @@ var Qr = {
|
|
|
8920
8948
|
]),
|
|
8921
8949
|
...a
|
|
8922
8950
|
}, u);
|
|
8923
|
-
},
|
|
8951
|
+
}, Zi = ({ children: t, className: n, fontSize: r, isLoading: i, newWindowText: a = "opens in a new window", url: o, ...s }) => {
|
|
8924
8952
|
let c = "pds-link-new-window", l = r ? `${c}--${r}` : null;
|
|
8925
8953
|
return i ? /* @__PURE__ */ e.createElement("span", {
|
|
8926
8954
|
"aria-hidden": "true",
|
|
@@ -8947,11 +8975,11 @@ var Qr = {
|
|
|
8947
8975
|
className: `${c}__icon`,
|
|
8948
8976
|
iconName: "externalLink"
|
|
8949
8977
|
}));
|
|
8950
|
-
},
|
|
8978
|
+
}, Qi = ({ className: t, destination: n = "main", text: r = "Skip to main content", ...i }) => /* @__PURE__ */ e.createElement("a", {
|
|
8951
8979
|
className: Z(["pds-skiplink", t]),
|
|
8952
8980
|
href: `#${n}`,
|
|
8953
8981
|
...i
|
|
8954
|
-
}, r),
|
|
8982
|
+
}, r), $i = ({ alt: t = "", className: n, height: r, srcFallback: i, srcWebp: a, width: o, ...s }) => {
|
|
8955
8983
|
let c = "pds-picture";
|
|
8956
8984
|
return /* @__PURE__ */ e.createElement("picture", { className: Z([c, n ?? ""]) }, /* @__PURE__ */ e.createElement("source", {
|
|
8957
8985
|
srcSet: a,
|
|
@@ -8964,7 +8992,7 @@ var Qr = {
|
|
|
8964
8992
|
width: o,
|
|
8965
8993
|
...s
|
|
8966
8994
|
}));
|
|
8967
|
-
},
|
|
8995
|
+
}, ea = ({ children: t, className: n, menuAriaLabel: r, menuItems: i, variant: a = "dropdown", ...o }) => {
|
|
8968
8996
|
let s = "pds-row-actions-menu", c = a === "dropdown" ? null : `${s}--${a}`, l = f(), u = g(null);
|
|
8969
8997
|
return /* @__PURE__ */ e.createElement("div", {
|
|
8970
8998
|
className: Z([
|
|
@@ -8991,7 +9019,7 @@ var Qr = {
|
|
|
8991
9019
|
size: "s",
|
|
8992
9020
|
variant: "subtle"
|
|
8993
9021
|
})));
|
|
8994
|
-
},
|
|
9022
|
+
}, ta = (e, t = {}) => {
|
|
8995
9023
|
let { getRemoveCriticalLabel: n = (e) => `Remove ${e.title}`, removeLabel: r = "Remove", renameLabel: i = "Rename" } = t, a = [];
|
|
8996
9024
|
return e.onRename && a.push({
|
|
8997
9025
|
callback: e.onRename,
|
|
@@ -9004,11 +9032,11 @@ var Qr = {
|
|
|
9004
9032
|
isCritical: !0,
|
|
9005
9033
|
label: r
|
|
9006
9034
|
}), a;
|
|
9007
|
-
},
|
|
9035
|
+
}, na = ({ text: t }) => /* @__PURE__ */ e.createElement("div", { className: "pds-bookmarks-empty-state" }, /* @__PURE__ */ e.createElement(Q, {
|
|
9008
9036
|
className: "pds-bookmarks-empty-state__icon",
|
|
9009
9037
|
iconName: "bookmark",
|
|
9010
9038
|
size: "2xl"
|
|
9011
|
-
}), /* @__PURE__ */ e.createElement("p", { className: "pds-bookmarks-empty-state__text" }, t)),
|
|
9039
|
+
}), /* @__PURE__ */ e.createElement("p", { className: "pds-bookmarks-empty-state__text" }, t)), ra = "Bookmark pages you visit often for quick access. Use the bookmark icon in the top bar to save your first one.", ia = ({ ariaLabel: t = "Bookmarks", bookmarks: n = [], className: r, createLabel: i = "Create", getMenuAriaLabel: a = (e) => `Actions for ${e.title}`, getRemoveCriticalLabel: o, heading: s = "Bookmarks", isBookmarked: c = !1, isMobileAccordion: l = !1, maxHeightValue: u, noResultsText: d = ra, onCreateBookmark: f, removeLabel: p, renameLabel: m, ...h }) => {
|
|
9012
9040
|
let g = "pds-bookmarks-menu", _ = Qt(), v = l && _, y = f && /* @__PURE__ */ e.createElement(An, {
|
|
9013
9041
|
displayType: "icon-start",
|
|
9014
9042
|
iconName: "plus",
|
|
@@ -9023,7 +9051,7 @@ var Qr = {
|
|
|
9023
9051
|
}, v ? /* @__PURE__ */ e.createElement(Rn, { label: /* @__PURE__ */ e.createElement("span", { className: `${g}__mobile-label` }, /* @__PURE__ */ e.createElement(Q, {
|
|
9024
9052
|
iconName: c ? "bookmarkSolid" : "bookmark",
|
|
9025
9053
|
size: "m"
|
|
9026
|
-
}), s) }, n.length === 0 ? /* @__PURE__ */ e.createElement(
|
|
9054
|
+
}), s) }, n.length === 0 ? /* @__PURE__ */ e.createElement(na, { text: d }) : /* @__PURE__ */ e.createElement("ul", {
|
|
9027
9055
|
className: `${g}__mobile-list`,
|
|
9028
9056
|
role: "menu"
|
|
9029
9057
|
}, n.map((t) => {
|
|
@@ -9031,9 +9059,9 @@ var Qr = {
|
|
|
9031
9059
|
return /* @__PURE__ */ e.createElement("li", {
|
|
9032
9060
|
key: t.id ?? t.title,
|
|
9033
9061
|
className: `${g}__mobile-item`
|
|
9034
|
-
}, /* @__PURE__ */ e.createElement(
|
|
9062
|
+
}, /* @__PURE__ */ e.createElement(ea, {
|
|
9035
9063
|
menuAriaLabel: a(t),
|
|
9036
|
-
menuItems:
|
|
9064
|
+
menuItems: ta(t, {
|
|
9037
9065
|
getRemoveCriticalLabel: o,
|
|
9038
9066
|
removeLabel: p,
|
|
9039
9067
|
renameLabel: m
|
|
@@ -9053,13 +9081,13 @@ var Qr = {
|
|
|
9053
9081
|
}, /* @__PURE__ */ e.createElement($n.Trigger, { "aria-label": t }, /* @__PURE__ */ e.createElement(Q, {
|
|
9054
9082
|
iconName: c ? "bookmarkSolid" : "bookmark",
|
|
9055
9083
|
size: "m"
|
|
9056
|
-
})), /* @__PURE__ */ e.createElement($n.Panel, { className: `${g}__panel` }, /* @__PURE__ */ e.createElement($n.Heading, { className: `${g}__header` }, s, y), n.length === 0 ? /* @__PURE__ */ e.createElement($n.Heading, { className: `${g}__empty` }, /* @__PURE__ */ e.createElement(
|
|
9084
|
+
})), /* @__PURE__ */ e.createElement($n.Panel, { className: `${g}__panel` }, /* @__PURE__ */ e.createElement($n.Heading, { className: `${g}__header` }, s, y), n.length === 0 ? /* @__PURE__ */ e.createElement($n.Heading, { className: `${g}__empty` }, /* @__PURE__ */ e.createElement(na, { text: d })) : n.map((t, n) => /* @__PURE__ */ e.createElement($n.ActionItem, {
|
|
9057
9085
|
key: t.id ?? t.title,
|
|
9058
9086
|
description: t.subtitle && /* @__PURE__ */ e.createElement("span", { title: t.subtitle }, t.subtitle),
|
|
9059
9087
|
index: n,
|
|
9060
9088
|
linkContent: t.linkContent,
|
|
9061
9089
|
menuAriaLabel: a(t),
|
|
9062
|
-
menuItems:
|
|
9090
|
+
menuItems: ta(t, {
|
|
9063
9091
|
getRemoveCriticalLabel: o,
|
|
9064
9092
|
removeLabel: p,
|
|
9065
9093
|
renameLabel: m
|
|
@@ -9068,7 +9096,7 @@ var Qr = {
|
|
|
9068
9096
|
className: `${g}__item-title`,
|
|
9069
9097
|
title: t.title
|
|
9070
9098
|
}, t.title))))));
|
|
9071
|
-
},
|
|
9099
|
+
}, aa = ({ ariaLabel: t = "Breadcrumb", className: n, crumbs: i, ...a }) => {
|
|
9072
9100
|
let o = "pds-breadcrumb", c = i.length, l = i.map((t, n) => {
|
|
9073
9101
|
if (n < c - 1) return /* @__PURE__ */ e.createElement("li", {
|
|
9074
9102
|
key: n,
|
|
@@ -9087,23 +9115,23 @@ var Qr = {
|
|
|
9087
9115
|
className: Z([o, n]),
|
|
9088
9116
|
...a
|
|
9089
9117
|
}, /* @__PURE__ */ e.createElement("ol", { className: `${o}__crumbs` }, l));
|
|
9090
|
-
},
|
|
9118
|
+
}, oa = (e) => {
|
|
9091
9119
|
if (!e) return null;
|
|
9092
9120
|
for (let t = 0; t < e.length; t++) {
|
|
9093
|
-
if (
|
|
9121
|
+
if (ca(e[t])) return typeof e[t].linkContent == "string" ? null : e[t].linkContent;
|
|
9094
9122
|
if (e[t].links) {
|
|
9095
|
-
let n =
|
|
9123
|
+
let n = oa(e[t].links);
|
|
9096
9124
|
if (n) return n;
|
|
9097
9125
|
}
|
|
9098
9126
|
}
|
|
9099
9127
|
return null;
|
|
9100
|
-
},
|
|
9101
|
-
if (
|
|
9128
|
+
}, sa = (e) => typeof e == "string" ? e : e.props.children, ca = (e) => e.isSeparator || e.isHeading || typeof e.linkContent == "string" ? !1 : !!(e.isActive || e.linkContent.props.className && e.linkContent.props.className.includes("pds-isActive")), la = (e) => {
|
|
9129
|
+
if (ca(e)) return !0;
|
|
9102
9130
|
if (e.links) {
|
|
9103
|
-
for (let t = 0; t < e.links.length; t++) if (
|
|
9131
|
+
for (let t = 0; t < e.links.length; t++) if (la(e.links[t])) return !0;
|
|
9104
9132
|
}
|
|
9105
9133
|
return !1;
|
|
9106
|
-
},
|
|
9134
|
+
}, ua = (e) => e.map((e) => `${ca(e)}${e.links ? `[${ua(e.links)}]` : ""}`).join("|"), da = (e) => {
|
|
9107
9135
|
if (s(e)) {
|
|
9108
9136
|
let t = e.type;
|
|
9109
9137
|
if (t === "a" || typeof t == "string" && t.toLowerCase() === "a" || (typeof t == "function" || typeof t == "object") && t?.displayName === "Link") return !0;
|
|
@@ -9111,14 +9139,14 @@ var Qr = {
|
|
|
9111
9139
|
return n.to !== void 0 || n.href !== void 0;
|
|
9112
9140
|
}
|
|
9113
9141
|
return !1;
|
|
9114
|
-
},
|
|
9142
|
+
}, fa = (e, t) => {
|
|
9115
9143
|
let n = null;
|
|
9116
9144
|
if (typeof e == "string" && t) {
|
|
9117
9145
|
let i = t ? t[0].linkContent : null;
|
|
9118
9146
|
s(i) && (n = r(i, { ...typeof e == "string" ? { children: e } : {} }));
|
|
9119
9147
|
} else n = e;
|
|
9120
9148
|
return n;
|
|
9121
|
-
},
|
|
9149
|
+
}, pa = (t, n, i, a) => {
|
|
9122
9150
|
let o = null;
|
|
9123
9151
|
if (typeof n == "string") {
|
|
9124
9152
|
let c = a ? [/* @__PURE__ */ e.createElement("span", {
|
|
@@ -9143,8 +9171,8 @@ var Qr = {
|
|
|
9143
9171
|
iconName: a,
|
|
9144
9172
|
size: "m"
|
|
9145
9173
|
})), /* @__PURE__ */ e.createElement("span", { className: `${t}__link-label` }, n.props.children))] })) : n), o;
|
|
9146
|
-
},
|
|
9147
|
-
let s = "pds-dropdown-menu", c =
|
|
9174
|
+
}, ma = ({ className: t, headingText: n, menuItems: i, selectTextFallback: a = "Navigate to...", ...o }) => {
|
|
9175
|
+
let s = "pds-dropdown-menu", c = oa(i), l = c ? c.props.children : a, u = /* @__PURE__ */ e.createElement(lr, { className: `pds-dropdown__selected-icon ${s}__active-icon` }), { activeIndex: d, floatingStyles: f, getFloatingProps: p, getItemProps: m, getReferenceProps: h, isMounted: g, listRef: _, refs: v, setIsOpen: y, transitionStyles: b } = Ln({
|
|
9148
9176
|
enableTypeahead: !0,
|
|
9149
9177
|
matchReferenceWidth: !0,
|
|
9150
9178
|
role: "menu"
|
|
@@ -9153,7 +9181,7 @@ var Qr = {
|
|
|
9153
9181
|
}, w = (e) => {
|
|
9154
9182
|
e.key === "Enter" && _.current[d]?.querySelector("a")?.click();
|
|
9155
9183
|
}, T = ({ item: e, level: t }) => {
|
|
9156
|
-
let n =
|
|
9184
|
+
let n = fa(e.linkContent, e.links);
|
|
9157
9185
|
return {
|
|
9158
9186
|
...e,
|
|
9159
9187
|
level: t,
|
|
@@ -9244,7 +9272,7 @@ var Qr = {
|
|
|
9244
9272
|
tabIndex: d === n ? 0 : -1,
|
|
9245
9273
|
...m({ onKeyDown: w })
|
|
9246
9274
|
}, t.linkContent, t.isActive === !0 && u)))));
|
|
9247
|
-
},
|
|
9275
|
+
}, ha = ({ ariaLabel: t, className: n, hasBorder: r = !1, hasMobileDropdown: i = !1, menuItems: a, ...o }) => {
|
|
9248
9276
|
let s = g(null), c = "pds-button-nav", l = r ? `${c}--bordered` : null, u = i ? `${c}--has-mobile-dropdown` : null;
|
|
9249
9277
|
d(() => {
|
|
9250
9278
|
let e = (e) => {
|
|
@@ -9263,9 +9291,9 @@ var Qr = {
|
|
|
9263
9291
|
return /* @__PURE__ */ e.createElement("li", { className: Z([r, t ? `${r}--active` : null]) }, n);
|
|
9264
9292
|
}, p = a.length > 0 ? /* @__PURE__ */ e.createElement("ul", { className: `${c}__menu` }, a.map((t, n) => /* @__PURE__ */ e.createElement(f, {
|
|
9265
9293
|
key: n,
|
|
9266
|
-
isActive:
|
|
9294
|
+
isActive: la(t),
|
|
9267
9295
|
linkContent: t.linkContent
|
|
9268
|
-
}))) : null, m = /* @__PURE__ */ e.createElement(
|
|
9296
|
+
}))) : null, m = /* @__PURE__ */ e.createElement(ma, {
|
|
9269
9297
|
className: `${c}__mobile`,
|
|
9270
9298
|
menuItems: a,
|
|
9271
9299
|
selectTextFallback: t
|
|
@@ -9281,7 +9309,7 @@ var Qr = {
|
|
|
9281
9309
|
]),
|
|
9282
9310
|
...o
|
|
9283
9311
|
}, p, i && m);
|
|
9284
|
-
},
|
|
9312
|
+
}, ga = ({ children: t, className: n, width: r = "standard", ...i }) => {
|
|
9285
9313
|
let a = "pds-container", o = r === "standard" ? null : `${a}--${r}`;
|
|
9286
9314
|
return /* @__PURE__ */ e.createElement("div", {
|
|
9287
9315
|
className: Z([
|
|
@@ -9291,7 +9319,7 @@ var Qr = {
|
|
|
9291
9319
|
]),
|
|
9292
9320
|
...i
|
|
9293
9321
|
}, t);
|
|
9294
|
-
},
|
|
9322
|
+
}, _a = (e) => e === "m" ? void 0 : { columnGap: e === "none" ? "0" : `var(--pds-spacing-${e})` }, va = ({ children: t, className: n, colorType: r = "default", containerWidth: i = "x-wide", hideBorder: a, inlinePadding: o, itemsCenterGap: s = "m", itemsLeftGap: c = "m", itemsRightGap: l = "m", translationStrings: u = {
|
|
9295
9323
|
closeMobileNav: "Close navigation area",
|
|
9296
9324
|
openMobileNav: "Open navigation area"
|
|
9297
9325
|
}, ...f }) => {
|
|
@@ -9347,7 +9375,7 @@ var Qr = {
|
|
|
9347
9375
|
n ?? ""
|
|
9348
9376
|
]),
|
|
9349
9377
|
...f
|
|
9350
|
-
}, h ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `${y}__bar-mobile` }, /* @__PURE__ */ e.createElement(
|
|
9378
|
+
}, h ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `${y}__bar-mobile` }, /* @__PURE__ */ e.createElement(ga, null, /* @__PURE__ */ e.createElement("div", { className: `${y}__inner-mobile` }, E, M && N))), /* @__PURE__ */ e.createElement(zn.Provider, { value: !0 }, /* @__PURE__ */ e.createElement(Ue, {
|
|
9351
9379
|
active: p,
|
|
9352
9380
|
focusTrapOptions: {
|
|
9353
9381
|
clickOutsideDeactivates: !0,
|
|
@@ -9357,11 +9385,11 @@ var Qr = {
|
|
|
9357
9385
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
9358
9386
|
className: Z([`${y}__mobile`, p ? `${y}__mobile--open` : null]),
|
|
9359
9387
|
inert: p ? void 0 : ""
|
|
9360
|
-
}, /* @__PURE__ */ e.createElement(
|
|
9388
|
+
}, /* @__PURE__ */ e.createElement(ga, null, /* @__PURE__ */ e.createElement("button", {
|
|
9361
9389
|
className: "visually-hidden",
|
|
9362
9390
|
onClick: C,
|
|
9363
9391
|
type: "button"
|
|
9364
|
-
}, u.closeMobileNav), D, O, k))))) : /* @__PURE__ */ e.createElement(
|
|
9392
|
+
}, u.closeMobileNav), D, O, k))))) : /* @__PURE__ */ e.createElement(ga, {
|
|
9365
9393
|
className: `${y}__inner`,
|
|
9366
9394
|
style: o ? { paddingInline: o } : void 0,
|
|
9367
9395
|
width: i
|
|
@@ -9370,22 +9398,22 @@ var Qr = {
|
|
|
9370
9398
|
className: `${y}__separator`
|
|
9371
9399
|
}), D && /* @__PURE__ */ e.createElement("div", {
|
|
9372
9400
|
className: `${y}__items-left`,
|
|
9373
|
-
style:
|
|
9401
|
+
style: _a(c)
|
|
9374
9402
|
}, D)), O && /* @__PURE__ */ e.createElement("div", {
|
|
9375
9403
|
className: `${y}__items-center`,
|
|
9376
|
-
style:
|
|
9404
|
+
style: _a(s)
|
|
9377
9405
|
}, O), k && /* @__PURE__ */ e.createElement("div", {
|
|
9378
9406
|
className: `${y}__items-right`,
|
|
9379
|
-
style:
|
|
9407
|
+
style: _a(l)
|
|
9380
9408
|
}, k)));
|
|
9381
|
-
},
|
|
9409
|
+
}, ya = ({ ariaLabel: t, className: n, hasMobileDropdown: i = !1, headingText: a, labels: o = {
|
|
9382
9410
|
submenu: "submenu",
|
|
9383
9411
|
toggle: "Toggle"
|
|
9384
9412
|
}, menuItems: c, mobileMenuSelectTextFallback: l = "Navigate to...", ...u }) => {
|
|
9385
9413
|
let f = "pds-side-nav", p = i ? `${f}--has-mobile-dropdown` : null, m = `${f}__item`, h = `${f}__menu`, [g, v] = _({});
|
|
9386
9414
|
d(() => {
|
|
9387
9415
|
v((e) => Object.keys(e).length ? {} : e);
|
|
9388
|
-
}, [
|
|
9416
|
+
}, [ua(c)]);
|
|
9389
9417
|
let y = (e, t) => t in g ? g[t] : e, b = (e, t) => {
|
|
9390
9418
|
v((n) => {
|
|
9391
9419
|
let r = t in n ? n[t] : e;
|
|
@@ -9395,7 +9423,7 @@ var Qr = {
|
|
|
9395
9423
|
};
|
|
9396
9424
|
});
|
|
9397
9425
|
}, x = (t, n) => {
|
|
9398
|
-
let { linkContent: i, links: a } = t, c =
|
|
9426
|
+
let { linkContent: i, links: a } = t, c = la(t), l = da(i), u = y(c, n);
|
|
9399
9427
|
return /* @__PURE__ */ e.createElement("li", {
|
|
9400
9428
|
key: n,
|
|
9401
9429
|
className: Z([
|
|
@@ -9408,7 +9436,7 @@ var Qr = {
|
|
|
9408
9436
|
`${f}__row`,
|
|
9409
9437
|
`${f}__row--expandable`,
|
|
9410
9438
|
`${m}-wrapper`
|
|
9411
|
-
]) },
|
|
9439
|
+
]) }, fa(i, a), /* @__PURE__ */ e.createElement("button", {
|
|
9412
9440
|
"aria-expanded": u,
|
|
9413
9441
|
className: Z([`${f}__toggle`, u ? `${f}__toggle--expanded` : null]),
|
|
9414
9442
|
onClick: () => b(c, n),
|
|
@@ -9416,7 +9444,7 @@ var Qr = {
|
|
|
9416
9444
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
9417
9445
|
iconName: "angleDown",
|
|
9418
9446
|
size: "m"
|
|
9419
|
-
}), /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, `${o.toggle} ${
|
|
9447
|
+
}), /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, `${o.toggle} ${sa(i)} ${o.submenu}`))), /* @__PURE__ */ e.createElement("ul", { className: Z([
|
|
9420
9448
|
h,
|
|
9421
9449
|
`${h}--second-level`,
|
|
9422
9450
|
u ? `${h}--expanded` : null
|
|
@@ -9425,9 +9453,9 @@ var Qr = {
|
|
|
9425
9453
|
className: Z([
|
|
9426
9454
|
m,
|
|
9427
9455
|
`${m}--second-level`,
|
|
9428
|
-
|
|
9456
|
+
la(t) ? `${m}--active` : null
|
|
9429
9457
|
])
|
|
9430
|
-
},
|
|
9458
|
+
}, fa(t.linkContent, t.links))))) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("button", {
|
|
9431
9459
|
"aria-expanded": u,
|
|
9432
9460
|
className: Z([
|
|
9433
9461
|
`${f}__row`,
|
|
@@ -9441,7 +9469,7 @@ var Qr = {
|
|
|
9441
9469
|
}, s(i) && i.type === "span" ? r(i, { className: Z([i.props.className, `${f}__toggle-content`]) }) : /* @__PURE__ */ e.createElement("span", { className: `${f}__toggle-content` }, i), /* @__PURE__ */ e.createElement(Q, {
|
|
9442
9470
|
iconName: "angleDown",
|
|
9443
9471
|
size: "m"
|
|
9444
|
-
}), /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, `${o.toggle} ${
|
|
9472
|
+
}), /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, `${o.toggle} ${sa(i)} ${o.submenu}`)), /* @__PURE__ */ e.createElement("ul", { className: Z([
|
|
9445
9473
|
h,
|
|
9446
9474
|
`${h}--second-level`,
|
|
9447
9475
|
u ? `${h}--expanded` : null
|
|
@@ -9450,10 +9478,10 @@ var Qr = {
|
|
|
9450
9478
|
className: Z([
|
|
9451
9479
|
m,
|
|
9452
9480
|
`${m}--second-level`,
|
|
9453
|
-
|
|
9481
|
+
la(t) ? `${m}--active` : null
|
|
9454
9482
|
])
|
|
9455
|
-
},
|
|
9456
|
-
}, S = /* @__PURE__ */ e.createElement(e.Fragment, null, a && /* @__PURE__ */ e.createElement("h2", { className: `${f}__heading` }, a), c.length > 0 && /* @__PURE__ */ e.createElement("ul", { className: `${f}__menu ${f}__menu--top-level` }, c.map((e, t) => x(e, t)))), C = /* @__PURE__ */ e.createElement(
|
|
9483
|
+
}, fa(t.linkContent, t.links))))) : i);
|
|
9484
|
+
}, S = /* @__PURE__ */ e.createElement(e.Fragment, null, a && /* @__PURE__ */ e.createElement("h2", { className: `${f}__heading` }, a), c.length > 0 && /* @__PURE__ */ e.createElement("ul", { className: `${f}__menu ${f}__menu--top-level` }, c.map((e, t) => x(e, t)))), C = /* @__PURE__ */ e.createElement(ma, {
|
|
9457
9485
|
className: `${f}__mobile`,
|
|
9458
9486
|
headingText: a,
|
|
9459
9487
|
menuItems: c,
|
|
@@ -9468,19 +9496,8 @@ var Qr = {
|
|
|
9468
9496
|
]),
|
|
9469
9497
|
...u
|
|
9470
9498
|
}, S, i && C);
|
|
9471
|
-
}, ya = () => {
|
|
9472
|
-
let e = typeof window < "u", t = (e) => e >= 1440 ? "xl" : e >= 1280 ? "lg" : e >= 768 ? "md" : "sm", [n, r] = _(e ? t(window.innerWidth) : "lg");
|
|
9473
|
-
return d(() => {
|
|
9474
|
-
if (!e) return;
|
|
9475
|
-
let n = () => {
|
|
9476
|
-
r(t(window.innerWidth));
|
|
9477
|
-
};
|
|
9478
|
-
return n(), window.addEventListener("resize", n), () => {
|
|
9479
|
-
window.removeEventListener("resize", n);
|
|
9480
|
-
};
|
|
9481
|
-
}, [e]), n;
|
|
9482
9499
|
}, ba = ({ icon: t, isActive: n, isExpanded: r, isSidebarCollapsed: i, labels: a, linkContent: o, links: s, onExpandSidebar: c, onToggleExpand: l }) => {
|
|
9483
|
-
let u = "pds-side-nav-global", f = `${u}__item`, p = `${u}__menu`, m = /* @__PURE__ */ e.createElement("div", { className: `${f}-wrapper` },
|
|
9500
|
+
let u = "pds-side-nav-global", f = `${u}__item`, p = `${u}__menu`, m = /* @__PURE__ */ e.createElement("div", { className: `${f}-wrapper` }, pa(u, o, s, t)), h = (t, n, i = !1) => /* @__PURE__ */ e.createElement("ul", { className: Z([
|
|
9484
9501
|
p,
|
|
9485
9502
|
`${p}--${n}`,
|
|
9486
9503
|
r ? `${p}--expanded` : null
|
|
@@ -9492,7 +9509,7 @@ var Qr = {
|
|
|
9492
9509
|
className: Z([
|
|
9493
9510
|
f,
|
|
9494
9511
|
`${f}--${n}`,
|
|
9495
|
-
|
|
9512
|
+
la(t) ? `${f}--active` : null
|
|
9496
9513
|
]),
|
|
9497
9514
|
role: i ? "menuitem" : void 0,
|
|
9498
9515
|
tabIndex: i ? b === r ? 0 : -1 : void 0,
|
|
@@ -9548,7 +9565,7 @@ var Qr = {
|
|
|
9548
9565
|
(S.current[e]?.querySelector("a"))?.click(), y(!1);
|
|
9549
9566
|
}, G = (e, t) => {
|
|
9550
9567
|
e.key === "Enter" && (e.preventDefault(), W(t));
|
|
9551
|
-
}, K =
|
|
9568
|
+
}, K = yi() === "sm", q = (e) => {
|
|
9552
9569
|
if (!(!i || !s) && e.nativeEvent.pointerType === "touch") {
|
|
9553
9570
|
if (K) {
|
|
9554
9571
|
e.preventDefault(), e.stopPropagation(), y(!0);
|
|
@@ -9561,7 +9578,7 @@ var Qr = {
|
|
|
9561
9578
|
className: `${u}__flyout`,
|
|
9562
9579
|
style: M,
|
|
9563
9580
|
...L({ onKeyDown: I })
|
|
9564
|
-
}, /* @__PURE__ */ e.createElement("div", { className: `${u}__flyout-heading` },
|
|
9581
|
+
}, /* @__PURE__ */ e.createElement("div", { className: `${u}__flyout-heading` }, sa(o)), h(s, "second-level-flyout", !0)));
|
|
9565
9582
|
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("li", {
|
|
9566
9583
|
ref: i ? F.setReference : null,
|
|
9567
9584
|
className: Z([
|
|
@@ -9575,7 +9592,7 @@ var Qr = {
|
|
|
9575
9592
|
onClick: q,
|
|
9576
9593
|
onKeyDown: U
|
|
9577
9594
|
})
|
|
9578
|
-
}, s ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `${f}-wrapper` },
|
|
9595
|
+
}, s ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `${f}-wrapper` }, pa(u, o, s, t), !i && /* @__PURE__ */ e.createElement("button", {
|
|
9579
9596
|
"aria-expanded": r,
|
|
9580
9597
|
className: Z([`${u}__toggle`, r ? `${u}__toggle--expanded` : null]),
|
|
9581
9598
|
onClick: l,
|
|
@@ -9583,9 +9600,9 @@ var Qr = {
|
|
|
9583
9600
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
9584
9601
|
iconName: "angleDown",
|
|
9585
9602
|
size: "m"
|
|
9586
|
-
}), /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, `${a.toggle} ${
|
|
9603
|
+
}), /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, `${a.toggle} ${sa(o)} ${a.submenu}`))), !i && h(s, "second-level")) : /* @__PURE__ */ e.createElement(e.Fragment, null, i ? /* @__PURE__ */ e.createElement(on, {
|
|
9587
9604
|
disableTapTrigger: !0,
|
|
9588
|
-
content:
|
|
9605
|
+
content: sa(o),
|
|
9589
9606
|
customTrigger: m,
|
|
9590
9607
|
offsetValue: {
|
|
9591
9608
|
mainAxis: 8,
|
|
@@ -9600,7 +9617,7 @@ var Qr = {
|
|
|
9600
9617
|
let c = "pds-side-nav-global", l = r ? `${c}--collapsed` : `${c}--expanded`, [u, f] = _({});
|
|
9601
9618
|
d(() => {
|
|
9602
9619
|
f((e) => Object.keys(e).length ? {} : e);
|
|
9603
|
-
}, [
|
|
9620
|
+
}, [ua(a)]);
|
|
9604
9621
|
let p = (e, t) => t in u ? u[t] : e, m = (e, t) => {
|
|
9605
9622
|
f((n) => {
|
|
9606
9623
|
let r = t in n ? n[t] : e;
|
|
@@ -9621,7 +9638,7 @@ var Qr = {
|
|
|
9621
9638
|
className: `${c}__section-label`,
|
|
9622
9639
|
role: "presentation"
|
|
9623
9640
|
}, t.label);
|
|
9624
|
-
let a =
|
|
9641
|
+
let a = la(t);
|
|
9625
9642
|
return /* @__PURE__ */ e.createElement(ba, {
|
|
9626
9643
|
key: n,
|
|
9627
9644
|
icon: t.icon,
|
|
@@ -9754,17 +9771,17 @@ var Qr = {
|
|
|
9754
9771
|
role: "listbox"
|
|
9755
9772
|
}), O = Vn("var(--pds-z-index-dropdown)"), k = (e) => {
|
|
9756
9773
|
e.preventDefault(), e.key === "Enter" && w.current[m].querySelector("a")?.click(), e.key === "Tab" && e.shiftKey && l && document.getElementById("links-filter").focus();
|
|
9757
|
-
}, A = (e, t) =>
|
|
9774
|
+
}, A = (e, t) => sa(e.linkContent).toLowerCase().includes(t.toLowerCase()), j = h(() => i.filter((e) => A(e, s)), [s, i]), M = (e) => {
|
|
9758
9775
|
c(e.target.value);
|
|
9759
9776
|
}, N = () => {
|
|
9760
9777
|
c("");
|
|
9761
9778
|
}, P = {
|
|
9762
9779
|
minWidth: "13rem",
|
|
9763
|
-
width: `${
|
|
9780
|
+
width: `${sa(i.reduce((e, t) => sa(e.linkContent).length > sa(t.linkContent).length ? e : t).linkContent).length + 2}ch`
|
|
9764
9781
|
}, F = /* @__PURE__ */ e.createElement(Q, {
|
|
9765
9782
|
className: `${u}__active-icon`,
|
|
9766
9783
|
iconName: "check"
|
|
9767
|
-
}), I = l && /* @__PURE__ */ e.createElement("div", { className: `${u}__filter` }, /* @__PURE__ */ e.createElement(
|
|
9784
|
+
}), I = l && /* @__PURE__ */ e.createElement("div", { className: `${u}__filter` }, /* @__PURE__ */ e.createElement(Yi, {
|
|
9768
9785
|
hasClearButton: !0,
|
|
9769
9786
|
autoComplete: "off",
|
|
9770
9787
|
id: "links-filter",
|
|
@@ -9820,7 +9837,7 @@ var Qr = {
|
|
|
9820
9837
|
return r.observe(e), () => r.disconnect();
|
|
9821
9838
|
}, [i]);
|
|
9822
9839
|
let u = ({ dropdownSettings: t, icon: n, isActive: i, linkContent: a, links: c, promoteActiveChildLink: l = !1 }) => {
|
|
9823
|
-
let u = `${o}__item`, d =
|
|
9840
|
+
let u = `${o}__item`, d = oa(c);
|
|
9824
9841
|
return /* @__PURE__ */ e.createElement("li", { className: Z([u, i ? `${u}--active` : null]) }, ((t, n) => {
|
|
9825
9842
|
let i = null;
|
|
9826
9843
|
return s(t) && (i = n ? r(t, Object.assign({}, t.props, { children: [/* @__PURE__ */ e.createElement("span", {
|
|
@@ -9846,7 +9863,7 @@ var Qr = {
|
|
|
9846
9863
|
key: n,
|
|
9847
9864
|
dropdownSettings: t.dropdownSettings,
|
|
9848
9865
|
icon: t.icon,
|
|
9849
|
-
isActive:
|
|
9866
|
+
isActive: la(t),
|
|
9850
9867
|
linkContent: t.linkContent,
|
|
9851
9868
|
links: t.links,
|
|
9852
9869
|
promoteActiveChildLink: t.promoteActiveChildLink
|
|
@@ -9974,7 +9991,7 @@ var Qr = {
|
|
|
9974
9991
|
t !== -1 && (f(!0), y.current = t);
|
|
9975
9992
|
}
|
|
9976
9993
|
}, M = (t, n, r) => {
|
|
9977
|
-
let a = Ea[t], o = `${l}--${a}-level`, u = `${c}--${a}-level`, d = t + 1, { isExpanded: f, itemIndex: p } = S(n,
|
|
9994
|
+
let a = Ea[t], o = `${l}--${a}-level`, u = `${c}--${a}-level`, d = t + 1, { isExpanded: f, itemIndex: p } = S(n, la(n));
|
|
9978
9995
|
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `${c}-wrapper` }, /* @__PURE__ */ e.createElement("button", {
|
|
9979
9996
|
"aria-expanded": f,
|
|
9980
9997
|
className: Z([`${s}__toggle`, f ? `${s}__toggle--expanded` : null]),
|
|
@@ -9984,7 +10001,7 @@ var Qr = {
|
|
|
9984
10001
|
iconName: "angleDown",
|
|
9985
10002
|
size: "xs",
|
|
9986
10003
|
verticalAlign: "-0.0625rem"
|
|
9987
|
-
}), /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, `${i.toggle} ${
|
|
10004
|
+
}), /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, `${i.toggle} ${sa(n.linkContent)} ${i.submenu}`)), fa(n.linkContent, n.links)), /* @__PURE__ */ e.createElement("ul", {
|
|
9988
10005
|
className: Z([
|
|
9989
10006
|
l,
|
|
9990
10007
|
o,
|
|
@@ -9992,7 +10009,7 @@ var Qr = {
|
|
|
9992
10009
|
]),
|
|
9993
10010
|
role: "group"
|
|
9994
10011
|
}, n.links.map((t, n) => {
|
|
9995
|
-
let r =
|
|
10012
|
+
let r = la(t), { isExpanded: i } = S(t, r);
|
|
9996
10013
|
return /* @__PURE__ */ e.createElement("li", {
|
|
9997
10014
|
key: `${n}-${a}`,
|
|
9998
10015
|
"aria-expanded": t.links ? i : void 0,
|
|
@@ -10007,7 +10024,7 @@ var Qr = {
|
|
|
10007
10024
|
}, t.links && d in Ea ? M(d, t, t.links) : t.linkContent);
|
|
10008
10025
|
})));
|
|
10009
10026
|
}, N = (t, n) => {
|
|
10010
|
-
let { linkContent: r, links: i } = t, a =
|
|
10027
|
+
let { linkContent: r, links: i } = t, a = la(t), { isExpanded: o } = S(t, a);
|
|
10011
10028
|
return /* @__PURE__ */ e.createElement("li", {
|
|
10012
10029
|
key: n,
|
|
10013
10030
|
"aria-expanded": i ? o : void 0,
|
|
@@ -10118,7 +10135,7 @@ var Qr = {
|
|
|
10118
10135
|
focusItemOnOpen: !1,
|
|
10119
10136
|
focusItemOnHover: !0
|
|
10120
10137
|
})
|
|
10121
|
-
]), { isMounted: te, styles:
|
|
10138
|
+
]), { isMounted: te, styles: J } = U(F, {
|
|
10122
10139
|
duration: {
|
|
10123
10140
|
open: 300,
|
|
10124
10141
|
close: 150
|
|
@@ -10126,7 +10143,7 @@ var Qr = {
|
|
|
10126
10143
|
initial: { opacity: 0 },
|
|
10127
10144
|
open: { opacity: 1 },
|
|
10128
10145
|
close: { opacity: 0 }
|
|
10129
|
-
}),
|
|
10146
|
+
}), ne = Vn("var(--pds-z-index-dropdown)"), re = /* @__PURE__ */ e.createElement(ui, {
|
|
10130
10147
|
hasUserFallback: !0,
|
|
10131
10148
|
className: `${k}__avatar`,
|
|
10132
10149
|
imageSrc: u,
|
|
@@ -10135,7 +10152,7 @@ var Qr = {
|
|
|
10135
10152
|
}), ie = /* @__PURE__ */ e.createElement("li", {
|
|
10136
10153
|
className: `${k}__user-details`,
|
|
10137
10154
|
role: "presentation"
|
|
10138
|
-
}, /* @__PURE__ */ e.createElement("div", { className: `${k}__user-name` }, d), /* @__PURE__ */ e.createElement("div", { className: `${k}__user-email` }, l)),
|
|
10155
|
+
}, /* @__PURE__ */ e.createElement("div", { className: `${k}__user-name` }, d), /* @__PURE__ */ e.createElement("div", { className: `${k}__user-email` }, l)), Y = o !== void 0 && typeof a == "function" ? /* @__PURE__ */ e.createElement("li", {
|
|
10139
10156
|
className: `${k}__theme-row`,
|
|
10140
10157
|
role: "presentation"
|
|
10141
10158
|
}, /* @__PURE__ */ e.createElement("span", { className: `${k}__theme-label` }, s), /* @__PURE__ */ e.createElement(ka, {
|
|
@@ -10150,13 +10167,13 @@ var Qr = {
|
|
|
10150
10167
|
let n = e.id ? e.id : `${T}-item-${t}`;
|
|
10151
10168
|
S.current.push(n), w.current.push(e);
|
|
10152
10169
|
});
|
|
10153
|
-
let
|
|
10170
|
+
let ae = (e) => {
|
|
10154
10171
|
let t = S.current.indexOf(e), n = w.current[t];
|
|
10155
10172
|
n.linkContent && !n.disabled && (W.current[t].querySelector("a").click(), y(!1)), n.callback && !n.disabled && (n.callback(), y(!1));
|
|
10156
10173
|
}, oe = (e) => {
|
|
10157
|
-
e.preventDefault(), e.key === "Enter" &&
|
|
10174
|
+
e.preventDefault(), e.key === "Enter" && ae(e.currentTarget.id);
|
|
10158
10175
|
}, se = (e) => {
|
|
10159
|
-
|
|
10176
|
+
ae(e.currentTarget.id);
|
|
10160
10177
|
}, ce = i.map((t, n) => {
|
|
10161
10178
|
let r = S.current[n], i = `${k}__item`, a = t.disabled ? `${i}--disabled` : null;
|
|
10162
10179
|
return /* @__PURE__ */ e.createElement("li", {
|
|
@@ -10192,31 +10209,31 @@ var Qr = {
|
|
|
10192
10209
|
iconName: t.iconName,
|
|
10193
10210
|
size: "m"
|
|
10194
10211
|
}));
|
|
10195
|
-
}), ue = /* @__PURE__ */ e.createElement("span", { className: `${k}__toggle-left` },
|
|
10212
|
+
}), ue = /* @__PURE__ */ e.createElement("span", { className: `${k}__toggle-left` }, re, d ?? l);
|
|
10196
10213
|
return /* @__PURE__ */ e.createElement("span", {
|
|
10197
10214
|
className: Z([k, n ?? ""]),
|
|
10198
10215
|
...p
|
|
10199
10216
|
}, x ? /* @__PURE__ */ e.createElement(Rn, { label: ue }, /* @__PURE__ */ e.createElement("ul", {
|
|
10200
10217
|
className: Z([j, `${j}--mobile`]),
|
|
10201
10218
|
role: "menu"
|
|
10202
|
-
}, ie, /* @__PURE__ */ e.createElement("li", { role: "separator" }),
|
|
10219
|
+
}, ie, /* @__PURE__ */ e.createElement("li", { role: "separator" }), Y, le)) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("button", {
|
|
10203
10220
|
ref: L.setReference,
|
|
10204
10221
|
"aria-label": t,
|
|
10205
10222
|
className: `${k}__trigger`,
|
|
10206
10223
|
type: "button",
|
|
10207
10224
|
...q()
|
|
10208
|
-
},
|
|
10225
|
+
}, re), te && /* @__PURE__ */ e.createElement(C, null, /* @__PURE__ */ e.createElement("div", {
|
|
10209
10226
|
ref: L.setFloating,
|
|
10210
10227
|
className: `${k}__dropdown`,
|
|
10211
10228
|
style: {
|
|
10212
10229
|
...I,
|
|
10213
|
-
zIndex:
|
|
10230
|
+
zIndex: ne
|
|
10214
10231
|
},
|
|
10215
10232
|
...G()
|
|
10216
|
-
}, /* @__PURE__ */ e.createElement("div", { style: { ...
|
|
10233
|
+
}, /* @__PURE__ */ e.createElement("div", { style: { ...J } }, /* @__PURE__ */ e.createElement("ul", {
|
|
10217
10234
|
className: j,
|
|
10218
10235
|
role: "menu"
|
|
10219
|
-
}, ie, /* @__PURE__ */ e.createElement("li", { role: "separator" }),
|
|
10236
|
+
}, ie, /* @__PURE__ */ e.createElement("li", { role: "separator" }), Y, ce))))));
|
|
10220
10237
|
}, ja = ({ avatarSize: t = "m", className: n, showActiveState: r = !0, workspace: i, ...a }) => {
|
|
10221
10238
|
let o = "pds-workspace-list-item";
|
|
10222
10239
|
return /* @__PURE__ */ e.createElement("div", {
|
|
@@ -10328,7 +10345,7 @@ var Qr = {
|
|
|
10328
10345
|
return /* @__PURE__ */ e.createElement("span", {
|
|
10329
10346
|
className: Z([T, n]),
|
|
10330
10347
|
...d
|
|
10331
|
-
}, w ? /* @__PURE__ */ e.createElement(Rn, { label: K() }, x && /* @__PURE__ */ e.createElement("div", { className: `${T}__filter` }, /* @__PURE__ */ e.createElement(
|
|
10348
|
+
}, w ? /* @__PURE__ */ e.createElement(Rn, { label: K() }, x && /* @__PURE__ */ e.createElement("div", { className: `${T}__filter` }, /* @__PURE__ */ e.createElement(Yi, {
|
|
10332
10349
|
hasClearButton: !0,
|
|
10333
10350
|
id: "workspace-filter-mobile",
|
|
10334
10351
|
label: i,
|
|
@@ -10369,7 +10386,7 @@ var Qr = {
|
|
|
10369
10386
|
zIndex: R
|
|
10370
10387
|
},
|
|
10371
10388
|
...A()
|
|
10372
|
-
}, x && /* @__PURE__ */ e.createElement("div", { className: `${T}__filter` }, /* @__PURE__ */ e.createElement(
|
|
10389
|
+
}, x && /* @__PURE__ */ e.createElement("div", { className: `${T}__filter` }, /* @__PURE__ */ e.createElement(Yi, {
|
|
10373
10390
|
hasClearButton: !0,
|
|
10374
10391
|
id: "workspace-filter",
|
|
10375
10392
|
label: i,
|
|
@@ -11179,7 +11196,7 @@ var Qr = {
|
|
|
11179
11196
|
className: "visually-hidden",
|
|
11180
11197
|
id: "pagination-compact",
|
|
11181
11198
|
level: r
|
|
11182
|
-
}, i), o.page && /* @__PURE__ */ e.createElement("span", { className: `${b}__count` }, o.page), c === "input" ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
11199
|
+
}, i), o.page && /* @__PURE__ */ e.createElement("span", { className: `${b}__count` }, o.page), c === "input" ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(Yi, {
|
|
11183
11200
|
className: C ? `${b}__page-input--error` : void 0,
|
|
11184
11201
|
id: p,
|
|
11185
11202
|
inputProps: {
|
|
@@ -11237,9 +11254,9 @@ var Qr = {
|
|
|
11237
11254
|
return /* @__PURE__ */ e.createElement("li", {
|
|
11238
11255
|
key: t.id ?? t.title,
|
|
11239
11256
|
className: g
|
|
11240
|
-
}, /* @__PURE__ */ e.createElement(
|
|
11257
|
+
}, /* @__PURE__ */ e.createElement(ea, {
|
|
11241
11258
|
menuAriaLabel: a(t),
|
|
11242
|
-
menuItems:
|
|
11259
|
+
menuItems: ta(t, {
|
|
11243
11260
|
getRemoveCriticalLabel: o,
|
|
11244
11261
|
removeLabel: f,
|
|
11245
11262
|
renameLabel: p
|
|
@@ -11267,7 +11284,7 @@ var Qr = {
|
|
|
11267
11284
|
heading: s,
|
|
11268
11285
|
icon: "bookmark",
|
|
11269
11286
|
...m
|
|
11270
|
-
}, c ? /* @__PURE__ */ e.createElement("ul", { className: `${h}__list ${h}__list--loading` }, _) : t.length === 0 ? /* @__PURE__ */ e.createElement(
|
|
11287
|
+
}, c ? /* @__PURE__ */ e.createElement("ul", { className: `${h}__list ${h}__list--loading` }, _) : t.length === 0 ? /* @__PURE__ */ e.createElement(na, { text: u }) : /* @__PURE__ */ e.createElement("ul", { className: `${h}__list` }, v), !c && y);
|
|
11271
11288
|
}, go = ({ children: t, className: n, id: r, isOpen: i = !1, showBorder: a = !0, summary: o, ...s }) => {
|
|
11272
11289
|
let [c, l] = _(i), u = f(), p = r ?? `expansion-panel-${u}`, m = "pds-expansion-panel", h = a ? null : `${m}--no-border`, v = g(null);
|
|
11273
11290
|
return d(() => {
|
|
@@ -11425,7 +11442,7 @@ var Qr = {
|
|
|
11425
11442
|
heading: o,
|
|
11426
11443
|
icon: "folders",
|
|
11427
11444
|
...u
|
|
11428
|
-
}, g && /* @__PURE__ */ e.createElement("div", { className: `${d}__filter` }, /* @__PURE__ */ e.createElement(
|
|
11445
|
+
}, g && /* @__PURE__ */ e.createElement("div", { className: `${d}__filter` }, /* @__PURE__ */ e.createElement(Yi, {
|
|
11429
11446
|
hasClearButton: !0,
|
|
11430
11447
|
id: "workspace-selector-panel-filter",
|
|
11431
11448
|
label: i,
|
|
@@ -11624,13 +11641,13 @@ var Qr = {
|
|
|
11624
11641
|
M(R),
|
|
11625
11642
|
N(R),
|
|
11626
11643
|
H(R)
|
|
11627
|
-
]), te = B.arrow?.x ?? 0,
|
|
11644
|
+
]), te = B.arrow?.x ?? 0, J = B.arrow?.y ?? 0, ne = te + ko / 2, re = J + Oo, { isMounted: ie } = U(R, {
|
|
11628
11645
|
initial: { transform: "scale(0)" },
|
|
11629
11646
|
common: ({ side: e }) => ({ transformOrigin: {
|
|
11630
|
-
top: `${
|
|
11631
|
-
bottom: `${
|
|
11632
|
-
left: `calc(100% + ${Oo}px) ${
|
|
11633
|
-
right: `-8px ${
|
|
11647
|
+
top: `${ne}px calc(100% + ${Oo}px)`,
|
|
11648
|
+
bottom: `${ne}px -8px`,
|
|
11649
|
+
left: `calc(100% + ${Oo}px) ${re}px`,
|
|
11650
|
+
right: `-8px ${re}px`
|
|
11634
11651
|
}[e] })
|
|
11635
11652
|
});
|
|
11636
11653
|
return /* @__PURE__ */ e.createElement("div", {
|
|
@@ -12014,14 +12031,14 @@ var Qo = 24, $o = { droppable: { strategy: Qe.Always } }, es = o(function({ chil
|
|
|
12014
12031
|
};
|
|
12015
12032
|
}
|
|
12016
12033
|
return it(e, t);
|
|
12017
|
-
}, [m]), W = b === "always" || b === "toggle" && (c ?? !1), { currentItems: G, expandItem: K, flatNodes: q, handleReorder: te, resetToSnapshot:
|
|
12034
|
+
}, [m]), W = b === "always" || b === "toggle" && (c ?? !1), { currentItems: G, expandItem: K, flatNodes: q, handleReorder: te, resetToSnapshot: J, sortableIds: ne, toggleExpand: re } = Yo({
|
|
12018
12035
|
defaultItems: a,
|
|
12019
12036
|
isDragEnabled: W,
|
|
12020
12037
|
items: f,
|
|
12021
12038
|
onReorder: v
|
|
12022
12039
|
});
|
|
12023
|
-
p(C, () => ({ resetToSnapshot:
|
|
12024
|
-
let ie = nt(tt($e, { activationConstraint: { distance: 5 } }), tt(Ze, { coordinateGetter: U })),
|
|
12040
|
+
p(C, () => ({ resetToSnapshot: J }), [J]);
|
|
12041
|
+
let ie = nt(tt($e, { activationConstraint: { distance: 5 } }), tt(Ze, { coordinateGetter: U })), Y = W ? `${w}--reorder-active` : null, ae = h(() => new Set(q.filter((e) => u(e.data)).map((e) => e.id)), [q, u]), oe = h(() => new Set(q.filter((e) => d(e.data)).map((e) => e.id)), [q, d]), se = l((e) => {
|
|
12025
12042
|
if (m === 0 || oe.has(String(e))) return !1;
|
|
12026
12043
|
let t = q.find((t) => t.id === e);
|
|
12027
12044
|
return !t || t.depth >= m ? !1 : t.hasChildren ? !t.isExpanded : !0;
|
|
@@ -12030,16 +12047,16 @@ var Qo = 24, $o = { droppable: { strategy: Qe.Always } }, es = o(function({ chil
|
|
|
12030
12047
|
m,
|
|
12031
12048
|
oe
|
|
12032
12049
|
]), ce = l((e) => j && se(j) ? null : ot(e), [se, j]), le = h(() => {
|
|
12033
|
-
if (!T || !j ||
|
|
12050
|
+
if (!T || !j || ae.size === 0 || T === j || se(j)) return /* @__PURE__ */ new Set();
|
|
12034
12051
|
let e = q.findIndex((e) => e.id === T), t = q.findIndex((e) => e.id === j);
|
|
12035
12052
|
if (e === -1 || t === -1) return /* @__PURE__ */ new Set();
|
|
12036
12053
|
let [n, r] = e < t ? [e + 1, t - 1] : [t + 1, e - 1];
|
|
12037
|
-
return new Set(q.slice(n, r + 1).filter((e) =>
|
|
12054
|
+
return new Set(q.slice(n, r + 1).filter((e) => ae.has(e.id)).map((e) => e.id));
|
|
12038
12055
|
}, [
|
|
12039
12056
|
T,
|
|
12040
12057
|
q,
|
|
12041
12058
|
se,
|
|
12042
|
-
|
|
12059
|
+
ae,
|
|
12043
12060
|
j
|
|
12044
12061
|
]).size > 0, ue = h(() => T ? q.find((e) => e.id === T) ?? null : null, [T, q]), de = h(() => T ? Ko(G, String(T)) ?? null : null, [T, G]), fe = h(() => {
|
|
12045
12062
|
let e = ue?.depth ?? 0;
|
|
@@ -12065,40 +12082,40 @@ var Qo = 24, $o = { droppable: { strategy: Qe.Always } }, es = o(function({ chil
|
|
|
12065
12082
|
fe
|
|
12066
12083
|
]), me = l((e) => {
|
|
12067
12084
|
let { active: t } = e, n = F.current === "keyboard", r = q.find((e) => e.id === t.id);
|
|
12068
|
-
E(t.id), D.current = t.id, k(n), A.current = n, I.current = r?.depth ?? 0, M(null), N.current = 0, P.current = 0, H.current = 0, V(0), ee.current = 0, z(0), r?.hasChildren && r?.isExpanded && (
|
|
12069
|
-
}, [q,
|
|
12085
|
+
E(t.id), D.current = t.id, k(n), A.current = n, I.current = r?.depth ?? 0, M(null), N.current = 0, P.current = 0, H.current = 0, V(0), ee.current = 0, z(0), r?.hasChildren && r?.isExpanded && (re(String(t.id)), L.current = String(t.id));
|
|
12086
|
+
}, [q, re]), he = l((e) => {
|
|
12070
12087
|
let t = et(e);
|
|
12071
|
-
if (!t.length || !D.current ||
|
|
12088
|
+
if (!t.length || !D.current || ae.size === 0) return t;
|
|
12072
12089
|
let n = q.findIndex((e) => e.id === D.current);
|
|
12073
12090
|
for (let e of t) {
|
|
12074
12091
|
let t = e.id;
|
|
12075
12092
|
if (t === D.current) return [e];
|
|
12076
12093
|
let r = q.findIndex((e) => e.id === t);
|
|
12077
12094
|
if (n === -1 || r === -1) return [e];
|
|
12078
|
-
if (
|
|
12095
|
+
if (ae.has(String(t))) {
|
|
12079
12096
|
if (n > r) continue;
|
|
12080
12097
|
let e = !oe.has(String(t)), i = m > 0 && H.current > 0;
|
|
12081
12098
|
if (!se(t) && (!e || !i)) continue;
|
|
12082
12099
|
}
|
|
12083
12100
|
let [i, a] = n < r ? [n + 1, r - 1] : [r + 1, n - 1];
|
|
12084
|
-
if (!q.slice(i, a + 1).some((e) =>
|
|
12101
|
+
if (!q.slice(i, a + 1).some((e) => ae.has(e.id))) return [e];
|
|
12085
12102
|
}
|
|
12086
12103
|
return [];
|
|
12087
12104
|
}, [
|
|
12088
12105
|
q,
|
|
12089
|
-
|
|
12106
|
+
ae,
|
|
12090
12107
|
oe
|
|
12091
12108
|
]), ge = l((e) => {
|
|
12092
12109
|
let t = e.over?.id ?? null, n = D.current;
|
|
12093
|
-
if (t && n && t !== n &&
|
|
12110
|
+
if (t && n && t !== n && ae.size > 0) {
|
|
12094
12111
|
let e = q.findIndex((e) => e.id === n), r = q.findIndex((e) => e.id === t);
|
|
12095
12112
|
if (e !== -1 && r !== -1) {
|
|
12096
12113
|
let [t, n] = e < r ? [e + 1, r] : [r, e - 1];
|
|
12097
|
-
if (q.slice(t, n + 1).some((e) =>
|
|
12114
|
+
if (q.slice(t, n + 1).some((e) => ae.has(e.id))) return;
|
|
12098
12115
|
}
|
|
12099
12116
|
}
|
|
12100
12117
|
M(t);
|
|
12101
|
-
}, [q,
|
|
12118
|
+
}, [q, ae]), _e = l((e) => {
|
|
12102
12119
|
let t = e.delta.x;
|
|
12103
12120
|
if (P.current = t, A.current || m === 0) return;
|
|
12104
12121
|
let n = Math.floor(t / Qo), r = H.current;
|
|
@@ -12122,7 +12139,7 @@ var Qo = 24, $o = { droppable: { strategy: Qe.Always } }, es = o(function({ chil
|
|
|
12122
12139
|
};
|
|
12123
12140
|
r.splice(o, 0, c);
|
|
12124
12141
|
let l = q.filter((e) => e.id !== t.id).map((e) => e.id), u = r.filter((e) => e.id !== t.id).map((e) => e.id);
|
|
12125
|
-
if (l.some((e, t) =>
|
|
12142
|
+
if (l.some((e, t) => ae.has(e) ? u.indexOf(e) !== t : !1)) return;
|
|
12126
12143
|
te(r), n > 0 && a && K(a);
|
|
12127
12144
|
return;
|
|
12128
12145
|
}
|
|
@@ -12147,18 +12164,18 @@ var Qo = 24, $o = { droppable: { strategy: Qe.Always } }, es = o(function({ chil
|
|
|
12147
12164
|
}, b = d[g], x = b && b.depth === _ - 1 && v === String(l) || o < u ? g + 1 : g;
|
|
12148
12165
|
d.splice(x, 0, y, ...h);
|
|
12149
12166
|
let S = new Set([String(t.id), ...h.map((e) => e.id)]);
|
|
12150
|
-
q.some((e, t) => !
|
|
12167
|
+
q.some((e, t) => !ae.has(e.id) || S.has(e.id) || e.id === v ? !1 : d.findIndex((t) => t.id === e.id) !== t) || (te(d), _ > 0 && v !== null && K(v));
|
|
12151
12168
|
}, [
|
|
12152
12169
|
K,
|
|
12153
12170
|
q,
|
|
12154
12171
|
te,
|
|
12155
12172
|
se,
|
|
12156
|
-
|
|
12173
|
+
ae,
|
|
12157
12174
|
m,
|
|
12158
12175
|
oe
|
|
12159
|
-
]),
|
|
12176
|
+
]), ye = l(() => {
|
|
12160
12177
|
E(null), D.current = null, k(!1), A.current = !1, M(null), P.current = 0, H.current = 0, V(0), ee.current = 0, z(0), L.current && (K(L.current), L.current = null);
|
|
12161
|
-
}, [K]),
|
|
12178
|
+
}, [K]), be = h(() => ({
|
|
12162
12179
|
onDragStart({ active: e }) {
|
|
12163
12180
|
let t = q.find((t) => t.id === e.id), n = Ko(G, String(e.id));
|
|
12164
12181
|
return `Picked up ${n ? o(n) : String(e.id)}. Current position: ${t ? q.indexOf(t) + 1 : "?"} of ${q.length} at depth ${t?.depth ?? 0}.`;
|
|
@@ -12185,27 +12202,27 @@ var Qo = 24, $o = { droppable: { strategy: Qe.Always } }, es = o(function({ chil
|
|
|
12185
12202
|
q,
|
|
12186
12203
|
o,
|
|
12187
12204
|
m
|
|
12188
|
-
]),
|
|
12205
|
+
]), xe = { columns: i }, X = t.map(n, (t) => s(t) && t.type === Jo ? e.cloneElement(t, xe) : t);
|
|
12189
12206
|
return /* @__PURE__ */ e.createElement(Ye, {
|
|
12190
12207
|
accessibility: {
|
|
12191
|
-
announcements:
|
|
12208
|
+
announcements: be,
|
|
12192
12209
|
...x ? { screenReaderInstructions: { draggable: x } } : {}
|
|
12193
12210
|
},
|
|
12194
12211
|
collisionDetection: he,
|
|
12195
12212
|
measuring: $o,
|
|
12196
|
-
onDragCancel:
|
|
12213
|
+
onDragCancel: ye,
|
|
12197
12214
|
onDragEnd: ve,
|
|
12198
12215
|
onDragMove: _e,
|
|
12199
12216
|
onDragOver: ge,
|
|
12200
12217
|
onDragStart: me,
|
|
12201
12218
|
sensors: ie
|
|
12202
12219
|
}, /* @__PURE__ */ e.createElement(rt, {
|
|
12203
|
-
items:
|
|
12220
|
+
items: ne,
|
|
12204
12221
|
strategy: ce
|
|
12205
12222
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
12206
12223
|
className: Z([
|
|
12207
12224
|
w,
|
|
12208
|
-
|
|
12225
|
+
Y,
|
|
12209
12226
|
r ?? ""
|
|
12210
12227
|
]),
|
|
12211
12228
|
onKeyDownCapture: () => {
|
|
@@ -12216,15 +12233,15 @@ var Qo = 24, $o = { droppable: { strategy: Qe.Always } }, es = o(function({ chil
|
|
|
12216
12233
|
},
|
|
12217
12234
|
role: "list",
|
|
12218
12235
|
...S
|
|
12219
|
-
},
|
|
12236
|
+
}, X, q.map((t) => {
|
|
12220
12237
|
let n = {
|
|
12221
12238
|
depth: t.depth,
|
|
12222
12239
|
hasChildren: t.hasChildren,
|
|
12223
12240
|
index: t.index,
|
|
12224
12241
|
isDragging: t.id === T,
|
|
12225
12242
|
isExpanded: t.isExpanded,
|
|
12226
|
-
isLocked:
|
|
12227
|
-
toggleExpand: () =>
|
|
12243
|
+
isLocked: ae.has(t.id),
|
|
12244
|
+
toggleExpand: () => re(t.id)
|
|
12228
12245
|
}, r = y(t.data, n), a = t.id === T, o = {
|
|
12229
12246
|
columns: i,
|
|
12230
12247
|
depth: t.depth,
|
|
@@ -12234,8 +12251,8 @@ var Qo = 24, $o = { droppable: { strategy: Qe.Always } }, es = o(function({ chil
|
|
|
12234
12251
|
isDropTarget: t.id === j && se(t.id),
|
|
12235
12252
|
isProjectedParent: t.id === pe && !oe.has(t.id),
|
|
12236
12253
|
isExpanded: t.isExpanded,
|
|
12237
|
-
...
|
|
12238
|
-
onToggleExpand: () =>
|
|
12254
|
+
...ae.has(t.id) ? { isLocked: !0 } : {},
|
|
12255
|
+
onToggleExpand: () => re(t.id),
|
|
12239
12256
|
...a && !O && m > 0 ? { projectedDepthDelta: fe - t.depth } : {}
|
|
12240
12257
|
};
|
|
12241
12258
|
return s(r) ? e.cloneElement(r, {
|
|
@@ -12677,41 +12694,41 @@ var ns = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12677
12694
|
onClick: () => u(f, p),
|
|
12678
12695
|
type: "button"
|
|
12679
12696
|
}, _) : /* @__PURE__ */ e.createElement("div", { className: v }, _));
|
|
12680
|
-
}), vs = ({ className: t, closeDetailPanelLabel: n = "Close detail panel", columns: r, currentPage: i, defaultSortKey: a, defaultSortOrder: o = "asc", density: s = "standard", detailPanelNav: c = !0, detailPanelTitle: l, detailPanelWidth: u, emptyState: p, emptyStateHeading: m = "No results found.", emptyStateMessage: v, footer: y, getDetailPanelPositionLabel: b = (e, t) => `${e} of ${t}`, getPageSizeLabel: x = (e) => `Show ${e} rows per page`, getRowClassName: S, getRowId: C, getRowSelectDisabledReason: w, getSelectRowLabel: T = (e, t) => `Select row ${t}`, getSortLabel: E = (e) => `Sort by ${e}`, hasDesktopDetailPanel: D = !1, hasMobileCards: O = !1, hasMobileDetailSheet: k = !0, hasPanel: A = !1, inspectedRowId: j, isLoading: M = !1, isRowSelectable: N = () => !0, itemsPerPage: P, loadingRowCount: F = 5, maxHeight: I, minHeight: L, nextDetailPanelRowLabel: R = "Next row", onDetailPanelNext: z, onDetailPanelPrev: ee, onPageChange: B, onPageSizeChange: V, onRowInspect: H, onRowSelectionChange: U, onSort: W, pageSizeOptions: G, pageSizeSelectLabel: K = "Rows per page", paginationLabels: q, prevDetailPanelRowLabel: te = "Previous row", renderDetailPanel:
|
|
12681
|
-
let le = "pds-table", ue = f(), de = f(), fe = g(null), pe =
|
|
12697
|
+
}), vs = ({ className: t, closeDetailPanelLabel: n = "Close detail panel", columns: r, currentPage: i, defaultSortKey: a, defaultSortOrder: o = "asc", density: s = "standard", detailPanelNav: c = !0, detailPanelTitle: l, detailPanelWidth: u, emptyState: p, emptyStateHeading: m = "No results found.", emptyStateMessage: v, footer: y, getDetailPanelPositionLabel: b = (e, t) => `${e} of ${t}`, getPageSizeLabel: x = (e) => `Show ${e} rows per page`, getRowClassName: S, getRowId: C, getRowSelectDisabledReason: w, getSelectRowLabel: T = (e, t) => `Select row ${t}`, getSortLabel: E = (e) => `Sort by ${e}`, hasDesktopDetailPanel: D = !1, hasMobileCards: O = !1, hasMobileDetailSheet: k = !0, hasPanel: A = !1, inspectedRowId: j, isLoading: M = !1, isRowSelectable: N = () => !0, itemsPerPage: P, loadingRowCount: F = 5, maxHeight: I, minHeight: L, nextDetailPanelRowLabel: R = "Next row", onDetailPanelNext: z, onDetailPanelPrev: ee, onPageChange: B, onPageSizeChange: V, onRowInspect: H, onRowSelectionChange: U, onSort: W, pageSizeOptions: G, pageSizeSelectLabel: K = "Rows per page", paginationLabels: q, prevDetailPanelRowLabel: te = "Previous row", renderDetailPanel: J, renderDetailPanelFooter: ne, rowData: re, selectAllLabel: ie = "Select all rows", selectedRows: Y, sortKey: ae, sortOrder: oe, totalItemCount: se, ...ce }) => {
|
|
12698
|
+
let le = "pds-table", ue = f(), de = f(), fe = g(null), pe = yi() === "sm" && O, me = A && !pe, he = h(() => r.some((e) => e.cardVisible) ? r.filter((e) => e.cardVisible) : r.slice(0, 1), [r]), ge = J !== void 0 || H === void 0 && k, _e = J !== void 0 || H !== void 0 || k, ve = W !== void 0, ye = B !== void 0, be = V !== void 0, xe = ye || P !== void 0 || G !== void 0, X = re.length > 0 || ye && (se ?? 0) > 0, [Se, Ce] = _({
|
|
12682
12699
|
key: a ?? "",
|
|
12683
12700
|
order: a === void 0 ? "asc" : o
|
|
12684
12701
|
}), we = h(() => {
|
|
12685
|
-
if (ve || Se.key === "") return
|
|
12702
|
+
if (ve || Se.key === "") return re;
|
|
12686
12703
|
let e = r.find((e) => e.id === Se.key)?.sortKey ?? Se.key;
|
|
12687
|
-
return [...
|
|
12704
|
+
return [...re].sort((t, n) => {
|
|
12688
12705
|
let r = String(t[e]).localeCompare(String(n[e]));
|
|
12689
12706
|
return Se.order === "asc" ? r : -r;
|
|
12690
12707
|
});
|
|
12691
12708
|
}, [
|
|
12692
|
-
|
|
12709
|
+
re,
|
|
12693
12710
|
Se,
|
|
12694
12711
|
ve,
|
|
12695
12712
|
r
|
|
12696
|
-
]), [Te, Ee] = _(1), [De, Oe] = _(P ?? G?.[0] ?? 10), [ke, Ae] = _(null), je = j ?? ke, Me = !!je && !!
|
|
12713
|
+
]), [Te, Ee] = _(1), [De, Oe] = _(P ?? G?.[0] ?? 10), [ke, Ae] = _(null), je = j ?? ke, Me = !!je && !!J && D && !pe, Ne = pe && ge && !!je, [Pe, Fe] = _(null);
|
|
12697
12714
|
d(() => {
|
|
12698
12715
|
je && Fe(je);
|
|
12699
12716
|
}, [je]);
|
|
12700
|
-
let Ie =
|
|
12701
|
-
|
|
12717
|
+
let Ie = ye ? P ?? 10 : De, Le = (e) => {
|
|
12718
|
+
be ? V(e) : Oe(e), ye || Ee(1);
|
|
12702
12719
|
};
|
|
12703
12720
|
d(() => {
|
|
12704
|
-
|
|
12705
|
-
}, [
|
|
12721
|
+
ye || Ee(1);
|
|
12722
|
+
}, [re.length, ye]), d(() => {
|
|
12706
12723
|
process.env.NODE_ENV !== "production" && i !== void 0 && !B && console.warn("[Table] `currentPage` was provided without `onPageChange`. Controlled pagination requires both props. The table is running in uncontrolled mode.");
|
|
12707
12724
|
}, []);
|
|
12708
|
-
let Re = U !== void 0, ze =
|
|
12725
|
+
let Re = U !== void 0, ze = Y !== void 0, [Be, Ve] = _(/* @__PURE__ */ new Set()), He = h(() => new Set(Y), [Y]), Ue = ze ? He : Be, We = h(() => new Map(re.map((e, t) => [e, t])), [re]), Ge = (e, t) => C ? C(e) : String(We.get(e) ?? t), Ke = h(() => we.findIndex((e, t) => (C ? C(e) : String(We.get(e) ?? t)) === je), [
|
|
12709
12726
|
we,
|
|
12710
12727
|
je,
|
|
12711
12728
|
C,
|
|
12712
12729
|
We
|
|
12713
12730
|
]), qe = Ke >= 0 ? we[Ke] : null, Je = hs((e, t) => {
|
|
12714
|
-
(pe ? ge :
|
|
12731
|
+
(pe ? ge : J !== void 0 && D) && j === void 0 && Ae(t), H?.(e, t);
|
|
12715
12732
|
}), Ye = () => {
|
|
12716
12733
|
j === void 0 && Ae(null);
|
|
12717
12734
|
}, Xe = () => {
|
|
@@ -12763,23 +12780,23 @@ var ns = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12763
12780
|
Me,
|
|
12764
12781
|
le
|
|
12765
12782
|
]);
|
|
12766
|
-
let it = ve ?
|
|
12783
|
+
let it = ve ? ae ?? "" : Se.key, at = ve ? oe ?? "asc" : Se.order, ot = h(() => {
|
|
12767
12784
|
if (M) return [];
|
|
12768
12785
|
let e = we;
|
|
12769
|
-
if (!
|
|
12786
|
+
if (!ye && xe && Ie) {
|
|
12770
12787
|
let t = (Te - 1) * Ie;
|
|
12771
12788
|
e = e.slice(t, t + Ie);
|
|
12772
12789
|
}
|
|
12773
12790
|
return e;
|
|
12774
12791
|
}, [
|
|
12775
12792
|
we,
|
|
12776
|
-
|
|
12777
|
-
|
|
12793
|
+
ye,
|
|
12794
|
+
xe,
|
|
12778
12795
|
Te,
|
|
12779
12796
|
Ie,
|
|
12780
12797
|
M
|
|
12781
12798
|
]), st = (e) => {
|
|
12782
|
-
ve ? W(e,
|
|
12799
|
+
ve ? W(e, ae === e && oe === "asc" ? "desc" : "asc") : Ce((t) => ({
|
|
12783
12800
|
key: e,
|
|
12784
12801
|
order: t.key === e && t.order === "asc" ? "desc" : "asc"
|
|
12785
12802
|
}));
|
|
@@ -12816,7 +12833,7 @@ var ns = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12816
12833
|
heading: m,
|
|
12817
12834
|
iconName: "emptySet",
|
|
12818
12835
|
message: v
|
|
12819
|
-
}))), _t = H !== void 0 &&
|
|
12836
|
+
}))), _t = H !== void 0 && J === void 0 || J !== void 0 && D, vt = (e, t, n) => {
|
|
12820
12837
|
let r = N(e, t), i = r ? void 0 : w?.(e, t), a = T(e, n + 1);
|
|
12821
12838
|
return {
|
|
12822
12839
|
disabledReason: i,
|
|
@@ -12915,7 +12932,7 @@ var ns = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12915
12932
|
})), /* @__PURE__ */ e.createElement("span", { className: Z([`${le}__sort-button-bottom`, lt(t.id, "bottom")]) }, /* @__PURE__ */ e.createElement(Q, {
|
|
12916
12933
|
iconName: "caretDown",
|
|
12917
12934
|
size: "m"
|
|
12918
|
-
})))) : /* @__PURE__ */ e.createElement("span", null, t.header))))), /* @__PURE__ */ e.createElement("tbody", null, M ? Array.from({ length: F }, (e, t) => ht(t)) : ot.length === 0 ? gt() : ot.map((e, t) => yt(e, t))))),
|
|
12935
|
+
})))) : /* @__PURE__ */ e.createElement("span", null, t.header))))), /* @__PURE__ */ e.createElement("tbody", null, M ? Array.from({ length: F }, (e, t) => ht(t)) : ot.length === 0 ? gt() : ot.map((e, t) => yt(e, t))))), xe && !M && X && /* @__PURE__ */ e.createElement("div", { className: Z(["pds-table-wrapper__pagination", pe && !(G && G.length > 0) ? "pds-table-wrapper__pagination--center" : null]) }, G && G.length > 0 && /* @__PURE__ */ e.createElement(Tr, {
|
|
12919
12936
|
autoWidth: !0,
|
|
12920
12937
|
id: ue,
|
|
12921
12938
|
label: K,
|
|
@@ -12928,17 +12945,17 @@ var ns = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12928
12945
|
size: "s",
|
|
12929
12946
|
value: String(Ie)
|
|
12930
12947
|
}), /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__pagination-controls" }, /* @__PURE__ */ e.createElement(uo, {
|
|
12931
|
-
currentPage:
|
|
12948
|
+
currentPage: ye ? i ?? 1 : Te,
|
|
12932
12949
|
itemsPerPage: Ie,
|
|
12933
12950
|
labelStrings: q,
|
|
12934
|
-
onPageChange:
|
|
12951
|
+
onPageChange: ye ? B : Ee,
|
|
12935
12952
|
pageControlType: pe ? "static" : "dropdown",
|
|
12936
|
-
totalItemCount:
|
|
12937
|
-
}))), y && /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__footer" }, y)),
|
|
12953
|
+
totalItemCount: ye ? se ?? 0 : re.length
|
|
12954
|
+
}))), y && /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__footer" }, y)), J && /* @__PURE__ */ e.createElement("div", { className: Z(["pds-table-wrapper__detail-panel", Me ? "pds-table-wrapper__detail-panel--open" : null]) }, /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__detail-panel-upper" }, /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__detail-panel-header" }, l && /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__detail-panel-title" }, l), /* @__PURE__ */ e.createElement(Fn, {
|
|
12938
12955
|
ariaLabel: n,
|
|
12939
12956
|
onClick: Ye,
|
|
12940
12957
|
size: "s"
|
|
12941
|
-
})), /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__detail-panel-content" }, Me && qe &&
|
|
12958
|
+
})), /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__detail-panel-content" }, Me && qe && J(qe, tt))), Me && qe && (ne || c) && /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__detail-panel-footer" }, ne ? ne(qe, tt) : /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__detail-panel-nav" }, /* @__PURE__ */ e.createElement(Nn, {
|
|
12942
12959
|
hasBorder: !0,
|
|
12943
12960
|
ariaLabel: te,
|
|
12944
12961
|
disabled: !tt.hasPrev,
|
|
@@ -12961,10 +12978,10 @@ var ns = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12961
12978
|
e || Ye();
|
|
12962
12979
|
},
|
|
12963
12980
|
title: l
|
|
12964
|
-
}, et && (
|
|
12981
|
+
}, et && (J ? J(et, nt) : bt(et)), et && (ne || c) && /* @__PURE__ */ e.createElement("div", {
|
|
12965
12982
|
className: `${le}-wrapper__mobile-sheet-nav`,
|
|
12966
12983
|
slot: "footer"
|
|
12967
|
-
},
|
|
12984
|
+
}, ne ? ne(et, nt) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(Nn, {
|
|
12968
12985
|
hasBorder: !0,
|
|
12969
12986
|
ariaLabel: te,
|
|
12970
12987
|
disabled: !nt.hasPrev,
|
|
@@ -13306,7 +13323,7 @@ var ns = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13306
13323
|
maxWidth: j ? void 0 : `${E}rem`,
|
|
13307
13324
|
minWidth: j ? `${w}rem` : `${D}rem`,
|
|
13308
13325
|
width: z
|
|
13309
|
-
}, B = g(!1), V =
|
|
13326
|
+
}, B = g(!1), V = yi(), H = V === "sm", U = () => {
|
|
13310
13327
|
if (!H) {
|
|
13311
13328
|
if (B.current = !1, x) {
|
|
13312
13329
|
x();
|
|
@@ -13344,14 +13361,14 @@ var ns = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13344
13361
|
r.disconnect(), i?.disconnect(), window.removeEventListener("resize", t);
|
|
13345
13362
|
};
|
|
13346
13363
|
}, [R]);
|
|
13347
|
-
let K = _t(t), q = K.__unslotted, te = K.header,
|
|
13364
|
+
let K = _t(t), q = K.__unslotted, te = K.header, J = K.footer, ne = K.sidebar, re = K.identity, ie = K["content-top"], Y = K.navigation, ae = K["content-bottom"], oe = re || ie || Y || ae, se = oe ? /* @__PURE__ */ e.createElement(e.Fragment, null, (re || o) && /* @__PURE__ */ e.createElement("div", { className: `${N}__sidebar-identity` }, re, o && !j && /* @__PURE__ */ e.createElement(Nn, {
|
|
13348
13365
|
hasBorder: !0,
|
|
13349
13366
|
ariaLabel: F.drawerToggle,
|
|
13350
13367
|
className: `${N}__drawer-toggle`,
|
|
13351
13368
|
iconName: "sidebar",
|
|
13352
13369
|
onClick: b,
|
|
13353
13370
|
size: "s"
|
|
13354
|
-
})), ie && /* @__PURE__ */ e.createElement("div", { className: `${N}__sidebar-content-top` }, ie),
|
|
13371
|
+
})), ie && /* @__PURE__ */ e.createElement("div", { className: `${N}__sidebar-content-top` }, ie), Y && /* @__PURE__ */ e.createElement("div", { className: `${N}__sidebar-navigation` }, Y), ae && /* @__PURE__ */ e.createElement("div", { className: `${N}__sidebar-content-bottom` }, ae)) : ne, ce = a(h, {
|
|
13355
13372
|
...y,
|
|
13356
13373
|
className: Z([`${N}__main`, y?.className]),
|
|
13357
13374
|
id: I,
|
|
@@ -13366,10 +13383,10 @@ var ns = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13366
13383
|
}, q)), le = /* @__PURE__ */ e.createElement("div", {
|
|
13367
13384
|
className: `${N}__content-column`,
|
|
13368
13385
|
style: { backgroundColor: p || void 0 }
|
|
13369
|
-
}, ce,
|
|
13386
|
+
}, ce, J && /* @__PURE__ */ e.createElement("div", { className: `${N}__footer` }, /* @__PURE__ */ e.createElement("div", {
|
|
13370
13387
|
className: `${N}__footer-inner`,
|
|
13371
13388
|
style: { maxWidth: L }
|
|
13372
|
-
},
|
|
13389
|
+
}, J))), ue = /* @__PURE__ */ e.createElement(e.Fragment, null, (ne || oe) && /* @__PURE__ */ e.createElement("div", {
|
|
13373
13390
|
...O,
|
|
13374
13391
|
className: Z([
|
|
13375
13392
|
`${N}__sidebar`,
|
|
@@ -13407,7 +13424,7 @@ var ns = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13407
13424
|
n ?? ""
|
|
13408
13425
|
]),
|
|
13409
13426
|
...A
|
|
13410
|
-
}, /* @__PURE__ */ e.createElement(
|
|
13427
|
+
}, /* @__PURE__ */ e.createElement(Qi, {
|
|
13411
13428
|
destination: I,
|
|
13412
13429
|
text: F.skipToContent
|
|
13413
13430
|
}), te ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `${N}__header` }, te), /* @__PURE__ */ e.createElement("div", { className: `${N}__body` }, ue)) : ue), o && /* @__PURE__ */ e.createElement(ro, {
|
|
@@ -13479,7 +13496,7 @@ var ns = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13479
13496
|
role: "listitem"
|
|
13480
13497
|
}, t))));
|
|
13481
13498
|
}, Bs = ({ children: t, className: n, formWidth: r = "standard", hasPanel: i = !1, ...a }) => {
|
|
13482
|
-
let o = _t(t), s = o.stepper, c = o.form, l = "pds-stepper-layout", u = r === "full" ? `${l}--full-width` : null, d = /* @__PURE__ */ e.createElement(
|
|
13499
|
+
let o = _t(t), s = o.stepper, c = o.form, l = "pds-stepper-layout", u = r === "full" ? `${l}--full-width` : null, d = /* @__PURE__ */ e.createElement(ga, {
|
|
13483
13500
|
className: Z([
|
|
13484
13501
|
l,
|
|
13485
13502
|
u,
|
|
@@ -13709,6 +13726,6 @@ var ns = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13709
13726
|
}, [e]), t;
|
|
13710
13727
|
};
|
|
13711
13728
|
//#endregion
|
|
13712
|
-
export { br as ActionCard, Is as AppLayout, Qs as AutoGrid, ui as Avatar, di as AvatarLabel, wt as Badge, Ia as Banner, Ur as BarChart,
|
|
13729
|
+
export { br as ActionCard, Is as AppLayout, Qs as AutoGrid, ui as Avatar, di as AvatarLabel, wt as Badge, Ia as Banner, Ur as BarChart, na as BookmarksEmptyState, ia as BookmarksMenu, ho as BookmarksPanel, to as BottomSheet, En as BranchDiff, aa as Breadcrumb, no as BulkActionBar, An as Button, jn as ButtonLink, ha as ButtonNav, Xi as CTALink, yr as Callout, xr as Card, Sr as CardSelect, pi as Checkbox, mi as CheckboxFieldset, hi as CheckboxGroup, Pn as ClipboardButton, Fn as CloseButton, $r as CodeBlock, gi as Combobox, vi as ComboboxMultiselect, Cr as CompactEmptyState, ti as ComparisonList, ga as Container, Bi as Datepicker, Ls as DocsLayout, ro as Drawer, $n as Dropdown, ma as DropdownMenu, go as ExpansionPanel, _o as ExpansionPanelGroup, vo as FeaturePanel, ai as FileDiff, Vi as FileUpload, ur as FilterButton, Us as FlexContainer, io as FullScreenOverlay, Zs as GlobalWrapper, $s as Grid, ec as GridItem, ri as HorizontalEmptyState, Q as Icon, Nn as IconButton, fi as IdentityBlock, Ra as InlineMessage, Hi as InputGroup, Gr as LineChart, Zi as LinkNewWindow, Va as MIN_AUTO_CLOSE_DURATION, Yn as MenuButton, ao as Modal, va as Navbar, co as Pagination, lo as PaginationChapter, uo as PaginationCompact, yo as Panel, bo as PanelList, xo as PanelRow, So as PanelStack, Do as PantheonLogo, si as PaymentIcon, $i as Picture, qr as PieChart, mr as PlatformIcon, Ao as Popover, Mo as ProgressBar, Po as ProgressRing, Yr as ProportionBar, Ui as RadioGroup, Lo as ResultCount, ea as RowActionsMenu, gr as SSOButton, Ba as SectionMessage, dr as SegmentedButton, Tr as Select, fr as SelectButton, wr as SelectOptionGroup, ya as SideNav, xa as SideNavGlobal, ba as SideNavGlobalItem, Rs as SidebarLayout, Bo as SiteFooter, Ca as SiteMenu, Vo as SiteOptionDisplay, Ho as SiteSearch, Jn as SiteTypeIcon, qn as SiteTypeLabel, zr as Skeleton, Qi as Skiplink, es as SortableList, Jo as SortableListHeader, ns as SortableRow, Cn as Spinner, pr as SplitButton, rs as StatPanel, zs as StatPanelGroup, wn as StatusBadge, as as StatusChecker, os as StatusIndicator, ls as StatusScrim, Hn as StatusTypeLabels, us as StepList, ds as Stepper, Bs as StepperLayout, Wi as Switch, Ta as TabMenu, vs as Table, Ts as TableOfContents, Es as Tabs, Ps as Tag, Ki as TagsInput, Tn as Tally, Yi as TextInput, qi as Textarea, Ks as ThemeContext, Ys as ThemeContextProvider, ka as ThemeSwitcher, Vs as ThreeItemLayout, wi as Timepicker, Ja as Toast, Ya as ToastType, Ga as Toaster, Ua as ToasterContext, on as Tooltip, Da as TreeNav, Hs as TwoItemLayout, Aa as UserMenu, Fs as UtilityBar, _r as UtilityButton, ii as VerticalEmptyState, ps as VerticalStepper, ni as VideoEmbed, fo as WidgetPanel, Ma as WorkspaceSelector, Co as WorkspaceSelectorPanel, ta as buildBookmarkMenuItems, Ii as getPresetDateRange, Js as getThemeInitScript, St as iconList, Wn as isHeadingItemType, Gn as isLinkItemType, Kn as isNodeItemType, Un as isSeparatorItemType, is as statusCheckerStates, Ds as tagColors, As as tagSolidColors, Os as tagSolidHueColors, ks as tagSolidStatusColors, yi as useBreakpoint, Mn as useClipboard, Ln as useDropdown, Qt as useIsMobile, tc as useKeyPress, rn as useKeyboardShortcut, an as useMediaQuery, Xs as useTheme, Xa as useToast, nc as useWindowWidth };
|
|
13713
13730
|
|
|
13714
13731
|
//# sourceMappingURL=index.js.map
|