@pantheon-systems/pds-toolkit-react 2.0.0-alpha.46 → 2.0.0-alpha.48
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 +0 -24
- package/dist/components/icons/Icon/generated-icon-data.d.ts +1 -1
- package/dist/components/inputs/Switch/Switch.d.ts +16 -0
- package/dist/css/component-css/pds-button.css +3 -1
- package/dist/css/component-css/pds-index.css +7 -3
- package/dist/css/component-css/pds-side-nav-global.css +1 -1
- package/dist/css/component-css/pds-switch.css +3 -1
- package/dist/css/design-tokens/variables.dark.css +6 -4
- package/dist/css/design-tokens/variables.light.css +9 -7
- package/dist/css/layout-css/pds-index.css +1 -1
- package/dist/css/layout-css/pds-stepper-layout.css +1 -1
- package/dist/css/pds-components.css +7 -3
- package/dist/css/pds-core.css +1 -1
- package/dist/css/pds-layouts.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +265 -263
- package/dist/index.js.map +1 -1
- package/dist/layouts/StepperLayout/StepperLayout.d.ts +5 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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, useSyncExternalStore as g } from "react";
|
|
2
2
|
import _ from "hash-sum";
|
|
3
3
|
import { FloatingArrow as v, FloatingFocusManager as y, FloatingOverlay as b, FloatingPortal as x, arrow as S, autoUpdate as C, flip as w, offset as T, safePolygon as E, shift as D, size as O, useClick as k, useDismiss as A, useFloating as j, useFocus as M, useHover as N, useId as P, useInteractions as F, useListNavigation as I, useRole as L, useTransitionStyles as R, useTypeahead as z } from "@floating-ui/react";
|
|
4
|
-
import { Bar as B, BarChart as V, CartesianGrid as H, Cell as U, Line as ee, LineChart as W, Pie as G, PieChart as K, ReferenceLine as q, ResponsiveContainer as te, Tooltip as ne, XAxis as
|
|
5
|
-
import { CodeBlock as
|
|
4
|
+
import { Bar as B, BarChart as V, CartesianGrid as H, Cell as U, Line as ee, LineChart as W, Pie as G, PieChart as K, ReferenceLine as q, ResponsiveContainer as te, Tooltip as ne, XAxis as J, YAxis as re } from "recharts";
|
|
5
|
+
import { CodeBlock as ie } from "react-code-block";
|
|
6
6
|
import { useCombobox as Y, useMultipleSelection as X } from "downshift";
|
|
7
7
|
import { format as ae } from "date-fns";
|
|
8
8
|
import { DayPicker as oe } from "react-day-picker";
|
|
@@ -4156,18 +4156,18 @@ var hn = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4156
4156
|
}, 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 }) => {
|
|
4157
4157
|
let T = Dt(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;
|
|
4158
4158
|
S === "error" && (N = "error"), S === "success" && (N = "success");
|
|
4159
|
-
let P = x || d, F = C !== void 0, I = r !== void 0, L = ((e) => e.reduce((e, t) => Rt(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:
|
|
4159
|
+
let P = x || d, F = C !== void 0, I = r !== void 0, L = ((e) => e.reduce((e, t) => Rt(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: J, transitionStyles: re } = rn({
|
|
4160
4160
|
enableClick: !i,
|
|
4161
4161
|
enableTypeahead: !0,
|
|
4162
4162
|
role: "listbox",
|
|
4163
4163
|
selectedIndex: V,
|
|
4164
4164
|
variant: "input"
|
|
4165
|
-
}),
|
|
4165
|
+
}), ie = V === null ? void 0 : L[V]?.label, Y = V === null ? void 0 : L[V]?.icon, X = V === null ? void 0 : L[V]?.value, ae = (e) => {
|
|
4166
4166
|
let t = L[e];
|
|
4167
|
-
F || (H(e),
|
|
4167
|
+
F || (H(e), J(!1)), m && m(t);
|
|
4168
4168
|
};
|
|
4169
4169
|
l(() => {
|
|
4170
|
-
F && (H(R(C)),
|
|
4170
|
+
F && (H(R(C)), J(!1));
|
|
4171
4171
|
}, [C]);
|
|
4172
4172
|
let oe = () => {
|
|
4173
4173
|
f && f(X);
|
|
@@ -4274,7 +4274,7 @@ var hn = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4274
4274
|
onBlur: oe,
|
|
4275
4275
|
onFocus: se
|
|
4276
4276
|
})
|
|
4277
|
-
}, N && /* @__PURE__ */ e.createElement(Nt, { variant: N }), /* @__PURE__ */ e.createElement("span", { className: `${E}__input-inner` }, /* @__PURE__ */ e.createElement("span", { className: `${E}__option-text` }, (Y || !
|
|
4277
|
+
}, N && /* @__PURE__ */ e.createElement(Nt, { variant: N }), /* @__PURE__ */ e.createElement("span", { className: `${E}__input-inner` }, /* @__PURE__ */ e.createElement("span", { className: `${E}__option-text` }, (Y || !ie && a) && le(Y || a, `${E}__icon`), /* @__PURE__ */ e.createElement("span", { className: `${E}__option-label-text` }, ie ?? u.selectOptionText)), /* @__PURE__ */ e.createElement(Q, {
|
|
4278
4278
|
className: `${E}__trigger-icon`,
|
|
4279
4279
|
iconName: "angleDown"
|
|
4280
4280
|
}))), q && /* @__PURE__ */ e.createElement("div", {
|
|
@@ -4285,7 +4285,7 @@ var hn = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4285
4285
|
zIndex: "var(--pds-z-index-dropdown)"
|
|
4286
4286
|
},
|
|
4287
4287
|
...W()
|
|
4288
|
-
}, /* @__PURE__ */ e.createElement("div", { style: { ...
|
|
4288
|
+
}, /* @__PURE__ */ e.createElement("div", { style: { ...re } }, /* @__PURE__ */ e.createElement("ul", {
|
|
4289
4289
|
className: `${E}__options`,
|
|
4290
4290
|
role: "group"
|
|
4291
4291
|
}, ue(g)))), P && /* @__PURE__ */ e.createElement(jt, {
|
|
@@ -4617,7 +4617,7 @@ var hn = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4617
4617
|
let t = Math.abs(e);
|
|
4618
4618
|
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);
|
|
4619
4619
|
}, ir = ({ 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: S, showTooltip: E, timePeriodOptions: O, tooltipContent: k, variant: A = "stacked", xAxisLabel: M, xAxisTickInterval: N, yAxisDomain: P, yAxisFormatter: F = rr, yAxisLabel: I, yAxisTickInterval: L, ...z }) => {
|
|
4620
|
-
let { accessibleTableDescription: U = "Bar chart data", emptyStateHeading: ee = "No data available", emptyStateMessage: W, legendTableHeader: G, loadingLabel: K = "Loading chart data" } = d, q = m(null),
|
|
4620
|
+
let { accessibleTableDescription: U = "Bar chart data", emptyStateHeading: ee = "No data available", emptyStateMessage: W, legendTableHeader: G, loadingLabel: K = "Loading chart data" } = d, q = m(null), ie = Hn(a, Jn(q, a)), Y = n ?? (u ? 60 : 360), X = r ?? (u ? 60 : void 0), ae = x ?? !u, oe = b ?? !u, se = S ?? !u, ce = E ?? !u, le = y ?? !0, [ue, de] = h(null), fe = m(ue);
|
|
4621
4621
|
ue && (fe.current = ue);
|
|
4622
4622
|
let pe = m({ getBoundingClientRect: () => ({
|
|
4623
4623
|
bottom: 0,
|
|
@@ -4750,7 +4750,7 @@ var hn = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4750
4750
|
stroke: "var(--pds-color-border-default)",
|
|
4751
4751
|
strokeDasharray: "3 3",
|
|
4752
4752
|
vertical: we
|
|
4753
|
-
}), /* @__PURE__ */ e.createElement(
|
|
4753
|
+
}), /* @__PURE__ */ e.createElement(J, {
|
|
4754
4754
|
axisLine: oe,
|
|
4755
4755
|
dataKey: we ? void 0 : "label",
|
|
4756
4756
|
hide: !oe,
|
|
@@ -4766,7 +4766,7 @@ var hn = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4766
4766
|
tickLine: !1,
|
|
4767
4767
|
tickMargin: 10,
|
|
4768
4768
|
type: we ? "number" : "category"
|
|
4769
|
-
}), /* @__PURE__ */ e.createElement(
|
|
4769
|
+
}), /* @__PURE__ */ e.createElement(re, {
|
|
4770
4770
|
axisLine: oe,
|
|
4771
4771
|
dataKey: we ? "label" : void 0,
|
|
4772
4772
|
domain: P,
|
|
@@ -4798,12 +4798,12 @@ var hn = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4798
4798
|
}), v.map((t, n) => /* @__PURE__ */ e.createElement(B, {
|
|
4799
4799
|
key: t.dataKey,
|
|
4800
4800
|
dataKey: t.dataKey,
|
|
4801
|
-
fill: Kn(n,
|
|
4801
|
+
fill: Kn(n, ie, t.color, Un(a, t.paletteIndex)),
|
|
4802
4802
|
name: t.label,
|
|
4803
4803
|
onMouseEnter: k ? void 0 : (e) => {
|
|
4804
4804
|
let r = e;
|
|
4805
4805
|
ce && r && de({
|
|
4806
|
-
color: Kn(n,
|
|
4806
|
+
color: Kn(n, ie, t.color, Un(a, t.paletteIndex)),
|
|
4807
4807
|
label: String(r.label ?? ""),
|
|
4808
4808
|
name: t.label,
|
|
4809
4809
|
value: Number(r[t.dataKey] ?? 0)
|
|
@@ -4828,7 +4828,7 @@ var hn = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4828
4828
|
}), /* @__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, {
|
|
4829
4829
|
data: o,
|
|
4830
4830
|
series: v,
|
|
4831
|
-
seriesColors:
|
|
4831
|
+
seriesColors: ie,
|
|
4832
4832
|
tableHeader: G,
|
|
4833
4833
|
valueFormatter: F,
|
|
4834
4834
|
variant: p
|
|
@@ -4844,7 +4844,7 @@ var hn = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4844
4844
|
default: return;
|
|
4845
4845
|
}
|
|
4846
4846
|
}, or = ({ 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 = rr, yAxisLabel: k, yAxisTickInterval: A, ...j }) => {
|
|
4847
|
-
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 = Hn(a, Jn(L, a)), z = n ?? (c ? 60 : 360), B = r ?? (c ? 60 : void 0), V = b ?? !c, U = v ?? !c, G = x ?? !c, K = S ?? !c,
|
|
4847
|
+
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 = Hn(a, Jn(L, a)), z = n ?? (c ? 60 : 360), B = r ?? (c ? 60 : void 0), V = b ?? !c, U = v ?? !c, G = x ?? !c, K = S ?? !c, ie = y ?? !c, Y = _ ?? !0, X = "pds-line-chart";
|
|
4848
4848
|
return s ? /* @__PURE__ */ e.createElement("div", {
|
|
4849
4849
|
ref: L,
|
|
4850
4850
|
"aria-busy": "true",
|
|
@@ -4910,7 +4910,7 @@ var hn = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4910
4910
|
}, V && /* @__PURE__ */ e.createElement(H, {
|
|
4911
4911
|
stroke: "var(--pds-color-border-default)",
|
|
4912
4912
|
strokeDasharray: "3 3"
|
|
4913
|
-
}), /* @__PURE__ */ e.createElement(
|
|
4913
|
+
}), /* @__PURE__ */ e.createElement(J, {
|
|
4914
4914
|
axisLine: U,
|
|
4915
4915
|
dataKey: "label",
|
|
4916
4916
|
hide: !U,
|
|
@@ -4924,7 +4924,7 @@ var hn = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4924
4924
|
tick: U ? Yn : !1,
|
|
4925
4925
|
tickLine: !1,
|
|
4926
4926
|
tickMargin: 10
|
|
4927
|
-
}), /* @__PURE__ */ e.createElement(
|
|
4927
|
+
}), /* @__PURE__ */ e.createElement(re, {
|
|
4928
4928
|
axisLine: U,
|
|
4929
4929
|
domain: D,
|
|
4930
4930
|
hide: !U,
|
|
@@ -4960,9 +4960,9 @@ var hn = ({ className: t, clearLabel: n = "Clear", disabled: r = !1, filterKey:
|
|
|
4960
4960
|
}), t.name, /* @__PURE__ */ e.createElement("span", { className: "recharts-tooltip-item-separator" }, " ", ":", " "), O(t.value))));
|
|
4961
4961
|
} }), g.map((t, n) => /* @__PURE__ */ e.createElement(ee, {
|
|
4962
4962
|
key: t.dataKey,
|
|
4963
|
-
activeDot:
|
|
4963
|
+
activeDot: ie ? { r: 6 } : !1,
|
|
4964
4964
|
dataKey: t.dataKey,
|
|
4965
|
-
dot:
|
|
4965
|
+
dot: ie ? {
|
|
4966
4966
|
fill: Kn(n, R, t.color, Un(a, t.paletteIndex)),
|
|
4967
4967
|
r: 4,
|
|
4968
4968
|
strokeWidth: 0
|
|
@@ -6359,17 +6359,17 @@ var fr = {
|
|
|
6359
6359
|
variant: "reverse"
|
|
6360
6360
|
}))));
|
|
6361
6361
|
}
|
|
6362
|
-
let C = /* @__PURE__ */ e.createElement(
|
|
6362
|
+
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);
|
|
6363
6363
|
return /* @__PURE__ */ e.createElement("div", {
|
|
6364
6364
|
className: Z([g, t ?? ""]),
|
|
6365
6365
|
style: v,
|
|
6366
6366
|
...h
|
|
6367
|
-
}, c ? y : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
6367
|
+
}, c ? y : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(ie, {
|
|
6368
6368
|
code: n,
|
|
6369
6369
|
language: l || "",
|
|
6370
6370
|
prism: dr.default,
|
|
6371
6371
|
theme: fr
|
|
6372
|
-
}, /* @__PURE__ */ e.createElement(
|
|
6372
|
+
}, /* @__PURE__ */ e.createElement(ie.Code, {
|
|
6373
6373
|
className: `${g}__code`,
|
|
6374
6374
|
tabIndex: 0
|
|
6375
6375
|
}, a || o ? a ? w : T : C)), i && /* @__PURE__ */ e.createElement("div", { className: `${g}__copy` }, /* @__PURE__ */ e.createElement(en, {
|
|
@@ -6954,15 +6954,15 @@ var fr = {
|
|
|
6954
6954
|
searchShortcut: "Press / to focus the search field",
|
|
6955
6955
|
triggerButton: "Toggle dropdown menu"
|
|
6956
6956
|
}, loadingText: v = "Loading results...", message: y, noResultsText: b = "No results found", onBlur: x, onChange: S, onClear: E, onFocus: D, onOptionSelect: k, options: A, placeholder: M, required: N = !1, showLabel: P = !0, showUnfilteredOptions: F = !1, size: I = "s", tooltipText: L = null, validationMessage: z, validationStatus: B, value: V, ...H }, U) => {
|
|
6957
|
-
let ee = Dt(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,
|
|
6958
|
-
o && (
|
|
6959
|
-
let
|
|
6957
|
+
let ee = Dt(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, J = null;
|
|
6958
|
+
o && (J = "search"), B === "error" && (J = "error"), B === "success" && (J = "success");
|
|
6959
|
+
let re = z || y, ie = V !== void 0, X = n !== void 0, ae = (e) => {
|
|
6960
6960
|
let t = A.find((t) => t.value === e);
|
|
6961
6961
|
return t ? t.label : "";
|
|
6962
|
-
}, [oe, se] = h(X ? n : void 0), [ce, le] = h(
|
|
6962
|
+
}, [oe, se] = h(X ? n : void 0), [ce, le] = h(ie ? V ?? "" : X ? ae(n) : "");
|
|
6963
6963
|
l(() => {
|
|
6964
|
-
|
|
6965
|
-
}, [
|
|
6964
|
+
ie && le(V ?? "");
|
|
6965
|
+
}, [ie, V]);
|
|
6966
6966
|
let ue = m(null), de = (e) => e.map(({ label: e, optionDisplay: t, searchIndex: n, value: r, ...i }) => {
|
|
6967
6967
|
let a = r || e, o = [e, r];
|
|
6968
6968
|
return n && o.push(...n), {
|
|
@@ -6992,7 +6992,7 @@ var fr = {
|
|
|
6992
6992
|
le(e ?? "");
|
|
6993
6993
|
},
|
|
6994
6994
|
onSelectedItemChange: ({ selectedItem: e }) => {
|
|
6995
|
-
e && (
|
|
6995
|
+
e && (ie || le(e.label), se(e.value), k?.(e));
|
|
6996
6996
|
},
|
|
6997
6997
|
stateReducer: (e, { changes: t, type: n }) => {
|
|
6998
6998
|
if (n === Y.stateChangeTypes.InputBlur) return {
|
|
@@ -7048,7 +7048,7 @@ var fr = {
|
|
|
7048
7048
|
}, [U, Se]), Ee = () => {
|
|
7049
7049
|
_e ? ye() : ve();
|
|
7050
7050
|
}, De = () => {
|
|
7051
|
-
|
|
7051
|
+
ie || le(""), se(void 0), ye(), ue.current?.focus(), F && ve(), E?.();
|
|
7052
7052
|
}, Oe = (e) => {
|
|
7053
7053
|
x?.(oe);
|
|
7054
7054
|
}, ke = (e) => {
|
|
@@ -7083,13 +7083,13 @@ var fr = {
|
|
|
7083
7083
|
tooltipText: L
|
|
7084
7084
|
}), /* @__PURE__ */ e.createElement("span", {
|
|
7085
7085
|
ref: Te,
|
|
7086
|
-
"aria-describedby":
|
|
7086
|
+
"aria-describedby": re ? `${u}__message` : null,
|
|
7087
7087
|
"aria-disabled": r ? !0 : null,
|
|
7088
7088
|
"aria-invalid": B === "error" ? !0 : null,
|
|
7089
7089
|
"aria-required": N ? !0 : null,
|
|
7090
7090
|
className: `${W}__input-wrapper`,
|
|
7091
7091
|
id: u
|
|
7092
|
-
},
|
|
7092
|
+
}, J && /* @__PURE__ */ e.createElement(Nt, { variant: J }), /* @__PURE__ */ e.createElement("input", {
|
|
7093
7093
|
ref: ue,
|
|
7094
7094
|
autoComplete: "off",
|
|
7095
7095
|
className: `${W}__input`,
|
|
@@ -7134,10 +7134,10 @@ var fr = {
|
|
|
7134
7134
|
className: `${W}__options`,
|
|
7135
7135
|
...he(),
|
|
7136
7136
|
style: Ce && !f && fe.length > 0 ? void 0 : { display: "none" }
|
|
7137
|
-
}, Ce && !f && Ae())),
|
|
7137
|
+
}, Ce && !f && Ae())), re && /* @__PURE__ */ e.createElement(jt, {
|
|
7138
7138
|
hasValidationMessage: !!z,
|
|
7139
7139
|
id: u,
|
|
7140
|
-
message:
|
|
7140
|
+
message: re,
|
|
7141
7141
|
validationMessageHasDecorators: !1,
|
|
7142
7142
|
validationStatus: B
|
|
7143
7143
|
}));
|
|
@@ -7177,7 +7177,7 @@ var fr = {
|
|
|
7177
7177
|
default: break;
|
|
7178
7178
|
}
|
|
7179
7179
|
}
|
|
7180
|
-
}), { closeMenu: ne, getInputProps:
|
|
7180
|
+
}), { closeMenu: ne, getInputProps: J, getItemProps: re, getMenuProps: ie, getToggleButtonProps: ae, highlightedIndex: oe, isOpen: se, openMenu: ce, selectedItem: le } = Y({
|
|
7181
7181
|
items: ee,
|
|
7182
7182
|
itemToString: (e) => e ? e.label : "",
|
|
7183
7183
|
selectedItem: null,
|
|
@@ -7267,7 +7267,7 @@ var fr = {
|
|
|
7267
7267
|
xe.current = se, !r && e.currentTarget.setAttribute("data-focus-method", "mouse");
|
|
7268
7268
|
}, we = (e) => {
|
|
7269
7269
|
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()));
|
|
7270
|
-
}, Te =
|
|
7270
|
+
}, Te = J({
|
|
7271
7271
|
...K({ preventKeyAction: se }),
|
|
7272
7272
|
disabled: r,
|
|
7273
7273
|
onKeyDown: we
|
|
@@ -7363,7 +7363,7 @@ var fr = {
|
|
|
7363
7363
|
}
|
|
7364
7364
|
})), se && s && /* @__PURE__ */ e.createElement("div", { className: `${D}__loading` }, u), se && !s && ee.length === 0 && /* @__PURE__ */ e.createElement("div", { className: "pds-dropdown__no-results" }, d), /* @__PURE__ */ e.createElement("ul", {
|
|
7365
7365
|
className: `${D}__dropdown-list`,
|
|
7366
|
-
...
|
|
7366
|
+
...ie(),
|
|
7367
7367
|
style: se && !s && ee.length > 0 ? void 0 : { display: "none" }
|
|
7368
7368
|
}, se && !s && ee.map((t, n) => /* @__PURE__ */ e.createElement(zt, {
|
|
7369
7369
|
key: `${t.id}-${n}`,
|
|
@@ -7371,7 +7371,7 @@ var fr = {
|
|
|
7371
7371
|
${oe === n ? "pds-dropdown__item--focused" : ""}
|
|
7372
7372
|
${le === t ? `${D}__dropdown-item--selected` : ""}
|
|
7373
7373
|
${t.isAlreadySelected ? "pds-dropdown__item--active" : ""}`,
|
|
7374
|
-
...
|
|
7374
|
+
...re({
|
|
7375
7375
|
item: t,
|
|
7376
7376
|
index: n
|
|
7377
7377
|
})
|
|
@@ -7504,10 +7504,10 @@ var fr = {
|
|
|
7504
7504
|
k(void 0), f?.(void 0);
|
|
7505
7505
|
}, ne = () => {
|
|
7506
7506
|
M(!1);
|
|
7507
|
-
},
|
|
7507
|
+
}, J = () => {
|
|
7508
7508
|
let e = /* @__PURE__ */ new Date();
|
|
7509
7509
|
I(e), r ? (k(void 0), f?.(void 0)) : (k(e), f?.(e));
|
|
7510
|
-
},
|
|
7510
|
+
}, re = () => r ? O?.from : O, ie = ({ className: t, orientation: n }) => n === "left" ? /* @__PURE__ */ e.createElement(Q, {
|
|
7511
7511
|
className: t,
|
|
7512
7512
|
iconName: "angleLeft",
|
|
7513
7513
|
size: "m"
|
|
@@ -7571,7 +7571,7 @@ var fr = {
|
|
|
7571
7571
|
className: Z([`${R}__trigger`, A ? `${R}__trigger--open` : null]),
|
|
7572
7572
|
disabled: n,
|
|
7573
7573
|
onClick: () => {
|
|
7574
|
-
A || I(
|
|
7574
|
+
A || I(re() ?? /* @__PURE__ */ new Date()), M(!A);
|
|
7575
7575
|
},
|
|
7576
7576
|
type: "button"
|
|
7577
7577
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
@@ -7587,7 +7587,7 @@ var fr = {
|
|
|
7587
7587
|
className: `${R}__popover`,
|
|
7588
7588
|
style: ee
|
|
7589
7589
|
}, /* @__PURE__ */ e.createElement("div", { className: `${R}__calendar` }, r ? /* @__PURE__ */ e.createElement(oe, {
|
|
7590
|
-
components: { Chevron:
|
|
7590
|
+
components: { Chevron: ie },
|
|
7591
7591
|
disabled: X(),
|
|
7592
7592
|
footer: /* @__PURE__ */ e.createElement("div", { className: "visually-hidden" }, le()),
|
|
7593
7593
|
formatters: { formatWeekdayName: Y },
|
|
@@ -7600,7 +7600,7 @@ var fr = {
|
|
|
7600
7600
|
onSelect: K,
|
|
7601
7601
|
selected: O
|
|
7602
7602
|
}) : /* @__PURE__ */ e.createElement(oe, {
|
|
7603
|
-
components: { Chevron:
|
|
7603
|
+
components: { Chevron: ie },
|
|
7604
7604
|
disabled: X(),
|
|
7605
7605
|
footer: /* @__PURE__ */ e.createElement("div", { className: "visually-hidden" }, le()),
|
|
7606
7606
|
formatters: { formatWeekdayName: Y },
|
|
@@ -7615,7 +7615,7 @@ var fr = {
|
|
|
7615
7615
|
})), /* @__PURE__ */ e.createElement("div", { className: `${R}__actions` }, /* @__PURE__ */ e.createElement(Xt, {
|
|
7616
7616
|
className: `${R}__action-button ${R}__action-button--today`,
|
|
7617
7617
|
label: E.todayButton,
|
|
7618
|
-
onClick:
|
|
7618
|
+
onClick: J,
|
|
7619
7619
|
size: "s",
|
|
7620
7620
|
type: "button",
|
|
7621
7621
|
variant: "secondary"
|
|
@@ -7784,29 +7784,35 @@ var fr = {
|
|
|
7784
7784
|
message: k,
|
|
7785
7785
|
validationStatus: v
|
|
7786
7786
|
}));
|
|
7787
|
-
}, Ir = a(({ checked: t, className: n, defaultChecked: r, disabled: i = !1, id: a, inputProps: o, inputWidth: s, label: c, message: l,
|
|
7788
|
-
let
|
|
7789
|
-
|
|
7790
|
-
},
|
|
7787
|
+
}, Ir = a(({ checked: t, className: n, defaultChecked: r, disabled: i = !1, id: a, inputProps: o, inputWidth: s, label: c, message: l, offLabel: u = "Off", onChange: d, onLabel: f = "On", required: p = !1, showLabel: m = !0, showStatusLabel: g = !0, statusLabelPlacement: _ = "right", switchPlacement: v = "right", ...y }, b) => {
|
|
7788
|
+
let x = Dt(s), S = "pds-switch", C = `${S}--${v}`, w = l ? `${S}--message` : null, T = i ? $.disabled : null, E = p && !i ? $.required : null, D = t !== void 0, [O, k] = h(!D && r ? r : !1), A = t || O ? f : u, j = (e) => {
|
|
7789
|
+
D || k(e.target.checked), d && d(e);
|
|
7790
|
+
}, M = g ? /* @__PURE__ */ e.createElement("span", {
|
|
7791
|
+
"aria-hidden": "true",
|
|
7792
|
+
className: `${S}__toggle-label`
|
|
7793
|
+
}, A) : null, N = () => {
|
|
7791
7794
|
i || document.getElementById(a)?.click();
|
|
7792
|
-
},
|
|
7793
|
-
|
|
7795
|
+
}, P = /* @__PURE__ */ e.createElement("div", {
|
|
7796
|
+
className: `${S}__control`,
|
|
7797
|
+
"data-status-label-placement": _
|
|
7798
|
+
}, /* @__PURE__ */ e.createElement("input", {
|
|
7799
|
+
ref: b,
|
|
7794
7800
|
"aria-describedby": l ? `${a}__message` : null,
|
|
7795
|
-
checked: t === void 0 ?
|
|
7801
|
+
checked: t === void 0 ? O : t,
|
|
7796
7802
|
className: "visually-hidden",
|
|
7797
7803
|
disabled: i,
|
|
7798
7804
|
id: a,
|
|
7799
7805
|
name: a,
|
|
7800
|
-
onChange:
|
|
7801
|
-
required:
|
|
7806
|
+
onChange: j,
|
|
7807
|
+
required: p,
|
|
7802
7808
|
role: "switch",
|
|
7803
7809
|
type: "checkbox",
|
|
7804
7810
|
...o
|
|
7805
|
-
}), /* @__PURE__ */ e.createElement("div", { className: `${
|
|
7811
|
+
}), /* @__PURE__ */ e.createElement("div", { className: `${S}__track-wrapper` }, _ === "left" && M, /* @__PURE__ */ e.createElement("span", {
|
|
7806
7812
|
"aria-hidden": "true",
|
|
7807
|
-
className: `${
|
|
7808
|
-
onClick:
|
|
7809
|
-
}, /* @__PURE__ */ e.createElement("span", { className: `${
|
|
7813
|
+
className: `${S}__track`,
|
|
7814
|
+
onClick: N
|
|
7815
|
+
}, /* @__PURE__ */ e.createElement("span", { className: `${S}__thumb` })), _ === "right" && M)), F = l ? /* @__PURE__ */ e.createElement(jt, {
|
|
7810
7816
|
className: "pds-input-message--switch",
|
|
7811
7817
|
hasValidationMessage: !1,
|
|
7812
7818
|
id: a,
|
|
@@ -7816,23 +7822,23 @@ var fr = {
|
|
|
7816
7822
|
return /* @__PURE__ */ e.createElement("div", {
|
|
7817
7823
|
className: Z([
|
|
7818
7824
|
$.base,
|
|
7819
|
-
v,
|
|
7820
|
-
y,
|
|
7821
|
-
b,
|
|
7822
|
-
x,
|
|
7823
7825
|
S,
|
|
7826
|
+
C,
|
|
7827
|
+
w,
|
|
7828
|
+
T,
|
|
7829
|
+
E,
|
|
7824
7830
|
n
|
|
7825
7831
|
]),
|
|
7826
|
-
style: s ?
|
|
7827
|
-
...
|
|
7832
|
+
style: s ? x : null,
|
|
7833
|
+
...y
|
|
7828
7834
|
}, /* @__PURE__ */ e.createElement(At, {
|
|
7829
|
-
className: `${
|
|
7835
|
+
className: `${S}__label`,
|
|
7830
7836
|
disabled: i,
|
|
7831
7837
|
id: a,
|
|
7832
7838
|
label: c,
|
|
7833
|
-
required:
|
|
7834
|
-
showLabel:
|
|
7835
|
-
}), /* @__PURE__ */ e.createElement("div", { className: `${
|
|
7839
|
+
required: p,
|
|
7840
|
+
showLabel: m
|
|
7841
|
+
}), /* @__PURE__ */ e.createElement("div", { className: `${S}__content` }, F, P));
|
|
7836
7842
|
}), Lr = ({ disabled: t, dropTargetDirection: n, focusedIndex: r, index: i, isDragging: a, isSortable: o, onDragEnd: s, onDragOver: c, onDragStart: u, onFocusInput: d, onKeyboardMove: f, onRemove: p, setFocusedIndex: h, tag: g, totalTags: _, translationStrings: v }) => {
|
|
7837
7843
|
let y = m(null), b = "pds-tags-input__tag";
|
|
7838
7844
|
l(() => {
|
|
@@ -7916,16 +7922,16 @@ var fr = {
|
|
|
7916
7922
|
F(null), L(null), z(null);
|
|
7917
7923
|
}, ne = (e, t) => {
|
|
7918
7924
|
P === null || P === e || (L(e), z(t));
|
|
7919
|
-
},
|
|
7925
|
+
}, J = (e) => {
|
|
7920
7926
|
if (e.preventDefault(), P === null || I === null || R === null) return;
|
|
7921
7927
|
let t = _.findIndex((e) => e.id === P), n = _.findIndex((e) => e.id === I);
|
|
7922
7928
|
if (t === -1 || n === -1) return;
|
|
7923
7929
|
let r = [..._], [i] = r.splice(t, 1), a = n;
|
|
7924
7930
|
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);
|
|
7925
|
-
},
|
|
7931
|
+
}, re = (e, t) => {
|
|
7926
7932
|
let n = [..._], [r] = n.splice(e, 1);
|
|
7927
7933
|
n.splice(t, 0, r), G(`${r.value} moved to position ${t + 1} of ${_.length}`), K(n);
|
|
7928
|
-
},
|
|
7934
|
+
}, ie = (e) => {
|
|
7929
7935
|
let t = _.find((t) => t.id === e);
|
|
7930
7936
|
K(_.filter((t) => t.id !== e)), t && G(`${t.value} removed`);
|
|
7931
7937
|
}, Y = () => {
|
|
@@ -7978,7 +7984,7 @@ var fr = {
|
|
|
7978
7984
|
"aria-label": y.tagsListLabel,
|
|
7979
7985
|
className: `${T}__tags`,
|
|
7980
7986
|
onDragOver: s ? (e) => e.preventDefault() : void 0,
|
|
7981
|
-
onDrop: s ?
|
|
7987
|
+
onDrop: s ? J : void 0,
|
|
7982
7988
|
role: "list"
|
|
7983
7989
|
}, _.map((t, n) => {
|
|
7984
7990
|
let i = null;
|
|
@@ -7996,8 +8002,8 @@ var fr = {
|
|
|
7996
8002
|
onDragOver: ne,
|
|
7997
8003
|
onDragStart: q,
|
|
7998
8004
|
onFocusInput: Y,
|
|
7999
|
-
onKeyboardMove:
|
|
8000
|
-
onRemove:
|
|
8005
|
+
onKeyboardMove: re,
|
|
8006
|
+
onRemove: ie,
|
|
8001
8007
|
setFocusedIndex: V,
|
|
8002
8008
|
tag: t,
|
|
8003
8009
|
totalTags: _.length,
|
|
@@ -8104,7 +8110,7 @@ var fr = {
|
|
|
8104
8110
|
let P = Dt(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;
|
|
8105
8111
|
O === "search" && (U = "search"), O === "search" && S === "filter" && (U = "filter"), A === "error" && (U = "error"), A === "success" && (U = "success");
|
|
8106
8112
|
let ee = k || p, W = j !== void 0, [G, K] = h(i === void 0 ? "" : i), q = j || G, te = (e) => {
|
|
8107
|
-
if (w &&
|
|
8113
|
+
if (w && re && ie(!1), c && O === "url") {
|
|
8108
8114
|
let t = Ot(e.target.value), n = {
|
|
8109
8115
|
...e,
|
|
8110
8116
|
target: {
|
|
@@ -8125,16 +8131,16 @@ var fr = {
|
|
|
8125
8131
|
};
|
|
8126
8132
|
W || K(t), g && g(n);
|
|
8127
8133
|
} else W || K(e.target.value), g && g(e);
|
|
8128
|
-
},
|
|
8134
|
+
}, J = () => {
|
|
8129
8135
|
W || K(""), _ && _();
|
|
8130
8136
|
let e = document.getElementById(l);
|
|
8131
8137
|
e && e.focus();
|
|
8132
|
-
}, [
|
|
8133
|
-
|
|
8138
|
+
}, [re, ie] = h(!1), Y = () => {
|
|
8139
|
+
ie((e) => !e);
|
|
8134
8140
|
let e = document.getElementById(l);
|
|
8135
8141
|
e && e.focus();
|
|
8136
8142
|
}, X = O;
|
|
8137
|
-
return w && O === "password" && (X =
|
|
8143
|
+
return w && O === "password" && (X = re ? "text" : "password"), /* @__PURE__ */ e.createElement("div", {
|
|
8138
8144
|
className: Z([
|
|
8139
8145
|
$.base,
|
|
8140
8146
|
F,
|
|
@@ -8159,7 +8165,7 @@ var fr = {
|
|
|
8159
8165
|
}), w && O === "password" && /* @__PURE__ */ e.createElement("div", {
|
|
8160
8166
|
"aria-live": "polite",
|
|
8161
8167
|
className: "visually-hidden"
|
|
8162
|
-
}, `${D.visibilityStatus} ${
|
|
8168
|
+
}, `${D.visibilityStatus} ${re ? "visible" : "hidden"}.`), /* @__PURE__ */ e.createElement("div", { className: `${F}__input-wrapper ${c && O === "url" ? `${F}__input-wrapper--has-prefix` : ""}` }, U && /* @__PURE__ */ e.createElement(Nt, { variant: U }), c && O === "url" && /* @__PURE__ */ e.createElement(Br, null), /* @__PURE__ */ e.createElement("input", {
|
|
8163
8169
|
ref: N,
|
|
8164
8170
|
"aria-describedby": ee ? `${l}__message` : null,
|
|
8165
8171
|
"aria-invalid": A === "error" ? !0 : null,
|
|
@@ -8179,17 +8185,17 @@ var fr = {
|
|
|
8179
8185
|
...u
|
|
8180
8186
|
}), o && q && /* @__PURE__ */ e.createElement(Ft, {
|
|
8181
8187
|
clearLabel: D.clearButton,
|
|
8182
|
-
handleClearInput:
|
|
8188
|
+
handleClearInput: J,
|
|
8183
8189
|
id: l
|
|
8184
8190
|
}), w && O === "password" && /* @__PURE__ */ e.createElement("button", {
|
|
8185
8191
|
"aria-controls": l,
|
|
8186
8192
|
className: `${F}__visibility-toggle`,
|
|
8187
8193
|
onClick: Y,
|
|
8188
8194
|
onMouseDown: (e) => e.preventDefault(),
|
|
8189
|
-
title:
|
|
8195
|
+
title: re ? D.visibilityToggleHide : D.visibilityToggleShow,
|
|
8190
8196
|
type: "button"
|
|
8191
8197
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
8192
|
-
iconName:
|
|
8198
|
+
iconName: re ? "eyeSlash" : "eye",
|
|
8193
8199
|
size: "m"
|
|
8194
8200
|
})), s && O === "search" && !q && /* @__PURE__ */ e.createElement(Pt, {
|
|
8195
8201
|
inputId: l,
|
|
@@ -8389,18 +8395,18 @@ var fr = {
|
|
|
8389
8395
|
enableShift: !1,
|
|
8390
8396
|
enableTypeahead: !0,
|
|
8391
8397
|
role: "menu"
|
|
8392
|
-
}),
|
|
8398
|
+
}), S = (e) => {
|
|
8393
8399
|
e.target.nodeName === "A" && y(!1);
|
|
8394
|
-
},
|
|
8400
|
+
}, C = (e) => {
|
|
8395
8401
|
e.key === "Enter" && _.current[d]?.querySelector("a")?.click();
|
|
8396
|
-
},
|
|
8402
|
+
}, w = ({ item: e, level: t }) => {
|
|
8397
8403
|
let r = $r(e.linkContent, e.links);
|
|
8398
8404
|
return {
|
|
8399
8405
|
...e,
|
|
8400
8406
|
level: t,
|
|
8401
8407
|
linkContent: n(r, Object.assign({}, r.props, { tabIndex: -1 }))
|
|
8402
8408
|
};
|
|
8403
|
-
},
|
|
8409
|
+
}, T = (e) => {
|
|
8404
8410
|
let t = [];
|
|
8405
8411
|
return e.forEach((e) => {
|
|
8406
8412
|
if (e.isSeparator) {
|
|
@@ -8410,31 +8416,31 @@ var fr = {
|
|
|
8410
8416
|
});
|
|
8411
8417
|
return;
|
|
8412
8418
|
}
|
|
8413
|
-
e.links ? (t.push(
|
|
8419
|
+
e.links ? (t.push(w({
|
|
8414
8420
|
item: e,
|
|
8415
8421
|
level: "top-level"
|
|
8416
8422
|
})), e.links.forEach((e) => {
|
|
8417
|
-
e.links ? (t.push(
|
|
8423
|
+
e.links ? (t.push(w({
|
|
8418
8424
|
item: e,
|
|
8419
8425
|
level: "second-level"
|
|
8420
8426
|
})), e.links.forEach((e) => {
|
|
8421
|
-
e.links && (t.push(
|
|
8427
|
+
e.links && (t.push(w({
|
|
8422
8428
|
item: e,
|
|
8423
8429
|
level: "third-level"
|
|
8424
8430
|
})), e.links.forEach((e) => {
|
|
8425
|
-
t.push(
|
|
8431
|
+
t.push(w({
|
|
8426
8432
|
item: e,
|
|
8427
8433
|
level: "fourth-level"
|
|
8428
8434
|
}));
|
|
8429
|
-
})), t.push(
|
|
8435
|
+
})), t.push(w({
|
|
8430
8436
|
item: e,
|
|
8431
8437
|
level: "third-level"
|
|
8432
8438
|
}));
|
|
8433
|
-
})) : t.push(
|
|
8439
|
+
})) : t.push(w({
|
|
8434
8440
|
item: e,
|
|
8435
8441
|
level: "second-level"
|
|
8436
8442
|
}));
|
|
8437
|
-
})) : t.push(
|
|
8443
|
+
})) : t.push(w({
|
|
8438
8444
|
item: e,
|
|
8439
8445
|
level: "top-level"
|
|
8440
8446
|
}));
|
|
@@ -8452,17 +8458,17 @@ var fr = {
|
|
|
8452
8458
|
className: `${s}__trigger-icon`,
|
|
8453
8459
|
iconName: "angleDown",
|
|
8454
8460
|
size: "m"
|
|
8455
|
-
})), g && /* @__PURE__ */ e.createElement("ul", {
|
|
8461
|
+
})), g && /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement("ul", {
|
|
8456
8462
|
ref: v.setFloating,
|
|
8457
8463
|
className: `pds-dropdown__panel ${s}__dropdown`,
|
|
8458
|
-
onClick:
|
|
8464
|
+
onClick: S,
|
|
8459
8465
|
style: {
|
|
8460
8466
|
...f,
|
|
8461
8467
|
...b,
|
|
8462
8468
|
zIndex: "var(--pds-z-index-dropdown)"
|
|
8463
8469
|
},
|
|
8464
8470
|
...p()
|
|
8465
|
-
},
|
|
8471
|
+
}, T(i).map((t, n) => t.isSeparator ? /* @__PURE__ */ e.createElement("li", {
|
|
8466
8472
|
key: n,
|
|
8467
8473
|
ref: (e) => {
|
|
8468
8474
|
_.current[n] = e;
|
|
@@ -8483,8 +8489,8 @@ var fr = {
|
|
|
8483
8489
|
t.isActive === !0 ? "pds-dropdown__item--active" : null
|
|
8484
8490
|
]),
|
|
8485
8491
|
tabIndex: d === n ? 0 : -1,
|
|
8486
|
-
...m({ onKeyDown:
|
|
8487
|
-
}, t.linkContent, t.isActive === !0 && u))));
|
|
8492
|
+
...m({ onKeyDown: C })
|
|
8493
|
+
}, t.linkContent, t.isActive === !0 && u)))));
|
|
8488
8494
|
}, ri = ({ children: t, className: n, width: r = "standard", ...i }) => {
|
|
8489
8495
|
let a = "pds-container", o = r === "standard" ? null : `${a}--${r}`;
|
|
8490
8496
|
return /* @__PURE__ */ e.createElement("div", {
|
|
@@ -8675,11 +8681,11 @@ var fr = {
|
|
|
8675
8681
|
`${f}--${n}`,
|
|
8676
8682
|
Xr(t) ? `${f}--active` : null
|
|
8677
8683
|
])
|
|
8678
|
-
}, t.linkContent))), [v, y] = h(!1), b = m(v),
|
|
8684
|
+
}, t.linkContent))), [v, y] = h(!1), b = m(v), S = m(!1), { context: O, floatingStyles: k, refs: M } = j({
|
|
8679
8685
|
placement: "right-start",
|
|
8680
8686
|
open: v,
|
|
8681
8687
|
onOpenChange: (e, t, n) => {
|
|
8682
|
-
y(e), e || (
|
|
8688
|
+
y(e), e || (S.current = n === "escape-key" || n === "focus-out");
|
|
8683
8689
|
},
|
|
8684
8690
|
middleware: [
|
|
8685
8691
|
T(8),
|
|
@@ -8689,18 +8695,18 @@ var fr = {
|
|
|
8689
8695
|
whileElementsMounted: C
|
|
8690
8696
|
});
|
|
8691
8697
|
l(() => {
|
|
8692
|
-
if (b.current && !v && i &&
|
|
8693
|
-
let e =
|
|
8698
|
+
if (b.current && !v && i && S.current && M.reference.current) {
|
|
8699
|
+
let e = M.reference.current;
|
|
8694
8700
|
e instanceof HTMLElement && e.querySelector("a")?.focus();
|
|
8695
8701
|
}
|
|
8696
8702
|
b.current = v;
|
|
8697
8703
|
}, [
|
|
8698
8704
|
v,
|
|
8699
8705
|
i,
|
|
8700
|
-
|
|
8706
|
+
M.reference
|
|
8701
8707
|
]);
|
|
8702
|
-
let { getFloatingProps:
|
|
8703
|
-
N(
|
|
8708
|
+
let { getFloatingProps: P, getReferenceProps: I } = F([
|
|
8709
|
+
N(O, {
|
|
8704
8710
|
move: !1,
|
|
8705
8711
|
delay: {
|
|
8706
8712
|
open: 100,
|
|
@@ -8708,15 +8714,15 @@ var fr = {
|
|
|
8708
8714
|
},
|
|
8709
8715
|
handleClose: E()
|
|
8710
8716
|
}),
|
|
8711
|
-
A(
|
|
8712
|
-
L(
|
|
8713
|
-
]),
|
|
8717
|
+
A(O),
|
|
8718
|
+
L(O, { role: "menu" })
|
|
8719
|
+
]), R = (e) => {
|
|
8714
8720
|
i && s && (e.key === "ArrowDown" || e.key === "ArrowRight" || e.key === " " || e.key === "Spacebar") && (e.preventDefault(), y(!0));
|
|
8715
|
-
},
|
|
8721
|
+
}, z = (e) => {
|
|
8716
8722
|
!i || !s || !c || e.nativeEvent.pointerType === "touch" && (e.preventDefault(), e.stopPropagation(), c());
|
|
8717
8723
|
};
|
|
8718
8724
|
return /* @__PURE__ */ e.createElement("li", {
|
|
8719
|
-
ref: i ?
|
|
8725
|
+
ref: i ? M.setReference : null,
|
|
8720
8726
|
className: Z([
|
|
8721
8727
|
f,
|
|
8722
8728
|
`${f}--top-level`,
|
|
@@ -8724,9 +8730,9 @@ var fr = {
|
|
|
8724
8730
|
i ? `${f}--collapsed` : null,
|
|
8725
8731
|
n ? `${f}--active` : null
|
|
8726
8732
|
]),
|
|
8727
|
-
...
|
|
8728
|
-
onClick:
|
|
8729
|
-
onKeyDown:
|
|
8733
|
+
...I(),
|
|
8734
|
+
onClick: z,
|
|
8735
|
+
onKeyDown: R
|
|
8730
8736
|
}, s ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `${f}-wrapper` }, ei(d, o, s, t), !i && /* @__PURE__ */ e.createElement("button", {
|
|
8731
8737
|
"aria-expanded": r,
|
|
8732
8738
|
className: Z([`${d}__toggle`, r ? `${d}__toggle--expanded` : null]),
|
|
@@ -8735,12 +8741,12 @@ var fr = {
|
|
|
8735
8741
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
8736
8742
|
iconName: "angleDown",
|
|
8737
8743
|
size: "m"
|
|
8738
|
-
}), /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, `${a.toggle} ${Jr(o)} ${a.submenu}`))), !i && _(s, "second-level"), i && v && /* @__PURE__ */ e.createElement("div", {
|
|
8739
|
-
ref:
|
|
8744
|
+
}), /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, `${a.toggle} ${Jr(o)} ${a.submenu}`))), !i && _(s, "second-level"), i && v && /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement("div", {
|
|
8745
|
+
ref: M.setFloating,
|
|
8740
8746
|
className: `${d}__flyout`,
|
|
8741
|
-
style:
|
|
8742
|
-
...
|
|
8743
|
-
}, /* @__PURE__ */ e.createElement("div", { className: `${d}__flyout-heading` }, Jr(o)), _(s, "second-level-flyout"))) : /* @__PURE__ */ e.createElement(e.Fragment, null, i ? /* @__PURE__ */ e.createElement(Et, {
|
|
8747
|
+
style: k,
|
|
8748
|
+
...P()
|
|
8749
|
+
}, /* @__PURE__ */ e.createElement("div", { className: `${d}__flyout-heading` }, Jr(o)), _(s, "second-level-flyout")))) : /* @__PURE__ */ e.createElement(e.Fragment, null, i ? /* @__PURE__ */ e.createElement(Et, {
|
|
8744
8750
|
content: Jr(o),
|
|
8745
8751
|
customTrigger: g,
|
|
8746
8752
|
offsetValue: {
|
|
@@ -8823,7 +8829,7 @@ var fr = {
|
|
|
8823
8829
|
className: `${i}__trigger-icon`,
|
|
8824
8830
|
iconName: "angleDown",
|
|
8825
8831
|
size: "m"
|
|
8826
|
-
})), l && /* @__PURE__ */ e.createElement("ul", {
|
|
8832
|
+
})), l && /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement("ul", {
|
|
8827
8833
|
ref: (e) => {
|
|
8828
8834
|
u.setFloating(e), r.current = e;
|
|
8829
8835
|
},
|
|
@@ -8836,7 +8842,7 @@ var fr = {
|
|
|
8836
8842
|
}, t.map((t, n) => /* @__PURE__ */ e.createElement("li", {
|
|
8837
8843
|
key: n,
|
|
8838
8844
|
className: `${i}__item ${t.isSeparator ? "pds-dropdown__separator" : `pds-dropdown__item${f(t) ? " pds-dropdown__item--active" : ""}`}`
|
|
8839
|
-
}, !t.isSeparator && t.linkContent))));
|
|
8845
|
+
}, !t.isSeparator && t.linkContent)))));
|
|
8840
8846
|
}, li = ({ ariaLabel: t = "Main Navigation", className: n, menuItems: r, ...i }) => {
|
|
8841
8847
|
let [a, o] = h(null), [s, c] = h(-1), [d, f] = h(null), [p, g] = h({
|
|
8842
8848
|
container: null,
|
|
@@ -8904,70 +8910,70 @@ var fr = {
|
|
|
8904
8910
|
...i
|
|
8905
8911
|
}, /* @__PURE__ */ e.createElement("ul", { className: `${v}__menu` }, S));
|
|
8906
8912
|
}, ui = ({ buttonLabel: t = "Toggle dropdown", filterLabel: n = "Filter items", filterPlaceholder: r = "Filter items...", links: i, minFilterItems: a = 5, noResultsText: o = "No results found" }) => {
|
|
8907
|
-
let [s, c] = h(i), [u, d] = h(""), f = i.length >= a, p = "pds-tab-menu", m = `${p}__dropdown-menu`, g = f ? `${m}--scroll` : null, _ = `${p}__dropdown-item`, { activeIndex: v, floatingStyles: y, getFloatingProps: b, getItemProps:
|
|
8913
|
+
let [s, c] = h(i), [u, d] = h(""), f = i.length >= a, p = "pds-tab-menu", m = `${p}__dropdown-menu`, g = f ? `${m}--scroll` : null, _ = `${p}__dropdown-item`, { activeIndex: v, floatingStyles: y, getFloatingProps: b, getItemProps: S, getReferenceProps: C, isMounted: w, isOpen: T, listRef: E, refs: D, setActiveIndex: O, transitionStyles: k } = rn({
|
|
8908
8914
|
offsetValue: 8,
|
|
8909
8915
|
placement: "bottom-start",
|
|
8910
8916
|
role: "listbox"
|
|
8911
|
-
}),
|
|
8912
|
-
e.preventDefault(), e.key === "Enter" &&
|
|
8913
|
-
},
|
|
8917
|
+
}), A = (e) => {
|
|
8918
|
+
e.preventDefault(), e.key === "Enter" && E.current[v].querySelector("a")?.click(), e.key === "Tab" && e.shiftKey && f && document.getElementById("links-filter").focus();
|
|
8919
|
+
}, j = (e, t) => Jr(e.linkContent).toLowerCase().includes(t.toLowerCase()), M = (e) => {
|
|
8914
8920
|
let t = e.target.value;
|
|
8915
|
-
d(t), c(i.filter((e) =>
|
|
8921
|
+
d(t), c(i.filter((e) => j(e, t)));
|
|
8916
8922
|
};
|
|
8917
8923
|
l(() => {
|
|
8918
|
-
c(i.filter((e) =>
|
|
8924
|
+
c(i.filter((e) => j(e, u)));
|
|
8919
8925
|
}, [i]);
|
|
8920
|
-
let
|
|
8926
|
+
let N = () => {
|
|
8921
8927
|
d(""), c(i);
|
|
8922
|
-
},
|
|
8928
|
+
}, P = {
|
|
8923
8929
|
minWidth: "13rem",
|
|
8924
8930
|
width: `${Jr(i.reduce((e, t) => Jr(e.linkContent).length > Jr(t.linkContent).length ? e : t).linkContent).length + 2}ch`
|
|
8925
|
-
},
|
|
8931
|
+
}, F = /* @__PURE__ */ e.createElement(Q, {
|
|
8926
8932
|
className: `${p}__active-icon`,
|
|
8927
8933
|
iconName: "check"
|
|
8928
|
-
}),
|
|
8934
|
+
}), I = f && /* @__PURE__ */ e.createElement("div", { className: `${p}__filter` }, /* @__PURE__ */ e.createElement(Vr, {
|
|
8929
8935
|
hasClearButton: !0,
|
|
8930
8936
|
autoComplete: "off",
|
|
8931
8937
|
id: "links-filter",
|
|
8932
8938
|
label: n,
|
|
8933
|
-
onChange:
|
|
8934
|
-
onClear:
|
|
8939
|
+
onChange: M,
|
|
8940
|
+
onClear: N,
|
|
8935
8941
|
placeholder: r,
|
|
8936
8942
|
showLabel: !1,
|
|
8937
8943
|
type: "search"
|
|
8938
|
-
})),
|
|
8944
|
+
})), L = s.map((t, n) => {
|
|
8939
8945
|
let r = t.isActive ? `${_}--active` : null;
|
|
8940
8946
|
return /* @__PURE__ */ e.createElement("li", {
|
|
8941
8947
|
key: n,
|
|
8942
8948
|
ref: (e) => {
|
|
8943
|
-
|
|
8949
|
+
E.current[n] = e;
|
|
8944
8950
|
},
|
|
8945
8951
|
className: Z([_, r]),
|
|
8946
|
-
onKeyDown:
|
|
8952
|
+
onKeyDown: A,
|
|
8947
8953
|
tabIndex: n === v ? 0 : -1,
|
|
8948
|
-
...
|
|
8949
|
-
}, t.linkContent, t.isActive &&
|
|
8954
|
+
...S()
|
|
8955
|
+
}, t.linkContent, t.isActive && F);
|
|
8950
8956
|
});
|
|
8951
8957
|
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("button", {
|
|
8952
|
-
ref:
|
|
8958
|
+
ref: D.setReference,
|
|
8953
8959
|
className: `${p}__dropdown-trigger`,
|
|
8954
8960
|
type: "button",
|
|
8955
|
-
...
|
|
8956
|
-
"aria-expanded":
|
|
8961
|
+
...C({
|
|
8962
|
+
"aria-expanded": T,
|
|
8957
8963
|
"aria-label": t
|
|
8958
8964
|
})
|
|
8959
8965
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
8960
8966
|
className: `${p}__dropdown-trigger-icon`,
|
|
8961
8967
|
iconName: "angleDown"
|
|
8962
|
-
})),
|
|
8963
|
-
ref:
|
|
8968
|
+
})), w && /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement("div", {
|
|
8969
|
+
ref: D.setFloating,
|
|
8964
8970
|
className: `${p}__dropdown`,
|
|
8965
8971
|
...b({ style: {
|
|
8966
8972
|
...y,
|
|
8967
|
-
...
|
|
8973
|
+
...P,
|
|
8968
8974
|
zIndex: "var(--pds-z-index-dropdown)"
|
|
8969
8975
|
} })
|
|
8970
|
-
}, /* @__PURE__ */ e.createElement("div", { style: { ...
|
|
8976
|
+
}, /* @__PURE__ */ e.createElement("div", { style: { ...k } }, I, /* @__PURE__ */ e.createElement("ul", { className: Z([m, g]) }, L.length === 0 ? /* @__PURE__ */ e.createElement("p", { className: `${p}__no-results` }, o) : L)))));
|
|
8971
8977
|
}, di = ({ ariaLabel: t, className: r, menuItems: i, ...a }) => {
|
|
8972
8978
|
let s = "pds-tab-menu", c = ({ dropdownSettings: t, icon: r, isActive: i, linkContent: a, links: c, promoteActiveChildLink: l = !1 }) => {
|
|
8973
8979
|
let u = `${s}__item`, d = qr(c);
|
|
@@ -9253,7 +9259,7 @@ var fr = {
|
|
|
9253
9259
|
preferredPlacement: "top"
|
|
9254
9260
|
}));
|
|
9255
9261
|
}, gi = ({ ariaLabel: t = "User menu", className: n, menuItems: r = [], onThemeChange: i, theme: a, themeLabel: o = "Theme", themeLabelStrings: s, userEmail: c, userImageSrc: l, userName: d, ...f }) => {
|
|
9256
|
-
let [p, g] = h(null), [_, v] = h(!1), y = m([]), b = m([]),
|
|
9262
|
+
let [p, g] = h(null), [_, v] = h(!1), y = m([]), b = m([]), S = u(), E = "pds-user-menu", O = `${E}__menu`, { context: M, floatingStyles: N, refs: P } = j({
|
|
9257
9263
|
placement: "bottom-end",
|
|
9258
9264
|
open: _,
|
|
9259
9265
|
onOpenChange: v,
|
|
@@ -9263,12 +9269,12 @@ var fr = {
|
|
|
9263
9269
|
D()
|
|
9264
9270
|
],
|
|
9265
9271
|
whileElementsMounted: C
|
|
9266
|
-
}),
|
|
9267
|
-
z,
|
|
9272
|
+
}), z = k(M, { event: "mousedown" }), B = A(M), V = L(M, { role: "menu" }), H = m([]), { getFloatingProps: U, getItemProps: ee, getReferenceProps: W } = F([
|
|
9268
9273
|
B,
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9274
|
+
V,
|
|
9275
|
+
z,
|
|
9276
|
+
I(M, {
|
|
9277
|
+
listRef: H,
|
|
9272
9278
|
activeIndex: p,
|
|
9273
9279
|
onNavigate: g,
|
|
9274
9280
|
loop: !0,
|
|
@@ -9276,7 +9282,7 @@ var fr = {
|
|
|
9276
9282
|
focusItemOnOpen: !1,
|
|
9277
9283
|
focusItemOnHover: !0
|
|
9278
9284
|
})
|
|
9279
|
-
]), { isMounted:
|
|
9285
|
+
]), { isMounted: G, styles: K } = R(M, {
|
|
9280
9286
|
duration: {
|
|
9281
9287
|
open: 300,
|
|
9282
9288
|
close: 150
|
|
@@ -9284,20 +9290,20 @@ var fr = {
|
|
|
9284
9290
|
initial: { opacity: 0 },
|
|
9285
9291
|
open: { opacity: 1 },
|
|
9286
9292
|
close: { opacity: 0 }
|
|
9287
|
-
}),
|
|
9293
|
+
}), q = /* @__PURE__ */ e.createElement(We, {
|
|
9288
9294
|
hasUserFallback: !0,
|
|
9289
|
-
className: `${
|
|
9295
|
+
className: `${E}__avatar`,
|
|
9290
9296
|
imageSrc: l,
|
|
9291
9297
|
size: "s",
|
|
9292
9298
|
uniqueId: c
|
|
9293
|
-
}),
|
|
9294
|
-
className: `${
|
|
9299
|
+
}), te = /* @__PURE__ */ e.createElement("li", {
|
|
9300
|
+
className: `${E}__user-details`,
|
|
9295
9301
|
role: "presentation"
|
|
9296
|
-
}, /* @__PURE__ */ e.createElement("div", { className: `${
|
|
9297
|
-
className: `${
|
|
9302
|
+
}, /* @__PURE__ */ e.createElement("div", { className: `${E}__user-name` }, d), /* @__PURE__ */ e.createElement("div", { className: `${E}__user-email` }, c)), ne = a !== void 0 && typeof i == "function" ? /* @__PURE__ */ e.createElement("li", {
|
|
9303
|
+
className: `${E}__theme-row`,
|
|
9298
9304
|
role: "presentation"
|
|
9299
|
-
}, /* @__PURE__ */ e.createElement("span", { className: `${
|
|
9300
|
-
id: `${
|
|
9305
|
+
}, /* @__PURE__ */ e.createElement("span", { className: `${E}__theme-label` }, o), /* @__PURE__ */ e.createElement(hi, {
|
|
9306
|
+
id: `${S}-theme`,
|
|
9301
9307
|
labelStrings: s,
|
|
9302
9308
|
onChange: i,
|
|
9303
9309
|
size: "s",
|
|
@@ -9305,36 +9311,36 @@ var fr = {
|
|
|
9305
9311
|
variant: "toggle"
|
|
9306
9312
|
})) : null;
|
|
9307
9313
|
r.forEach((e, t) => {
|
|
9308
|
-
let n = e.id ? e.id : `${
|
|
9314
|
+
let n = e.id ? e.id : `${S}-item-${t}`;
|
|
9309
9315
|
y.current.push(n), b.current.push(e);
|
|
9310
9316
|
});
|
|
9311
|
-
let
|
|
9317
|
+
let J = (e) => {
|
|
9312
9318
|
let t = y.current.indexOf(e), n = b.current[t];
|
|
9313
|
-
n.linkContent && !n.disabled && (
|
|
9319
|
+
n.linkContent && !n.disabled && (H.current[t].querySelector("a").click(), v(!1)), n.callback && !n.disabled && (n.callback(), v(!1));
|
|
9314
9320
|
}, re = (e) => {
|
|
9315
|
-
e.preventDefault(), e.key === "Enter" &&
|
|
9321
|
+
e.preventDefault(), e.key === "Enter" && J(e.currentTarget.id);
|
|
9316
9322
|
}, ie = (e) => {
|
|
9317
|
-
|
|
9318
|
-
},
|
|
9319
|
-
let r = y.current[n], i = `${
|
|
9323
|
+
J(e.currentTarget.id);
|
|
9324
|
+
}, Y = r.map((t, n) => {
|
|
9325
|
+
let r = y.current[n], i = `${E}__item`, a = t.disabled ? `${i}--disabled` : null;
|
|
9320
9326
|
return /* @__PURE__ */ e.createElement("li", {
|
|
9321
9327
|
key: r,
|
|
9322
9328
|
ref: (e) => {
|
|
9323
|
-
|
|
9329
|
+
H.current[n] = e;
|
|
9324
9330
|
},
|
|
9325
9331
|
className: Z([i, a]),
|
|
9326
9332
|
id: r,
|
|
9327
9333
|
onKeyDown: re,
|
|
9328
9334
|
role: "menuitem",
|
|
9329
9335
|
tabIndex: p === n ? 0 : -1,
|
|
9330
|
-
...
|
|
9336
|
+
...ee({ onClick: (e) => ie(e) })
|
|
9331
9337
|
}, t.linkContent ? t.linkContent : t.label, t.iconName && /* @__PURE__ */ e.createElement(Q, {
|
|
9332
|
-
className: `${
|
|
9338
|
+
className: `${E}__icon`,
|
|
9333
9339
|
iconName: t.iconName,
|
|
9334
9340
|
size: "m"
|
|
9335
9341
|
}));
|
|
9336
|
-
}),
|
|
9337
|
-
let r = y.current[n], i = `${
|
|
9342
|
+
}), X = r.map((t, n) => {
|
|
9343
|
+
let r = y.current[n], i = `${E}__item`, a = t.disabled ? `${i}--disabled` : null;
|
|
9338
9344
|
return /* @__PURE__ */ e.createElement("li", {
|
|
9339
9345
|
key: r,
|
|
9340
9346
|
className: Z([i, a]),
|
|
@@ -9344,52 +9350,52 @@ var fr = {
|
|
|
9344
9350
|
},
|
|
9345
9351
|
role: "menuitem"
|
|
9346
9352
|
}, t.linkContent ? t.linkContent : t.label, t.iconName && /* @__PURE__ */ e.createElement(Q, {
|
|
9347
|
-
className: `${
|
|
9353
|
+
className: `${E}__icon`,
|
|
9348
9354
|
iconName: t.iconName,
|
|
9349
9355
|
size: "m"
|
|
9350
9356
|
}));
|
|
9351
|
-
}),
|
|
9357
|
+
}), ae = /* @__PURE__ */ e.createElement("span", { className: `${E}__toggle-left` }, q, d ?? c);
|
|
9352
9358
|
return /* @__PURE__ */ e.createElement("span", {
|
|
9353
|
-
className: Z([
|
|
9359
|
+
className: Z([E, n ?? ""]),
|
|
9354
9360
|
...f
|
|
9355
|
-
}, /* @__PURE__ */ e.createElement(gn, { label:
|
|
9356
|
-
className: Z([
|
|
9361
|
+
}, /* @__PURE__ */ e.createElement(gn, { label: ae }, /* @__PURE__ */ e.createElement("ul", {
|
|
9362
|
+
className: Z([O, `${O}--mobile`]),
|
|
9357
9363
|
role: "menu"
|
|
9358
|
-
},
|
|
9359
|
-
ref:
|
|
9364
|
+
}, te, /* @__PURE__ */ e.createElement("li", { role: "separator" }), ne, X)), /* @__PURE__ */ e.createElement("button", {
|
|
9365
|
+
ref: P.setReference,
|
|
9360
9366
|
"aria-label": t,
|
|
9361
|
-
className: `${
|
|
9367
|
+
className: `${E}__trigger`,
|
|
9362
9368
|
type: "button",
|
|
9363
|
-
...
|
|
9364
|
-
},
|
|
9365
|
-
ref:
|
|
9366
|
-
className: `${
|
|
9369
|
+
...W()
|
|
9370
|
+
}, q), G && /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement("div", {
|
|
9371
|
+
ref: P.setFloating,
|
|
9372
|
+
className: `${E}__dropdown`,
|
|
9367
9373
|
style: {
|
|
9368
|
-
...
|
|
9374
|
+
...N,
|
|
9369
9375
|
zIndex: "var(--pds-z-index-dropdown)"
|
|
9370
9376
|
},
|
|
9371
|
-
...
|
|
9372
|
-
}, /* @__PURE__ */ e.createElement("div", { style: { ...
|
|
9373
|
-
className:
|
|
9377
|
+
...U()
|
|
9378
|
+
}, /* @__PURE__ */ e.createElement("div", { style: { ...K } }, /* @__PURE__ */ e.createElement("ul", {
|
|
9379
|
+
className: O,
|
|
9374
9380
|
role: "menu"
|
|
9375
|
-
},
|
|
9381
|
+
}, te, /* @__PURE__ */ e.createElement("li", { role: "separator" }), ne, Y)))));
|
|
9376
9382
|
}, _i = ({ 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 }) => {
|
|
9377
|
-
let [d, f] = h(""), [g, _] = h(""), v = m(null), y = l.length >= s, b = "pds-workspace-selector",
|
|
9383
|
+
let [d, f] = h(""), [g, _] = h(""), v = m(null), y = l.length >= s, b = "pds-workspace-selector", S = `${b}__menu`, C = y ? `${S}--scroll` : null, { activeIndex: w, floatingStyles: T, getFloatingProps: E, getItemProps: D, getReferenceProps: O, isMounted: k, listRef: A, refs: j, setIsOpen: M, transitionStyles: N } = rn({
|
|
9378
9384
|
enableTypeahead: !y,
|
|
9379
9385
|
role: "menu"
|
|
9380
|
-
}),
|
|
9381
|
-
|
|
9382
|
-
let
|
|
9386
|
+
}), P = l.find((e) => e.isActive);
|
|
9387
|
+
P || (P = l[0]);
|
|
9388
|
+
let F = p(() => {
|
|
9383
9389
|
if (!d) return l;
|
|
9384
9390
|
let e = d.toLowerCase();
|
|
9385
9391
|
return l.filter((t) => t.displayName?.toLowerCase().includes(e));
|
|
9386
|
-
}, [l, d]),
|
|
9392
|
+
}, [l, d]), I = p(() => {
|
|
9387
9393
|
if (!g) return l;
|
|
9388
9394
|
let e = g.toLowerCase();
|
|
9389
9395
|
return l.filter((t) => t.displayName?.toLowerCase().includes(e));
|
|
9390
|
-
}, [l, g]),
|
|
9391
|
-
e.preventDefault(), e.key === "Enter" && (
|
|
9392
|
-
},
|
|
9396
|
+
}, [l, g]), L = (e) => {
|
|
9397
|
+
e.preventDefault(), e.key === "Enter" && (A.current[w]?.querySelector("a") || A.current[w]?.querySelector("button"))?.click(), e.key === "Tab" && (e.shiftKey ? y ? document.getElementById("workspace-filter")?.focus() : M(!1) : r ? v.current?.querySelector("a")?.focus() : M(!1));
|
|
9398
|
+
}, R = (t) => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `${b}__item-content` }, /* @__PURE__ */ e.createElement(We, {
|
|
9393
9399
|
className: `${b}__list-avatar`,
|
|
9394
9400
|
imageSrc: t.imageSrc,
|
|
9395
9401
|
size: "s",
|
|
@@ -9397,9 +9403,9 @@ var fr = {
|
|
|
9397
9403
|
}), t.displayName, t.isRestricted && /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, t.restrictedLabel ?? "Restricted")), (t.isRestricted || t.isActive) && /* @__PURE__ */ e.createElement("div", { className: `${b}__icons` }, t.isRestricted && /* @__PURE__ */ e.createElement(Q, {
|
|
9398
9404
|
className: `${b}__lock-icon`,
|
|
9399
9405
|
iconName: "lock"
|
|
9400
|
-
}), t.isActive && /* @__PURE__ */ e.createElement(Rn, null))),
|
|
9406
|
+
}), t.isActive && /* @__PURE__ */ e.createElement(Rn, null))), z = F.map((t, n) => {
|
|
9401
9407
|
let r = `${b}__item`, i = t.workspaceId, a = t.isRestricted && t.onRestrictedSelection, o = t.workspaceLink?.type, s = t.isUnprivileged ? null : (e) => {
|
|
9402
|
-
|
|
9408
|
+
A.current[n] = e;
|
|
9403
9409
|
};
|
|
9404
9410
|
return /* @__PURE__ */ e.createElement("li", {
|
|
9405
9411
|
key: i,
|
|
@@ -9413,17 +9419,17 @@ var fr = {
|
|
|
9413
9419
|
t.isRestricted ? `${r}--restricted` : null
|
|
9414
9420
|
]),
|
|
9415
9421
|
id: i,
|
|
9416
|
-
onKeyDown:
|
|
9422
|
+
onKeyDown: L,
|
|
9417
9423
|
role: "menuitem",
|
|
9418
|
-
tabIndex:
|
|
9419
|
-
...
|
|
9424
|
+
tabIndex: w === n ? 0 : -1,
|
|
9425
|
+
...D()
|
|
9420
9426
|
}, a ? /* @__PURE__ */ e.createElement("button", {
|
|
9421
9427
|
onClick: () => {
|
|
9422
|
-
t.onRestrictedSelection(),
|
|
9428
|
+
t.onRestrictedSelection(), M(!1);
|
|
9423
9429
|
},
|
|
9424
9430
|
type: "button"
|
|
9425
|
-
},
|
|
9426
|
-
}),
|
|
9431
|
+
}, R(t)) : o ? /* @__PURE__ */ e.createElement(o, Object.assign({}, t.workspaceLink.props, { onClick: () => M(!1) }), R(t)) : null);
|
|
9432
|
+
}), B = I.map((t) => {
|
|
9427
9433
|
let n = `${b}__item`, r = t.workspaceId, i = t.isRestricted && t.onRestrictedSelection, a = t.workspaceLink?.type;
|
|
9428
9434
|
return /* @__PURE__ */ e.createElement("li", {
|
|
9429
9435
|
key: `${r}-accordion`,
|
|
@@ -9440,27 +9446,27 @@ var fr = {
|
|
|
9440
9446
|
}, i ? /* @__PURE__ */ e.createElement("button", {
|
|
9441
9447
|
onClick: () => t.onRestrictedSelection(),
|
|
9442
9448
|
type: "button"
|
|
9443
|
-
},
|
|
9444
|
-
}),
|
|
9449
|
+
}, R(t)) : a ? /* @__PURE__ */ e.createElement(a, Object.assign({}, t.workspaceLink?.props), R(t)) : null);
|
|
9450
|
+
}), V = r && /* @__PURE__ */ e.createElement("div", {
|
|
9445
9451
|
ref: v,
|
|
9446
9452
|
className: `${b}__create-link`
|
|
9447
9453
|
}, /* @__PURE__ */ e.createElement("span", {
|
|
9448
9454
|
className: `${b}__create-link-inner`,
|
|
9449
|
-
onBlur: () =>
|
|
9450
|
-
onClick: () =>
|
|
9455
|
+
onBlur: () => M(!1),
|
|
9456
|
+
onClick: () => M(!1)
|
|
9451
9457
|
}, r, /* @__PURE__ */ e.createElement(Q, {
|
|
9452
9458
|
iconName: "plus",
|
|
9453
9459
|
size: "s"
|
|
9454
|
-
}))),
|
|
9460
|
+
}))), H = P ? /* @__PURE__ */ e.createElement("div", { className: `${b}__button-content` }, /* @__PURE__ */ e.createElement(We, {
|
|
9455
9461
|
className: `${b}__avatar`,
|
|
9456
|
-
imageSrc:
|
|
9462
|
+
imageSrc: P.imageSrc,
|
|
9457
9463
|
size: "s",
|
|
9458
|
-
uniqueId:
|
|
9459
|
-
}), /* @__PURE__ */ e.createElement("span", { className: `${b}__name` },
|
|
9464
|
+
uniqueId: P.workspaceId
|
|
9465
|
+
}), /* @__PURE__ */ e.createElement("span", { className: `${b}__name` }, P.displayName)) : null;
|
|
9460
9466
|
return /* @__PURE__ */ e.createElement("span", {
|
|
9461
9467
|
className: Z([b, n]),
|
|
9462
9468
|
...u
|
|
9463
|
-
}, /* @__PURE__ */ e.createElement(gn, { label:
|
|
9469
|
+
}, /* @__PURE__ */ e.createElement(gn, { label: H }, y && /* @__PURE__ */ e.createElement("div", { className: `${b}__filter` }, /* @__PURE__ */ e.createElement(Vr, {
|
|
9464
9470
|
hasClearButton: !0,
|
|
9465
9471
|
id: "workspace-filter-mobile",
|
|
9466
9472
|
label: i,
|
|
@@ -9470,33 +9476,33 @@ var fr = {
|
|
|
9470
9476
|
showLabel: !1,
|
|
9471
9477
|
type: "search"
|
|
9472
9478
|
})), /* @__PURE__ */ e.createElement("ul", {
|
|
9473
|
-
className: Z([
|
|
9479
|
+
className: Z([S, `${S}--mobile`]),
|
|
9474
9480
|
role: "menu"
|
|
9475
9481
|
}, /* @__PURE__ */ e.createElement("li", {
|
|
9476
9482
|
className: `pds-dropdown__heading ${b}__item-heading`,
|
|
9477
9483
|
role: "presentation"
|
|
9478
|
-
}, o),
|
|
9484
|
+
}, o), B.length === 0 ? /* @__PURE__ */ e.createElement("p", { className: "pds-dropdown__no-results" }, c) : B), r && /* @__PURE__ */ e.createElement("div", { className: `${b}__create-link` }, /* @__PURE__ */ e.createElement("span", { className: `${b}__create-link-inner` }, r, /* @__PURE__ */ e.createElement(Q, {
|
|
9479
9485
|
iconName: "plus",
|
|
9480
9486
|
size: "s"
|
|
9481
9487
|
})))), /* @__PURE__ */ e.createElement("button", {
|
|
9482
|
-
ref:
|
|
9488
|
+
ref: j.setReference,
|
|
9483
9489
|
"aria-label": t,
|
|
9484
9490
|
className: `${b}__trigger`,
|
|
9485
9491
|
type: "button",
|
|
9486
|
-
...
|
|
9487
|
-
},
|
|
9492
|
+
...O()
|
|
9493
|
+
}, H, /* @__PURE__ */ e.createElement(Q, {
|
|
9488
9494
|
className: `${b}__trigger-icon`,
|
|
9489
9495
|
iconName: "angleDown",
|
|
9490
9496
|
size: "m"
|
|
9491
|
-
})),
|
|
9492
|
-
ref:
|
|
9497
|
+
})), k && /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement("div", {
|
|
9498
|
+
ref: j.setFloating,
|
|
9493
9499
|
className: `pds-dropdown__panel ${b}__dropdown`,
|
|
9494
9500
|
style: {
|
|
9495
|
-
...
|
|
9496
|
-
...
|
|
9501
|
+
...T,
|
|
9502
|
+
...N,
|
|
9497
9503
|
zIndex: "var(--pds-z-index-dropdown)"
|
|
9498
9504
|
},
|
|
9499
|
-
...
|
|
9505
|
+
...E()
|
|
9500
9506
|
}, y && /* @__PURE__ */ e.createElement("div", { className: `${b}__filter` }, /* @__PURE__ */ e.createElement(Vr, {
|
|
9501
9507
|
hasClearButton: !0,
|
|
9502
9508
|
id: "workspace-filter",
|
|
@@ -9507,12 +9513,12 @@ var fr = {
|
|
|
9507
9513
|
showLabel: !1,
|
|
9508
9514
|
type: "search"
|
|
9509
9515
|
})), /* @__PURE__ */ e.createElement("ul", {
|
|
9510
|
-
className: Z([
|
|
9516
|
+
className: Z([S, C]),
|
|
9511
9517
|
role: "menu"
|
|
9512
9518
|
}, /* @__PURE__ */ e.createElement("li", {
|
|
9513
9519
|
className: `pds-dropdown__heading ${b}__item-heading`,
|
|
9514
9520
|
role: "presentation"
|
|
9515
|
-
}, o),
|
|
9521
|
+
}, o), z.length === 0 ? /* @__PURE__ */ e.createElement("p", { className: "pds-dropdown__no-results" }, c) : z), V)));
|
|
9516
9522
|
}, vi = {
|
|
9517
9523
|
info: "circleInfo",
|
|
9518
9524
|
warning: "triangleExclamation",
|
|
@@ -10428,13 +10434,13 @@ var fr = {
|
|
|
10428
10434
|
k(V),
|
|
10429
10435
|
A(V),
|
|
10430
10436
|
L(V)
|
|
10431
|
-
]), q = U.arrow?.x ?? 0, te = U.arrow?.y ?? 0, ne = q + ea / 2,
|
|
10437
|
+
]), q = U.arrow?.x ?? 0, te = U.arrow?.y ?? 0, ne = q + ea / 2, J = te + $i, { isMounted: re } = R(V, {
|
|
10432
10438
|
initial: { transform: "scale(0)" },
|
|
10433
10439
|
common: ({ side: e }) => ({ transformOrigin: {
|
|
10434
10440
|
top: `${ne}px calc(100% + ${$i}px)`,
|
|
10435
10441
|
bottom: `${ne}px -8px`,
|
|
10436
|
-
left: `calc(100% + ${$i}px) ${
|
|
10437
|
-
right: `-8px ${
|
|
10442
|
+
left: `calc(100% + ${$i}px) ${J}px`,
|
|
10443
|
+
right: `-8px ${J}px`
|
|
10438
10444
|
}[e] })
|
|
10439
10445
|
});
|
|
10440
10446
|
return /* @__PURE__ */ e.createElement("div", {
|
|
@@ -10451,7 +10457,7 @@ var fr = {
|
|
|
10451
10457
|
className: `${P}__icon`,
|
|
10452
10458
|
iconName: _,
|
|
10453
10459
|
size: b
|
|
10454
|
-
}))),
|
|
10460
|
+
}))), re && /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement(y, {
|
|
10455
10461
|
context: V,
|
|
10456
10462
|
initialFocus: -1,
|
|
10457
10463
|
modal: o
|
|
@@ -10793,14 +10799,14 @@ var va = 24, ya = { droppable: { strategy: ve.Always } }, ba = a(function({ chil
|
|
|
10793
10799
|
};
|
|
10794
10800
|
}
|
|
10795
10801
|
return we(e, t);
|
|
10796
|
-
}, [_]), W = b === "always" || b === "toggle" && (l ?? !1), { currentItems: G, expandItem: K, flatNodes: q, handleReorder: te, resetToSnapshot: ne, sortableIds:
|
|
10802
|
+
}, [_]), W = b === "always" || b === "toggle" && (l ?? !1), { currentItems: G, expandItem: K, flatNodes: q, handleReorder: te, resetToSnapshot: ne, sortableIds: J, toggleExpand: re } = ha({
|
|
10797
10803
|
defaultItems: a,
|
|
10798
10804
|
isDragEnabled: W,
|
|
10799
10805
|
items: g,
|
|
10800
10806
|
onReorder: v
|
|
10801
10807
|
});
|
|
10802
10808
|
d(C, () => ({ resetToSnapshot: ne }), [ne]);
|
|
10803
|
-
let
|
|
10809
|
+
let ie = Se(xe(ye, { activationConstraint: { distance: 5 } }), xe(_e, { coordinateGetter: ee })), Y = W ? `${w}--reorder-active` : null, X = p(() => new Set(q.filter((e) => u(e.data)).map((e) => e.id)), [q, u]), ae = p(() => new Set(q.filter((e) => f(e.data)).map((e) => e.id)), [q, f]), oe = s((e) => {
|
|
10804
10810
|
if (_ === 0 || ae.has(String(e))) return !1;
|
|
10805
10811
|
let t = q.find((t) => t.id === e);
|
|
10806
10812
|
return !t || t.depth >= _ ? !1 : t.hasChildren ? !t.isExpanded : !0;
|
|
@@ -10844,8 +10850,8 @@ var va = 24, ya = { droppable: { strategy: ve.Always } }, ba = a(function({ chil
|
|
|
10844
10850
|
de
|
|
10845
10851
|
]), pe = s((e) => {
|
|
10846
10852
|
let { active: t } = e, n = F.current === "keyboard", r = q.find((e) => e.id === t.id);
|
|
10847
|
-
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 && (
|
|
10848
|
-
}, [q,
|
|
10853
|
+
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 && (re(String(t.id)), L.current = String(t.id));
|
|
10854
|
+
}, [q, re]), me = s((e) => {
|
|
10849
10855
|
let t = be(e);
|
|
10850
10856
|
if (!t.length || !D.current || X.size === 0) return t;
|
|
10851
10857
|
let n = q.findIndex((e) => e.id === D.current);
|
|
@@ -10977,9 +10983,9 @@ var va = 24, ya = { droppable: { strategy: ve.Always } }, ba = a(function({ chil
|
|
|
10977
10983
|
onDragMove: Te,
|
|
10978
10984
|
onDragOver: ve,
|
|
10979
10985
|
onDragStart: pe,
|
|
10980
|
-
sensors:
|
|
10986
|
+
sensors: ie
|
|
10981
10987
|
}, /* @__PURE__ */ e.createElement(Ce, {
|
|
10982
|
-
items:
|
|
10988
|
+
items: J,
|
|
10983
10989
|
strategy: se
|
|
10984
10990
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
10985
10991
|
className: Z([
|
|
@@ -11003,7 +11009,7 @@ var va = 24, ya = { droppable: { strategy: ve.Always } }, ba = a(function({ chil
|
|
|
11003
11009
|
isDragging: t.id === T,
|
|
11004
11010
|
isExpanded: t.isExpanded,
|
|
11005
11011
|
isLocked: X.has(t.id),
|
|
11006
|
-
toggleExpand: () =>
|
|
11012
|
+
toggleExpand: () => re(t.id)
|
|
11007
11013
|
}, r = y(t.data, n), a = t.id === T, s = {
|
|
11008
11014
|
columns: i,
|
|
11009
11015
|
depth: t.depth,
|
|
@@ -11014,7 +11020,7 @@ var va = 24, ya = { droppable: { strategy: ve.Always } }, ba = a(function({ chil
|
|
|
11014
11020
|
isProjectedParent: t.id === fe && !ae.has(t.id),
|
|
11015
11021
|
isExpanded: t.isExpanded,
|
|
11016
11022
|
...X.has(t.id) ? { isLocked: !0 } : {},
|
|
11017
|
-
onToggleExpand: () =>
|
|
11023
|
+
onToggleExpand: () => re(t.id),
|
|
11018
11024
|
...a && !O && _ > 0 ? { projectedDepthDelta: de - t.depth } : {}
|
|
11019
11025
|
};
|
|
11020
11026
|
return o(r) ? e.cloneElement(r, {
|
|
@@ -11334,15 +11340,15 @@ var Sa = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11334
11340
|
...i
|
|
11335
11341
|
}, /* @__PURE__ */ e.createElement("ol", { className: `${a}__steps` }, r && c));
|
|
11336
11342
|
}, ka = ({ 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 }) => {
|
|
11337
|
-
let K = "pds-table", q = u(), te = u(), ne = P !== void 0,
|
|
11343
|
+
let K = "pds-table", q = u(), te = u(), ne = P !== void 0, J = A !== void 0, re = j !== void 0, ie = J || T !== void 0 || F !== void 0, [Y, X] = h({
|
|
11338
11344
|
key: a ?? "",
|
|
11339
11345
|
order: a === void 0 ? "asc" : o
|
|
11340
|
-
}), [ae, oe] = h(1), [se, ce] = h(T ?? F?.[0] ?? 10), [le, ue] = h(null), de = C ?? le, fe = !!de && !!R, pe =
|
|
11341
|
-
|
|
11346
|
+
}), [ae, oe] = h(1), [se, ce] = h(T ?? F?.[0] ?? 10), [le, ue] = h(null), de = C ?? le, fe = !!de && !!R, pe = J ? T ?? 10 : se, me = (e) => {
|
|
11347
|
+
re ? j(e) : ce(e), J || oe(1);
|
|
11342
11348
|
};
|
|
11343
11349
|
l(() => {
|
|
11344
|
-
|
|
11345
|
-
}, [B.length,
|
|
11350
|
+
J || oe(1);
|
|
11351
|
+
}, [B.length, J]), l(() => {
|
|
11346
11352
|
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.");
|
|
11347
11353
|
}, []);
|
|
11348
11354
|
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), [
|
|
@@ -11372,7 +11378,7 @@ var Sa = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11372
11378
|
return Y.order === "asc" ? r : -r;
|
|
11373
11379
|
});
|
|
11374
11380
|
}
|
|
11375
|
-
if (!
|
|
11381
|
+
if (!J && ie && pe) {
|
|
11376
11382
|
let t = (ae - 1) * pe;
|
|
11377
11383
|
e = e.slice(t, t + pe);
|
|
11378
11384
|
}
|
|
@@ -11381,8 +11387,8 @@ var Sa = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11381
11387
|
B,
|
|
11382
11388
|
Y,
|
|
11383
11389
|
ne,
|
|
11384
|
-
re,
|
|
11385
11390
|
J,
|
|
11391
|
+
ie,
|
|
11386
11392
|
ae,
|
|
11387
11393
|
pe,
|
|
11388
11394
|
w
|
|
@@ -11471,7 +11477,7 @@ var Sa = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11471
11477
|
})), /* @__PURE__ */ e.createElement("span", { className: Z([`${K}__sort-button-bottom`, Ne(t.id, "bottom")]) }, /* @__PURE__ */ e.createElement(Q, {
|
|
11472
11478
|
iconName: "caretDown",
|
|
11473
11479
|
size: "m"
|
|
11474
|
-
})))) : /* @__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))))),
|
|
11480
|
+
})))) : /* @__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))))), ie && !w && (J || B.length > 0) && /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__pagination" }, F && F.length > 0 && /* @__PURE__ */ e.createElement(Bn, {
|
|
11475
11481
|
autoWidth: !0,
|
|
11476
11482
|
id: q,
|
|
11477
11483
|
label: "Rows per page",
|
|
@@ -11484,10 +11490,10 @@ var Sa = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11484
11490
|
size: "s",
|
|
11485
11491
|
value: String(pe)
|
|
11486
11492
|
}), /* @__PURE__ */ e.createElement("div", { className: "pds-table-wrapper__pagination-controls" }, /* @__PURE__ */ e.createElement(Hi, {
|
|
11487
|
-
currentPage:
|
|
11493
|
+
currentPage: J ? i ?? 1 : ae,
|
|
11488
11494
|
itemsPerPage: pe,
|
|
11489
|
-
onPageChange:
|
|
11490
|
-
totalItemCount:
|
|
11495
|
+
onPageChange: J ? A : oe,
|
|
11496
|
+
totalItemCount: J ? W ?? 0 : B.length
|
|
11491
11497
|
}))), _ && /* @__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(tn, {
|
|
11492
11498
|
ariaLabel: n,
|
|
11493
11499
|
onClick: Te,
|
|
@@ -11905,14 +11911,14 @@ var Sa = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11905
11911
|
r.disconnect(), i?.disconnect(), window.removeEventListener("resize", t);
|
|
11906
11912
|
};
|
|
11907
11913
|
}, [z]);
|
|
11908
|
-
let q = Le(t), te = q.__unslotted, ne = q.header,
|
|
11914
|
+
let q = Le(t), te = q.__unslotted, ne = q.header, J = q.footer, re = q.sidebar, ie = q.identity, Y = q["content-top"], X = q.navigation, ae = q["content-bottom"], oe = ie || Y || X || ae, se = oe ? /* @__PURE__ */ e.createElement(e.Fragment, null, (ie || o) && /* @__PURE__ */ e.createElement("div", { className: `${P}__sidebar-identity` }, ie, o && !M && /* @__PURE__ */ e.createElement($t, {
|
|
11909
11915
|
hasBorder: !0,
|
|
11910
11916
|
ariaLabel: I.drawerToggle,
|
|
11911
11917
|
className: `${P}__drawer-toggle`,
|
|
11912
11918
|
iconName: "sidebar",
|
|
11913
11919
|
onClick: x,
|
|
11914
11920
|
size: "s"
|
|
11915
|
-
})), Y && /* @__PURE__ */ e.createElement("div", { className: `${P}__sidebar-content-top` }, Y), X && /* @__PURE__ */ e.createElement("div", { className: `${P}__sidebar-navigation` }, X), ae && /* @__PURE__ */ e.createElement("div", { className: `${P}__sidebar-content-bottom` }, ae)) :
|
|
11921
|
+
})), Y && /* @__PURE__ */ e.createElement("div", { className: `${P}__sidebar-content-top` }, Y), X && /* @__PURE__ */ e.createElement("div", { className: `${P}__sidebar-navigation` }, X), ae && /* @__PURE__ */ e.createElement("div", { className: `${P}__sidebar-content-bottom` }, ae)) : re, ce = i(v, {
|
|
11916
11922
|
...b,
|
|
11917
11923
|
className: Z([`${P}__main`, b?.className]),
|
|
11918
11924
|
id: L,
|
|
@@ -11927,10 +11933,10 @@ var Sa = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11927
11933
|
}, te)), le = /* @__PURE__ */ e.createElement("div", {
|
|
11928
11934
|
className: `${P}__content-column`,
|
|
11929
11935
|
style: { backgroundColor: _ || void 0 }
|
|
11930
|
-
}, ce,
|
|
11936
|
+
}, ce, J && /* @__PURE__ */ e.createElement("div", { className: `${P}__footer` }, /* @__PURE__ */ e.createElement("div", {
|
|
11931
11937
|
className: `${P}__footer-inner`,
|
|
11932
11938
|
style: { maxWidth: R }
|
|
11933
|
-
},
|
|
11939
|
+
}, J))), ue = /* @__PURE__ */ e.createElement(e.Fragment, null, (re || oe) && /* @__PURE__ */ e.createElement("div", {
|
|
11934
11940
|
...k,
|
|
11935
11941
|
className: Z([
|
|
11936
11942
|
`${P}__sidebar`,
|
|
@@ -12010,17 +12016,13 @@ var Sa = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12010
12016
|
},
|
|
12011
12017
|
...l
|
|
12012
12018
|
}, /* @__PURE__ */ e.createElement("div", { className: `${u}__main` }, f.__unslotted || f.content), /* @__PURE__ */ e.createElement("div", { className: `${u}__side` }, f.sidebar));
|
|
12013
|
-
}, Ja = ({ children: t, className: n,
|
|
12014
|
-
let
|
|
12015
|
-
|
|
12016
|
-
|
|
12017
|
-
|
|
12018
|
-
|
|
12019
|
-
|
|
12020
|
-
}, a && /* @__PURE__ */ e.createElement("div", {
|
|
12021
|
-
ref: s,
|
|
12022
|
-
className: `${u}__stepper-container`
|
|
12023
|
-
}, a), o && /* @__PURE__ */ e.createElement("div", { className: `${u}__form-container` }, o));
|
|
12019
|
+
}, Ja = ({ children: t, className: n, hasPanel: r = !1, ...i }) => {
|
|
12020
|
+
let a = Le(t), o = a.stepper, s = a.form, c = "pds-stepper-layout", l = /* @__PURE__ */ e.createElement(ri, {
|
|
12021
|
+
className: Z([c, n]),
|
|
12022
|
+
width: "wide",
|
|
12023
|
+
...i
|
|
12024
|
+
}, o && /* @__PURE__ */ e.createElement("div", { className: `${c}__stepper-container` }, o), s && /* @__PURE__ */ e.createElement("div", { className: `${c}__form-container` }, s));
|
|
12025
|
+
return r ? /* @__PURE__ */ e.createElement(Ki, null, l) : l;
|
|
12024
12026
|
}, Ya = ({ children: t, className: n, gridGap: r = "xl", verticalAlign: i = "start", ...a }) => {
|
|
12025
12027
|
let o = "pds-three-item-layout", s = r === "xl" ? "pds-grid" : `pds-grid pds-grid--gap-${r}`, c = `${o}--${i}`, l = Le(t), u = [
|
|
12026
12028
|
l["first-item"],
|