@pantheon-systems/pds-toolkit-react 2.0.0-alpha.77 → 2.0.0-alpha.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/buttons/IconButton/IconButton.d.ts +1 -1
- package/dist/components/buttons/MenuButton/MenuButton.d.ts +1 -1
- package/dist/components/cards/Card/Card.d.ts +2 -2
- package/dist/components/icons/Icon/generated-icon-data.d.ts +1 -1
- package/dist/components/links/CTALink/CTALink.d.ts +2 -2
- package/dist/components/links/LinkNewWindow/LinkNewWindow.d.ts +1 -1
- package/dist/components/panels/FeaturePanel/FeaturePanel.d.ts +72 -0
- package/dist/components/panels/WidgetPanel/WidgetPanel.d.ts +39 -0
- package/dist/css/component-css/pds-cta-link.css +1 -1
- package/dist/css/component-css/pds-feature-panel.css +15 -0
- package/dist/css/component-css/pds-icon-button.css +1 -1
- package/dist/css/component-css/pds-index.css +20 -6
- package/dist/css/component-css/pds-link-new-window.css +1 -1
- package/dist/css/component-css/pds-section-message.css +1 -1
- package/dist/css/component-css/pds-status-checker.css +1 -1
- package/dist/css/component-css/pds-widget-panel.css +1 -0
- package/dist/css/pds-components.css +20 -6
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +702 -666
- package/dist/index.js.map +1 -1
- package/dist/index.source.d.ts +2 -0
- package/dist/libs/types/layout-types.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import e, { Children as t, Fragment as n, cloneElement as r, createContext as i,
|
|
|
2
2
|
import v from "hash-sum";
|
|
3
3
|
import { FloatingArrow as y, FloatingFocusManager as b, FloatingNode as x, FloatingOverlay as S, FloatingPortal as C, FloatingTree as w, arrow as T, autoUpdate as E, flip as D, offset as O, safePolygon as k, shift as A, size as j, useClick as M, useDismiss as N, useFloating as P, useFloatingNodeId as F, useFloatingParentNodeId as I, useFocus as L, useHover as R, useId as z, useInteractions as B, useListNavigation as V, useRole as H, useTransitionStyles as U, useTypeahead as W } from "@floating-ui/react";
|
|
4
4
|
import { useHotkeys as G } from "react-hotkeys-hook";
|
|
5
|
-
import { Bar as K, BarChart as q, CartesianGrid as J, Cell as ee, Line as te, LineChart as ne, Pie as re, PieChart as ie, Rectangle as ae, ReferenceLine as oe, ResponsiveContainer as se, Tooltip as Y, XAxis as
|
|
5
|
+
import { Bar as K, BarChart as q, CartesianGrid as J, Cell as ee, Line as te, LineChart as ne, Pie as re, PieChart as ie, Rectangle as ae, ReferenceLine as oe, ResponsiveContainer as se, Tooltip as Y, XAxis as ce, YAxis as X } from "recharts";
|
|
6
6
|
import { CodeBlock as le } from "react-code-block";
|
|
7
7
|
import { useCombobox as ue, useMultipleSelection as de } from "downshift";
|
|
8
8
|
import { CalendarDate as fe, Time as pe, createCalendar as me, endOfMonth as he, endOfWeek as ge, fromDate as _e, getLocalTimeZone as ve, startOfMonth as ye, startOfWeek as be, toCalendarDateTime as xe, toTimeZone as Se, toZoned as Ce, today as we } from "@internationalized/date";
|
|
@@ -2970,6 +2970,9 @@ var Dn = ({ className: t, componentWidth: n, isLoading: r, loadingText: i = "Loa
|
|
|
2970
2970
|
scaleIn: `${v}--scaleIn`
|
|
2971
2971
|
}, w, T;
|
|
2972
2972
|
switch (p) {
|
|
2973
|
+
case "xs":
|
|
2974
|
+
T = "m", w = 6;
|
|
2975
|
+
break;
|
|
2973
2976
|
case "s":
|
|
2974
2977
|
T = "m", w = 8;
|
|
2975
2978
|
break;
|
|
@@ -3481,7 +3484,7 @@ var Dn = ({ className: t, componentWidth: n, isLoading: r, loadingText: i = "Loa
|
|
|
3481
3484
|
}));
|
|
3482
3485
|
}, er = ({ children: t, className: n, ...r }) => {
|
|
3483
3486
|
let { floatingStyles: i, getFloatingProps: a, isMounted: o, nodeId: s, refs: c, transitionStyles: l } = Xn();
|
|
3484
|
-
return o ? /* @__PURE__ */ e.createElement(x, { id: s }, /* @__PURE__ */ e.createElement("ul", {
|
|
3487
|
+
return o ? /* @__PURE__ */ e.createElement(x, { id: s }, /* @__PURE__ */ e.createElement(C, null, /* @__PURE__ */ e.createElement("ul", {
|
|
3485
3488
|
ref: c.setFloating,
|
|
3486
3489
|
className: Z(["pds-dropdown__panel", n ?? ""]),
|
|
3487
3490
|
style: {
|
|
@@ -3490,7 +3493,7 @@ var Dn = ({ className: t, componentWidth: n, isLoading: r, loadingText: i = "Loa
|
|
|
3490
3493
|
},
|
|
3491
3494
|
...a(),
|
|
3492
3495
|
...r
|
|
3493
|
-
}, t)) : null;
|
|
3496
|
+
}, t))) : null;
|
|
3494
3497
|
}, tr = ({ children: t, className: n, closeOnSelect: r = !0, description: i, disabled: a, icon: o, index: s, isActive: c, isCritical: l, onClick: u, onKeyDown: d, trailingIcon: f, ...p }) => {
|
|
3495
3498
|
let { activeIndex: m, getItemProps: h, listRef: g, setIsOpen: _ } = Xn(), v = "pds-dropdown", y = m === s, b = y ? `${v}__item--focused` : null, x = c ? `${v}__item--active` : null, S = l ? `${v}__item--critical` : null, C = a ? `${v}__item--disabled` : null, w = (e) => {
|
|
3496
3499
|
u?.(e), r && _(!1);
|
|
@@ -4295,29 +4298,29 @@ var sr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4295
4298
|
}, Cr = ({ autoWidth: t = !1, className: n, defaultValue: r, disabled: i, icon: a, id: o, inputWidth: s, label: c, labelStrings: l = {
|
|
4296
4299
|
selectOptionText: "Select an option...",
|
|
4297
4300
|
triggerButton: "Toggle dropdown menu"
|
|
4298
|
-
}, message: d, onBlur: f, onFocus: p, onOptionSelect: m, options: h, required: _ = !1, showLabel: v = !0, showSelectedIcon: y = !0, size: b = "s", tooltipText: x = null, validationMessage: S, validationStatus:
|
|
4299
|
-
let
|
|
4300
|
-
|
|
4301
|
-
let
|
|
4301
|
+
}, message: d, onBlur: f, onFocus: p, onOptionSelect: m, options: h, required: _ = !1, showLabel: v = !0, showSelectedIcon: y = !0, size: b = "s", tooltipText: x = null, validationMessage: S, validationStatus: w, value: T, ...E }) => {
|
|
4302
|
+
let D = cn(s), O = "pds-select", k = t ? `${O}--auto-width` : null, A = b === "s" ? null : `${O}--${b}`, j = i ? $.disabled : null, M = _ && !i ? $.required : null, N = w === "error" ? $.error : null, P = w === "success" ? $.success : null, F = null;
|
|
4303
|
+
w === "error" && (F = "error"), w === "success" && (F = "success");
|
|
4304
|
+
let I = S || d, L = T !== void 0, R = r !== void 0, z = ((e) => e.reduce((e, t) => yn(t) ? [...e, ...t.options] : [...e, t], []))(h), B = (e) => z.findIndex((t) => t.value === e), V = L && B(T) >= 0 ? B(T) : null, H = R ? B(r) : null, [U, W] = g((V || H) ?? null), { activeIndex: G, floatingStyles: K, getFloatingProps: q, getItemProps: J, getReferenceProps: ee, isMounted: te, listRef: ne, refs: re, setIsOpen: ie, transitionStyles: ae } = Rn({
|
|
4302
4305
|
enableClick: !i,
|
|
4303
4306
|
enableTypeahead: !0,
|
|
4304
4307
|
role: "listbox",
|
|
4305
|
-
selectedIndex:
|
|
4308
|
+
selectedIndex: U,
|
|
4306
4309
|
variant: "input"
|
|
4307
|
-
}),
|
|
4308
|
-
let t =
|
|
4309
|
-
|
|
4310
|
+
}), oe = U === null ? void 0 : z[U]?.label, se = U === null ? void 0 : z[U]?.icon, Y = U === null ? void 0 : z[U]?.value, ce = (e) => {
|
|
4311
|
+
let t = z[e];
|
|
4312
|
+
L || (W(e), ie(!1)), m && m(t);
|
|
4310
4313
|
};
|
|
4311
4314
|
u(() => {
|
|
4312
|
-
|
|
4313
|
-
}, [
|
|
4315
|
+
L && (W(B(T)), ie(!1));
|
|
4316
|
+
}, [T]);
|
|
4314
4317
|
let X = () => {
|
|
4315
|
-
f && f(
|
|
4316
|
-
}, ce = () => {
|
|
4317
|
-
p && p(se);
|
|
4318
|
+
f && f(Y);
|
|
4318
4319
|
}, le = () => {
|
|
4319
|
-
|
|
4320
|
-
}, ue = (
|
|
4320
|
+
p && p(Y);
|
|
4321
|
+
}, ue = () => {
|
|
4322
|
+
re.reference.current.focus();
|
|
4323
|
+
}, de = (t, n) => t === "google" || t === "microsoft" ? /* @__PURE__ */ e.createElement(fr, {
|
|
4321
4324
|
className: n,
|
|
4322
4325
|
platformType: t,
|
|
4323
4326
|
size: "m"
|
|
@@ -4325,7 +4328,7 @@ var sr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4325
4328
|
className: n,
|
|
4326
4329
|
iconName: t,
|
|
4327
4330
|
size: "m"
|
|
4328
|
-
}),
|
|
4331
|
+
}), fe = (t) => {
|
|
4329
4332
|
let n = 0;
|
|
4330
4333
|
return t.map((t) => {
|
|
4331
4334
|
if (yn(t)) {
|
|
@@ -4334,20 +4337,20 @@ var sr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4334
4337
|
return /* @__PURE__ */ e.createElement(bn, {
|
|
4335
4338
|
key: r,
|
|
4336
4339
|
ref: (e) => {
|
|
4337
|
-
|
|
4340
|
+
ne.current[r] = e;
|
|
4338
4341
|
},
|
|
4339
4342
|
"aria-disabled": t?.disabled,
|
|
4340
|
-
"aria-selected": r ===
|
|
4341
|
-
tabIndex: r ===
|
|
4342
|
-
...!t?.disabled &&
|
|
4343
|
+
"aria-selected": r === U && r === G,
|
|
4344
|
+
tabIndex: r === G ? 0 : -1,
|
|
4345
|
+
...!t?.disabled && J({
|
|
4343
4346
|
onClick() {
|
|
4344
|
-
|
|
4347
|
+
ce(r);
|
|
4345
4348
|
},
|
|
4346
4349
|
onKeyDown(e) {
|
|
4347
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
4350
|
+
e.key === "Enter" && (e.preventDefault(), ce(r), re.reference.current.focus()), e.key === "Escape" && (e.preventDefault(), re.reference.current.focus());
|
|
4348
4351
|
}
|
|
4349
4352
|
})
|
|
4350
|
-
}, /* @__PURE__ */ e.createElement("span", { className: `${
|
|
4353
|
+
}, /* @__PURE__ */ e.createElement("span", { className: `${O}__option-label` }, t.icon && de(t.icon, `${O}__option-icon`), t.label), y && U === r && /* @__PURE__ */ e.createElement(sr, null));
|
|
4351
4354
|
});
|
|
4352
4355
|
return /* @__PURE__ */ e.createElement(Sr, {
|
|
4353
4356
|
key: t.groupLabel,
|
|
@@ -4358,44 +4361,44 @@ var sr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4358
4361
|
return /* @__PURE__ */ e.createElement(bn, {
|
|
4359
4362
|
key: r,
|
|
4360
4363
|
ref: (e) => {
|
|
4361
|
-
|
|
4364
|
+
ne.current[r] = e;
|
|
4362
4365
|
},
|
|
4363
4366
|
"aria-disabled": t?.disabled,
|
|
4364
|
-
"aria-selected": r ===
|
|
4365
|
-
tabIndex: r ===
|
|
4366
|
-
...!t?.disabled &&
|
|
4367
|
+
"aria-selected": r === U && r === G,
|
|
4368
|
+
tabIndex: r === G ? 0 : -1,
|
|
4369
|
+
...!t?.disabled && J({
|
|
4367
4370
|
onClick() {
|
|
4368
|
-
|
|
4371
|
+
ce(r);
|
|
4369
4372
|
},
|
|
4370
4373
|
onKeyDown(e) {
|
|
4371
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
4374
|
+
e.key === "Enter" && (e.preventDefault(), ce(r), re.reference.current.focus()), e.key === "Escape" && (e.preventDefault(), re.reference.current.focus());
|
|
4372
4375
|
}
|
|
4373
4376
|
})
|
|
4374
|
-
}, /* @__PURE__ */ e.createElement("span", { className: `${
|
|
4377
|
+
}, /* @__PURE__ */ e.createElement("span", { className: `${O}__option-label` }, t.icon && de(t.icon, `${O}__option-icon`), t.label), y && U === r && /* @__PURE__ */ e.createElement(sr, null));
|
|
4375
4378
|
});
|
|
4376
4379
|
};
|
|
4377
4380
|
return /* @__PURE__ */ e.createElement("div", {
|
|
4378
4381
|
className: Z([
|
|
4379
4382
|
$.base,
|
|
4380
|
-
D,
|
|
4381
4383
|
O,
|
|
4382
4384
|
k,
|
|
4383
4385
|
A,
|
|
4384
4386
|
j,
|
|
4385
4387
|
M,
|
|
4386
4388
|
N,
|
|
4389
|
+
P,
|
|
4387
4390
|
n ?? ""
|
|
4388
4391
|
]),
|
|
4389
|
-
style: s ?
|
|
4390
|
-
...
|
|
4392
|
+
style: s ? D : null,
|
|
4393
|
+
...E
|
|
4391
4394
|
}, t && !s && /* @__PURE__ */ e.createElement("div", {
|
|
4392
4395
|
"aria-hidden": "true",
|
|
4393
|
-
className: `${
|
|
4394
|
-
},
|
|
4396
|
+
className: `${O}__sizer`
|
|
4397
|
+
}, z.map((t) => /* @__PURE__ */ e.createElement("span", {
|
|
4395
4398
|
key: t.value,
|
|
4396
|
-
className: `${
|
|
4397
|
-
},
|
|
4398
|
-
className: `${
|
|
4399
|
+
className: `${O}__input-wrapper`
|
|
4400
|
+
}, w !== void 0 && /* @__PURE__ */ e.createElement(mn, { variant: "error" }), /* @__PURE__ */ e.createElement("span", { className: `${O}__input-inner` }, /* @__PURE__ */ e.createElement("span", { className: `${O}__option-text` }, t.icon && de(t.icon, `${O}__icon`), t.label), /* @__PURE__ */ e.createElement(Q, {
|
|
4401
|
+
className: `${O}__trigger-icon`,
|
|
4399
4402
|
iconName: "angleDown"
|
|
4400
4403
|
}))))), /* @__PURE__ */ e.createElement(dn, {
|
|
4401
4404
|
disabled: i,
|
|
@@ -4405,37 +4408,37 @@ var sr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4405
4408
|
showLabel: v,
|
|
4406
4409
|
tooltipText: x
|
|
4407
4410
|
}), /* @__PURE__ */ e.createElement("span", {
|
|
4408
|
-
ref:
|
|
4411
|
+
ref: re.setReference,
|
|
4409
4412
|
"aria-autocomplete": "none",
|
|
4410
4413
|
"aria-labelledby": `${o}-label`,
|
|
4411
|
-
className: `${
|
|
4414
|
+
className: `${O}__input-wrapper`,
|
|
4412
4415
|
id: o,
|
|
4413
4416
|
tabIndex: 0,
|
|
4414
|
-
...
|
|
4415
|
-
onClick:
|
|
4417
|
+
...ee({
|
|
4418
|
+
onClick: ue,
|
|
4416
4419
|
onBlur: X,
|
|
4417
|
-
onFocus:
|
|
4420
|
+
onFocus: le
|
|
4418
4421
|
})
|
|
4419
|
-
},
|
|
4420
|
-
className: `${
|
|
4422
|
+
}, F && /* @__PURE__ */ e.createElement(mn, { variant: F }), /* @__PURE__ */ e.createElement("span", { className: `${O}__input-inner` }, /* @__PURE__ */ e.createElement("span", { className: `${O}__option-text` }, (se || !oe && a) && de(se || a, `${O}__icon`), /* @__PURE__ */ e.createElement("span", { className: `${O}__option-label-text` }, oe ?? l.selectOptionText)), /* @__PURE__ */ e.createElement(Q, {
|
|
4423
|
+
className: `${O}__trigger-icon`,
|
|
4421
4424
|
iconName: "angleDown"
|
|
4422
|
-
}))),
|
|
4423
|
-
ref:
|
|
4424
|
-
className: `pds-dropdown__panel ${
|
|
4425
|
+
}))), te && /* @__PURE__ */ e.createElement(C, null, /* @__PURE__ */ e.createElement("div", {
|
|
4426
|
+
ref: re.setFloating,
|
|
4427
|
+
className: `pds-dropdown__panel ${O}__dropdown`,
|
|
4425
4428
|
style: {
|
|
4426
|
-
...
|
|
4429
|
+
...K,
|
|
4427
4430
|
zIndex: "var(--pds-z-index-dropdown)"
|
|
4428
4431
|
},
|
|
4429
|
-
...
|
|
4430
|
-
}, /* @__PURE__ */ e.createElement("div", { style: { ...
|
|
4431
|
-
className: `${
|
|
4432
|
+
...q()
|
|
4433
|
+
}, /* @__PURE__ */ e.createElement("div", { style: { ...ae } }, /* @__PURE__ */ e.createElement("ul", {
|
|
4434
|
+
className: `${O}__options`,
|
|
4432
4435
|
role: "group"
|
|
4433
|
-
},
|
|
4436
|
+
}, fe(h))))), I && /* @__PURE__ */ e.createElement(fn, {
|
|
4434
4437
|
hasValidationMessage: !!S,
|
|
4435
4438
|
id: o,
|
|
4436
|
-
message:
|
|
4439
|
+
message: I,
|
|
4437
4440
|
validationMessageHasDecorators: !1,
|
|
4438
|
-
validationStatus:
|
|
4441
|
+
validationStatus: w
|
|
4439
4442
|
}));
|
|
4440
4443
|
}, wr = {
|
|
4441
4444
|
"sequential-blue": 2,
|
|
@@ -4919,7 +4922,7 @@ var sr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4919
4922
|
stroke: "var(--pds-color-border-default)",
|
|
4920
4923
|
strokeDasharray: "3 3",
|
|
4921
4924
|
vertical: Te
|
|
4922
|
-
}), /* @__PURE__ */ e.createElement(
|
|
4925
|
+
}), /* @__PURE__ */ e.createElement(ce, {
|
|
4923
4926
|
axisLine: ie,
|
|
4924
4927
|
dataKey: Te ? void 0 : "label",
|
|
4925
4928
|
hide: !ie,
|
|
@@ -4936,7 +4939,7 @@ var sr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
4936
4939
|
tickLine: !1,
|
|
4937
4940
|
tickMargin: 10,
|
|
4938
4941
|
type: Te ? "number" : "category"
|
|
4939
|
-
}), /* @__PURE__ */ e.createElement(
|
|
4942
|
+
}), /* @__PURE__ */ e.createElement(X, {
|
|
4940
4943
|
axisLine: ie,
|
|
4941
4944
|
dataKey: Te ? "label" : void 0,
|
|
4942
4945
|
domain: N,
|
|
@@ -5093,7 +5096,7 @@ var sr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5093
5096
|
}, V && /* @__PURE__ */ e.createElement(J, {
|
|
5094
5097
|
stroke: "var(--pds-color-border-default)",
|
|
5095
5098
|
strokeDasharray: "3 3"
|
|
5096
|
-
}), /* @__PURE__ */ e.createElement(
|
|
5099
|
+
}), /* @__PURE__ */ e.createElement(ce, {
|
|
5097
5100
|
axisLine: H,
|
|
5098
5101
|
dataKey: "label",
|
|
5099
5102
|
hide: !H,
|
|
@@ -5107,7 +5110,7 @@ var sr = ({ className: t = "pds-dropdown__selected-icon" }) => /* @__PURE__ */ e
|
|
|
5107
5110
|
tick: H ? Mr : !1,
|
|
5108
5111
|
tickLine: !1,
|
|
5109
5112
|
tickMargin: 10
|
|
5110
|
-
}), /* @__PURE__ */ e.createElement(
|
|
5113
|
+
}), /* @__PURE__ */ e.createElement(X, {
|
|
5111
5114
|
axisLine: H,
|
|
5112
5115
|
domain: D,
|
|
5113
5116
|
hide: !H,
|
|
@@ -7147,17 +7150,17 @@ var Xr = {
|
|
|
7147
7150
|
inputInstructions: "Type to search options",
|
|
7148
7151
|
searchShortcut: "Press / to focus the search field",
|
|
7149
7152
|
triggerButton: "Toggle dropdown menu"
|
|
7150
|
-
}, loadingText: v = "Loading results...", message: y, noResultsText: b = "No results found", onBlur: x, onChange: S, onClear:
|
|
7151
|
-
let
|
|
7152
|
-
o && (
|
|
7153
|
-
let
|
|
7154
|
-
let t =
|
|
7153
|
+
}, loadingText: v = "Loading results...", message: y, noResultsText: b = "No results found", onBlur: x, onChange: S, onClear: w, onFocus: T, onOptionSelect: k, options: A, placeholder: M, required: N = !1, showLabel: F = !0, showUnfilteredOptions: I = !1, size: L = "s", tooltipText: R = null, validationMessage: z, validationStatus: B, value: V, ...H }, W) => {
|
|
7154
|
+
let G = cn(d), K = "pds-combobox", q = L === "s" ? null : `${K}--${L}`, J = r ? $.disabled : null, ee = N && !r ? $.required : null, te = B === "error" ? $.error : null, ne = B === "success" ? $.success : null, re = null;
|
|
7155
|
+
o && (re = "search"), B === "error" && (re = "error"), B === "success" && (re = "success");
|
|
7156
|
+
let ie = z || y, ae = V !== void 0, oe = n !== void 0, se = (e) => {
|
|
7157
|
+
let t = A.find((t) => t.value === e);
|
|
7155
7158
|
return t ? t.label : "";
|
|
7156
|
-
}, [
|
|
7159
|
+
}, [Y, ce] = g(oe ? n : void 0), [X, le] = g(ae ? V ?? "" : oe ? se(n) : ""), de = s && !X;
|
|
7157
7160
|
u(() => {
|
|
7158
|
-
|
|
7159
|
-
}, [
|
|
7160
|
-
let
|
|
7161
|
+
ae && le(V ?? "");
|
|
7162
|
+
}, [ae, V]);
|
|
7163
|
+
let fe = h(null), pe = (e) => e.map(({ label: e, optionDisplay: t, searchIndex: n, value: r, ...i }) => {
|
|
7161
7164
|
let a = r || e, o = [e, r];
|
|
7162
7165
|
return n && o.push(...n), {
|
|
7163
7166
|
label: e,
|
|
@@ -7166,27 +7169,27 @@ var Xr = {
|
|
|
7166
7169
|
optionDisplay: t,
|
|
7167
7170
|
...i
|
|
7168
7171
|
};
|
|
7169
|
-
}),
|
|
7170
|
-
let e =
|
|
7171
|
-
if (!X && !
|
|
7172
|
+
}), me = m(() => {
|
|
7173
|
+
let e = pe(A);
|
|
7174
|
+
if (!X && !I) return [];
|
|
7172
7175
|
let t = (X ?? "").toLowerCase();
|
|
7173
7176
|
return e.filter((e) => (e.searchIndex?.map((e) => e.toLowerCase()) ?? []).some((e) => e.includes(t)));
|
|
7174
7177
|
}, [
|
|
7175
|
-
|
|
7178
|
+
A,
|
|
7176
7179
|
X,
|
|
7177
|
-
|
|
7180
|
+
I,
|
|
7178
7181
|
f
|
|
7179
|
-
]), { getInputProps:
|
|
7182
|
+
]), { getInputProps: he, getItemProps: ge, getMenuProps: _e, highlightedIndex: ve, isOpen: ye, openMenu: be, reset: xe } = ue({
|
|
7180
7183
|
id: l,
|
|
7181
7184
|
inputId: `input-${l}`,
|
|
7182
|
-
items:
|
|
7185
|
+
items: me,
|
|
7183
7186
|
itemToString: (e) => e ? e.label : "",
|
|
7184
7187
|
inputValue: X,
|
|
7185
7188
|
onInputValueChange: ({ inputValue: e }) => {
|
|
7186
|
-
|
|
7189
|
+
le(e ?? "");
|
|
7187
7190
|
},
|
|
7188
7191
|
onSelectedItemChange: ({ selectedItem: e }) => {
|
|
7189
|
-
e && (
|
|
7192
|
+
e && (ae || le(e.label), ce(e.value), k?.(e));
|
|
7190
7193
|
},
|
|
7191
7194
|
stateReducer: (e, { changes: t, type: n }) => {
|
|
7192
7195
|
if (n === ue.stateChangeTypes.InputBlur) return {
|
|
@@ -7194,7 +7197,7 @@ var Xr = {
|
|
|
7194
7197
|
inputValue: e.inputValue
|
|
7195
7198
|
};
|
|
7196
7199
|
if (n === ue.stateChangeTypes.InputClick) {
|
|
7197
|
-
if (
|
|
7200
|
+
if (I) return {
|
|
7198
7201
|
...t,
|
|
7199
7202
|
isOpen: !0
|
|
7200
7203
|
};
|
|
@@ -7205,11 +7208,11 @@ var Xr = {
|
|
|
7205
7208
|
}
|
|
7206
7209
|
return t;
|
|
7207
7210
|
}
|
|
7208
|
-
}), { context:
|
|
7209
|
-
open:
|
|
7211
|
+
}), { context: Se, floatingStyles: Ce, refs: we } = P({
|
|
7212
|
+
open: ye,
|
|
7210
7213
|
whileElementsMounted: E,
|
|
7211
7214
|
placement: "bottom-start",
|
|
7212
|
-
strategy: "
|
|
7215
|
+
strategy: "fixed",
|
|
7213
7216
|
middleware: [
|
|
7214
7217
|
O(({ placement: e }) => e.startsWith("top") ? 16 : 0),
|
|
7215
7218
|
j({
|
|
@@ -7229,7 +7232,7 @@ var Xr = {
|
|
|
7229
7232
|
}),
|
|
7230
7233
|
D({ padding: 24 })
|
|
7231
7234
|
]
|
|
7232
|
-
}), { isMounted:
|
|
7235
|
+
}), { isMounted: Te, styles: Ee } = U(Se, {
|
|
7233
7236
|
duration: {
|
|
7234
7237
|
open: 300,
|
|
7235
7238
|
close: 150
|
|
@@ -7237,103 +7240,103 @@ var Xr = {
|
|
|
7237
7240
|
initial: { opacity: 0 },
|
|
7238
7241
|
open: { opacity: 1 },
|
|
7239
7242
|
close: { opacity: 0 }
|
|
7240
|
-
}),
|
|
7241
|
-
|
|
7242
|
-
}, [
|
|
7243
|
-
|
|
7244
|
-
},
|
|
7245
|
-
|
|
7246
|
-
}, ke = (e) => {
|
|
7247
|
-
x?.(se);
|
|
7243
|
+
}), De = c((e) => {
|
|
7244
|
+
we.setReference(e), typeof W == "function" ? W(e) : W && "current" in W && (W.current = e);
|
|
7245
|
+
}, [W, we]), Oe = () => {
|
|
7246
|
+
ye ? xe() : be();
|
|
7247
|
+
}, ke = () => {
|
|
7248
|
+
ae || le(""), ce(void 0), xe(), fe.current?.focus(), I && be(), w?.();
|
|
7248
7249
|
}, Ae = (e) => {
|
|
7249
|
-
|
|
7250
|
-
}, je = () =>
|
|
7250
|
+
x?.(Y);
|
|
7251
|
+
}, je = (e) => {
|
|
7252
|
+
I && be(), T?.(Y);
|
|
7253
|
+
}, Me = () => me.map((t, n) => /* @__PURE__ */ e.createElement(bn, {
|
|
7251
7254
|
key: t.value,
|
|
7252
|
-
className:
|
|
7253
|
-
...
|
|
7255
|
+
className: ve === n ? "pds-dropdown__item--focused" : "",
|
|
7256
|
+
...ge({
|
|
7254
7257
|
item: t,
|
|
7255
7258
|
index: n
|
|
7256
7259
|
})
|
|
7257
|
-
}, /* @__PURE__ */ e.createElement("span", { className: `${
|
|
7260
|
+
}, /* @__PURE__ */ e.createElement("span", { className: `${K}__option-label` }, t.optionDisplay || t.label)));
|
|
7258
7261
|
return /* @__PURE__ */ e.createElement("div", {
|
|
7259
7262
|
className: Z([
|
|
7260
7263
|
$.base,
|
|
7261
|
-
G,
|
|
7262
7264
|
K,
|
|
7263
7265
|
q,
|
|
7264
7266
|
J,
|
|
7265
7267
|
ee,
|
|
7266
7268
|
te,
|
|
7269
|
+
ne,
|
|
7267
7270
|
t ?? ""
|
|
7268
7271
|
]),
|
|
7269
|
-
style: d ?
|
|
7270
|
-
...
|
|
7272
|
+
style: d ? G : null,
|
|
7273
|
+
...H
|
|
7271
7274
|
}, /* @__PURE__ */ e.createElement(dn, {
|
|
7272
7275
|
disabled: r,
|
|
7273
7276
|
id: `input-${l}`,
|
|
7274
7277
|
label: p,
|
|
7275
|
-
required:
|
|
7276
|
-
showLabel:
|
|
7277
|
-
tooltipText:
|
|
7278
|
+
required: N,
|
|
7279
|
+
showLabel: F,
|
|
7280
|
+
tooltipText: R
|
|
7278
7281
|
}), /* @__PURE__ */ e.createElement("span", {
|
|
7279
|
-
ref:
|
|
7280
|
-
"aria-describedby":
|
|
7282
|
+
ref: De,
|
|
7283
|
+
"aria-describedby": ie ? `${l}__message` : null,
|
|
7281
7284
|
"aria-disabled": r ? !0 : null,
|
|
7282
|
-
"aria-invalid":
|
|
7283
|
-
"aria-required":
|
|
7284
|
-
className: Z([`${
|
|
7285
|
+
"aria-invalid": B === "error" ? !0 : null,
|
|
7286
|
+
"aria-required": N ? !0 : null,
|
|
7287
|
+
className: Z([`${K}__input-wrapper`, de ? `${K}__input-wrapper--has-search-shortcut` : null]),
|
|
7285
7288
|
id: l
|
|
7286
|
-
},
|
|
7287
|
-
ref:
|
|
7289
|
+
}, re && /* @__PURE__ */ e.createElement(mn, { variant: re }), /* @__PURE__ */ e.createElement("input", {
|
|
7290
|
+
ref: fe,
|
|
7288
7291
|
autoComplete: "off",
|
|
7289
|
-
className: `${
|
|
7292
|
+
className: `${K}__input`,
|
|
7290
7293
|
id: `input-${l}`,
|
|
7291
|
-
...
|
|
7294
|
+
...he({
|
|
7292
7295
|
"aria-label": _.inputInstructions,
|
|
7293
7296
|
disabled: r,
|
|
7294
|
-
placeholder:
|
|
7295
|
-
onBlur:
|
|
7297
|
+
placeholder: M,
|
|
7298
|
+
onBlur: Ae,
|
|
7296
7299
|
onChange: (e) => {
|
|
7297
7300
|
S?.(e);
|
|
7298
7301
|
},
|
|
7299
|
-
onFocus:
|
|
7302
|
+
onFocus: je
|
|
7300
7303
|
})
|
|
7301
7304
|
}), X && i && /* @__PURE__ */ e.createElement(gn, {
|
|
7302
7305
|
clearLabel: _.clearButton,
|
|
7303
|
-
handleClearInput:
|
|
7306
|
+
handleClearInput: ke,
|
|
7304
7307
|
id: `input-${l}`
|
|
7305
|
-
}),
|
|
7308
|
+
}), de && /* @__PURE__ */ e.createElement(hn, {
|
|
7306
7309
|
inputId: `input-${l}`,
|
|
7307
7310
|
shortcutLabel: _.searchShortcut
|
|
7308
7311
|
}), a && /* @__PURE__ */ e.createElement("button", {
|
|
7309
|
-
"aria-expanded":
|
|
7312
|
+
"aria-expanded": ye,
|
|
7310
7313
|
"aria-label": _.triggerButton,
|
|
7311
|
-
className: `${
|
|
7314
|
+
className: `${K}__trigger`,
|
|
7312
7315
|
disabled: r,
|
|
7313
|
-
onClick:
|
|
7316
|
+
onClick: Oe,
|
|
7314
7317
|
type: "button"
|
|
7315
7318
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
7316
|
-
className: `${
|
|
7319
|
+
className: `${K}__trigger-icon`,
|
|
7317
7320
|
iconName: "angleDown",
|
|
7318
7321
|
size: "m"
|
|
7319
|
-
}))), /* @__PURE__ */ e.createElement("div", {
|
|
7320
|
-
ref:
|
|
7321
|
-
className: `pds-dropdown__panel ${
|
|
7322
|
-
style:
|
|
7323
|
-
...
|
|
7324
|
-
...
|
|
7322
|
+
}))), /* @__PURE__ */ e.createElement(C, null, /* @__PURE__ */ e.createElement("div", {
|
|
7323
|
+
ref: we.setFloating,
|
|
7324
|
+
className: `pds-dropdown__panel ${K}__dropdown`,
|
|
7325
|
+
style: Te ? {
|
|
7326
|
+
...Ce,
|
|
7327
|
+
...Ee,
|
|
7325
7328
|
zIndex: "var(--pds-z-index-dropdown)"
|
|
7326
7329
|
} : { display: "none" }
|
|
7327
|
-
},
|
|
7328
|
-
className: `${
|
|
7329
|
-
...
|
|
7330
|
-
style:
|
|
7331
|
-
},
|
|
7332
|
-
hasValidationMessage: !!
|
|
7330
|
+
}, Te && f && /* @__PURE__ */ e.createElement("div", { className: `${K}__loading` }, v), Te && !f && me.length === 0 && /* @__PURE__ */ e.createElement("div", { className: "pds-dropdown__no-results" }, b), /* @__PURE__ */ e.createElement("ul", {
|
|
7331
|
+
className: `${K}__options`,
|
|
7332
|
+
..._e(),
|
|
7333
|
+
style: Te && !f && me.length > 0 ? void 0 : { display: "none" }
|
|
7334
|
+
}, Te && !f && Me()))), ie && /* @__PURE__ */ e.createElement(fn, {
|
|
7335
|
+
hasValidationMessage: !!z,
|
|
7333
7336
|
id: l,
|
|
7334
|
-
message:
|
|
7337
|
+
message: ie,
|
|
7335
7338
|
validationMessageHasDecorators: !1,
|
|
7336
|
-
validationStatus:
|
|
7339
|
+
validationStatus: B
|
|
7337
7340
|
}));
|
|
7338
7341
|
}), di = (e, t, n) => {
|
|
7339
7342
|
let r = n.toLowerCase();
|
|
@@ -7349,33 +7352,33 @@ var Xr = {
|
|
|
7349
7352
|
inputInstructions: "Type to search options",
|
|
7350
7353
|
triggerButton: "Toggle dropdown menu"
|
|
7351
7354
|
}, loadingText: u = "Loading results...", noResultsText: d = "No results found", onChange: f, options: p, placeholder: _ = "Filter", required: v = !1, showAllTags: y = !1, showLabel: b = !0, size: x = "s", ...S }) => {
|
|
7352
|
-
let
|
|
7355
|
+
let w = cn(o), T = "pds-combobox-multi", k = x === "s" ? null : `${T}--${x}`, A = r ? $.disabled : null, M = v && !r ? $.required : null, F = y ? `${T}--show-all-tags` : null, [I, L] = g(""), [R, z] = g(a), [V, H] = g(null), [U, W] = g(!1), G = m(() => di(p, R, I), [
|
|
7353
7356
|
p,
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
]),
|
|
7357
|
+
R,
|
|
7358
|
+
I
|
|
7359
|
+
]), K = m(() => t?.items?.map((e) => ({
|
|
7357
7360
|
...e,
|
|
7358
|
-
isAlreadySelected:
|
|
7359
|
-
})) || [], [t?.items,
|
|
7360
|
-
|
|
7361
|
-
}, { getDropdownProps:
|
|
7362
|
-
selectedItems:
|
|
7361
|
+
isAlreadySelected: R.some((t) => t.id === e.id)
|
|
7362
|
+
})) || [], [t?.items, R]), q = (e) => {
|
|
7363
|
+
z(e), f?.(e);
|
|
7364
|
+
}, { getDropdownProps: J, getSelectedItemProps: ee, removeSelectedItem: te } = de({
|
|
7365
|
+
selectedItems: R,
|
|
7363
7366
|
onStateChange: ({ selectedItems: e, type: t }) => {
|
|
7364
7367
|
if (!r) switch (t) {
|
|
7365
7368
|
case de.stateChangeTypes.SelectedItemKeyDownBackspace:
|
|
7366
7369
|
case de.stateChangeTypes.SelectedItemKeyDownDelete:
|
|
7367
7370
|
case de.stateChangeTypes.DropdownKeyDownBackspace:
|
|
7368
7371
|
case de.stateChangeTypes.FunctionRemoveSelectedItem:
|
|
7369
|
-
|
|
7372
|
+
q(e || []);
|
|
7370
7373
|
break;
|
|
7371
7374
|
default: break;
|
|
7372
7375
|
}
|
|
7373
7376
|
}
|
|
7374
|
-
}), { closeMenu:
|
|
7375
|
-
items:
|
|
7377
|
+
}), { closeMenu: ne, getInputProps: re, getItemProps: ie, getMenuProps: ae, getToggleButtonProps: oe, highlightedIndex: se, isOpen: Y, openMenu: ce, selectedItem: X } = ue({
|
|
7378
|
+
items: G,
|
|
7376
7379
|
itemToString: (e) => e ? e.label : "",
|
|
7377
7380
|
selectedItem: null,
|
|
7378
|
-
inputValue:
|
|
7381
|
+
inputValue: I,
|
|
7379
7382
|
isOpen: r ? !1 : void 0,
|
|
7380
7383
|
stateReducer: (e, { changes: t, type: n }) => {
|
|
7381
7384
|
if (r) return e;
|
|
@@ -7394,28 +7397,31 @@ var Xr = {
|
|
|
7394
7397
|
case ue.stateChangeTypes.InputKeyDownEnter:
|
|
7395
7398
|
case ue.stateChangeTypes.ItemClick:
|
|
7396
7399
|
case ue.stateChangeTypes.InputBlur:
|
|
7397
|
-
n && (n.isAlreadySelected ?
|
|
7400
|
+
n && (n.isAlreadySelected ? q(R.filter((e) => e.id !== n.id)) : q([...R, n]), L(""), H(null));
|
|
7398
7401
|
break;
|
|
7399
7402
|
case ue.stateChangeTypes.InputChange:
|
|
7400
|
-
|
|
7403
|
+
L(e || ""), H(null);
|
|
7401
7404
|
break;
|
|
7402
7405
|
case ue.stateChangeTypes.ToggleButtonClick:
|
|
7403
7406
|
case ue.stateChangeTypes.FunctionOpenMenu:
|
|
7404
|
-
t &&
|
|
7407
|
+
t && W(!1);
|
|
7405
7408
|
break;
|
|
7406
7409
|
default: break;
|
|
7407
7410
|
}
|
|
7408
7411
|
}
|
|
7409
|
-
}), { floatingStyles:
|
|
7410
|
-
open:
|
|
7412
|
+
}), { floatingStyles: le, refs: fe } = P({
|
|
7413
|
+
open: Y,
|
|
7411
7414
|
whileElementsMounted: E,
|
|
7412
7415
|
placement: "bottom-start",
|
|
7413
|
-
strategy: "
|
|
7416
|
+
strategy: "fixed",
|
|
7414
7417
|
middleware: [
|
|
7415
7418
|
O(({ placement: e }) => e.startsWith("top") ? 16 : 0),
|
|
7416
7419
|
j({
|
|
7417
|
-
apply({ availableHeight: e, elements: t }) {
|
|
7418
|
-
Object.assign(t.floating.style, {
|
|
7420
|
+
apply({ availableHeight: e, elements: t, rects: n }) {
|
|
7421
|
+
Object.assign(t.floating.style, {
|
|
7422
|
+
maxHeight: `${e}px`,
|
|
7423
|
+
width: `${n.reference.width}px`
|
|
7424
|
+
});
|
|
7419
7425
|
},
|
|
7420
7426
|
padding: {
|
|
7421
7427
|
top: 12,
|
|
@@ -7426,12 +7432,12 @@ var Xr = {
|
|
|
7426
7432
|
}),
|
|
7427
7433
|
D({ padding: 24 })
|
|
7428
7434
|
]
|
|
7429
|
-
}), { context:
|
|
7430
|
-
open:
|
|
7431
|
-
onOpenChange:
|
|
7435
|
+
}), { context: pe, floatingStyles: me, refs: he } = P({
|
|
7436
|
+
open: U,
|
|
7437
|
+
onOpenChange: W,
|
|
7432
7438
|
whileElementsMounted: E,
|
|
7433
7439
|
placement: "bottom-start",
|
|
7434
|
-
strategy: "
|
|
7440
|
+
strategy: "fixed",
|
|
7435
7441
|
middleware: [
|
|
7436
7442
|
O(({ placement: e }) => e.startsWith("top") ? 16 : 4),
|
|
7437
7443
|
j({ apply({ elements: e, rects: t }) {
|
|
@@ -7439,44 +7445,44 @@ var Xr = {
|
|
|
7439
7445
|
} }),
|
|
7440
7446
|
D({ padding: 24 })
|
|
7441
7447
|
]
|
|
7442
|
-
}), { getFloatingProps:
|
|
7448
|
+
}), { getFloatingProps: ge } = B([N(pe)]), _e = (e) => {
|
|
7443
7449
|
if (e.stopPropagation(), r) return;
|
|
7444
|
-
let t = !
|
|
7445
|
-
|
|
7446
|
-
},
|
|
7447
|
-
r || (e.isAlreadySelected ?
|
|
7448
|
-
}, ve = () => {
|
|
7449
|
-
U(!1), t?.onClose?.();
|
|
7450
|
+
let t = !U;
|
|
7451
|
+
W(t), t && Y && ne();
|
|
7452
|
+
}, ve = (e) => {
|
|
7453
|
+
r || (e.isAlreadySelected ? q(R.filter((t) => t.id !== e.id)) : q([...R, e]));
|
|
7450
7454
|
}, ye = () => {
|
|
7451
|
-
t?.
|
|
7455
|
+
W(!1), t?.onClose?.();
|
|
7452
7456
|
}, be = () => {
|
|
7453
|
-
|
|
7457
|
+
t?.onRefresh?.();
|
|
7458
|
+
}, xe = () => {
|
|
7459
|
+
if (V === null) H(R.length - 1);
|
|
7454
7460
|
else {
|
|
7455
|
-
let e = [...
|
|
7456
|
-
e.splice(
|
|
7461
|
+
let e = [...R];
|
|
7462
|
+
e.splice(V, 1), q(e), H(null);
|
|
7457
7463
|
}
|
|
7458
|
-
},
|
|
7459
|
-
r || (
|
|
7460
|
-
}, Ce = (e) => {
|
|
7461
|
-
xe.current = se, !r && e.currentTarget.setAttribute("data-focus-method", "mouse");
|
|
7464
|
+
}, Se = h(!1), Ce = () => {
|
|
7465
|
+
r || (Se.current ? ne() : ce());
|
|
7462
7466
|
}, we = (e) => {
|
|
7463
|
-
|
|
7464
|
-
}, Te =
|
|
7465
|
-
|
|
7467
|
+
Se.current = Y, !r && e.currentTarget.setAttribute("data-focus-method", "mouse");
|
|
7468
|
+
}, Te = (e) => {
|
|
7469
|
+
e.currentTarget.setAttribute("data-focus-method", "keyboard"), !r && ((e.key === "Backspace" || e.key === "Delete") && !I && R.length > 0 && (e.preventDefault(), xe()), e.key === "Enter" && V !== null && (e.preventDefault(), xe()), !Y && (e.key === "Enter" || e.key === "ArrowDown") && (e.preventDefault(), ce()));
|
|
7470
|
+
}, Ee = re({
|
|
7471
|
+
...J({ preventKeyAction: Y }),
|
|
7466
7472
|
disabled: r,
|
|
7467
|
-
onKeyDown:
|
|
7468
|
-
}),
|
|
7473
|
+
onKeyDown: Te
|
|
7474
|
+
}), De = R.length === 2 ? /* @__PURE__ */ e.createElement("span", { className: `${T}__counter-item` }, R.length - 1) : R.length === 3 ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: `${T}__counter-layer` }), /* @__PURE__ */ e.createElement("span", { className: `${T}__counter-item` }, R.length - 1)) : R.length > 3 ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: `${T}__counter-layer` }), /* @__PURE__ */ e.createElement("span", { className: `${T}__counter-layer` }), /* @__PURE__ */ e.createElement("span", { className: `${T}__counter-item` }, R.length - 1)) : "";
|
|
7469
7475
|
return /* @__PURE__ */ e.createElement("div", {
|
|
7470
7476
|
className: Z([
|
|
7471
7477
|
$.base,
|
|
7472
|
-
w,
|
|
7473
7478
|
T,
|
|
7474
7479
|
k,
|
|
7475
7480
|
A,
|
|
7476
7481
|
M,
|
|
7482
|
+
F,
|
|
7477
7483
|
n ?? ""
|
|
7478
7484
|
]),
|
|
7479
|
-
style: o ?
|
|
7485
|
+
style: o ? w : null,
|
|
7480
7486
|
...S
|
|
7481
7487
|
}, /* @__PURE__ */ e.createElement(dn, {
|
|
7482
7488
|
disabled: r,
|
|
@@ -7486,31 +7492,31 @@ var Xr = {
|
|
|
7486
7492
|
showLabel: b
|
|
7487
7493
|
}), /* @__PURE__ */ e.createElement("div", {
|
|
7488
7494
|
ref: (e) => {
|
|
7489
|
-
|
|
7495
|
+
fe.setReference(e), he.setReference(e);
|
|
7490
7496
|
},
|
|
7491
7497
|
"aria-disabled": r ? !0 : null,
|
|
7492
7498
|
"aria-required": v ? !0 : null,
|
|
7493
|
-
className: `${
|
|
7494
|
-
onClick:
|
|
7495
|
-
onKeyDown:
|
|
7496
|
-
onMouseDown:
|
|
7499
|
+
className: `${T}__input-wrapper`,
|
|
7500
|
+
onClick: Ce,
|
|
7501
|
+
onKeyDown: Te,
|
|
7502
|
+
onMouseDown: we,
|
|
7497
7503
|
tabIndex: r ? -1 : 0
|
|
7498
|
-
},
|
|
7504
|
+
}, R.length > 1 && !y && /* @__PURE__ */ e.createElement("div", { className: `${T}__counter` }, /* @__PURE__ */ e.createElement("span", { className: `${T}__counter-wrapper` }, De)), R.length > 0 && /* @__PURE__ */ e.createElement("div", { className: `${T}__items-wrapper` }, R.map((t, n) => /* @__PURE__ */ e.createElement("span", {
|
|
7499
7505
|
key: `selected-item-${n}`,
|
|
7500
7506
|
className: `
|
|
7501
|
-
${
|
|
7502
|
-
${n ===
|
|
7507
|
+
${T}__selected-item
|
|
7508
|
+
${n === V ? `${T}__selected-item--marked-for-deletion` : ""}
|
|
7503
7509
|
`,
|
|
7504
|
-
...
|
|
7510
|
+
...ee({
|
|
7505
7511
|
selectedItem: t,
|
|
7506
7512
|
index: n
|
|
7507
7513
|
}),
|
|
7508
7514
|
tabIndex: -1
|
|
7509
|
-
}, /* @__PURE__ */ e.createElement("span", { className: `${
|
|
7515
|
+
}, /* @__PURE__ */ e.createElement("span", { className: `${T}__selected-item-text` }, t.label), /* @__PURE__ */ e.createElement("button", {
|
|
7510
7516
|
"aria-label": `Remove ${t.label}`,
|
|
7511
|
-
className: `${
|
|
7517
|
+
className: `${T}__selected-item-remove`,
|
|
7512
7518
|
onClick: (e) => {
|
|
7513
|
-
e.stopPropagation(),
|
|
7519
|
+
e.stopPropagation(), te(t);
|
|
7514
7520
|
},
|
|
7515
7521
|
onKeyDown: (e) => {
|
|
7516
7522
|
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
@@ -7519,95 +7525,95 @@ var Xr = {
|
|
|
7519
7525
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
7520
7526
|
iconName: "xmark",
|
|
7521
7527
|
size: "s"
|
|
7522
|
-
}))))), /* @__PURE__ */ e.createElement("div", { className: `${
|
|
7528
|
+
}))))), /* @__PURE__ */ e.createElement("div", { className: `${T}__end-actions` }, t && /* @__PURE__ */ e.createElement("button", {
|
|
7523
7529
|
"aria-label": l.aiPanelButton,
|
|
7524
|
-
className: Z([`${
|
|
7530
|
+
className: Z([`${T}__ai-button`, A ?? ""]),
|
|
7525
7531
|
disabled: r,
|
|
7526
|
-
onClick:
|
|
7532
|
+
onClick: _e,
|
|
7527
7533
|
type: "button"
|
|
7528
7534
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
7529
|
-
className: `${
|
|
7535
|
+
className: `${T}__ai-icon`,
|
|
7530
7536
|
iconName: "sparkles",
|
|
7531
7537
|
size: "s"
|
|
7532
7538
|
})), /* @__PURE__ */ e.createElement("button", {
|
|
7533
7539
|
"aria-label": l.triggerButton,
|
|
7534
|
-
className: `${
|
|
7540
|
+
className: `${T}__trigger ${A}`,
|
|
7535
7541
|
disabled: r,
|
|
7536
7542
|
type: "button",
|
|
7537
|
-
...
|
|
7543
|
+
...oe({ onClick: (e) => e.stopPropagation() })
|
|
7538
7544
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
7539
|
-
className: `${
|
|
7545
|
+
className: `${T}__trigger-icon`,
|
|
7540
7546
|
iconName: "angleDown",
|
|
7541
7547
|
size: "m"
|
|
7542
|
-
})))), /* @__PURE__ */ e.createElement("div", {
|
|
7543
|
-
...
|
|
7544
|
-
ref:
|
|
7545
|
-
className: `pds-dropdown__panel ${
|
|
7546
|
-
style:
|
|
7547
|
-
...
|
|
7548
|
+
})))), /* @__PURE__ */ e.createElement(C, null, /* @__PURE__ */ e.createElement("div", {
|
|
7549
|
+
...J(),
|
|
7550
|
+
ref: fe.setFloating,
|
|
7551
|
+
className: `pds-dropdown__panel ${T}__dropdown`,
|
|
7552
|
+
style: Y ? {
|
|
7553
|
+
...le,
|
|
7548
7554
|
zIndex: "var(--pds-z-index-dropdown)"
|
|
7549
7555
|
} : { display: "none" }
|
|
7550
|
-
}, /* @__PURE__ */ e.createElement("div", { className: `${
|
|
7556
|
+
}, /* @__PURE__ */ e.createElement("div", { className: `${T}__dropdown-input-wrapper` }, /* @__PURE__ */ e.createElement(mn, { variant: "search" }), /* @__PURE__ */ e.createElement("input", {
|
|
7551
7557
|
"aria-label": l.inputInstructions,
|
|
7552
|
-
className: `${
|
|
7558
|
+
className: `${T}__dropdown-input`,
|
|
7553
7559
|
placeholder: _,
|
|
7554
|
-
...
|
|
7560
|
+
...Ee,
|
|
7555
7561
|
onClick: (e) => {
|
|
7556
7562
|
e.stopPropagation();
|
|
7557
7563
|
}
|
|
7558
|
-
})),
|
|
7559
|
-
className: `${
|
|
7560
|
-
...
|
|
7561
|
-
style:
|
|
7562
|
-
},
|
|
7564
|
+
})), Y && s && /* @__PURE__ */ e.createElement("div", { className: `${T}__loading` }, u), Y && !s && G.length === 0 && /* @__PURE__ */ e.createElement("div", { className: "pds-dropdown__no-results" }, d), /* @__PURE__ */ e.createElement("ul", {
|
|
7565
|
+
className: `${T}__dropdown-list`,
|
|
7566
|
+
...ae(),
|
|
7567
|
+
style: Y && !s && G.length > 0 ? void 0 : { display: "none" }
|
|
7568
|
+
}, Y && !s && G.map((t, n) => /* @__PURE__ */ e.createElement(bn, {
|
|
7563
7569
|
key: `${t.id}-${n}`,
|
|
7564
|
-
className: `${
|
|
7565
|
-
${
|
|
7566
|
-
${X === t ? `${
|
|
7570
|
+
className: `${T}__dropdown-item
|
|
7571
|
+
${se === n ? "pds-dropdown__item--focused" : ""}
|
|
7572
|
+
${X === t ? `${T}__dropdown-item--selected` : ""}
|
|
7567
7573
|
${t.isAlreadySelected ? "pds-dropdown__item--active" : ""}`,
|
|
7568
|
-
...
|
|
7574
|
+
...ie({
|
|
7569
7575
|
item: t,
|
|
7570
7576
|
index: n
|
|
7571
7577
|
})
|
|
7572
|
-
}, /* @__PURE__ */ e.createElement("span", { className: `${
|
|
7578
|
+
}, /* @__PURE__ */ e.createElement("span", { className: `${T}__dropdown-item-label` }, /* @__PURE__ */ e.createElement("span", { className: `${T}__dropdown-item-text` }, t.label, t.badge === "ai" && /* @__PURE__ */ e.createElement("span", { className: `${T}__dropdown-item-badge` }, /* @__PURE__ */ e.createElement(Q, {
|
|
7573
7579
|
iconName: "sparkles",
|
|
7574
7580
|
size: "s"
|
|
7575
|
-
}), /* @__PURE__ */ e.createElement("span", null, l.aiBadgeLabel))), t.isAlreadySelected && /* @__PURE__ */ e.createElement(sr, null)))))),
|
|
7576
|
-
ref:
|
|
7577
|
-
className: `${
|
|
7581
|
+
}), /* @__PURE__ */ e.createElement("span", null, l.aiBadgeLabel))), t.isAlreadySelected && /* @__PURE__ */ e.createElement(sr, null))))))), U && t && /* @__PURE__ */ e.createElement(C, null, /* @__PURE__ */ e.createElement("div", {
|
|
7582
|
+
ref: he.setFloating,
|
|
7583
|
+
className: `${T}__aux-panel`,
|
|
7578
7584
|
style: {
|
|
7579
|
-
...
|
|
7585
|
+
...me,
|
|
7580
7586
|
zIndex: "var(--pds-z-index-dropdown)"
|
|
7581
7587
|
},
|
|
7582
|
-
...
|
|
7583
|
-
}, t.content ? /* @__PURE__ */ e.createElement("div", { className: `${
|
|
7584
|
-
className: `${
|
|
7588
|
+
...ge()
|
|
7589
|
+
}, t.content ? /* @__PURE__ */ e.createElement("div", { className: `${T}__aux-panel-content` }, t.content) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(Q, {
|
|
7590
|
+
className: `${T}__aux-panel-icon`,
|
|
7585
7591
|
iconName: "sparkles",
|
|
7586
7592
|
size: "m"
|
|
7587
|
-
}), /* @__PURE__ */ e.createElement("div", { className: `${
|
|
7593
|
+
}), /* @__PURE__ */ e.createElement("div", { className: `${T}__aux-panel-items` }, K.map((t) => /* @__PURE__ */ e.createElement("button", {
|
|
7588
7594
|
key: t.id,
|
|
7589
|
-
className: Z([`${
|
|
7590
|
-
onClick: () =>
|
|
7595
|
+
className: Z([`${T}__aux-panel-item`, t.isAlreadySelected ? `${T}__aux-panel-item--selected` : ""]),
|
|
7596
|
+
onClick: () => ve(t),
|
|
7591
7597
|
type: "button"
|
|
7592
|
-
}, t.label)))), /* @__PURE__ */ e.createElement("div", { className: `${
|
|
7598
|
+
}, t.label)))), /* @__PURE__ */ e.createElement("div", { className: `${T}__aux-panel-header` }, /* @__PURE__ */ e.createElement("button", {
|
|
7593
7599
|
"aria-label": l.aiPanelRefresh,
|
|
7594
|
-
className: `${
|
|
7600
|
+
className: `${T}__aux-panel-button`,
|
|
7595
7601
|
disabled: t.isFetching || t.disableRefresh,
|
|
7596
|
-
onClick:
|
|
7602
|
+
onClick: be,
|
|
7597
7603
|
type: "button"
|
|
7598
7604
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
7599
|
-
className: Z([`${
|
|
7605
|
+
className: Z([`${T}__aux-panel-refresh-icon`, t.isFetching ? `${T}__aux-panel-button-icon--rotating` : ""]),
|
|
7600
7606
|
iconName: "rotate",
|
|
7601
7607
|
size: "m"
|
|
7602
7608
|
})), /* @__PURE__ */ e.createElement("button", {
|
|
7603
7609
|
"aria-label": l.aiPanelClose,
|
|
7604
|
-
className: `${
|
|
7605
|
-
onClick:
|
|
7610
|
+
className: `${T}__aux-panel-button`,
|
|
7611
|
+
onClick: ye,
|
|
7606
7612
|
type: "button"
|
|
7607
7613
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
7608
7614
|
iconName: "xmark",
|
|
7609
7615
|
size: "m"
|
|
7610
|
-
})))));
|
|
7616
|
+
}))))));
|
|
7611
7617
|
}, pi = (e) => String(e).padStart(2, "0"), mi = (e) => {
|
|
7612
7618
|
let t = e ? /^(\d{1,2}):(\d{2})$/.exec(e) : null;
|
|
7613
7619
|
if (!t) return null;
|
|
@@ -7854,164 +7860,164 @@ var Xr = {
|
|
|
7854
7860
|
state: r,
|
|
7855
7861
|
timeZone: i
|
|
7856
7862
|
}) : /* @__PURE__ */ e.createElement("td", { key: o }))))));
|
|
7857
|
-
}, ji = ({ allowCustomRange: t = !0, allowDateRangeSelection: n = !0, className: r, disabled: i = !1, footerNote: a, id: o, inputWidth: s, label: c, locale: l, maxDate: d, message: f, minDate: p, mode: m = "single", onChange: _, placeholder: v, presets: y, required: b = !1, showLabel: x = !0, showPresetCalendar: S = !0, showTime:
|
|
7858
|
-
let
|
|
7863
|
+
}, ji = ({ allowCustomRange: t = !0, allowDateRangeSelection: n = !0, className: r, disabled: i = !1, footerNote: a, id: o, inputWidth: s, label: c, locale: l, maxDate: d, message: f, minDate: p, mode: m = "single", onChange: _, placeholder: v, presets: y, required: b = !1, showLabel: x = !0, showPresetCalendar: S = !0, showTime: w = !1, showTimeZoneSwitcher: T = !1, timeZone: E = ve(), tooltipText: D, translationStrings: O, validationMessage: k, validationStatus: A, value: j, visibleMonths: M = 2, ...N }) => {
|
|
7864
|
+
let P = m === "range", F = {
|
|
7859
7865
|
...Oi,
|
|
7860
|
-
...
|
|
7861
|
-
},
|
|
7862
|
-
|
|
7863
|
-
let { locale:
|
|
7866
|
+
...O
|
|
7867
|
+
}, I = P && !!y && y.length > 0;
|
|
7868
|
+
T && !w && process.env.NODE_ENV !== "production" && console.warn("[Datepicker] `showTimeZoneSwitcher` has no effect unless `showTime` is also true."), y && y.length > 0 && !P && process.env.NODE_ENV !== "production" && console.warn("[Datepicker] `presets` requires `mode=\"range\"` — every preset computes a date range."), !t && !I && process.env.NODE_ENV !== "production" && console.warn("[Datepicker] `allowCustomRange` has no effect unless `presets` is also set.");
|
|
7869
|
+
let { locale: L } = Pe(), R = l?.code ?? L, [z, B] = g(j), [V, H] = g("local"), U = T && V === "utc" ? "UTC" : E, [W, G] = g(void 0), [K, q] = g(S), J = !I || K, ee = !I || S || t, te = M === 1 ? P && w ? 400 : 280 : 550, ne = h(null), re = W === void 0 && (P ? !!z?.from : !!z), ie = (e, t) => P && w ? e ?? t : e, [ae, oe] = g(() => ie(Si(P ? j?.from : j, U), wi)), [se, Y] = g(() => ie(Si(j?.to, U), Ti)), ce = cn(s), X = "pds-datepicker", le = i ? $.disabled : null, ue = b && !i ? $.required : null, de = A === "error" ? $.error : null, fe = A === "success" ? $.success : null, pe = k || f, he = /* @__PURE__ */ e.createElement("div", { className: `${X}__timezone-switcher` }, /* @__PURE__ */ e.createElement("span", { className: `${X}__timezone-switcher-label` }, F.timeZoneSwitcherLabel), /* @__PURE__ */ e.createElement(lr, {
|
|
7864
7870
|
id: `${o}-timezone-switcher`,
|
|
7865
|
-
label:
|
|
7866
|
-
onChange: (e) =>
|
|
7871
|
+
label: F.timeZoneSwitcherLabel || "",
|
|
7872
|
+
onChange: (e) => H(e),
|
|
7867
7873
|
options: [{
|
|
7868
|
-
label:
|
|
7874
|
+
label: F.localTimeZoneLabel || "",
|
|
7869
7875
|
value: "local"
|
|
7870
7876
|
}, {
|
|
7871
|
-
label:
|
|
7877
|
+
label: F.utcTimeZoneLabel || "",
|
|
7872
7878
|
value: "utc"
|
|
7873
7879
|
}],
|
|
7874
7880
|
size: "s",
|
|
7875
|
-
value:
|
|
7876
|
-
})), { floatingStyles:
|
|
7881
|
+
value: V
|
|
7882
|
+
})), { floatingStyles: ge, getFloatingProps: _e, getReferenceProps: ye, isMounted: be, isOpen: xe, refs: Se, setIsOpen: Ce } = Rn({
|
|
7877
7883
|
enableListNavigation: !1,
|
|
7878
7884
|
offsetValue: 8,
|
|
7879
7885
|
placement: "bottom-start",
|
|
7880
7886
|
role: "dialog",
|
|
7881
7887
|
shiftPadding: 16,
|
|
7882
7888
|
variant: "default"
|
|
7883
|
-
}),
|
|
7884
|
-
|
|
7885
|
-
|
|
7889
|
+
}), Te = vi(p, U), De = vi(d, U), Ae = (e, t, n = !1) => {
|
|
7890
|
+
B(e), G(t), _?.(e), !P && n && setTimeout(() => {
|
|
7891
|
+
Ce(!1);
|
|
7886
7892
|
}, 300);
|
|
7887
|
-
},
|
|
7893
|
+
}, je = Le({
|
|
7888
7894
|
createCalendar: me,
|
|
7889
|
-
locale:
|
|
7890
|
-
maxValue:
|
|
7891
|
-
minValue:
|
|
7895
|
+
locale: R,
|
|
7896
|
+
maxValue: De,
|
|
7897
|
+
minValue: Te,
|
|
7892
7898
|
onChange: (e) => {
|
|
7893
|
-
|
|
7899
|
+
P || Ae(Ci(e, w ? ae : void 0, U), void 0, !w);
|
|
7894
7900
|
},
|
|
7895
|
-
value:
|
|
7896
|
-
}),
|
|
7901
|
+
value: P ? null : vi(z, U) ?? null
|
|
7902
|
+
}), Me = h(null), Ne = Re({
|
|
7897
7903
|
createCalendar: me,
|
|
7898
|
-
locale:
|
|
7899
|
-
maxValue:
|
|
7900
|
-
minValue:
|
|
7901
|
-
visibleDuration: { months:
|
|
7904
|
+
locale: R,
|
|
7905
|
+
maxValue: De,
|
|
7906
|
+
minValue: Te,
|
|
7907
|
+
visibleDuration: { months: M },
|
|
7902
7908
|
onChange: (e) => {
|
|
7903
|
-
|
|
7904
|
-
from: Ci(e.start,
|
|
7905
|
-
to: Ci(e.end,
|
|
7909
|
+
P && e && Ae({
|
|
7910
|
+
from: Ci(e.start, w ? ae : void 0, U),
|
|
7911
|
+
to: Ci(e.end, w ? se : void 0, U)
|
|
7906
7912
|
});
|
|
7907
7913
|
},
|
|
7908
|
-
value:
|
|
7909
|
-
let e =
|
|
7914
|
+
value: P ? (() => {
|
|
7915
|
+
let e = z, t = vi(e?.from, U), n = vi(e?.to, U);
|
|
7910
7916
|
return t && n ? {
|
|
7911
7917
|
start: t,
|
|
7912
7918
|
end: n
|
|
7913
7919
|
} : null;
|
|
7914
7920
|
})() : null
|
|
7915
|
-
}),
|
|
7921
|
+
}), Ie = P ? Ne : je, { calendarProps: ze, nextButtonProps: Be, prevButtonProps: Ve } = ke({}, je), { calendarProps: He, nextButtonProps: Ue, prevButtonProps: We } = Fe({}, Ne, Me), Ge = P ? He : ze, Ke = P ? Ue : Be, qe = P ? We : Ve, Je = (e) => new Intl.DateTimeFormat(R, {
|
|
7916
7922
|
month: "long",
|
|
7917
7923
|
year: "numeric"
|
|
7918
|
-
}).format(e.toDate(ve())),
|
|
7919
|
-
|
|
7920
|
-
},
|
|
7921
|
-
|
|
7922
|
-
},
|
|
7923
|
-
let e = we(
|
|
7924
|
-
|
|
7925
|
-
},
|
|
7924
|
+
}).format(e.toDate(ve())), Ye = P ? Array.from({ length: M }, (e, t) => t) : [0], Xe = Ye.map((e) => Je(Ie.visibleRange.start.add({ months: e }))), Ze = h(null), Qe = h(null), { buttonProps: $e } = Oe(qe, Ze), { buttonProps: et } = Oe(Ke, Qe), tt = () => {
|
|
7925
|
+
B(void 0), G(void 0), _?.(void 0), w && (oe(P ? wi : void 0), Y(P ? Ti : void 0)), P ? Ne.setValue(null) : je.setValue(null);
|
|
7926
|
+
}, nt = () => !P || !Ne.anchorDate ? !1 : (Ne.selectDate(Ne.anchorDate), !0), rt = () => {
|
|
7927
|
+
nt(), Ce(!1);
|
|
7928
|
+
}, it = () => {
|
|
7929
|
+
let e = we(U);
|
|
7930
|
+
Ie.setFocusedDate(e), P ? (Ne.setValue(null), B(void 0), G(void 0), _?.(void 0)) : (je.setValue(e), Ae(Ci(e, w ? ae : void 0, U), void 0, !w));
|
|
7931
|
+
}, at = (e) => {
|
|
7926
7932
|
let t = Di(e, {
|
|
7927
|
-
locale:
|
|
7928
|
-
timeZone:
|
|
7933
|
+
locale: R,
|
|
7934
|
+
timeZone: U
|
|
7929
7935
|
}), n = e.hours !== void 0 || e.minutes !== void 0;
|
|
7930
|
-
|
|
7931
|
-
from: Ci(vi(t.from,
|
|
7932
|
-
to: Ci(vi(t.to,
|
|
7936
|
+
q(S), w && n ? (oe(Si(t.from, U)), Y(Si(t.to, U)), Ae(t, e.label)) : Ae(w ? {
|
|
7937
|
+
from: Ci(vi(t.from, U), ae, U),
|
|
7938
|
+
to: Ci(vi(t.to, U), se, U)
|
|
7933
7939
|
} : t, e.label);
|
|
7934
|
-
let r = vi(t.from,
|
|
7935
|
-
r &&
|
|
7936
|
-
|
|
7940
|
+
let r = vi(t.from, U);
|
|
7941
|
+
r && Ie.setFocusedDate(r), S || setTimeout(() => {
|
|
7942
|
+
Ce(!1);
|
|
7937
7943
|
}, 300);
|
|
7938
|
-
},
|
|
7939
|
-
if (
|
|
7940
|
-
let t =
|
|
7941
|
-
t?.from && t?.to &&
|
|
7942
|
-
from: Ci(vi(t.from,
|
|
7944
|
+
}, ot = (e) => {
|
|
7945
|
+
if (oe(e), P) {
|
|
7946
|
+
let t = z;
|
|
7947
|
+
t?.from && t?.to && Ae({
|
|
7948
|
+
from: Ci(vi(t.from, U), e, U),
|
|
7943
7949
|
to: t.to
|
|
7944
7950
|
});
|
|
7945
7951
|
} else {
|
|
7946
|
-
let t =
|
|
7947
|
-
t &&
|
|
7952
|
+
let t = z;
|
|
7953
|
+
t && Ae(Ci(vi(t, U), e, U));
|
|
7948
7954
|
}
|
|
7949
|
-
},
|
|
7950
|
-
|
|
7951
|
-
let t =
|
|
7952
|
-
t?.from && t?.to &&
|
|
7955
|
+
}, st = (e) => {
|
|
7956
|
+
Y(e);
|
|
7957
|
+
let t = z;
|
|
7958
|
+
t?.from && t?.to && Ae({
|
|
7953
7959
|
from: t.from,
|
|
7954
|
-
to: Ci(vi(t.to,
|
|
7960
|
+
to: Ci(vi(t.to, U), e, U)
|
|
7955
7961
|
});
|
|
7956
7962
|
};
|
|
7957
7963
|
u(() => {
|
|
7958
|
-
|
|
7959
|
-
}, [
|
|
7960
|
-
if (
|
|
7961
|
-
let e =
|
|
7962
|
-
|
|
7963
|
-
} else
|
|
7964
|
+
B(j);
|
|
7965
|
+
}, [j]), u(() => {
|
|
7966
|
+
if (w) if (P) {
|
|
7967
|
+
let e = z;
|
|
7968
|
+
oe(Si(e?.from, U) ?? wi), Y(Si(e?.to, U) ?? Ti);
|
|
7969
|
+
} else oe(Si(z, U));
|
|
7964
7970
|
}, [
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7971
|
+
z,
|
|
7972
|
+
U,
|
|
7973
|
+
P,
|
|
7974
|
+
w
|
|
7969
7975
|
]), u(() => {
|
|
7970
|
-
n ||
|
|
7976
|
+
n || nt();
|
|
7971
7977
|
}, [
|
|
7972
|
-
|
|
7978
|
+
P,
|
|
7973
7979
|
n,
|
|
7974
|
-
|
|
7980
|
+
Ne.anchorDate
|
|
7975
7981
|
]), u(() => {
|
|
7976
|
-
if (
|
|
7977
|
-
let e = vi(
|
|
7978
|
-
|
|
7982
|
+
if (xe) {
|
|
7983
|
+
let e = vi(P ? z?.from : z, U);
|
|
7984
|
+
Ie.setFocusedDate(e ?? we(U)), q(S);
|
|
7979
7985
|
}
|
|
7980
|
-
}, [
|
|
7981
|
-
|
|
7982
|
-
}, [
|
|
7983
|
-
let
|
|
7984
|
-
let t = y?.find((e) => e.label ===
|
|
7986
|
+
}, [xe]), u(() => {
|
|
7987
|
+
ne.current && (ne.current.inert = !J);
|
|
7988
|
+
}, [J]);
|
|
7989
|
+
let ct = () => {
|
|
7990
|
+
let t = y?.find((e) => e.label === W);
|
|
7985
7991
|
if (t) {
|
|
7986
7992
|
let e = t.hours !== void 0 || t.minutes !== void 0;
|
|
7987
7993
|
if (t.showLabelInTrigger ?? e) return t.label;
|
|
7988
7994
|
}
|
|
7989
|
-
if (
|
|
7990
|
-
let t =
|
|
7991
|
-
return t?.from ? t.to ? /* @__PURE__ */ e.createElement(e.Fragment, null, Ei(t.from, l,
|
|
7995
|
+
if (P) {
|
|
7996
|
+
let t = z;
|
|
7997
|
+
return t?.from ? t.to ? /* @__PURE__ */ e.createElement(e.Fragment, null, Ei(t.from, l, U), /* @__PURE__ */ e.createElement("span", { className: `${X}__separator` }, " – "), Ei(t.to, l, U)) : Ei(t.from, l, U) : v || "";
|
|
7992
7998
|
} else {
|
|
7993
|
-
let e =
|
|
7994
|
-
return e ? Ei(e, l,
|
|
7999
|
+
let e = z;
|
|
8000
|
+
return e ? Ei(e, l, U) : v || "";
|
|
7995
8001
|
}
|
|
7996
|
-
},
|
|
7997
|
-
if (
|
|
7998
|
-
let e =
|
|
7999
|
-
return !e?.from && t ? `${
|
|
8002
|
+
}, lt = () => P ? !z?.from : !z, ut = () => {
|
|
8003
|
+
if (P) {
|
|
8004
|
+
let e = z, t = Ne.anchorDate;
|
|
8005
|
+
return !e?.from && t ? `${F.selectedStartDate}${Ei(yi(t, U), l, U)}${F.pleaseSelectEndDate}` : e?.from ? e.to ? `${F.selectedDateRange}${Ei(e.from, l, U)}${F.to}${Ei(e.to, l, U)}` : `${F.selectedStartDate}${Ei(e.from, l, U)}${F.pleaseSelectEndDate}` : F.noDateRangeSelected || "";
|
|
8000
8006
|
} else {
|
|
8001
|
-
let e =
|
|
8002
|
-
return e ? `${
|
|
8007
|
+
let e = z;
|
|
8008
|
+
return e ? `${F.selectedDate}${Ei(e, l, U)}` : F.noDateSelected || "";
|
|
8003
8009
|
}
|
|
8004
|
-
},
|
|
8005
|
-
...
|
|
8006
|
-
ref:
|
|
8010
|
+
}, dt = P ? z : void 0, ft = /* @__PURE__ */ e.createElement("div", {
|
|
8011
|
+
...Ge,
|
|
8012
|
+
ref: P ? Me : void 0,
|
|
8007
8013
|
className: `${X}__calendar`
|
|
8008
|
-
}, /* @__PURE__ */ e.createElement("div", { className: `${X}__grids` },
|
|
8014
|
+
}, /* @__PURE__ */ e.createElement("div", { className: `${X}__grids` }, Ye.map((t, n) => /* @__PURE__ */ e.createElement("div", {
|
|
8009
8015
|
key: t,
|
|
8010
8016
|
className: `${X}__month`
|
|
8011
8017
|
}, /* @__PURE__ */ e.createElement("div", { className: `${X}__nav` }, n === 0 ? /* @__PURE__ */ e.createElement("button", {
|
|
8012
|
-
|
|
8013
|
-
ref:
|
|
8014
|
-
"aria-label":
|
|
8018
|
+
...$e,
|
|
8019
|
+
ref: Ze,
|
|
8020
|
+
"aria-label": F.previousMonthLabel,
|
|
8015
8021
|
className: `${X}__nav-button`,
|
|
8016
8022
|
type: "button"
|
|
8017
8023
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
@@ -8023,10 +8029,10 @@ var Xr = {
|
|
|
8023
8029
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
8024
8030
|
iconName: "angleLeft",
|
|
8025
8031
|
size: "m"
|
|
8026
|
-
})), /* @__PURE__ */ e.createElement("div", { className: `${X}__nav-title` },
|
|
8027
|
-
|
|
8028
|
-
ref:
|
|
8029
|
-
"aria-label":
|
|
8032
|
+
})), /* @__PURE__ */ e.createElement("div", { className: `${X}__nav-title` }, Xe[n]), n === Ye.length - 1 ? /* @__PURE__ */ e.createElement("button", {
|
|
8033
|
+
...et,
|
|
8034
|
+
ref: Qe,
|
|
8035
|
+
"aria-label": F.nextMonthLabel,
|
|
8030
8036
|
className: `${X}__nav-button`,
|
|
8031
8037
|
type: "button"
|
|
8032
8038
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
@@ -8041,127 +8047,127 @@ var Xr = {
|
|
|
8041
8047
|
}))), /* @__PURE__ */ e.createElement(Ai, {
|
|
8042
8048
|
baseClass: X,
|
|
8043
8049
|
monthOffset: t,
|
|
8044
|
-
state:
|
|
8045
|
-
timeZone:
|
|
8046
|
-
})))),
|
|
8047
|
-
anchorDate: vi(
|
|
8050
|
+
state: Ie,
|
|
8051
|
+
timeZone: U
|
|
8052
|
+
})))), w && /* @__PURE__ */ e.createElement("div", { className: `${X}__time-section` }, P ? /* @__PURE__ */ e.createElement("div", { className: `${X}__time-fields` }, /* @__PURE__ */ e.createElement(_i, {
|
|
8053
|
+
anchorDate: vi(dt?.from, U),
|
|
8048
8054
|
id: `${o}-start-time`,
|
|
8049
|
-
label:
|
|
8050
|
-
onChange:
|
|
8055
|
+
label: F.startTimeLabel || "",
|
|
8056
|
+
onChange: ot,
|
|
8051
8057
|
size: "s",
|
|
8052
|
-
timeZone:
|
|
8053
|
-
value:
|
|
8058
|
+
timeZone: U,
|
|
8059
|
+
value: ae
|
|
8054
8060
|
}), /* @__PURE__ */ e.createElement(_i, {
|
|
8055
|
-
anchorDate: vi(
|
|
8061
|
+
anchorDate: vi(dt?.to, U),
|
|
8056
8062
|
id: `${o}-end-time`,
|
|
8057
|
-
label:
|
|
8058
|
-
onChange:
|
|
8063
|
+
label: F.endTimeLabel || "",
|
|
8064
|
+
onChange: st,
|
|
8059
8065
|
size: "s",
|
|
8060
|
-
timeZone:
|
|
8061
|
-
value:
|
|
8062
|
-
})) :
|
|
8063
|
-
anchorDate: vi(
|
|
8066
|
+
timeZone: U,
|
|
8067
|
+
value: se
|
|
8068
|
+
})) : z && /* @__PURE__ */ e.createElement("div", { className: `${X}__time-fields` }, /* @__PURE__ */ e.createElement(_i, {
|
|
8069
|
+
anchorDate: vi(z, U),
|
|
8064
8070
|
id: `${o}-time`,
|
|
8065
|
-
label:
|
|
8066
|
-
onChange:
|
|
8071
|
+
label: F.timeLabel || "",
|
|
8072
|
+
onChange: ot,
|
|
8067
8073
|
size: "s",
|
|
8068
|
-
timeZone:
|
|
8069
|
-
value:
|
|
8070
|
-
})),
|
|
8074
|
+
timeZone: U,
|
|
8075
|
+
value: ae
|
|
8076
|
+
})), T && !I && he), a && /* @__PURE__ */ e.createElement("div", { className: `${X}__footer-note` }, a), /* @__PURE__ */ e.createElement("div", { className: `${X}__actions` }, /* @__PURE__ */ e.createElement(jn, {
|
|
8071
8077
|
className: `${X}__action-button ${X}__action-button--today`,
|
|
8072
|
-
label:
|
|
8073
|
-
onClick:
|
|
8078
|
+
label: F.todayButton,
|
|
8079
|
+
onClick: it,
|
|
8074
8080
|
size: "s",
|
|
8075
8081
|
type: "button",
|
|
8076
8082
|
variant: "secondary"
|
|
8077
8083
|
}), /* @__PURE__ */ e.createElement("div", { className: `${X}__actions-group` }, /* @__PURE__ */ e.createElement(jn, {
|
|
8078
8084
|
className: `${X}__action-button ${X}__action-button--clear`,
|
|
8079
|
-
label:
|
|
8080
|
-
onClick:
|
|
8085
|
+
label: F.clearButton,
|
|
8086
|
+
onClick: tt,
|
|
8081
8087
|
size: "s",
|
|
8082
8088
|
type: "button",
|
|
8083
8089
|
variant: "secondary"
|
|
8084
|
-
}), (
|
|
8090
|
+
}), (P || w) && /* @__PURE__ */ e.createElement(jn, {
|
|
8085
8091
|
className: `${X}__action-button ${X}__action-button--done`,
|
|
8086
|
-
label:
|
|
8087
|
-
onClick:
|
|
8092
|
+
label: F.doneButton,
|
|
8093
|
+
onClick: rt,
|
|
8088
8094
|
size: "s",
|
|
8089
8095
|
type: "button",
|
|
8090
8096
|
variant: "highlight"
|
|
8091
8097
|
}))));
|
|
8092
|
-
return /* @__PURE__ */ e.createElement(Ee, { locale:
|
|
8098
|
+
return /* @__PURE__ */ e.createElement(Ee, { locale: R }, /* @__PURE__ */ e.createElement("div", {
|
|
8093
8099
|
className: Z([
|
|
8094
8100
|
$.base,
|
|
8095
8101
|
X,
|
|
8096
|
-
ce,
|
|
8097
|
-
ue,
|
|
8098
8102
|
le,
|
|
8099
8103
|
de,
|
|
8104
|
+
ue,
|
|
8105
|
+
fe,
|
|
8100
8106
|
r ?? ""
|
|
8101
8107
|
]),
|
|
8102
|
-
style: s ?
|
|
8103
|
-
...
|
|
8108
|
+
style: s ? ce : null,
|
|
8109
|
+
...N
|
|
8104
8110
|
}, /* @__PURE__ */ e.createElement(dn, {
|
|
8105
8111
|
disabled: i,
|
|
8106
8112
|
id: o,
|
|
8107
8113
|
label: c,
|
|
8108
8114
|
required: b,
|
|
8109
8115
|
showLabel: x,
|
|
8110
|
-
tooltipText:
|
|
8116
|
+
tooltipText: D
|
|
8111
8117
|
}), /* @__PURE__ */ e.createElement("div", { className: `${X}__input-wrapper` }, /* @__PURE__ */ e.createElement("button", {
|
|
8112
|
-
ref:
|
|
8113
|
-
"aria-describedby":
|
|
8114
|
-
"aria-expanded":
|
|
8118
|
+
ref: Se.setReference,
|
|
8119
|
+
"aria-describedby": pe ? `${o}__message` : null,
|
|
8120
|
+
"aria-expanded": xe,
|
|
8115
8121
|
"aria-haspopup": "dialog",
|
|
8116
|
-
"aria-invalid":
|
|
8117
|
-
className: Z([`${X}__trigger`,
|
|
8122
|
+
"aria-invalid": A === "error" ? !0 : null,
|
|
8123
|
+
className: Z([`${X}__trigger`, xe ? `${X}__trigger--open` : null]),
|
|
8118
8124
|
disabled: i,
|
|
8119
8125
|
type: "button",
|
|
8120
|
-
...
|
|
8126
|
+
...ye()
|
|
8121
8127
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
8122
8128
|
className: `${X}__trigger-icon`,
|
|
8123
8129
|
iconName: "calendarDays"
|
|
8124
|
-
}), /* @__PURE__ */ e.createElement("span", { className: Z([`${X}__trigger-text`,
|
|
8125
|
-
hasValidationMessage: !!
|
|
8130
|
+
}), /* @__PURE__ */ e.createElement("span", { className: Z([`${X}__trigger-text`, lt() ? `${X}__trigger-text--placeholder` : null]) }, ct()))), pe && /* @__PURE__ */ e.createElement(fn, {
|
|
8131
|
+
hasValidationMessage: !!k,
|
|
8126
8132
|
id: o,
|
|
8127
|
-
message:
|
|
8128
|
-
validationStatus:
|
|
8129
|
-
}),
|
|
8130
|
-
ref:
|
|
8133
|
+
message: pe,
|
|
8134
|
+
validationStatus: A
|
|
8135
|
+
}), be && /* @__PURE__ */ e.createElement(C, null, /* @__PURE__ */ e.createElement("div", {
|
|
8136
|
+
ref: Se.setFloating,
|
|
8131
8137
|
className: `${X}__popover`,
|
|
8132
|
-
style:
|
|
8133
|
-
...
|
|
8134
|
-
},
|
|
8135
|
-
"aria-label":
|
|
8138
|
+
style: ge,
|
|
8139
|
+
..._e()
|
|
8140
|
+
}, I && /* @__PURE__ */ e.createElement("div", { className: Z([`${X}__presets`, J ? null : `${X}__presets--collapsed`]) }, /* @__PURE__ */ e.createElement("div", {
|
|
8141
|
+
"aria-label": F.presetsGroupLabel,
|
|
8136
8142
|
className: `${X}__preset-list`,
|
|
8137
8143
|
role: "group"
|
|
8138
8144
|
}, y?.map((t) => /* @__PURE__ */ e.createElement("button", {
|
|
8139
8145
|
key: t.label,
|
|
8140
|
-
"aria-pressed":
|
|
8141
|
-
className: Z([`${X}__preset-item`,
|
|
8142
|
-
onClick: () =>
|
|
8146
|
+
"aria-pressed": W === t.label,
|
|
8147
|
+
className: Z([`${X}__preset-item`, W === t.label ? `${X}__preset-item--active` : null]),
|
|
8148
|
+
onClick: () => at(t),
|
|
8143
8149
|
type: "button"
|
|
8144
8150
|
}, t.label)), t && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
|
|
8145
8151
|
"aria-hidden": "true",
|
|
8146
8152
|
className: `${X}__preset-divider`
|
|
8147
8153
|
}), /* @__PURE__ */ e.createElement("button", {
|
|
8148
|
-
"aria-pressed":
|
|
8149
|
-
className: Z([`${X}__preset-item`,
|
|
8154
|
+
"aria-pressed": re,
|
|
8155
|
+
className: Z([`${X}__preset-item`, re ? `${X}__preset-item--active` : null]),
|
|
8150
8156
|
onClick: () => {
|
|
8151
|
-
|
|
8157
|
+
G(void 0), q(!0);
|
|
8152
8158
|
},
|
|
8153
8159
|
type: "button"
|
|
8154
|
-
},
|
|
8160
|
+
}, F.customPresetLabel, !S && /* @__PURE__ */ e.createElement(Q, {
|
|
8155
8161
|
iconName: "angleRight",
|
|
8156
8162
|
size: "s"
|
|
8157
|
-
})))),
|
|
8158
|
-
ref:
|
|
8163
|
+
})))), w && T && he), /* @__PURE__ */ e.createElement("div", { className: "visually-hidden" }, ut()), I ? ee && /* @__PURE__ */ e.createElement("div", {
|
|
8164
|
+
ref: ne,
|
|
8159
8165
|
className: `${X}__calendar-wrapper`,
|
|
8160
|
-
style: { flexBasis:
|
|
8166
|
+
style: { flexBasis: J ? te : 0 }
|
|
8161
8167
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
8162
8168
|
className: `${X}__calendar-wrapper-inner`,
|
|
8163
|
-
style: { width:
|
|
8164
|
-
},
|
|
8169
|
+
style: { width: te }
|
|
8170
|
+
}, ft)) : ft))));
|
|
8165
8171
|
}, Mi = o(({ accept: t, className: n, defaultValue: r, disabled: i = !1, fieldLabel: a, id: o, inputProps: s, inputWidth: c, labelStrings: l = {
|
|
8166
8172
|
chooseFile: "Choose file",
|
|
8167
8173
|
clearButton: "Clear selected file"
|
|
@@ -8764,7 +8770,7 @@ var Xr = {
|
|
|
8764
8770
|
}, n, /* @__PURE__ */ e.createElement(Q, {
|
|
8765
8771
|
className: `${a}__icon`,
|
|
8766
8772
|
iconName: "arrowRight",
|
|
8767
|
-
size: r === "
|
|
8773
|
+
size: r === "m" ? "m" : "s"
|
|
8768
8774
|
}));
|
|
8769
8775
|
}, Hi = ({ children: t, className: n, fontSize: r, isLoading: i, newWindowText: a = "opens in a new window", url: o, ...s }) => {
|
|
8770
8776
|
let c = "pds-link-new-window", l = r ? `${c}--${r}` : null;
|
|
@@ -9549,9 +9555,9 @@ var Xr = {
|
|
|
9549
9555
|
submenu: "submenu",
|
|
9550
9556
|
toggle: "Toggle"
|
|
9551
9557
|
}, menuItems: a, ...o }) => {
|
|
9552
|
-
let s = "pds-tree-nav", c = `${s}__item`, l = `${s}__menu`, [d, f] = g(!1), [p, m] = g([]), _ = h(null), v = h([]), y = h(-1);
|
|
9558
|
+
let s = "pds-tree-nav", c = `${s}__item`, l = `${s}__menu`, [d, f] = g(!1), [p, m] = g([]), _ = h(null), v = h([]), y = h(-1), b = h(null);
|
|
9553
9559
|
u(() => {
|
|
9554
|
-
|
|
9560
|
+
w();
|
|
9555
9561
|
}, [a, p]), u(() => {
|
|
9556
9562
|
if (!_.current || a.length === 0) return;
|
|
9557
9563
|
let e = Array.from(_.current.querySelectorAll(`.${c}--active`)), t = Array.from(_.current.querySelectorAll(`.${c}`)), n = e.map((e) => {
|
|
@@ -9559,47 +9565,63 @@ var Xr = {
|
|
|
9559
9565
|
return n ? t.indexOf(n) : -1;
|
|
9560
9566
|
}).filter((e) => e !== -1);
|
|
9561
9567
|
m(Array.from(new Set(n)));
|
|
9562
|
-
}, [a])
|
|
9563
|
-
|
|
9568
|
+
}, [a]), u(() => {
|
|
9569
|
+
let e = b.current;
|
|
9570
|
+
if (!e) return;
|
|
9571
|
+
if (b.current = null, w(), e.focusFirstChild) {
|
|
9572
|
+
let t = E(e.toggleButton)?.querySelector("a");
|
|
9573
|
+
if (t) {
|
|
9574
|
+
t.focus(), y.current = v.current.indexOf(t);
|
|
9575
|
+
return;
|
|
9576
|
+
}
|
|
9577
|
+
}
|
|
9578
|
+
let t = e.toggleButton.closest(`.${c}`)?.querySelector("a") || e.toggleButton;
|
|
9579
|
+
t.focus(), y.current = v.current.indexOf(t);
|
|
9580
|
+
}, [p]);
|
|
9581
|
+
let x = (e) => !e || !_.current ? -1 : Array.from(_.current.querySelectorAll(`.${c}`)).indexOf(e), S = (e, t) => {
|
|
9582
|
+
let n = -1;
|
|
9583
|
+
return _.current && e.path && (n = x(_.current.querySelector(`.${c}[data-item-path="${e.path}"]`))), {
|
|
9584
|
+
isExpanded: n === -1 ? t : p.includes(n),
|
|
9585
|
+
itemIndex: n
|
|
9586
|
+
};
|
|
9587
|
+
}, C = (e) => {
|
|
9588
|
+
e !== -1 && m((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
9589
|
+
}, w = () => {
|
|
9564
9590
|
_.current && (v.current = Array.from(_.current.querySelectorAll(".pds-tree-nav__menu a, button.pds-tree-nav__toggle")).filter((e) => {
|
|
9565
9591
|
if (window.getComputedStyle(e).display === "none") return !1;
|
|
9566
9592
|
let t = e.closest(`.${l}`);
|
|
9567
9593
|
return !(t && !t.classList.contains(`${l}--expanded`) && !t.classList.contains(`${l}--top-level`));
|
|
9568
9594
|
}));
|
|
9569
|
-
},
|
|
9595
|
+
}, T = (e) => {
|
|
9570
9596
|
let t = e.closest(`.${c}-wrapper`);
|
|
9571
9597
|
if (t) return t.querySelector(`.${s}__toggle`);
|
|
9572
9598
|
let n = e.closest(`.${c}`);
|
|
9573
9599
|
return n ? n.querySelector(`.${s}__toggle`) : null;
|
|
9574
|
-
},
|
|
9600
|
+
}, E = (e) => {
|
|
9575
9601
|
if (e.classList.contains(`${s}__toggle`)) return e.closest(`.${c}-wrapper`)?.nextElementSibling || null;
|
|
9576
9602
|
let t = e.closest(`.${c}`);
|
|
9577
9603
|
return t ? t.querySelector(`.${l}`) : null;
|
|
9578
|
-
},
|
|
9604
|
+
}, D = (e) => {
|
|
9579
9605
|
if (e.classList.contains(`${s}__toggle`)) return !0;
|
|
9580
9606
|
let t = e.closest(`.${c}-wrapper`);
|
|
9581
9607
|
return t ? !!t.querySelector(`.${s}__toggle`) : !1;
|
|
9582
|
-
},
|
|
9608
|
+
}, O = (e) => {
|
|
9583
9609
|
if (!d) return;
|
|
9584
9610
|
let t = v.current[y.current];
|
|
9585
9611
|
if (t) switch (e.key) {
|
|
9586
9612
|
case "ArrowDown":
|
|
9587
|
-
e.preventDefault(),
|
|
9613
|
+
e.preventDefault(), k(1);
|
|
9588
9614
|
break;
|
|
9589
9615
|
case "ArrowUp":
|
|
9590
|
-
e.preventDefault(),
|
|
9616
|
+
e.preventDefault(), k(-1);
|
|
9591
9617
|
break;
|
|
9592
9618
|
case "ArrowRight":
|
|
9593
|
-
if (e.preventDefault(),
|
|
9594
|
-
let e = t.classList.contains(`${s}__toggle`) ? t :
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
let e = t.querySelector("a");
|
|
9600
|
-
e && (e.focus(), y.current = v.current.indexOf(e));
|
|
9601
|
-
}
|
|
9602
|
-
}
|
|
9619
|
+
if (e.preventDefault(), D(t)) {
|
|
9620
|
+
let e = t.classList.contains(`${s}__toggle`) ? t : T(t), n = e ? x(e.closest(`.${c}`)) : -1;
|
|
9621
|
+
e && n !== -1 && !p.includes(n) && (b.current = {
|
|
9622
|
+
focusFirstChild: !0,
|
|
9623
|
+
toggleButton: e
|
|
9624
|
+
}, C(n));
|
|
9603
9625
|
}
|
|
9604
9626
|
break;
|
|
9605
9627
|
case "ArrowLeft": {
|
|
@@ -9608,75 +9630,43 @@ var Xr = {
|
|
|
9608
9630
|
if (n && !n.classList.contains(`${l}--top-level`)) {
|
|
9609
9631
|
let e = n.parentElement;
|
|
9610
9632
|
if (e && e.classList.contains(c)) {
|
|
9611
|
-
let t = e.querySelector(`.${s}__toggle`);
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
}
|
|
9633
|
+
let t = e.querySelector(`.${s}__toggle`), n = x(e);
|
|
9634
|
+
t && n !== -1 && p.includes(n) && (b.current = {
|
|
9635
|
+
focusFirstChild: !1,
|
|
9636
|
+
toggleButton: t
|
|
9637
|
+
}, C(n));
|
|
9617
9638
|
}
|
|
9618
|
-
} else if (
|
|
9619
|
-
let e = t.classList.contains(`${s}__toggle`) ? t :
|
|
9620
|
-
e &&
|
|
9639
|
+
} else if (D(t)) {
|
|
9640
|
+
let e = t.classList.contains(`${s}__toggle`) ? t : T(t), n = e ? x(e.closest(`.${c}`)) : -1;
|
|
9641
|
+
e && n !== -1 && p.includes(n) && C(n);
|
|
9621
9642
|
}
|
|
9622
9643
|
break;
|
|
9623
9644
|
}
|
|
9624
9645
|
}
|
|
9625
|
-
},
|
|
9646
|
+
}, k = (e) => {
|
|
9626
9647
|
let t = v.current;
|
|
9627
9648
|
if (t.length === 0) return;
|
|
9628
9649
|
let n = y.current + e;
|
|
9629
9650
|
n < 0 && (n = t.length - 1), n >= t.length && (n = 0), y.current = n, t[n]?.focus();
|
|
9630
|
-
},
|
|
9651
|
+
}, A = (e) => {
|
|
9631
9652
|
if (e.key === "Tab" && d && !e.shiftKey) {
|
|
9632
9653
|
e.preventDefault(), f(!1), y.current = -1;
|
|
9633
9654
|
let t = Array.from(document.querySelectorAll("a, button, input, select, textarea, [tabindex]:not([tabindex=\"-1\"])")), n = t.indexOf(_.current);
|
|
9634
9655
|
n !== -1 && n < t.length - 1 && t[n + 1].focus();
|
|
9635
9656
|
}
|
|
9636
|
-
},
|
|
9637
|
-
if (e.target === _.current && !d) e.preventDefault(), f(!0),
|
|
9657
|
+
}, j = (e) => {
|
|
9658
|
+
if (e.target === _.current && !d) e.preventDefault(), f(!0), w(), v.current.length > 0 && (y.current = 0, v.current[0]?.focus());
|
|
9638
9659
|
else if (e.target !== _.current && !d) {
|
|
9639
|
-
|
|
9660
|
+
w();
|
|
9640
9661
|
let t = v.current.indexOf(e.target);
|
|
9641
9662
|
t !== -1 && (f(!0), y.current = t);
|
|
9642
9663
|
}
|
|
9643
|
-
},
|
|
9644
|
-
let t =
|
|
9645
|
-
if (!n) return;
|
|
9646
|
-
let r = t.getAttribute("aria-expanded") === "false";
|
|
9647
|
-
t.classList.toggle(`${s}__toggle--expanded`, r), t.setAttribute("aria-expanded", r ? "true" : "false");
|
|
9648
|
-
let i = t.closest(`.${c}`);
|
|
9649
|
-
if (i) {
|
|
9650
|
-
i.setAttribute("aria-expanded", r ? "true" : "false");
|
|
9651
|
-
let e = Array.from(_.current?.querySelectorAll(`.${c}`) || []).indexOf(i);
|
|
9652
|
-
m((t) => r && !t.includes(e) && e !== -1 ? [...t, e] : r ? t : t.filter((t) => t !== e));
|
|
9653
|
-
}
|
|
9654
|
-
r ? k(n) : A(n);
|
|
9655
|
-
}, k = (e) => {
|
|
9656
|
-
Object.assign(e.style, {
|
|
9657
|
-
height: "auto",
|
|
9658
|
-
opacity: "1",
|
|
9659
|
-
display: "flex"
|
|
9660
|
-
}), e.classList.add(`${l}--expanded`), b();
|
|
9661
|
-
}, A = (e) => {
|
|
9662
|
-
e.classList.remove(`${l}--expanded`), Object.assign(e.style, {
|
|
9663
|
-
opacity: "0",
|
|
9664
|
-
height: "",
|
|
9665
|
-
display: "none"
|
|
9666
|
-
}), b();
|
|
9667
|
-
}, j = (t, n, r) => {
|
|
9668
|
-
let a = da[t], o = `${l}--${a}-level`, u = `${c}--${a}-level`, d = t + 1, f = Yi(n);
|
|
9669
|
-
if (_.current && n.path) {
|
|
9670
|
-
let e = _.current.querySelector(`.${c}[data-item-path="${n.path}"]`);
|
|
9671
|
-
if (e) {
|
|
9672
|
-
let t = Array.from(_.current.querySelectorAll(`.${c}`)).indexOf(e);
|
|
9673
|
-
f = p.includes(t);
|
|
9674
|
-
}
|
|
9675
|
-
}
|
|
9664
|
+
}, M = (t, n, r) => {
|
|
9665
|
+
let a = da[t], o = `${l}--${a}-level`, u = `${c}--${a}-level`, d = t + 1, { isExpanded: f, itemIndex: p } = S(n, Yi(n));
|
|
9676
9666
|
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `${c}-wrapper` }, /* @__PURE__ */ e.createElement("button", {
|
|
9677
9667
|
"aria-expanded": f,
|
|
9678
9668
|
className: Z([`${s}__toggle`, f ? `${s}__toggle--expanded` : null]),
|
|
9679
|
-
onClick:
|
|
9669
|
+
onClick: () => C(p),
|
|
9680
9670
|
type: "button"
|
|
9681
9671
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
9682
9672
|
iconName: "angleDown",
|
|
@@ -9690,10 +9680,10 @@ var Xr = {
|
|
|
9690
9680
|
]),
|
|
9691
9681
|
role: "group"
|
|
9692
9682
|
}, n.links.map((t, n) => {
|
|
9693
|
-
let r = Yi(t);
|
|
9683
|
+
let r = Yi(t), { isExpanded: i } = S(t, r);
|
|
9694
9684
|
return /* @__PURE__ */ e.createElement("li", {
|
|
9695
9685
|
key: `${n}-${a}`,
|
|
9696
|
-
"aria-expanded": t.links ?
|
|
9686
|
+
"aria-expanded": t.links ? i : void 0,
|
|
9697
9687
|
"aria-selected": r,
|
|
9698
9688
|
className: Z([
|
|
9699
9689
|
c,
|
|
@@ -9702,13 +9692,13 @@ var Xr = {
|
|
|
9702
9692
|
]),
|
|
9703
9693
|
"data-item-path": t.path || "",
|
|
9704
9694
|
role: "treeitem"
|
|
9705
|
-
}, t.links && d in da ?
|
|
9695
|
+
}, t.links && d in da ? M(d, t, t.links) : t.linkContent);
|
|
9706
9696
|
})));
|
|
9707
|
-
},
|
|
9708
|
-
let { linkContent: r, links: i } = t, a = Yi(t);
|
|
9697
|
+
}, N = (t, n) => {
|
|
9698
|
+
let { linkContent: r, links: i } = t, a = Yi(t), { isExpanded: o } = S(t, a);
|
|
9709
9699
|
return /* @__PURE__ */ e.createElement("li", {
|
|
9710
9700
|
key: n,
|
|
9711
|
-
"aria-expanded": i ?
|
|
9701
|
+
"aria-expanded": i ? o : void 0,
|
|
9712
9702
|
"aria-selected": a,
|
|
9713
9703
|
className: Z([
|
|
9714
9704
|
c,
|
|
@@ -9717,15 +9707,15 @@ var Xr = {
|
|
|
9717
9707
|
]),
|
|
9718
9708
|
"data-item-path": t.path || "",
|
|
9719
9709
|
role: "treeitem"
|
|
9720
|
-
}, i ?
|
|
9710
|
+
}, i ? M(2, t, i) : r);
|
|
9721
9711
|
};
|
|
9722
9712
|
return /* @__PURE__ */ e.createElement("nav", {
|
|
9723
9713
|
ref: _,
|
|
9724
9714
|
"aria-label": t,
|
|
9725
9715
|
className: Z([s, n ?? ""]),
|
|
9726
|
-
onFocus:
|
|
9716
|
+
onFocus: j,
|
|
9727
9717
|
onKeyDown: (e) => {
|
|
9728
|
-
|
|
9718
|
+
O(e), A(e);
|
|
9729
9719
|
},
|
|
9730
9720
|
tabIndex: 0,
|
|
9731
9721
|
...o
|
|
@@ -9733,7 +9723,7 @@ var Xr = {
|
|
|
9733
9723
|
"aria-label": t,
|
|
9734
9724
|
className: `${s}__menu ${s}__menu--top-level`,
|
|
9735
9725
|
role: "tree"
|
|
9736
|
-
}, a.map((e, t) =>
|
|
9726
|
+
}, a.map((e, t) => N(e, t))));
|
|
9737
9727
|
}, pa = {
|
|
9738
9728
|
light: "sunBright",
|
|
9739
9729
|
dark: "moon",
|
|
@@ -9873,7 +9863,7 @@ var Xr = {
|
|
|
9873
9863
|
iconName: t.iconName,
|
|
9874
9864
|
size: "m"
|
|
9875
9865
|
}));
|
|
9876
|
-
}),
|
|
9866
|
+
}), ce = i.map((t, n) => {
|
|
9877
9867
|
let r = S.current[n], i = `${k}__item`, a = t.disabled ? `${i}--disabled` : null;
|
|
9878
9868
|
return /* @__PURE__ */ e.createElement("li", {
|
|
9879
9869
|
key: r,
|
|
@@ -9889,14 +9879,14 @@ var Xr = {
|
|
|
9889
9879
|
iconName: t.iconName,
|
|
9890
9880
|
size: "m"
|
|
9891
9881
|
}));
|
|
9892
|
-
}),
|
|
9882
|
+
}), X = /* @__PURE__ */ e.createElement("span", { className: `${k}__toggle-left` }, ne, f ?? l);
|
|
9893
9883
|
return /* @__PURE__ */ e.createElement("span", {
|
|
9894
9884
|
className: Z([k, n ?? ""]),
|
|
9895
9885
|
...p
|
|
9896
|
-
}, x ? /* @__PURE__ */ e.createElement(zn, { label:
|
|
9886
|
+
}, x ? /* @__PURE__ */ e.createElement(zn, { label: X }, /* @__PURE__ */ e.createElement("ul", {
|
|
9897
9887
|
className: Z([j, `${j}--mobile`]),
|
|
9898
9888
|
role: "menu"
|
|
9899
|
-
}, re, /* @__PURE__ */ e.createElement("li", { role: "separator" }), ie,
|
|
9889
|
+
}, re, /* @__PURE__ */ e.createElement("li", { role: "separator" }), ie, ce)) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("button", {
|
|
9900
9890
|
ref: L.setReference,
|
|
9901
9891
|
"aria-label": t,
|
|
9902
9892
|
className: `${k}__trigger`,
|
|
@@ -10079,81 +10069,87 @@ var Xr = {
|
|
|
10079
10069
|
...Bn,
|
|
10080
10070
|
neutral: "Notice"
|
|
10081
10071
|
}, ...c }) => {
|
|
10082
|
-
let l = r === "marketing", [d, f] = g(t), [p, m] = g(null), [
|
|
10072
|
+
let l = r === "marketing", [d, f] = g(t), [p, m] = g(null), [_, v] = g(null), [y, b] = g({}), x = h(/* @__PURE__ */ new Set());
|
|
10083
10073
|
u(() => {
|
|
10084
|
-
|
|
10074
|
+
let e = new Set(t.map((e) => e.id));
|
|
10075
|
+
x.current.forEach((t) => {
|
|
10076
|
+
e.has(t) || x.current.delete(t);
|
|
10077
|
+
}), f((e) => {
|
|
10078
|
+
let n = new Map(t.map((e) => [e.id, e])), r = new Set(e.map((e) => e.id)), i = e.filter((e) => n.has(e.id)).map((e) => n.get(e.id)), a = t.filter((e) => !r.has(e.id) && !x.current.has(e.id));
|
|
10079
|
+
return [...i, ...a];
|
|
10080
|
+
});
|
|
10085
10081
|
}, [t]);
|
|
10086
|
-
let
|
|
10087
|
-
if (
|
|
10088
|
-
let
|
|
10089
|
-
critical: `${
|
|
10090
|
-
discovery: `${
|
|
10091
|
-
info: `${
|
|
10092
|
-
neutral: `${
|
|
10093
|
-
warning: `${
|
|
10094
|
-
},
|
|
10082
|
+
let S = d.length;
|
|
10083
|
+
if (S === 0) return null;
|
|
10084
|
+
let C = "pds-banner", w = S > 1 ? `${C}-group--multiple` : null, T = {
|
|
10085
|
+
critical: `${C}--critical`,
|
|
10086
|
+
discovery: `${C}--discovery`,
|
|
10087
|
+
info: `${C}--info`,
|
|
10088
|
+
neutral: `${C}--neutral`,
|
|
10089
|
+
warning: `${C}--warning`
|
|
10090
|
+
}, E = d[0].type, D = E ? `${C}-group--${E}` : null, O = (e) => 500 - e, k = (e) => e === 0 ? 0 : -1, A = () => {
|
|
10095
10091
|
m(d[0].id), setTimeout(() => {
|
|
10096
10092
|
f((e) => [...e.slice(1), e[0]]), m(null);
|
|
10097
10093
|
}, va);
|
|
10098
|
-
},
|
|
10099
|
-
|
|
10094
|
+
}, j = () => {
|
|
10095
|
+
b({
|
|
10100
10096
|
[d[0].id]: 502,
|
|
10101
|
-
[d[
|
|
10097
|
+
[d[S - 1].id]: 501
|
|
10102
10098
|
}), setTimeout(() => {
|
|
10103
10099
|
m(d[0].id);
|
|
10104
10100
|
}, ya), setTimeout(() => {
|
|
10105
|
-
f((e) => [e[e.length - 1], ...e.slice(0, e.length - 1)]), m(null),
|
|
10101
|
+
f((e) => [e[e.length - 1], ...e.slice(0, e.length - 1)]), m(null), b({});
|
|
10106
10102
|
}, va);
|
|
10107
|
-
},
|
|
10108
|
-
let { iconName: r, id: a, isDismissible: o, message: c, onDismiss: u, type: d } = t, m = d === "critical" ? "alert" : "status",
|
|
10109
|
-
e.preventDefault(),
|
|
10110
|
-
u?.(),
|
|
10103
|
+
}, M = (t, n) => {
|
|
10104
|
+
let { iconName: r, id: a, isDismissible: o, message: c, onDismiss: u, type: d } = t, m = d === "critical" ? "alert" : "status", h = `${s[d]}: `, g = (e) => {
|
|
10105
|
+
e.preventDefault(), v(a), setTimeout(() => {
|
|
10106
|
+
u?.(), v(null), x.current.add(a), f((e) => e.filter((e) => e.id !== a));
|
|
10111
10107
|
}, va);
|
|
10112
|
-
}, b =
|
|
10108
|
+
}, b = y[a] ?? O(n);
|
|
10113
10109
|
return /* @__PURE__ */ e.createElement("div", {
|
|
10114
10110
|
key: a,
|
|
10115
10111
|
className: Z([
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
p === a ? `${
|
|
10119
|
-
|
|
10112
|
+
C,
|
|
10113
|
+
T[d],
|
|
10114
|
+
p === a ? `${C}--fading` : null,
|
|
10115
|
+
_ === a ? `${C}--dismissing` : null
|
|
10120
10116
|
]),
|
|
10121
10117
|
id: a,
|
|
10122
10118
|
role: m,
|
|
10123
10119
|
style: { zIndex: b }
|
|
10124
|
-
}, /* @__PURE__ */ e.createElement("div", { className: `${
|
|
10125
|
-
className: `${
|
|
10120
|
+
}, /* @__PURE__ */ e.createElement("div", { className: `${C}__content` }, /* @__PURE__ */ e.createElement(Q, {
|
|
10121
|
+
className: `${C}__icon ${C}__icon--${t.type}`,
|
|
10126
10122
|
iconName: d === "neutral" ? r : _a[d],
|
|
10127
10123
|
size: l ? "l" : "m"
|
|
10128
|
-
}), /* @__PURE__ */ e.createElement("div", { className: `${
|
|
10129
|
-
className: `${
|
|
10130
|
-
onClick:
|
|
10131
|
-
tabIndex:
|
|
10124
|
+
}), /* @__PURE__ */ e.createElement("div", { className: `${C}__message` }, /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, h, " "), c)), o && /* @__PURE__ */ e.createElement("button", {
|
|
10125
|
+
className: `${C}__dismiss-button`,
|
|
10126
|
+
onClick: g,
|
|
10127
|
+
tabIndex: k(n),
|
|
10132
10128
|
type: "button"
|
|
10133
10129
|
}, i));
|
|
10134
10130
|
};
|
|
10135
10131
|
return /* @__PURE__ */ e.createElement("div", {
|
|
10136
10132
|
className: Z([
|
|
10137
|
-
`${
|
|
10138
|
-
|
|
10139
|
-
|
|
10133
|
+
`${C}-group`,
|
|
10134
|
+
D,
|
|
10135
|
+
w,
|
|
10140
10136
|
n ?? ""
|
|
10141
10137
|
]),
|
|
10142
10138
|
"data-context": r,
|
|
10143
10139
|
...c
|
|
10144
|
-
},
|
|
10140
|
+
}, S > 1 ? /* @__PURE__ */ e.createElement("div", { className: `${C}__navigation` }, /* @__PURE__ */ e.createElement(Pn, {
|
|
10145
10141
|
ariaLabel: o,
|
|
10146
|
-
className: `${
|
|
10142
|
+
className: `${C}__nav-button ${C}__nav-button--prev`,
|
|
10147
10143
|
iconName: "angleLeft",
|
|
10148
|
-
onClick:
|
|
10144
|
+
onClick: j,
|
|
10149
10145
|
size: "m"
|
|
10150
10146
|
}), /* @__PURE__ */ e.createElement(Pn, {
|
|
10151
10147
|
ariaLabel: a,
|
|
10152
|
-
className: `${
|
|
10148
|
+
className: `${C}__nav-button ${C}__nav-button--next`,
|
|
10153
10149
|
iconName: "angleRight",
|
|
10154
|
-
onClick:
|
|
10150
|
+
onClick: A,
|
|
10155
10151
|
size: "m"
|
|
10156
|
-
}), d.map((e, t) =>
|
|
10152
|
+
}), d.map((e, t) => M(e, t))) : M(d[0], 0));
|
|
10157
10153
|
}, xa = {
|
|
10158
10154
|
info: "circleInfo",
|
|
10159
10155
|
warning: "triangleExclamation",
|
|
@@ -10917,7 +10913,34 @@ var Xr = {
|
|
|
10917
10913
|
]),
|
|
10918
10914
|
...i
|
|
10919
10915
|
}, t);
|
|
10920
|
-
}, Za = ({
|
|
10916
|
+
}, Za = ({ className: t, content: n, cta: r, dismissLabel: i = "Close", heading: a, image: o, imageVariant: s = "bleed", isDismissible: c, layout: l = "vertical", onDismiss: u, ...d }) => {
|
|
10917
|
+
let f = "pds-feature-panel", p = l === "vertical" ? null : `${f}--${l}`, m = s === "bleed" ? null : `${f}--image-${s}`, h = c ? `${f}--hasDismiss` : null, g = o ? `${f}--has-image` : null, _ = r && "linkContent" in r;
|
|
10918
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
10919
|
+
className: Z([
|
|
10920
|
+
f,
|
|
10921
|
+
p,
|
|
10922
|
+
m,
|
|
10923
|
+
h,
|
|
10924
|
+
g,
|
|
10925
|
+
t ?? ""
|
|
10926
|
+
]),
|
|
10927
|
+
...d
|
|
10928
|
+
}, c && /* @__PURE__ */ e.createElement("div", { className: `${f}__dismiss` }, /* @__PURE__ */ e.createElement(In, {
|
|
10929
|
+
ariaLabel: i,
|
|
10930
|
+
onClick: u,
|
|
10931
|
+
size: "s"
|
|
10932
|
+
})), o && /* @__PURE__ */ e.createElement("div", { className: `${f}__image` }, o), /* @__PURE__ */ e.createElement("div", { className: `${f}__body` }, /* @__PURE__ */ e.createElement("h2", { className: `${f}__heading` }, a), /* @__PURE__ */ e.createElement("p", { className: `${f}__content` }, n), r && (_ ? /* @__PURE__ */ e.createElement(Mn, {
|
|
10933
|
+
...r,
|
|
10934
|
+
className: `${f}__cta`,
|
|
10935
|
+
size: "s",
|
|
10936
|
+
variant: "brand"
|
|
10937
|
+
}) : /* @__PURE__ */ e.createElement(jn, {
|
|
10938
|
+
...r,
|
|
10939
|
+
className: `${f}__cta`,
|
|
10940
|
+
size: "s",
|
|
10941
|
+
variant: "brand"
|
|
10942
|
+
}))));
|
|
10943
|
+
}, Qa = ({ children: t, className: n, padding: r = "standard", variant: i = "default", ...a }) => {
|
|
10921
10944
|
let o = "pds-panel", s = i === "default" ? null : `${o}--${i}`, c = `${o}__content`, l = r === "standard" ? null : `${c}--pad-${r}`;
|
|
10922
10945
|
return /* @__PURE__ */ e.createElement("div", {
|
|
10923
10946
|
className: Z([
|
|
@@ -10927,7 +10950,7 @@ var Xr = {
|
|
|
10927
10950
|
]),
|
|
10928
10951
|
...a
|
|
10929
10952
|
}, /* @__PURE__ */ e.createElement("div", { className: Z([c, l]) }, t));
|
|
10930
|
-
},
|
|
10953
|
+
}, $a = ({ background: t = "default", children: n, className: r, hasBorder: i = !0, paddingSize: a = "m", ...o }) => {
|
|
10931
10954
|
let s = "pds-panel-list", c = `pds-panel-list--${a}`, l = t === "default" ? null : `${s}--${t}`, u = i ? null : `${s}--borderless`;
|
|
10932
10955
|
return /* @__PURE__ */ e.createElement("ul", {
|
|
10933
10956
|
className: Z([
|
|
@@ -10939,7 +10962,7 @@ var Xr = {
|
|
|
10939
10962
|
]),
|
|
10940
10963
|
...o
|
|
10941
10964
|
}, n);
|
|
10942
|
-
},
|
|
10965
|
+
}, eo = ({ children: t, className: n, expandButtonAriaLabel: r, isExpandable: i = !1, ...a }) => {
|
|
10943
10966
|
let o = "pds-panel-row", [s, c] = g(!1), l = gt(t), u = l["items-left"], d = l["items-right"], f = l["items-below"], p = () => {
|
|
10944
10967
|
c((e) => !e);
|
|
10945
10968
|
};
|
|
@@ -10970,10 +10993,23 @@ var Xr = {
|
|
|
10970
10993
|
opacity: "0"
|
|
10971
10994
|
}
|
|
10972
10995
|
}, /* @__PURE__ */ e.createElement("div", { className: `${o}__items-inside` }, f)));
|
|
10973
|
-
},
|
|
10996
|
+
}, to = ({ children: t, className: n, ...r }) => /* @__PURE__ */ e.createElement("div", {
|
|
10974
10997
|
className: Z(["pds-panel-stack", n ?? ""]),
|
|
10975
10998
|
...r
|
|
10976
|
-
}, t),
|
|
10999
|
+
}, t), no = ({ children: t, className: n, contentMaxHeight: r, heading: i, icon: a, ...o }) => {
|
|
11000
|
+
let s = "pds-widget-panel", c = gt(t), l = c.__unslotted, u = c.footer, d = r ? { maxHeight: r } : void 0;
|
|
11001
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
11002
|
+
className: Z([s, n ?? ""]),
|
|
11003
|
+
...o
|
|
11004
|
+
}, /* @__PURE__ */ e.createElement("div", { className: `${s}__header` }, a && /* @__PURE__ */ e.createElement(Q, {
|
|
11005
|
+
className: `${s}__icon`,
|
|
11006
|
+
iconName: a,
|
|
11007
|
+
size: "m"
|
|
11008
|
+
}), /* @__PURE__ */ e.createElement("h2", { className: `${s}__heading` }, i)), /* @__PURE__ */ e.createElement("div", {
|
|
11009
|
+
className: `${s}__content`,
|
|
11010
|
+
style: d
|
|
11011
|
+
}, l), _t(u) && /* @__PURE__ */ e.createElement("div", { className: `${s}__footer` }, u));
|
|
11012
|
+
}, ro = /* @__PURE__ */ e.createElement("svg", {
|
|
10977
11013
|
"aria-label": "Pantheon",
|
|
10978
11014
|
fill: "none",
|
|
10979
11015
|
focusable: "false",
|
|
@@ -11035,7 +11071,7 @@ var Xr = {
|
|
|
11035
11071
|
}), /* @__PURE__ */ e.createElement("path", {
|
|
11036
11072
|
d: "M161.5 16.65H161V16.35H162.5V16.65H162V18.25H161.6V16.65H161.5ZM163.6 18.25L163.1 16.75V18.25H162.7V16.35H163.3L163.8 17.85L164.3 16.35H164.9V18.25H164.5V16.75L164 18.25H163.6Z",
|
|
11037
11073
|
fill: "var(--pds-color-foreground-default)"
|
|
11038
|
-
})),
|
|
11074
|
+
})), io = /* @__PURE__ */ e.createElement("svg", {
|
|
11039
11075
|
"aria-label": "Pantheon",
|
|
11040
11076
|
fill: "none",
|
|
11041
11077
|
focusable: "false",
|
|
@@ -11070,7 +11106,7 @@ var Xr = {
|
|
|
11070
11106
|
}), /* @__PURE__ */ e.createElement("path", {
|
|
11071
11107
|
d: "M5.4 24.2L3.7 19.9H7.6L9.4 24.2H13.1L9.8 16.3H1.7C1.1 16.3 0.7 16.3 0.4 17.2C0.0999996 18.3 0 20.4 0 24.5C0 28.6 -3.8743e-07 30.7 0.4 31.8C0.7 32.7 1 32.7 1.7 32.7H8.8L5.4 24.2Z",
|
|
11072
11108
|
fill: "var(--pds-color-foreground-default)"
|
|
11073
|
-
})),
|
|
11109
|
+
})), ao = /* @__PURE__ */ e.createElement("svg", {
|
|
11074
11110
|
"aria-label": "Pantheon",
|
|
11075
11111
|
fill: "none",
|
|
11076
11112
|
focusable: "false",
|
|
@@ -11105,17 +11141,17 @@ var Xr = {
|
|
|
11105
11141
|
}), /* @__PURE__ */ e.createElement("path", {
|
|
11106
11142
|
d: "M135.7 0.299999H135.2V0H136.7V0.299999H136.2V1.9H135.8V0.299999H135.7ZM137.8 1.9L137.3 0.4V1.9H136.9V0H137.5L138 1.5L138.5 0H139.1V1.9H138.7V0.4L138.2 1.9H137.8Z",
|
|
11107
11143
|
fill: "var(--pds-color-foreground-default)"
|
|
11108
|
-
})),
|
|
11144
|
+
})), oo = ({ className: t, colorType: n = "default", displayType: r = "full", linkContent: i, size: a = "m", ...o }) => {
|
|
11109
11145
|
let c = "pds-pantheon-logo", l = r && r !== "full" ? `${c}--${r}` : null, u = n && n !== "default" ? `${c}--${n}` : null, d = a === "m" ? null : `${c}--${a}`, f;
|
|
11110
11146
|
switch (r) {
|
|
11111
11147
|
case "full":
|
|
11112
|
-
f =
|
|
11148
|
+
f = ro;
|
|
11113
11149
|
break;
|
|
11114
11150
|
case "icon":
|
|
11115
|
-
f =
|
|
11151
|
+
f = io;
|
|
11116
11152
|
break;
|
|
11117
11153
|
case "wordmark":
|
|
11118
|
-
f =
|
|
11154
|
+
f = ao;
|
|
11119
11155
|
break;
|
|
11120
11156
|
}
|
|
11121
11157
|
let p = s(i) && typeof i.props.children == "string" ? i.props.children : "", m = s(i) ? i.type : null, h = s(i) && m ? /* @__PURE__ */ e.createElement(m, Object.assign({}, i.props, {
|
|
@@ -11132,7 +11168,7 @@ var Xr = {
|
|
|
11132
11168
|
]),
|
|
11133
11169
|
...o
|
|
11134
11170
|
}, i ? h : f);
|
|
11135
|
-
},
|
|
11171
|
+
}, so = 8, co = 14, lo = ({ className: t, classNameContainer: n, closeButtonLabel: r = "Close", content: i, customTrigger: a = !1, hasCloseButton: o = !1, offsetValue: s = 0, onClose: c = () => {}, placement: l = "top", popoverIsOpen: d = !1, setPopoverIsOpen: f = () => {}, title: p, triggerAccessibleText: m = "Show more information", triggerIcon: _ = "circleInfo", triggerIconSize: v = "m", ...x }) => {
|
|
11136
11172
|
let [S, w] = g(d);
|
|
11137
11173
|
u(() => {
|
|
11138
11174
|
w(d);
|
|
@@ -11159,12 +11195,12 @@ var Xr = {
|
|
|
11159
11195
|
M(R),
|
|
11160
11196
|
N(R),
|
|
11161
11197
|
H(R)
|
|
11162
|
-
]), J = V.arrow?.x ?? 0, ee = V.arrow?.y ?? 0, te = J +
|
|
11198
|
+
]), J = V.arrow?.x ?? 0, ee = V.arrow?.y ?? 0, te = J + co / 2, ne = ee + so, { isMounted: re } = U(R, {
|
|
11163
11199
|
initial: { transform: "scale(0)" },
|
|
11164
11200
|
common: ({ side: e }) => ({ transformOrigin: {
|
|
11165
|
-
top: `${te}px calc(100% + ${
|
|
11201
|
+
top: `${te}px calc(100% + ${so}px)`,
|
|
11166
11202
|
bottom: `${te}px -8px`,
|
|
11167
|
-
left: `calc(100% + ${
|
|
11203
|
+
left: `calc(100% + ${so}px) ${ne}px`,
|
|
11168
11204
|
right: `-8px ${ne}px`
|
|
11169
11205
|
}[e] })
|
|
11170
11206
|
});
|
|
@@ -11196,23 +11232,23 @@ var Xr = {
|
|
|
11196
11232
|
className: `${j}__arrow`,
|
|
11197
11233
|
context: R,
|
|
11198
11234
|
fill: "var(--pds-color-surface-default)",
|
|
11199
|
-
height:
|
|
11235
|
+
height: so,
|
|
11200
11236
|
stroke: "var(--pds-color-border-default)",
|
|
11201
11237
|
strokeWidth: 1,
|
|
11202
11238
|
tipRadius: 0,
|
|
11203
|
-
width:
|
|
11239
|
+
width: co
|
|
11204
11240
|
}), /* @__PURE__ */ e.createElement("div", { className: `${j}__container-inner` }, p && /* @__PURE__ */ e.createElement("div", { className: `${j}__title` }, p), i && /* @__PURE__ */ e.createElement("div", { className: `${j}__content` }, i), o && /* @__PURE__ */ e.createElement("div", { className: `${j}__close-wrapper` }, /* @__PURE__ */ e.createElement(In, {
|
|
11205
11241
|
ariaLabel: r,
|
|
11206
11242
|
onClick: G,
|
|
11207
11243
|
size: "s"
|
|
11208
11244
|
})))))));
|
|
11209
|
-
},
|
|
11245
|
+
}, uo = {
|
|
11210
11246
|
neutral: "--pds-color-status-neutral-indicator",
|
|
11211
11247
|
info: "--pds-color-status-info-fill",
|
|
11212
11248
|
success: "--pds-color-status-success-fill",
|
|
11213
11249
|
warning: "--pds-color-status-warning-fill",
|
|
11214
11250
|
critical: "--pds-color-status-critical-fill"
|
|
11215
|
-
},
|
|
11251
|
+
}, fo = ({ className: t, colorBreakpoints: n = [{
|
|
11216
11252
|
colorType: "info",
|
|
11217
11253
|
percentage: 0
|
|
11218
11254
|
}, {
|
|
@@ -11233,7 +11269,7 @@ var Xr = {
|
|
|
11233
11269
|
id: m
|
|
11234
11270
|
}, i), (x || l) && /* @__PURE__ */ e.createElement("div", { className: `${h}__details` }, x && b, l && /* @__PURE__ */ e.createElement("div", {
|
|
11235
11271
|
className: `${h}__percentage`,
|
|
11236
|
-
style: { color: `hsl(from var(${
|
|
11272
|
+
style: { color: `hsl(from var(${uo[y]}) h s calc(l - 7))` }
|
|
11237
11273
|
}, s, "%")), /* @__PURE__ */ e.createElement("div", { className: `${h}__wrapper` }, /* @__PURE__ */ e.createElement("div", {
|
|
11238
11274
|
"aria-labelledby": m,
|
|
11239
11275
|
"aria-valuenow": v,
|
|
@@ -11243,16 +11279,16 @@ var Xr = {
|
|
|
11243
11279
|
className: `${h}__bar`,
|
|
11244
11280
|
style: {
|
|
11245
11281
|
width: `${v}%`,
|
|
11246
|
-
backgroundColor: `var(${
|
|
11282
|
+
backgroundColor: `var(${uo[y]})`
|
|
11247
11283
|
}
|
|
11248
11284
|
}))), S && b);
|
|
11249
|
-
},
|
|
11285
|
+
}, po = {
|
|
11250
11286
|
neutral: "--pds-color-status-neutral-indicator",
|
|
11251
11287
|
info: "--pds-color-status-info-fill",
|
|
11252
11288
|
success: "--pds-color-status-success-fill",
|
|
11253
11289
|
warning: "--pds-color-status-warning-fill",
|
|
11254
11290
|
critical: "--pds-color-status-critical-fill"
|
|
11255
|
-
},
|
|
11291
|
+
}, mo = ({ className: t, colorBreakpoints: n = [{
|
|
11256
11292
|
colorType: "info",
|
|
11257
11293
|
percentage: 0
|
|
11258
11294
|
}, {
|
|
@@ -11301,7 +11337,7 @@ var Xr = {
|
|
|
11301
11337
|
strokeDasharray: x,
|
|
11302
11338
|
strokeDashoffset: S,
|
|
11303
11339
|
strokeWidth: y,
|
|
11304
|
-
style: { stroke: `var(${
|
|
11340
|
+
style: { stroke: `var(${po[C]})` },
|
|
11305
11341
|
transform: `rotate(-90 ${v / 2} ${v / 2})`
|
|
11306
11342
|
}), /* @__PURE__ */ e.createElement("text", {
|
|
11307
11343
|
alignmentBaseline: "middle",
|
|
@@ -11311,22 +11347,22 @@ var Xr = {
|
|
|
11311
11347
|
x: "50%",
|
|
11312
11348
|
y: "51%"
|
|
11313
11349
|
}, w))));
|
|
11314
|
-
},
|
|
11350
|
+
}, ho = {
|
|
11315
11351
|
of: "of",
|
|
11316
11352
|
showing: "Showing",
|
|
11317
11353
|
unitPlural: "results",
|
|
11318
11354
|
unitSingular: "result"
|
|
11319
|
-
},
|
|
11355
|
+
}, go = (e, t, n, r) => new Intl.PluralRules(r).select(e) === "one" ? t : n, _o = ({ className: t, countMatching: n, countTotal: r, labelStrings: i, locale: a, ...o }) => {
|
|
11320
11356
|
let s = "pds-result-count", c = `${s}__number`, { of: l, showing: u, unitPlural: d, unitSingular: f } = {
|
|
11321
|
-
...
|
|
11357
|
+
...ho,
|
|
11322
11358
|
...i
|
|
11323
|
-
}, p = n !== void 0, m =
|
|
11359
|
+
}, p = n !== void 0, m = go(r, f, d, a);
|
|
11324
11360
|
return /* @__PURE__ */ e.createElement("div", {
|
|
11325
11361
|
"aria-live": "polite",
|
|
11326
11362
|
className: Z([s, t ?? ""]),
|
|
11327
11363
|
...o
|
|
11328
11364
|
}, /* @__PURE__ */ e.createElement("span", null, p && /* @__PURE__ */ e.createElement(e.Fragment, null, u && `${u} `, /* @__PURE__ */ e.createElement("span", { className: c }, n), ` ${l} `), /* @__PURE__ */ e.createElement("span", { className: c }, r), ` ${m}`));
|
|
11329
|
-
},
|
|
11365
|
+
}, vo = ({ children: t, className: n, menuAriaLabel: r, menuItems: i, variant: a = "dropdown", ...o }) => {
|
|
11330
11366
|
let s = "pds-row-actions-menu", c = a === "dropdown" ? null : `${s}--${a}`, l = d(), u = h(null);
|
|
11331
11367
|
return /* @__PURE__ */ e.createElement("div", {
|
|
11332
11368
|
className: Z([
|
|
@@ -11353,14 +11389,14 @@ var Xr = {
|
|
|
11353
11389
|
size: "s",
|
|
11354
11390
|
variant: "subtle"
|
|
11355
11391
|
})));
|
|
11356
|
-
},
|
|
11392
|
+
}, yo = {
|
|
11357
11393
|
privacy: /* @__PURE__ */ e.createElement("a", { href: "https://legal.pantheon.io" }, "Privacy Policy"),
|
|
11358
11394
|
dataSubjectRequest: /* @__PURE__ */ e.createElement("a", { href: "http://pantheon.io/data-subject-request" }, "Data Subject Request"),
|
|
11359
11395
|
cookiePolicy: /* @__PURE__ */ e.createElement("a", { href: "https://legal.pantheon.io" }, "Cookie Policy"),
|
|
11360
11396
|
termsOfUse: /* @__PURE__ */ e.createElement("a", { href: "https://legal.pantheon.io" }, "Terms of Use"),
|
|
11361
11397
|
acceptableUse: /* @__PURE__ */ e.createElement("a", { href: "https://legal.pantheon.io" }, "Acceptable Use Policy"),
|
|
11362
11398
|
accessibilityStatement: /* @__PURE__ */ e.createElement("a", { href: "https://pantheon.io/accessibility-statement" }, "Accessibility Statement")
|
|
11363
|
-
},
|
|
11399
|
+
}, bo = (e) => typeof e == "string", xo = ({ as: t = "div", children: n, className: r, containerWidth: i = "full", hasTopBorder: a, legalLinks: o = [
|
|
11364
11400
|
"privacy",
|
|
11365
11401
|
"dataSubjectRequest",
|
|
11366
11402
|
"cookiePolicy",
|
|
@@ -11377,8 +11413,8 @@ var Xr = {
|
|
|
11377
11413
|
r ?? ""
|
|
11378
11414
|
]),
|
|
11379
11415
|
...c
|
|
11380
|
-
}, /* @__PURE__ */ e.createElement("div", { className: f }, n && /* @__PURE__ */ e.createElement("div", { className: `${l}__content` }, n), /* @__PURE__ */ e.createElement("div", { className: `${l}__legal` }, /* @__PURE__ */ e.createElement("span", { className: `${l}__copyright` }, "© ", p, " Pantheon Systems, Inc."), o.map((t, n) =>
|
|
11381
|
-
},
|
|
11416
|
+
}, /* @__PURE__ */ e.createElement("div", { className: f }, n && /* @__PURE__ */ e.createElement("div", { className: `${l}__content` }, n), /* @__PURE__ */ e.createElement("div", { className: `${l}__legal` }, /* @__PURE__ */ e.createElement("span", { className: `${l}__copyright` }, "© ", p, " Pantheon Systems, Inc."), o.map((t, n) => bo(t) ? /* @__PURE__ */ e.createElement(e.Fragment, { key: t }, yo[t]) : /* @__PURE__ */ e.createElement(e.Fragment, { key: n }, t)))));
|
|
11417
|
+
}, So = ({ className: t, option: n, ...r }) => {
|
|
11382
11418
|
let i = "pds-site-option-display", a = n.type ? Kn[n.type] : "boltSolid", o = h(null), [s] = qe(o), c = s.width / 16 - 7.5, l, u;
|
|
11383
11419
|
n.status === "active" && (l = "Active", u = "success"), n.status === "frozen" && (l = "Frozen", u = "frozen"), n.status === "restricted" && (l = "Restricted", u = "critical");
|
|
11384
11420
|
let d = /* @__PURE__ */ e.createElement(Tn, {
|
|
@@ -11401,7 +11437,7 @@ var Xr = {
|
|
|
11401
11437
|
className: `${i}__status`,
|
|
11402
11438
|
style: { pointerEvents: "none" }
|
|
11403
11439
|
}, d));
|
|
11404
|
-
},
|
|
11440
|
+
}, Co = ({ className: t, disabled: n = !1, id: r, isLoading: i = !1, label: a = "Search sites", labelStrings: o = {
|
|
11405
11441
|
clearButton: "Clear input text",
|
|
11406
11442
|
inputInstructions: "Type to search options"
|
|
11407
11443
|
}, loadingText: s = "Loading results...", noResultsText: c = "No results found", onFocus: l, onOptionSelect: u, placeholder: d = "Search sites", siteList: f, ...p }) => {
|
|
@@ -11413,7 +11449,7 @@ var Xr = {
|
|
|
11413
11449
|
id: n,
|
|
11414
11450
|
label: i,
|
|
11415
11451
|
value: r ?? i,
|
|
11416
|
-
optionDisplay: /* @__PURE__ */ e.createElement(
|
|
11452
|
+
optionDisplay: /* @__PURE__ */ e.createElement(So, { option: t }),
|
|
11417
11453
|
siteData: t
|
|
11418
11454
|
};
|
|
11419
11455
|
});
|
|
@@ -11442,7 +11478,7 @@ var Xr = {
|
|
|
11442
11478
|
};
|
|
11443
11479
|
//#endregion
|
|
11444
11480
|
//#region src/components/SortableList/sortable-utils.ts
|
|
11445
|
-
function
|
|
11481
|
+
function wo(e, t, n = null, r = 0, i = []) {
|
|
11446
11482
|
return e.reduce((e, a, o) => {
|
|
11447
11483
|
let s = !!a.children?.length, c = t.has(a.id);
|
|
11448
11484
|
return e.push({
|
|
@@ -11454,10 +11490,10 @@ function So(e, t, n = null, r = 0, i = []) {
|
|
|
11454
11490
|
index: o,
|
|
11455
11491
|
isExpanded: c,
|
|
11456
11492
|
parentId: n
|
|
11457
|
-
}), s && c && a.children && e.push(...
|
|
11493
|
+
}), s && c && a.children && e.push(...wo(a.children, t, a.id, r + 1, [...i, a.id])), e;
|
|
11458
11494
|
}, []);
|
|
11459
11495
|
}
|
|
11460
|
-
function
|
|
11496
|
+
function To(e) {
|
|
11461
11497
|
let t = /* @__PURE__ */ new Map(), n = new Set(e.map((e) => e.id)), r = [];
|
|
11462
11498
|
for (let i of e) {
|
|
11463
11499
|
let e = i.data.children ?? [], a = e.length > 0 && !e.some((e) => n.has(e.id)), o = {
|
|
@@ -11470,28 +11506,28 @@ function Co(e) {
|
|
|
11470
11506
|
e && (e.children || (e.children = []), e.children.push(o));
|
|
11471
11507
|
}
|
|
11472
11508
|
}
|
|
11473
|
-
return
|
|
11509
|
+
return Eo(r);
|
|
11474
11510
|
}
|
|
11475
|
-
function
|
|
11511
|
+
function Eo(e) {
|
|
11476
11512
|
return e.map((e) => {
|
|
11477
11513
|
if (e.children?.length) return {
|
|
11478
11514
|
...e,
|
|
11479
|
-
children:
|
|
11515
|
+
children: Eo(e.children)
|
|
11480
11516
|
};
|
|
11481
11517
|
let { children: t, ...n } = e;
|
|
11482
11518
|
return n;
|
|
11483
11519
|
});
|
|
11484
11520
|
}
|
|
11485
|
-
function
|
|
11521
|
+
function Do(e, t) {
|
|
11486
11522
|
for (let n of e) {
|
|
11487
11523
|
if (n.id === t) return n;
|
|
11488
11524
|
if (n.children) {
|
|
11489
|
-
let e =
|
|
11525
|
+
let e = Do(n.children, t);
|
|
11490
11526
|
if (e) return e;
|
|
11491
11527
|
}
|
|
11492
11528
|
}
|
|
11493
11529
|
}
|
|
11494
|
-
function
|
|
11530
|
+
function Oo(e, t, n, r, i, a, o) {
|
|
11495
11531
|
let s = e.findIndex((e) => e.id === n);
|
|
11496
11532
|
if (s === -1) return 0;
|
|
11497
11533
|
let c = e[s], l = Math.round(r / i), u = e.find((e) => e.id === t), d = (o ?? u?.depth ?? c.depth) + l, f = e[s - 1], p = f ? f.depth + 1 : 0, m = e.slice(s + 1).find((e) => e.id !== t && !e.ancestorIds.includes(t) && !e.ancestorIds.includes(n)), h = m ? m.depth : 0;
|
|
@@ -11499,7 +11535,7 @@ function Eo(e, t, n, r, i, a, o) {
|
|
|
11499
11535
|
}
|
|
11500
11536
|
//#endregion
|
|
11501
11537
|
//#region src/components/SortableList/SortableListHeader.tsx
|
|
11502
|
-
var
|
|
11538
|
+
var ko = ({ children: t, className: n, columns: r, ...i }) => {
|
|
11503
11539
|
if (!r && !t) return null;
|
|
11504
11540
|
let a = r ? {
|
|
11505
11541
|
display: "grid",
|
|
@@ -11520,13 +11556,13 @@ var Do = ({ children: t, className: n, columns: r, ...i }) => {
|
|
|
11520
11556
|
};
|
|
11521
11557
|
//#endregion
|
|
11522
11558
|
//#region src/components/SortableList/useSortableTree.ts
|
|
11523
|
-
function
|
|
11559
|
+
function Ao({ defaultItems: e, isDragEnabled: t = !1, items: n, onReorder: r }) {
|
|
11524
11560
|
let i = n !== void 0, [a, o] = g(() => n ?? e ?? []), [s, l] = g(/* @__PURE__ */ new Set()), u = h(null), d = h(t);
|
|
11525
11561
|
t && !d.current && (u.current = {
|
|
11526
11562
|
items: i ? n : a,
|
|
11527
11563
|
expandedIds: s
|
|
11528
|
-
}), t || (u.current = null), d.current = t, process.env.NODE_ENV !== "production" && n !== void 0 && e !== void 0 &&
|
|
11529
|
-
let f = i ? n : a, p = m(() =>
|
|
11564
|
+
}), t || (u.current = null), d.current = t, process.env.NODE_ENV !== "production" && n !== void 0 && e !== void 0 && Mo("SortableList received both `items` and `defaultItems`. `items` will be used and `defaultItems` will be ignored.");
|
|
11565
|
+
let f = i ? n : a, p = m(() => wo(f, s), [f, s]), _ = m(() => p.map((e) => e.id), [p]), v = c((e) => {
|
|
11530
11566
|
l((t) => {
|
|
11531
11567
|
let n = new Set(t);
|
|
11532
11568
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
@@ -11544,7 +11580,7 @@ function Oo({ defaultItems: e, isDragEnabled: t = !1, items: n, onReorder: r })
|
|
|
11544
11580
|
}, []),
|
|
11545
11581
|
flatNodes: p,
|
|
11546
11582
|
handleReorder: c((e) => {
|
|
11547
|
-
let t =
|
|
11583
|
+
let t = To(e);
|
|
11548
11584
|
i || o(t), r?.(t);
|
|
11549
11585
|
}, [i, r]),
|
|
11550
11586
|
resetToSnapshot: c(() => {
|
|
@@ -11556,24 +11592,24 @@ function Oo({ defaultItems: e, isDragEnabled: t = !1, items: n, onReorder: r })
|
|
|
11556
11592
|
toggleExpand: v
|
|
11557
11593
|
};
|
|
11558
11594
|
}
|
|
11559
|
-
var
|
|
11560
|
-
function
|
|
11561
|
-
|
|
11595
|
+
var jo = /* @__PURE__ */ new Set();
|
|
11596
|
+
function Mo(e) {
|
|
11597
|
+
jo.has(e) || (jo.add(e), console.warn(e));
|
|
11562
11598
|
}
|
|
11563
11599
|
//#endregion
|
|
11564
11600
|
//#region src/components/SortableList/SortableList.tsx
|
|
11565
|
-
var
|
|
11601
|
+
var No = 24, Po = { droppable: { strategy: Ze.Always } }, Fo = o(function({ children: n, className: r, columns: i, defaultItems: a, getItemLabel: o = (e) => String(e.id), isDragEnabled: l, isItemLocked: u = () => !1, isNestingLocked: d = () => !1, items: p, maxDepth: _ = 0, onReorder: v, renderRow: y, reorderMode: b = "always", screenReaderInstructions: x, ...S }, C) {
|
|
11566
11602
|
let w = "pds-sortable-list", [T, E] = g(null), D = h(null), [O, k] = g(!1), A = h(!1), [j, M] = g(null), N = h(0), P = h(0), F = h("pointer"), I = h(0), L = h(null), [R, z] = g(0), B = h(0), [V, H] = g(0), U = h(0), W = c((e, t) => {
|
|
11567
11603
|
if (_ > 0 && (e.key === "ArrowLeft" || e.key === "ArrowRight")) {
|
|
11568
11604
|
e.preventDefault();
|
|
11569
11605
|
let n = e.key === "ArrowRight" ? 1 : -1, r = B.current, i = Math.max(-_, Math.min(_, r + n)), a = i - r;
|
|
11570
11606
|
return B.current = i, z(i), {
|
|
11571
|
-
x: t.currentCoordinates.x + a *
|
|
11607
|
+
x: t.currentCoordinates.x + a * No,
|
|
11572
11608
|
y: t.currentCoordinates.y
|
|
11573
11609
|
};
|
|
11574
11610
|
}
|
|
11575
11611
|
return rt(e, t);
|
|
11576
|
-
}, [_]), G = b === "always" || b === "toggle" && (l ?? !1), { currentItems: K, expandItem: q, flatNodes: J, handleReorder: ee, resetToSnapshot: te, sortableIds: ne, toggleExpand: re } =
|
|
11612
|
+
}, [_]), G = b === "always" || b === "toggle" && (l ?? !1), { currentItems: K, expandItem: q, flatNodes: J, handleReorder: ee, resetToSnapshot: te, sortableIds: ne, toggleExpand: re } = Ao({
|
|
11577
11613
|
defaultItems: a,
|
|
11578
11614
|
isDragEnabled: G,
|
|
11579
11615
|
items: p,
|
|
@@ -11588,7 +11624,7 @@ var jo = 24, Mo = { droppable: { strategy: Ze.Always } }, No = o(function({ chil
|
|
|
11588
11624
|
J,
|
|
11589
11625
|
_,
|
|
11590
11626
|
se
|
|
11591
|
-
]),
|
|
11627
|
+
]), ce = c((e) => j && Y(j) ? null : at(e), [Y, j]), X = m(() => {
|
|
11592
11628
|
if (!T || !j || oe.size === 0 || T === j || Y(j)) return /* @__PURE__ */ new Set();
|
|
11593
11629
|
let e = J.findIndex((e) => e.id === T), t = J.findIndex((e) => e.id === j);
|
|
11594
11630
|
if (e === -1 || t === -1) return /* @__PURE__ */ new Set();
|
|
@@ -11600,9 +11636,9 @@ var jo = 24, Mo = { droppable: { strategy: Ze.Always } }, No = o(function({ chil
|
|
|
11600
11636
|
Y,
|
|
11601
11637
|
oe,
|
|
11602
11638
|
j
|
|
11603
|
-
]).size > 0, le = m(() => T ? J.find((e) => e.id === T) ?? null : null, [T, J]), ue = m(() => T ?
|
|
11639
|
+
]).size > 0, le = m(() => T ? J.find((e) => e.id === T) ?? null : null, [T, J]), ue = m(() => T ? Do(K, String(T)) ?? null : null, [T, K]), de = m(() => {
|
|
11604
11640
|
let e = le?.depth ?? 0;
|
|
11605
|
-
return !T || !j || O || _ === 0 ? e :
|
|
11641
|
+
return !T || !j || O || _ === 0 ? e : Oo(J, String(T), String(j), V * No, No, _);
|
|
11606
11642
|
}, [
|
|
11607
11643
|
T,
|
|
11608
11644
|
le,
|
|
@@ -11614,7 +11650,7 @@ var jo = 24, Mo = { droppable: { strategy: Ze.Always } }, No = o(function({ chil
|
|
|
11614
11650
|
]), fe = m(() => {
|
|
11615
11651
|
if (!T || O || de === 0 || j && Y(j)) return null;
|
|
11616
11652
|
let e = J.findIndex((e) => e.id === T);
|
|
11617
|
-
return e === -1 ? null :
|
|
11653
|
+
return e === -1 ? null : Io(J, e, de);
|
|
11618
11654
|
}, [
|
|
11619
11655
|
T,
|
|
11620
11656
|
J,
|
|
@@ -11660,19 +11696,19 @@ var jo = 24, Mo = { droppable: { strategy: Ze.Always } }, No = o(function({ chil
|
|
|
11660
11696
|
}, [J, oe]), ge = c((e) => {
|
|
11661
11697
|
let t = e.delta.x;
|
|
11662
11698
|
if (P.current = t, A.current || _ === 0) return;
|
|
11663
|
-
let n = Math.floor(t /
|
|
11664
|
-
(n > r || n < r && t < r *
|
|
11699
|
+
let n = Math.floor(t / No), r = U.current;
|
|
11700
|
+
(n > r || n < r && t < r * No - No * .4) && (U.current = n, H(n));
|
|
11665
11701
|
}, [_]), _e = c((e) => {
|
|
11666
11702
|
let { active: t, over: n } = e, r = A.current, i = B.current, a = U.current;
|
|
11667
11703
|
E(null), D.current = null, k(!1), A.current = !1, M(null), U.current = 0, H(0), L.current && (q(L.current), L.current = null);
|
|
11668
|
-
let o = J.findIndex((e) => e.id === t.id), s = r ? i *
|
|
11704
|
+
let o = J.findIndex((e) => e.id === t.id), s = r ? i * No : a * No, c = !n || t.id === n.id, l = n?.id ?? null;
|
|
11669
11705
|
if (r && i > 0 && c && o > 0 && (l = J[o - 1].id), !l || t.id === l) {
|
|
11670
11706
|
if (o === -1) return;
|
|
11671
11707
|
let e = J[o];
|
|
11672
11708
|
if (!e) return;
|
|
11673
|
-
let n =
|
|
11709
|
+
let n = Oo(J, String(t.id), String(t.id), s, No, _);
|
|
11674
11710
|
if (n === e.depth) return;
|
|
11675
|
-
let r = [...J], [i] = r.splice(o, 1), a =
|
|
11711
|
+
let r = [...J], [i] = r.splice(o, 1), a = Io(r, o, n);
|
|
11676
11712
|
if (a && se.has(a)) return;
|
|
11677
11713
|
let c = {
|
|
11678
11714
|
...i,
|
|
@@ -11694,9 +11730,9 @@ var jo = 24, Mo = { droppable: { strategy: Ze.Always } }, No = o(function({ chil
|
|
|
11694
11730
|
let e = J[u];
|
|
11695
11731
|
g = Math.min(e.depth + 1, _), v = String(l);
|
|
11696
11732
|
} else {
|
|
11697
|
-
g =
|
|
11733
|
+
g = Oo(d, String(t.id), String(l), s, No, _, p.depth);
|
|
11698
11734
|
let e = d[h];
|
|
11699
|
-
v = e && e.depth === g - 1 ? String(l) :
|
|
11735
|
+
v = e && e.depth === g - 1 ? String(l) : Io(d, h, g);
|
|
11700
11736
|
}
|
|
11701
11737
|
if (v && se.has(v)) return;
|
|
11702
11738
|
let y = {
|
|
@@ -11719,24 +11755,24 @@ var jo = 24, Mo = { droppable: { strategy: Ze.Always } }, No = o(function({ chil
|
|
|
11719
11755
|
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 && (q(L.current), L.current = null);
|
|
11720
11756
|
}, [q]), ye = m(() => ({
|
|
11721
11757
|
onDragStart({ active: e }) {
|
|
11722
|
-
let t = J.find((t) => t.id === e.id), n =
|
|
11758
|
+
let t = J.find((t) => t.id === e.id), n = Do(K, String(e.id));
|
|
11723
11759
|
return `Picked up ${n ? o(n) : String(e.id)}. Current position: ${t ? J.indexOf(t) + 1 : "?"} of ${J.length} at depth ${t?.depth ?? 0}.`;
|
|
11724
11760
|
},
|
|
11725
11761
|
onDragOver({ active: e, over: t }) {
|
|
11726
11762
|
if (!t) return;
|
|
11727
11763
|
let n = J.findIndex((e) => e.id === t.id);
|
|
11728
11764
|
if (n === -1) return;
|
|
11729
|
-
let r =
|
|
11765
|
+
let r = Do(K, String(e.id)), i = r ? o(r) : String(e.id), a = Oo(J, String(e.id), String(t.id), P.current, No, _);
|
|
11730
11766
|
return `Moving ${i}. Target position: ${n + 1} of ${J.length} at depth ${a}.`;
|
|
11731
11767
|
},
|
|
11732
11768
|
onDragEnd({ active: e, over: t }) {
|
|
11733
|
-
let n =
|
|
11769
|
+
let n = Do(K, String(e.id)), r = n ? o(n) : String(e.id);
|
|
11734
11770
|
if (!t || e.id === t.id) return `${r} dropped. No change in position.`;
|
|
11735
|
-
let i = J.findIndex((e) => e.id === t.id), a =
|
|
11771
|
+
let i = J.findIndex((e) => e.id === t.id), a = Oo(J, String(e.id), String(t.id), P.current, No, _);
|
|
11736
11772
|
return `${r} dropped at position ${i + 1} of ${J.length} at depth ${a}.`;
|
|
11737
11773
|
},
|
|
11738
11774
|
onDragCancel({ active: e }) {
|
|
11739
|
-
let t = J.find((t) => t.id === e.id), n =
|
|
11775
|
+
let t = J.find((t) => t.id === e.id), n = Do(K, String(e.id));
|
|
11740
11776
|
return `Sorting cancelled. ${n ? o(n) : String(e.id)} returned to position ${t ? J.indexOf(t) + 1 : "?"} of ${J.length}.`;
|
|
11741
11777
|
}
|
|
11742
11778
|
}), [
|
|
@@ -11744,14 +11780,14 @@ var jo = 24, Mo = { droppable: { strategy: Ze.Always } }, No = o(function({ chil
|
|
|
11744
11780
|
J,
|
|
11745
11781
|
o,
|
|
11746
11782
|
_
|
|
11747
|
-
]), be = { columns: i }, xe = t.map(n, (t) => s(t) && t.type ===
|
|
11783
|
+
]), be = { columns: i }, xe = t.map(n, (t) => s(t) && t.type === ko ? e.cloneElement(t, be) : t);
|
|
11748
11784
|
return /* @__PURE__ */ e.createElement(Je, {
|
|
11749
11785
|
accessibility: {
|
|
11750
11786
|
announcements: ye,
|
|
11751
11787
|
...x ? { screenReaderInstructions: { draggable: x } } : {}
|
|
11752
11788
|
},
|
|
11753
11789
|
collisionDetection: me,
|
|
11754
|
-
measuring:
|
|
11790
|
+
measuring: Po,
|
|
11755
11791
|
onDragCancel: ve,
|
|
11756
11792
|
onDragEnd: _e,
|
|
11757
11793
|
onDragMove: ge,
|
|
@@ -11760,7 +11796,7 @@ var jo = 24, Mo = { droppable: { strategy: Ze.Always } }, No = o(function({ chil
|
|
|
11760
11796
|
sensors: ie
|
|
11761
11797
|
}, /* @__PURE__ */ e.createElement(nt, {
|
|
11762
11798
|
items: ne,
|
|
11763
|
-
strategy:
|
|
11799
|
+
strategy: ce
|
|
11764
11800
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
11765
11801
|
className: Z([
|
|
11766
11802
|
w,
|
|
@@ -11803,7 +11839,7 @@ var jo = 24, Mo = { droppable: { strategy: Ze.Always } }, No = o(function({ chil
|
|
|
11803
11839
|
}) : /* @__PURE__ */ e.createElement("div", { key: t.id }, r);
|
|
11804
11840
|
}))), /* @__PURE__ */ e.createElement(Ye, null, T && ue ? /* @__PURE__ */ e.createElement("div", { className: Z([
|
|
11805
11841
|
"pds-sortable-list pds-sortable-list--overlay",
|
|
11806
|
-
|
|
11842
|
+
X ? "pds-sortable-list--overlay-invalid" : null,
|
|
11807
11843
|
O ? "pds-sortable-list--overlay-keyboard" : null
|
|
11808
11844
|
]) }, (() => {
|
|
11809
11845
|
let t = le?.depth ?? 0, n = O ? Math.max(0, Math.min(_, t + R)) : t, r = {
|
|
@@ -11826,14 +11862,14 @@ var jo = 24, Mo = { droppable: { strategy: Ze.Always } }, No = o(function({ chil
|
|
|
11826
11862
|
return s(a) ? e.cloneElement(a, o) : a;
|
|
11827
11863
|
})()) : null));
|
|
11828
11864
|
});
|
|
11829
|
-
function
|
|
11865
|
+
function Io(e, t, n) {
|
|
11830
11866
|
if (n === 0) return null;
|
|
11831
11867
|
for (let r = t - 1; r >= 0; r--) if (e[r].depth === n - 1) return e[r].id;
|
|
11832
11868
|
return null;
|
|
11833
11869
|
}
|
|
11834
11870
|
//#endregion
|
|
11835
11871
|
//#region src/components/SortableList/SortableRow.tsx
|
|
11836
|
-
var
|
|
11872
|
+
var Lo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a = !1, id: o, isDragActive: s = !1, isDragging: c = !1, isDropTarget: l = !1, isExpanded: u = !1, isLocked: d = !1, isProjectedParent: f = !1, onToggleExpand: p, projectedDepthDelta: m, ...h }) => {
|
|
11837
11873
|
let { attributes: g, isDragging: _, listeners: v, setNodeRef: y, transform: b, transition: x } = it({
|
|
11838
11874
|
attributes: {
|
|
11839
11875
|
role: "listitem",
|
|
@@ -11888,7 +11924,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11888
11924
|
key: t.id,
|
|
11889
11925
|
className: `${w}__cell`
|
|
11890
11926
|
}, /* @__PURE__ */ e.createElement("span", { className: "visually-hidden" }, t.label, ": "), j[t.id] ?? null)) : t));
|
|
11891
|
-
},
|
|
11927
|
+
}, Ro = ({ actionCallback: t, actionIcon: n = "barsFilter", actionLabel: r, className: i, description: a, icon: o, iconColor: s = "neutral", isActive: c = !1, isLoading: l = !1, stat: u, title: f, ...p }) => {
|
|
11892
11928
|
let m = "pds-stat-panel", h = s === "neutral" ? null : `${m}--${s}`, g = c ? `${m}--active` : null, _ = d(), v = n && r && t;
|
|
11893
11929
|
return /* @__PURE__ */ e.createElement("div", {
|
|
11894
11930
|
"aria-labelledby": _,
|
|
@@ -11924,11 +11960,11 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11924
11960
|
size: { width: 6 },
|
|
11925
11961
|
textSize: "xl"
|
|
11926
11962
|
}) : u && /* @__PURE__ */ e.createElement("span", { className: `${m}__stat` }, u)), a && /* @__PURE__ */ e.createElement("p", { className: `${m}__description` }, a));
|
|
11927
|
-
},
|
|
11963
|
+
}, zo = [
|
|
11928
11964
|
"default",
|
|
11929
11965
|
"working",
|
|
11930
11966
|
"checked"
|
|
11931
|
-
],
|
|
11967
|
+
], Bo = ({ alignment: t = "left", className: n, componentWidth: r, labelStrings: i = {}, lastChecked: a, onCheck: o, state: s = "default", ...c }) => {
|
|
11932
11968
|
let l = {
|
|
11933
11969
|
checkForUpdates: "Check for updates",
|
|
11934
11970
|
checking: "Checking...",
|
|
@@ -11975,7 +12011,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11975
12011
|
triggerIconColor: "default",
|
|
11976
12012
|
triggerIconSize: "s"
|
|
11977
12013
|
}), t === "left" && g));
|
|
11978
|
-
},
|
|
12014
|
+
}, Vo = ({ className: t, label: n = null, linkContent: r, type: i = "neutral", ...a }) => {
|
|
11979
12015
|
let o = "pds-status-indicator", c = `${o}--${i}`, l = /* @__PURE__ */ e.createElement(e.Fragment, null, i === "working" ? /* @__PURE__ */ e.createElement(wn, {
|
|
11980
12016
|
className: `${o}__spinner`,
|
|
11981
12017
|
size: "m"
|
|
@@ -11992,7 +12028,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
11992
12028
|
]),
|
|
11993
12029
|
...a
|
|
11994
12030
|
}, r ? d : l);
|
|
11995
|
-
},
|
|
12031
|
+
}, Ho = ({ className: t, contentAlignment: n = "indented", layoutDirection: r = "vertical", steps: i, ...a }) => {
|
|
11996
12032
|
let o = "pds-step-list", s = `${o}--${n}`, c = r === "horizontal" ? `${o}--horizontal` : "", l = i.map(({ content: t, header: r }, i) => {
|
|
11997
12033
|
let a = /* @__PURE__ */ e.createElement("div", { className: `${o}__number` }, /* @__PURE__ */ e.createElement("span", null, i + 1)), s = /* @__PURE__ */ e.createElement("div", { className: `${o}__header` }, r), c = t ? /* @__PURE__ */ e.createElement("div", { className: `${o}__content` }, t) : null, l = `${o}__step`;
|
|
11998
12034
|
return /* @__PURE__ */ e.createElement("li", {
|
|
@@ -12010,7 +12046,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12010
12046
|
style: r === "horizontal" ? { "--step-list-columns": i.length } : void 0,
|
|
12011
12047
|
...a
|
|
12012
12048
|
}, l);
|
|
12013
|
-
},
|
|
12049
|
+
}, Uo = ({ className: t, steps: n, translatableLabels: r = {
|
|
12014
12050
|
step: "Step",
|
|
12015
12051
|
completed: "completed",
|
|
12016
12052
|
hasError: "has an error",
|
|
@@ -12074,7 +12110,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12074
12110
|
key: t.id,
|
|
12075
12111
|
className: `${o}__step`,
|
|
12076
12112
|
id: `${t.id}--mobile`
|
|
12077
|
-
}, /* @__PURE__ */ e.createElement("div", { className: `${o}__progress-indicator` }, /* @__PURE__ */ e.createElement(
|
|
12113
|
+
}, /* @__PURE__ */ e.createElement("div", { className: `${o}__progress-indicator` }, /* @__PURE__ */ e.createElement(mo, {
|
|
12078
12114
|
innerLabel: n,
|
|
12079
12115
|
label: "Step progress",
|
|
12080
12116
|
percentage: i,
|
|
@@ -12100,7 +12136,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12100
12136
|
"data-steps": u,
|
|
12101
12137
|
...i
|
|
12102
12138
|
}, /* @__PURE__ */ e.createElement("div", { className: `${o}__steps` }, p)));
|
|
12103
|
-
},
|
|
12139
|
+
}, Wo = ({ _isFirstStep: t, backButton: n, forwardButton: r, hasError: i, id: a, isComplete: o, isCurrent: s, label: c, stepContent: l, ...u }) => {
|
|
12104
12140
|
let d = "pds-vert-stepper", f = `${d}__step`, p = [f];
|
|
12105
12141
|
return s && p.push(`${f}--current`), o && p.push(`${f}--complete`), i && p.push(`${f}--error`), /* @__PURE__ */ e.createElement("li", {
|
|
12106
12142
|
className: Z([...p]),
|
|
@@ -12126,14 +12162,14 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12126
12162
|
size: "s",
|
|
12127
12163
|
variant: "highlight"
|
|
12128
12164
|
})))));
|
|
12129
|
-
},
|
|
12165
|
+
}, Go = ({ className: t, labelStrings: n = {
|
|
12130
12166
|
step: "Step",
|
|
12131
12167
|
completed: "completed",
|
|
12132
12168
|
hasError: "has an error"
|
|
12133
12169
|
}, steps: r, ...i }) => {
|
|
12134
12170
|
let a = "pds-vert-stepper", o = r.length, s = r.findIndex((e) => e.isCurrent), c = r.map((t, r) => {
|
|
12135
12171
|
let i = r + 1, a = r === s, c = r === 0, l = t.isComplete || !1, u = t.hasError && a, d = `${n.step} ${i}`;
|
|
12136
|
-
return l && (d = `${n.step} ${i}, ${n.completed}`), u && (d = `${n.step} ${i}, ${n.hasError}`), /* @__PURE__ */ e.createElement(
|
|
12172
|
+
return l && (d = `${n.step} ${i}, ${n.completed}`), u && (d = `${n.step} ${i}, ${n.hasError}`), /* @__PURE__ */ e.createElement(Wo, {
|
|
12137
12173
|
key: `s${i}`,
|
|
12138
12174
|
_isFirstStep: c,
|
|
12139
12175
|
"aria-current": a ? "step" : null,
|
|
@@ -12154,7 +12190,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12154
12190
|
className: Z([a, t ?? ""]),
|
|
12155
12191
|
...i
|
|
12156
12192
|
}, /* @__PURE__ */ e.createElement("ol", { className: `${a}__steps` }, r && c));
|
|
12157
|
-
},
|
|
12193
|
+
}, Ko = () => {
|
|
12158
12194
|
let e = typeof window < "u", t = (e) => e >= 1440 ? "xl" : e >= 1280 ? "lg" : e >= 768 ? "md" : "sm", [n, r] = g(e ? t(window.innerWidth) : "lg");
|
|
12159
12195
|
return u(() => {
|
|
12160
12196
|
if (!e) return;
|
|
@@ -12165,8 +12201,8 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12165
12201
|
window.removeEventListener("resize", n);
|
|
12166
12202
|
};
|
|
12167
12203
|
}, []), n;
|
|
12168
|
-
},
|
|
12169
|
-
let Y = "pds-table",
|
|
12204
|
+
}, qo = ({ className: t, closeDetailPanelLabel: n = "Close detail panel", columns: r, currentPage: i, defaultSortKey: a, defaultSortOrder: o = "asc", detailPanelNav: s = !0, detailPanelTitle: c, detailPanelWidth: l, emptyState: f, emptyStateHeading: p = "No results found.", emptyStateMessage: _, footer: v, getDetailPanelPositionLabel: y = (e, t) => `${e} of ${t}`, getPageSizeLabel: b = (e) => `Show ${e} rows per page`, getRowClassName: x, getRowId: S, getRowSelectDisabledReason: C, getSelectRowLabel: w = (e, t) => `Select row ${t}`, getSortLabel: T = (e) => `Sort by ${e}`, hasMobileCards: E = !1, hasMobileDetailSheet: D = !0, inspectedRowId: O, isLoading: k = !1, isRowSelectable: A = () => !0, itemsPerPage: j, loadingRowCount: M = 5, maxHeight: N, minHeight: P, nextDetailPanelRowLabel: F = "Next row", onDetailPanelNext: I, onDetailPanelPrev: L, onPageChange: R, onPageSizeChange: z, onRowInspect: B, onRowSelectionChange: V, onSort: H, pageSizeOptions: U, pageSizeSelectLabel: W = "Rows per page", paginationLabels: G, panel: K, prevDetailPanelRowLabel: q = "Previous row", renderDetailPanel: J, renderDetailPanelFooter: ee, rowData: te, selectAllLabel: ne = "Select all rows", selectedRows: re, sortKey: ie, sortOrder: ae, totalItemCount: oe, ...se }) => {
|
|
12205
|
+
let Y = "pds-table", ce = d(), X = d(), le = h(null), ue = Ko() === "sm" && E, de = K && !ue, fe = r.some((e) => e.cardVisible) ? r.filter((e) => e.cardVisible) : r.slice(0, 1), pe = J !== void 0 || B === void 0 && D, me = J !== void 0 || B !== void 0 || D, he = H !== void 0, ge = R !== void 0, _e = z !== void 0, ve = ge || j !== void 0 || U !== void 0, ye = te.length > 0 || ge && (oe ?? 0) > 0, [be, xe] = g({
|
|
12170
12206
|
key: a ?? "",
|
|
12171
12207
|
order: a === void 0 ? "asc" : o
|
|
12172
12208
|
}), Se = m(() => {
|
|
@@ -12319,7 +12355,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12319
12355
|
}, Ie && /* @__PURE__ */ e.createElement("td", { className: "pds-table__checkbox-cell" }, /* @__PURE__ */ e.createElement(si, {
|
|
12320
12356
|
checked: Be.has(i),
|
|
12321
12357
|
disabled: !s,
|
|
12322
|
-
id: `${
|
|
12358
|
+
id: `${X}-row-${i}`,
|
|
12323
12359
|
inputProps: c ? { title: c } : void 0,
|
|
12324
12360
|
label: u,
|
|
12325
12361
|
onChange: () => ut(i),
|
|
@@ -12390,7 +12426,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12390
12426
|
...se
|
|
12391
12427
|
}, /* @__PURE__ */ e.createElement("thead", null, /* @__PURE__ */ e.createElement("tr", null, Ie && /* @__PURE__ */ e.createElement("th", { className: "pds-table__checkbox-cell" }, /* @__PURE__ */ e.createElement(si, {
|
|
12392
12428
|
checked: ct,
|
|
12393
|
-
id:
|
|
12429
|
+
id: X,
|
|
12394
12430
|
indeterminate: lt,
|
|
12395
12431
|
label: ne,
|
|
12396
12432
|
onChange: dt,
|
|
@@ -12414,7 +12450,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12414
12450
|
size: "m"
|
|
12415
12451
|
})))) : /* @__PURE__ */ e.createElement("span", null, t.header))))), /* @__PURE__ */ e.createElement("tbody", null, k ? Array.from({ length: M }, (e, t) => ft(t)) : rt.length === 0 ? pt() : rt.map((e, t) => mt(e, t))))), ve && !k && ye && /* @__PURE__ */ e.createElement("div", { className: Z(["pds-table-wrapper__pagination", ue ? "pds-table-wrapper__pagination--center" : null]) }, U && U.length > 0 && /* @__PURE__ */ e.createElement(Cr, {
|
|
12416
12452
|
autoWidth: !0,
|
|
12417
|
-
id:
|
|
12453
|
+
id: ce,
|
|
12418
12454
|
label: W,
|
|
12419
12455
|
onOptionSelect: (e) => Fe(Number(e.value)),
|
|
12420
12456
|
options: U.map((e) => ({
|
|
@@ -12478,8 +12514,8 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12478
12514
|
size: "s",
|
|
12479
12515
|
variant: "standard"
|
|
12480
12516
|
}))))));
|
|
12481
|
-
return de ? /* @__PURE__ */ e.createElement(
|
|
12482
|
-
},
|
|
12517
|
+
return de ? /* @__PURE__ */ e.createElement(Qa, { padding: "none" }, xt) : xt;
|
|
12518
|
+
}, Jo = [
|
|
12483
12519
|
" ",
|
|
12484
12520
|
"/",
|
|
12485
12521
|
".",
|
|
@@ -12497,7 +12533,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12497
12533
|
"=",
|
|
12498
12534
|
"|",
|
|
12499
12535
|
"~"
|
|
12500
|
-
],
|
|
12536
|
+
], Yo = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Xo = (e) => {
|
|
12501
12537
|
let t = [];
|
|
12502
12538
|
return e.forEach((e) => {
|
|
12503
12539
|
let { id: n, innerText: r } = e;
|
|
@@ -12510,18 +12546,18 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12510
12546
|
title: r
|
|
12511
12547
|
});
|
|
12512
12548
|
}), t;
|
|
12513
|
-
},
|
|
12549
|
+
}, Zo = (e, t, n) => {
|
|
12514
12550
|
let [r, i] = g([]);
|
|
12515
12551
|
return u(() => {
|
|
12516
12552
|
let r = `#${e} h2:not(.${t}), #${e} h3:not(.${t})`, a = () => {
|
|
12517
12553
|
let e = Array.from(document.querySelectorAll(r));
|
|
12518
12554
|
e.forEach((e) => {
|
|
12519
|
-
|
|
12520
|
-
e.id.includes(t) && (e.id = e.id.replace(new RegExp(
|
|
12555
|
+
Jo.forEach((t) => {
|
|
12556
|
+
e.id.includes(t) && (e.id = e.id.replace(new RegExp(Yo(t), "g"), "-"));
|
|
12521
12557
|
});
|
|
12522
12558
|
}), e.forEach((e, t) => {
|
|
12523
12559
|
e.id || (e.id = `${n}-item-${t}`);
|
|
12524
|
-
}), i(
|
|
12560
|
+
}), i(Xo(e));
|
|
12525
12561
|
};
|
|
12526
12562
|
a();
|
|
12527
12563
|
let o = document.getElementById(e);
|
|
@@ -12537,7 +12573,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12537
12573
|
t,
|
|
12538
12574
|
n
|
|
12539
12575
|
]), { nestedHeadings: r };
|
|
12540
|
-
},
|
|
12576
|
+
}, Qo = (e, t) => {
|
|
12541
12577
|
let [n, r] = g(void 0), i = h({});
|
|
12542
12578
|
return u(() => {
|
|
12543
12579
|
let n = `#${e} h2:not(.${t}), #${e} h3:not(.${t})`, a = Array.from(document.querySelectorAll(n));
|
|
@@ -12556,7 +12592,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12556
12592
|
o.disconnect(), r(void 0);
|
|
12557
12593
|
};
|
|
12558
12594
|
}, [e, t]), n;
|
|
12559
|
-
},
|
|
12595
|
+
}, $o = ({ activeID: t, baseClass: n, headings: r, onLinkClick: i }) => /* @__PURE__ */ e.createElement("ul", { className: `${n}__list ${n}__list--top-level` }, r.map((r) => /* @__PURE__ */ e.createElement("li", {
|
|
12560
12596
|
key: r.id,
|
|
12561
12597
|
className: `${n}__list-item`
|
|
12562
12598
|
}, /* @__PURE__ */ e.createElement("a", {
|
|
@@ -12572,8 +12608,8 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12572
12608
|
className: Z([`${n}__link`, r.id === t ? `${n}__link--active` : null]),
|
|
12573
12609
|
href: `#${r.id}`,
|
|
12574
12610
|
onClick: (e) => i(e, r.id)
|
|
12575
|
-
}, r.title))))))),
|
|
12576
|
-
let u = "pds-toc", { nestedHeadings: f } =
|
|
12611
|
+
}, r.title))))))), es = ({ appendIds: t = !1, ariaLabel: n = "Table of contents", className: r, headingLevel: i = "h2", headingText: a = "Table of contents", ignoreClass: o = "pds-toc-ignore", showHeading: s = !1, sourceID: c = "pds-toc-source", ...l }) => {
|
|
12612
|
+
let u = "pds-toc", { nestedHeadings: f } = Zo(c, o, d()), p = Qo(c, o), m = (e) => {
|
|
12577
12613
|
typeof window < "u" && window.location.hash !== `#${e}` && window.history.pushState({}, "", `#${e}`);
|
|
12578
12614
|
}, h = (e) => {
|
|
12579
12615
|
document.querySelector(`#${e}`)?.scrollIntoView({
|
|
@@ -12591,13 +12627,13 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12591
12627
|
baseClass: u,
|
|
12592
12628
|
className: `${s ? "" : "visually-hidden"}`,
|
|
12593
12629
|
level: i
|
|
12594
|
-
}, a), /* @__PURE__ */ e.createElement(
|
|
12630
|
+
}, a), /* @__PURE__ */ e.createElement($o, {
|
|
12595
12631
|
activeID: p,
|
|
12596
12632
|
baseClass: u,
|
|
12597
12633
|
headings: f,
|
|
12598
12634
|
onLinkClick: g
|
|
12599
12635
|
}));
|
|
12600
|
-
},
|
|
12636
|
+
}, ts = ({ ariaLabel: t, className: n, defaultSelected: r = 0, onActiveTabChange: i = () => {}, selectedTab: a, tabs: o, ...s }) => {
|
|
12601
12637
|
let c = "pds-tabs", [l, d] = g(a ?? r);
|
|
12602
12638
|
u(() => {
|
|
12603
12639
|
a !== void 0 && d(a);
|
|
@@ -12711,7 +12747,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12711
12747
|
className: `${c}__panel-content`,
|
|
12712
12748
|
hidden: o !== l
|
|
12713
12749
|
}, r)))));
|
|
12714
|
-
},
|
|
12750
|
+
}, ns = [
|
|
12715
12751
|
"orange",
|
|
12716
12752
|
"stone",
|
|
12717
12753
|
"gold",
|
|
@@ -12725,7 +12761,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12725
12761
|
"magenta",
|
|
12726
12762
|
"rose",
|
|
12727
12763
|
"red"
|
|
12728
|
-
],
|
|
12764
|
+
], rs = [
|
|
12729
12765
|
"orange-solid",
|
|
12730
12766
|
"teal-solid",
|
|
12731
12767
|
"indigo-solid",
|
|
@@ -12735,14 +12771,14 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12735
12771
|
"lime-solid",
|
|
12736
12772
|
"sky-solid",
|
|
12737
12773
|
"slate-solid"
|
|
12738
|
-
],
|
|
12774
|
+
], is = [
|
|
12739
12775
|
"success-solid",
|
|
12740
12776
|
"warning-solid",
|
|
12741
12777
|
"critical-solid",
|
|
12742
12778
|
"info-solid",
|
|
12743
12779
|
"discovery-solid"
|
|
12744
|
-
],
|
|
12745
|
-
let [f, p] = g(!0), m = "pds-tag", h = c ? `${m}--${c}` : `${m}--${
|
|
12780
|
+
], as = [...rs, ...is], os = [...ns, ...rs], ss = (e) => os[parseInt(v(e), 16) % os.length], cs = (e, t) => e.length > t ? e.slice(0, t) + " ..." : e, ls = ({ className: t, isRemovable: n, linkContent: r, onRemove: i, removeLabel: a = "Remove tag", size: o = "s", tagColor: c, tagLabel: l, truncationLength: u = 18, ...d }) => {
|
|
12781
|
+
let [f, p] = g(!0), m = "pds-tag", h = c ? `${m}--${c}` : `${m}--${ss(l)}`, _ = `${m}--${o}`, v = f ? null : "pds-tag--hide", y = () => {
|
|
12746
12782
|
p((e) => !e);
|
|
12747
12783
|
}, b, x, S;
|
|
12748
12784
|
if (r && !n && s(r)) {
|
|
@@ -12764,7 +12800,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12764
12800
|
}, /* @__PURE__ */ e.createElement("span", {
|
|
12765
12801
|
className: `${m}__label`,
|
|
12766
12802
|
title: l
|
|
12767
|
-
}, u > 0 ?
|
|
12803
|
+
}, u > 0 ? cs(l, u) : l), n ? /* @__PURE__ */ e.createElement("button", {
|
|
12768
12804
|
"aria-label": `${a}: ${l}`,
|
|
12769
12805
|
className: `${m}__remove`,
|
|
12770
12806
|
onClick: () => {
|
|
@@ -12776,7 +12812,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12776
12812
|
iconName: "xmark",
|
|
12777
12813
|
size: "m"
|
|
12778
12814
|
})) : null);
|
|
12779
|
-
},
|
|
12815
|
+
}, us = ({ backgroundColor: t = "transparent", children: n, className: r, padding: i = "none", ...a }) => {
|
|
12780
12816
|
let o = "pds-utility-bar", s = t === "transparent" ? null : `${o}--bg-${t}`, c = i === "none" ? null : `${o}--pad-${i}`, l = gt(n), u = l["items-left"], d = l["items-right"] ?? l.__unslotted;
|
|
12781
12817
|
return /* @__PURE__ */ e.createElement("div", {
|
|
12782
12818
|
className: Z([
|
|
@@ -12787,7 +12823,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12787
12823
|
]),
|
|
12788
12824
|
...a
|
|
12789
12825
|
}, /* @__PURE__ */ e.createElement("div", { className: `${o}__layout` }, /* @__PURE__ */ e.createElement("div", { className: `${o}__items-left` }, u), /* @__PURE__ */ e.createElement("div", { className: `${o}__items-right` }, d)));
|
|
12790
|
-
},
|
|
12826
|
+
}, ds = ({ children: t, className: n, drawerContent: r, drawerProps: i, hasDrawerToggle: o, hasSidebarToggle: s, isDrawerOpen: c = !1, isSidebarCollapsed: l, keyboardShortcuts: d = !0, labels: f, mainBackground: m, mainContentElement: _ = "main", mainContentMaxWidth: v = 1600, mainContentProps: y, onDrawerToggle: b, onSidebarToggle: x, scrollableContent: S, sidebarBackground: C, sidebarCollapsedWidth: w = 4, sidebarExpandedWidth: T = "15%", sidebarExpandedWidthMax: E = 18, sidebarExpandedWidthMin: D = 14.75, sidebarProps: O, topOffset: k, ...A }) => {
|
|
12791
12827
|
let [j, M] = g(l || !1);
|
|
12792
12828
|
u(() => {
|
|
12793
12829
|
M(l || !1);
|
|
@@ -12809,7 +12845,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12809
12845
|
return;
|
|
12810
12846
|
}
|
|
12811
12847
|
M(!j);
|
|
12812
|
-
}, U =
|
|
12848
|
+
}, U = Ko();
|
|
12813
12849
|
u(() => {
|
|
12814
12850
|
U === "sm" && !j ? (V.current = !0, x ? x() : M(!0)) : U !== "sm" && V.current && (V.current = !1, x ? x() : M(!1));
|
|
12815
12851
|
}, [U]);
|
|
@@ -12858,13 +12894,13 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12858
12894
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
12859
12895
|
className: `${N}__main-inner`,
|
|
12860
12896
|
style: { maxWidth: L }
|
|
12861
|
-
}, q)),
|
|
12897
|
+
}, q)), ce = /* @__PURE__ */ e.createElement("div", {
|
|
12862
12898
|
className: `${N}__content-column`,
|
|
12863
12899
|
style: { backgroundColor: m || void 0 }
|
|
12864
12900
|
}, Y, ee && /* @__PURE__ */ e.createElement("div", { className: `${N}__footer` }, /* @__PURE__ */ e.createElement("div", {
|
|
12865
12901
|
className: `${N}__footer-inner`,
|
|
12866
12902
|
style: { maxWidth: L }
|
|
12867
|
-
}, ee))),
|
|
12903
|
+
}, ee))), X = /* @__PURE__ */ e.createElement(e.Fragment, null, (te || oe) && /* @__PURE__ */ e.createElement("div", {
|
|
12868
12904
|
...O,
|
|
12869
12905
|
className: Z([
|
|
12870
12906
|
`${N}__sidebar`,
|
|
@@ -12891,7 +12927,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12891
12927
|
crossAxis: -96
|
|
12892
12928
|
},
|
|
12893
12929
|
preferredPlacement: "right-end"
|
|
12894
|
-
}), /* @__PURE__ */ e.createElement("div", { className: `${N}__sidebar-inner` }, se)),
|
|
12930
|
+
}), /* @__PURE__ */ e.createElement("div", { className: `${N}__sidebar-inner` }, se)), ce);
|
|
12895
12931
|
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
|
|
12896
12932
|
ref: G,
|
|
12897
12933
|
className: Z([
|
|
@@ -12904,7 +12940,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12904
12940
|
}, /* @__PURE__ */ e.createElement(Ui, {
|
|
12905
12941
|
destination: I,
|
|
12906
12942
|
text: F.skipToContent
|
|
12907
|
-
}), J ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `${N}__header` }, J), /* @__PURE__ */ e.createElement("div", { className: `${N}__body` },
|
|
12943
|
+
}), J ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `${N}__header` }, J), /* @__PURE__ */ e.createElement("div", { className: `${N}__body` }, X)) : X), o && /* @__PURE__ */ e.createElement(Va, {
|
|
12908
12944
|
...i,
|
|
12909
12945
|
isOpen: c,
|
|
12910
12946
|
placement: "left",
|
|
@@ -12912,7 +12948,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12912
12948
|
!e && c && b && b();
|
|
12913
12949
|
}
|
|
12914
12950
|
}, r));
|
|
12915
|
-
},
|
|
12951
|
+
}, fs = ({ children: t, className: n, sidebarWidth: r = "18%", sidebarWidthMax: i = 20, sidebarWidthMin: a = 15, style: o, ...s }) => {
|
|
12916
12952
|
let c = "pds-docs-layout", l = {
|
|
12917
12953
|
"--docs-sidebar-max-width": `${i}rem`,
|
|
12918
12954
|
"--docs-sidebar-min-width": `${a}rem`,
|
|
@@ -12930,7 +12966,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12930
12966
|
},
|
|
12931
12967
|
...s
|
|
12932
12968
|
}, f && /* @__PURE__ */ e.createElement("aside", { className: `${c}__sidebar` }, /* @__PURE__ */ e.createElement("div", { className: `${c}__sidebar-inner` }, f)), /* @__PURE__ */ e.createElement("div", { className: `${c}__content` }, d));
|
|
12933
|
-
},
|
|
12969
|
+
}, ps = ({ children: t, className: n, gridGap: r = "xl", secondSidebarMobileLocation: i = "after", secondSidebarWidth: a, secondSidebarWidthMax: o, secondSidebarWidthMin: s, sidebarLocation: c = "right", sidebarMobileLocation: l = "after", sidebarWidth: u = "33%", sidebarWidthMax: d = 25, sidebarWidthMin: f = 15, ...p }) => {
|
|
12934
12970
|
let m = "pds-sidebar-layout", h = r === "none" ? "0" : `var(--pds-spacing-${r})`, g = gt(t), _ = !!g["second-sidebar"];
|
|
12935
12971
|
return /* @__PURE__ */ e.createElement("div", {
|
|
12936
12972
|
className: Z([m, n ?? ""]),
|
|
@@ -12948,7 +12984,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12948
12984
|
},
|
|
12949
12985
|
...p
|
|
12950
12986
|
}, /* @__PURE__ */ e.createElement("div", { className: `${m}__main` }, g.__unslotted || g.content), /* @__PURE__ */ e.createElement("div", { className: `${m}__side` }, g.sidebar), _ && /* @__PURE__ */ e.createElement("div", { className: `${m}__second-side` }, g["second-sidebar"]));
|
|
12951
|
-
},
|
|
12987
|
+
}, ms = ({ children: n, className: r, maxColumns: i = 3, style: a, ...o }) => {
|
|
12952
12988
|
let s = "pds-stat-panel-group", c = `${s}--max-${i}`, l = {
|
|
12953
12989
|
"--max-columns": i,
|
|
12954
12990
|
...a
|
|
@@ -12967,7 +13003,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12967
13003
|
className: `${s}__item`,
|
|
12968
13004
|
role: "listitem"
|
|
12969
13005
|
}, t))));
|
|
12970
|
-
},
|
|
13006
|
+
}, hs = ({ children: t, className: n, formWidth: r = "standard", hasPanel: i = !1, ...a }) => {
|
|
12971
13007
|
let o = gt(t), s = o.stepper, c = o.form, l = "pds-stepper-layout", u = r === "full" ? `${l}--full-width` : null, d = /* @__PURE__ */ e.createElement(na, {
|
|
12972
13008
|
className: Z([
|
|
12973
13009
|
l,
|
|
@@ -12977,8 +13013,8 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12977
13013
|
width: "wide",
|
|
12978
13014
|
...a
|
|
12979
13015
|
}, s && /* @__PURE__ */ e.createElement("div", { className: `${l}__stepper-container` }, s), c && /* @__PURE__ */ e.createElement("div", { className: `${l}__form-container` }, c));
|
|
12980
|
-
return i ? /* @__PURE__ */ e.createElement(
|
|
12981
|
-
},
|
|
13016
|
+
return i ? /* @__PURE__ */ e.createElement(Qa, null, d) : d;
|
|
13017
|
+
}, gs = ({ children: t, className: n, gridGap: r = "xl", verticalAlign: i = "start", ...a }) => {
|
|
12982
13018
|
let o = "pds-three-item-layout", s = r === "xl" ? "pds-grid" : `pds-grid pds-grid--gap-${r}`, c = `${o}--${i}`, l = gt(t), u = [
|
|
12983
13019
|
l["first-item"],
|
|
12984
13020
|
l["second-item"],
|
|
@@ -12996,7 +13032,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
12996
13032
|
key: n,
|
|
12997
13033
|
className: "pds-grid-item pds-grid-item--sm-12 pds-grid-item--md-4 pds-grid-item--lg-4"
|
|
12998
13034
|
}, t)));
|
|
12999
|
-
},
|
|
13035
|
+
}, _s = ({ children: t, className: n, gridGap: r = "xl", layoutVariant: i = "equal", verticalAlign: a = "start", ...o }) => {
|
|
13000
13036
|
let s = "pds-two-item-layout", c = r === "xl" ? "pds-grid" : `pds-grid pds-grid--gap-${r}`, l = `${s}--${a}`, u = ["pds-grid-item--md-6"], d = ["pds-grid-item--md-4", "pds-grid-item--lg-3"], f = ["pds-grid-item--md-8", "pds-grid-item--lg-9"], p = ["pds-grid-item", "pds-grid-item--sm-4"], m, h;
|
|
13001
13037
|
switch (i) {
|
|
13002
13038
|
case "equal":
|
|
@@ -13017,7 +13053,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13017
13053
|
]),
|
|
13018
13054
|
...o
|
|
13019
13055
|
}, /* @__PURE__ */ e.createElement("div", { className: m.join(" ").trim() }, _), /* @__PURE__ */ e.createElement("div", { className: h.join(" ").trim() }, v));
|
|
13020
|
-
},
|
|
13056
|
+
}, vs = ({ alignContent: t = "flex-start", alignItems: n = "stretch", children: r, className: i, flexDirection: a = "row", flexWrap: o = "nowrap", gap: s = "xl", justifyContent: c = "flex-start", mobileAlignContent: l, mobileAlignItems: u, mobileFlexDirection: d = "column", mobileFlexWrap: f, mobileGap: p, mobileJustifyContent: m, style: h, ...g }) => {
|
|
13021
13057
|
let _ = "pds-flex", v = `${_}-container`, y = {
|
|
13022
13058
|
"--pds-flex-align-content": t,
|
|
13023
13059
|
"--pds-flex-align-items": n,
|
|
@@ -13043,7 +13079,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13043
13079
|
},
|
|
13044
13080
|
...g
|
|
13045
13081
|
}, r);
|
|
13046
|
-
},
|
|
13082
|
+
}, ys = (e) => {
|
|
13047
13083
|
let t = typeof window < "u", [n, r] = g(((e) => t ? window.matchMedia(e).matches : !1)(e));
|
|
13048
13084
|
return u(() => {
|
|
13049
13085
|
if (!t) return;
|
|
@@ -13052,20 +13088,20 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13052
13088
|
};
|
|
13053
13089
|
return r(n.matches), n.addEventListener ? (n.addEventListener("change", i), () => n.removeEventListener("change", i)) : (n.addListener(i), () => n.removeListener(i));
|
|
13054
13090
|
}, [e]), n;
|
|
13055
|
-
},
|
|
13091
|
+
}, bs = [
|
|
13056
13092
|
"light",
|
|
13057
13093
|
"dark",
|
|
13058
13094
|
"system"
|
|
13059
|
-
],
|
|
13095
|
+
], xs = (e) => typeof e == "string" && bs.includes(e), Ss = i(null), Cs = {
|
|
13060
13096
|
resolvedTheme: "light",
|
|
13061
13097
|
setTheme: () => {},
|
|
13062
13098
|
theme: "light"
|
|
13063
|
-
},
|
|
13064
|
-
let d = l !== void 0, f = !r && !d && o && !i, [p, m] = g(n), [h, _] = g(!1), v = d ? l : p, y =
|
|
13099
|
+
}, ws = ({ defaultTheme: e = "light", storageKey: t = "pds-theme" } = {}) => `(function(){try{var t=localStorage.getItem(${JSON.stringify(t)})||${JSON.stringify(e)};if(t==='system'){t=matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light';}document.documentElement.setAttribute('data-theme',t);}catch(e){}})();`, Ts = ({ children: t, defaultTheme: n = "light", disableInitScript: r = !1, nodeRef: i, onThemeChange: a, persist: o = !0, storageKey: s = "pds-theme", theme: l }) => {
|
|
13100
|
+
let d = l !== void 0, f = !r && !d && o && !i, [p, m] = g(n), [h, _] = g(!1), v = d ? l : p, y = ys("(prefers-color-scheme: dark)"), b = v === "system" ? h && y ? "dark" : "light" : v;
|
|
13065
13101
|
u(() => {
|
|
13066
13102
|
if (_(!0), !(d || !o || typeof window > "u")) try {
|
|
13067
13103
|
let e = window.localStorage.getItem(s);
|
|
13068
|
-
|
|
13104
|
+
xs(e) && m(e);
|
|
13069
13105
|
} catch {}
|
|
13070
13106
|
}, []), u(() => {
|
|
13071
13107
|
typeof document > "u" || (i?.current ?? document.documentElement).setAttribute("data-theme", b);
|
|
@@ -13085,20 +13121,20 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13085
13121
|
]),
|
|
13086
13122
|
theme: v
|
|
13087
13123
|
};
|
|
13088
|
-
return /* @__PURE__ */ e.createElement(
|
|
13124
|
+
return /* @__PURE__ */ e.createElement(Ss.Provider, { value: x }, f && /* @__PURE__ */ e.createElement("script", { dangerouslySetInnerHTML: { __html: ws({
|
|
13089
13125
|
defaultTheme: n,
|
|
13090
13126
|
storageKey: s
|
|
13091
13127
|
}) } }), t);
|
|
13092
|
-
},
|
|
13128
|
+
}, Es = () => l(Ss) ?? Cs, Ds = ({ children: t, enableThemeSwitching: n = !1, mobileMaxWidth: r = 767, themeProps: i = {} }) => {
|
|
13093
13129
|
u(() => {
|
|
13094
13130
|
let e = document.documentElement, t = () => {
|
|
13095
13131
|
window.innerWidth <= r ? e.setAttribute("data-pds-mobile", "") : e.removeAttribute("data-pds-mobile");
|
|
13096
13132
|
};
|
|
13097
13133
|
return t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
13098
13134
|
}, [r]);
|
|
13099
|
-
let a = n ? /* @__PURE__ */ e.createElement(
|
|
13135
|
+
let a = n ? /* @__PURE__ */ e.createElement(Ts, i, t) : t;
|
|
13100
13136
|
return /* @__PURE__ */ e.createElement(rn, null, a);
|
|
13101
|
-
},
|
|
13137
|
+
}, Os = ({ children: t, className: n, gap: r = "xl", itemMinWidth: i, maxColumns: a, mobileGap: o, ...s }) => {
|
|
13102
13138
|
let c = "pds-auto-grid", l = r === "xl" ? null : `${c}--gap-${r}`, u = a ? `${c}--capped` : null, d = o ?? r, f = d === r ? null : `${c}-gap-mobile--${d}`;
|
|
13103
13139
|
return /* @__PURE__ */ e.createElement("div", {
|
|
13104
13140
|
className: Z([
|
|
@@ -13114,7 +13150,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13114
13150
|
},
|
|
13115
13151
|
...s
|
|
13116
13152
|
}, t);
|
|
13117
|
-
},
|
|
13153
|
+
}, ks = ({ asContainer: t = !1, children: n, className: r, dense: i = !1, gap: a = "xl", mobileGap: o, stackBelow: s, ...c }) => {
|
|
13118
13154
|
let l = "pds-grid", u = a === "xl" ? null : `${l}--gap-${a}`, d = i ? `${l}--dense` : null, f = t || s ? `${l}--container` : null, p = s ? `${l}--stack-${s}` : null, m = o ?? a, h = m === a ? null : `${l}-gap-mobile--${m}`;
|
|
13119
13155
|
return /* @__PURE__ */ e.createElement("div", {
|
|
13120
13156
|
className: Z([
|
|
@@ -13128,7 +13164,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13128
13164
|
]),
|
|
13129
13165
|
...c
|
|
13130
13166
|
}, n);
|
|
13131
|
-
},
|
|
13167
|
+
}, As = ({ children: t, className: n, rowSpanLg: r, rowSpanMd: i, rowSpanSm: a, rowSpanXl: o, spanLg: s, spanMd: c, spanSm: l, spanXl: u, ...d }) => {
|
|
13132
13168
|
let f = "pds-grid-item", p = [
|
|
13133
13169
|
l ? `${f}--sm-${l}` : null,
|
|
13134
13170
|
c ? `${f}--md-${c}` : null,
|
|
@@ -13147,7 +13183,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13147
13183
|
]),
|
|
13148
13184
|
...d
|
|
13149
13185
|
}, t);
|
|
13150
|
-
},
|
|
13186
|
+
}, js = (e, t, n) => {
|
|
13151
13187
|
let { altKey: r = !1, ctrlKey: i = !1, enabled: a = !0, metaKey: o = !1, shiftKey: s = !1 } = n ?? {}, [l, d] = g(!1), f = c((e) => e.altKey === r && e.ctrlKey === i && e.metaKey === o && e.shiftKey === s, [
|
|
13152
13188
|
r,
|
|
13153
13189
|
i,
|
|
@@ -13171,7 +13207,7 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13171
13207
|
m,
|
|
13172
13208
|
a
|
|
13173
13209
|
]), l;
|
|
13174
|
-
},
|
|
13210
|
+
}, Ms = () => {
|
|
13175
13211
|
let e = typeof window < "u", [t, n] = g(e && window.innerWidth !== void 0 ? window.innerWidth : 1024);
|
|
13176
13212
|
return u(() => {
|
|
13177
13213
|
if (!e) return;
|
|
@@ -13185,6 +13221,6 @@ var Fo = ({ children: t, className: n, columns: r, depth: i = 0, hasChildren: a
|
|
|
13185
13221
|
}, []), t;
|
|
13186
13222
|
};
|
|
13187
13223
|
//#endregion
|
|
13188
|
-
export { vr as ActionCard,
|
|
13224
|
+
export { vr as ActionCard, ds as AppLayout, Os as AutoGrid, wt as Avatar, Et as Badge, ba as Banner, Vr as BarChart, za as BottomSheet, Dn as BranchDiff, Gi as Breadcrumb, Ba as BulkActionBar, jn as Button, Mn as ButtonLink, ta as ButtonNav, Vi as CTALink, _r as Callout, yr as Card, br as CardSelect, si as Checkbox, ci as CheckboxFieldset, li as CheckboxGroup, Fn as ClipboardButton, In as CloseButton, Zr as CodeBlock, ui as Combobox, fi as ComboboxMultiselect, xr as CompactEmptyState, $r as ComparisonList, na as Container, ji as Datepicker, fs as DocsLayout, Va as Drawer, Zn as Dropdown, ea as DropdownMenu, Ya as ExpansionPanel, Xa as ExpansionPanelGroup, Za as FeaturePanel, ri as FileDiff, Mi as FileUpload, cr as FilterButton, vs as FlexContainer, Ha as FullScreenOverlay, Ds as GlobalWrapper, ks as Grid, As as GridItem, ti as HorizontalEmptyState, Q as Icon, Pn as IconButton, oi as IdentityBlock, Sa as InlineMessage, Ni as InputGroup, Ur as LineChart, Hi as LinkNewWindow, Ta as MIN_AUTO_CLOSE_DURATION, qn as MenuButton, Ua as Modal, ra as Navbar, Ka as Pagination, qa as PaginationChapter, Ja as PaginationCompact, Qa as Panel, $a as PanelList, eo as PanelRow, to as PanelStack, oo as PantheonLogo, ai as PaymentIcon, Wi as Picture, Gr as PieChart, fr as PlatformIcon, lo as Popover, fo as ProgressBar, mo as ProgressRing, qr as ProportionBar, Pi as RadioGroup, _o as ResultCount, vo as RowActionsMenu, mr as SSOButton, wa as SectionMessage, lr as SegmentedButton, Cr as Select, ur as SelectButton, Sr as SelectOptionGroup, ia as SideNav, oa as SideNavGlobal, aa as SideNavGlobalItem, ps as SidebarLayout, xo as SiteFooter, ca as SiteMenu, So as SiteOptionDisplay, Co as SiteSearch, Kn as SiteTypeIcon, Gn as SiteTypeLabel, Lr as Skeleton, Ui as Skiplink, Fo as SortableList, ko as SortableListHeader, Lo as SortableRow, wn as Spinner, dr as SplitButton, Ro as StatPanel, ms as StatPanelGroup, Tn as StatusBadge, Bo as StatusChecker, Vo as StatusIndicator, Bn as StatusTypeLabels, Ho as StepList, Uo as Stepper, hs as StepperLayout, Fi as Switch, ua as TabMenu, qo as Table, es as TableOfContents, ts as Tabs, ls as Tag, Li as TagsInput, En as Tally, Bi as TextInput, Ri as Textarea, Ss as ThemeContext, Ts as ThemeContextProvider, ma as ThemeSwitcher, gs as ThreeItemLayout, _i as Timepicker, Ma as Toast, Na as ToastType, ka as Toaster, Da as ToasterContext, sn as Tooltip, fa as TreeNav, _s as TwoItemLayout, ha as UserMenu, us as UtilityBar, hr as UtilityButton, ni as VerticalEmptyState, Go as VerticalStepper, ei as VideoEmbed, no as WidgetPanel, ga as WorkspaceSelector, Di as getPresetDateRange, ws as getThemeInitScript, xt as iconList, Hn as isHeadingItemType, Un as isLinkItemType, Wn as isNodeItemType, Vn as isSeparatorItemType, zo as statusCheckerStates, ns as tagColors, as as tagSolidColors, rs as tagSolidHueColors, is as tagSolidStatusColors, Ko as useBreakpoint, Nn as useClipboard, Rn as useDropdown, en as useIsMobile, js as useKeyPress, on as useKeyboardShortcut, ys as useMediaQuery, Es as useTheme, Pa as useToast, Ms as useWindowWidth };
|
|
13189
13225
|
|
|
13190
13226
|
//# sourceMappingURL=index.js.map
|