@pantheon-systems/pds-toolkit-react 2.0.0-alpha.42 → 2.0.0-alpha.43
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/codemods/v1-to-v2/mappings.json +17 -12
- package/codemods/v1-to-v2/transforms/__testfixtures__/prop-value-standardization/basic.input.tsx +2 -1
- package/codemods/v1-to-v2/transforms/__testfixtures__/prop-value-standardization/basic.output.tsx +4 -3
- package/dist/components/icons/Icon/generated-icon-data.d.ts +1 -1
- package/dist/css/component-css/pds-index.css +4 -4
- package/dist/css/component-css/pds-side-nav-global.css +1 -1
- package/dist/css/component-css/pds-status-badge.css +1 -1
- package/dist/css/component-css/pds-utility-button.css +2 -2
- package/dist/css/pds-components.css +4 -4
- package/dist/index.css +1 -1
- package/dist/index.js +398 -380
- package/dist/index.js.map +1 -1
- package/dist/layouts/AppLayout/AppLayout.d.ts +6 -4
- package/dist/libs/types/navigation-types.d.ts +8 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import e, { Children as t, cloneElement as n, createContext as r, createElement as i, forwardRef as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useImperativeHandle as d, useLayoutEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
2
2
|
import g from "hash-sum";
|
|
3
3
|
import { FloatingArrow as _, FloatingFocusManager as v, FloatingOverlay as y, FloatingPortal as b, arrow as x, autoUpdate as S, flip as C, offset as w, safePolygon as T, shift as E, size as D, useClick as O, useDismiss as k, useFloating as A, useFocus as j, useHover as M, useId as N, useInteractions as P, useListNavigation as F, useRole as I, useTransitionStyles as L, useTypeahead as R } from "@floating-ui/react";
|
|
4
|
-
import { Bar as z, BarChart as B, CartesianGrid as V, Cell as H, Line as U, LineChart as
|
|
5
|
-
import { CodeBlock as
|
|
6
|
-
import { useCombobox as
|
|
4
|
+
import { Bar as z, BarChart as B, CartesianGrid as V, Cell as H, Line as U, LineChart as ee, Pie as W, PieChart as G, ReferenceLine as K, ResponsiveContainer as q, Tooltip as te, XAxis as ne, YAxis as re } from "recharts";
|
|
5
|
+
import { CodeBlock as ie } from "react-code-block";
|
|
6
|
+
import { useCombobox as ae, useMultipleSelection as J } from "downshift";
|
|
7
7
|
import { format as Y } from "date-fns";
|
|
8
8
|
import { DayPicker as oe } from "react-day-picker";
|
|
9
9
|
import { isSafari as X } from "react-device-detect";
|
|
@@ -3517,7 +3517,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
3517
3517
|
label: p.label,
|
|
3518
3518
|
size: H,
|
|
3519
3519
|
type: p.type
|
|
3520
|
-
})) : s,
|
|
3520
|
+
})) : s, ee = p ? /* @__PURE__ */ e.createElement("span", { className: `${A}__accordion-label` }, s, /* @__PURE__ */ e.createElement(Bt, {
|
|
3521
3521
|
className: `${A}__tally`,
|
|
3522
3522
|
label: p.label,
|
|
3523
3523
|
size: "s",
|
|
@@ -3559,18 +3559,18 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
3559
3559
|
...C({ onClick: I })
|
|
3560
3560
|
});
|
|
3561
3561
|
}
|
|
3562
|
-
let
|
|
3562
|
+
let W = i ? /* @__PURE__ */ e.createElement("span", { className: `${A}__icon-label` }, /* @__PURE__ */ e.createElement(Q, { iconName: r }), " ", s) : ee, G = T ? `${A}--expanded` : null;
|
|
3563
3563
|
return /* @__PURE__ */ e.createElement("span", {
|
|
3564
3564
|
className: Z([
|
|
3565
3565
|
A,
|
|
3566
|
-
|
|
3566
|
+
G,
|
|
3567
3567
|
t
|
|
3568
3568
|
]),
|
|
3569
3569
|
"data-testid": m,
|
|
3570
3570
|
...v
|
|
3571
3571
|
}, /* @__PURE__ */ e.createElement(dn, {
|
|
3572
3572
|
disabled: n,
|
|
3573
|
-
label:
|
|
3573
|
+
label: W
|
|
3574
3574
|
}, /* @__PURE__ */ e.createElement("ul", {
|
|
3575
3575
|
className: `${A}__mobile-menu`,
|
|
3576
3576
|
role: "menu"
|
|
@@ -4144,25 +4144,25 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4144
4144
|
}, message: d, onBlur: f, onFocus: p, onOptionSelect: m, options: g, required: _ = !1, showLabel: v = !0, size: y = "s", tooltipText: b = null, validationMessage: x, validationStatus: S, value: C, ...w }) => {
|
|
4145
4145
|
let T = St(s), E = "pds-select", D = t ? `${E}--auto-width` : null, O = y === "s" ? null : `${E}--${y}`, k = i ? $.disabled : null, A = _ && !i ? $.required : null, j = S === "error" ? $.error : null, M = S === "success" ? $.success : null, N = null;
|
|
4146
4146
|
S === "error" && (N = "error"), S === "success" && (N = "success");
|
|
4147
|
-
let P = x || d, F = C !== void 0, I = r !== void 0, L = ((e) => e.reduce((e, t) => Nt(t) ? [...e, ...t.options] : [...e, t], []))(g), R = (e) => L.findIndex((t) => t.value === e), z = F && R(C) >= 0 ? R(C) : null, B = I ? R(r) : null, [V, H] = h((z || B) ?? null), { activeIndex: U, floatingStyles:
|
|
4147
|
+
let P = x || d, F = C !== void 0, I = r !== void 0, L = ((e) => e.reduce((e, t) => Nt(t) ? [...e, ...t.options] : [...e, t], []))(g), R = (e) => L.findIndex((t) => t.value === e), z = F && R(C) >= 0 ? R(C) : null, B = I ? R(r) : null, [V, H] = h((z || B) ?? null), { activeIndex: U, floatingStyles: ee, getFloatingProps: W, getItemProps: G, getReferenceProps: K, isMounted: q, listRef: te, refs: ne, setIsOpen: re, transitionStyles: ie } = Qt({
|
|
4148
4148
|
enableClick: !i,
|
|
4149
4149
|
enableTypeahead: !0,
|
|
4150
4150
|
role: "listbox",
|
|
4151
4151
|
selectedIndex: V,
|
|
4152
4152
|
variant: "input"
|
|
4153
|
-
}),
|
|
4153
|
+
}), ae = V === null ? void 0 : L[V]?.label, J = V === null ? void 0 : L[V]?.icon, Y = V === null ? void 0 : L[V]?.value, oe = (e) => {
|
|
4154
4154
|
let t = L[e];
|
|
4155
|
-
F || (H(e),
|
|
4155
|
+
F || (H(e), re(!1)), m && m(t);
|
|
4156
4156
|
};
|
|
4157
4157
|
l(() => {
|
|
4158
|
-
F && (H(R(C)),
|
|
4158
|
+
F && (H(R(C)), re(!1));
|
|
4159
4159
|
}, [C]);
|
|
4160
4160
|
let X = () => {
|
|
4161
4161
|
f && f(Y);
|
|
4162
4162
|
}, se = () => {
|
|
4163
4163
|
p && p(Y);
|
|
4164
4164
|
}, ce = () => {
|
|
4165
|
-
|
|
4165
|
+
ne.reference.current.focus();
|
|
4166
4166
|
}, le = (t, n) => t === "google" || t === "microsoft" ? /* @__PURE__ */ e.createElement(Cn, {
|
|
4167
4167
|
className: n,
|
|
4168
4168
|
platformType: t,
|
|
@@ -4180,17 +4180,17 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4180
4180
|
return /* @__PURE__ */ e.createElement(Pt, {
|
|
4181
4181
|
key: r,
|
|
4182
4182
|
ref: (e) => {
|
|
4183
|
-
|
|
4183
|
+
te.current[r] = e;
|
|
4184
4184
|
},
|
|
4185
4185
|
"aria-disabled": t?.disabled,
|
|
4186
4186
|
"aria-selected": r === V && r === U,
|
|
4187
4187
|
tabIndex: r === U ? 0 : -1,
|
|
4188
|
-
...!t?.disabled &&
|
|
4188
|
+
...!t?.disabled && G({
|
|
4189
4189
|
onClick() {
|
|
4190
4190
|
oe(r);
|
|
4191
4191
|
},
|
|
4192
4192
|
onKeyDown(e) {
|
|
4193
|
-
e.key === "Enter" && (e.preventDefault(), oe(r),
|
|
4193
|
+
e.key === "Enter" && (e.preventDefault(), oe(r), ne.reference.current.focus()), e.key === "Escape" && (e.preventDefault(), ne.reference.current.focus());
|
|
4194
4194
|
}
|
|
4195
4195
|
})
|
|
4196
4196
|
}, /* @__PURE__ */ e.createElement("span", { className: `${E}__option-label` }, t.icon && le(t.icon, `${E}__option-icon`), t.label), V === r && /* @__PURE__ */ e.createElement(Nn, null));
|
|
@@ -4204,17 +4204,17 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4204
4204
|
return /* @__PURE__ */ e.createElement(Pt, {
|
|
4205
4205
|
key: r,
|
|
4206
4206
|
ref: (e) => {
|
|
4207
|
-
|
|
4207
|
+
te.current[r] = e;
|
|
4208
4208
|
},
|
|
4209
4209
|
"aria-disabled": t?.disabled,
|
|
4210
4210
|
"aria-selected": r === V && r === U,
|
|
4211
4211
|
tabIndex: r === U ? 0 : -1,
|
|
4212
|
-
...!t?.disabled &&
|
|
4212
|
+
...!t?.disabled && G({
|
|
4213
4213
|
onClick() {
|
|
4214
4214
|
oe(r);
|
|
4215
4215
|
},
|
|
4216
4216
|
onKeyDown(e) {
|
|
4217
|
-
e.key === "Enter" && (e.preventDefault(), oe(r),
|
|
4217
|
+
e.key === "Enter" && (e.preventDefault(), oe(r), ne.reference.current.focus()), e.key === "Escape" && (e.preventDefault(), ne.reference.current.focus());
|
|
4218
4218
|
}
|
|
4219
4219
|
})
|
|
4220
4220
|
}, /* @__PURE__ */ e.createElement("span", { className: `${E}__option-label` }, t.icon && le(t.icon, `${E}__option-icon`), t.label), V === r && /* @__PURE__ */ e.createElement(Nn, null));
|
|
@@ -4251,29 +4251,29 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4251
4251
|
showLabel: v,
|
|
4252
4252
|
tooltipText: b
|
|
4253
4253
|
}), /* @__PURE__ */ e.createElement("span", {
|
|
4254
|
-
ref:
|
|
4254
|
+
ref: ne.setReference,
|
|
4255
4255
|
"aria-autocomplete": "none",
|
|
4256
4256
|
"aria-labelledby": `${o}-label`,
|
|
4257
4257
|
className: `${E}__input-wrapper`,
|
|
4258
4258
|
id: o,
|
|
4259
4259
|
tabIndex: 0,
|
|
4260
|
-
...
|
|
4260
|
+
...K({
|
|
4261
4261
|
onClick: ce,
|
|
4262
4262
|
onBlur: X,
|
|
4263
4263
|
onFocus: se
|
|
4264
4264
|
})
|
|
4265
|
-
}, N && /* @__PURE__ */ e.createElement(Ot, { variant: N }), /* @__PURE__ */ e.createElement("span", { className: `${E}__input-inner` }, /* @__PURE__ */ e.createElement("span", { className: `${E}__option-text` }, (
|
|
4265
|
+
}, N && /* @__PURE__ */ e.createElement(Ot, { variant: N }), /* @__PURE__ */ e.createElement("span", { className: `${E}__input-inner` }, /* @__PURE__ */ e.createElement("span", { className: `${E}__option-text` }, (J || !ae && a) && le(J || a, `${E}__icon`), /* @__PURE__ */ e.createElement("span", { className: `${E}__option-label-text` }, ae ?? u.selectOptionText)), /* @__PURE__ */ e.createElement(Q, {
|
|
4266
4266
|
className: `${E}__trigger-icon`,
|
|
4267
4267
|
iconName: "angleDown"
|
|
4268
|
-
}))),
|
|
4269
|
-
ref:
|
|
4268
|
+
}))), q && /* @__PURE__ */ e.createElement("div", {
|
|
4269
|
+
ref: ne.setFloating,
|
|
4270
4270
|
className: `pds-dropdown__panel ${E}__dropdown`,
|
|
4271
4271
|
style: {
|
|
4272
|
-
...
|
|
4272
|
+
...ee,
|
|
4273
4273
|
zIndex: "var(--pds-z-index-dropdown)"
|
|
4274
4274
|
},
|
|
4275
|
-
...
|
|
4276
|
-
}, /* @__PURE__ */ e.createElement("div", { style: { ...
|
|
4275
|
+
...W()
|
|
4276
|
+
}, /* @__PURE__ */ e.createElement("div", { style: { ...ie } }, /* @__PURE__ */ e.createElement("ul", {
|
|
4277
4277
|
className: `${E}__options`,
|
|
4278
4278
|
role: "group"
|
|
4279
4279
|
}, ue(g)))), P && /* @__PURE__ */ e.createElement(Et, {
|
|
@@ -4605,7 +4605,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4605
4605
|
let t = Math.abs(e);
|
|
4606
4606
|
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);
|
|
4607
4607
|
}, $n = ({ barRadius: t = 2, chartHeight: n, chartWidth: r, className: i, colorPalette: a = "categorical", data: o = [], isLoading: c = !1, isThumbnail: u = !1, labelStrings: d = {}, layout: f = "horizontal", legendVariant: p = "inline", onTimePeriodChange: g, selectedTimePeriod: _, series: v = [], showAccessibleTable: y, showAxisLines: b, showGrid: x, showLegend: T, showTooltip: D, timePeriodOptions: O, tooltipContent: k, variant: j = "stacked", xAxisLabel: M, xAxisTickInterval: N, yAxisDomain: P, yAxisFormatter: F = Qn, yAxisLabel: I, yAxisTickInterval: R, ...H }) => {
|
|
4608
|
-
let { accessibleTableDescription: U = "Bar chart data", emptyStateHeading:
|
|
4608
|
+
let { accessibleTableDescription: U = "Bar chart data", emptyStateHeading: ee = "No data available", emptyStateMessage: W, legendTableHeader: G, loadingLabel: K = "Loading chart data" } = d, ie = m(null), ae = Ln(a, Un(ie, a)), J = n ?? (u ? 60 : 360), Y = r ?? (u ? 60 : void 0), oe = x ?? !u, X = b ?? !u, se = T ?? !u, ce = D ?? !u, le = y ?? !0, [ue, de] = h(null), fe = m(ue);
|
|
4609
4609
|
ue && (fe.current = ue);
|
|
4610
4610
|
let pe = m({ getBoundingClientRect: () => ({
|
|
4611
4611
|
bottom: 0,
|
|
@@ -4653,9 +4653,9 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4653
4653
|
de(null);
|
|
4654
4654
|
}, []);
|
|
4655
4655
|
if (c) return /* @__PURE__ */ e.createElement("div", {
|
|
4656
|
-
ref:
|
|
4656
|
+
ref: ie,
|
|
4657
4657
|
"aria-busy": "true",
|
|
4658
|
-
"aria-label":
|
|
4658
|
+
"aria-label": K,
|
|
4659
4659
|
className: Z([
|
|
4660
4660
|
be,
|
|
4661
4661
|
`${be}--loading`,
|
|
@@ -4664,25 +4664,25 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4664
4664
|
style: { maxWidth: Y },
|
|
4665
4665
|
...H
|
|
4666
4666
|
}, /* @__PURE__ */ e.createElement(Zn, {
|
|
4667
|
-
height:
|
|
4667
|
+
height: J,
|
|
4668
4668
|
legendVariant: p,
|
|
4669
4669
|
showLegend: se
|
|
4670
4670
|
}));
|
|
4671
4671
|
if (!o || o.length === 0) return /* @__PURE__ */ e.createElement("div", {
|
|
4672
|
-
ref:
|
|
4672
|
+
ref: ie,
|
|
4673
4673
|
className: Z([
|
|
4674
4674
|
be,
|
|
4675
4675
|
`${be}--empty`,
|
|
4676
4676
|
i ?? ""
|
|
4677
4677
|
]),
|
|
4678
4678
|
style: {
|
|
4679
|
-
height:
|
|
4679
|
+
height: J,
|
|
4680
4680
|
maxWidth: Y
|
|
4681
4681
|
},
|
|
4682
4682
|
...H
|
|
4683
4683
|
}, /* @__PURE__ */ e.createElement(Mn, {
|
|
4684
|
-
heading:
|
|
4685
|
-
message:
|
|
4684
|
+
heading: ee,
|
|
4685
|
+
message: W
|
|
4686
4686
|
}));
|
|
4687
4687
|
let we = f === "vertical", Te = (e) => j === "grouped" || j === "stacked" && e === v.length - 1 ? we ? [
|
|
4688
4688
|
0,
|
|
@@ -4696,7 +4696,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4696
4696
|
0
|
|
4697
4697
|
] : 0;
|
|
4698
4698
|
return /* @__PURE__ */ e.createElement("div", {
|
|
4699
|
-
ref:
|
|
4699
|
+
ref: ie,
|
|
4700
4700
|
className: Z([be, i ?? ""]),
|
|
4701
4701
|
style: Y ? { maxWidth: Y } : void 0,
|
|
4702
4702
|
...H
|
|
@@ -4715,8 +4715,8 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4715
4715
|
"aria-hidden": "true",
|
|
4716
4716
|
onMouseLeave: k ? void 0 : Ce,
|
|
4717
4717
|
onMouseMove: ce && !k ? Se : void 0
|
|
4718
|
-
}, /* @__PURE__ */ e.createElement(
|
|
4719
|
-
height:
|
|
4718
|
+
}, /* @__PURE__ */ e.createElement(q, {
|
|
4719
|
+
height: J,
|
|
4720
4720
|
width: "100%"
|
|
4721
4721
|
}, /* @__PURE__ */ e.createElement(B, {
|
|
4722
4722
|
barGap: 6,
|
|
@@ -4738,7 +4738,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4738
4738
|
stroke: "var(--pds-color-border-default)",
|
|
4739
4739
|
strokeDasharray: "3 3",
|
|
4740
4740
|
vertical: we
|
|
4741
|
-
}), /* @__PURE__ */ e.createElement(
|
|
4741
|
+
}), /* @__PURE__ */ e.createElement(ne, {
|
|
4742
4742
|
axisLine: X,
|
|
4743
4743
|
dataKey: we ? void 0 : "label",
|
|
4744
4744
|
hide: !X,
|
|
@@ -4754,7 +4754,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4754
4754
|
tickLine: !1,
|
|
4755
4755
|
tickMargin: 10,
|
|
4756
4756
|
type: we ? "number" : "category"
|
|
4757
|
-
}), /* @__PURE__ */ e.createElement(
|
|
4757
|
+
}), /* @__PURE__ */ e.createElement(re, {
|
|
4758
4758
|
axisLine: X,
|
|
4759
4759
|
dataKey: we ? "label" : void 0,
|
|
4760
4760
|
domain: P,
|
|
@@ -4772,7 +4772,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4772
4772
|
tickLine: !1,
|
|
4773
4773
|
tickMargin: 6,
|
|
4774
4774
|
type: we ? "category" : "number"
|
|
4775
|
-
}), ce && k && /* @__PURE__ */ e.createElement(
|
|
4775
|
+
}), ce && k && /* @__PURE__ */ e.createElement(te, {
|
|
4776
4776
|
content: (e) => !e.active || !e.payload?.length ? null : k({
|
|
4777
4777
|
entries: e.payload.map((e) => ({
|
|
4778
4778
|
color: String(e.color ?? ""),
|
|
@@ -4786,12 +4786,12 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4786
4786
|
}), v.map((t, n) => /* @__PURE__ */ e.createElement(z, {
|
|
4787
4787
|
key: t.dataKey,
|
|
4788
4788
|
dataKey: t.dataKey,
|
|
4789
|
-
fill: Vn(n,
|
|
4789
|
+
fill: Vn(n, ae, t.color, Rn(a, t.paletteIndex)),
|
|
4790
4790
|
name: t.label,
|
|
4791
4791
|
onMouseEnter: k ? void 0 : (e) => {
|
|
4792
4792
|
let r = e;
|
|
4793
4793
|
ce && r && de({
|
|
4794
|
-
color: Vn(n,
|
|
4794
|
+
color: Vn(n, ae, t.color, Rn(a, t.paletteIndex)),
|
|
4795
4795
|
label: String(r.label ?? ""),
|
|
4796
4796
|
name: t.label,
|
|
4797
4797
|
value: Number(r[t.dataKey] ?? 0)
|
|
@@ -4816,8 +4816,8 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4816
4816
|
}), /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-name" }, fe.current.name), /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-separator" }, ": "), /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-value" }, F(fe.current.value)))), se && /* @__PURE__ */ e.createElement(qn, {
|
|
4817
4817
|
data: o,
|
|
4818
4818
|
series: v,
|
|
4819
|
-
seriesColors:
|
|
4820
|
-
tableHeader:
|
|
4819
|
+
seriesColors: ae,
|
|
4820
|
+
tableHeader: G,
|
|
4821
4821
|
valueFormatter: F,
|
|
4822
4822
|
variant: p
|
|
4823
4823
|
}), le && /* @__PURE__ */ e.createElement(Kn, {
|
|
@@ -4832,7 +4832,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4832
4832
|
default: return;
|
|
4833
4833
|
}
|
|
4834
4834
|
}, tr = ({ 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: h, series: g = [], showAccessibleTable: _, showAxisLines: v, showDataPoints: y, showGrid: b, showLegend: x, showTooltip: S, timePeriodOptions: C, tooltipContent: w, xAxisLabel: T, xAxisTickInterval: E, yAxisDomain: D, yAxisFormatter: O = Qn, yAxisLabel: k, yAxisTickInterval: A, ...j }) => {
|
|
4835
|
-
let { accessibleTableDescription: M = "Line chart data", emptyStateHeading: N = "No data available", emptyStateMessage: P, legendTableHeader: F, loadingLabel: I = "Loading chart data" } = l, L = m(null), R = Ln(a, Un(L, a)), z = n ?? (c ? 60 : 360), B = r ?? (c ? 60 : void 0), H = b ?? !c,
|
|
4835
|
+
let { accessibleTableDescription: M = "Line chart data", emptyStateHeading: N = "No data available", emptyStateMessage: P, legendTableHeader: F, loadingLabel: I = "Loading chart data" } = l, L = m(null), R = Ln(a, Un(L, a)), z = n ?? (c ? 60 : 360), B = r ?? (c ? 60 : void 0), H = b ?? !c, W = v ?? !c, G = x ?? !c, ie = S ?? !c, ae = y ?? !c, J = _ ?? !0, Y = "pds-line-chart";
|
|
4836
4836
|
return s ? /* @__PURE__ */ e.createElement("div", {
|
|
4837
4837
|
ref: L,
|
|
4838
4838
|
"aria-busy": "true",
|
|
@@ -4847,7 +4847,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4847
4847
|
}, /* @__PURE__ */ e.createElement(Zn, {
|
|
4848
4848
|
height: z,
|
|
4849
4849
|
legendVariant: u,
|
|
4850
|
-
showLegend:
|
|
4850
|
+
showLegend: G
|
|
4851
4851
|
})) : !o || o.length === 0 ? /* @__PURE__ */ e.createElement("div", {
|
|
4852
4852
|
ref: L,
|
|
4853
4853
|
className: Z([
|
|
@@ -4879,10 +4879,10 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4879
4879
|
})),
|
|
4880
4880
|
showLabel: !1,
|
|
4881
4881
|
value: h
|
|
4882
|
-
})), /* @__PURE__ */ e.createElement("div", { "aria-hidden": "true" }, /* @__PURE__ */ e.createElement(
|
|
4882
|
+
})), /* @__PURE__ */ e.createElement("div", { "aria-hidden": "true" }, /* @__PURE__ */ e.createElement(q, {
|
|
4883
4883
|
height: z,
|
|
4884
4884
|
width: "100%"
|
|
4885
|
-
}, /* @__PURE__ */ e.createElement(
|
|
4885
|
+
}, /* @__PURE__ */ e.createElement(ee, {
|
|
4886
4886
|
data: o,
|
|
4887
4887
|
margin: c ? {
|
|
4888
4888
|
bottom: 0,
|
|
@@ -4898,37 +4898,37 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4898
4898
|
}, H && /* @__PURE__ */ e.createElement(V, {
|
|
4899
4899
|
stroke: "var(--pds-color-border-default)",
|
|
4900
4900
|
strokeDasharray: "3 3"
|
|
4901
|
-
}), /* @__PURE__ */ e.createElement(
|
|
4902
|
-
axisLine:
|
|
4901
|
+
}), /* @__PURE__ */ e.createElement(ne, {
|
|
4902
|
+
axisLine: W,
|
|
4903
4903
|
dataKey: "label",
|
|
4904
|
-
hide: !
|
|
4904
|
+
hide: !W,
|
|
4905
4905
|
interval: E,
|
|
4906
|
-
label: T &&
|
|
4906
|
+
label: T && W ? {
|
|
4907
4907
|
...Gn,
|
|
4908
4908
|
offset: -15,
|
|
4909
4909
|
position: "insideBottom",
|
|
4910
4910
|
value: T
|
|
4911
4911
|
} : void 0,
|
|
4912
|
-
tick:
|
|
4912
|
+
tick: W ? Wn : !1,
|
|
4913
4913
|
tickLine: !1,
|
|
4914
4914
|
tickMargin: 10
|
|
4915
|
-
}), /* @__PURE__ */ e.createElement(
|
|
4916
|
-
axisLine:
|
|
4915
|
+
}), /* @__PURE__ */ e.createElement(re, {
|
|
4916
|
+
axisLine: W,
|
|
4917
4917
|
domain: D,
|
|
4918
|
-
hide: !
|
|
4918
|
+
hide: !W,
|
|
4919
4919
|
interval: A,
|
|
4920
|
-
label: k &&
|
|
4920
|
+
label: k && W ? {
|
|
4921
4921
|
...Gn,
|
|
4922
4922
|
angle: -90,
|
|
4923
4923
|
dx: -44,
|
|
4924
4924
|
position: "center",
|
|
4925
4925
|
value: k
|
|
4926
4926
|
} : void 0,
|
|
4927
|
-
tick:
|
|
4927
|
+
tick: W ? Wn : !1,
|
|
4928
4928
|
tickFormatter: O,
|
|
4929
4929
|
tickLine: !1,
|
|
4930
4930
|
tickMargin: 6
|
|
4931
|
-
}),
|
|
4931
|
+
}), ie && /* @__PURE__ */ e.createElement(te, { content: (t) => {
|
|
4932
4932
|
if (!t.active || !t.payload?.length) return null;
|
|
4933
4933
|
let n = t.payload.map((e) => ({
|
|
4934
4934
|
color: String(e.color ?? ""),
|
|
@@ -4948,9 +4948,9 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4948
4948
|
}), t.name, /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-separator" }, " ", ":", " "), O(t.value))));
|
|
4949
4949
|
} }), g.map((t, n) => /* @__PURE__ */ e.createElement(U, {
|
|
4950
4950
|
key: t.dataKey,
|
|
4951
|
-
activeDot:
|
|
4951
|
+
activeDot: ae ? { r: 6 } : !1,
|
|
4952
4952
|
dataKey: t.dataKey,
|
|
4953
|
-
dot:
|
|
4953
|
+
dot: ae ? {
|
|
4954
4954
|
fill: Vn(n, R, t.color, Rn(a, t.paletteIndex)),
|
|
4955
4955
|
r: 4,
|
|
4956
4956
|
strokeWidth: 0
|
|
@@ -4962,7 +4962,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4962
4962
|
type: d === "straight" ? "linear" : "monotone"
|
|
4963
4963
|
})), !c && p?.map((t, n) => {
|
|
4964
4964
|
let r = t.color ?? "var(--pds-color-foreground-default-secondary)";
|
|
4965
|
-
return /* @__PURE__ */ e.createElement(
|
|
4965
|
+
return /* @__PURE__ */ e.createElement(K, {
|
|
4966
4966
|
key: `ref-y-${n}`,
|
|
4967
4967
|
label: ({ viewBox: n }) => {
|
|
4968
4968
|
let r = (n?.x ?? 0) + (n?.width ?? 0) / 2, i = (n?.y ?? 0) - 8;
|
|
@@ -4982,7 +4982,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4982
4982
|
});
|
|
4983
4983
|
}), !c && t?.map((t, n) => {
|
|
4984
4984
|
let r = t.color ?? "var(--pds-color-foreground-default-secondary)";
|
|
4985
|
-
return /* @__PURE__ */ e.createElement(
|
|
4985
|
+
return /* @__PURE__ */ e.createElement(K, {
|
|
4986
4986
|
key: `annotation-${n}`,
|
|
4987
4987
|
label: ({ viewBox: n }) => {
|
|
4988
4988
|
let r = (n?.x ?? 0) + (n?.width ?? 0) / 2, i = (n?.y ?? 0) - 8;
|
|
@@ -5000,14 +5000,14 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
5000
5000
|
strokeDasharray: er(t.strokeStyle ?? "dashed"),
|
|
5001
5001
|
x: t.atLabel
|
|
5002
5002
|
});
|
|
5003
|
-
})))),
|
|
5003
|
+
})))), G && /* @__PURE__ */ e.createElement(qn, {
|
|
5004
5004
|
data: o,
|
|
5005
5005
|
series: g,
|
|
5006
5006
|
seriesColors: R,
|
|
5007
5007
|
tableHeader: F,
|
|
5008
5008
|
valueFormatter: O,
|
|
5009
5009
|
variant: u
|
|
5010
|
-
}),
|
|
5010
|
+
}), J && /* @__PURE__ */ e.createElement(Kn, {
|
|
5011
5011
|
data: o,
|
|
5012
5012
|
description: M,
|
|
5013
5013
|
series: g,
|
|
@@ -5088,10 +5088,10 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
5088
5088
|
margin: "0 auto",
|
|
5089
5089
|
width: `min(100%, ${w}px)`
|
|
5090
5090
|
}
|
|
5091
|
-
}, /* @__PURE__ */ e.createElement(
|
|
5091
|
+
}, /* @__PURE__ */ e.createElement(q, {
|
|
5092
5092
|
height: w,
|
|
5093
5093
|
width: "100%"
|
|
5094
|
-
}, /* @__PURE__ */ e.createElement(
|
|
5094
|
+
}, /* @__PURE__ */ e.createElement(G, null, /* @__PURE__ */ e.createElement(W, {
|
|
5095
5095
|
cx: "50%",
|
|
5096
5096
|
cy: "50%",
|
|
5097
5097
|
data: A,
|
|
@@ -5103,7 +5103,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
5103
5103
|
}, a.map((t, n) => /* @__PURE__ */ e.createElement(H, {
|
|
5104
5104
|
key: t.label,
|
|
5105
5105
|
fill: k(n, t)
|
|
5106
|
-
}))), D && /* @__PURE__ */ e.createElement(
|
|
5106
|
+
}))), D && /* @__PURE__ */ e.createElement(te, {
|
|
5107
5107
|
content: (t) => {
|
|
5108
5108
|
if (!t.active || !t.payload?.length) return null;
|
|
5109
5109
|
let n = t.payload[0], r = Number(n.value ?? 0), i = O > 0 ? Math.round(r / O * 100) : 0, a = String(n.payload?.fill ?? "");
|
|
@@ -5148,7 +5148,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
5148
5148
|
width: 0,
|
|
5149
5149
|
x: 0,
|
|
5150
5150
|
y: 0
|
|
5151
|
-
}) }), { context: V, floatingStyles: H, refs: U, update:
|
|
5151
|
+
}) }), { context: V, floatingStyles: H, refs: U, update: ee } = A({
|
|
5152
5152
|
middleware: [
|
|
5153
5153
|
w(8),
|
|
5154
5154
|
C(),
|
|
@@ -5157,7 +5157,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
5157
5157
|
open: !!I,
|
|
5158
5158
|
placement: "top",
|
|
5159
5159
|
whileElementsMounted: S
|
|
5160
|
-
}), { isMounted:
|
|
5160
|
+
}), { isMounted: W, styles: G } = L(V, {
|
|
5161
5161
|
duration: {
|
|
5162
5162
|
close: 150,
|
|
5163
5163
|
open: 150
|
|
@@ -5167,7 +5167,7 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
5167
5167
|
l(() => {
|
|
5168
5168
|
U.setReference(B.current);
|
|
5169
5169
|
}, [U]);
|
|
5170
|
-
let
|
|
5170
|
+
let K = s((e) => {
|
|
5171
5171
|
B.current.getBoundingClientRect = () => ({
|
|
5172
5172
|
bottom: e.clientY,
|
|
5173
5173
|
height: 0,
|
|
@@ -5177,8 +5177,8 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
5177
5177
|
width: 0,
|
|
5178
5178
|
x: e.clientX,
|
|
5179
5179
|
y: e.clientY
|
|
5180
|
-
}),
|
|
5181
|
-
}, [
|
|
5180
|
+
}), ee();
|
|
5181
|
+
}, [ee]), q = s(() => {
|
|
5182
5182
|
R(null);
|
|
5183
5183
|
}, []);
|
|
5184
5184
|
return o ? /* @__PURE__ */ e.createElement("div", {
|
|
@@ -5216,8 +5216,8 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
5216
5216
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
5217
5217
|
"aria-hidden": "true",
|
|
5218
5218
|
className: `${k}__track`,
|
|
5219
|
-
onMouseLeave: N ?
|
|
5220
|
-
onMouseMove: N ?
|
|
5219
|
+
onMouseLeave: N ? q : void 0,
|
|
5220
|
+
onMouseMove: N ? K : void 0,
|
|
5221
5221
|
style: { height: t }
|
|
5222
5222
|
}, a.map((t, n) => {
|
|
5223
5223
|
let r = F(n, t), i = Math.round(t.value / P * 100);
|
|
@@ -5235,13 +5235,13 @@ var un = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
5235
5235
|
flex: t.value
|
|
5236
5236
|
}
|
|
5237
5237
|
});
|
|
5238
|
-
})), N &&
|
|
5238
|
+
})), N && W && z.current && /* @__PURE__ */ e.createElement("div", {
|
|
5239
5239
|
ref: U.setFloating,
|
|
5240
5240
|
className: "recharts-default-tooltip",
|
|
5241
5241
|
role: "tooltip",
|
|
5242
5242
|
style: {
|
|
5243
5243
|
...H,
|
|
5244
|
-
...
|
|
5244
|
+
...G,
|
|
5245
5245
|
pointerEvents: "none",
|
|
5246
5246
|
zIndex: "var(--pds-z-index-notifications)"
|
|
5247
5247
|
}
|
|
@@ -6347,17 +6347,17 @@ var sr = {
|
|
|
6347
6347
|
variant: "reverse"
|
|
6348
6348
|
}))));
|
|
6349
6349
|
}
|
|
6350
|
-
let C = /* @__PURE__ */ e.createElement(
|
|
6350
|
+
let C = /* @__PURE__ */ e.createElement(ie.LineContent, null, /* @__PURE__ */ e.createElement(ie.Token, null)), w = /* @__PURE__ */ e.createElement("div", { className: `${g}__line ${_}` }, /* @__PURE__ */ e.createElement(ie.LineNumber, { className: `${g}__number` }), C), T = /* @__PURE__ */ e.createElement("div", { className: `${g}__line` }, /* @__PURE__ */ e.createElement("span", { className: `${g}__prompt` }, f), C);
|
|
6351
6351
|
return /* @__PURE__ */ e.createElement("div", {
|
|
6352
6352
|
className: Z([g, t ?? ""]),
|
|
6353
6353
|
style: v,
|
|
6354
6354
|
...h
|
|
6355
|
-
}, c ? y : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
6355
|
+
}, c ? y : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(ie, {
|
|
6356
6356
|
code: n,
|
|
6357
6357
|
language: l || "",
|
|
6358
6358
|
prism: or.default,
|
|
6359
6359
|
theme: sr
|
|
6360
|
-
}, /* @__PURE__ */ e.createElement(
|
|
6360
|
+
}, /* @__PURE__ */ e.createElement(ie.Code, {
|
|
6361
6361
|
className: `${g}__code`,
|
|
6362
6362
|
tabIndex: 0
|
|
6363
6363
|
}, a || o ? a ? w : T : C)), i && /* @__PURE__ */ e.createElement("div", { className: `${g}__copy` }, /* @__PURE__ */ e.createElement(Yt, {
|
|
@@ -6938,15 +6938,15 @@ var sr = {
|
|
|
6938
6938
|
searchShortcut: "Press / to focus the search field",
|
|
6939
6939
|
triggerButton: "Toggle dropdown menu"
|
|
6940
6940
|
}, loadingText: v = "Loading results...", message: y, noResultsText: b = "No results found", onBlur: x, onChange: T, onClear: E, onFocus: O, onOptionSelect: k, options: j, placeholder: M, required: N = !1, showLabel: P = !0, showUnfilteredOptions: F = !1, size: I = "s", tooltipText: R = null, validationMessage: z, validationStatus: B, value: V, ...H }, U) => {
|
|
6941
|
-
let
|
|
6942
|
-
o && (
|
|
6943
|
-
let
|
|
6941
|
+
let ee = St(d), W = "pds-combobox", G = I === "s" ? null : `${W}--${I}`, K = r ? $.disabled : null, q = N && !r ? $.required : null, te = B === "error" ? $.error : null, ne = B === "success" ? $.success : null, re = null;
|
|
6942
|
+
o && (re = "search"), B === "error" && (re = "error"), B === "success" && (re = "success");
|
|
6943
|
+
let ie = z || y, J = V !== void 0, Y = n !== void 0, oe = (e) => {
|
|
6944
6944
|
let t = j.find((t) => t.value === e);
|
|
6945
6945
|
return t ? t.label : "";
|
|
6946
|
-
}, [X, se] = h(Y ? n : void 0), [ce, le] = h(
|
|
6946
|
+
}, [X, se] = h(Y ? n : void 0), [ce, le] = h(J ? V ?? "" : Y ? oe(n) : "");
|
|
6947
6947
|
l(() => {
|
|
6948
|
-
|
|
6949
|
-
}, [
|
|
6948
|
+
J && le(V ?? "");
|
|
6949
|
+
}, [J, V]);
|
|
6950
6950
|
let ue = m(null), de = (e) => e.map(({ label: e, optionDisplay: t, searchIndex: n, value: r, ...i }) => {
|
|
6951
6951
|
let a = r || e, o = [e, r];
|
|
6952
6952
|
return n && o.push(...n), {
|
|
@@ -6966,7 +6966,7 @@ var sr = {
|
|
|
6966
6966
|
ce,
|
|
6967
6967
|
F,
|
|
6968
6968
|
f
|
|
6969
|
-
]), { getInputProps: pe, getItemProps: me, getMenuProps: he, highlightedIndex: ge, isOpen: _e, openMenu: ve, reset: ye } =
|
|
6969
|
+
]), { getInputProps: pe, getItemProps: me, getMenuProps: he, highlightedIndex: ge, isOpen: _e, openMenu: ve, reset: ye } = ae({
|
|
6970
6970
|
id: u,
|
|
6971
6971
|
inputId: `input-${u}`,
|
|
6972
6972
|
items: fe,
|
|
@@ -6976,14 +6976,14 @@ var sr = {
|
|
|
6976
6976
|
le(e ?? "");
|
|
6977
6977
|
},
|
|
6978
6978
|
onSelectedItemChange: ({ selectedItem: e }) => {
|
|
6979
|
-
e && (
|
|
6979
|
+
e && (J || le(e.label), se(e.value), k?.(e));
|
|
6980
6980
|
},
|
|
6981
6981
|
stateReducer: (e, { changes: t, type: n }) => {
|
|
6982
|
-
if (n ===
|
|
6982
|
+
if (n === ae.stateChangeTypes.InputBlur) return {
|
|
6983
6983
|
...t,
|
|
6984
6984
|
inputValue: e.inputValue
|
|
6985
6985
|
};
|
|
6986
|
-
if (n ===
|
|
6986
|
+
if (n === ae.stateChangeTypes.InputClick) {
|
|
6987
6987
|
if (F) return {
|
|
6988
6988
|
...t,
|
|
6989
6989
|
isOpen: !0
|
|
@@ -7032,7 +7032,7 @@ var sr = {
|
|
|
7032
7032
|
}, [U, Se]), Ee = () => {
|
|
7033
7033
|
_e ? ye() : ve();
|
|
7034
7034
|
}, De = () => {
|
|
7035
|
-
|
|
7035
|
+
J || le(""), se(void 0), ye(), ue.current?.focus(), F && ve(), E?.();
|
|
7036
7036
|
}, Oe = (e) => {
|
|
7037
7037
|
x?.(X);
|
|
7038
7038
|
}, ke = (e) => {
|
|
@@ -7044,19 +7044,19 @@ var sr = {
|
|
|
7044
7044
|
item: t,
|
|
7045
7045
|
index: n
|
|
7046
7046
|
})
|
|
7047
|
-
}, /* @__PURE__ */ e.createElement("span", { className: `${
|
|
7047
|
+
}, /* @__PURE__ */ e.createElement("span", { className: `${W}__option-label` }, t.optionDisplay || t.label)));
|
|
7048
7048
|
return /* @__PURE__ */ e.createElement("div", {
|
|
7049
7049
|
className: Z([
|
|
7050
7050
|
$.base,
|
|
7051
|
+
W,
|
|
7051
7052
|
G,
|
|
7052
7053
|
K,
|
|
7053
7054
|
q,
|
|
7054
|
-
J,
|
|
7055
|
-
ee,
|
|
7056
7055
|
te,
|
|
7056
|
+
ne,
|
|
7057
7057
|
t ?? ""
|
|
7058
7058
|
]),
|
|
7059
|
-
style: d ?
|
|
7059
|
+
style: d ? ee : null,
|
|
7060
7060
|
...H
|
|
7061
7061
|
}, /* @__PURE__ */ e.createElement(Tt, {
|
|
7062
7062
|
disabled: r,
|
|
@@ -7067,16 +7067,16 @@ var sr = {
|
|
|
7067
7067
|
tooltipText: R
|
|
7068
7068
|
}), /* @__PURE__ */ e.createElement("span", {
|
|
7069
7069
|
ref: Te,
|
|
7070
|
-
"aria-describedby":
|
|
7070
|
+
"aria-describedby": ie ? `${u}__message` : null,
|
|
7071
7071
|
"aria-disabled": r ? !0 : null,
|
|
7072
7072
|
"aria-invalid": B === "error" ? !0 : null,
|
|
7073
7073
|
"aria-required": N ? !0 : null,
|
|
7074
|
-
className: `${
|
|
7074
|
+
className: `${W}__input-wrapper`,
|
|
7075
7075
|
id: u
|
|
7076
|
-
},
|
|
7076
|
+
}, re && /* @__PURE__ */ e.createElement(Ot, { variant: re }), /* @__PURE__ */ e.createElement("input", {
|
|
7077
7077
|
ref: ue,
|
|
7078
7078
|
autoComplete: "off",
|
|
7079
|
-
className: `${
|
|
7079
|
+
className: `${W}__input`,
|
|
7080
7080
|
id: `input-${u}`,
|
|
7081
7081
|
...pe({
|
|
7082
7082
|
"aria-label": _.inputInstructions,
|
|
@@ -7098,30 +7098,30 @@ var sr = {
|
|
|
7098
7098
|
}), a && /* @__PURE__ */ e.createElement("button", {
|
|
7099
7099
|
"aria-expanded": _e,
|
|
7100
7100
|
"aria-label": _.triggerButton,
|
|
7101
|
-
className: `${
|
|
7101
|
+
className: `${W}__trigger`,
|
|
7102
7102
|
disabled: r,
|
|
7103
7103
|
onClick: Ee,
|
|
7104
7104
|
type: "button"
|
|
7105
7105
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
7106
|
-
className: `${
|
|
7106
|
+
className: `${W}__trigger-icon`,
|
|
7107
7107
|
iconName: "angleDown",
|
|
7108
7108
|
size: "m"
|
|
7109
7109
|
}))), /* @__PURE__ */ e.createElement("div", {
|
|
7110
7110
|
ref: Se.setFloating,
|
|
7111
|
-
className: `pds-dropdown__panel ${
|
|
7111
|
+
className: `pds-dropdown__panel ${W}__dropdown`,
|
|
7112
7112
|
style: Ce ? {
|
|
7113
7113
|
...xe,
|
|
7114
7114
|
...we,
|
|
7115
7115
|
zIndex: "var(--pds-z-index-dropdown)"
|
|
7116
7116
|
} : { display: "none" }
|
|
7117
|
-
}, Ce && f && /* @__PURE__ */ e.createElement("div", { className: `${
|
|
7118
|
-
className: `${
|
|
7117
|
+
}, Ce && f && /* @__PURE__ */ e.createElement("div", { className: `${W}__loading` }, v), Ce && !f && fe.length === 0 && /* @__PURE__ */ e.createElement("div", { className: "pds-dropdown__no-results" }, b), /* @__PURE__ */ e.createElement("ul", {
|
|
7118
|
+
className: `${W}__options`,
|
|
7119
7119
|
...he(),
|
|
7120
7120
|
style: Ce && !f && fe.length > 0 ? void 0 : { display: "none" }
|
|
7121
|
-
}, Ce && !f && Ae())),
|
|
7121
|
+
}, Ce && !f && Ae())), ie && /* @__PURE__ */ e.createElement(Et, {
|
|
7122
7122
|
hasValidationMessage: !!z,
|
|
7123
7123
|
id: u,
|
|
7124
|
-
message:
|
|
7124
|
+
message: ie,
|
|
7125
7125
|
validationMessageHasDecorators: !1,
|
|
7126
7126
|
validationStatus: B
|
|
7127
7127
|
}));
|
|
@@ -7139,30 +7139,30 @@ var sr = {
|
|
|
7139
7139
|
inputInstructions: "Type to search options",
|
|
7140
7140
|
triggerButton: "Toggle dropdown menu"
|
|
7141
7141
|
}, loadingText: u = "Loading results...", noResultsText: d = "No results found", onChange: f, options: g, placeholder: _ = "Filter", required: v = !1, showAllTags: y = !1, showLabel: b = !0, size: x = "s", ...T }) => {
|
|
7142
|
-
let E = St(o), O = "pds-combobox-multi", j = x === "s" ? null : `${O}--${x}`, M = r ? $.disabled : null, N = v && !r ? $.required : null, F = y ? `${O}--show-all-tags` : null, [I, L] = h(""), [R, z] = h(a), [B, V] = h(null), [H, U] = h(!1),
|
|
7142
|
+
let E = St(o), O = "pds-combobox-multi", j = x === "s" ? null : `${O}--${x}`, M = r ? $.disabled : null, N = v && !r ? $.required : null, F = y ? `${O}--show-all-tags` : null, [I, L] = h(""), [R, z] = h(a), [B, V] = h(null), [H, U] = h(!1), ee = p(() => Sr(g, R, I), [
|
|
7143
7143
|
g,
|
|
7144
7144
|
R,
|
|
7145
7145
|
I
|
|
7146
|
-
]),
|
|
7146
|
+
]), W = p(() => t?.items?.map((e) => ({
|
|
7147
7147
|
...e,
|
|
7148
7148
|
isAlreadySelected: R.some((t) => t.id === e.id)
|
|
7149
|
-
})) || [], [t?.items, R]),
|
|
7149
|
+
})) || [], [t?.items, R]), G = (e) => {
|
|
7150
7150
|
z(e), f?.(e);
|
|
7151
|
-
}, { getDropdownProps:
|
|
7151
|
+
}, { getDropdownProps: K, getSelectedItemProps: q, removeSelectedItem: te } = J({
|
|
7152
7152
|
selectedItems: R,
|
|
7153
7153
|
onStateChange: ({ selectedItems: e, type: t }) => {
|
|
7154
7154
|
if (!r) switch (t) {
|
|
7155
|
-
case
|
|
7156
|
-
case
|
|
7157
|
-
case
|
|
7158
|
-
case
|
|
7159
|
-
|
|
7155
|
+
case J.stateChangeTypes.SelectedItemKeyDownBackspace:
|
|
7156
|
+
case J.stateChangeTypes.SelectedItemKeyDownDelete:
|
|
7157
|
+
case J.stateChangeTypes.DropdownKeyDownBackspace:
|
|
7158
|
+
case J.stateChangeTypes.FunctionRemoveSelectedItem:
|
|
7159
|
+
G(e || []);
|
|
7160
7160
|
break;
|
|
7161
7161
|
default: break;
|
|
7162
7162
|
}
|
|
7163
7163
|
}
|
|
7164
|
-
}), { closeMenu:
|
|
7165
|
-
items:
|
|
7164
|
+
}), { closeMenu: ne, getInputProps: re, getItemProps: ie, getMenuProps: Y, getToggleButtonProps: oe, highlightedIndex: X, isOpen: se, openMenu: ce, selectedItem: le } = ae({
|
|
7165
|
+
items: ee,
|
|
7166
7166
|
itemToString: (e) => e ? e.label : "",
|
|
7167
7167
|
selectedItem: null,
|
|
7168
7168
|
inputValue: I,
|
|
@@ -7170,8 +7170,8 @@ var sr = {
|
|
|
7170
7170
|
stateReducer: (e, { changes: t, type: n }) => {
|
|
7171
7171
|
if (r) return e;
|
|
7172
7172
|
switch (n) {
|
|
7173
|
-
case
|
|
7174
|
-
case
|
|
7173
|
+
case ae.stateChangeTypes.InputKeyDownEnter:
|
|
7174
|
+
case ae.stateChangeTypes.ItemClick: return {
|
|
7175
7175
|
...t,
|
|
7176
7176
|
isOpen: !0,
|
|
7177
7177
|
highlightedIndex: e.highlightedIndex
|
|
@@ -7181,16 +7181,16 @@ var sr = {
|
|
|
7181
7181
|
},
|
|
7182
7182
|
onStateChange: ({ inputValue: e, isOpen: t, selectedItem: n, type: i }) => {
|
|
7183
7183
|
if (!r) switch (i) {
|
|
7184
|
-
case
|
|
7185
|
-
case
|
|
7186
|
-
case
|
|
7187
|
-
n && (n.isAlreadySelected ?
|
|
7184
|
+
case ae.stateChangeTypes.InputKeyDownEnter:
|
|
7185
|
+
case ae.stateChangeTypes.ItemClick:
|
|
7186
|
+
case ae.stateChangeTypes.InputBlur:
|
|
7187
|
+
n && (n.isAlreadySelected ? G(R.filter((e) => e.id !== n.id)) : G([...R, n]), L(""), V(null));
|
|
7188
7188
|
break;
|
|
7189
|
-
case
|
|
7189
|
+
case ae.stateChangeTypes.InputChange:
|
|
7190
7190
|
L(e || ""), V(null);
|
|
7191
7191
|
break;
|
|
7192
|
-
case
|
|
7193
|
-
case
|
|
7192
|
+
case ae.stateChangeTypes.ToggleButtonClick:
|
|
7193
|
+
case ae.stateChangeTypes.FunctionOpenMenu:
|
|
7194
7194
|
t && U(!1);
|
|
7195
7195
|
break;
|
|
7196
7196
|
default: break;
|
|
@@ -7232,9 +7232,9 @@ var sr = {
|
|
|
7232
7232
|
}), { getFloatingProps: he } = P([k(fe)]), ge = (e) => {
|
|
7233
7233
|
if (e.stopPropagation(), r) return;
|
|
7234
7234
|
let t = !H;
|
|
7235
|
-
U(t), t && se &&
|
|
7235
|
+
U(t), t && se && ne();
|
|
7236
7236
|
}, _e = (e) => {
|
|
7237
|
-
r || (e.isAlreadySelected ?
|
|
7237
|
+
r || (e.isAlreadySelected ? G(R.filter((t) => t.id !== e.id)) : G([...R, e]));
|
|
7238
7238
|
}, ve = () => {
|
|
7239
7239
|
U(!1), t?.onClose?.();
|
|
7240
7240
|
}, ye = () => {
|
|
@@ -7243,16 +7243,16 @@ var sr = {
|
|
|
7243
7243
|
if (B === null) V(R.length - 1);
|
|
7244
7244
|
else {
|
|
7245
7245
|
let e = [...R];
|
|
7246
|
-
e.splice(B, 1),
|
|
7246
|
+
e.splice(B, 1), G(e), V(null);
|
|
7247
7247
|
}
|
|
7248
7248
|
}, xe = m(!1), Se = () => {
|
|
7249
|
-
r || (xe.current ?
|
|
7249
|
+
r || (xe.current ? ne() : ce());
|
|
7250
7250
|
}, Ce = (e) => {
|
|
7251
7251
|
xe.current = se, !r && e.currentTarget.setAttribute("data-focus-method", "mouse");
|
|
7252
7252
|
}, we = (e) => {
|
|
7253
7253
|
e.currentTarget.setAttribute("data-focus-method", "keyboard"), !r && ((e.key === "Backspace" || e.key === "Delete") && !I && R.length > 0 && (e.preventDefault(), be()), e.key === "Enter" && B !== null && (e.preventDefault(), be()), !se && (e.key === "Enter" || e.key === "ArrowDown") && (e.preventDefault(), ce()));
|
|
7254
|
-
}, Te =
|
|
7255
|
-
...
|
|
7254
|
+
}, Te = re({
|
|
7255
|
+
...K({ preventKeyAction: se }),
|
|
7256
7256
|
disabled: r,
|
|
7257
7257
|
onKeyDown: we
|
|
7258
7258
|
}), Ee = R.length === 2 ? /* @__PURE__ */ e.createElement("span", { className: `${O}__counter-item` }, R.length - 1) : R.length === 3 ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: `${O}__counter-layer` }), /* @__PURE__ */ e.createElement("span", { className: `${O}__counter-item` }, R.length - 1)) : R.length > 3 ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: `${O}__counter-layer` }), /* @__PURE__ */ e.createElement("span", { className: `${O}__counter-layer` }), /* @__PURE__ */ e.createElement("span", { className: `${O}__counter-item` }, R.length - 1)) : "";
|
|
@@ -7291,7 +7291,7 @@ var sr = {
|
|
|
7291
7291
|
${O}__selected-item
|
|
7292
7292
|
${n === B ? `${O}__selected-item--marked-for-deletion` : ""}
|
|
7293
7293
|
`,
|
|
7294
|
-
...
|
|
7294
|
+
...q({
|
|
7295
7295
|
selectedItem: t,
|
|
7296
7296
|
index: n
|
|
7297
7297
|
}),
|
|
@@ -7300,7 +7300,7 @@ var sr = {
|
|
|
7300
7300
|
"aria-label": `Remove ${t.label}`,
|
|
7301
7301
|
className: `${O}__selected-item-remove`,
|
|
7302
7302
|
onClick: (e) => {
|
|
7303
|
-
e.stopPropagation(),
|
|
7303
|
+
e.stopPropagation(), te(t);
|
|
7304
7304
|
},
|
|
7305
7305
|
onKeyDown: (e) => {
|
|
7306
7306
|
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
@@ -7330,7 +7330,7 @@ var sr = {
|
|
|
7330
7330
|
iconName: "angleDown",
|
|
7331
7331
|
size: "m"
|
|
7332
7332
|
})))), /* @__PURE__ */ e.createElement("div", {
|
|
7333
|
-
...
|
|
7333
|
+
...K(),
|
|
7334
7334
|
ref: de.setFloating,
|
|
7335
7335
|
className: `pds-dropdown__panel ${O}__dropdown`,
|
|
7336
7336
|
style: se ? {
|
|
@@ -7345,17 +7345,17 @@ var sr = {
|
|
|
7345
7345
|
onClick: (e) => {
|
|
7346
7346
|
e.stopPropagation();
|
|
7347
7347
|
}
|
|
7348
|
-
})), se && s && /* @__PURE__ */ e.createElement("div", { className: `${O}__loading` }, u), se && !s &&
|
|
7348
|
+
})), se && s && /* @__PURE__ */ e.createElement("div", { className: `${O}__loading` }, u), se && !s && ee.length === 0 && /* @__PURE__ */ e.createElement("div", { className: "pds-dropdown__no-results" }, d), /* @__PURE__ */ e.createElement("ul", {
|
|
7349
7349
|
className: `${O}__dropdown-list`,
|
|
7350
7350
|
...Y(),
|
|
7351
|
-
style: se && !s &&
|
|
7352
|
-
}, se && !s &&
|
|
7351
|
+
style: se && !s && ee.length > 0 ? void 0 : { display: "none" }
|
|
7352
|
+
}, se && !s && ee.map((t, n) => /* @__PURE__ */ e.createElement(Pt, {
|
|
7353
7353
|
key: `${t.id}-${n}`,
|
|
7354
7354
|
className: `${O}__dropdown-item
|
|
7355
7355
|
${X === n ? "pds-dropdown__item--focused" : ""}
|
|
7356
7356
|
${le === t ? `${O}__dropdown-item--selected` : ""}
|
|
7357
7357
|
${t.isAlreadySelected ? "pds-dropdown__item--active" : ""}`,
|
|
7358
|
-
...
|
|
7358
|
+
...ie({
|
|
7359
7359
|
item: t,
|
|
7360
7360
|
index: n
|
|
7361
7361
|
})
|
|
@@ -7374,7 +7374,7 @@ var sr = {
|
|
|
7374
7374
|
className: `${O}__aux-panel-icon`,
|
|
7375
7375
|
iconName: "sparkles",
|
|
7376
7376
|
size: "m"
|
|
7377
|
-
}), /* @__PURE__ */ e.createElement("div", { className: `${O}__aux-panel-items` },
|
|
7377
|
+
}), /* @__PURE__ */ e.createElement("div", { className: `${O}__aux-panel-items` }, W.map((t) => /* @__PURE__ */ e.createElement("button", {
|
|
7378
7378
|
key: t.id,
|
|
7379
7379
|
className: Z([`${O}__aux-panel-item`, t.isAlreadySelected ? `${O}__aux-panel-item--selected` : ""]),
|
|
7380
7380
|
onClick: () => _e(t),
|
|
@@ -7466,7 +7466,7 @@ var sr = {
|
|
|
7466
7466
|
let D = {
|
|
7467
7467
|
...Er,
|
|
7468
7468
|
...v
|
|
7469
|
-
}, [O, k] = h(x), [j, M] = h(!1), [N, P] = h(null), [F, I] = h(r ? x?.from : x), L = St(a), R = "pds-datepicker", z = n ? $.disabled : null, B = m && !n ? $.required : null, V = b === "error" ? $.error : null, H = b === "success" ? $.success : null, U = y || u, { floatingStyles:
|
|
7469
|
+
}, [O, k] = h(x), [j, M] = h(!1), [N, P] = h(null), [F, I] = h(r ? x?.from : x), L = St(a), R = "pds-datepicker", z = n ? $.disabled : null, B = m && !n ? $.required : null, V = b === "error" ? $.error : null, H = b === "success" ? $.success : null, U = y || u, { floatingStyles: ee, refs: W } = A({
|
|
7470
7470
|
open: j,
|
|
7471
7471
|
onOpenChange: M,
|
|
7472
7472
|
placement: "bottom-start",
|
|
@@ -7476,22 +7476,22 @@ var sr = {
|
|
|
7476
7476
|
E({ padding: 8 })
|
|
7477
7477
|
],
|
|
7478
7478
|
whileElementsMounted: S
|
|
7479
|
-
}),
|
|
7479
|
+
}), G = (e) => {
|
|
7480
7480
|
k(e), f?.(e), r || setTimeout(() => {
|
|
7481
7481
|
M(!1);
|
|
7482
7482
|
}, 300);
|
|
7483
|
+
}, K = (e) => {
|
|
7484
|
+
G(e);
|
|
7483
7485
|
}, q = (e) => {
|
|
7484
|
-
|
|
7485
|
-
}, J = (e) => {
|
|
7486
|
-
K(e);
|
|
7487
|
-
}, ee = () => {
|
|
7488
|
-
k(void 0), f?.(void 0);
|
|
7486
|
+
G(e);
|
|
7489
7487
|
}, te = () => {
|
|
7490
|
-
|
|
7488
|
+
k(void 0), f?.(void 0);
|
|
7491
7489
|
}, ne = () => {
|
|
7490
|
+
M(!1);
|
|
7491
|
+
}, re = () => {
|
|
7492
7492
|
let e = /* @__PURE__ */ new Date();
|
|
7493
7493
|
I(e), r ? (k(void 0), f?.(void 0)) : (k(e), f?.(e));
|
|
7494
|
-
},
|
|
7494
|
+
}, ie = () => r ? O?.from : O, ae = ({ className: t, orientation: n }) => n === "left" ? /* @__PURE__ */ e.createElement(Q, {
|
|
7495
7495
|
className: t,
|
|
7496
7496
|
iconName: "angleLeft",
|
|
7497
7497
|
size: "m"
|
|
@@ -7499,7 +7499,7 @@ var sr = {
|
|
|
7499
7499
|
className: t,
|
|
7500
7500
|
iconName: "angleRight",
|
|
7501
7501
|
size: "m"
|
|
7502
|
-
}),
|
|
7502
|
+
}), J = (e) => Y(e, "EEEEE", { locale: s }), X = () => {
|
|
7503
7503
|
let e = [];
|
|
7504
7504
|
return d && e.push({ before: d }), c && e.push({ after: c }), e.length > 0 ? e : void 0;
|
|
7505
7505
|
}, se = () => {
|
|
@@ -7519,7 +7519,7 @@ var sr = {
|
|
|
7519
7519
|
return e ? `${D.selectedDate}${wr(e, s)}` : D.noDateSelected || "";
|
|
7520
7520
|
}
|
|
7521
7521
|
}, ue = (e) => {
|
|
7522
|
-
|
|
7522
|
+
W.floating.current && !W.floating.current.contains(e.target) && N && !N.contains(e.target) && M(!1);
|
|
7523
7523
|
};
|
|
7524
7524
|
return l(() => {
|
|
7525
7525
|
k(x);
|
|
@@ -7546,7 +7546,7 @@ var sr = {
|
|
|
7546
7546
|
tooltipText: _
|
|
7547
7547
|
}), /* @__PURE__ */ e.createElement("div", { className: `${R}__input-wrapper` }, /* @__PURE__ */ e.createElement("button", {
|
|
7548
7548
|
ref: (e) => {
|
|
7549
|
-
|
|
7549
|
+
W.setReference(e), P(e);
|
|
7550
7550
|
},
|
|
7551
7551
|
"aria-describedby": U ? `${i}__message` : null,
|
|
7552
7552
|
"aria-expanded": j,
|
|
@@ -7555,7 +7555,7 @@ var sr = {
|
|
|
7555
7555
|
className: Z([`${R}__trigger`, j ? `${R}__trigger--open` : null]),
|
|
7556
7556
|
disabled: n,
|
|
7557
7557
|
onClick: () => {
|
|
7558
|
-
j || I(
|
|
7558
|
+
j || I(ie() ?? /* @__PURE__ */ new Date()), M(!j);
|
|
7559
7559
|
},
|
|
7560
7560
|
type: "button"
|
|
7561
7561
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
@@ -7567,53 +7567,53 @@ var sr = {
|
|
|
7567
7567
|
message: U,
|
|
7568
7568
|
validationStatus: b
|
|
7569
7569
|
}), j && /* @__PURE__ */ e.createElement("div", {
|
|
7570
|
-
ref:
|
|
7570
|
+
ref: W.setFloating,
|
|
7571
7571
|
className: `${R}__popover`,
|
|
7572
|
-
style:
|
|
7572
|
+
style: ee
|
|
7573
7573
|
}, /* @__PURE__ */ e.createElement("div", { className: `${R}__calendar` }, r ? /* @__PURE__ */ e.createElement(oe, {
|
|
7574
|
-
components: { Chevron:
|
|
7574
|
+
components: { Chevron: ae },
|
|
7575
7575
|
disabled: X(),
|
|
7576
7576
|
footer: /* @__PURE__ */ e.createElement("div", { className: "visually-hidden" }, le()),
|
|
7577
|
-
formatters: { formatWeekdayName:
|
|
7577
|
+
formatters: { formatWeekdayName: J },
|
|
7578
7578
|
locale: s,
|
|
7579
7579
|
mode: "range",
|
|
7580
7580
|
month: F,
|
|
7581
7581
|
navLayout: "around",
|
|
7582
7582
|
numberOfMonths: 2,
|
|
7583
7583
|
onMonthChange: I,
|
|
7584
|
-
onSelect:
|
|
7584
|
+
onSelect: K,
|
|
7585
7585
|
selected: O
|
|
7586
7586
|
}) : /* @__PURE__ */ e.createElement(oe, {
|
|
7587
|
-
components: { Chevron:
|
|
7587
|
+
components: { Chevron: ae },
|
|
7588
7588
|
disabled: X(),
|
|
7589
7589
|
footer: /* @__PURE__ */ e.createElement("div", { className: "visually-hidden" }, le()),
|
|
7590
|
-
formatters: { formatWeekdayName:
|
|
7590
|
+
formatters: { formatWeekdayName: J },
|
|
7591
7591
|
locale: s,
|
|
7592
7592
|
mode: "single",
|
|
7593
7593
|
month: F,
|
|
7594
7594
|
navLayout: "around",
|
|
7595
7595
|
numberOfMonths: 1,
|
|
7596
7596
|
onMonthChange: I,
|
|
7597
|
-
onSelect:
|
|
7597
|
+
onSelect: q,
|
|
7598
7598
|
selected: O
|
|
7599
7599
|
})), /* @__PURE__ */ e.createElement("div", { className: `${R}__actions` }, /* @__PURE__ */ e.createElement(Gt, {
|
|
7600
7600
|
className: `${R}__action-button ${R}__action-button--today`,
|
|
7601
7601
|
label: D.todayButton,
|
|
7602
|
-
onClick:
|
|
7602
|
+
onClick: re,
|
|
7603
7603
|
size: "s",
|
|
7604
7604
|
type: "button",
|
|
7605
7605
|
variant: "secondary"
|
|
7606
7606
|
}), /* @__PURE__ */ e.createElement("div", { className: `${R}__actions-group` }, /* @__PURE__ */ e.createElement(Gt, {
|
|
7607
7607
|
className: `${R}__action-button ${R}__action-button--clear`,
|
|
7608
7608
|
label: D.clearButton,
|
|
7609
|
-
onClick:
|
|
7609
|
+
onClick: te,
|
|
7610
7610
|
size: "s",
|
|
7611
7611
|
type: "button",
|
|
7612
7612
|
variant: "secondary"
|
|
7613
7613
|
}), r && /* @__PURE__ */ e.createElement(Gt, {
|
|
7614
7614
|
className: `${R}__action-button ${R}__action-button--done`,
|
|
7615
7615
|
label: D.doneButton,
|
|
7616
|
-
onClick:
|
|
7616
|
+
onClick: ne,
|
|
7617
7617
|
size: "s",
|
|
7618
7618
|
type: "button",
|
|
7619
7619
|
variant: "highlight"
|
|
@@ -7637,13 +7637,13 @@ var sr = {
|
|
|
7637
7637
|
if (!e || !r) return;
|
|
7638
7638
|
let t = new DataTransfer();
|
|
7639
7639
|
t.items.add(H), e.files = t.files, E(!0);
|
|
7640
|
-
},
|
|
7640
|
+
}, ee = (e) => {
|
|
7641
7641
|
if (e.target.files.length === 0) {
|
|
7642
7642
|
r ? U() : E(!1);
|
|
7643
7643
|
return;
|
|
7644
7644
|
}
|
|
7645
7645
|
X && r && (r === e.target.value ? O(!0) : O(!1)), m && m(e.target.files), E(!0);
|
|
7646
|
-
},
|
|
7646
|
+
}, W = () => {
|
|
7647
7647
|
let e = document.getElementById(`${o}--input`);
|
|
7648
7648
|
e.value = "", X && O(!1), p && p(), E(!1), e.focus();
|
|
7649
7649
|
};
|
|
@@ -7687,13 +7687,13 @@ var sr = {
|
|
|
7687
7687
|
disabled: i,
|
|
7688
7688
|
id: `${o}--input`,
|
|
7689
7689
|
multiple: f,
|
|
7690
|
-
onChange:
|
|
7690
|
+
onChange: ee,
|
|
7691
7691
|
required: g,
|
|
7692
7692
|
type: "file",
|
|
7693
7693
|
...s
|
|
7694
7694
|
}), T && /* @__PURE__ */ e.createElement(At, {
|
|
7695
7695
|
clearLabel: u.clearButton,
|
|
7696
|
-
handleClearInput:
|
|
7696
|
+
handleClearInput: W,
|
|
7697
7697
|
id: o
|
|
7698
7698
|
})), R && /* @__PURE__ */ e.createElement(Et, {
|
|
7699
7699
|
hasValidationMessage: !!x,
|
|
@@ -7890,31 +7890,31 @@ var sr = {
|
|
|
7890
7890
|
tagRemove: "Remove {value}",
|
|
7891
7891
|
tagsListLabel: "Current tags"
|
|
7892
7892
|
}, validationMessage: b, validationStatus: x, ...S }, C) => {
|
|
7893
|
-
let w = St(o), T = "pds-tags-input", E = g === "s" ? null : `${T}--${g}`, D = r ? $.disabled : null, O = f && !r ? $.required : null, k = x === "error" ? $.error : null, A = x === "success" ? $.success : null, j = b || l, [M, N] = h(""), [P, F] = h(null), [I, L] = h(null), [R, z] = h(null), [B, V] = h(null), [H, U] = h(""),
|
|
7893
|
+
let w = St(o), T = "pds-tags-input", E = g === "s" ? null : `${T}--${g}`, D = r ? $.disabled : null, O = f && !r ? $.required : null, k = x === "error" ? $.error : null, A = x === "success" ? $.success : null, j = b || l, [M, N] = h(""), [P, F] = h(null), [I, L] = h(null), [R, z] = h(null), [B, V] = h(null), [H, U] = h(""), ee = m(null), W = _.length > 0 ? t : d, G = (e) => {
|
|
7894
7894
|
U(e), setTimeout(() => U(""), 1e3);
|
|
7895
|
-
},
|
|
7895
|
+
}, K = (e) => {
|
|
7896
7896
|
u(e);
|
|
7897
|
-
},
|
|
7897
|
+
}, q = (e) => {
|
|
7898
7898
|
F(e);
|
|
7899
|
-
},
|
|
7899
|
+
}, te = () => {
|
|
7900
7900
|
F(null), L(null), z(null);
|
|
7901
|
-
},
|
|
7901
|
+
}, ne = (e, t) => {
|
|
7902
7902
|
P === null || P === e || (L(e), z(t));
|
|
7903
|
-
},
|
|
7903
|
+
}, re = (e) => {
|
|
7904
7904
|
if (e.preventDefault(), P === null || I === null || R === null) return;
|
|
7905
7905
|
let t = _.findIndex((e) => e.id === P), n = _.findIndex((e) => e.id === I);
|
|
7906
7906
|
if (t === -1 || n === -1) return;
|
|
7907
7907
|
let r = [..._], [i] = r.splice(t, 1), a = n;
|
|
7908
|
-
a = R === "after" ? t < n ? n : n + 1 : n, r.splice(a, 0, i),
|
|
7909
|
-
},
|
|
7908
|
+
a = R === "after" ? t < n ? n : n + 1 : n, r.splice(a, 0, i), K(r), G("Tag reordered"), F(null), L(null), z(null);
|
|
7909
|
+
}, ie = (e, t) => {
|
|
7910
7910
|
let n = [..._], [r] = n.splice(e, 1);
|
|
7911
|
-
n.splice(t, 0, r),
|
|
7912
|
-
},
|
|
7911
|
+
n.splice(t, 0, r), G(`${r.value} moved to position ${t + 1} of ${_.length}`), K(n);
|
|
7912
|
+
}, ae = (e) => {
|
|
7913
7913
|
let t = _.find((t) => t.id === e);
|
|
7914
|
-
|
|
7915
|
-
},
|
|
7914
|
+
K(_.filter((t) => t.id !== e)), t && G(`${t.value} removed`);
|
|
7915
|
+
}, J = () => {
|
|
7916
7916
|
V(null), setTimeout(() => {
|
|
7917
|
-
|
|
7917
|
+
ee.current?.focus();
|
|
7918
7918
|
}, 0);
|
|
7919
7919
|
}, Y = (e) => {
|
|
7920
7920
|
if (!r) if (e.key === "Enter" && M.trim()) {
|
|
@@ -7923,10 +7923,10 @@ var sr = {
|
|
|
7923
7923
|
id: Date.now().toString(),
|
|
7924
7924
|
value: M.trim()
|
|
7925
7925
|
};
|
|
7926
|
-
|
|
7926
|
+
K([..._, t]), G(`${M.trim()} added`), N("");
|
|
7927
7927
|
} else if (e.key === "Backspace" && !M && _.length > 0) {
|
|
7928
7928
|
let e = _[_.length - 1];
|
|
7929
|
-
|
|
7929
|
+
K(_.slice(0, -1)), G(`${e.value} removed`);
|
|
7930
7930
|
} else e.key === "ArrowLeft" && !M && _.length > 0 && (e.preventDefault(), V(_.length - 1));
|
|
7931
7931
|
};
|
|
7932
7932
|
return /* @__PURE__ */ e.createElement("div", {
|
|
@@ -7962,7 +7962,7 @@ var sr = {
|
|
|
7962
7962
|
"aria-label": y.tagsListLabel,
|
|
7963
7963
|
className: `${T}__tags`,
|
|
7964
7964
|
onDragOver: s ? (e) => e.preventDefault() : void 0,
|
|
7965
|
-
onDrop: s ?
|
|
7965
|
+
onDrop: s ? re : void 0,
|
|
7966
7966
|
role: "list"
|
|
7967
7967
|
}, _.map((t, n) => {
|
|
7968
7968
|
let i = null;
|
|
@@ -7976,12 +7976,12 @@ var sr = {
|
|
|
7976
7976
|
index: n,
|
|
7977
7977
|
isDragging: P === t.id,
|
|
7978
7978
|
isSortable: s,
|
|
7979
|
-
onDragEnd:
|
|
7980
|
-
onDragOver:
|
|
7981
|
-
onDragStart:
|
|
7982
|
-
onFocusInput:
|
|
7983
|
-
onKeyboardMove:
|
|
7984
|
-
onRemove:
|
|
7979
|
+
onDragEnd: te,
|
|
7980
|
+
onDragOver: ne,
|
|
7981
|
+
onDragStart: q,
|
|
7982
|
+
onFocusInput: J,
|
|
7983
|
+
onKeyboardMove: ie,
|
|
7984
|
+
onRemove: ae,
|
|
7985
7985
|
setFocusedIndex: V,
|
|
7986
7986
|
tag: t,
|
|
7987
7987
|
totalTags: _.length,
|
|
@@ -7989,7 +7989,7 @@ var sr = {
|
|
|
7989
7989
|
}));
|
|
7990
7990
|
})), /* @__PURE__ */ e.createElement("input", {
|
|
7991
7991
|
ref: (e) => {
|
|
7992
|
-
|
|
7992
|
+
ee.current = e, typeof C == "function" ? C(e) : C && (C.current = e);
|
|
7993
7993
|
},
|
|
7994
7994
|
"aria-describedby": `${i}__instructions`,
|
|
7995
7995
|
"aria-invalid": x === "error" ? !0 : null,
|
|
@@ -7999,7 +7999,7 @@ var sr = {
|
|
|
7999
7999
|
name: i,
|
|
8000
8000
|
onChange: (e) => N(e.target.value),
|
|
8001
8001
|
onKeyDown: Y,
|
|
8002
|
-
placeholder:
|
|
8002
|
+
placeholder: W,
|
|
8003
8003
|
required: f,
|
|
8004
8004
|
type: "text",
|
|
8005
8005
|
value: M
|
|
@@ -8087,8 +8087,8 @@ var sr = {
|
|
|
8087
8087
|
}, type: O = "text", validationMessage: k, validationStatus: A, value: j, ...M }, N) => {
|
|
8088
8088
|
let P = St(d), F = "pds-text-input", I = a ? $.disabled : null, L = x && !a ? $.required : null, R = A === "error" ? $.error : null, z = A === "success" ? $.success : null, B = b ? $.readonly : null, V = T === "s" ? null : `${F}--${T}`, H = c && O === "url" ? `${F}--has-url-prefix` : null, U = null;
|
|
8089
8089
|
O === "search" && (U = "search"), O === "search" && S === "filter" && (U = "filter"), A === "error" && (U = "error"), A === "success" && (U = "success");
|
|
8090
|
-
let
|
|
8091
|
-
if (w &&
|
|
8090
|
+
let ee = k || p, W = j !== void 0, [G, K] = h(i === void 0 ? "" : i), q = j || G, te = (e) => {
|
|
8091
|
+
if (w && ie && ae(!1), c && O === "url") {
|
|
8092
8092
|
let t = Ct(e.target.value), n = {
|
|
8093
8093
|
...e,
|
|
8094
8094
|
target: {
|
|
@@ -8098,7 +8098,7 @@ var sr = {
|
|
|
8098
8098
|
};
|
|
8099
8099
|
m && m(n);
|
|
8100
8100
|
} else m && m(e);
|
|
8101
|
-
},
|
|
8101
|
+
}, ne = (e) => {
|
|
8102
8102
|
if (c && O === "url") {
|
|
8103
8103
|
let t = Ct(e.target.value), n = {
|
|
8104
8104
|
...e,
|
|
@@ -8107,18 +8107,18 @@ var sr = {
|
|
|
8107
8107
|
value: t
|
|
8108
8108
|
}
|
|
8109
8109
|
};
|
|
8110
|
-
|
|
8111
|
-
} else
|
|
8112
|
-
},
|
|
8113
|
-
|
|
8110
|
+
W || K(t), g && g(n);
|
|
8111
|
+
} else W || K(e.target.value), g && g(e);
|
|
8112
|
+
}, re = () => {
|
|
8113
|
+
W || K(""), _ && _();
|
|
8114
8114
|
let e = document.getElementById(l);
|
|
8115
8115
|
e && e.focus();
|
|
8116
|
-
}, [
|
|
8117
|
-
|
|
8116
|
+
}, [ie, ae] = h(!1), J = () => {
|
|
8117
|
+
ae((e) => !e);
|
|
8118
8118
|
let e = document.getElementById(l);
|
|
8119
8119
|
e && e.focus();
|
|
8120
8120
|
}, Y = O;
|
|
8121
|
-
return w && O === "password" && (Y =
|
|
8121
|
+
return w && O === "password" && (Y = ie ? "text" : "password"), /* @__PURE__ */ e.createElement("div", {
|
|
8122
8122
|
className: Z([
|
|
8123
8123
|
$.base,
|
|
8124
8124
|
F,
|
|
@@ -8143,50 +8143,50 @@ var sr = {
|
|
|
8143
8143
|
}), w && O === "password" && /* @__PURE__ */ e.createElement("div", {
|
|
8144
8144
|
"aria-live": "polite",
|
|
8145
8145
|
className: "visually-hidden"
|
|
8146
|
-
}, `${D.visibilityStatus} ${
|
|
8146
|
+
}, `${D.visibilityStatus} ${ie ? "visible" : "hidden"}.`), /* @__PURE__ */ e.createElement("div", { className: `${F}__input-wrapper ${c && O === "url" ? `${F}__input-wrapper--has-prefix` : ""}` }, U && /* @__PURE__ */ e.createElement(Ot, { variant: U }), c && O === "url" && /* @__PURE__ */ e.createElement(Fr, null), /* @__PURE__ */ e.createElement("input", {
|
|
8147
8147
|
ref: N,
|
|
8148
|
-
"aria-describedby":
|
|
8148
|
+
"aria-describedby": ee ? `${l}__message` : null,
|
|
8149
8149
|
"aria-invalid": A === "error" ? !0 : null,
|
|
8150
8150
|
autoComplete: O === "password" ? "off" : t,
|
|
8151
8151
|
className: `${F}__input ${c && O === "url" ? `${F}__input--has-prefix` : ""}`,
|
|
8152
8152
|
disabled: a,
|
|
8153
8153
|
id: l,
|
|
8154
8154
|
name: l,
|
|
8155
|
-
onBlur:
|
|
8156
|
-
onChange:
|
|
8155
|
+
onBlur: te,
|
|
8156
|
+
onChange: ne,
|
|
8157
8157
|
onFocus: v,
|
|
8158
8158
|
placeholder: y,
|
|
8159
8159
|
readOnly: b,
|
|
8160
8160
|
required: x,
|
|
8161
8161
|
type: Y,
|
|
8162
|
-
value:
|
|
8162
|
+
value: W ? j : G,
|
|
8163
8163
|
...u
|
|
8164
|
-
}), o &&
|
|
8164
|
+
}), o && q && /* @__PURE__ */ e.createElement(At, {
|
|
8165
8165
|
clearLabel: D.clearButton,
|
|
8166
|
-
handleClearInput:
|
|
8166
|
+
handleClearInput: re,
|
|
8167
8167
|
id: l
|
|
8168
8168
|
}), w && O === "password" && /* @__PURE__ */ e.createElement("button", {
|
|
8169
8169
|
"aria-controls": l,
|
|
8170
8170
|
className: `${F}__visibility-toggle`,
|
|
8171
|
-
onClick:
|
|
8171
|
+
onClick: J,
|
|
8172
8172
|
onMouseDown: (e) => e.preventDefault(),
|
|
8173
|
-
title:
|
|
8173
|
+
title: ie ? D.visibilityToggleHide : D.visibilityToggleShow,
|
|
8174
8174
|
type: "button"
|
|
8175
8175
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
8176
|
-
iconName:
|
|
8176
|
+
iconName: ie ? "eyeSlash" : "eye",
|
|
8177
8177
|
size: "m"
|
|
8178
|
-
})), s && O === "search" && !
|
|
8178
|
+
})), s && O === "search" && !q && /* @__PURE__ */ e.createElement(kt, {
|
|
8179
8179
|
inputId: l,
|
|
8180
8180
|
shortcutLabel: D.searchShortcut
|
|
8181
8181
|
}), r && O !== "password" && /* @__PURE__ */ e.createElement(jt, {
|
|
8182
|
-
currentLength:
|
|
8182
|
+
currentLength: q.length,
|
|
8183
8183
|
id: l,
|
|
8184
8184
|
maxLength: r,
|
|
8185
8185
|
overLimitMessage: D.counterOverLimit
|
|
8186
|
-
})),
|
|
8186
|
+
})), ee && /* @__PURE__ */ e.createElement(Et, {
|
|
8187
8187
|
hasValidationMessage: !!k,
|
|
8188
8188
|
id: l,
|
|
8189
|
-
message:
|
|
8189
|
+
message: ee,
|
|
8190
8190
|
validationMessageHasDecorators: !1,
|
|
8191
8191
|
validationStatus: A
|
|
8192
8192
|
}));
|
|
@@ -8277,7 +8277,7 @@ var sr = {
|
|
|
8277
8277
|
}
|
|
8278
8278
|
}
|
|
8279
8279
|
return null;
|
|
8280
|
-
}, Ur = (e) => typeof e == "string" ? e : e.props.children, Wr = (e) => typeof e.linkContent == "string" ? !1 : !!(e.isActive || e.linkContent.props.className && e.linkContent.props.className.includes("pds-isActive")), Gr = (e) => {
|
|
8280
|
+
}, Ur = (e) => typeof e == "string" ? e : e.props.children, Wr = (e) => e.isSeparator || e.isHeading || typeof e.linkContent == "string" ? !1 : !!(e.isActive || e.linkContent.props.className && e.linkContent.props.className.includes("pds-isActive")), Gr = (e) => {
|
|
8281
8281
|
if (Wr(e)) return !0;
|
|
8282
8282
|
if (e.links) {
|
|
8283
8283
|
for (let t = 0; t < e.links.length; t++) if (Gr(e.links[t])) return !0;
|
|
@@ -8748,6 +8748,17 @@ var sr = {
|
|
|
8748
8748
|
};
|
|
8749
8749
|
});
|
|
8750
8750
|
}, g = /* @__PURE__ */ e.createElement(e.Fragment, null, a.length > 0 && /* @__PURE__ */ e.createElement("ul", { className: `${c}__menu ${c}__menu--top-level` }, a.map((t, n) => {
|
|
8751
|
+
if (t.isSeparator) return /* @__PURE__ */ e.createElement("li", {
|
|
8752
|
+
key: n,
|
|
8753
|
+
"aria-hidden": "true",
|
|
8754
|
+
className: `${c}__separator`,
|
|
8755
|
+
role: "separator"
|
|
8756
|
+
});
|
|
8757
|
+
if (t.isHeading) return /* @__PURE__ */ e.createElement("li", {
|
|
8758
|
+
key: n,
|
|
8759
|
+
className: `${c}__section-label`,
|
|
8760
|
+
role: "presentation"
|
|
8761
|
+
}, t.label);
|
|
8751
8762
|
let a = Gr(t);
|
|
8752
8763
|
return /* @__PURE__ */ e.createElement(ti, {
|
|
8753
8764
|
key: n,
|
|
@@ -9244,7 +9255,7 @@ var sr = {
|
|
|
9244
9255
|
E()
|
|
9245
9256
|
],
|
|
9246
9257
|
whileElementsMounted: S
|
|
9247
|
-
}), R = O(j, { event: "mousedown" }), z = k(j), B = I(j, { role: "menu" }), V = m([]), { getFloatingProps: H, getItemProps: U, getReferenceProps:
|
|
9258
|
+
}), R = O(j, { event: "mousedown" }), z = k(j), B = I(j, { role: "menu" }), V = m([]), { getFloatingProps: H, getItemProps: U, getReferenceProps: ee } = P([
|
|
9248
9259
|
z,
|
|
9249
9260
|
B,
|
|
9250
9261
|
R,
|
|
@@ -9257,7 +9268,7 @@ var sr = {
|
|
|
9257
9268
|
focusItemOnOpen: !1,
|
|
9258
9269
|
focusItemOnHover: !0
|
|
9259
9270
|
})
|
|
9260
|
-
]), { isMounted:
|
|
9271
|
+
]), { isMounted: W, styles: G } = L(j, {
|
|
9261
9272
|
duration: {
|
|
9262
9273
|
open: 300,
|
|
9263
9274
|
close: 150
|
|
@@ -9265,16 +9276,16 @@ var sr = {
|
|
|
9265
9276
|
initial: { opacity: 0 },
|
|
9266
9277
|
open: { opacity: 1 },
|
|
9267
9278
|
close: { opacity: 0 }
|
|
9268
|
-
}),
|
|
9279
|
+
}), K = /* @__PURE__ */ e.createElement(Ue, {
|
|
9269
9280
|
hasUserFallback: !0,
|
|
9270
9281
|
className: `${T}__avatar`,
|
|
9271
9282
|
imageSrc: l,
|
|
9272
9283
|
size: "s",
|
|
9273
9284
|
uniqueId: c
|
|
9274
|
-
}),
|
|
9285
|
+
}), q = /* @__PURE__ */ e.createElement("li", {
|
|
9275
9286
|
className: `${T}__user-details`,
|
|
9276
9287
|
role: "presentation"
|
|
9277
|
-
}, /* @__PURE__ */ e.createElement("div", { className: `${T}__user-name` }, d), /* @__PURE__ */ e.createElement("div", { className: `${T}__user-email` }, c)),
|
|
9288
|
+
}, /* @__PURE__ */ e.createElement("div", { className: `${T}__user-name` }, d), /* @__PURE__ */ e.createElement("div", { className: `${T}__user-email` }, c)), te = a !== void 0 && typeof i == "function" ? /* @__PURE__ */ e.createElement("li", {
|
|
9278
9289
|
className: `${T}__theme-row`,
|
|
9279
9290
|
role: "presentation"
|
|
9280
9291
|
}, /* @__PURE__ */ e.createElement("span", { className: `${T}__theme-label` }, o), /* @__PURE__ */ e.createElement(ui, {
|
|
@@ -9289,14 +9300,14 @@ var sr = {
|
|
|
9289
9300
|
let n = e.id ? e.id : `${x}-item-${t}`;
|
|
9290
9301
|
y.current.push(n), b.current.push(e);
|
|
9291
9302
|
});
|
|
9292
|
-
let
|
|
9303
|
+
let ne = (e) => {
|
|
9293
9304
|
let t = y.current.indexOf(e), n = b.current[t];
|
|
9294
9305
|
n.linkContent && !n.disabled && (V.current[t].querySelector("a").click(), v(!1)), n.callback && !n.disabled && (n.callback(), v(!1));
|
|
9295
|
-
}, ne = (e) => {
|
|
9296
|
-
e.preventDefault(), e.key === "Enter" && te(e.currentTarget.id);
|
|
9297
9306
|
}, re = (e) => {
|
|
9298
|
-
|
|
9299
|
-
}, ie =
|
|
9307
|
+
e.preventDefault(), e.key === "Enter" && ne(e.currentTarget.id);
|
|
9308
|
+
}, ie = (e) => {
|
|
9309
|
+
ne(e.currentTarget.id);
|
|
9310
|
+
}, ae = r.map((t, n) => {
|
|
9300
9311
|
let r = y.current[n], i = `${T}__item`, a = t.disabled ? `${i}--disabled` : null;
|
|
9301
9312
|
return /* @__PURE__ */ e.createElement("li", {
|
|
9302
9313
|
key: r,
|
|
@@ -9305,16 +9316,16 @@ var sr = {
|
|
|
9305
9316
|
},
|
|
9306
9317
|
className: Z([i, a]),
|
|
9307
9318
|
id: r,
|
|
9308
|
-
onKeyDown:
|
|
9319
|
+
onKeyDown: re,
|
|
9309
9320
|
role: "menuitem",
|
|
9310
9321
|
tabIndex: p === n ? 0 : -1,
|
|
9311
|
-
...U({ onClick: (e) =>
|
|
9322
|
+
...U({ onClick: (e) => ie(e) })
|
|
9312
9323
|
}, t.linkContent ? t.linkContent : t.label, t.iconName && /* @__PURE__ */ e.createElement(Q, {
|
|
9313
9324
|
className: `${T}__icon`,
|
|
9314
9325
|
iconName: t.iconName,
|
|
9315
9326
|
size: "m"
|
|
9316
9327
|
}));
|
|
9317
|
-
}),
|
|
9328
|
+
}), J = r.map((t, n) => {
|
|
9318
9329
|
let r = y.current[n], i = `${T}__item`, a = t.disabled ? `${i}--disabled` : null;
|
|
9319
9330
|
return /* @__PURE__ */ e.createElement("li", {
|
|
9320
9331
|
key: r,
|
|
@@ -9329,20 +9340,20 @@ var sr = {
|
|
|
9329
9340
|
iconName: t.iconName,
|
|
9330
9341
|
size: "m"
|
|
9331
9342
|
}));
|
|
9332
|
-
}), Y = /* @__PURE__ */ e.createElement("span", { className: `${T}__toggle-left` },
|
|
9343
|
+
}), Y = /* @__PURE__ */ e.createElement("span", { className: `${T}__toggle-left` }, K, d ?? c);
|
|
9333
9344
|
return /* @__PURE__ */ e.createElement("span", {
|
|
9334
9345
|
className: Z([T, n ?? ""]),
|
|
9335
9346
|
...f
|
|
9336
9347
|
}, /* @__PURE__ */ e.createElement(dn, { label: Y }, /* @__PURE__ */ e.createElement("ul", {
|
|
9337
9348
|
className: Z([D, `${D}--mobile`]),
|
|
9338
9349
|
role: "menu"
|
|
9339
|
-
},
|
|
9350
|
+
}, q, /* @__PURE__ */ e.createElement("li", { role: "separator" }), te, J)), /* @__PURE__ */ e.createElement("button", {
|
|
9340
9351
|
ref: N.setReference,
|
|
9341
9352
|
"aria-label": t,
|
|
9342
9353
|
className: `${T}__trigger`,
|
|
9343
9354
|
type: "button",
|
|
9344
|
-
...
|
|
9345
|
-
},
|
|
9355
|
+
...ee()
|
|
9356
|
+
}, K), W && /* @__PURE__ */ e.createElement("div", {
|
|
9346
9357
|
ref: N.setFloating,
|
|
9347
9358
|
className: `${T}__dropdown`,
|
|
9348
9359
|
style: {
|
|
@@ -9350,10 +9361,10 @@ var sr = {
|
|
|
9350
9361
|
zIndex: "var(--pds-z-index-dropdown)"
|
|
9351
9362
|
},
|
|
9352
9363
|
...H()
|
|
9353
|
-
}, /* @__PURE__ */ e.createElement("div", { style: { ...
|
|
9364
|
+
}, /* @__PURE__ */ e.createElement("div", { style: { ...G } }, /* @__PURE__ */ e.createElement("ul", {
|
|
9354
9365
|
className: D,
|
|
9355
9366
|
role: "menu"
|
|
9356
|
-
},
|
|
9367
|
+
}, q, /* @__PURE__ */ e.createElement("li", { role: "separator" }), te, ae))));
|
|
9357
9368
|
}, fi = ({ ariaLabel: t = "Workspace selector menu", className: n, createWorkspaceLink: r, filterLabel: i = "Filter workspaces", filterPlaceholder: a = "Find workspace...", menuHeading: o = "Workspaces", minFilterItems: s = 8, noResultsText: c = "No results found", workspaceList: l = [], ...u }) => {
|
|
9358
9369
|
let [d, f] = h(""), [g, _] = h(""), v = m(null), y = l.length >= s, b = "pds-workspace-selector", x = `${b}__menu`, S = y ? `${x}--scroll` : null, { activeIndex: C, floatingStyles: w, getFloatingProps: T, getItemProps: E, getReferenceProps: D, isMounted: O, listRef: k, refs: A, setIsOpen: j, transitionStyles: M } = Qt({
|
|
9359
9370
|
enableTypeahead: !y,
|
|
@@ -10389,7 +10400,7 @@ var sr = {
|
|
|
10389
10400
|
}, [d]), l(() => {
|
|
10390
10401
|
f(j);
|
|
10391
10402
|
}, [j]);
|
|
10392
|
-
let N = typeof a, F = "pds-popover", R = Z([`${F}__trigger-custom`, N === "string" ? `${F}__trigger-text` : ""]), z = a ? s : 0, B = m(null), { context: V, floatingStyles: H, middlewareData: U, refs:
|
|
10403
|
+
let N = typeof a, F = "pds-popover", R = Z([`${F}__trigger-custom`, N === "string" ? `${F}__trigger-text` : ""]), z = a ? s : 0, B = m(null), { context: V, floatingStyles: H, middlewareData: U, refs: ee } = A({
|
|
10393
10404
|
placement: u,
|
|
10394
10405
|
open: j,
|
|
10395
10406
|
onOpenChange(e) {
|
|
@@ -10402,44 +10413,44 @@ var sr = {
|
|
|
10402
10413
|
x({ element: B })
|
|
10403
10414
|
],
|
|
10404
10415
|
whileElementsMounted: S
|
|
10405
|
-
}),
|
|
10416
|
+
}), W = () => {
|
|
10406
10417
|
M(!1), c && c();
|
|
10407
|
-
}, { getFloatingProps:
|
|
10418
|
+
}, { getFloatingProps: G, getReferenceProps: K } = P([
|
|
10408
10419
|
O(V),
|
|
10409
10420
|
k(V),
|
|
10410
10421
|
I(V)
|
|
10411
|
-
]),
|
|
10422
|
+
]), q = U.arrow?.x ?? 0, te = U.arrow?.y ?? 0, ne = q + Yi / 2, re = te + Ji, { isMounted: ie } = L(V, {
|
|
10412
10423
|
initial: { transform: "scale(0)" },
|
|
10413
10424
|
common: ({ side: e }) => ({ transformOrigin: {
|
|
10414
|
-
top: `${
|
|
10415
|
-
bottom: `${
|
|
10416
|
-
left: `calc(100% + ${Ji}px) ${
|
|
10417
|
-
right: `-8px ${
|
|
10425
|
+
top: `${ne}px calc(100% + ${Ji}px)`,
|
|
10426
|
+
bottom: `${ne}px -8px`,
|
|
10427
|
+
left: `calc(100% + ${Ji}px) ${re}px`,
|
|
10428
|
+
right: `-8px ${re}px`
|
|
10418
10429
|
}[e] })
|
|
10419
10430
|
});
|
|
10420
10431
|
return /* @__PURE__ */ e.createElement("div", {
|
|
10421
10432
|
className: Z([F, t]),
|
|
10422
10433
|
...D
|
|
10423
10434
|
}, /* @__PURE__ */ e.createElement("span", {
|
|
10424
|
-
ref:
|
|
10435
|
+
ref: ee.setReference,
|
|
10425
10436
|
className: `${F}__trigger`,
|
|
10426
10437
|
role: "button",
|
|
10427
10438
|
tabIndex: 0,
|
|
10428
|
-
...
|
|
10439
|
+
...K(),
|
|
10429
10440
|
...D
|
|
10430
10441
|
}, a ? /* @__PURE__ */ e.createElement("span", { className: R }, a) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, g), /* @__PURE__ */ e.createElement(Q, {
|
|
10431
10442
|
className: `${F}__icon`,
|
|
10432
10443
|
iconName: y,
|
|
10433
10444
|
size: T
|
|
10434
|
-
}))),
|
|
10445
|
+
}))), ie && /* @__PURE__ */ e.createElement(b, null, /* @__PURE__ */ e.createElement(v, {
|
|
10435
10446
|
context: V,
|
|
10436
10447
|
initialFocus: -1,
|
|
10437
10448
|
modal: o
|
|
10438
10449
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
10439
|
-
ref:
|
|
10450
|
+
ref: ee.setFloating,
|
|
10440
10451
|
className: Z([`${F}__container`, n]),
|
|
10441
10452
|
style: H,
|
|
10442
|
-
...
|
|
10453
|
+
...G()
|
|
10443
10454
|
}, /* @__PURE__ */ e.createElement(_, {
|
|
10444
10455
|
ref: B,
|
|
10445
10456
|
className: `${F}__arrow`,
|
|
@@ -10452,7 +10463,7 @@ var sr = {
|
|
|
10452
10463
|
width: Yi
|
|
10453
10464
|
}), /* @__PURE__ */ e.createElement("div", { className: `${F}__container-inner` }, p && /* @__PURE__ */ e.createElement("div", { className: `${F}__title` }, p), i && /* @__PURE__ */ e.createElement("div", { className: `${F}__content` }, i), o && /* @__PURE__ */ e.createElement("div", { className: `${F}__close-wrapper` }, /* @__PURE__ */ e.createElement(Xt, {
|
|
10454
10465
|
ariaLabel: r,
|
|
10455
|
-
onClick:
|
|
10466
|
+
onClick: W,
|
|
10456
10467
|
size: "s"
|
|
10457
10468
|
})))))));
|
|
10458
10469
|
}, Zi = {
|
|
@@ -10763,7 +10774,7 @@ function fa(e) {
|
|
|
10763
10774
|
//#endregion
|
|
10764
10775
|
//#region src/components/SortableList/SortableList.tsx
|
|
10765
10776
|
var pa = 24, ma = { droppable: { strategy: _e.Always } }, ha = a(function({ children: n, className: r, columns: i, defaultItems: a, getItemLabel: c = (e) => String(e.id), isDragEnabled: l, isItemLocked: u = () => !1, isNestingLocked: f = () => !1, items: g, maxDepth: _ = 0, onReorder: v, renderRow: y, reorderMode: b = "always", screenReaderInstructions: x, ...S }, C) {
|
|
10766
|
-
let w = "pds-sortable-list", [T, E] = h(null), D = m(null), [O, k] = h(!1), A = m(!1), [j, M] = h(null), N = m(0), P = m(0), F = m("pointer"), I = m(0), L = m(null), [R, z] = h(0), B = m(0), [V, H] = h(0), U = m(0),
|
|
10777
|
+
let w = "pds-sortable-list", [T, E] = h(null), D = m(null), [O, k] = h(!1), A = m(!1), [j, M] = h(null), N = m(0), P = m(0), F = m("pointer"), I = m(0), L = m(null), [R, z] = h(0), B = m(0), [V, H] = h(0), U = m(0), ee = s((e, t) => {
|
|
10767
10778
|
if (_ > 0 && (e.key === "ArrowLeft" || e.key === "ArrowRight")) {
|
|
10768
10779
|
e.preventDefault();
|
|
10769
10780
|
let n = e.key === "ArrowRight" ? 1 : -1, r = B.current, i = Math.max(-_, Math.min(_, r + n)), a = i - r;
|
|
@@ -10773,66 +10784,66 @@ var pa = 24, ma = { droppable: { strategy: _e.Always } }, ha = a(function({ chil
|
|
|
10773
10784
|
};
|
|
10774
10785
|
}
|
|
10775
10786
|
return Ce(e, t);
|
|
10776
|
-
}, [_]),
|
|
10787
|
+
}, [_]), W = b === "always" || b === "toggle" && (l ?? !1), { currentItems: G, expandItem: K, flatNodes: q, handleReorder: te, resetToSnapshot: ne, sortableIds: re, toggleExpand: ie } = ua({
|
|
10777
10788
|
defaultItems: a,
|
|
10778
|
-
isDragEnabled:
|
|
10789
|
+
isDragEnabled: W,
|
|
10779
10790
|
items: g,
|
|
10780
10791
|
onReorder: v
|
|
10781
10792
|
});
|
|
10782
|
-
d(C, () => ({ resetToSnapshot:
|
|
10783
|
-
let
|
|
10793
|
+
d(C, () => ({ resetToSnapshot: ne }), [ne]);
|
|
10794
|
+
let ae = xe(be(ve, { activationConstraint: { distance: 5 } }), be(ge, { coordinateGetter: ee })), J = W ? `${w}--reorder-active` : null, Y = p(() => new Set(q.filter((e) => u(e.data)).map((e) => e.id)), [q, u]), oe = p(() => new Set(q.filter((e) => f(e.data)).map((e) => e.id)), [q, f]), X = s((e) => {
|
|
10784
10795
|
if (_ === 0 || oe.has(String(e))) return !1;
|
|
10785
|
-
let t =
|
|
10796
|
+
let t = q.find((t) => t.id === e);
|
|
10786
10797
|
return !t || t.depth >= _ ? !1 : t.hasChildren ? !t.isExpanded : !0;
|
|
10787
10798
|
}, [
|
|
10788
|
-
|
|
10799
|
+
q,
|
|
10789
10800
|
_,
|
|
10790
10801
|
oe
|
|
10791
10802
|
]), se = s((e) => j && X(j) ? null : Te(e), [X, j]), ce = p(() => {
|
|
10792
10803
|
if (!T || !j || Y.size === 0 || T === j || X(j)) return /* @__PURE__ */ new Set();
|
|
10793
|
-
let e =
|
|
10804
|
+
let e = q.findIndex((e) => e.id === T), t = q.findIndex((e) => e.id === j);
|
|
10794
10805
|
if (e === -1 || t === -1) return /* @__PURE__ */ new Set();
|
|
10795
10806
|
let [n, r] = e < t ? [e + 1, t - 1] : [t + 1, e - 1];
|
|
10796
|
-
return new Set(
|
|
10807
|
+
return new Set(q.slice(n, r + 1).filter((e) => Y.has(e.id)).map((e) => e.id));
|
|
10797
10808
|
}, [
|
|
10798
10809
|
T,
|
|
10799
|
-
|
|
10810
|
+
q,
|
|
10800
10811
|
X,
|
|
10801
10812
|
Y,
|
|
10802
10813
|
j
|
|
10803
|
-
]).size > 0, le = p(() => T ?
|
|
10814
|
+
]).size > 0, le = p(() => T ? q.find((e) => e.id === T) ?? null : null, [T, q]), ue = p(() => T ? sa(G, String(T)) ?? null : null, [T, G]), de = p(() => {
|
|
10804
10815
|
let e = le?.depth ?? 0;
|
|
10805
|
-
return !T || !j || O || _ === 0 ? e : ca(
|
|
10816
|
+
return !T || !j || O || _ === 0 ? e : ca(q, String(T), String(j), V * pa, pa, _);
|
|
10806
10817
|
}, [
|
|
10807
10818
|
T,
|
|
10808
10819
|
le,
|
|
10809
10820
|
V,
|
|
10810
|
-
|
|
10821
|
+
q,
|
|
10811
10822
|
O,
|
|
10812
10823
|
_,
|
|
10813
10824
|
j
|
|
10814
10825
|
]), fe = p(() => {
|
|
10815
10826
|
if (!T || O || de === 0 || j && X(j)) return null;
|
|
10816
|
-
let e =
|
|
10817
|
-
return e === -1 ? null : ga(
|
|
10827
|
+
let e = q.findIndex((e) => e.id === T);
|
|
10828
|
+
return e === -1 ? null : ga(q, e, de);
|
|
10818
10829
|
}, [
|
|
10819
10830
|
T,
|
|
10820
|
-
|
|
10831
|
+
q,
|
|
10821
10832
|
X,
|
|
10822
10833
|
O,
|
|
10823
10834
|
j,
|
|
10824
10835
|
de
|
|
10825
10836
|
]), pe = s((e) => {
|
|
10826
|
-
let { active: t } = e, n = F.current === "keyboard", r =
|
|
10827
|
-
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, U.current = 0, H(0), B.current = 0, z(0), r?.hasChildren && r?.isExpanded && (
|
|
10828
|
-
}, [
|
|
10837
|
+
let { active: t } = e, n = F.current === "keyboard", r = q.find((e) => e.id === t.id);
|
|
10838
|
+
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, U.current = 0, H(0), B.current = 0, z(0), r?.hasChildren && r?.isExpanded && (ie(String(t.id)), L.current = String(t.id));
|
|
10839
|
+
}, [q, ie]), _e = s((e) => {
|
|
10829
10840
|
let t = ye(e);
|
|
10830
10841
|
if (!t.length || !D.current || Y.size === 0) return t;
|
|
10831
|
-
let n =
|
|
10842
|
+
let n = q.findIndex((e) => e.id === D.current);
|
|
10832
10843
|
for (let e of t) {
|
|
10833
10844
|
let t = e.id;
|
|
10834
10845
|
if (t === D.current) return [e];
|
|
10835
|
-
let r =
|
|
10846
|
+
let r = q.findIndex((e) => e.id === t);
|
|
10836
10847
|
if (n === -1 || r === -1) return [e];
|
|
10837
10848
|
if (Y.has(String(t))) {
|
|
10838
10849
|
if (n > r) continue;
|
|
@@ -10840,39 +10851,39 @@ var pa = 24, ma = { droppable: { strategy: _e.Always } }, ha = a(function({ chil
|
|
|
10840
10851
|
if (!X(t) && (!e || !i)) continue;
|
|
10841
10852
|
}
|
|
10842
10853
|
let [i, a] = n < r ? [n + 1, r - 1] : [r + 1, n - 1];
|
|
10843
|
-
if (!
|
|
10854
|
+
if (!q.slice(i, a + 1).some((e) => Y.has(e.id))) return [e];
|
|
10844
10855
|
}
|
|
10845
10856
|
return [];
|
|
10846
10857
|
}, [
|
|
10847
|
-
|
|
10858
|
+
q,
|
|
10848
10859
|
Y,
|
|
10849
10860
|
oe
|
|
10850
10861
|
]), we = s((e) => {
|
|
10851
10862
|
let t = e.over?.id ?? null, n = D.current;
|
|
10852
10863
|
if (t && n && t !== n && Y.size > 0) {
|
|
10853
|
-
let e =
|
|
10864
|
+
let e = q.findIndex((e) => e.id === n), r = q.findIndex((e) => e.id === t);
|
|
10854
10865
|
if (e !== -1 && r !== -1) {
|
|
10855
10866
|
let [t, n] = e < r ? [e + 1, r] : [r, e - 1];
|
|
10856
|
-
if (
|
|
10867
|
+
if (q.slice(t, n + 1).some((e) => Y.has(e.id))) return;
|
|
10857
10868
|
}
|
|
10858
10869
|
}
|
|
10859
10870
|
M(t);
|
|
10860
|
-
}, [
|
|
10871
|
+
}, [q, Y]), Ee = s((e) => {
|
|
10861
10872
|
let t = e.delta.x;
|
|
10862
10873
|
if (P.current = t, A.current || _ === 0) return;
|
|
10863
10874
|
let n = Math.floor(t / pa), r = U.current;
|
|
10864
10875
|
(n > r || n < r && t < r * pa - pa * .4) && (U.current = n, H(n));
|
|
10865
10876
|
}, [_]), De = s((e) => {
|
|
10866
10877
|
let { active: t, over: n } = e, r = A.current, i = B.current, a = U.current;
|
|
10867
|
-
E(null), D.current = null, k(!1), A.current = !1, M(null), U.current = 0, H(0), L.current && (
|
|
10868
|
-
let o =
|
|
10869
|
-
if (r && i > 0 && c && o > 0 && (l =
|
|
10878
|
+
E(null), D.current = null, k(!1), A.current = !1, M(null), U.current = 0, H(0), L.current && (K(L.current), L.current = null);
|
|
10879
|
+
let o = q.findIndex((e) => e.id === t.id), s = r ? i * pa : a * pa, c = !n || t.id === n.id, l = n?.id ?? null;
|
|
10880
|
+
if (r && i > 0 && c && o > 0 && (l = q[o - 1].id), !l || t.id === l) {
|
|
10870
10881
|
if (o === -1) return;
|
|
10871
|
-
let e =
|
|
10882
|
+
let e = q[o];
|
|
10872
10883
|
if (!e) return;
|
|
10873
|
-
let n = ca(
|
|
10884
|
+
let n = ca(q, String(t.id), String(t.id), s, pa, _);
|
|
10874
10885
|
if (n === e.depth) return;
|
|
10875
|
-
let r = [...
|
|
10886
|
+
let r = [...q], [i] = r.splice(o, 1), a = ga(r, o, n);
|
|
10876
10887
|
if (a && oe.has(a)) return;
|
|
10877
10888
|
let c = {
|
|
10878
10889
|
...i,
|
|
@@ -10880,18 +10891,18 @@ var pa = 24, ma = { droppable: { strategy: _e.Always } }, ha = a(function({ chil
|
|
|
10880
10891
|
parentId: a
|
|
10881
10892
|
};
|
|
10882
10893
|
r.splice(o, 0, c);
|
|
10883
|
-
let l =
|
|
10894
|
+
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);
|
|
10884
10895
|
if (l.some((e, t) => Y.has(e) ? u.indexOf(e) !== t : !1)) return;
|
|
10885
|
-
|
|
10896
|
+
te(r), n > 0 && a && K(a);
|
|
10886
10897
|
return;
|
|
10887
10898
|
}
|
|
10888
|
-
let u =
|
|
10899
|
+
let u = q.findIndex((e) => e.id === l);
|
|
10889
10900
|
if (o === -1 || u === -1) return;
|
|
10890
|
-
let d = [...
|
|
10901
|
+
let d = [...q], f = d[o].depth, [p] = d.splice(o, 1), m = [];
|
|
10891
10902
|
for (; d.length > o && d[o].depth > f;) m.push(d.splice(o, 1)[0]);
|
|
10892
10903
|
let h = d.findIndex((e) => e.id === l), g, v;
|
|
10893
10904
|
if (X(l)) {
|
|
10894
|
-
let e =
|
|
10905
|
+
let e = q[u];
|
|
10895
10906
|
g = Math.min(e.depth + 1, _), v = String(l);
|
|
10896
10907
|
} else {
|
|
10897
10908
|
g = ca(d, String(t.id), String(l), s, pa, _, p.depth);
|
|
@@ -10906,42 +10917,42 @@ var pa = 24, ma = { droppable: { strategy: _e.Always } }, ha = a(function({ chil
|
|
|
10906
10917
|
}, b = d[h], x = b && b.depth === g - 1 && v === String(l) || o < u ? h + 1 : h;
|
|
10907
10918
|
d.splice(x, 0, y, ...m);
|
|
10908
10919
|
let S = new Set([String(t.id), ...m.map((e) => e.id)]);
|
|
10909
|
-
|
|
10920
|
+
q.some((e, t) => !Y.has(e.id) || S.has(e.id) || e.id === v ? !1 : d.findIndex((t) => t.id === e.id) !== t) || (te(d), g > 0 && v !== null && K(v));
|
|
10910
10921
|
}, [
|
|
10922
|
+
K,
|
|
10911
10923
|
q,
|
|
10912
|
-
|
|
10913
|
-
ee,
|
|
10924
|
+
te,
|
|
10914
10925
|
X,
|
|
10915
10926
|
Y,
|
|
10916
10927
|
_,
|
|
10917
10928
|
oe
|
|
10918
10929
|
]), Oe = s(() => {
|
|
10919
|
-
E(null), D.current = null, k(!1), A.current = !1, M(null), P.current = 0, U.current = 0, H(0), B.current = 0, z(0), L.current && (
|
|
10920
|
-
}, [
|
|
10930
|
+
E(null), D.current = null, k(!1), A.current = !1, M(null), P.current = 0, U.current = 0, H(0), B.current = 0, z(0), L.current && (K(L.current), L.current = null);
|
|
10931
|
+
}, [K]), ke = p(() => ({
|
|
10921
10932
|
onDragStart({ active: e }) {
|
|
10922
|
-
let t =
|
|
10923
|
-
return `Picked up ${n ? c(n) : String(e.id)}. Current position: ${t ?
|
|
10933
|
+
let t = q.find((t) => t.id === e.id), n = sa(G, String(e.id));
|
|
10934
|
+
return `Picked up ${n ? c(n) : String(e.id)}. Current position: ${t ? q.indexOf(t) + 1 : "?"} of ${q.length} at depth ${t?.depth ?? 0}.`;
|
|
10924
10935
|
},
|
|
10925
10936
|
onDragOver({ active: e, over: t }) {
|
|
10926
10937
|
if (!t) return;
|
|
10927
|
-
let n =
|
|
10938
|
+
let n = q.findIndex((e) => e.id === t.id);
|
|
10928
10939
|
if (n === -1) return;
|
|
10929
|
-
let r = sa(
|
|
10930
|
-
return `Moving ${i}. Target position: ${n + 1} of ${
|
|
10940
|
+
let r = sa(G, String(e.id)), i = r ? c(r) : String(e.id), a = ca(q, String(e.id), String(t.id), P.current, pa, _);
|
|
10941
|
+
return `Moving ${i}. Target position: ${n + 1} of ${q.length} at depth ${a}.`;
|
|
10931
10942
|
},
|
|
10932
10943
|
onDragEnd({ active: e, over: t }) {
|
|
10933
|
-
let n = sa(
|
|
10944
|
+
let n = sa(G, String(e.id)), r = n ? c(n) : String(e.id);
|
|
10934
10945
|
if (!t || e.id === t.id) return `${r} dropped. No change in position.`;
|
|
10935
|
-
let i =
|
|
10936
|
-
return `${r} dropped at position ${i + 1} of ${
|
|
10946
|
+
let i = q.findIndex((e) => e.id === t.id), a = ca(q, String(e.id), String(t.id), P.current, pa, _);
|
|
10947
|
+
return `${r} dropped at position ${i + 1} of ${q.length} at depth ${a}.`;
|
|
10937
10948
|
},
|
|
10938
10949
|
onDragCancel({ active: e }) {
|
|
10939
|
-
let t =
|
|
10940
|
-
return `Sorting cancelled. ${n ? c(n) : String(e.id)} returned to position ${t ?
|
|
10950
|
+
let t = q.find((t) => t.id === e.id), n = sa(G, String(e.id));
|
|
10951
|
+
return `Sorting cancelled. ${n ? c(n) : String(e.id)} returned to position ${t ? q.indexOf(t) + 1 : "?"} of ${q.length}.`;
|
|
10941
10952
|
}
|
|
10942
10953
|
}), [
|
|
10943
|
-
|
|
10944
|
-
|
|
10954
|
+
G,
|
|
10955
|
+
q,
|
|
10945
10956
|
c,
|
|
10946
10957
|
_
|
|
10947
10958
|
]), Ae = { columns: i }, je = t.map(n, (t) => o(t) && t.type === la ? e.cloneElement(t, Ae) : t);
|
|
@@ -10957,14 +10968,14 @@ var pa = 24, ma = { droppable: { strategy: _e.Always } }, ha = a(function({ chil
|
|
|
10957
10968
|
onDragMove: Ee,
|
|
10958
10969
|
onDragOver: we,
|
|
10959
10970
|
onDragStart: pe,
|
|
10960
|
-
sensors:
|
|
10971
|
+
sensors: ae
|
|
10961
10972
|
}, /* @__PURE__ */ e.createElement(Se, {
|
|
10962
|
-
items:
|
|
10973
|
+
items: re,
|
|
10963
10974
|
strategy: se
|
|
10964
10975
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
10965
10976
|
className: Z([
|
|
10966
10977
|
w,
|
|
10967
|
-
|
|
10978
|
+
J,
|
|
10968
10979
|
r ?? ""
|
|
10969
10980
|
]),
|
|
10970
10981
|
onKeyDownCapture: () => {
|
|
@@ -10975,7 +10986,7 @@ var pa = 24, ma = { droppable: { strategy: _e.Always } }, ha = a(function({ chil
|
|
|
10975
10986
|
},
|
|
10976
10987
|
role: "list",
|
|
10977
10988
|
...S
|
|
10978
|
-
}, je,
|
|
10989
|
+
}, je, q.map((t) => {
|
|
10979
10990
|
let n = {
|
|
10980
10991
|
depth: t.depth,
|
|
10981
10992
|
hasChildren: t.hasChildren,
|
|
@@ -10983,18 +10994,18 @@ var pa = 24, ma = { droppable: { strategy: _e.Always } }, ha = a(function({ chil
|
|
|
10983
10994
|
isDragging: t.id === T,
|
|
10984
10995
|
isExpanded: t.isExpanded,
|
|
10985
10996
|
isLocked: Y.has(t.id),
|
|
10986
|
-
toggleExpand: () =>
|
|
10997
|
+
toggleExpand: () => ie(t.id)
|
|
10987
10998
|
}, r = y(t.data, n), a = t.id === T, s = {
|
|
10988
10999
|
columns: i,
|
|
10989
11000
|
depth: t.depth,
|
|
10990
11001
|
hasChildren: t.hasChildren,
|
|
10991
|
-
isDragActive:
|
|
11002
|
+
isDragActive: W,
|
|
10992
11003
|
isDragging: a,
|
|
10993
11004
|
isDropTarget: t.id === j && X(t.id),
|
|
10994
11005
|
isProjectedParent: t.id === fe && !oe.has(t.id),
|
|
10995
11006
|
isExpanded: t.isExpanded,
|
|
10996
11007
|
...Y.has(t.id) ? { isLocked: !0 } : {},
|
|
10997
|
-
onToggleExpand: () =>
|
|
11008
|
+
onToggleExpand: () => ie(t.id),
|
|
10998
11009
|
...a && !O && _ > 0 ? { projectedDepthDelta: de - t.depth } : {}
|
|
10999
11010
|
};
|
|
11000
11011
|
return o(r) ? e.cloneElement(r, {
|
|
@@ -11313,16 +11324,16 @@ var _a = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11313
11324
|
className: Z([a, t ?? ""]),
|
|
11314
11325
|
...i
|
|
11315
11326
|
}, /* @__PURE__ */ e.createElement("ol", { className: `${a}__steps` }, r && c));
|
|
11316
|
-
}, wa = ({ className: t, closeDetailPanelLabel: n = "Close detail panel", columns: r, currentPage: i, defaultSortKey: a, defaultSortOrder: o = "asc", detailPanelNav: s = !0, detailPanelTitle: c, detailPanelWidth: d, emptyState: f, emptyStateHeading: m = "No results found.", emptyStateMessage: g, footer: _, getPageSizeLabel: v = (e) => `Show ${e} rows per page`, getRowClassName: y, getRowId: b, getSelectRowLabel: x = (e, t) => `Select row ${t}`, getSortLabel: S = (e) => `Sort by ${e}`, inspectedRowId: C, isLoading: w = !1, itemsPerPage: T, loadingRowCount: E = 5, nextDetailPanelRowLabel: D = "Next row", onDetailPanelNext: O, onDetailPanelPrev: k, onPageChange: A, onPageSizeChange: j, onRowInspect: M, onRowSelectionChange: N, onSort: P, pageSizeOptions: F, panel: I, prevDetailPanelRowLabel: L = "Previous row", renderDetailPanel: R, renderDetailPanelFooter: z, rowData: B, selectAllLabel: V = "Select all rows", selectedRows: H, sortKey: U, sortOrder:
|
|
11317
|
-
let
|
|
11327
|
+
}, wa = ({ className: t, closeDetailPanelLabel: n = "Close detail panel", columns: r, currentPage: i, defaultSortKey: a, defaultSortOrder: o = "asc", detailPanelNav: s = !0, detailPanelTitle: c, detailPanelWidth: d, emptyState: f, emptyStateHeading: m = "No results found.", emptyStateMessage: g, footer: _, getPageSizeLabel: v = (e) => `Show ${e} rows per page`, getRowClassName: y, getRowId: b, getSelectRowLabel: x = (e, t) => `Select row ${t}`, getSortLabel: S = (e) => `Sort by ${e}`, inspectedRowId: C, isLoading: w = !1, itemsPerPage: T, loadingRowCount: E = 5, nextDetailPanelRowLabel: D = "Next row", onDetailPanelNext: O, onDetailPanelPrev: k, onPageChange: A, onPageSizeChange: j, onRowInspect: M, onRowSelectionChange: N, onSort: P, pageSizeOptions: F, panel: I, prevDetailPanelRowLabel: L = "Previous row", renderDetailPanel: R, renderDetailPanelFooter: z, rowData: B, selectAllLabel: V = "Select all rows", selectedRows: H, sortKey: U, sortOrder: ee, totalItemCount: W, ...G }) => {
|
|
11328
|
+
let K = "pds-table", q = u(), te = u(), ne = P !== void 0, re = A !== void 0, ie = j !== void 0, ae = re || T !== void 0 || F !== void 0, [J, Y] = h({
|
|
11318
11329
|
key: a ?? "",
|
|
11319
11330
|
order: a === void 0 ? "asc" : o
|
|
11320
|
-
}), [oe, X] = h(1), [se, ce] = h(T ?? F?.[0] ?? 10), [le, ue] = h(null), de = C ?? le, fe = !!de && !!R, pe =
|
|
11321
|
-
|
|
11331
|
+
}), [oe, X] = h(1), [se, ce] = h(T ?? F?.[0] ?? 10), [le, ue] = h(null), de = C ?? le, fe = !!de && !!R, pe = re ? T ?? 10 : se, me = (e) => {
|
|
11332
|
+
ie ? j(e) : ce(e), re || X(1);
|
|
11322
11333
|
};
|
|
11323
11334
|
l(() => {
|
|
11324
|
-
|
|
11325
|
-
}, [B.length,
|
|
11335
|
+
re || X(1);
|
|
11336
|
+
}, [B.length, re]), l(() => {
|
|
11326
11337
|
process.env.NODE_ENV !== "production" && i !== void 0 && !A && console.warn("[Table] `currentPage` was provided without `onPageChange`. Controlled pagination requires both props. The table is running in uncontrolled mode.");
|
|
11327
11338
|
}, []);
|
|
11328
11339
|
let he = N !== void 0, ge = H !== void 0, [_e, ve] = h(/* @__PURE__ */ new Set()), ye = ge ? new Set(H) : _e, be = p(() => new Map(B.map((e, t) => [e, t])), [B]), xe = (e, t) => b ? b(e) : String(be.get(e) ?? t), Se = p(() => B.findIndex((e, t) => (b ? b(e) : String(be.get(e) ?? t)) === de), [
|
|
@@ -11342,37 +11353,37 @@ var _a = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11342
11353
|
if (Se >= B.length - 1) return;
|
|
11343
11354
|
let e = B[Se + 1], t = xe(e, Se + 1);
|
|
11344
11355
|
C === void 0 && ue(t), M?.(e, t), O?.(e, t);
|
|
11345
|
-
}, Oe =
|
|
11356
|
+
}, Oe = ne ? U ?? "" : J.key, ke = ne ? ee ?? "asc" : J.order, Ae = p(() => {
|
|
11346
11357
|
if (w) return [];
|
|
11347
11358
|
let e = B;
|
|
11348
|
-
if (!
|
|
11349
|
-
let t = r.find((e) => e.id ===
|
|
11359
|
+
if (!ne && J.key !== "") {
|
|
11360
|
+
let t = r.find((e) => e.id === J.key)?.sortKey ?? J.key;
|
|
11350
11361
|
e = [...e].sort((e, n) => {
|
|
11351
11362
|
let r = String(e[t]).localeCompare(String(n[t]));
|
|
11352
|
-
return
|
|
11363
|
+
return J.order === "asc" ? r : -r;
|
|
11353
11364
|
});
|
|
11354
11365
|
}
|
|
11355
|
-
if (!
|
|
11366
|
+
if (!re && ae && pe) {
|
|
11356
11367
|
let t = (oe - 1) * pe;
|
|
11357
11368
|
e = e.slice(t, t + pe);
|
|
11358
11369
|
}
|
|
11359
11370
|
return e;
|
|
11360
11371
|
}, [
|
|
11361
11372
|
B,
|
|
11362
|
-
|
|
11363
|
-
te,
|
|
11373
|
+
J,
|
|
11364
11374
|
ne,
|
|
11365
|
-
|
|
11375
|
+
re,
|
|
11376
|
+
ae,
|
|
11366
11377
|
oe,
|
|
11367
11378
|
pe,
|
|
11368
11379
|
w
|
|
11369
11380
|
]), je = (e) => {
|
|
11370
|
-
|
|
11381
|
+
ne ? P(e, U === e && ee === "asc" ? "desc" : "asc") : Y((t) => ({
|
|
11371
11382
|
key: e,
|
|
11372
11383
|
order: t.key === e && t.order === "asc" ? "desc" : "asc"
|
|
11373
11384
|
}));
|
|
11374
11385
|
}, Me = (e) => Oe === e ? ke === "asc" ? "ascending" : "descending" : "none", Ne = (e, t) => {
|
|
11375
|
-
let n = `${
|
|
11386
|
+
let n = `${K}__sort-button-${t}`, r = !w && Ae.length === 0;
|
|
11376
11387
|
if (w || r || Oe === "") return t === "top" ? `${n}--inactive` : "";
|
|
11377
11388
|
let i = Oe === e;
|
|
11378
11389
|
return t === "top" ? i && ke === "asc" ? "" : `${n}--inactive` : i && ke === "desc" ? `${n}--desc` : "";
|
|
@@ -11404,8 +11415,8 @@ var _a = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11404
11415
|
key: `row-${i}`,
|
|
11405
11416
|
"aria-selected": a ? o : void 0,
|
|
11406
11417
|
className: Z([
|
|
11407
|
-
a ? `${
|
|
11408
|
-
o ? `${
|
|
11418
|
+
a ? `${K}__row--inspectable` : null,
|
|
11419
|
+
o ? `${K}__row--inspected` : null,
|
|
11409
11420
|
y?.(t, i) ?? null
|
|
11410
11421
|
]),
|
|
11411
11422
|
onClick: a ? () => we(t, i) : void 0,
|
|
@@ -11415,7 +11426,7 @@ var _a = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11415
11426
|
tabIndex: a ? 0 : void 0
|
|
11416
11427
|
}, he && /* @__PURE__ */ e.createElement("td", { className: "pds-table__checkbox-cell" }, /* @__PURE__ */ e.createElement(vr, {
|
|
11417
11428
|
checked: ye.has(i),
|
|
11418
|
-
id: `${
|
|
11429
|
+
id: `${te}-row-${i}`,
|
|
11419
11430
|
label: x(t, n + 1),
|
|
11420
11431
|
onChange: () => Le(i),
|
|
11421
11432
|
showLabel: !1
|
|
@@ -11425,11 +11436,11 @@ var _a = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11425
11436
|
style: He
|
|
11426
11437
|
}, /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__table-column" }, /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__table-area" }, /* @__PURE__ */ e.createElement("table", {
|
|
11427
11438
|
"aria-busy": w,
|
|
11428
|
-
className: Z([
|
|
11429
|
-
...
|
|
11439
|
+
className: Z([K, t]),
|
|
11440
|
+
...G
|
|
11430
11441
|
}, /* @__PURE__ */ e.createElement("thead", null, /* @__PURE__ */ e.createElement("tr", null, he && /* @__PURE__ */ e.createElement("th", { className: "pds-table__checkbox-cell" }, /* @__PURE__ */ e.createElement(vr, {
|
|
11431
11442
|
checked: Fe,
|
|
11432
|
-
id:
|
|
11443
|
+
id: te,
|
|
11433
11444
|
indeterminate: Ie,
|
|
11434
11445
|
label: V,
|
|
11435
11446
|
onChange: Re,
|
|
@@ -11439,21 +11450,21 @@ var _a = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11439
11450
|
"aria-sort": t.sortable ? Me(t.id) : void 0
|
|
11440
11451
|
}, t.sortable ? /* @__PURE__ */ e.createElement("button", {
|
|
11441
11452
|
"aria-label": S(Wt(t.header)),
|
|
11442
|
-
className: `${
|
|
11453
|
+
className: `${K}__sort-button`,
|
|
11443
11454
|
onClick: () => je(t.id),
|
|
11444
11455
|
type: "button"
|
|
11445
11456
|
}, t.header, /* @__PURE__ */ e.createElement("span", {
|
|
11446
11457
|
"aria-hidden": "true",
|
|
11447
|
-
className: `${
|
|
11448
|
-
}, /* @__PURE__ */ e.createElement("span", { className: Z([`${
|
|
11458
|
+
className: `${K}__sort-icons`
|
|
11459
|
+
}, /* @__PURE__ */ e.createElement("span", { className: Z([`${K}__sort-button-top`, Ne(t.id, "top")]) }, /* @__PURE__ */ e.createElement(Q, {
|
|
11449
11460
|
iconName: "caretUp",
|
|
11450
11461
|
size: "m"
|
|
11451
|
-
})), /* @__PURE__ */ e.createElement("span", { className: Z([`${
|
|
11462
|
+
})), /* @__PURE__ */ e.createElement("span", { className: Z([`${K}__sort-button-bottom`, Ne(t.id, "bottom")]) }, /* @__PURE__ */ e.createElement(Q, {
|
|
11452
11463
|
iconName: "caretDown",
|
|
11453
11464
|
size: "m"
|
|
11454
|
-
})))) : /* @__PURE__ */ e.createElement("span", null, t.header))))), /* @__PURE__ */ e.createElement("tbody", null, w ? Array.from({ length: E }, (e, t) => ze(t)) : Ae.length === 0 ? Be() : Ae.map((e, t) => Ve(e, t))))),
|
|
11465
|
+
})))) : /* @__PURE__ */ e.createElement("span", null, t.header))))), /* @__PURE__ */ e.createElement("tbody", null, w ? Array.from({ length: E }, (e, t) => ze(t)) : Ae.length === 0 ? Be() : Ae.map((e, t) => Ve(e, t))))), ae && !w && (re || B.length > 0) && /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__pagination" }, F && F.length > 0 && /* @__PURE__ */ e.createElement(Fn, {
|
|
11455
11466
|
autoWidth: !0,
|
|
11456
|
-
id:
|
|
11467
|
+
id: q,
|
|
11457
11468
|
label: "Rows per page",
|
|
11458
11469
|
onOptionSelect: (e) => me(Number(e.value)),
|
|
11459
11470
|
options: F.map((e) => ({
|
|
@@ -11464,10 +11475,10 @@ var _a = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11464
11475
|
size: "s",
|
|
11465
11476
|
value: String(pe)
|
|
11466
11477
|
}), /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__pagination-controls" }, /* @__PURE__ */ e.createElement(Li, {
|
|
11467
|
-
currentPage:
|
|
11478
|
+
currentPage: re ? i ?? 1 : oe,
|
|
11468
11479
|
itemsPerPage: pe,
|
|
11469
|
-
onPageChange:
|
|
11470
|
-
totalItemCount:
|
|
11480
|
+
onPageChange: re ? A : X,
|
|
11481
|
+
totalItemCount: re ? W ?? 0 : B.length
|
|
11471
11482
|
}))), _ && /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__footer" }, _)), R && /* @__PURE__ */ e.createElement("div", { className: Z(["pds-table-wrapper__detail-panel", fe ? "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" }, c && /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__detail-panel-title" }, c), /* @__PURE__ */ e.createElement(Xt, {
|
|
11472
11483
|
ariaLabel: n,
|
|
11473
11484
|
onClick: Te,
|
|
@@ -11816,31 +11827,33 @@ var _a = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11816
11827
|
window.removeEventListener("resize", n);
|
|
11817
11828
|
};
|
|
11818
11829
|
}, []), n;
|
|
11819
|
-
}, Ba = ({ children: t, className: n, drawerContent: r, drawerProps: a, hasDrawerToggle: o, hasSidebarToggle: c, isDrawerOpen: u = !1, isSidebarCollapsed: d, keyboardShortcuts: p = !0, labels: g = {
|
|
11820
|
-
collapseSidebar: "Press [ to collapse sidebar",
|
|
11821
|
-
drawerToggle: "Open account menu",
|
|
11822
|
-
expandSidebar: "Press ] to expand sidebar"
|
|
11823
|
-
}, mainBackground: _, mainContentElement: v = "main", mainContentMaxWidth: y = 1600, mainContentProps: b, onDrawerToggle: x, onSidebarToggle: S, scrollableContent: C, sidebarBackground: w, sidebarCollapsedWidth: T = 4, sidebarExpandedWidth: E = "15%", sidebarExpandedWidthMax: D = 18, sidebarExpandedWidthMin: O = 14.75, sidebarProps: k, ...A }) => {
|
|
11830
|
+
}, Ba = ({ children: t, className: n, drawerContent: r, drawerProps: a, hasDrawerToggle: o, hasSidebarToggle: c, isDrawerOpen: u = !1, isSidebarCollapsed: d, keyboardShortcuts: p = !0, labels: g, mainBackground: _, mainContentElement: v = "main", mainContentMaxWidth: y = 1600, mainContentProps: b, onDrawerToggle: x, onSidebarToggle: S, scrollableContent: C, sidebarBackground: w, sidebarCollapsedWidth: T = 4, sidebarExpandedWidth: E = "15%", sidebarExpandedWidthMax: D = 18, sidebarExpandedWidthMin: O = 14.75, sidebarProps: k, ...A }) => {
|
|
11824
11831
|
let [j, M] = h(d || !1);
|
|
11825
11832
|
l(() => {
|
|
11826
11833
|
M(d || !1);
|
|
11827
11834
|
}, [d]);
|
|
11828
|
-
let N = "pds-app-layout", P = C ? `${N}--scrollable` : null, F =
|
|
11835
|
+
let N = "pds-app-layout", P = C ? `${N}--scrollable` : null, F = {
|
|
11836
|
+
collapseSidebar: "Press [ to collapse sidebar",
|
|
11837
|
+
drawerToggle: "Open account menu",
|
|
11838
|
+
expandSidebar: "Press ] to expand sidebar",
|
|
11839
|
+
skipToContent: "Skip to main content",
|
|
11840
|
+
...g
|
|
11841
|
+
}, I = b?.id ?? "app-layout-main", L = y == null ? void 0 : typeof y == "number" ? `${y}px` : y, R = j ? `${T}rem` : `${E}`, z = {
|
|
11829
11842
|
backgroundColor: w || void 0,
|
|
11830
11843
|
maxWidth: j ? void 0 : `${D}rem`,
|
|
11831
11844
|
minWidth: j ? `${T}rem` : `${O}rem`,
|
|
11832
|
-
width:
|
|
11833
|
-
},
|
|
11834
|
-
if (
|
|
11845
|
+
width: R
|
|
11846
|
+
}, B = m(!1), V = () => {
|
|
11847
|
+
if (B.current = !1, S) {
|
|
11835
11848
|
S();
|
|
11836
11849
|
return;
|
|
11837
11850
|
}
|
|
11838
11851
|
M(!j);
|
|
11839
|
-
},
|
|
11852
|
+
}, H = za();
|
|
11840
11853
|
l(() => {
|
|
11841
|
-
|
|
11842
|
-
}, [
|
|
11843
|
-
let
|
|
11854
|
+
H === "sm" && !j ? (B.current = !0, S ? S() : M(!0)) : H !== "sm" && B.current && (B.current = !1, S ? S() : M(!1));
|
|
11855
|
+
}, [H]);
|
|
11856
|
+
let U = s(() => {
|
|
11844
11857
|
let e = document.activeElement;
|
|
11845
11858
|
if (!e) return !1;
|
|
11846
11859
|
let t = e.tagName.toLowerCase();
|
|
@@ -11857,62 +11870,64 @@ var _a = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11857
11870
|
].includes(t);
|
|
11858
11871
|
}
|
|
11859
11872
|
return e.isContentEditable;
|
|
11860
|
-
}, []),
|
|
11873
|
+
}, []), ee = p && c;
|
|
11861
11874
|
bt("[", (e) => {
|
|
11862
|
-
|
|
11863
|
-
}, { enabled:
|
|
11864
|
-
|
|
11865
|
-
}, { enabled:
|
|
11866
|
-
let
|
|
11875
|
+
U() || (e.preventDefault(), j || V());
|
|
11876
|
+
}, { enabled: ee }), bt("]", (e) => {
|
|
11877
|
+
U() || (e.preventDefault(), j && V());
|
|
11878
|
+
}, { enabled: ee });
|
|
11879
|
+
let W = m(null);
|
|
11867
11880
|
f(() => {
|
|
11868
11881
|
let e = () => {
|
|
11869
|
-
if (!
|
|
11870
|
-
let e = Math.max(0, Math.round(
|
|
11871
|
-
|
|
11882
|
+
if (!W.current) return;
|
|
11883
|
+
let e = Math.max(0, Math.round(W.current.getBoundingClientRect().top + window.scrollY));
|
|
11884
|
+
W.current.style.setProperty("--pds-app-layout-top-offset", `${e}px`);
|
|
11872
11885
|
};
|
|
11873
11886
|
e();
|
|
11874
11887
|
let t = new ResizeObserver(e);
|
|
11875
11888
|
return t.observe(document.documentElement), () => t.disconnect();
|
|
11876
11889
|
}, []);
|
|
11877
|
-
let
|
|
11890
|
+
let G = Ie(t), K = G.__unslotted, q = G.header, te = G.footer, ne = G.sidebar, re = G.identity, ie = G["content-top"], ae = G.navigation, J = G["content-bottom"], Y = re || ie || ae || J, oe = Y ? /* @__PURE__ */ e.createElement(e.Fragment, null, (re || o) && /* @__PURE__ */ e.createElement("div", { className: `${N}__sidebar-identity` }, re, o && !j && /* @__PURE__ */ e.createElement(Jt, {
|
|
11878
11891
|
hasBorder: !0,
|
|
11879
|
-
ariaLabel:
|
|
11892
|
+
ariaLabel: F.drawerToggle,
|
|
11880
11893
|
className: `${N}__drawer-toggle`,
|
|
11881
11894
|
iconName: "sidebar",
|
|
11882
11895
|
onClick: x,
|
|
11883
11896
|
size: "s"
|
|
11884
|
-
})),
|
|
11897
|
+
})), ie && /* @__PURE__ */ e.createElement("div", { className: `${N}__sidebar-content-top` }, ie), ae && /* @__PURE__ */ e.createElement("div", { className: `${N}__sidebar-navigation` }, ae), J && /* @__PURE__ */ e.createElement("div", { className: `${N}__sidebar-content-bottom` }, J)) : ne, X = i(v, {
|
|
11885
11898
|
...b,
|
|
11886
11899
|
className: Z([`${N}__main`, b?.className]),
|
|
11900
|
+
id: I,
|
|
11901
|
+
tabIndex: b?.tabIndex ?? -1,
|
|
11887
11902
|
style: {
|
|
11888
11903
|
...b?.style,
|
|
11889
11904
|
backgroundColor: _ || void 0
|
|
11890
11905
|
}
|
|
11891
11906
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
11892
11907
|
className: `${N}__main-inner`,
|
|
11893
|
-
style: { maxWidth:
|
|
11894
|
-
},
|
|
11908
|
+
style: { maxWidth: L }
|
|
11909
|
+
}, K)), se = te ? /* @__PURE__ */ e.createElement("div", {
|
|
11895
11910
|
className: `${N}__content-column`,
|
|
11896
11911
|
style: { backgroundColor: _ || void 0 }
|
|
11897
|
-
},
|
|
11912
|
+
}, X, /* @__PURE__ */ e.createElement("div", { className: `${N}__footer` }, /* @__PURE__ */ e.createElement("div", {
|
|
11898
11913
|
className: `${N}__footer-inner`,
|
|
11899
|
-
style: { maxWidth:
|
|
11900
|
-
},
|
|
11914
|
+
style: { maxWidth: L }
|
|
11915
|
+
}, te))) : X, ce = /* @__PURE__ */ e.createElement(e.Fragment, null, (ne || Y) && /* @__PURE__ */ e.createElement("div", {
|
|
11901
11916
|
...k,
|
|
11902
11917
|
className: Z([
|
|
11903
11918
|
`${N}__sidebar`,
|
|
11904
11919
|
j ? `${N}__sidebar--collapsed` : null,
|
|
11905
11920
|
k?.className
|
|
11906
11921
|
]),
|
|
11907
|
-
style:
|
|
11922
|
+
style: z
|
|
11908
11923
|
}, c && /* @__PURE__ */ e.createElement(xt, {
|
|
11909
11924
|
className: `${N}__sidebar-toggle-tooltip`,
|
|
11910
|
-
content: j ?
|
|
11925
|
+
content: j ? F.expandSidebar : F.collapseSidebar,
|
|
11911
11926
|
customTrigger: /* @__PURE__ */ e.createElement("button", {
|
|
11912
11927
|
"aria-expanded": !j,
|
|
11913
|
-
"aria-label": j ?
|
|
11928
|
+
"aria-label": j ? F.expandSidebar : F.collapseSidebar,
|
|
11914
11929
|
className: `${N}__sidebar-toggle-button`,
|
|
11915
|
-
onClick:
|
|
11930
|
+
onClick: V,
|
|
11916
11931
|
type: "button"
|
|
11917
11932
|
}, /* @__PURE__ */ e.createElement("span", { className: `${N}__sidebar-toggle-icon` }, /* @__PURE__ */ e.createElement(Q, {
|
|
11918
11933
|
iconName: "angleLeft",
|
|
@@ -11924,17 +11939,20 @@ var _a = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11924
11939
|
crossAxis: -96
|
|
11925
11940
|
},
|
|
11926
11941
|
preferredPlacement: "right-end"
|
|
11927
|
-
}), /* @__PURE__ */ e.createElement("div", { className: `${N}__sidebar-inner` },
|
|
11942
|
+
}), /* @__PURE__ */ e.createElement("div", { className: `${N}__sidebar-inner` }, oe)), se);
|
|
11928
11943
|
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
|
|
11929
|
-
ref:
|
|
11944
|
+
ref: W,
|
|
11930
11945
|
className: Z([
|
|
11931
11946
|
N,
|
|
11932
11947
|
P,
|
|
11933
|
-
|
|
11948
|
+
q ? `${N}--has-header` : null,
|
|
11934
11949
|
n ?? ""
|
|
11935
11950
|
]),
|
|
11936
11951
|
...A
|
|
11937
|
-
},
|
|
11952
|
+
}, /* @__PURE__ */ e.createElement(zr, {
|
|
11953
|
+
destination: I,
|
|
11954
|
+
text: F.skipToContent
|
|
11955
|
+
}), q ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `${N}__header` }, q), /* @__PURE__ */ e.createElement("div", { className: `${N}__body` }, ce)) : ce), o && /* @__PURE__ */ e.createElement(ji, {
|
|
11938
11956
|
...a,
|
|
11939
11957
|
isOpen: u,
|
|
11940
11958
|
placement: "left",
|