@coolms/ui-react 0.1.0-alpha.39 → 0.1.0-alpha.40
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/CHANGELOG.md +8 -0
- package/dist/components/Fields.d.ts +12 -1
- package/dist/components/Icon.d.ts +1 -1
- package/dist/index.js +850 -822
- package/package.json +1 -1
- package/src/kit.css +14 -0
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as e, jsxs as c, Fragment as
|
|
2
|
-
import { useId as fe, useState as D, useRef as P, useEffect as
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import { useId as fe, useState as D, useRef as P, useEffect as ee, useCallback as Ie, useMemo as Ln, useContext as Dn, createContext as In, useLayoutEffect as $e, Fragment as $n } from "react";
|
|
3
3
|
import { createPortal as ln } from "react-dom";
|
|
4
4
|
function qe(n, t) {
|
|
5
5
|
const l = { ...n };
|
|
@@ -9,7 +9,7 @@ function qe(n, t) {
|
|
|
9
9
|
}
|
|
10
10
|
return l;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function H(...n) {
|
|
13
13
|
return n.filter(Boolean).join(" ");
|
|
14
14
|
}
|
|
15
15
|
function re({ name: n }) {
|
|
@@ -51,7 +51,7 @@ function De({
|
|
|
51
51
|
{
|
|
52
52
|
...g,
|
|
53
53
|
type: b,
|
|
54
|
-
className:
|
|
54
|
+
className: H("cms-button", `cms-button--${n}`, t && "is-busy", r && "is-locked", d),
|
|
55
55
|
disabled: f,
|
|
56
56
|
"aria-busy": t || void 0,
|
|
57
57
|
title: r ? s ?? i : i,
|
|
@@ -66,395 +66,139 @@ function De({
|
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/* @__PURE__ */ e("label", { className: "cms-field__label", htmlFor: n, children: t }),
|
|
72
|
-
a,
|
|
73
|
-
s != null ? /* @__PURE__ */ c("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
|
|
74
|
-
/* @__PURE__ */ e(re, { name: "lock" }),
|
|
75
|
-
" ",
|
|
76
|
-
s
|
|
77
|
-
] }) : null,
|
|
78
|
-
r != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: r }) : null,
|
|
79
|
-
l != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${n}-help`, children: l }) : null
|
|
80
|
-
] });
|
|
81
|
-
}
|
|
82
|
-
function rn(n, t) {
|
|
83
|
-
const l = [t.error != null && `${n}-error`, t.pinned != null && `${n}-pinned`, t.help != null && `${n}-help`].filter(Boolean).join(" ");
|
|
84
|
-
return l === "" ? void 0 : l;
|
|
85
|
-
}
|
|
86
|
-
const Bn = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Fn = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
|
|
87
|
-
function Hn(n, t, l) {
|
|
88
|
-
const r = (a, h, d, m = 0, b = 0, i = 0) => {
|
|
89
|
-
const g = new Date(Date.UTC(a, h - 1, d, m, b, i));
|
|
90
|
-
return g.setUTCFullYear(a), g.getUTCFullYear() === a && g.getUTCMonth() === h - 1 && g.getUTCDate() === d && g.getUTCHours() === m && g.getUTCMinutes() === b && g.getUTCSeconds() === i ? g : null;
|
|
91
|
-
}, s = (a) => ({ hour: Number(a[1]), minute: Number(a[2]), second: Number(a[3] ?? 0) });
|
|
92
|
-
try {
|
|
93
|
-
if (n === "time") {
|
|
94
|
-
const h = t.match(Fn);
|
|
95
|
-
if (h === null) return t;
|
|
96
|
-
const d = s(h), m = r(2e3, 1, 1, d.hour, d.minute, d.second);
|
|
97
|
-
return m === null ? t : new Intl.DateTimeFormat(l, { timeStyle: h[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
|
|
98
|
-
}
|
|
99
|
-
const a = t.match(Bn);
|
|
100
|
-
if (a === null) return t;
|
|
101
|
-
if (n === "date" && a[4] === void 0) {
|
|
102
|
-
const h = r(Number(a[1]), Number(a[2]), Number(a[3]));
|
|
103
|
-
return h === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeZone: "UTC" }).format(h);
|
|
104
|
-
}
|
|
105
|
-
if (n === "datetime-local" && a[4] !== void 0) {
|
|
106
|
-
const h = r(Number(a[1]), Number(a[2]), Number(a[3]), Number(a[4]), Number(a[5]), Number(a[6] ?? 0));
|
|
107
|
-
return h === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeStyle: a[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(h);
|
|
108
|
-
}
|
|
109
|
-
} catch {
|
|
110
|
-
return t;
|
|
111
|
-
}
|
|
112
|
-
return t;
|
|
113
|
-
}
|
|
114
|
-
const Rn = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
|
|
115
|
-
function zt({ label: n, help: t, error: l, disabled: r, readOnly: s, pinned: a, value: h, onChange: d, placeholder: m, type: b = "text", name: i, locale: g, min: f, max: v, step: u, minLength: w, maxLength: S, required: A }) {
|
|
116
|
-
const x = fe(), T = s === !0 || a != null, _ = T && Rn.has(b), N = b === "number" && (u === "any" || typeof u == "number" && !Number.isInteger(u));
|
|
117
|
-
return /* @__PURE__ */ e(sn, { id: x, label: n, help: t, error: l, pinned: a, children: /* @__PURE__ */ e(
|
|
118
|
-
"input",
|
|
119
|
-
{
|
|
120
|
-
id: x,
|
|
121
|
-
name: i,
|
|
122
|
-
type: _ ? "text" : b,
|
|
123
|
-
className: "cms-input",
|
|
124
|
-
value: _ ? Hn(b, h, g) : h,
|
|
125
|
-
..._ ? { "data-value": h } : {},
|
|
126
|
-
lang: g,
|
|
127
|
-
placeholder: m,
|
|
128
|
-
disabled: r,
|
|
129
|
-
readOnly: T,
|
|
130
|
-
required: A,
|
|
131
|
-
"aria-required": A || void 0,
|
|
132
|
-
min: _ ? void 0 : f,
|
|
133
|
-
max: _ ? void 0 : v,
|
|
134
|
-
step: _ ? void 0 : u,
|
|
135
|
-
minLength: w,
|
|
136
|
-
maxLength: S,
|
|
137
|
-
inputMode: b === "number" ? N ? "decimal" : "numeric" : void 0,
|
|
138
|
-
"aria-invalid": l != null || void 0,
|
|
139
|
-
"aria-describedby": rn(x, { help: t, error: l, pinned: a }),
|
|
140
|
-
onChange: (I) => d == null ? void 0 : d(I.target.value)
|
|
141
|
-
}
|
|
142
|
-
) });
|
|
143
|
-
}
|
|
144
|
-
function Ut({ label: n, help: t, error: l, disabled: r, readOnly: s, pinned: a, value: h, onChange: d, placeholder: m, rows: b = 4, name: i, locale: g, minLength: f, maxLength: v, required: u }) {
|
|
145
|
-
const w = fe();
|
|
146
|
-
return /* @__PURE__ */ e(sn, { id: w, label: n, help: t, error: l, pinned: a, children: /* @__PURE__ */ e(
|
|
147
|
-
"textarea",
|
|
148
|
-
{
|
|
149
|
-
id: w,
|
|
150
|
-
name: i,
|
|
151
|
-
className: "cms-input cms-textarea",
|
|
152
|
-
rows: b,
|
|
153
|
-
value: h,
|
|
154
|
-
lang: g,
|
|
155
|
-
placeholder: m,
|
|
156
|
-
disabled: r,
|
|
157
|
-
readOnly: s === !0 || a != null,
|
|
158
|
-
required: u,
|
|
159
|
-
"aria-required": u || void 0,
|
|
160
|
-
minLength: f,
|
|
161
|
-
maxLength: v,
|
|
162
|
-
"aria-invalid": l != null || void 0,
|
|
163
|
-
"aria-describedby": rn(w, { help: t, error: l, pinned: a }),
|
|
164
|
-
onChange: (S) => d == null ? void 0 : d(S.target.value)
|
|
165
|
-
}
|
|
166
|
-
) });
|
|
167
|
-
}
|
|
168
|
-
function Kt({ label: n, help: t, error: l, disabled: r, readOnly: s, value: a, options: h, onChange: d, emptyText: m = "Nothing to choose from yet.", name: b }) {
|
|
169
|
-
const i = fe(), g = h.length === 0;
|
|
170
|
-
return /* @__PURE__ */ e(sn, { id: i, label: n, help: g ? m : t, error: l, children: /* @__PURE__ */ e(
|
|
171
|
-
"select",
|
|
172
|
-
{
|
|
173
|
-
id: i,
|
|
174
|
-
name: b,
|
|
175
|
-
className: "cms-input cms-select",
|
|
176
|
-
value: a,
|
|
177
|
-
disabled: r || g,
|
|
178
|
-
"aria-readonly": s || void 0,
|
|
179
|
-
"aria-invalid": l != null || void 0,
|
|
180
|
-
"aria-describedby": rn(i, { help: g ? m : t, error: l }),
|
|
181
|
-
onChange: (f) => {
|
|
182
|
-
s || d == null || d(f.target.value);
|
|
183
|
-
},
|
|
184
|
-
children: h.map((f) => /* @__PURE__ */ e("option", { value: f.value, disabled: s && f.value !== a, children: f.label }, f.value))
|
|
185
|
-
}
|
|
186
|
-
) });
|
|
187
|
-
}
|
|
188
|
-
function Wt({ label: n, checked: t, onChange: l, disabled: r, readOnly: s, help: a }) {
|
|
189
|
-
const h = fe();
|
|
190
|
-
return /* @__PURE__ */ c("div", { className: "cms-toggle-row", children: [
|
|
191
|
-
/* @__PURE__ */ e(
|
|
192
|
-
"button",
|
|
193
|
-
{
|
|
194
|
-
id: h,
|
|
195
|
-
type: "button",
|
|
196
|
-
role: "switch",
|
|
197
|
-
className: F("cms-toggle", t && "is-on"),
|
|
198
|
-
"aria-checked": t,
|
|
199
|
-
"aria-readonly": s || void 0,
|
|
200
|
-
"aria-describedby": a != null ? `${h}-help` : void 0,
|
|
201
|
-
disabled: r,
|
|
202
|
-
onClick: () => {
|
|
203
|
-
s || l == null || l(!t);
|
|
204
|
-
},
|
|
205
|
-
children: /* @__PURE__ */ e("span", { className: "cms-toggle__thumb" })
|
|
206
|
-
}
|
|
207
|
-
),
|
|
208
|
-
/* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: h, children: n }),
|
|
209
|
-
a != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${h}-help`, children: a }) : null
|
|
210
|
-
] });
|
|
211
|
-
}
|
|
212
|
-
const On = 150;
|
|
213
|
-
function kn({ open: n, title: t, onClose: l, dirty: r = !1, onDirtyClose: s, children: a, footer: h, closeLabel: d = "Close", initialFocus: m, className: b }) {
|
|
214
|
-
const [i, g] = D(n), [f, v] = D(!1), u = P(null), w = P(null), S = fe();
|
|
215
|
-
if (Q(() => {
|
|
216
|
-
if (n) {
|
|
217
|
-
w.current = document.activeElement, g(!0), v(!1);
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
if (!i) return;
|
|
221
|
-
v(!0);
|
|
222
|
-
const x = window.setTimeout(() => {
|
|
223
|
-
var T, _;
|
|
224
|
-
g(!1), v(!1), (_ = (T = w.current) == null ? void 0 : T.focus) == null || _.call(T);
|
|
225
|
-
}, On);
|
|
226
|
-
return () => window.clearTimeout(x);
|
|
227
|
-
}, [n, i]), Q(() => {
|
|
228
|
-
var x, T;
|
|
229
|
-
if (n && i) {
|
|
230
|
-
const _ = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
|
|
231
|
-
(T = (m == null ? void 0 : m.current) ?? ((x = u.current) == null ? void 0 : x.querySelector(`.cms-modal__body :is(${_}), .cms-modal__foot :is(${_})`)) ?? u.current) == null || T.focus();
|
|
232
|
-
}
|
|
233
|
-
}, [n, i, m]), !i) return null;
|
|
234
|
-
const A = () => {
|
|
235
|
-
r ? s == null || s() : l();
|
|
236
|
-
};
|
|
237
|
-
return ln(
|
|
238
|
-
/* @__PURE__ */ e("div", { className: F("cms-modal-scrim", f && "is-closing"), onMouseDown: (x) => {
|
|
239
|
-
x.target === x.currentTarget && A();
|
|
240
|
-
}, children: /* @__PURE__ */ c(
|
|
241
|
-
"div",
|
|
242
|
-
{
|
|
243
|
-
ref: u,
|
|
244
|
-
className: F("cms-modal", b, f && "is-closing", r && "is-dirty"),
|
|
245
|
-
role: "dialog",
|
|
246
|
-
"aria-modal": "true",
|
|
247
|
-
"aria-labelledby": S,
|
|
248
|
-
tabIndex: -1,
|
|
249
|
-
onKeyDown: (x) => {
|
|
250
|
-
var T;
|
|
251
|
-
if (x.key === "Escape")
|
|
252
|
-
x.stopPropagation(), A();
|
|
253
|
-
else if (x.key === "Tab") {
|
|
254
|
-
const _ = (T = u.current) == null ? void 0 : T.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
|
|
255
|
-
if (!_ || _.length === 0) return;
|
|
256
|
-
const N = _[0], I = _[_.length - 1];
|
|
257
|
-
x.shiftKey && document.activeElement === N ? (x.preventDefault(), I.focus()) : !x.shiftKey && document.activeElement === I && (x.preventDefault(), N.focus());
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
children: [
|
|
261
|
-
/* @__PURE__ */ c("header", { className: "cms-modal__head", children: [
|
|
262
|
-
/* @__PURE__ */ e("h2", { className: "cms-modal__title", id: S, children: t }),
|
|
263
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": d, onClick: A, children: /* @__PURE__ */ e(re, { name: "close" }) })
|
|
264
|
-
] }),
|
|
265
|
-
/* @__PURE__ */ e("div", { className: "cms-modal__body", children: a }),
|
|
266
|
-
h != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: h }) : null
|
|
267
|
-
]
|
|
268
|
-
}
|
|
269
|
-
) }),
|
|
270
|
-
document.body
|
|
271
|
-
);
|
|
272
|
-
}
|
|
273
|
-
function Vt({ open: n, title: t, message: l, kind: r = "default", confirmLabel: s, cancelLabel: a, closeLabel: h, onConfirm: d, onCancel: m }) {
|
|
274
|
-
const b = r === "discard-changes";
|
|
275
|
-
return /* @__PURE__ */ e(
|
|
276
|
-
kn,
|
|
277
|
-
{
|
|
278
|
-
open: n,
|
|
279
|
-
title: t,
|
|
280
|
-
onClose: m,
|
|
281
|
-
...h === void 0 ? {} : { closeLabel: h },
|
|
282
|
-
footer: /* @__PURE__ */ c(B, { children: [
|
|
283
|
-
/* @__PURE__ */ e(De, { onClick: m, children: a ?? (b ? "Keep editing" : "Cancel") }),
|
|
284
|
-
/* @__PURE__ */ e(De, { variant: r === "default" ? "primary" : "danger", onClick: d, children: s ?? (b ? "Discard changes" : "Confirm") })
|
|
285
|
-
] }),
|
|
286
|
-
children: r !== "default" ? /* @__PURE__ */ c("p", { className: "cms-confirm__warning", children: [
|
|
287
|
-
/* @__PURE__ */ e(re, { name: "warning" }),
|
|
288
|
-
" ",
|
|
289
|
-
l
|
|
290
|
-
] }) : /* @__PURE__ */ e("p", { children: l })
|
|
291
|
-
}
|
|
292
|
-
);
|
|
293
|
-
}
|
|
294
|
-
function Zt({ kind: n, message: t, action: l, onDismiss: r, dismissLabel: s = "Dismiss" }) {
|
|
295
|
-
return /* @__PURE__ */ c("div", { className: F("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
|
|
296
|
-
/* @__PURE__ */ e(re, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
|
|
297
|
-
/* @__PURE__ */ e("span", { className: "cms-toast__message", children: t }),
|
|
298
|
-
l ? /* @__PURE__ */ e(De, { className: "cms-toast__action", onClick: l.onAction, children: l.label }) : null,
|
|
299
|
-
r ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": s, onClick: r, children: /* @__PURE__ */ e(re, { name: "close" }) }) : null
|
|
300
|
-
] });
|
|
301
|
-
}
|
|
302
|
-
function qt({ children: n }) {
|
|
303
|
-
return /* @__PURE__ */ e("div", { className: "cms-toast-region", children: n });
|
|
304
|
-
}
|
|
305
|
-
function Pn({ what: n, layout: t = "inline" }) {
|
|
306
|
-
return /* @__PURE__ */ c("div", { className: F("cms-loading", `cms-loading--${t}`), role: "status", "aria-live": "polite", children: [
|
|
307
|
-
/* @__PURE__ */ e(re, { name: "spinner" }),
|
|
308
|
-
/* @__PURE__ */ e("span", { children: n })
|
|
309
|
-
] });
|
|
310
|
-
}
|
|
311
|
-
function zn({ title: n, hint: t, action: l }) {
|
|
312
|
-
return /* @__PURE__ */ c("div", { className: "cms-empty", children: [
|
|
313
|
-
/* @__PURE__ */ e("p", { className: "cms-empty__title", children: n }),
|
|
314
|
-
t != null ? /* @__PURE__ */ e("p", { className: "cms-empty__hint", children: t }) : null,
|
|
315
|
-
l != null ? /* @__PURE__ */ e("div", { className: "cms-empty__action", children: l }) : null
|
|
316
|
-
] });
|
|
317
|
-
}
|
|
318
|
-
function Un({ message: n, onRetry: t, retryLabel: l = "Try again" }) {
|
|
319
|
-
return /* @__PURE__ */ c("div", { className: "cms-error-banner", role: "alert", children: [
|
|
320
|
-
/* @__PURE__ */ e(re, { name: "warning" }),
|
|
321
|
-
/* @__PURE__ */ e("span", { className: "cms-error-banner__message", children: n }),
|
|
322
|
-
t ? /* @__PURE__ */ e(De, { onClick: t, children: l }) : null
|
|
323
|
-
] });
|
|
324
|
-
}
|
|
325
|
-
const xn = {
|
|
326
|
-
mail: /* @__PURE__ */ c(B, { children: [
|
|
69
|
+
const kn = {
|
|
70
|
+
mail: /* @__PURE__ */ c($, { children: [
|
|
327
71
|
/* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
328
72
|
/* @__PURE__ */ e("path", { d: "m3 7 9 6 9-6" })
|
|
329
73
|
] }),
|
|
330
74
|
// A gear: a ring with eight short teeth, the hole in its middle.
|
|
331
|
-
settings: /* @__PURE__ */ c(
|
|
75
|
+
settings: /* @__PURE__ */ c($, { children: [
|
|
332
76
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" }),
|
|
333
77
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "7" }),
|
|
334
78
|
/* @__PURE__ */ e("path", { d: "M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9 7 7M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1" })
|
|
335
79
|
] }),
|
|
336
80
|
// The envelope with its flap open above it: a message read, or the message itself again.
|
|
337
|
-
"mail-open": /* @__PURE__ */ c(
|
|
81
|
+
"mail-open": /* @__PURE__ */ c($, { children: [
|
|
338
82
|
/* @__PURE__ */ e("path", { d: "M3 10v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9" }),
|
|
339
83
|
/* @__PURE__ */ e("path", { d: "m3 10 9-6 9 6" }),
|
|
340
84
|
/* @__PURE__ */ e("path", { d: "m3 10 9 6 9-6" })
|
|
341
85
|
] }),
|
|
342
86
|
// A clipboard: copy what is shown.
|
|
343
|
-
copy: /* @__PURE__ */ c(
|
|
87
|
+
copy: /* @__PURE__ */ c($, { children: [
|
|
344
88
|
/* @__PURE__ */ e("rect", { x: "6", y: "4", width: "12", height: "17", rx: "2" }),
|
|
345
89
|
/* @__PURE__ */ e("path", { d: "M9 4V3h6v1" }),
|
|
346
90
|
/* @__PURE__ */ e("path", { d: "M9 10h6M9 14h6M9 18h3" })
|
|
347
91
|
] }),
|
|
348
92
|
chat: /* @__PURE__ */ e("path", { d: "M4 12a8 8 0 1 1 4 6.9L4 20l1.1-4A8 8 0 0 1 4 12Z" }),
|
|
349
93
|
phone: /* @__PURE__ */ e("path", { d: "M5 3h3l2 5-2.5 1.5a11 11 0 0 0 7 7L16 14l5 2v3a2 2 0 0 1-2 2A16 16 0 0 1 3 5a2 2 0 0 1 2-2Z" }),
|
|
350
|
-
calendar: /* @__PURE__ */ c(
|
|
94
|
+
calendar: /* @__PURE__ */ c($, { children: [
|
|
351
95
|
/* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2" }),
|
|
352
96
|
/* @__PURE__ */ e("path", { d: "M3 10h18M8 3v4M16 3v4" })
|
|
353
97
|
] }),
|
|
354
|
-
file: /* @__PURE__ */ c(
|
|
98
|
+
file: /* @__PURE__ */ c($, { children: [
|
|
355
99
|
/* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
|
|
356
100
|
/* @__PURE__ */ e("path", { d: "M14 3v6h6M8 13h8M8 17h6" })
|
|
357
101
|
] }),
|
|
358
102
|
// The file, with code's angle brackets in place of its lines: a message's source.
|
|
359
|
-
"file-code": /* @__PURE__ */ c(
|
|
103
|
+
"file-code": /* @__PURE__ */ c($, { children: [
|
|
360
104
|
/* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
|
|
361
105
|
/* @__PURE__ */ e("path", { d: "M14 3v6h6" }),
|
|
362
106
|
/* @__PURE__ */ e("path", { d: "m10 12-2 2.5 2 2.5M14 12l2 2.5-2 2.5" })
|
|
363
107
|
] }),
|
|
364
|
-
image: /* @__PURE__ */ c(
|
|
108
|
+
image: /* @__PURE__ */ c($, { children: [
|
|
365
109
|
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
366
110
|
/* @__PURE__ */ e("circle", { cx: "9", cy: "10", r: "2" }),
|
|
367
111
|
/* @__PURE__ */ e("path", { d: "m21 17-5-5-9 8" })
|
|
368
112
|
] }),
|
|
369
|
-
search: /* @__PURE__ */ c(
|
|
113
|
+
search: /* @__PURE__ */ c($, { children: [
|
|
370
114
|
/* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "7" }),
|
|
371
115
|
/* @__PURE__ */ e("path", { d: "m20 20-4-4" })
|
|
372
116
|
] }),
|
|
373
|
-
bell: /* @__PURE__ */ c(
|
|
117
|
+
bell: /* @__PURE__ */ c($, { children: [
|
|
374
118
|
/* @__PURE__ */ e("path", { d: "M6 9a6 6 0 1 1 12 0c0 6 2 8 2 8H4s2-2 2-8Z" }),
|
|
375
119
|
/* @__PURE__ */ e("path", { d: "M10 20a2 2 0 0 0 4 0" })
|
|
376
120
|
] }),
|
|
377
|
-
pencil: /* @__PURE__ */ c(
|
|
121
|
+
pencil: /* @__PURE__ */ c($, { children: [
|
|
378
122
|
/* @__PURE__ */ e("path", { d: "M4 20h4L19 9l-4-4L4 16Z" }),
|
|
379
123
|
/* @__PURE__ */ e("path", { d: "m13 7 4 4" })
|
|
380
124
|
] }),
|
|
381
|
-
download: /* @__PURE__ */ c(
|
|
125
|
+
download: /* @__PURE__ */ c($, { children: [
|
|
382
126
|
/* @__PURE__ */ e("path", { d: "M12 4v11" }),
|
|
383
127
|
/* @__PURE__ */ e("path", { d: "m7 11 5 5 5-5" }),
|
|
384
128
|
/* @__PURE__ */ e("path", { d: "M4 20h16" })
|
|
385
129
|
] }),
|
|
386
130
|
// Download's arrow turned up, from the line: a file sent up.
|
|
387
|
-
upload: /* @__PURE__ */ c(
|
|
131
|
+
upload: /* @__PURE__ */ c($, { children: [
|
|
388
132
|
/* @__PURE__ */ e("path", { d: "M12 20V9" }),
|
|
389
133
|
/* @__PURE__ */ e("path", { d: "m7 13 5-5 5 5" }),
|
|
390
134
|
/* @__PURE__ */ e("path", { d: "M4 4h16" })
|
|
391
135
|
] }),
|
|
392
|
-
print: /* @__PURE__ */ c(
|
|
136
|
+
print: /* @__PURE__ */ c($, { children: [
|
|
393
137
|
/* @__PURE__ */ e("path", { d: "M7 8V4h10v4" }),
|
|
394
138
|
/* @__PURE__ */ e("rect", { x: "3", y: "8", width: "18", height: "8", rx: "2" }),
|
|
395
139
|
/* @__PURE__ */ e("path", { d: "M7 14h10v6H7Z" })
|
|
396
140
|
] }),
|
|
397
|
-
"open-separately": /* @__PURE__ */ c(
|
|
141
|
+
"open-separately": /* @__PURE__ */ c($, { children: [
|
|
398
142
|
/* @__PURE__ */ e("path", { d: "M14 4h6v6" }),
|
|
399
143
|
/* @__PURE__ */ e("path", { d: "m20 4-9 9" }),
|
|
400
144
|
/* @__PURE__ */ e("path", { d: "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5" })
|
|
401
145
|
] }),
|
|
402
146
|
star: /* @__PURE__ */ e("path", { d: "m12 3 2.8 5.8 6.2.9-4.5 4.4 1 6.2L12 17.4l-5.5 2.9 1-6.2L3 9.7l6.2-.9Z" }),
|
|
403
|
-
send: /* @__PURE__ */ c(
|
|
147
|
+
send: /* @__PURE__ */ c($, { children: [
|
|
404
148
|
/* @__PURE__ */ e("path", { d: "M21 3 10 14" }),
|
|
405
149
|
/* @__PURE__ */ e("path", { d: "M21 3 14 21l-4-7-7-4Z" })
|
|
406
150
|
] }),
|
|
407
|
-
inbox: /* @__PURE__ */ c(
|
|
151
|
+
inbox: /* @__PURE__ */ c($, { children: [
|
|
408
152
|
/* @__PURE__ */ e("path", { d: "M3 13h5l1 3h6l1-3h5" }),
|
|
409
153
|
/* @__PURE__ */ e("path", { d: "M5 5h14l2 8v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" })
|
|
410
154
|
] }),
|
|
411
|
-
archive: /* @__PURE__ */ c(
|
|
155
|
+
archive: /* @__PURE__ */ c($, { children: [
|
|
412
156
|
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "5", rx: "1" }),
|
|
413
157
|
/* @__PURE__ */ e("path", { d: "M5 9v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9M10 13h4" })
|
|
414
158
|
] }),
|
|
415
|
-
trash: /* @__PURE__ */ c(
|
|
159
|
+
trash: /* @__PURE__ */ c($, { children: [
|
|
416
160
|
/* @__PURE__ */ e("path", { d: "M4 7h16M10 11v6M14 11v6" }),
|
|
417
161
|
/* @__PURE__ */ e("path", { d: "M6 7l1 13a2 2 0 0 0 2 1h6a2 2 0 0 0 2-1l1-13M9 7V4h6v3" })
|
|
418
162
|
] }),
|
|
419
163
|
paperclip: /* @__PURE__ */ e("path", { d: "m20 11-8.5 8.5a5 5 0 0 1-7-7L13 4a3.5 3.5 0 0 1 5 5l-8.5 8.5a2 2 0 0 1-3-3L14 7" }),
|
|
420
|
-
mic: /* @__PURE__ */ c(
|
|
164
|
+
mic: /* @__PURE__ */ c($, { children: [
|
|
421
165
|
/* @__PURE__ */ e("rect", { x: "9", y: "3", width: "6", height: "11", rx: "3" }),
|
|
422
166
|
/* @__PURE__ */ e("path", { d: "M5 11a7 7 0 0 0 14 0M12 18v3" })
|
|
423
167
|
] }),
|
|
424
|
-
speaker: /* @__PURE__ */ c(
|
|
168
|
+
speaker: /* @__PURE__ */ c($, { children: [
|
|
425
169
|
/* @__PURE__ */ e("path", { d: "M4 9h4l5-4v14l-5-4H4Z" }),
|
|
426
170
|
/* @__PURE__ */ e("path", { d: "M16 9a4 4 0 0 1 0 6M19 6a8 8 0 0 1 0 12" })
|
|
427
171
|
] }),
|
|
428
|
-
"user-plus": /* @__PURE__ */ c(
|
|
172
|
+
"user-plus": /* @__PURE__ */ c($, { children: [
|
|
429
173
|
/* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
|
|
430
174
|
/* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M19 8v6M16 11h6" })
|
|
431
175
|
] }),
|
|
432
176
|
// A person, nothing more: one whose account is gone.
|
|
433
|
-
user: /* @__PURE__ */ c(
|
|
177
|
+
user: /* @__PURE__ */ c($, { children: [
|
|
434
178
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "8", r: "4" }),
|
|
435
179
|
/* @__PURE__ */ e("path", { d: "M4 21a8 8 0 0 1 16 0" })
|
|
436
180
|
] }),
|
|
437
181
|
// A person with a tick: someone allowed.
|
|
438
|
-
"user-check": /* @__PURE__ */ c(
|
|
182
|
+
"user-check": /* @__PURE__ */ c($, { children: [
|
|
439
183
|
/* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
|
|
440
184
|
/* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M16 11l2 2 4-4" })
|
|
441
185
|
] }),
|
|
442
186
|
// A person with a cross: someone no longer allowed.
|
|
443
|
-
"user-x": /* @__PURE__ */ c(
|
|
187
|
+
"user-x": /* @__PURE__ */ c($, { children: [
|
|
444
188
|
/* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
|
|
445
189
|
/* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M17 8l4 4M21 8l-4 4" })
|
|
446
190
|
] }),
|
|
447
191
|
// Two people: the members of a group.
|
|
448
|
-
users: /* @__PURE__ */ c(
|
|
192
|
+
users: /* @__PURE__ */ c($, { children: [
|
|
449
193
|
/* @__PURE__ */ e("circle", { cx: "9", cy: "8", r: "3.5" }),
|
|
450
194
|
/* @__PURE__ */ e("path", { d: "M2.5 20a6.5 6.5 0 0 1 13 0M16 4.6a3.5 3.5 0 0 1 0 6.8M18 14a6.5 6.5 0 0 1 3.5 6" })
|
|
451
195
|
] }),
|
|
452
196
|
"phone-off": /* @__PURE__ */ e("path", { d: "M3 14c5-5 13-5 18 0l-2 3-4-1v-3a10 10 0 0 0-6 0v3l-4 1Z" }),
|
|
453
|
-
video: /* @__PURE__ */ c(
|
|
197
|
+
video: /* @__PURE__ */ c($, { children: [
|
|
454
198
|
/* @__PURE__ */ e("rect", { x: "3", y: "6", width: "13", height: "12", rx: "2" }),
|
|
455
199
|
/* @__PURE__ */ e("path", { d: "m16 10 5-3v10l-5-3" })
|
|
456
200
|
] }),
|
|
457
|
-
info: /* @__PURE__ */ c(
|
|
201
|
+
info: /* @__PURE__ */ c($, { children: [
|
|
458
202
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "9" }),
|
|
459
203
|
/* @__PURE__ */ e("path", { d: "M12 11v6M12 7.5v.5" })
|
|
460
204
|
] }),
|
|
@@ -463,17 +207,17 @@ const xn = {
|
|
|
463
207
|
plus: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" }),
|
|
464
208
|
folder: /* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
|
|
465
209
|
// The folder with a plus inside: a new folder.
|
|
466
|
-
"folder-plus": /* @__PURE__ */ c(
|
|
210
|
+
"folder-plus": /* @__PURE__ */ c($, { children: [
|
|
467
211
|
/* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
|
|
468
212
|
/* @__PURE__ */ e("path", { d: "M12 10.5v6M9 13.5h6" })
|
|
469
213
|
] }),
|
|
470
214
|
// The folder with a cross inside: a folder removed.
|
|
471
|
-
"folder-x": /* @__PURE__ */ c(
|
|
215
|
+
"folder-x": /* @__PURE__ */ c($, { children: [
|
|
472
216
|
/* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
|
|
473
217
|
/* @__PURE__ */ e("path", { d: "m9.5 11 5 5M14.5 11l-5 5" })
|
|
474
218
|
] }),
|
|
475
219
|
check: /* @__PURE__ */ e("path", { d: "m5 12 5 5 9-10" }),
|
|
476
|
-
server: /* @__PURE__ */ c(
|
|
220
|
+
server: /* @__PURE__ */ c($, { children: [
|
|
477
221
|
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "7", rx: "2" }),
|
|
478
222
|
/* @__PURE__ */ e("rect", { x: "3", y: "13", width: "18", height: "7", rx: "2" }),
|
|
479
223
|
/* @__PURE__ */ e("path", { d: "M7 7.5h.5M7 16.5h.5" })
|
|
@@ -487,9 +231,19 @@ const xn = {
|
|
|
487
231
|
hash: /* @__PURE__ */ e("path", { d: "M10 4 8 20M16 4l-2 16M5 9h15M4 15h15" }),
|
|
488
232
|
// A funnel: a list's filter.
|
|
489
233
|
funnel: /* @__PURE__ */ e("path", { d: "M4 5h16l-6 8v6l-4-2v-4Z" }),
|
|
234
|
+
// An eye: what is hidden is shown. Struck through: it is hidden again.
|
|
235
|
+
eye: /* @__PURE__ */ c($, { children: [
|
|
236
|
+
/* @__PURE__ */ e("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" }),
|
|
237
|
+
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
|
|
238
|
+
] }),
|
|
239
|
+
"eye-off": /* @__PURE__ */ c($, { children: [
|
|
240
|
+
/* @__PURE__ */ e("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" }),
|
|
241
|
+
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" }),
|
|
242
|
+
/* @__PURE__ */ e("path", { d: "m4 4 16 16" })
|
|
243
|
+
] }),
|
|
490
244
|
important: /* @__PURE__ */ e("path", { d: "M4 6h11l5 6-5 6H4l4-6-4-6Z" })
|
|
491
245
|
};
|
|
492
|
-
function
|
|
246
|
+
function B({ name: n, size: t = 20, label: l }) {
|
|
493
247
|
return /* @__PURE__ */ e(
|
|
494
248
|
"svg",
|
|
495
249
|
{
|
|
@@ -504,11 +258,11 @@ function $({ name: n, size: t = 20, label: l }) {
|
|
|
504
258
|
strokeLinejoin: "round",
|
|
505
259
|
focusable: !1,
|
|
506
260
|
...l ? { role: "img", "aria-label": l } : { "aria-hidden": !0 },
|
|
507
|
-
children:
|
|
261
|
+
children: kn[n]
|
|
508
262
|
}
|
|
509
263
|
);
|
|
510
264
|
}
|
|
511
|
-
const
|
|
265
|
+
const zt = Object.keys(kn), pn = {
|
|
512
266
|
reply: "reply",
|
|
513
267
|
"reply-all": "reply",
|
|
514
268
|
forward: "forward",
|
|
@@ -549,12 +303,14 @@ const Gt = Object.keys(xn), pn = {
|
|
|
549
303
|
images: "image",
|
|
550
304
|
paperclip: "paperclip",
|
|
551
305
|
hash: "hash",
|
|
552
|
-
funnel: "funnel"
|
|
306
|
+
funnel: "funnel",
|
|
307
|
+
eye: "eye",
|
|
308
|
+
"eye-slash": "eye-off"
|
|
553
309
|
};
|
|
554
310
|
function Ue(n) {
|
|
555
311
|
return Object.prototype.hasOwnProperty.call(pn, n) ? pn[n] : null;
|
|
556
312
|
}
|
|
557
|
-
function
|
|
313
|
+
function Bn() {
|
|
558
314
|
try {
|
|
559
315
|
return process.env.NODE_ENV !== "production";
|
|
560
316
|
} catch {
|
|
@@ -562,18 +318,290 @@ function Kn() {
|
|
|
562
318
|
}
|
|
563
319
|
}
|
|
564
320
|
const bn = /* @__PURE__ */ new Set();
|
|
565
|
-
function
|
|
321
|
+
function Fn({ name: n, size: t = 18 }) {
|
|
566
322
|
if (n === "") return null;
|
|
567
323
|
const l = Ue(n);
|
|
568
|
-
return l !== null ? /* @__PURE__ */ e(
|
|
324
|
+
return l !== null ? /* @__PURE__ */ e(B, { name: l, size: t }) : (!bn.has(n) && Bn() && (bn.add(n), console.warn(`@coolms/ui-react: no icon for the server's icon name "${n}"; its space is kept empty`)), /* @__PURE__ */ e("span", { className: "cms-icon cms-icon--blank", style: { width: t, height: t }, "aria-hidden": "true", "data-icon-name": n }));
|
|
325
|
+
}
|
|
326
|
+
function sn({ id: n, label: t, help: l, error: r, pinned: s, children: a }) {
|
|
327
|
+
return /* @__PURE__ */ c("div", { className: H("cms-field", r != null && "is-invalid"), children: [
|
|
328
|
+
/* @__PURE__ */ e("label", { className: "cms-field__label", htmlFor: n, children: t }),
|
|
329
|
+
a,
|
|
330
|
+
s != null ? /* @__PURE__ */ c("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
|
|
331
|
+
/* @__PURE__ */ e(re, { name: "lock" }),
|
|
332
|
+
" ",
|
|
333
|
+
s
|
|
334
|
+
] }) : null,
|
|
335
|
+
r != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: r }) : null,
|
|
336
|
+
l != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${n}-help`, children: l }) : null
|
|
337
|
+
] });
|
|
338
|
+
}
|
|
339
|
+
function rn(n, t) {
|
|
340
|
+
const l = [t.error != null && `${n}-error`, t.pinned != null && `${n}-pinned`, t.help != null && `${n}-help`].filter(Boolean).join(" ");
|
|
341
|
+
return l === "" ? void 0 : l;
|
|
342
|
+
}
|
|
343
|
+
const Hn = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Rn = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
|
|
344
|
+
function On(n, t, l) {
|
|
345
|
+
const r = (a, h, d, m = 0, b = 0, i = 0) => {
|
|
346
|
+
const g = new Date(Date.UTC(a, h - 1, d, m, b, i));
|
|
347
|
+
return g.setUTCFullYear(a), g.getUTCFullYear() === a && g.getUTCMonth() === h - 1 && g.getUTCDate() === d && g.getUTCHours() === m && g.getUTCMinutes() === b && g.getUTCSeconds() === i ? g : null;
|
|
348
|
+
}, s = (a) => ({ hour: Number(a[1]), minute: Number(a[2]), second: Number(a[3] ?? 0) });
|
|
349
|
+
try {
|
|
350
|
+
if (n === "time") {
|
|
351
|
+
const h = t.match(Rn);
|
|
352
|
+
if (h === null) return t;
|
|
353
|
+
const d = s(h), m = r(2e3, 1, 1, d.hour, d.minute, d.second);
|
|
354
|
+
return m === null ? t : new Intl.DateTimeFormat(l, { timeStyle: h[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
|
|
355
|
+
}
|
|
356
|
+
const a = t.match(Hn);
|
|
357
|
+
if (a === null) return t;
|
|
358
|
+
if (n === "date" && a[4] === void 0) {
|
|
359
|
+
const h = r(Number(a[1]), Number(a[2]), Number(a[3]));
|
|
360
|
+
return h === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeZone: "UTC" }).format(h);
|
|
361
|
+
}
|
|
362
|
+
if (n === "datetime-local" && a[4] !== void 0) {
|
|
363
|
+
const h = r(Number(a[1]), Number(a[2]), Number(a[3]), Number(a[4]), Number(a[5]), Number(a[6] ?? 0));
|
|
364
|
+
return h === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeStyle: a[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(h);
|
|
365
|
+
}
|
|
366
|
+
} catch {
|
|
367
|
+
return t;
|
|
368
|
+
}
|
|
369
|
+
return t;
|
|
370
|
+
}
|
|
371
|
+
const Pn = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
|
|
372
|
+
function Ut({ label: n, help: t, error: l, disabled: r, readOnly: s, pinned: a, value: h, onChange: d, placeholder: m, type: b = "text", name: i, locale: g, min: f, max: v, step: u, minLength: y, maxLength: S, required: T, autoComplete: M, reveal: E }) {
|
|
373
|
+
const _ = fe(), [N, I] = D(!1), K = s === !0 || a != null, z = K && Pn.has(b), k = b === "number" && (u === "any" || typeof u == "number" && !Number.isInteger(u)), F = b === "password" && E !== void 0 && !K, U = /* @__PURE__ */ e(
|
|
374
|
+
"input",
|
|
375
|
+
{
|
|
376
|
+
id: _,
|
|
377
|
+
name: i,
|
|
378
|
+
type: z || F && N ? "text" : b,
|
|
379
|
+
autoComplete: M,
|
|
380
|
+
className: "cms-input",
|
|
381
|
+
value: z ? On(b, h, g) : h,
|
|
382
|
+
...z ? { "data-value": h } : {},
|
|
383
|
+
lang: g,
|
|
384
|
+
placeholder: m,
|
|
385
|
+
disabled: r,
|
|
386
|
+
readOnly: K,
|
|
387
|
+
required: T,
|
|
388
|
+
"aria-required": T || void 0,
|
|
389
|
+
min: z ? void 0 : f,
|
|
390
|
+
max: z ? void 0 : v,
|
|
391
|
+
step: z ? void 0 : u,
|
|
392
|
+
minLength: y,
|
|
393
|
+
maxLength: S,
|
|
394
|
+
inputMode: b === "number" ? k ? "decimal" : "numeric" : void 0,
|
|
395
|
+
"aria-invalid": l != null || void 0,
|
|
396
|
+
"aria-describedby": rn(_, { help: t, error: l, pinned: a }),
|
|
397
|
+
onChange: (Y) => d == null ? void 0 : d(Y.target.value)
|
|
398
|
+
}
|
|
399
|
+
);
|
|
400
|
+
return /* @__PURE__ */ e(sn, { id: _, label: n, help: t, error: l, pinned: a, children: F ? /* @__PURE__ */ c("span", { className: "cms-input-reveal", children: [
|
|
401
|
+
U,
|
|
402
|
+
/* @__PURE__ */ e(
|
|
403
|
+
"button",
|
|
404
|
+
{
|
|
405
|
+
type: "button",
|
|
406
|
+
className: "cms-input-reveal__button",
|
|
407
|
+
"aria-controls": _,
|
|
408
|
+
"aria-label": N ? E.hide : E.show,
|
|
409
|
+
title: N ? E.hide : E.show,
|
|
410
|
+
disabled: r,
|
|
411
|
+
onClick: () => I((Y) => !Y),
|
|
412
|
+
children: /* @__PURE__ */ e(B, { name: N ? "eye-off" : "eye", size: 18 })
|
|
413
|
+
}
|
|
414
|
+
)
|
|
415
|
+
] }) : U });
|
|
416
|
+
}
|
|
417
|
+
function Kt({ label: n, help: t, error: l, disabled: r, readOnly: s, pinned: a, value: h, onChange: d, placeholder: m, rows: b = 4, name: i, locale: g, minLength: f, maxLength: v, required: u }) {
|
|
418
|
+
const y = fe();
|
|
419
|
+
return /* @__PURE__ */ e(sn, { id: y, label: n, help: t, error: l, pinned: a, children: /* @__PURE__ */ e(
|
|
420
|
+
"textarea",
|
|
421
|
+
{
|
|
422
|
+
id: y,
|
|
423
|
+
name: i,
|
|
424
|
+
className: "cms-input cms-textarea",
|
|
425
|
+
rows: b,
|
|
426
|
+
value: h,
|
|
427
|
+
lang: g,
|
|
428
|
+
placeholder: m,
|
|
429
|
+
disabled: r,
|
|
430
|
+
readOnly: s === !0 || a != null,
|
|
431
|
+
required: u,
|
|
432
|
+
"aria-required": u || void 0,
|
|
433
|
+
minLength: f,
|
|
434
|
+
maxLength: v,
|
|
435
|
+
"aria-invalid": l != null || void 0,
|
|
436
|
+
"aria-describedby": rn(y, { help: t, error: l, pinned: a }),
|
|
437
|
+
onChange: (S) => d == null ? void 0 : d(S.target.value)
|
|
438
|
+
}
|
|
439
|
+
) });
|
|
440
|
+
}
|
|
441
|
+
function Wt({ label: n, help: t, error: l, disabled: r, readOnly: s, value: a, options: h, onChange: d, emptyText: m = "Nothing to choose from yet.", name: b }) {
|
|
442
|
+
const i = fe(), g = h.length === 0;
|
|
443
|
+
return /* @__PURE__ */ e(sn, { id: i, label: n, help: g ? m : t, error: l, children: /* @__PURE__ */ e(
|
|
444
|
+
"select",
|
|
445
|
+
{
|
|
446
|
+
id: i,
|
|
447
|
+
name: b,
|
|
448
|
+
className: "cms-input cms-select",
|
|
449
|
+
value: a,
|
|
450
|
+
disabled: r || g,
|
|
451
|
+
"aria-readonly": s || void 0,
|
|
452
|
+
"aria-invalid": l != null || void 0,
|
|
453
|
+
"aria-describedby": rn(i, { help: g ? m : t, error: l }),
|
|
454
|
+
onChange: (f) => {
|
|
455
|
+
s || d == null || d(f.target.value);
|
|
456
|
+
},
|
|
457
|
+
children: h.map((f) => /* @__PURE__ */ e("option", { value: f.value, disabled: s && f.value !== a, children: f.label }, f.value))
|
|
458
|
+
}
|
|
459
|
+
) });
|
|
460
|
+
}
|
|
461
|
+
function Zt({ label: n, checked: t, onChange: l, disabled: r, readOnly: s, help: a }) {
|
|
462
|
+
const h = fe();
|
|
463
|
+
return /* @__PURE__ */ c("div", { className: "cms-toggle-row", children: [
|
|
464
|
+
/* @__PURE__ */ e(
|
|
465
|
+
"button",
|
|
466
|
+
{
|
|
467
|
+
id: h,
|
|
468
|
+
type: "button",
|
|
469
|
+
role: "switch",
|
|
470
|
+
className: H("cms-toggle", t && "is-on"),
|
|
471
|
+
"aria-checked": t,
|
|
472
|
+
"aria-readonly": s || void 0,
|
|
473
|
+
"aria-describedby": a != null ? `${h}-help` : void 0,
|
|
474
|
+
disabled: r,
|
|
475
|
+
onClick: () => {
|
|
476
|
+
s || l == null || l(!t);
|
|
477
|
+
},
|
|
478
|
+
children: /* @__PURE__ */ e("span", { className: "cms-toggle__thumb" })
|
|
479
|
+
}
|
|
480
|
+
),
|
|
481
|
+
/* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: h, children: n }),
|
|
482
|
+
a != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${h}-help`, children: a }) : null
|
|
483
|
+
] });
|
|
484
|
+
}
|
|
485
|
+
const zn = 150;
|
|
486
|
+
function xn({ open: n, title: t, onClose: l, dirty: r = !1, onDirtyClose: s, children: a, footer: h, closeLabel: d = "Close", initialFocus: m, className: b }) {
|
|
487
|
+
const [i, g] = D(n), [f, v] = D(!1), u = P(null), y = P(null), S = fe();
|
|
488
|
+
if (ee(() => {
|
|
489
|
+
if (n) {
|
|
490
|
+
y.current = document.activeElement, g(!0), v(!1);
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
if (!i) return;
|
|
494
|
+
v(!0);
|
|
495
|
+
const M = window.setTimeout(() => {
|
|
496
|
+
var E, _;
|
|
497
|
+
g(!1), v(!1), (_ = (E = y.current) == null ? void 0 : E.focus) == null || _.call(E);
|
|
498
|
+
}, zn);
|
|
499
|
+
return () => window.clearTimeout(M);
|
|
500
|
+
}, [n, i]), ee(() => {
|
|
501
|
+
var M, E;
|
|
502
|
+
if (n && i) {
|
|
503
|
+
const _ = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
|
|
504
|
+
(E = (m == null ? void 0 : m.current) ?? ((M = u.current) == null ? void 0 : M.querySelector(`.cms-modal__body :is(${_}), .cms-modal__foot :is(${_})`)) ?? u.current) == null || E.focus();
|
|
505
|
+
}
|
|
506
|
+
}, [n, i, m]), !i) return null;
|
|
507
|
+
const T = () => {
|
|
508
|
+
r ? s == null || s() : l();
|
|
509
|
+
};
|
|
510
|
+
return ln(
|
|
511
|
+
/* @__PURE__ */ e("div", { className: H("cms-modal-scrim", f && "is-closing"), onMouseDown: (M) => {
|
|
512
|
+
M.target === M.currentTarget && T();
|
|
513
|
+
}, children: /* @__PURE__ */ c(
|
|
514
|
+
"div",
|
|
515
|
+
{
|
|
516
|
+
ref: u,
|
|
517
|
+
className: H("cms-modal", b, f && "is-closing", r && "is-dirty"),
|
|
518
|
+
role: "dialog",
|
|
519
|
+
"aria-modal": "true",
|
|
520
|
+
"aria-labelledby": S,
|
|
521
|
+
tabIndex: -1,
|
|
522
|
+
onKeyDown: (M) => {
|
|
523
|
+
var E;
|
|
524
|
+
if (M.key === "Escape")
|
|
525
|
+
M.stopPropagation(), T();
|
|
526
|
+
else if (M.key === "Tab") {
|
|
527
|
+
const _ = (E = u.current) == null ? void 0 : E.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
|
|
528
|
+
if (!_ || _.length === 0) return;
|
|
529
|
+
const N = _[0], I = _[_.length - 1];
|
|
530
|
+
M.shiftKey && document.activeElement === N ? (M.preventDefault(), I.focus()) : !M.shiftKey && document.activeElement === I && (M.preventDefault(), N.focus());
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
children: [
|
|
534
|
+
/* @__PURE__ */ c("header", { className: "cms-modal__head", children: [
|
|
535
|
+
/* @__PURE__ */ e("h2", { className: "cms-modal__title", id: S, children: t }),
|
|
536
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": d, onClick: T, children: /* @__PURE__ */ e(re, { name: "close" }) })
|
|
537
|
+
] }),
|
|
538
|
+
/* @__PURE__ */ e("div", { className: "cms-modal__body", children: a }),
|
|
539
|
+
h != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: h }) : null
|
|
540
|
+
]
|
|
541
|
+
}
|
|
542
|
+
) }),
|
|
543
|
+
document.body
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
function Vt({ open: n, title: t, message: l, kind: r = "default", confirmLabel: s, cancelLabel: a, closeLabel: h, onConfirm: d, onCancel: m }) {
|
|
547
|
+
const b = r === "discard-changes";
|
|
548
|
+
return /* @__PURE__ */ e(
|
|
549
|
+
xn,
|
|
550
|
+
{
|
|
551
|
+
open: n,
|
|
552
|
+
title: t,
|
|
553
|
+
onClose: m,
|
|
554
|
+
...h === void 0 ? {} : { closeLabel: h },
|
|
555
|
+
footer: /* @__PURE__ */ c($, { children: [
|
|
556
|
+
/* @__PURE__ */ e(De, { onClick: m, children: a ?? (b ? "Keep editing" : "Cancel") }),
|
|
557
|
+
/* @__PURE__ */ e(De, { variant: r === "default" ? "primary" : "danger", onClick: d, children: s ?? (b ? "Discard changes" : "Confirm") })
|
|
558
|
+
] }),
|
|
559
|
+
children: r !== "default" ? /* @__PURE__ */ c("p", { className: "cms-confirm__warning", children: [
|
|
560
|
+
/* @__PURE__ */ e(re, { name: "warning" }),
|
|
561
|
+
" ",
|
|
562
|
+
l
|
|
563
|
+
] }) : /* @__PURE__ */ e("p", { children: l })
|
|
564
|
+
}
|
|
565
|
+
);
|
|
566
|
+
}
|
|
567
|
+
function qt({ kind: n, message: t, action: l, onDismiss: r, dismissLabel: s = "Dismiss" }) {
|
|
568
|
+
return /* @__PURE__ */ c("div", { className: H("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
|
|
569
|
+
/* @__PURE__ */ e(re, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
|
|
570
|
+
/* @__PURE__ */ e("span", { className: "cms-toast__message", children: t }),
|
|
571
|
+
l ? /* @__PURE__ */ e(De, { className: "cms-toast__action", onClick: l.onAction, children: l.label }) : null,
|
|
572
|
+
r ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": s, onClick: r, children: /* @__PURE__ */ e(re, { name: "close" }) }) : null
|
|
573
|
+
] });
|
|
574
|
+
}
|
|
575
|
+
function Gt({ children: n }) {
|
|
576
|
+
return /* @__PURE__ */ e("div", { className: "cms-toast-region", children: n });
|
|
577
|
+
}
|
|
578
|
+
function Un({ what: n, layout: t = "inline" }) {
|
|
579
|
+
return /* @__PURE__ */ c("div", { className: H("cms-loading", `cms-loading--${t}`), role: "status", "aria-live": "polite", children: [
|
|
580
|
+
/* @__PURE__ */ e(re, { name: "spinner" }),
|
|
581
|
+
/* @__PURE__ */ e("span", { children: n })
|
|
582
|
+
] });
|
|
583
|
+
}
|
|
584
|
+
function Kn({ title: n, hint: t, action: l }) {
|
|
585
|
+
return /* @__PURE__ */ c("div", { className: "cms-empty", children: [
|
|
586
|
+
/* @__PURE__ */ e("p", { className: "cms-empty__title", children: n }),
|
|
587
|
+
t != null ? /* @__PURE__ */ e("p", { className: "cms-empty__hint", children: t }) : null,
|
|
588
|
+
l != null ? /* @__PURE__ */ e("div", { className: "cms-empty__action", children: l }) : null
|
|
589
|
+
] });
|
|
590
|
+
}
|
|
591
|
+
function Wn({ message: n, onRetry: t, retryLabel: l = "Try again" }) {
|
|
592
|
+
return /* @__PURE__ */ c("div", { className: "cms-error-banner", role: "alert", children: [
|
|
593
|
+
/* @__PURE__ */ e(re, { name: "warning" }),
|
|
594
|
+
/* @__PURE__ */ e("span", { className: "cms-error-banner__message", children: n }),
|
|
595
|
+
t ? /* @__PURE__ */ e(De, { onClick: t, children: l }) : null
|
|
596
|
+
] });
|
|
569
597
|
}
|
|
570
598
|
const Je = 300;
|
|
571
|
-
function
|
|
599
|
+
function Zn() {
|
|
572
600
|
if (typeof window > "u" || typeof getComputedStyle != "function") return Je;
|
|
573
601
|
const n = getComputedStyle(document.documentElement).getPropertyValue("--cms-state-delay").trim(), t = n.endsWith("ms") ? Number.parseFloat(n) : n.endsWith("s") ? Number.parseFloat(n) * 1e3 : Number.NaN;
|
|
574
602
|
return Number.isFinite(t) && t >= 0 ? t : Je;
|
|
575
603
|
}
|
|
576
|
-
function
|
|
604
|
+
function Vn() {
|
|
577
605
|
return /* @__PURE__ */ c("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
|
|
578
606
|
/* @__PURE__ */ e("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
|
|
579
607
|
/* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
|
|
@@ -581,25 +609,25 @@ function Zn() {
|
|
|
581
609
|
}
|
|
582
610
|
function Le({ kind: n, title: t, description: l, action: r, placement: s = "block", icon: a }) {
|
|
583
611
|
const [h, d] = D(n !== "loading");
|
|
584
|
-
return
|
|
612
|
+
return ee(() => {
|
|
585
613
|
if (n !== "loading") {
|
|
586
614
|
d(!0);
|
|
587
615
|
return;
|
|
588
616
|
}
|
|
589
617
|
d(!1);
|
|
590
|
-
const m = window.setTimeout(() => d(!0),
|
|
618
|
+
const m = window.setTimeout(() => d(!0), Zn());
|
|
591
619
|
return () => window.clearTimeout(m);
|
|
592
620
|
}, [n]), /* @__PURE__ */ c(
|
|
593
621
|
"div",
|
|
594
622
|
{
|
|
595
|
-
className:
|
|
623
|
+
className: H("cms-state", `cms-state--${n}`, `cms-state--${s}`, !h && "is-waiting"),
|
|
596
624
|
role: "status",
|
|
597
625
|
"aria-live": "polite",
|
|
598
626
|
"data-kind": n,
|
|
599
627
|
children: [
|
|
600
|
-
n === "loading" ? /* @__PURE__ */ e(
|
|
628
|
+
n === "loading" ? /* @__PURE__ */ e(Vn, {}) : null,
|
|
601
629
|
n === "error" || n === "denied" ? /* @__PURE__ */ e(re, { name: n === "error" ? "warning" : "lock" }) : null,
|
|
602
|
-
n === "empty" && a !== void 0 && Ue(a) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
630
|
+
n === "empty" && a !== void 0 && Ue(a) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(Fn, { name: a, size: s === "page" ? 32 : 24 }) }) : null,
|
|
603
631
|
/* @__PURE__ */ c("span", { className: "cms-state__text", children: [
|
|
604
632
|
/* @__PURE__ */ e("span", { className: "cms-state__title", children: t }),
|
|
605
633
|
l !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: l }) : null
|
|
@@ -620,61 +648,61 @@ function Xn(n) {
|
|
|
620
648
|
return n.getClientRects().length > 0;
|
|
621
649
|
}
|
|
622
650
|
function jt(n) {
|
|
623
|
-
const { name: t, badge: l, closeLabel: r, onClose: s, actions: a = [], moreLabel: h = "More", edit: d, editing: m, state: b, siblings: i, bar: g, thumbnails: f, strip: v, onZoom: u, children:
|
|
624
|
-
|
|
651
|
+
const { name: t, badge: l, closeLabel: r, onClose: s, actions: a = [], moreLabel: h = "More", edit: d, editing: m, state: b, siblings: i, bar: g, thumbnails: f, strip: v, onZoom: u, children: y } = n, S = P(null), T = P(null), M = fe(), [E, _] = D(!1), N = P(null);
|
|
652
|
+
ee(() => {
|
|
625
653
|
var U;
|
|
626
|
-
const k = document.activeElement,
|
|
627
|
-
return document.body.style.overflow = "hidden", (U =
|
|
628
|
-
var
|
|
629
|
-
document.body.style.overflow =
|
|
654
|
+
const k = document.activeElement, F = document.body.style.overflow;
|
|
655
|
+
return document.body.style.overflow = "hidden", (U = T.current) == null || U.focus(), () => {
|
|
656
|
+
var Y;
|
|
657
|
+
document.body.style.overflow = F, (Y = k == null ? void 0 : k.focus) == null || Y.call(k);
|
|
630
658
|
};
|
|
631
659
|
}, []);
|
|
632
660
|
const I = () => {
|
|
633
661
|
m != null && m.dirty ? m.onDirtyClose() : s();
|
|
634
|
-
},
|
|
635
|
-
const
|
|
636
|
-
N.current =
|
|
637
|
-
},
|
|
638
|
-
var
|
|
639
|
-
const
|
|
640
|
-
if (N.current = null,
|
|
641
|
-
const
|
|
642
|
-
Math.abs(
|
|
662
|
+
}, K = (k) => {
|
|
663
|
+
const F = k.touches.length === 1 ? k.touches[0] : void 0;
|
|
664
|
+
N.current = F === void 0 || m !== void 0 || Yn(k.target) ? null : { x: F.clientX, y: F.clientY };
|
|
665
|
+
}, z = (k) => {
|
|
666
|
+
var W, j;
|
|
667
|
+
const F = N.current, U = k.changedTouches[0];
|
|
668
|
+
if (N.current = null, F === null || U === void 0) return;
|
|
669
|
+
const Y = U.clientX - F.x;
|
|
670
|
+
Math.abs(Y) < Gn || Math.abs(Y) < Math.abs(U.clientY - F.y) || (Y > 0 ? (W = i == null ? void 0 : i.onPrevious) == null || W.call(i) : (j = i == null ? void 0 : i.onNext) == null || j.call(i));
|
|
643
671
|
};
|
|
644
672
|
return ln(
|
|
645
673
|
/* @__PURE__ */ c(
|
|
646
674
|
"div",
|
|
647
675
|
{
|
|
648
676
|
ref: S,
|
|
649
|
-
className:
|
|
677
|
+
className: H("cms-viewer", m !== void 0 && "is-editing"),
|
|
650
678
|
role: "dialog",
|
|
651
679
|
"aria-modal": "true",
|
|
652
|
-
"aria-labelledby":
|
|
680
|
+
"aria-labelledby": M,
|
|
653
681
|
tabIndex: -1,
|
|
654
682
|
onKeyDown: (k) => {
|
|
655
|
-
var
|
|
683
|
+
var F, U, Y;
|
|
656
684
|
if (k.key === "Escape") {
|
|
657
685
|
if (m !== void 0) return;
|
|
658
|
-
k.stopPropagation(),
|
|
686
|
+
k.stopPropagation(), E ? _(!1) : s();
|
|
659
687
|
} else if (k.key === "Tab") {
|
|
660
|
-
const
|
|
661
|
-
if (
|
|
662
|
-
const j =
|
|
663
|
-
k.shiftKey && document.activeElement === j ? (k.preventDefault(),
|
|
664
|
-
} else m === void 0 && !jn(k.target) && !k.ctrlKey && !k.metaKey && !k.altKey && (k.key === "ArrowLeft" ? (U = i == null ? void 0 : i.onPrevious) == null || U.call(i) : k.key === "ArrowRight" ? (
|
|
688
|
+
const W = Array.from(((F = S.current) == null ? void 0 : F.querySelectorAll(qn)) ?? []).filter(Xn);
|
|
689
|
+
if (W.length === 0) return;
|
|
690
|
+
const j = W[0], X = W[W.length - 1];
|
|
691
|
+
k.shiftKey && document.activeElement === j ? (k.preventDefault(), X.focus()) : !k.shiftKey && document.activeElement === X && (k.preventDefault(), j.focus());
|
|
692
|
+
} else m === void 0 && !jn(k.target) && !k.ctrlKey && !k.metaKey && !k.altKey && (k.key === "ArrowLeft" ? (U = i == null ? void 0 : i.onPrevious) == null || U.call(i) : k.key === "ArrowRight" ? (Y = i == null ? void 0 : i.onNext) == null || Y.call(i) : k.key === "+" || k.key === "=" ? u == null || u("in") : k.key === "-" ? u == null || u("out") : k.key === "0" && (u == null || u("reset")));
|
|
665
693
|
},
|
|
666
694
|
children: [
|
|
667
695
|
i !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${t}, ${i.position}` }) : null,
|
|
668
696
|
/* @__PURE__ */ c("header", { className: "cms-viewer__top", children: [
|
|
669
|
-
/* @__PURE__ */ e("button", { ref:
|
|
697
|
+
/* @__PURE__ */ e("button", { ref: T, type: "button", className: "cms-viewer__icon", "aria-label": r, onClick: I, children: /* @__PURE__ */ e(re, { name: "close" }) }),
|
|
670
698
|
/* @__PURE__ */ e("span", { className: "cms-viewer__badge", children: l }),
|
|
671
|
-
/* @__PURE__ */ e("h2", { className: "cms-viewer__name", id:
|
|
699
|
+
/* @__PURE__ */ e("h2", { className: "cms-viewer__name", id: M, title: t, children: t }),
|
|
672
700
|
i !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: i.position }) : null,
|
|
673
701
|
/* @__PURE__ */ e("span", { className: "cms-viewer__space" }),
|
|
674
|
-
m !== void 0 ? /* @__PURE__ */ c(
|
|
702
|
+
m !== void 0 ? /* @__PURE__ */ c($, { children: [
|
|
675
703
|
/* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: m.status }),
|
|
676
704
|
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: m.onDone, children: m.doneLabel })
|
|
677
|
-
] }) : /* @__PURE__ */ c(
|
|
705
|
+
] }) : /* @__PURE__ */ c($, { children: [
|
|
678
706
|
/* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: a.map((k) => /* @__PURE__ */ c("button", { type: "button", className: "cms-viewer__button", onClick: k.onSelect, children: [
|
|
679
707
|
k.icon,
|
|
680
708
|
k.label
|
|
@@ -684,8 +712,8 @@ function jt(n) {
|
|
|
684
712
|
/* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: d.label })
|
|
685
713
|
] }) : null,
|
|
686
714
|
a.length > 0 ? /* @__PURE__ */ c("span", { className: "cms-viewer__more", children: [
|
|
687
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": h, "aria-expanded":
|
|
688
|
-
|
|
715
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": h, "aria-expanded": E, onClick: () => _((k) => !k), children: /* @__PURE__ */ e(B, { name: "more" }) }),
|
|
716
|
+
E ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: a.map((k) => /* @__PURE__ */ c(
|
|
689
717
|
"button",
|
|
690
718
|
{
|
|
691
719
|
type: "button",
|
|
@@ -705,16 +733,16 @@ function jt(n) {
|
|
|
705
733
|
] }),
|
|
706
734
|
/* @__PURE__ */ c("div", { className: "cms-viewer__body", children: [
|
|
707
735
|
f != null && m === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: f }) : null,
|
|
708
|
-
/* @__PURE__ */ c("div", { className: "cms-viewer__content", onTouchStart:
|
|
736
|
+
/* @__PURE__ */ c("div", { className: "cms-viewer__content", onTouchStart: K, onTouchEnd: z, children: [
|
|
709
737
|
(m == null ? void 0 : m.conflict) !== void 0 ? /* @__PURE__ */ c("div", { className: "cms-viewer__conflict", role: "alert", children: [
|
|
710
738
|
/* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: m.conflict.message }),
|
|
711
739
|
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: m.conflict.onOverwrite, children: m.conflict.overwriteLabel }),
|
|
712
740
|
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: m.conflict.onKeepBoth, children: m.conflict.keepBothLabel })
|
|
713
741
|
] }) : null,
|
|
714
|
-
b === void 0 ?
|
|
742
|
+
b === void 0 ? y : /* @__PURE__ */ e(Jn, { state: b }),
|
|
715
743
|
m === void 0 && (i != null && i.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": i.previousLabel, title: i.previousLabel, onClick: i.onPrevious, children: /* @__PURE__ */ e(re, { name: "back" }) }) : null,
|
|
716
744
|
m === void 0 && (i != null && i.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": i.nextLabel, title: i.nextLabel, onClick: i.onNext, children: /* @__PURE__ */ e(re, { name: "back" }) }) : null,
|
|
717
|
-
m === void 0 && i !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(i.total, 7) }, (k,
|
|
745
|
+
m === void 0 && i !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(i.total, 7) }, (k, F) => /* @__PURE__ */ e("i", { className: F === Math.min(i.index, 6) ? "is-current" : void 0 }, F)) }) : null
|
|
718
746
|
] })
|
|
719
747
|
] }),
|
|
720
748
|
m === void 0 && v != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: v }) : null,
|
|
@@ -766,163 +794,163 @@ class et extends Error {
|
|
|
766
794
|
const Xe = (n, t) => `${n}
|
|
767
795
|
${t}`, nt = (n, t) => n === "" ? t : `${n}/${t}`, tt = 48;
|
|
768
796
|
function Yt(n) {
|
|
769
|
-
var
|
|
770
|
-
const { open: t, spaces: l, list: r, disabledReason: s, budget: a, formatSize: h, labels: d, onConfirm: m, onCancel: b } = n, [i, g] = D(((
|
|
771
|
-
|
|
797
|
+
var te, we;
|
|
798
|
+
const { open: t, spaces: l, list: r, disabledReason: s, budget: a, formatSize: h, labels: d, onConfirm: m, onCancel: b } = n, [i, g] = D(((te = l[0]) == null ? void 0 : te.id) ?? ""), [f, v] = D(""), [u, y] = D({ status: "loading" }), [S, T] = D(0), [M, E] = D(/* @__PURE__ */ new Map()), [_, N] = D(0), [I, K] = D(!1), z = P(null), k = P(!1);
|
|
799
|
+
ee(() => {
|
|
772
800
|
k.current = !1;
|
|
773
801
|
}, [t, i, f]);
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
var
|
|
777
|
-
t && (g(((
|
|
778
|
-
}, [t]),
|
|
802
|
+
const F = fe();
|
|
803
|
+
ee(() => {
|
|
804
|
+
var w;
|
|
805
|
+
t && (g(((w = l[0]) == null ? void 0 : w.id) ?? ""), v(""), E(/* @__PURE__ */ new Map()), K(!1));
|
|
806
|
+
}, [t]), ee(() => {
|
|
779
807
|
if (!t || i === "") return;
|
|
780
|
-
let
|
|
781
|
-
return
|
|
782
|
-
(C) =>
|
|
783
|
-
(C) =>
|
|
808
|
+
let w = !0;
|
|
809
|
+
return y({ status: "loading" }), N(0), r(i, f).then(
|
|
810
|
+
(C) => w && y({ status: "ready", entries: C.entries, next: C.next ?? null, paging: !1 }),
|
|
811
|
+
(C) => w && y({ status: C instanceof Qn ? "denied" : "error" })
|
|
784
812
|
), () => {
|
|
785
|
-
|
|
813
|
+
w = !1;
|
|
786
814
|
};
|
|
787
815
|
}, [t, i, f, r, S]);
|
|
788
816
|
const U = Ie(() => {
|
|
789
817
|
if (u.status !== "ready" || u.next === null || u.paging) return;
|
|
790
|
-
const
|
|
791
|
-
|
|
792
|
-
(
|
|
793
|
-
k.current = !1,
|
|
818
|
+
const w = u.next, C = u.entries;
|
|
819
|
+
y({ ...u, paging: !0 }), r(i, f, w).then(
|
|
820
|
+
(Z) => {
|
|
821
|
+
k.current = !1, y({ status: "ready", entries: [...C, ...Z.entries], next: Z.next ?? null, paging: !1 });
|
|
794
822
|
},
|
|
795
|
-
(
|
|
796
|
-
if (!(
|
|
797
|
-
|
|
823
|
+
(Z) => {
|
|
824
|
+
if (!(Z instanceof et)) {
|
|
825
|
+
y({ status: "ready", entries: C, next: w, paging: !1 });
|
|
798
826
|
return;
|
|
799
827
|
}
|
|
800
828
|
if (k.current) {
|
|
801
|
-
|
|
829
|
+
y({ status: "error" });
|
|
802
830
|
return;
|
|
803
831
|
}
|
|
804
|
-
k.current = !0,
|
|
832
|
+
k.current = !0, T((G) => G + 1);
|
|
805
833
|
}
|
|
806
834
|
);
|
|
807
|
-
}, [u, r, i, f]),
|
|
835
|
+
}, [u, r, i, f]), Y = Ie((w) => {
|
|
808
836
|
var C;
|
|
809
|
-
return ((C = a == null ? void 0 : a.cost) == null ? void 0 : C.call(a,
|
|
810
|
-
}, [a]),
|
|
811
|
-
if (
|
|
812
|
-
const C = s == null ? void 0 : s(
|
|
813
|
-
return C || (
|
|
814
|
-
}, _e = (
|
|
815
|
-
const C = Xe(i,
|
|
816
|
-
!
|
|
817
|
-
const G = new Map(
|
|
818
|
-
return G.has(C) ? G.delete(C) : G.set(C, { ...
|
|
837
|
+
return ((C = a == null ? void 0 : a.cost) == null ? void 0 : C.call(a, w)) ?? w.size ?? 0;
|
|
838
|
+
}, [a]), W = Ln(() => [...M.values()], [M]), j = W.reduce((w, C) => w + (C.size ?? 0), 0), X = a === void 0 ? null : a.limitBytes - a.usedBytes - W.reduce((w, C) => w + Y(C), 0), ne = X !== null && X < 0, ce = (w) => {
|
|
839
|
+
if (w.kind !== "file") return null;
|
|
840
|
+
const C = s == null ? void 0 : s(w);
|
|
841
|
+
return C || (X !== null && !M.has(Xe(i, w.id)) && Y(w) > X ? d.overBudget : null);
|
|
842
|
+
}, _e = (w) => {
|
|
843
|
+
const C = Xe(i, w.id);
|
|
844
|
+
!M.has(C) && ce(w) !== null || E((Z) => {
|
|
845
|
+
const G = new Map(Z);
|
|
846
|
+
return G.has(C) ? G.delete(C) : G.set(C, { ...w, space: i, path: f }), G;
|
|
819
847
|
});
|
|
820
|
-
}, oe = (
|
|
821
|
-
const
|
|
822
|
-
return
|
|
823
|
-
}), pe = u.status === "ready" ? u.entries : [], le = (
|
|
848
|
+
}, oe = (w) => v(nt(f, w.name)), ue = () => v(f.includes("/") ? f.slice(0, f.lastIndexOf("/")) : ""), Ce = (w) => E((C) => {
|
|
849
|
+
const Z = new Map(C);
|
|
850
|
+
return Z.delete(w), Z;
|
|
851
|
+
}), pe = u.status === "ready" ? u.entries : [], le = (w) => {
|
|
824
852
|
const C = pe[_];
|
|
825
|
-
if (
|
|
826
|
-
|
|
827
|
-
const
|
|
828
|
-
N(G), G >=
|
|
829
|
-
} else
|
|
830
|
-
}, be = f === "" ? [] : f.split("/"), ve = ((
|
|
853
|
+
if (w.key === "ArrowDown" || w.key === "ArrowUp" || w.key === "Home" || w.key === "End") {
|
|
854
|
+
w.preventDefault();
|
|
855
|
+
const Z = pe.length - 1, G = w.key === "Home" ? 0 : w.key === "End" ? Z : Math.min(Z, Math.max(0, _ + (w.key === "ArrowDown" ? 1 : -1)));
|
|
856
|
+
N(G), G >= Z - 1 && U();
|
|
857
|
+
} else w.key === "Enter" && (C == null ? void 0 : C.kind) === "folder" ? (w.preventDefault(), oe(C)) : w.key === " " && (C == null ? void 0 : C.kind) === "file" ? (w.preventDefault(), _e(C)) : w.key === "Backspace" && f !== "" && (w.preventDefault(), ue());
|
|
858
|
+
}, be = f === "" ? [] : f.split("/"), ve = ((we = l.find((w) => w.id === i)) == null ? void 0 : we.name) ?? "", ye = (w) => `${F}-entry-${String(w)}`;
|
|
831
859
|
return /* @__PURE__ */ c(
|
|
832
|
-
|
|
860
|
+
xn,
|
|
833
861
|
{
|
|
834
862
|
open: t,
|
|
835
863
|
title: d.title,
|
|
836
864
|
onClose: b,
|
|
837
865
|
closeLabel: d.close,
|
|
838
|
-
initialFocus:
|
|
866
|
+
initialFocus: z,
|
|
839
867
|
className: "cms-file-picker",
|
|
840
868
|
footer: /* @__PURE__ */ c("div", { className: "cms-file-picker__foot", children: [
|
|
841
869
|
/* @__PURE__ */ c("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
|
|
842
|
-
|
|
843
|
-
a !== void 0 &&
|
|
870
|
+
W.length > 0 ? /* @__PURE__ */ e("span", { children: d.total(W.length, h(j)) }) : null,
|
|
871
|
+
a !== void 0 && X !== null ? /* @__PURE__ */ e("span", { className: H(ne && "is-over"), children: ne ? d.overBudget : d.left(h(Math.max(0, X)), h(a.limitBytes)) }) : null
|
|
844
872
|
] }),
|
|
845
873
|
/* @__PURE__ */ c("div", { className: "cms-file-picker__actions", children: [
|
|
846
874
|
/* @__PURE__ */ e(De, { variant: "secondary", onClick: b, children: d.cancel }),
|
|
847
|
-
/* @__PURE__ */ e(De, { variant: "primary", disabled:
|
|
875
|
+
/* @__PURE__ */ e(De, { variant: "primary", disabled: W.length === 0 || ne, onClick: () => m(W), children: d.confirm(W.length) })
|
|
848
876
|
] })
|
|
849
877
|
] }),
|
|
850
878
|
children: [
|
|
851
879
|
/* @__PURE__ */ c("div", { className: "cms-file-picker__top", children: [
|
|
852
880
|
l.length > 1 ? /* @__PURE__ */ c("label", { className: "cms-file-picker__space", children: [
|
|
853
881
|
/* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: d.space }),
|
|
854
|
-
/* @__PURE__ */ e("select", { className: "cms-input cms-select", value: i, onChange: (
|
|
855
|
-
g(
|
|
856
|
-
}, children: l.map((
|
|
882
|
+
/* @__PURE__ */ e("select", { className: "cms-input cms-select", value: i, onChange: (w) => {
|
|
883
|
+
g(w.target.value), v("");
|
|
884
|
+
}, children: l.map((w) => /* @__PURE__ */ e("option", { value: w.id, children: w.name }, w.id)) })
|
|
857
885
|
] }) : null,
|
|
858
886
|
/* @__PURE__ */ c("nav", { className: "cms-file-picker__path", "aria-label": d.path, children: [
|
|
859
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": d.up, disabled: f === "", onClick: ue, children: /* @__PURE__ */ e(
|
|
887
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": d.up, disabled: f === "", onClick: ue, children: /* @__PURE__ */ e(B, { name: "chevron-left" }) }),
|
|
860
888
|
/* @__PURE__ */ c("ol", { children: [
|
|
861
889
|
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": f === "" ? "location" : void 0, onClick: () => v(""), children: ve }) }),
|
|
862
|
-
be.map((
|
|
863
|
-
const
|
|
864
|
-
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current":
|
|
890
|
+
be.map((w, C) => {
|
|
891
|
+
const Z = be.slice(0, C + 1).join("/");
|
|
892
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": Z === f ? "location" : void 0, onClick: () => v(Z), children: w }) }, Z);
|
|
865
893
|
})
|
|
866
894
|
] })
|
|
867
895
|
] }),
|
|
868
|
-
|
|
896
|
+
W.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": I, onClick: () => K((w) => !w), children: d.selected(W.length) }) : null
|
|
869
897
|
] }),
|
|
870
|
-
I &&
|
|
871
|
-
/* @__PURE__ */ e("ul", { children: [...
|
|
898
|
+
I && W.length > 0 ? /* @__PURE__ */ c("div", { className: "cms-file-picker__chosen", children: [
|
|
899
|
+
/* @__PURE__ */ e("ul", { children: [...M.entries()].map(([w, C]) => /* @__PURE__ */ c("li", { children: [
|
|
872
900
|
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: C.name }),
|
|
873
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": d.remove(C.name), onClick: () => Ce(
|
|
874
|
-
] },
|
|
901
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": d.remove(C.name), onClick: () => Ce(w), children: /* @__PURE__ */ e(re, { name: "close" }) })
|
|
902
|
+
] }, w)) }),
|
|
875
903
|
/* @__PURE__ */ e(De, { variant: "secondary", onClick: () => {
|
|
876
|
-
|
|
904
|
+
E(/* @__PURE__ */ new Map()), K(!1);
|
|
877
905
|
}, children: d.clear })
|
|
878
906
|
] }) : null,
|
|
879
|
-
/* @__PURE__ */ c("div", { className: "cms-file-picker__list", onScroll: (
|
|
880
|
-
const C =
|
|
907
|
+
/* @__PURE__ */ c("div", { className: "cms-file-picker__list", onScroll: (w) => {
|
|
908
|
+
const C = w.currentTarget;
|
|
881
909
|
C.scrollTop + C.clientHeight >= C.scrollHeight - tt && U();
|
|
882
910
|
}, children: [
|
|
883
911
|
u.status === "loading" ? /* @__PURE__ */ e(Le, { kind: "loading", title: d.loading, placement: "block" }) : null,
|
|
884
912
|
u.status === "error" ? /* @__PURE__ */ e(Le, { kind: "error", title: d.error, placement: "block", action: { label: d.retry, onAction: () => {
|
|
885
|
-
k.current = !1,
|
|
913
|
+
k.current = !1, T((w) => w + 1);
|
|
886
914
|
} } }) : null,
|
|
887
915
|
u.status === "denied" ? /* @__PURE__ */ e(Le, { kind: "denied", title: d.denied, placement: "block" }) : null,
|
|
888
916
|
u.status === "ready" && pe.length === 0 ? /* @__PURE__ */ e(Le, { kind: "empty", title: d.empty, placement: "block" }) : null,
|
|
889
917
|
/* @__PURE__ */ c(
|
|
890
918
|
"div",
|
|
891
919
|
{
|
|
892
|
-
ref:
|
|
920
|
+
ref: z,
|
|
893
921
|
role: "listbox",
|
|
894
922
|
"aria-multiselectable": "true",
|
|
895
923
|
"aria-label": d.files,
|
|
896
|
-
"aria-activedescendant": pe.length > 0 ?
|
|
924
|
+
"aria-activedescendant": pe.length > 0 ? ye(_) : void 0,
|
|
897
925
|
tabIndex: 0,
|
|
898
926
|
className: "cms-file-picker__entries",
|
|
899
927
|
hidden: u.status !== "ready" || pe.length === 0,
|
|
900
928
|
onKeyDown: le,
|
|
901
929
|
children: [
|
|
902
|
-
pe.map((
|
|
903
|
-
const
|
|
930
|
+
pe.map((w, C) => {
|
|
931
|
+
const Z = w.kind === "file" && M.has(Xe(i, w.id)), G = ce(w);
|
|
904
932
|
return /* @__PURE__ */ c(
|
|
905
933
|
"div",
|
|
906
934
|
{
|
|
907
|
-
id:
|
|
935
|
+
id: ye(C),
|
|
908
936
|
role: "option",
|
|
909
|
-
"aria-selected":
|
|
937
|
+
"aria-selected": w.kind === "file" ? Z : void 0,
|
|
910
938
|
"aria-disabled": G !== null || void 0,
|
|
911
|
-
className:
|
|
939
|
+
className: H("cms-file-picker__entry", C === _ && "is-active", Z && "is-ticked", G !== null && "is-disabled"),
|
|
912
940
|
onClick: () => {
|
|
913
|
-
N(C),
|
|
941
|
+
N(C), w.kind === "folder" ? oe(w) : _e(w);
|
|
914
942
|
},
|
|
915
943
|
children: [
|
|
916
|
-
/* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children:
|
|
917
|
-
/* @__PURE__ */ e(
|
|
944
|
+
/* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: Z ? /* @__PURE__ */ e(B, { name: "check" }) : null }),
|
|
945
|
+
/* @__PURE__ */ e(B, { name: w.kind === "folder" ? "folder" : "file" }),
|
|
918
946
|
/* @__PURE__ */ c("span", { className: "cms-file-picker__text", children: [
|
|
919
|
-
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children:
|
|
947
|
+
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: w.name }),
|
|
920
948
|
G !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: G }) : null
|
|
921
949
|
] }),
|
|
922
|
-
|
|
950
|
+
w.kind === "file" && w.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: h(w.size) }) : null
|
|
923
951
|
]
|
|
924
952
|
},
|
|
925
|
-
|
|
953
|
+
w.id
|
|
926
954
|
);
|
|
927
955
|
}),
|
|
928
956
|
u.status === "ready" && u.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(Le, { kind: "loading", title: d.loading, placement: "inline" }) }) : null
|
|
@@ -944,7 +972,7 @@ function lt(n, t) {
|
|
|
944
972
|
}
|
|
945
973
|
function st(n, t) {
|
|
946
974
|
const [l, r] = D(0), s = P(t);
|
|
947
|
-
return s.current = t,
|
|
975
|
+
return s.current = t, ee(() => {
|
|
948
976
|
const a = n.current;
|
|
949
977
|
if (a === null) return;
|
|
950
978
|
let h = null, d = 0;
|
|
@@ -973,28 +1001,28 @@ function rt() {
|
|
|
973
1001
|
}
|
|
974
1002
|
function Xt({ label: n, rows: t, error: l, onRetry: r, loadingText: s = "Loading", emptyTitle: a = "Nothing here yet", emptyHint: h, selected: d, onOpen: m, onRowMenu: b }) {
|
|
975
1003
|
const i = P([]), g = rt();
|
|
976
|
-
if (l != null) return /* @__PURE__ */ e(
|
|
977
|
-
if (t === null) return /* @__PURE__ */ e(
|
|
978
|
-
if (t.length === 0) return /* @__PURE__ */ e(
|
|
979
|
-
const f = (v, u,
|
|
1004
|
+
if (l != null) return /* @__PURE__ */ e(Wn, { message: l, onRetry: r });
|
|
1005
|
+
if (t === null) return /* @__PURE__ */ e(Un, { what: s, layout: "block" });
|
|
1006
|
+
if (t.length === 0) return /* @__PURE__ */ e(Kn, { title: a, hint: h });
|
|
1007
|
+
const f = (v, u, y) => {
|
|
980
1008
|
var S;
|
|
981
1009
|
if (v.key === "ArrowDown" || v.key === "ArrowUp")
|
|
982
1010
|
v.preventDefault(), (S = i.current[Math.min(t.length - 1, Math.max(0, u + (v.key === "ArrowDown" ? 1 : -1)))]) == null || S.focus();
|
|
983
1011
|
else if (v.key === "Enter")
|
|
984
|
-
m == null || m(
|
|
1012
|
+
m == null || m(y);
|
|
985
1013
|
else if ((v.key === "ContextMenu" || v.shiftKey && v.key === "F10") && b) {
|
|
986
1014
|
v.preventDefault();
|
|
987
|
-
const
|
|
988
|
-
b(
|
|
1015
|
+
const T = v.currentTarget.getBoundingClientRect();
|
|
1016
|
+
b(y, { x: T.left + 16, y: T.bottom });
|
|
989
1017
|
}
|
|
990
1018
|
};
|
|
991
|
-
return /* @__PURE__ */ c(
|
|
1019
|
+
return /* @__PURE__ */ c($, { children: [
|
|
992
1020
|
g !== null && (g.distance > 0 || g.refreshing) ? /* @__PURE__ */ c("div", { className: "cms-list__pull", role: "status", style: { height: g.refreshing ? void 0 : g.distance }, "data-ready": g.distance >= Qe ? "" : void 0, children: [
|
|
993
1021
|
g.refreshing ? /* @__PURE__ */ e(re, { name: "spinner" }) : null,
|
|
994
1022
|
g.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: g.text }) : null
|
|
995
1023
|
] }) : null,
|
|
996
1024
|
/* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: t.map((v, u) => {
|
|
997
|
-
const
|
|
1025
|
+
const y = v.id === d;
|
|
998
1026
|
return /* @__PURE__ */ c(
|
|
999
1027
|
"li",
|
|
1000
1028
|
{
|
|
@@ -1002,9 +1030,9 @@ function Xt({ label: n, rows: t, error: l, onRetry: r, loadingText: s = "Loading
|
|
|
1002
1030
|
i.current[u] = S;
|
|
1003
1031
|
},
|
|
1004
1032
|
role: "option",
|
|
1005
|
-
"aria-selected":
|
|
1006
|
-
tabIndex:
|
|
1007
|
-
className:
|
|
1033
|
+
"aria-selected": y,
|
|
1034
|
+
tabIndex: y || d == null && u === 0 ? 0 : -1,
|
|
1035
|
+
className: H("cms-list__row", y && "is-selected"),
|
|
1008
1036
|
onClick: () => m == null ? void 0 : m(v.id),
|
|
1009
1037
|
onKeyDown: (S) => f(S, u, v.id),
|
|
1010
1038
|
onContextMenu: b ? (S) => {
|
|
@@ -1013,7 +1041,7 @@ function Xt({ label: n, rows: t, error: l, onRetry: r, loadingText: s = "Loading
|
|
|
1013
1041
|
children: [
|
|
1014
1042
|
v.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: v.lead }) : null,
|
|
1015
1043
|
/* @__PURE__ */ c("span", { className: "cms-list__text", children: [
|
|
1016
|
-
/* @__PURE__ */ e("span", { className:
|
|
1044
|
+
/* @__PURE__ */ e("span", { className: H("cms-list__primary", v.unread === !0 && "is-unread"), children: v.primary }),
|
|
1017
1045
|
v.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: v.secondary }) : null
|
|
1018
1046
|
] }),
|
|
1019
1047
|
v.meta != null || v.count !== void 0 ? /* @__PURE__ */ c("span", { className: "cms-list__end", children: [
|
|
@@ -1031,64 +1059,64 @@ function Ke({ at: n, items: t, onClose: l, label: r = "Actions", focus: s = "cur
|
|
|
1031
1059
|
const a = P(null), h = P(null), d = fe(), [m, b] = D(n), i = t.filter((u) => u.offer.offered);
|
|
1032
1060
|
if ($e(() => {
|
|
1033
1061
|
if (!n) return;
|
|
1034
|
-
const u = a.current,
|
|
1035
|
-
b({ x: Math.max(0, Math.min(n.x, window.innerWidth -
|
|
1036
|
-
}, [n]),
|
|
1037
|
-
var
|
|
1062
|
+
const u = a.current, y = (u == null ? void 0 : u.offsetWidth) ?? 0, S = (u == null ? void 0 : u.offsetHeight) ?? 0;
|
|
1063
|
+
b({ x: Math.max(0, Math.min(n.x, window.innerWidth - y)), y: Math.max(0, Math.min(n.y, window.innerHeight - S)) });
|
|
1064
|
+
}, [n]), ee(() => {
|
|
1065
|
+
var T, M;
|
|
1038
1066
|
if (!n) return;
|
|
1039
1067
|
h.current = document.activeElement;
|
|
1040
|
-
const u = Array.from(((
|
|
1041
|
-
(
|
|
1042
|
-
const S = (
|
|
1068
|
+
const u = Array.from(((T = a.current) == null ? void 0 : T.querySelectorAll('[role^="menuitem"]:not([aria-disabled="true"])')) ?? []), y = s === "current" ? u.find((E) => E.getAttribute("aria-checked") === "true") : void 0;
|
|
1069
|
+
(M = s === "last" ? u[u.length - 1] : y ?? u[0]) == null || M.focus();
|
|
1070
|
+
const S = (E) => {
|
|
1043
1071
|
var _;
|
|
1044
|
-
(_ = a.current) != null && _.contains(
|
|
1072
|
+
(_ = a.current) != null && _.contains(E.target) || l();
|
|
1045
1073
|
};
|
|
1046
1074
|
return document.addEventListener("mousedown", S), () => {
|
|
1047
|
-
var
|
|
1048
|
-
document.removeEventListener("mousedown", S), (_ = (
|
|
1075
|
+
var E, _;
|
|
1076
|
+
document.removeEventListener("mousedown", S), (_ = (E = h.current) == null ? void 0 : E.focus) == null || _.call(E);
|
|
1049
1077
|
};
|
|
1050
1078
|
}, [n, l, s]), !n || i.length === 0) return null;
|
|
1051
1079
|
const g = (u) => {
|
|
1052
|
-
var
|
|
1053
|
-
const
|
|
1080
|
+
var T, M;
|
|
1081
|
+
const y = Array.from(((T = a.current) == null ? void 0 : T.querySelectorAll('[role^="menuitem"]')) ?? []), S = y.indexOf(document.activeElement);
|
|
1054
1082
|
if (u.key === "Escape" || u.key === "Tab")
|
|
1055
1083
|
u.preventDefault(), l();
|
|
1056
1084
|
else if (u.key === "ArrowDown" || u.key === "ArrowUp") {
|
|
1057
1085
|
u.preventDefault();
|
|
1058
|
-
const
|
|
1059
|
-
(
|
|
1086
|
+
const E = u.key === "ArrowDown" ? 1 : -1;
|
|
1087
|
+
(M = y[(S + E + y.length) % y.length]) == null || M.focus();
|
|
1060
1088
|
}
|
|
1061
1089
|
}, f = (u) => {
|
|
1062
|
-
const
|
|
1090
|
+
const y = u.offer.refusal !== void 0;
|
|
1063
1091
|
return /* @__PURE__ */ c(
|
|
1064
1092
|
"div",
|
|
1065
1093
|
{
|
|
1066
1094
|
role: u.checked === void 0 ? "menuitem" : "menuitemradio",
|
|
1067
1095
|
"aria-checked": u.checked,
|
|
1068
1096
|
tabIndex: -1,
|
|
1069
|
-
"aria-disabled":
|
|
1070
|
-
"aria-describedby":
|
|
1071
|
-
title:
|
|
1072
|
-
className:
|
|
1097
|
+
"aria-disabled": y || void 0,
|
|
1098
|
+
"aria-describedby": y ? `${d}-${u.id}` : void 0,
|
|
1099
|
+
title: y ? u.offer.refusal : void 0,
|
|
1100
|
+
className: H("cms-menu__item", u.danger && "is-danger", u.offer.locked && "is-locked", y && "is-refused"),
|
|
1073
1101
|
onClick: () => {
|
|
1074
|
-
|
|
1102
|
+
y || (l(), u.onSelect());
|
|
1075
1103
|
},
|
|
1076
1104
|
onKeyDown: (S) => {
|
|
1077
|
-
(S.key === "Enter" || S.key === " ") && !
|
|
1105
|
+
(S.key === "Enter" || S.key === " ") && !y && (S.preventDefault(), l(), u.onSelect());
|
|
1078
1106
|
},
|
|
1079
1107
|
children: [
|
|
1080
1108
|
u.checked !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-menu__check", children: u.checked ? /* @__PURE__ */ e(re, { name: "check" }) : null }) : null,
|
|
1081
1109
|
u.offer.locked ? /* @__PURE__ */ e(re, { name: "lock" }) : null,
|
|
1082
1110
|
/* @__PURE__ */ e("span", { className: "cms-menu__label", children: u.label }),
|
|
1083
|
-
|
|
1111
|
+
y ? /* @__PURE__ */ e("span", { id: `${d}-${u.id}`, className: "cms-menu__refusal", children: u.offer.refusal }) : null
|
|
1084
1112
|
]
|
|
1085
1113
|
},
|
|
1086
1114
|
u.id
|
|
1087
1115
|
);
|
|
1088
1116
|
}, v = [];
|
|
1089
1117
|
for (const u of i) {
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1118
|
+
const y = v[v.length - 1];
|
|
1119
|
+
y !== void 0 && y.group === u.group ? y.items.push(u) : v.push({ group: u.group, items: [u] });
|
|
1092
1120
|
}
|
|
1093
1121
|
return ln(
|
|
1094
1122
|
/* @__PURE__ */ e(
|
|
@@ -1101,13 +1129,13 @@ function Ke({ at: n, items: t, onClose: l, label: r = "Actions", focus: s = "cur
|
|
|
1101
1129
|
style: { left: (m ?? n).x, top: (m ?? n).y },
|
|
1102
1130
|
onKeyDown: g,
|
|
1103
1131
|
onContextMenu: (u) => u.preventDefault(),
|
|
1104
|
-
children: v.map((u,
|
|
1105
|
-
|
|
1132
|
+
children: v.map((u, y) => /* @__PURE__ */ c($n, { children: [
|
|
1133
|
+
y > 0 ? /* @__PURE__ */ e("div", { className: "cms-menu__separator", role: "separator" }) : null,
|
|
1106
1134
|
u.group === void 0 ? u.items.map(f) : /* @__PURE__ */ c("div", { role: "group", "aria-label": u.group, children: [
|
|
1107
1135
|
/* @__PURE__ */ e("div", { className: "cms-menu__group", "aria-hidden": "true", children: u.group }),
|
|
1108
1136
|
u.items.map(f)
|
|
1109
1137
|
] })
|
|
1110
|
-
] },
|
|
1138
|
+
] }, y))
|
|
1111
1139
|
}
|
|
1112
1140
|
),
|
|
1113
1141
|
document.body
|
|
@@ -1119,7 +1147,7 @@ function an() {
|
|
|
1119
1147
|
const i = new Set(b);
|
|
1120
1148
|
return i.delete(m), i;
|
|
1121
1149
|
});
|
|
1122
|
-
return
|
|
1150
|
+
return ee(() => {
|
|
1123
1151
|
if (l === null) return;
|
|
1124
1152
|
const m = (b) => {
|
|
1125
1153
|
b.key === "Escape" && h(l);
|
|
@@ -1148,8 +1176,8 @@ function at(n, t, l) {
|
|
|
1148
1176
|
}
|
|
1149
1177
|
const _n = /* @__PURE__ */ new Set(), vn = { descriptionHidden: !1, elsewhereHidden: !1, titleCut: !1, titleFloor: 0, bare: _n, primaryBare: !1, hidden: _n, primaryHidden: !1, chipsCut: !1 }, gn = (n, t) => n.size === t.size && [...n].every((l) => t.has(l)), it = (n, t) => n.descriptionHidden === t.descriptionHidden && n.elsewhereHidden === t.elsewhereHidden && n.titleCut === t.titleCut && n.titleFloor === t.titleFloor && gn(n.bare, t.bare) && n.primaryBare === t.primaryBare && gn(n.hidden, t.hidden) && n.primaryHidden === t.primaryHidden && n.chipsCut === t.chipsCut, ct = 64, Ae = "primary";
|
|
1150
1178
|
function Jt({ title: n, icon: t, description: l, meta: r = [], primary: s, secondary: a, more: h = [], moreLabel: d, context: m, fullWidth: b = !1 }) {
|
|
1151
|
-
var
|
|
1152
|
-
const [i, g] = D(null), [f, v] = D(vn), [u,
|
|
1179
|
+
var J, Ne, de;
|
|
1180
|
+
const [i, g] = D(null), [f, v] = D(vn), [u, y] = D(null), [S, T] = D(null), M = an(), E = P(null), _ = P(null), N = P(null), I = fe(), K = fe(), z = [
|
|
1153
1181
|
...(a ?? []).map((o) => ({
|
|
1154
1182
|
id: o.id,
|
|
1155
1183
|
label: o.label,
|
|
@@ -1170,161 +1198,161 @@ function Jt({ title: n, icon: t, description: l, meta: r = [], primary: s, secon
|
|
|
1170
1198
|
offer: o.offer,
|
|
1171
1199
|
run: o.onSelect
|
|
1172
1200
|
}))
|
|
1173
|
-
].filter((o) => o.offer.offered), k =
|
|
1201
|
+
].filter((o) => o.offer.offered), k = z.filter((o) => o.overflow === 0), F = z.filter((o) => o.overflow !== 0), U = k.length === 1 ? k[0] ?? null : null, Y = ot(F), W = F.filter((o) => o.overflow === void 0).map((o) => o.id).reverse(), j = [...Y, ...W.map((o) => [o])], X = [...U !== null ? [[U.id]] : [], ...j], ne = s !== void 0 && ((J = s.offer) == null ? void 0 : J.offered) !== !1, ce = (Ne = s == null ? void 0 : s.offer) == null ? void 0 : Ne.refusal, _e = s !== void 0 && (((de = s.offer) == null ? void 0 : de.offered) === !1 || ce !== void 0), oe = s !== void 0 && "menu" in s ? s.menu.filter((o) => o.offer.offered) : [], ue = s !== void 0 && "menu" in s && oe.length > 0 ? s : null, Ce = r.filter((o) => o.elsewhere === !0), pe = JSON.stringify([
|
|
1174
1202
|
n,
|
|
1175
1203
|
t ?? null,
|
|
1176
1204
|
l ?? null,
|
|
1177
1205
|
r.map((o) => [o.id, o.text, o.elsewhere === !0]),
|
|
1178
|
-
|
|
1179
|
-
|
|
1206
|
+
ne ? [s.label, s.icon, ue !== null] : null,
|
|
1207
|
+
z.map((o) => [o.id, o.name, o.icon, o.overflow ?? null])
|
|
1180
1208
|
]), le = Ie(() => {
|
|
1181
|
-
const o =
|
|
1182
|
-
if (o === null ||
|
|
1183
|
-
const
|
|
1209
|
+
const o = E.current, A = _.current;
|
|
1210
|
+
if (o === null || A === null) return;
|
|
1211
|
+
const x = getComputedStyle(o), O = parseFloat(x.columnGap || "0") || 0, se = o.clientWidth - (parseFloat(x.paddingLeft) || 0) - (parseFloat(x.paddingRight) || 0), Q = (ie) => {
|
|
1184
1212
|
var Me;
|
|
1185
|
-
return ((Me =
|
|
1186
|
-
}, ke =
|
|
1213
|
+
return ((Me = A.querySelector(ie)) == null ? void 0 : Me.getBoundingClientRect().width) ?? 0;
|
|
1214
|
+
}, ke = Q('[data-measure="title"]'), Fe = Math.min(ke, ct), He = (ie) => {
|
|
1187
1215
|
const Me = be(ie), xe = [];
|
|
1188
|
-
t !== void 0 && xe.push(
|
|
1189
|
-
for (const ge of r) ge.elsewhere === !0 && ie.elsewhereHidden || xe.push(
|
|
1190
|
-
for (const ge of
|
|
1216
|
+
t !== void 0 && xe.push(Q('[data-measure="lead"]')), xe.push(ie.titleCut ? Fe : ke), l !== void 0 && !ie.descriptionHidden && xe.push(Q('[data-measure="description"]'));
|
|
1217
|
+
for (const ge of r) ge.elsewhere === !0 && ie.elsewhereHidden || xe.push(Q(`[data-measure="meta"][data-measure-id="${CSS.escape(ge.id)}"]`));
|
|
1218
|
+
for (const ge of z) {
|
|
1191
1219
|
if (Me.has(ge.id)) continue;
|
|
1192
|
-
const
|
|
1193
|
-
xe.push(
|
|
1220
|
+
const Ze = ie.bare.has(ge.id) && ge.icon !== null;
|
|
1221
|
+
xe.push(Q(`[data-measure="${Ze ? "icon" : "full"}"][data-measure-id="${CSS.escape(ge.id)}"]`));
|
|
1194
1222
|
}
|
|
1195
|
-
return
|
|
1223
|
+
return ne && !ie.primaryHidden && xe.push(Q(`[data-measure="${ie.primaryBare ? "primary-icon" : "primary"}"]`)), Me.size > 0 && xe.push(Q('[data-measure="more"]')), xe.reduce((ge, Ze) => ge + Ze, 0) + O * Math.max(0, xe.length - 1);
|
|
1196
1224
|
};
|
|
1197
|
-
let
|
|
1198
|
-
const Re = (ie) => (
|
|
1199
|
-
if (Re(
|
|
1200
|
-
|
|
1225
|
+
let q = { ...vn, titleFloor: Fe };
|
|
1226
|
+
const Re = (ie) => (q = ie, He(ie) <= se), mn = (() => {
|
|
1227
|
+
if (Re(q) || l !== void 0 && Re({ ...q, descriptionHidden: !0 }) || (q = { ...q, descriptionHidden: !0 }, Ce.length > 0 && Re({ ...q, elsewhereHidden: !0 }))) return q;
|
|
1228
|
+
q = { ...q, elsewhereHidden: !0 };
|
|
1201
1229
|
const ie = /* @__PURE__ */ new Set();
|
|
1202
|
-
for (const
|
|
1203
|
-
for (const Ge of
|
|
1204
|
-
if (Re({ ...
|
|
1230
|
+
for (const Ve of X) {
|
|
1231
|
+
for (const Ge of Ve) ie.add(Ge);
|
|
1232
|
+
if (Re({ ...q, bare: new Set(ie) })) return q;
|
|
1205
1233
|
}
|
|
1206
|
-
if (
|
|
1207
|
-
|
|
1208
|
-
const Me = /* @__PURE__ */ new Set(), xe = [...j, ...
|
|
1209
|
-
for (const
|
|
1210
|
-
for (const Ge of
|
|
1211
|
-
if (ge() && Re(
|
|
1212
|
-
|
|
1234
|
+
if (ne && Re({ ...q, primaryBare: !0 })) return q;
|
|
1235
|
+
q = { ...q, primaryBare: ne };
|
|
1236
|
+
const Me = /* @__PURE__ */ new Set(), xe = [...j, ...ne ? [[Ae]] : []], ge = () => Me.size + k.length >= 2, Ze = (Ve) => ({ ...q, hidden: new Set([...Ve].filter((Ge) => Ge !== Ae)), primaryHidden: Ve.has(Ae) }), hn = q;
|
|
1237
|
+
for (const Ve of xe) {
|
|
1238
|
+
for (const Ge of Ve) Me.add(Ge);
|
|
1239
|
+
if (ge() && Re(Ze(Me))) return q;
|
|
1240
|
+
q = hn;
|
|
1213
1241
|
}
|
|
1214
|
-
const fn = ge() ?
|
|
1215
|
-
return Re({ ...fn, titleCut: !0 }) ?
|
|
1242
|
+
const fn = ge() ? Ze(Me) : hn;
|
|
1243
|
+
return Re({ ...fn, titleCut: !0 }) ? q : { ...fn, titleCut: !0, chipsCut: !0 };
|
|
1216
1244
|
})();
|
|
1217
1245
|
v((ie) => it(ie, mn) ? ie : mn);
|
|
1218
1246
|
}, [pe]);
|
|
1219
|
-
$e(le, [le]),
|
|
1220
|
-
const o =
|
|
1247
|
+
$e(le, [le]), ee(() => {
|
|
1248
|
+
const o = E.current;
|
|
1221
1249
|
if (o === null || typeof ResizeObserver > "u") return;
|
|
1222
|
-
const
|
|
1223
|
-
return
|
|
1224
|
-
}, [le]),
|
|
1250
|
+
const A = new ResizeObserver(() => le());
|
|
1251
|
+
return A.observe(o), () => A.disconnect();
|
|
1252
|
+
}, [le]), ee(() => {
|
|
1225
1253
|
const o = typeof document > "u" ? void 0 : document.fonts;
|
|
1226
1254
|
if (o === void 0) return;
|
|
1227
|
-
let
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1255
|
+
let A = !0;
|
|
1256
|
+
const x = () => {
|
|
1257
|
+
A && le();
|
|
1230
1258
|
};
|
|
1231
|
-
return o.ready.then(
|
|
1232
|
-
|
|
1259
|
+
return o.ready.then(x), o.addEventListener("loadingdone", x), () => {
|
|
1260
|
+
A = !1, o.removeEventListener("loadingdone", x);
|
|
1233
1261
|
};
|
|
1234
1262
|
}, [le]);
|
|
1235
1263
|
function be(o) {
|
|
1236
|
-
const
|
|
1237
|
-
return /* @__PURE__ */ new Set([...k.filter((
|
|
1264
|
+
const A = o.hidden.size + (o.primaryHidden ? 1 : 0);
|
|
1265
|
+
return /* @__PURE__ */ new Set([...k.filter((x) => x !== U || A > 0).map((x) => x.id), ...o.hidden, ...o.primaryHidden ? [Ae] : []]);
|
|
1238
1266
|
}
|
|
1239
|
-
const ve = be(f),
|
|
1240
|
-
...
|
|
1267
|
+
const ve = be(f), ye = z.filter((o) => !ve.has(o.id) && o !== U), te = U !== null && !ve.has(U.id) ? U : null, we = ne && !f.primaryHidden, w = (o) => z.find((A) => A.id === o), C = j.flat().filter((o) => f.hidden.has(o)).map(w).filter((o) => o !== void 0), Z = (o) => ({ id: o.id, label: o.label, offer: o.offer, ...o.danger ? { danger: !0 } : {}, onSelect: o.run }), G = [
|
|
1268
|
+
...ne && f.primaryHidden ? [{ id: Ae, label: s.label, offer: s.offer ?? { offered: !0, locked: !1 }, onSelect: () => {
|
|
1241
1269
|
_e || s.onPress();
|
|
1242
1270
|
} }, ...oe] : [],
|
|
1243
|
-
...C.map(
|
|
1244
|
-
...ve.size > 0 ? k.map(
|
|
1271
|
+
...C.map(Z),
|
|
1272
|
+
...ve.size > 0 ? k.map(Z) : []
|
|
1245
1273
|
], p = G.length > 0, L = [
|
|
1246
|
-
...
|
|
1247
|
-
...
|
|
1248
|
-
...
|
|
1274
|
+
...ye.map((o) => o.id),
|
|
1275
|
+
...te !== null ? [te.id] : [],
|
|
1276
|
+
...we ? [Ae, ...ue !== null ? ["primary-menu"] : []] : [],
|
|
1249
1277
|
...p ? ["more"] : []
|
|
1250
|
-
],
|
|
1251
|
-
|
|
1252
|
-
var o,
|
|
1253
|
-
u === null || L.includes(u) || !p || ((o =
|
|
1278
|
+
], V = u !== null && L.includes(u) ? u : L[0] ?? null;
|
|
1279
|
+
ee(() => {
|
|
1280
|
+
var o, A;
|
|
1281
|
+
u === null || L.includes(u) || !p || ((o = E.current) != null && o.contains(document.activeElement) || document.activeElement === document.body) && (y("more"), (A = N.current) == null || A.focus());
|
|
1254
1282
|
}, [f]);
|
|
1255
|
-
const me = (o) => `${
|
|
1283
|
+
const me = (o) => `${K}-${o}`, ae = (o) => {
|
|
1256
1284
|
var se;
|
|
1257
|
-
const
|
|
1258
|
-
let
|
|
1259
|
-
if (o.key === "ArrowRight" ?
|
|
1285
|
+
const A = L.indexOf(V ?? "");
|
|
1286
|
+
let x = null;
|
|
1287
|
+
if (o.key === "ArrowRight" ? x = Math.min(L.length - 1, A + 1) : o.key === "ArrowLeft" ? x = Math.max(0, A - 1) : o.key === "Home" ? x = 0 : o.key === "End" && (x = L.length - 1), x === null) return;
|
|
1260
1288
|
o.preventDefault();
|
|
1261
|
-
const O = L[
|
|
1262
|
-
|
|
1263
|
-
}, he = (o,
|
|
1264
|
-
const
|
|
1265
|
-
g((i == null ? void 0 : i.which) === o ? null : { which: o, x:
|
|
1266
|
-
}, Se = (o) => ({ id: me(o), tabIndex:
|
|
1289
|
+
const O = L[x] ?? null;
|
|
1290
|
+
y(O), O !== null && ((se = document.getElementById(me(O))) == null || se.focus());
|
|
1291
|
+
}, he = (o, A) => {
|
|
1292
|
+
const x = A.getBoundingClientRect();
|
|
1293
|
+
g((i == null ? void 0 : i.which) === o ? null : { which: o, x: x.left, y: x.bottom + 4 });
|
|
1294
|
+
}, Se = (o) => ({ id: me(o), tabIndex: V === o ? 0 : -1, onFocus: () => y(o) }), We = (o, A, x) => A ? {
|
|
1267
1295
|
...S === o ? { "data-reason-shown": "" } : {},
|
|
1268
|
-
...
|
|
1296
|
+
...M.dismissed(o) ? { "data-tip-dismissed": "" } : {},
|
|
1269
1297
|
onFocus: (O) => {
|
|
1270
|
-
|
|
1298
|
+
y(o), M.focusIn(o), Te(O.currentTarget, x);
|
|
1271
1299
|
},
|
|
1272
1300
|
onBlur: () => {
|
|
1273
|
-
|
|
1301
|
+
T((O) => O === o ? null : O), M.focusOut(o);
|
|
1274
1302
|
},
|
|
1275
1303
|
onMouseEnter: (O) => {
|
|
1276
|
-
|
|
1304
|
+
M.pointerIn(o), Te(O.currentTarget, x);
|
|
1277
1305
|
},
|
|
1278
|
-
onMouseLeave: () =>
|
|
1306
|
+
onMouseLeave: () => M.pointerOut(o),
|
|
1279
1307
|
onKeyDown: (O) => {
|
|
1280
|
-
O.key === "Escape" && (
|
|
1308
|
+
O.key === "Escape" && (T((se) => se === o ? null : se), M.dismiss(o));
|
|
1281
1309
|
}
|
|
1282
|
-
} : {}, Be = (o,
|
|
1283
|
-
|
|
1284
|
-
}, Te = (o,
|
|
1285
|
-
const
|
|
1286
|
-
if (
|
|
1287
|
-
const se =
|
|
1288
|
-
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1310
|
+
} : {}, Be = (o, A, x) => {
|
|
1311
|
+
T(o), M.show(o), Te(A, x);
|
|
1312
|
+
}, Te = (o, A) => {
|
|
1313
|
+
const x = document.getElementById(A), O = E.current;
|
|
1314
|
+
if (x === null || O === null) return;
|
|
1315
|
+
const se = x.style.display;
|
|
1316
|
+
x.style.display = "block";
|
|
1317
|
+
const Q = x.offsetWidth;
|
|
1318
|
+
x.style.display = se;
|
|
1291
1319
|
const ke = O.getBoundingClientRect(), Fe = o.getBoundingClientRect();
|
|
1292
|
-
|
|
1293
|
-
}, Ee = (o,
|
|
1294
|
-
|
|
1295
|
-
|
|
1320
|
+
x.style.left = `${String(at(Fe.left + Fe.width / 2 - ke.left, ke.width, Q))}px`, x.style.right = "auto";
|
|
1321
|
+
}, Ee = (o, A, x) => /* @__PURE__ */ c("span", { id: o, className: "cms-section-header__tip", role: "tooltip", children: [
|
|
1322
|
+
x !== null ? /* @__PURE__ */ c("span", { "aria-hidden": "true", children: [
|
|
1323
|
+
x,
|
|
1296
1324
|
": "
|
|
1297
1325
|
] }) : null,
|
|
1298
|
-
|
|
1326
|
+
A
|
|
1299
1327
|
] }), R = (o) => {
|
|
1300
|
-
const
|
|
1328
|
+
const A = f.bare.has(o.id) && o.icon !== null, x = o.offer.refusal, O = `${K}-reason-${o.id}`;
|
|
1301
1329
|
return /* @__PURE__ */ c(
|
|
1302
1330
|
"button",
|
|
1303
1331
|
{
|
|
1304
1332
|
type: "button",
|
|
1305
|
-
className:
|
|
1333
|
+
className: H("cms-button", "cms-button--quiet", "cms-section-header__secondary", A && "cms-section-header__secondary--bare", o.danger && "is-danger"),
|
|
1306
1334
|
"data-action": o.id,
|
|
1307
|
-
"aria-label":
|
|
1308
|
-
"aria-disabled":
|
|
1309
|
-
"aria-describedby":
|
|
1310
|
-
title:
|
|
1335
|
+
"aria-label": A || x !== void 0 ? o.name : void 0,
|
|
1336
|
+
"aria-disabled": x !== void 0 ? "true" : void 0,
|
|
1337
|
+
"aria-describedby": x !== void 0 ? O : void 0,
|
|
1338
|
+
title: x === void 0 && A ? o.name : void 0,
|
|
1311
1339
|
...Se(o.id),
|
|
1312
|
-
...We(o.id,
|
|
1340
|
+
...We(o.id, x !== void 0, O),
|
|
1313
1341
|
onClick: (se) => {
|
|
1314
|
-
|
|
1342
|
+
x === void 0 ? o.run() : Be(o.id, se.currentTarget, O);
|
|
1315
1343
|
},
|
|
1316
1344
|
children: [
|
|
1317
|
-
o.icon !== null ? /* @__PURE__ */ e(
|
|
1318
|
-
|
|
1319
|
-
|
|
1345
|
+
o.icon !== null ? /* @__PURE__ */ e(B, { name: o.icon, size: 18 }) : null,
|
|
1346
|
+
A ? null : /* @__PURE__ */ e("span", { className: "cms-section-header__label", children: o.label }),
|
|
1347
|
+
x !== void 0 ? Ee(O, x, A ? o.name : null) : null
|
|
1320
1348
|
]
|
|
1321
1349
|
},
|
|
1322
1350
|
o.id
|
|
1323
1351
|
);
|
|
1324
1352
|
};
|
|
1325
|
-
return /* @__PURE__ */ c("header", { className:
|
|
1326
|
-
/* @__PURE__ */ c("div", { ref:
|
|
1327
|
-
t !== void 0 ? /* @__PURE__ */ e(
|
|
1353
|
+
return /* @__PURE__ */ c("header", { className: H("cms-section-header", b && "cms-section-header--full"), children: [
|
|
1354
|
+
/* @__PURE__ */ c("div", { ref: E, className: H("cms-section-header__row", f.chipsCut && "cms-section-header__row--chips-cut"), "data-row": "1", children: [
|
|
1355
|
+
t !== void 0 ? /* @__PURE__ */ e(B, { name: t }) : null,
|
|
1328
1356
|
/* @__PURE__ */ e(
|
|
1329
1357
|
"h1",
|
|
1330
1358
|
{
|
|
@@ -1334,28 +1362,28 @@ function Jt({ title: n, icon: t, description: l, meta: r = [], primary: s, secon
|
|
|
1334
1362
|
children: n
|
|
1335
1363
|
}
|
|
1336
1364
|
),
|
|
1337
|
-
l !== void 0 ? /* @__PURE__ */ e("span", { className:
|
|
1338
|
-
r.map((o,
|
|
1365
|
+
l !== void 0 ? /* @__PURE__ */ e("span", { className: H("cms-section-header__description", f.descriptionHidden && "cms-visually-hidden"), children: l }) : null,
|
|
1366
|
+
r.map((o, A) => /* @__PURE__ */ e(
|
|
1339
1367
|
"span",
|
|
1340
1368
|
{
|
|
1341
1369
|
className: "cms-section-header__meta",
|
|
1342
1370
|
"data-meta": o.id,
|
|
1343
1371
|
hidden: o.elsewhere === !0 && f.elsewhereHidden,
|
|
1344
|
-
style: f.chipsCut && o.elsewhere !== !0 ? { flexShrink:
|
|
1372
|
+
style: f.chipsCut && o.elsewhere !== !0 ? { flexShrink: A + 1 } : void 0,
|
|
1345
1373
|
...f.chipsCut && o.elsewhere !== !0 ? { title: o.text, "aria-label": o.text } : {},
|
|
1346
1374
|
children: o.content
|
|
1347
1375
|
},
|
|
1348
1376
|
o.id
|
|
1349
1377
|
)),
|
|
1350
1378
|
/* @__PURE__ */ c("div", { className: "cms-section-header__actions", role: "toolbar", "aria-label": n, onKeyDown: ae, children: [
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1379
|
+
ye.map(R),
|
|
1380
|
+
te !== null ? R(te) : null,
|
|
1381
|
+
we ? /* @__PURE__ */ c("span", { className: H("cms-section-header__primary", ue !== null && "cms-section-header__primary--split"), children: [
|
|
1354
1382
|
/* @__PURE__ */ c(
|
|
1355
1383
|
"button",
|
|
1356
1384
|
{
|
|
1357
1385
|
type: "button",
|
|
1358
|
-
className:
|
|
1386
|
+
className: H("cms-button", "cms-button--primary", f.primaryBare && "cms-section-header__primary--bare"),
|
|
1359
1387
|
"data-action": "primary",
|
|
1360
1388
|
"aria-label": f.primaryBare ? s.label : void 0,
|
|
1361
1389
|
"aria-disabled": _e ? "true" : void 0,
|
|
@@ -1367,8 +1395,8 @@ function Jt({ title: n, icon: t, description: l, meta: r = [], primary: s, secon
|
|
|
1367
1395
|
_e ? ce !== void 0 && Be(Ae, o.currentTarget, I) : s.onPress();
|
|
1368
1396
|
},
|
|
1369
1397
|
children: [
|
|
1370
|
-
/* @__PURE__ */ e(
|
|
1371
|
-
f.primaryBare ? null : /* @__PURE__ */ c(
|
|
1398
|
+
/* @__PURE__ */ e(B, { name: s.icon }),
|
|
1399
|
+
f.primaryBare ? null : /* @__PURE__ */ c($, { children: [
|
|
1372
1400
|
" ",
|
|
1373
1401
|
/* @__PURE__ */ e("span", { children: s.label })
|
|
1374
1402
|
] })
|
|
@@ -1386,7 +1414,7 @@ function Jt({ title: n, icon: t, description: l, meta: r = [], primary: s, secon
|
|
|
1386
1414
|
"aria-label": ue.menuLabel,
|
|
1387
1415
|
...Se("primary-menu"),
|
|
1388
1416
|
onClick: (o) => he("primary", o.currentTarget),
|
|
1389
|
-
children: /* @__PURE__ */ e(
|
|
1417
|
+
children: /* @__PURE__ */ e(B, { name: "chevron-down" })
|
|
1390
1418
|
}
|
|
1391
1419
|
) : null,
|
|
1392
1420
|
ce !== void 0 ? Ee(I, ce, f.primaryBare ? s.label : null) : null
|
|
@@ -1404,37 +1432,37 @@ function Jt({ title: n, icon: t, description: l, meta: r = [], primary: s, secon
|
|
|
1404
1432
|
title: d,
|
|
1405
1433
|
...Se("more"),
|
|
1406
1434
|
onClick: (o) => he("more", o.currentTarget),
|
|
1407
|
-
children: /* @__PURE__ */ e(
|
|
1435
|
+
children: /* @__PURE__ */ e(B, { name: "more" })
|
|
1408
1436
|
}
|
|
1409
1437
|
) : null
|
|
1410
1438
|
] }),
|
|
1411
1439
|
/* @__PURE__ */ c("div", { ref: _, className: "cms-section-header__measure", "aria-hidden": "true", children: [
|
|
1412
|
-
t !== void 0 ? /* @__PURE__ */ e("span", { "data-measure": "lead", children: /* @__PURE__ */ e(
|
|
1440
|
+
t !== void 0 ? /* @__PURE__ */ e("span", { "data-measure": "lead", children: /* @__PURE__ */ e(B, { name: t }) }) : null,
|
|
1413
1441
|
/* @__PURE__ */ e("span", { "data-measure": "title", className: "cms-section-header__title", children: n }),
|
|
1414
1442
|
l !== void 0 ? /* @__PURE__ */ e("span", { "data-measure": "description", className: "cms-section-header__description", children: l }) : null,
|
|
1415
1443
|
r.map((o) => /* @__PURE__ */ e("span", { "data-measure": "meta", "data-measure-id": o.id, className: "cms-section-header__meta", children: o.content }, o.id)),
|
|
1416
|
-
|
|
1444
|
+
z.map((o) => /* @__PURE__ */ c("span", { children: [
|
|
1417
1445
|
/* @__PURE__ */ c("span", { "data-measure": "full", "data-measure-id": o.id, className: "cms-button cms-button--quiet cms-section-header__secondary", children: [
|
|
1418
|
-
o.icon !== null ? /* @__PURE__ */ e(
|
|
1446
|
+
o.icon !== null ? /* @__PURE__ */ e(B, { name: o.icon, size: 18 }) : null,
|
|
1419
1447
|
/* @__PURE__ */ e("span", { className: "cms-section-header__label", children: o.label })
|
|
1420
1448
|
] }),
|
|
1421
|
-
/* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-id": o.id, className: "cms-button cms-button--quiet cms-section-header__secondary cms-section-header__secondary--bare", children: o.icon !== null ? /* @__PURE__ */ e(
|
|
1449
|
+
/* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-id": o.id, className: "cms-button cms-button--quiet cms-section-header__secondary cms-section-header__secondary--bare", children: o.icon !== null ? /* @__PURE__ */ e(B, { name: o.icon, size: 18 }) : null })
|
|
1422
1450
|
] }, o.id)),
|
|
1423
|
-
|
|
1451
|
+
ne ? /* @__PURE__ */ c($, { children: [
|
|
1424
1452
|
/* @__PURE__ */ c("span", { "data-measure": "primary", className: "cms-section-header__primary", children: [
|
|
1425
1453
|
/* @__PURE__ */ c("span", { className: "cms-button cms-button--primary", children: [
|
|
1426
|
-
/* @__PURE__ */ e(
|
|
1454
|
+
/* @__PURE__ */ e(B, { name: s.icon }),
|
|
1427
1455
|
" ",
|
|
1428
1456
|
/* @__PURE__ */ e("span", { children: s.label })
|
|
1429
1457
|
] }),
|
|
1430
|
-
ue !== null ? /* @__PURE__ */ e("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ e(
|
|
1458
|
+
ue !== null ? /* @__PURE__ */ e("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ e(B, { name: "chevron-down" }) }) : null
|
|
1431
1459
|
] }),
|
|
1432
1460
|
/* @__PURE__ */ c("span", { "data-measure": "primary-icon", className: "cms-section-header__primary", children: [
|
|
1433
|
-
/* @__PURE__ */ e("span", { className: "cms-button cms-button--primary cms-section-header__primary--bare", children: /* @__PURE__ */ e(
|
|
1434
|
-
ue !== null ? /* @__PURE__ */ e("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ e(
|
|
1461
|
+
/* @__PURE__ */ e("span", { className: "cms-button cms-button--primary cms-section-header__primary--bare", children: /* @__PURE__ */ e(B, { name: s.icon }) }),
|
|
1462
|
+
ue !== null ? /* @__PURE__ */ e("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ e(B, { name: "chevron-down" }) }) : null
|
|
1435
1463
|
] })
|
|
1436
1464
|
] }) : null,
|
|
1437
|
-
/* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-section-header__more", children: /* @__PURE__ */ e(
|
|
1465
|
+
/* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-section-header__more", children: /* @__PURE__ */ e(B, { name: "more" }) })
|
|
1438
1466
|
] })
|
|
1439
1467
|
] }),
|
|
1440
1468
|
m != null ? /* @__PURE__ */ e("div", { className: "cms-section-header__context", "data-row": "2", children: m }) : null,
|
|
@@ -1448,9 +1476,9 @@ function ot(n) {
|
|
|
1448
1476
|
return [...t.entries()].sort(([l], [r]) => l - r).map(([, l]) => l);
|
|
1449
1477
|
}
|
|
1450
1478
|
function Qt({ head: n, children: t, className: l, scrollRef: r, onScroll: s, bodyProps: a }) {
|
|
1451
|
-
return /* @__PURE__ */ c("div", { className:
|
|
1479
|
+
return /* @__PURE__ */ c("div", { className: H("cms-column", l), children: [
|
|
1452
1480
|
n == null ? null : /* @__PURE__ */ e("div", { className: "cms-column__head", children: n }),
|
|
1453
|
-
/* @__PURE__ */ e("div", { ...a, className:
|
|
1481
|
+
/* @__PURE__ */ e("div", { ...a, className: H("cms-column__body", a == null ? void 0 : a.className), ref: r, onScroll: s, children: t })
|
|
1454
1482
|
] });
|
|
1455
1483
|
}
|
|
1456
1484
|
function el({ title: n, scope: t, actions: l, backLink: r }) {
|
|
@@ -1498,7 +1526,7 @@ function nl({ tabs: n, active: t, onSelect: l, label: r }) {
|
|
|
1498
1526
|
},
|
|
1499
1527
|
type: "button",
|
|
1500
1528
|
role: "tab",
|
|
1501
|
-
className:
|
|
1529
|
+
className: H("cms-tab", m && "is-active"),
|
|
1502
1530
|
"aria-selected": m,
|
|
1503
1531
|
tabIndex: m ? 0 : -1,
|
|
1504
1532
|
onClick: () => l(h.id),
|
|
@@ -1530,14 +1558,14 @@ function Ye({ name: n, pictureUrl: t, presence: l, connection: r, deleted: s = !
|
|
|
1530
1558
|
return /* @__PURE__ */ c(
|
|
1531
1559
|
"span",
|
|
1532
1560
|
{
|
|
1533
|
-
className:
|
|
1561
|
+
className: H("cms-avatar", b ? "cms-avatar--deleted" : `cms-avatar--tint-${ut(d ?? n)}`),
|
|
1534
1562
|
style: { width: h, height: h, fontSize: Math.round(h * 0.4) },
|
|
1535
1563
|
role: "img",
|
|
1536
1564
|
"aria-label": v,
|
|
1537
1565
|
...r === void 0 ? {} : { title: r.label },
|
|
1538
1566
|
children: [
|
|
1539
|
-
b ? /* @__PURE__ */ e(
|
|
1540
|
-
f === null ? null : /* @__PURE__ */ e("span", { className:
|
|
1567
|
+
b ? /* @__PURE__ */ e(B, { name: "user", size: Math.round(h * 0.6) }) : t ? /* @__PURE__ */ e("img", { src: t, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: i }),
|
|
1568
|
+
f === null ? null : /* @__PURE__ */ e("span", { className: H("cms-avatar__presence", f), "aria-hidden": "true" })
|
|
1541
1569
|
]
|
|
1542
1570
|
}
|
|
1543
1571
|
);
|
|
@@ -1571,7 +1599,7 @@ function pt({ storageKey: n, value: t, default: l, min: r, max: s, step: a = 16,
|
|
|
1571
1599
|
const i = Math.max(r, s), g = (_) => Math.round(Math.min(Math.max(_, r), i)), [f, v] = D(() => {
|
|
1572
1600
|
const _ = n === void 0 ? null : en(n);
|
|
1573
1601
|
return g(_ ?? l);
|
|
1574
|
-
}), u = g(t ?? f),
|
|
1602
|
+
}), u = g(t ?? f), y = P(null), [S, T] = D(!1);
|
|
1575
1603
|
$e(() => {
|
|
1576
1604
|
if (n === void 0) return;
|
|
1577
1605
|
const _ = en(n);
|
|
@@ -1581,12 +1609,12 @@ function pt({ storageKey: n, value: t, default: l, min: r, max: s, step: a = 16,
|
|
|
1581
1609
|
}, []), $e(() => {
|
|
1582
1610
|
t !== void 0 && g(t) !== t && d(g(t), !0);
|
|
1583
1611
|
}, [t, r, i]);
|
|
1584
|
-
const
|
|
1612
|
+
const M = (_, N) => {
|
|
1585
1613
|
const I = g(_);
|
|
1586
1614
|
v(I), N && ht(n, I), d(I, N);
|
|
1587
|
-
},
|
|
1588
|
-
const _ =
|
|
1589
|
-
|
|
1615
|
+
}, E = () => {
|
|
1616
|
+
const _ = y.current;
|
|
1617
|
+
y.current = null, T(!1), _ !== null && _.last !== _.from && M(_.last, !0);
|
|
1590
1618
|
};
|
|
1591
1619
|
return /* @__PURE__ */ e(
|
|
1592
1620
|
"div",
|
|
@@ -1598,29 +1626,29 @@ function pt({ storageKey: n, value: t, default: l, min: r, max: s, step: a = 16,
|
|
|
1598
1626
|
"aria-valuenow": u,
|
|
1599
1627
|
"aria-valuemin": r,
|
|
1600
1628
|
"aria-valuemax": i,
|
|
1601
|
-
className:
|
|
1629
|
+
className: H("cms-splitter", S && "is-dragging", u <= r && "is-at-min", u >= i && "is-at-max", m),
|
|
1602
1630
|
style: b,
|
|
1603
1631
|
onPointerDown: (_) => {
|
|
1604
|
-
var I,
|
|
1632
|
+
var I, K;
|
|
1605
1633
|
if (_.button > 0) return;
|
|
1606
|
-
_.preventDefault(), (
|
|
1634
|
+
_.preventDefault(), (K = (I = _.currentTarget).setPointerCapture) == null || K.call(I, _.pointerId);
|
|
1607
1635
|
const N = getComputedStyle(_.currentTarget).direction === "rtl" ? -1 : 1;
|
|
1608
|
-
|
|
1636
|
+
y.current = { x: _.clientX, from: u, last: u, sign: N }, T(!0);
|
|
1609
1637
|
},
|
|
1610
1638
|
onPointerMove: (_) => {
|
|
1611
|
-
const N =
|
|
1612
|
-
N === null || !Number.isFinite(_.clientX) || (N.last = g(N.from + N.sign * (_.clientX - N.x)),
|
|
1639
|
+
const N = y.current;
|
|
1640
|
+
N === null || !Number.isFinite(_.clientX) || (N.last = g(N.from + N.sign * (_.clientX - N.x)), M(N.last, !1));
|
|
1613
1641
|
},
|
|
1614
|
-
onPointerUp:
|
|
1615
|
-
onPointerCancel:
|
|
1642
|
+
onPointerUp: E,
|
|
1643
|
+
onPointerCancel: E,
|
|
1616
1644
|
onDoubleClick: () => {
|
|
1617
1645
|
ft(n);
|
|
1618
1646
|
const _ = g(l);
|
|
1619
1647
|
v(_), d(_, !0);
|
|
1620
1648
|
},
|
|
1621
1649
|
onKeyDown: (_) => {
|
|
1622
|
-
const N = _.shiftKey ? mt : a, I = getComputedStyle(_.currentTarget).direction === "rtl" ? -1 : 1,
|
|
1623
|
-
|
|
1650
|
+
const N = _.shiftKey ? mt : a, I = getComputedStyle(_.currentTarget).direction === "rtl" ? -1 : 1, K = _.key === "ArrowLeft" ? u - I * N : _.key === "ArrowRight" ? u + I * N : _.key === "Home" ? r : _.key === "End" ? i : null;
|
|
1651
|
+
K !== null && (_.preventDefault(), M(K, !0));
|
|
1624
1652
|
}
|
|
1625
1653
|
}
|
|
1626
1654
|
);
|
|
@@ -1641,7 +1669,7 @@ function tl({ product: n, mark: t, rail: l, active: r, onNavigate: s, server: a,
|
|
|
1641
1669
|
"a",
|
|
1642
1670
|
{
|
|
1643
1671
|
href: i.href,
|
|
1644
|
-
className:
|
|
1672
|
+
className: H("cms-shell__item", g && "is-active"),
|
|
1645
1673
|
"aria-current": g ? "page" : void 0,
|
|
1646
1674
|
title: i.label,
|
|
1647
1675
|
onClick: (f) => {
|
|
@@ -1649,7 +1677,7 @@ function tl({ product: n, mark: t, rail: l, active: r, onNavigate: s, server: a,
|
|
|
1649
1677
|
},
|
|
1650
1678
|
children: [
|
|
1651
1679
|
/* @__PURE__ */ c("span", { className: "cms-shell__icon", children: [
|
|
1652
|
-
/* @__PURE__ */ e(
|
|
1680
|
+
/* @__PURE__ */ e(B, { name: i.icon, size: 22 }),
|
|
1653
1681
|
i.badge ? /* @__PURE__ */ e(bt, { count: i.badge.count, label: i.badge.label }) : null
|
|
1654
1682
|
] }),
|
|
1655
1683
|
/* @__PURE__ */ e("span", { className: "cms-shell__label", children: i.label })
|
|
@@ -1677,7 +1705,7 @@ function ll({ label: n, placeholder: t, value: l, onChange: r, onSearch: s }) {
|
|
|
1677
1705
|
a.preventDefault(), s == null || s(l);
|
|
1678
1706
|
},
|
|
1679
1707
|
children: [
|
|
1680
|
-
/* @__PURE__ */ e(
|
|
1708
|
+
/* @__PURE__ */ e(B, { name: "search", size: 18 }),
|
|
1681
1709
|
/* @__PURE__ */ e(
|
|
1682
1710
|
"input",
|
|
1683
1711
|
{
|
|
@@ -1703,52 +1731,52 @@ function _t(n, t, l) {
|
|
|
1703
1731
|
return r;
|
|
1704
1732
|
}
|
|
1705
1733
|
function sl({ panes: n, active: t, back: l, sizes: r, lastMin: s = 360, onResize: a, storageKey: h }) {
|
|
1706
|
-
const d = Math.min(Math.max(t ?? n.length - 1, 0), n.length - 1), m = P(null), [b, i] = D(0), g = (r ?? []).slice(0, n.length - 1), [f, v] = D(() => h === void 0 ? [] : g.map((_, N) => en(`${h}:${String(N)}`) ?? void 0)), [u,
|
|
1734
|
+
const d = Math.min(Math.max(t ?? n.length - 1, 0), n.length - 1), m = P(null), [b, i] = D(0), g = (r ?? []).slice(0, n.length - 1), [f, v] = D(() => h === void 0 ? [] : g.map((_, N) => en(`${h}:${String(N)}`) ?? void 0)), [u, y] = D(!1), S = g.map((_, N) => _ !== void 0 && f[N] !== void 0 ? { ..._, width: f[N] } : _), T = S.length === n.length - 1 && S.every((_) => _ !== void 0);
|
|
1707
1735
|
$e(() => {
|
|
1708
1736
|
const _ = m.current;
|
|
1709
|
-
if (_ === null || !
|
|
1737
|
+
if (_ === null || !T) return;
|
|
1710
1738
|
const N = () => i(_.clientWidth);
|
|
1711
1739
|
if (N(), typeof ResizeObserver > "u") return;
|
|
1712
1740
|
const I = new ResizeObserver(N);
|
|
1713
1741
|
return I.observe(_), () => I.disconnect();
|
|
1714
|
-
}, [
|
|
1715
|
-
const
|
|
1742
|
+
}, [T]);
|
|
1743
|
+
const M = T ? _t(S, b > 0 ? b : Number.POSITIVE_INFINITY, s) : [], E = T ? Object.fromEntries(M.flatMap((_, N) => [
|
|
1716
1744
|
[`--split-pane-${String(N)}`, `${String(_)}px`],
|
|
1717
|
-
[`--split-pane-end-${String(N)}`, `${String(
|
|
1745
|
+
[`--split-pane-end-${String(N)}`, `${String(M.slice(0, N + 1).reduce((I, K) => I + K, 0))}px`]
|
|
1718
1746
|
])) : void 0;
|
|
1719
1747
|
return /* @__PURE__ */ c(
|
|
1720
1748
|
"div",
|
|
1721
1749
|
{
|
|
1722
1750
|
ref: m,
|
|
1723
|
-
className:
|
|
1751
|
+
className: H("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", T && "cms-panes--sized", u && "is-resizing"),
|
|
1724
1752
|
"data-active": d,
|
|
1725
|
-
style:
|
|
1753
|
+
style: E,
|
|
1726
1754
|
children: [
|
|
1727
1755
|
n.map((_, N) => /* @__PURE__ */ c("section", { className: "cms-panes__pane", "aria-label": _.label, "data-offset": d - N, children: [
|
|
1728
1756
|
N === d && l ? /* @__PURE__ */ c("a", { className: "cms-panes__back", href: l.href, children: [
|
|
1729
|
-
/* @__PURE__ */ e(
|
|
1757
|
+
/* @__PURE__ */ e(B, { name: "chevron-left", size: 18 }),
|
|
1730
1758
|
l.label
|
|
1731
1759
|
] }) : null,
|
|
1732
1760
|
_.content
|
|
1733
1761
|
] }, _.label)),
|
|
1734
|
-
|
|
1735
|
-
const I =
|
|
1762
|
+
T ? S.map((_, N) => {
|
|
1763
|
+
const I = M.reduce((z, k, F) => F === N ? z : z + k, 0), K = Math.max(_.min, Math.min(_.max, b > 0 ? b - I - s : _.max));
|
|
1736
1764
|
return /* @__PURE__ */ e(
|
|
1737
1765
|
pt,
|
|
1738
1766
|
{
|
|
1739
1767
|
...h === void 0 ? {} : { storageKey: `${h}:${String(N)}` },
|
|
1740
|
-
value:
|
|
1768
|
+
value: M[N],
|
|
1741
1769
|
default: _.reset,
|
|
1742
1770
|
min: _.min,
|
|
1743
|
-
max:
|
|
1771
|
+
max: K,
|
|
1744
1772
|
label: _.label,
|
|
1745
1773
|
className: "cms-panes__splitter",
|
|
1746
1774
|
style: { "--split-at": `var(--split-pane-end-${String(N)})` },
|
|
1747
|
-
onChange: (
|
|
1748
|
-
h !== void 0 && v((
|
|
1749
|
-
const U = [...
|
|
1750
|
-
return U[N] =
|
|
1751
|
-
}),
|
|
1775
|
+
onChange: (z, k) => {
|
|
1776
|
+
h !== void 0 && v((F) => {
|
|
1777
|
+
const U = [...F];
|
|
1778
|
+
return U[N] = z, U;
|
|
1779
|
+
}), y(!k), a == null || a(N, z, k);
|
|
1752
1780
|
}
|
|
1753
1781
|
},
|
|
1754
1782
|
_.label
|
|
@@ -1761,7 +1789,7 @@ function sl({ panes: n, active: t, back: l, sizes: r, lastMin: s = 360, onResize
|
|
|
1761
1789
|
const vt = { attachment: "Has an attachment", unread: "Unread" };
|
|
1762
1790
|
function rl({ from: n, fromPlaceholder: t = !1, subject: l, preview: r, time: s, unread: a, hasAttachment: h, selected: d, onOpen: m, check: b, selecting: i, labels: g }) {
|
|
1763
1791
|
const f = qe(vt, g), v = /* @__PURE__ */ e(Ye, { name: n, size: 40, placeholder: t });
|
|
1764
|
-
return /* @__PURE__ */ c("div", { className:
|
|
1792
|
+
return /* @__PURE__ */ c("div", { className: H("cms-mail-row", a && "is-unread", d && "is-selected", i && "is-selecting", (b == null ? void 0 : b.checked) && "is-checked"), children: [
|
|
1765
1793
|
b !== void 0 ? /* @__PURE__ */ c("span", { className: "cms-mail-row__lead", children: [
|
|
1766
1794
|
v,
|
|
1767
1795
|
/* @__PURE__ */ e(
|
|
@@ -1798,7 +1826,7 @@ function rl({ from: n, fromPlaceholder: t = !1, subject: l, preview: r, time: s,
|
|
|
1798
1826
|
/* @__PURE__ */ c("span", { className: "cms-mail-row__body", children: [
|
|
1799
1827
|
/* @__PURE__ */ c("span", { className: "cms-mail-row__line", children: [
|
|
1800
1828
|
/* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: n }),
|
|
1801
|
-
h ? /* @__PURE__ */ e(
|
|
1829
|
+
h ? /* @__PURE__ */ e(B, { name: "paperclip", size: 16, label: f.attachment }) : null,
|
|
1802
1830
|
/* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: s })
|
|
1803
1831
|
] }),
|
|
1804
1832
|
/* @__PURE__ */ c("span", { className: "cms-mail-row__line", children: [
|
|
@@ -1813,11 +1841,11 @@ function rl({ from: n, fromPlaceholder: t = !1, subject: l, preview: r, time: s,
|
|
|
1813
1841
|
] });
|
|
1814
1842
|
}
|
|
1815
1843
|
function al({ direction: n, children: t, time: l, read: r, readLabel: s = "Read" }) {
|
|
1816
|
-
return /* @__PURE__ */ c("div", { className:
|
|
1844
|
+
return /* @__PURE__ */ c("div", { className: H("cms-bubble", `cms-bubble--${n}`), children: [
|
|
1817
1845
|
/* @__PURE__ */ e("div", { className: "cms-bubble__text", children: t }),
|
|
1818
1846
|
/* @__PURE__ */ c("div", { className: "cms-bubble__meta", children: [
|
|
1819
1847
|
l,
|
|
1820
|
-
n === "out" && r ? /* @__PURE__ */ c(
|
|
1848
|
+
n === "out" && r ? /* @__PURE__ */ c($, { children: [
|
|
1821
1849
|
" · ",
|
|
1822
1850
|
s
|
|
1823
1851
|
] }) : null
|
|
@@ -1825,10 +1853,10 @@ function al({ direction: n, children: t, time: l, read: r, readLabel: s = "Read"
|
|
|
1825
1853
|
] });
|
|
1826
1854
|
}
|
|
1827
1855
|
function il({ label: n, value: t, onChange: l, onSend: r, onAttach: s, placeholder: a, variant: h = "chat", sendLabel: d = "Send", attachLabel: m = "Attach a file", leading: b, canSend: i }) {
|
|
1828
|
-
const g = fe(), f = i ?? t.trim() !== "", v = (
|
|
1829
|
-
|
|
1830
|
-
}, u = s ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": m, onClick: s, children: /* @__PURE__ */ e(
|
|
1831
|
-
return /* @__PURE__ */ c("form", { className:
|
|
1856
|
+
const g = fe(), f = i ?? t.trim() !== "", v = (y) => {
|
|
1857
|
+
y.preventDefault(), f && r();
|
|
1858
|
+
}, u = s ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": m, onClick: s, children: /* @__PURE__ */ e(B, { name: "paperclip" }) }) : null;
|
|
1859
|
+
return /* @__PURE__ */ c("form", { className: H("cms-composer", `cms-composer--${h}`), onSubmit: v, children: [
|
|
1832
1860
|
/* @__PURE__ */ e("label", { htmlFor: g, className: h === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
|
|
1833
1861
|
h === "chat" ? u : null,
|
|
1834
1862
|
/* @__PURE__ */ e(
|
|
@@ -1839,18 +1867,18 @@ function il({ label: n, value: t, onChange: l, onSend: r, onAttach: s, placehold
|
|
|
1839
1867
|
rows: h === "reply" ? 3 : 1,
|
|
1840
1868
|
placeholder: a,
|
|
1841
1869
|
value: t,
|
|
1842
|
-
onChange: (
|
|
1843
|
-
onKeyDown: (
|
|
1844
|
-
|
|
1870
|
+
onChange: (y) => l(y.target.value),
|
|
1871
|
+
onKeyDown: (y) => {
|
|
1872
|
+
y.nativeEvent.isComposing || y.keyCode === 229 || h === "chat" && y.key === "Enter" && !y.shiftKey && (y.preventDefault(), f && r());
|
|
1845
1873
|
}
|
|
1846
1874
|
}
|
|
1847
1875
|
),
|
|
1848
1876
|
h === "reply" && b !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: b }) : null,
|
|
1849
1877
|
h === "reply" ? u : null,
|
|
1850
|
-
h === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": d, disabled: !f, children: /* @__PURE__ */ e(
|
|
1878
|
+
h === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": d, disabled: !f, children: /* @__PURE__ */ e(B, { name: "send" }) }) : /* @__PURE__ */ c("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !f, children: [
|
|
1851
1879
|
d,
|
|
1852
1880
|
" ",
|
|
1853
|
-
/* @__PURE__ */ e(
|
|
1881
|
+
/* @__PURE__ */ e(B, { name: "send", size: 18 })
|
|
1854
1882
|
] })
|
|
1855
1883
|
] });
|
|
1856
1884
|
}
|
|
@@ -1892,11 +1920,11 @@ function ze({ icon: n, label: t, onClick: l, tone: r = "plain", pressed: s }) {
|
|
|
1892
1920
|
"button",
|
|
1893
1921
|
{
|
|
1894
1922
|
type: "button",
|
|
1895
|
-
className:
|
|
1923
|
+
className: H("cms-call-button", `cms-call-button--${r}`, s && "is-pressed"),
|
|
1896
1924
|
"aria-pressed": s,
|
|
1897
1925
|
onClick: l,
|
|
1898
1926
|
children: [
|
|
1899
|
-
/* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(
|
|
1927
|
+
/* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(B, { name: n, size: 24 }) }),
|
|
1900
1928
|
/* @__PURE__ */ e("span", { className: "cms-call-button__label", children: t })
|
|
1901
1929
|
]
|
|
1902
1930
|
}
|
|
@@ -1911,7 +1939,7 @@ function ol({ name: n, duration: t, connection: l, you: r, muted: s, speaker: a,
|
|
|
1911
1939
|
/* @__PURE__ */ e("p", { className: "cms-call-panel__name", children: n }),
|
|
1912
1940
|
/* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": f.callTime(t), children: t })
|
|
1913
1941
|
] }),
|
|
1914
|
-
/* @__PURE__ */ e("span", { className:
|
|
1942
|
+
/* @__PURE__ */ e("span", { className: H("cms-pill", l === "good" ? "cms-pill--success" : "cms-pill--warning"), children: l === "good" ? f.goodConnection : f.poorConnection })
|
|
1915
1943
|
] }),
|
|
1916
1944
|
/* @__PURE__ */ c("div", { className: "cms-call-panel__you", children: [
|
|
1917
1945
|
/* @__PURE__ */ e(Ye, { name: r.name, size: 36 }),
|
|
@@ -1934,9 +1962,9 @@ function dl({ name: n, duration: t, muted: l, onToggleMute: r, onReturn: s, onHa
|
|
|
1934
1962
|
/* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: d.onCallWith(n) }),
|
|
1935
1963
|
/* @__PURE__ */ e("span", { className: "cms-call-bar__time", children: t }),
|
|
1936
1964
|
/* @__PURE__ */ c("span", { className: "cms-call-bar__actions", children: [
|
|
1937
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": l ? d.unmute : d.mute, "aria-pressed": l, onClick: r, children: /* @__PURE__ */ e(
|
|
1965
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": l ? d.unmute : d.mute, "aria-pressed": l, onClick: r, children: /* @__PURE__ */ e(B, { name: "mic" }) }),
|
|
1938
1966
|
/* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: s, children: d.returnToCall }),
|
|
1939
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": d.hangUp, onClick: a, children: /* @__PURE__ */ e(
|
|
1967
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": d.hangUp, onClick: a, children: /* @__PURE__ */ e(B, { name: "phone-off" }) })
|
|
1940
1968
|
] })
|
|
1941
1969
|
] });
|
|
1942
1970
|
}
|
|
@@ -1951,7 +1979,7 @@ function ul({ mark: n, product: t, headline: l, lead: r, features: s = [], child
|
|
|
1951
1979
|
/* @__PURE__ */ e("p", { className: "cms-signin__headline", children: l }),
|
|
1952
1980
|
/* @__PURE__ */ e("p", { className: "cms-signin__lead", children: r }),
|
|
1953
1981
|
s.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: s.map((h) => /* @__PURE__ */ c("li", { children: [
|
|
1954
|
-
/* @__PURE__ */ e(
|
|
1982
|
+
/* @__PURE__ */ e(B, { name: h.icon, size: 18 }),
|
|
1955
1983
|
h.label
|
|
1956
1984
|
] }, h.label)) }) : null
|
|
1957
1985
|
] })
|
|
@@ -1978,7 +2006,7 @@ function ml({ server: n, onSubmit: t, forgotHref: l, createHref: r, error: s, bu
|
|
|
1978
2006
|
}, "aria-describedby": s ? `${m}-error` : void 0, children: [
|
|
1979
2007
|
/* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: d.title }),
|
|
1980
2008
|
/* @__PURE__ */ c("p", { className: "cms-signin-form__server", children: [
|
|
1981
|
-
/* @__PURE__ */ e(
|
|
2009
|
+
/* @__PURE__ */ e(B, { name: "server", size: 18 }),
|
|
1982
2010
|
n
|
|
1983
2011
|
] }),
|
|
1984
2012
|
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${m}-identifier`, children: d.identifier }),
|
|
@@ -2014,13 +2042,13 @@ function ml({ server: n, onSubmit: t, forgotHref: l, createHref: r, error: s, bu
|
|
|
2014
2042
|
l ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: l, children: d.forgot }) : null,
|
|
2015
2043
|
s ? /* @__PURE__ */ e("p", { id: `${m}-error`, className: "cms-signin-form__error", role: "alert", children: s }) : null,
|
|
2016
2044
|
/* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: a, "aria-busy": a || void 0, children: d.submit }),
|
|
2017
|
-
r ? /* @__PURE__ */ c(
|
|
2045
|
+
r ? /* @__PURE__ */ c($, { children: [
|
|
2018
2046
|
/* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: d.newHere }) }),
|
|
2019
2047
|
/* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: r, children: d.create })
|
|
2020
2048
|
] }) : null
|
|
2021
2049
|
] });
|
|
2022
2050
|
}
|
|
2023
|
-
const
|
|
2051
|
+
const yt = { name: (n, t) => `${n}: ${t}` };
|
|
2024
2052
|
function Cn(n) {
|
|
2025
2053
|
const t = dn(n);
|
|
2026
2054
|
return t === un(n.options, n.defaultValue) ? null : t ?? null;
|
|
@@ -2030,7 +2058,7 @@ function dn({ options: n, value: t, defaultValue: l }) {
|
|
|
2030
2058
|
}
|
|
2031
2059
|
function Sn(n) {
|
|
2032
2060
|
var t;
|
|
2033
|
-
return qe(
|
|
2061
|
+
return qe(yt, n.labels).name(n.label, ((t = dn(n)) == null ? void 0 : t.label) ?? "");
|
|
2034
2062
|
}
|
|
2035
2063
|
function En(n, t) {
|
|
2036
2064
|
const l = dn(n);
|
|
@@ -2051,26 +2079,26 @@ function un(n, t) {
|
|
|
2051
2079
|
function An(n) {
|
|
2052
2080
|
var a;
|
|
2053
2081
|
const t = P(null), l = (n == null ? void 0 : n.value) ?? null, s = n === void 0 || n.options.some((h) => h.id === n.value) ? null : ((a = un(n.options, n.defaultValue)) == null ? void 0 : a.id) ?? null;
|
|
2054
|
-
|
|
2082
|
+
ee(() => {
|
|
2055
2083
|
s === null ? t.current = null : t.current !== l && (t.current = l, n == null || n.onChange(s));
|
|
2056
2084
|
}, [s, l]);
|
|
2057
2085
|
}
|
|
2058
2086
|
function Tn({ iconOnly: n = !1, onOpenChange: t, ...l }) {
|
|
2059
|
-
return l.options.length < 2 ? null : /* @__PURE__ */ e(
|
|
2087
|
+
return l.options.length < 2 ? null : /* @__PURE__ */ e(wt, { ...l, iconOnly: n, onOpenChange: t });
|
|
2060
2088
|
}
|
|
2061
|
-
function
|
|
2089
|
+
function wt({ iconOnly: n, onOpenChange: t, ...l }) {
|
|
2062
2090
|
const [r, s] = D(null), a = Ie(() => s(null), []), h = P(!1), d = r !== null;
|
|
2063
|
-
|
|
2091
|
+
ee(() => (t == null || t(d), () => t == null ? void 0 : t(!1)), [d, t]);
|
|
2064
2092
|
const m = Cn(l), b = m !== null && !n, i = Sn(l), g = (f, v) => {
|
|
2065
2093
|
const u = f.getBoundingClientRect();
|
|
2066
2094
|
s({ x: u.left, y: u.bottom + 4, focus: v });
|
|
2067
2095
|
};
|
|
2068
|
-
return /* @__PURE__ */ c(
|
|
2096
|
+
return /* @__PURE__ */ c($, { children: [
|
|
2069
2097
|
/* @__PURE__ */ e(
|
|
2070
2098
|
"button",
|
|
2071
2099
|
{
|
|
2072
2100
|
type: "button",
|
|
2073
|
-
className:
|
|
2101
|
+
className: H("cms-filter-menu", m !== null && "cms-filter-menu--active", b && "cms-filter-menu--named"),
|
|
2074
2102
|
"aria-haspopup": "menu",
|
|
2075
2103
|
"aria-expanded": d,
|
|
2076
2104
|
"aria-label": i,
|
|
@@ -2084,10 +2112,10 @@ function yt({ iconOnly: n, onOpenChange: t, ...l }) {
|
|
|
2084
2112
|
onKeyDown: (f) => {
|
|
2085
2113
|
h.current = !1, (f.key === "ArrowDown" || f.key === "ArrowUp") && (f.preventDefault(), g(f.currentTarget, f.key === "ArrowUp" ? "last" : "current"));
|
|
2086
2114
|
},
|
|
2087
|
-
children: b ? /* @__PURE__ */ c(
|
|
2115
|
+
children: b ? /* @__PURE__ */ c($, { children: [
|
|
2088
2116
|
/* @__PURE__ */ e("span", { className: "cms-filter-menu__choice", children: m.label }),
|
|
2089
|
-
/* @__PURE__ */ e(
|
|
2090
|
-
] }) : /* @__PURE__ */ e(
|
|
2117
|
+
/* @__PURE__ */ e(B, { name: "chevron-down", size: 16 })
|
|
2118
|
+
] }) : /* @__PURE__ */ e(B, { name: "funnel" })
|
|
2091
2119
|
}
|
|
2092
2120
|
),
|
|
2093
2121
|
/* @__PURE__ */ e(
|
|
@@ -2112,7 +2140,7 @@ function hl({ leading: n, name: t, filter: l }) {
|
|
|
2112
2140
|
l !== void 0 ? /* @__PURE__ */ e(Nt, { ...l }) : null
|
|
2113
2141
|
] });
|
|
2114
2142
|
}
|
|
2115
|
-
const
|
|
2143
|
+
const yn = { bare: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Set() }, wn = (n, t) => n.size === t.size && [...n].every((l) => t.has(l));
|
|
2116
2144
|
function kt(n) {
|
|
2117
2145
|
const t = /* @__PURE__ */ new Map();
|
|
2118
2146
|
for (const l of n) t.set(l.group, [...t.get(l.group) ?? [], l]);
|
|
@@ -2125,88 +2153,88 @@ function xt(n) {
|
|
|
2125
2153
|
}
|
|
2126
2154
|
function fl({ label: n, actions: t, onAction: l, status: r, moreLabel: s, leading: a }) {
|
|
2127
2155
|
var G;
|
|
2128
|
-
const h = t.filter((p) => p.entries === void 0 || p.entries.length > 0), d = P(null), m = P(null), b = P(null), [i, g] = D(
|
|
2156
|
+
const h = t.filter((p) => p.entries === void 0 || p.entries.length > 0), d = P(null), m = P(null), b = P(null), [i, g] = D(yn), [f, v] = D(null), [u, y] = D("first"), [S, T] = D(null), [M, E] = D(null), _ = kt(h), N = _.flat(), I = ((G = N.find((p) => p.primary === !0 && p.overflow !== 0)) == null ? void 0 : G.id) ?? null, K = xt(h.filter((p) => p.id !== I)), z = N.filter((p) => p.overflow === 0), k = N.filter((p) => p.overflow !== 0), F = z.length === 1 ? z[0] ?? null : null, U = JSON.stringify([h.map((p) => [p.id, p.label, p.icon, p.group, p.overflow ?? null, p.primary === !0, p.entries !== void 0]), r ?? "", a !== void 0]), Y = (p) => /* @__PURE__ */ new Set([...z.filter((L) => L !== F || p.size > 0).map((L) => L.id), ...p]), W = Ie(() => {
|
|
2129
2157
|
const p = d.current, L = m.current;
|
|
2130
2158
|
if (p === null || L === null) return;
|
|
2131
|
-
const
|
|
2132
|
-
var
|
|
2133
|
-
return ((
|
|
2134
|
-
}, Se = he('[data-measure="leading"]'), We = he('[data-measure="separator"]'), Be = he('[data-measure="more"]'), Te = (
|
|
2135
|
-
const O =
|
|
2136
|
-
return Se + ke.reduce((He,
|
|
2137
|
-
}, R = k.filter((
|
|
2159
|
+
const V = getComputedStyle(p), me = parseFloat(V.columnGap || "0") || 0, ae = p.clientWidth - (parseFloat(V.paddingLeft) || 0) - (parseFloat(V.paddingRight) || 0), he = (A) => {
|
|
2160
|
+
var x;
|
|
2161
|
+
return ((x = L.querySelector(A)) == null ? void 0 : x.getBoundingClientRect().width) ?? 0;
|
|
2162
|
+
}, Se = he('[data-measure="leading"]'), We = he('[data-measure="separator"]'), Be = he('[data-measure="more"]'), Te = (A, x) => he(`[data-measure="${x ? "full" : "icon"}"][data-measure-action="${CSS.escape(A)}"]`), Ee = (A, x) => {
|
|
2163
|
+
const O = Y(x), se = F !== null && !O.has(F.id) ? F : null, Q = _.map((He) => He.filter((q) => !O.has(q.id) && q !== se)).filter((He) => He.length > 0), ke = [...Q.flat(), ...se !== null ? [se] : []], Fe = ke.length + (Q.length - 1) + (O.size > 0 ? 1 : 0) + (Se > 0 ? 1 : 0);
|
|
2164
|
+
return Se + ke.reduce((He, q) => He + Te(q.id, !A.has(q.id)), 0) + We * Math.max(0, Q.length - 1) + (O.size > 0 ? Be : 0) + me * Math.max(0, Fe - 1);
|
|
2165
|
+
}, R = k.filter((A) => A.id !== I && !K.some((x) => x.includes(A.id))).map((A) => A.id), J = [...K, ...[...R].reverse().map((A) => [A]), ...I !== null ? [[I]] : []], Ne = [...F !== null ? [[F.id]] : [], ...J];
|
|
2138
2166
|
let de = null;
|
|
2139
|
-
if (Ee(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= ae) de =
|
|
2167
|
+
if (Ee(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= ae) de = yn;
|
|
2140
2168
|
else {
|
|
2141
|
-
const
|
|
2142
|
-
for (const
|
|
2143
|
-
for (const O of
|
|
2144
|
-
if (Ee(
|
|
2145
|
-
de = { bare:
|
|
2169
|
+
const A = /* @__PURE__ */ new Set();
|
|
2170
|
+
for (const x of Ne) {
|
|
2171
|
+
for (const O of x) A.add(O);
|
|
2172
|
+
if (Ee(A, /* @__PURE__ */ new Set()) <= ae) {
|
|
2173
|
+
de = { bare: A, hidden: /* @__PURE__ */ new Set() };
|
|
2146
2174
|
break;
|
|
2147
2175
|
}
|
|
2148
2176
|
}
|
|
2149
2177
|
}
|
|
2150
2178
|
if (de === null) {
|
|
2151
|
-
const
|
|
2152
|
-
for (const se of
|
|
2153
|
-
for (const
|
|
2154
|
-
if (O() && Ee(
|
|
2179
|
+
const A = new Set(Ne.flat()), x = /* @__PURE__ */ new Set(), O = () => x.size + z.length >= 2;
|
|
2180
|
+
for (const se of J) {
|
|
2181
|
+
for (const Q of se) x.add(Q);
|
|
2182
|
+
if (O() && Ee(A, x) <= ae) break;
|
|
2155
2183
|
}
|
|
2156
|
-
O() ||
|
|
2184
|
+
O() || x.clear(), de = { bare: A, hidden: x };
|
|
2157
2185
|
}
|
|
2158
2186
|
const o = de;
|
|
2159
|
-
g((
|
|
2187
|
+
g((A) => wn(A.bare, o.bare) && wn(A.hidden, o.hidden) ? A : o);
|
|
2160
2188
|
}, [U]);
|
|
2161
|
-
$e(
|
|
2189
|
+
$e(W, [W]), ee(() => {
|
|
2162
2190
|
const p = d.current;
|
|
2163
2191
|
if (p === null || typeof ResizeObserver > "u") return;
|
|
2164
|
-
const L = new ResizeObserver(() =>
|
|
2192
|
+
const L = new ResizeObserver(() => W());
|
|
2165
2193
|
return L.observe(p), () => L.disconnect();
|
|
2166
|
-
}, [
|
|
2194
|
+
}, [W]), ee(() => {
|
|
2167
2195
|
const p = typeof document > "u" ? void 0 : document.fonts;
|
|
2168
2196
|
if (p === void 0) return;
|
|
2169
2197
|
let L = !0;
|
|
2170
|
-
const
|
|
2171
|
-
L &&
|
|
2198
|
+
const V = () => {
|
|
2199
|
+
L && W();
|
|
2172
2200
|
};
|
|
2173
|
-
return p.ready.then(
|
|
2174
|
-
L = !1, p.removeEventListener("loadingdone",
|
|
2201
|
+
return p.ready.then(V), p.addEventListener("loadingdone", V), () => {
|
|
2202
|
+
L = !1, p.removeEventListener("loadingdone", V);
|
|
2175
2203
|
};
|
|
2176
|
-
}, [
|
|
2177
|
-
const j =
|
|
2204
|
+
}, [W]);
|
|
2205
|
+
const j = Y(i.hidden), X = F !== null && !j.has(F.id) ? F : null, ne = (p) => j.has(p.id) || p === X, _e = [..._.map((p) => p.filter((L) => !ne(L))).filter((p) => p.length > 0).flat(), ...X !== null ? [X] : []], oe = (p) => N.find((L) => L.id === p), ue = [...K.flat(), ...k.filter((p) => p.id !== I && !K.some((L) => L.includes(p.id))).map((p) => p.id).reverse()], Ce = [
|
|
2178
2206
|
...I !== null && i.hidden.has(I) ? [oe(I)] : [],
|
|
2179
2207
|
...ue.filter((p) => i.hidden.has(p)).map(oe),
|
|
2180
|
-
...j.size > 0 ?
|
|
2181
|
-
].filter((p) => p !== void 0 && j.has(p.id)), pe = new Set(k.filter((p) => !
|
|
2208
|
+
...j.size > 0 ? z : []
|
|
2209
|
+
].filter((p) => p !== void 0 && j.has(p.id)), pe = new Set(k.filter((p) => !K.some((L) => L.includes(p.id))).map((p) => p.id)), le = [..._e.map((p) => p.id), ...Ce.length > 0 ? ["more"] : []], be = S !== null && le.includes(S) ? S : le[0] ?? null, ve = (p) => {
|
|
2182
2210
|
var ae, he;
|
|
2183
2211
|
const L = le.indexOf(be ?? "");
|
|
2184
|
-
let
|
|
2185
|
-
if (p.key === "ArrowRight" ?
|
|
2212
|
+
let V = null;
|
|
2213
|
+
if (p.key === "ArrowRight" ? V = Math.min(le.length - 1, L + 1) : p.key === "ArrowLeft" ? V = Math.max(0, L - 1) : p.key === "Home" ? V = 0 : p.key === "End" ? V = le.length - 1 : p.key === "Escape" && E(be), V === null) return;
|
|
2186
2214
|
p.preventDefault();
|
|
2187
|
-
const me = le[
|
|
2188
|
-
|
|
2189
|
-
},
|
|
2215
|
+
const me = le[V] ?? null;
|
|
2216
|
+
T(me), (he = (ae = d.current) == null ? void 0 : ae.querySelector(`[data-stop="${CSS.escape(me ?? "")}"]`)) == null || he.focus();
|
|
2217
|
+
}, ye = Ce.map((p) => ({
|
|
2190
2218
|
id: p.id,
|
|
2191
|
-
label: /* @__PURE__ */ c(
|
|
2219
|
+
label: /* @__PURE__ */ c($, { children: [
|
|
2192
2220
|
/* @__PURE__ */ e(je, { name: p.icon }),
|
|
2193
2221
|
p.label
|
|
2194
2222
|
] }),
|
|
2195
2223
|
offer: p.disabled ? { offered: !0, locked: !1, refusal: p.reason ?? "" } : { offered: !0, locked: !1 },
|
|
2196
2224
|
...p.danger ? { danger: !0 } : {},
|
|
2197
2225
|
onSelect: () => {
|
|
2198
|
-
var
|
|
2226
|
+
var V;
|
|
2199
2227
|
if (p.disabled || p.busy) return;
|
|
2200
2228
|
if (p.entries === void 0) {
|
|
2201
2229
|
l(p.id);
|
|
2202
2230
|
return;
|
|
2203
2231
|
}
|
|
2204
|
-
const L = (
|
|
2205
|
-
|
|
2232
|
+
const L = (V = b.current) == null ? void 0 : V.getBoundingClientRect();
|
|
2233
|
+
y("first"), v({ which: p.id, x: (L == null ? void 0 : L.left) ?? 0, y: (L == null ? void 0 : L.bottom) ?? 0 });
|
|
2206
2234
|
}
|
|
2207
|
-
})),
|
|
2235
|
+
})), te = f === null || f.which === "more" ? void 0 : N.find((p) => p.id === f.which), we = ((te == null ? void 0 : te.entries) ?? []).map((p) => ({
|
|
2208
2236
|
id: p.id,
|
|
2209
|
-
label: /* @__PURE__ */ c(
|
|
2237
|
+
label: /* @__PURE__ */ c($, { children: [
|
|
2210
2238
|
p.icon !== void 0 ? /* @__PURE__ */ e(je, { name: p.icon }) : null,
|
|
2211
2239
|
p.label
|
|
2212
2240
|
] }),
|
|
@@ -2215,10 +2243,10 @@ function fl({ label: n, actions: t, onAction: l, status: r, moreLabel: s, leadin
|
|
|
2215
2243
|
onSelect: () => {
|
|
2216
2244
|
p.disabled || l(p.id);
|
|
2217
2245
|
}
|
|
2218
|
-
})),
|
|
2246
|
+
})), w = (p, L, V) => {
|
|
2219
2247
|
const me = L.getBoundingClientRect();
|
|
2220
|
-
|
|
2221
|
-
}, C = k.length + (
|
|
2248
|
+
y(V), v({ which: p, x: me.left, y: me.bottom });
|
|
2249
|
+
}, C = k.length + (F !== null ? 1 : 0), Z = (p) => /* @__PURE__ */ e(
|
|
2222
2250
|
Mt,
|
|
2223
2251
|
{
|
|
2224
2252
|
action: p,
|
|
@@ -2226,13 +2254,13 @@ function fl({ label: n, actions: t, onAction: l, status: r, moreLabel: s, leadin
|
|
|
2226
2254
|
overflowed: j.has(p.id),
|
|
2227
2255
|
pinned: pe.has(p.id),
|
|
2228
2256
|
tabbable: be === p.id,
|
|
2229
|
-
tipOff:
|
|
2257
|
+
tipOff: M === p.id,
|
|
2230
2258
|
menuOpen: (f == null ? void 0 : f.which) === p.id,
|
|
2231
|
-
onChoose: (L,
|
|
2232
|
-
p.entries === void 0 ? l(p.id) : (f == null ? void 0 : f.which) === p.id &&
|
|
2259
|
+
onChoose: (L, V) => {
|
|
2260
|
+
p.entries === void 0 ? l(p.id) : (f == null ? void 0 : f.which) === p.id && V === null ? v(null) : w(p.id, L, V ?? "first");
|
|
2233
2261
|
},
|
|
2234
2262
|
onFocus: () => {
|
|
2235
|
-
|
|
2263
|
+
T(p.id), E(null);
|
|
2236
2264
|
}
|
|
2237
2265
|
},
|
|
2238
2266
|
p.id
|
|
@@ -2243,7 +2271,7 @@ function fl({ label: n, actions: t, onAction: l, status: r, moreLabel: s, leadin
|
|
|
2243
2271
|
ref: d,
|
|
2244
2272
|
role: "toolbar",
|
|
2245
2273
|
"aria-label": n,
|
|
2246
|
-
className:
|
|
2274
|
+
className: H(
|
|
2247
2275
|
"cms-pane-toolbar",
|
|
2248
2276
|
C > 0 && i.bare.size >= C && "cms-pane-toolbar--labels-hidden",
|
|
2249
2277
|
i.bare.size > 0 && i.bare.size < C && "cms-pane-toolbar--labels-partly-hidden"
|
|
@@ -2252,13 +2280,13 @@ function fl({ label: n, actions: t, onAction: l, status: r, moreLabel: s, leadin
|
|
|
2252
2280
|
children: [
|
|
2253
2281
|
a !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__leading", children: a }) : null,
|
|
2254
2282
|
_.map((p, L) => {
|
|
2255
|
-
const
|
|
2283
|
+
const V = p.filter((ae) => !ne(ae)), me = _.slice(0, L).some((ae) => ae.some((he) => !ne(he)));
|
|
2256
2284
|
return /* @__PURE__ */ c("div", { className: "cms-pane-toolbar__group-wrap", children: [
|
|
2257
|
-
|
|
2258
|
-
/* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden:
|
|
2285
|
+
V.length > 0 && me ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
|
|
2286
|
+
/* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: V.length === 0, children: p.filter((ae) => ae !== X).map((ae) => Z(ae)) })
|
|
2259
2287
|
] }, L);
|
|
2260
2288
|
}),
|
|
2261
|
-
|
|
2289
|
+
X !== null ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group cms-pane-toolbar__lone", children: Z(X) }) : null,
|
|
2262
2290
|
Ce.length > 0 ? /* @__PURE__ */ e(
|
|
2263
2291
|
"button",
|
|
2264
2292
|
{
|
|
@@ -2271,30 +2299,30 @@ function fl({ label: n, actions: t, onAction: l, status: r, moreLabel: s, leadin
|
|
|
2271
2299
|
"aria-haspopup": "menu",
|
|
2272
2300
|
"aria-expanded": (f == null ? void 0 : f.which) === "more",
|
|
2273
2301
|
tabIndex: be === "more" ? 0 : -1,
|
|
2274
|
-
onFocus: () =>
|
|
2302
|
+
onFocus: () => T("more"),
|
|
2275
2303
|
onClick: (p) => {
|
|
2276
|
-
(f == null ? void 0 : f.which) === "more" ? v(null) :
|
|
2304
|
+
(f == null ? void 0 : f.which) === "more" ? v(null) : w("more", p.currentTarget, "first");
|
|
2277
2305
|
},
|
|
2278
2306
|
onKeyDown: (p) => {
|
|
2279
|
-
(p.key === "ArrowDown" || p.key === "ArrowUp") && (p.preventDefault(), p.stopPropagation(),
|
|
2307
|
+
(p.key === "ArrowDown" || p.key === "ArrowUp") && (p.preventDefault(), p.stopPropagation(), w("more", p.currentTarget, p.key === "ArrowUp" ? "last" : "first"));
|
|
2280
2308
|
},
|
|
2281
|
-
children: /* @__PURE__ */ e(
|
|
2309
|
+
children: /* @__PURE__ */ e(B, { name: "more" })
|
|
2282
2310
|
}
|
|
2283
2311
|
) : null,
|
|
2284
2312
|
r !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: r, children: r }) : null,
|
|
2285
|
-
/* @__PURE__ */ e(Ke, { at: (f == null ? void 0 : f.which) === "more" ? f : null, items:
|
|
2286
|
-
/* @__PURE__ */ e(Ke, { at:
|
|
2313
|
+
/* @__PURE__ */ e(Ke, { at: (f == null ? void 0 : f.which) === "more" ? f : null, items: ye, onClose: () => v(null), label: s, focus: u }),
|
|
2314
|
+
/* @__PURE__ */ e(Ke, { at: te !== void 0 ? f : null, items: we, onClose: () => v(null), label: (te == null ? void 0 : te.label) ?? "", focus: u }),
|
|
2287
2315
|
/* @__PURE__ */ c("div", { ref: m, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
|
|
2288
2316
|
a !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: a }) : null,
|
|
2289
2317
|
/* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
|
|
2290
|
-
/* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(
|
|
2318
|
+
/* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(B, { name: "more" }) }),
|
|
2291
2319
|
N.map((p) => /* @__PURE__ */ c("span", { children: [
|
|
2292
|
-
/* @__PURE__ */ c("span", { "data-measure": "full", "data-measure-action": p.id, className:
|
|
2320
|
+
/* @__PURE__ */ c("span", { "data-measure": "full", "data-measure-action": p.id, className: H("cms-pane-toolbar__action", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
|
|
2293
2321
|
/* @__PURE__ */ e(je, { name: p.icon }),
|
|
2294
2322
|
/* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: p.label }),
|
|
2295
2323
|
p.entries !== void 0 ? /* @__PURE__ */ e(nn, {}) : null
|
|
2296
2324
|
] }),
|
|
2297
|
-
/* @__PURE__ */ c("span", { "data-measure": "icon", "data-measure-action": p.id, className:
|
|
2325
|
+
/* @__PURE__ */ c("span", { "data-measure": "icon", "data-measure-action": p.id, className: H("cms-pane-toolbar__action", Ue(p.icon) !== null && "cms-pane-toolbar__action--bare", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
|
|
2298
2326
|
Ue(p.icon) !== null ? /* @__PURE__ */ e(je, { name: p.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: p.label }),
|
|
2299
2327
|
p.entries !== void 0 ? /* @__PURE__ */ e(nn, {}) : null
|
|
2300
2328
|
] })
|
|
@@ -2307,7 +2335,7 @@ function fl({ label: n, actions: t, onAction: l, status: r, moreLabel: s, leadin
|
|
|
2307
2335
|
const Oe = "tip";
|
|
2308
2336
|
function Mt({ action: n, labels: t, overflowed: l, pinned: r, tabbable: s, tipOff: a, menuOpen: h, onChoose: d, onFocus: m }) {
|
|
2309
2337
|
const [b, i] = D(!1);
|
|
2310
|
-
|
|
2338
|
+
ee(() => {
|
|
2311
2339
|
if (!n.busy) {
|
|
2312
2340
|
i(!1);
|
|
2313
2341
|
return;
|
|
@@ -2315,12 +2343,12 @@ function Mt({ action: n, labels: t, overflowed: l, pinned: r, tabbable: s, tipOf
|
|
|
2315
2343
|
const _ = setTimeout(() => i(!0), Je);
|
|
2316
2344
|
return () => clearTimeout(_);
|
|
2317
2345
|
}, [n.busy]);
|
|
2318
|
-
const g = Ue(n.icon) === null, f = t || g, v = n.disabled && n.reason ? n.reason : null, u = v ?? (f ? null : n.label),
|
|
2346
|
+
const g = Ue(n.icon) === null, f = t || g, v = n.disabled && n.reason ? n.reason : null, u = v ?? (f ? null : n.label), y = fe(), [S, T] = D(!1), M = an(), E = n.entries !== void 0;
|
|
2319
2347
|
return /* @__PURE__ */ c(
|
|
2320
2348
|
"button",
|
|
2321
2349
|
{
|
|
2322
2350
|
type: "button",
|
|
2323
|
-
className:
|
|
2351
|
+
className: H("cms-pane-toolbar__action", !f && "cms-pane-toolbar__action--bare", g && "cms-pane-toolbar__action--text", E && "cms-pane-toolbar__action--menu", n.danger && "is-danger"),
|
|
2324
2352
|
"data-action": n.id,
|
|
2325
2353
|
"data-stop": n.id,
|
|
2326
2354
|
...l ? { "data-overflowed": "" } : {},
|
|
@@ -2329,49 +2357,49 @@ function Mt({ action: n, labels: t, overflowed: l, pinned: r, tabbable: s, tipOf
|
|
|
2329
2357
|
"aria-label": n.label,
|
|
2330
2358
|
"aria-disabled": n.disabled || void 0,
|
|
2331
2359
|
"aria-busy": n.busy || void 0,
|
|
2332
|
-
...
|
|
2333
|
-
...v === null ? {} : { "aria-describedby":
|
|
2360
|
+
...E ? { "aria-haspopup": "menu", "aria-expanded": h } : {},
|
|
2361
|
+
...v === null ? {} : { "aria-describedby": y },
|
|
2334
2362
|
...S && v !== null ? { "data-reason-shown": "" } : {},
|
|
2335
|
-
...
|
|
2363
|
+
...M.dismissed(Oe) ? { "data-tip-dismissed": "" } : {},
|
|
2336
2364
|
tabIndex: s ? 0 : -1,
|
|
2337
2365
|
onFocus: () => {
|
|
2338
|
-
m(),
|
|
2366
|
+
m(), M.focusIn(Oe);
|
|
2339
2367
|
},
|
|
2340
2368
|
onBlur: () => {
|
|
2341
|
-
|
|
2369
|
+
T(!1), M.focusOut(Oe);
|
|
2342
2370
|
},
|
|
2343
|
-
onMouseEnter: () =>
|
|
2344
|
-
onMouseLeave: () =>
|
|
2371
|
+
onMouseEnter: () => M.pointerIn(Oe),
|
|
2372
|
+
onMouseLeave: () => M.pointerOut(Oe),
|
|
2345
2373
|
onKeyDown: (_) => {
|
|
2346
|
-
_.key === "Escape" && (
|
|
2374
|
+
_.key === "Escape" && (T(!1), M.dismiss(Oe)), E && (_.key === "ArrowDown" || _.key === "ArrowUp") && (_.preventDefault(), v !== null ? T(!0) : !n.disabled && !n.busy && d(_.currentTarget, _.key === "ArrowUp" ? "last" : "first"));
|
|
2347
2375
|
},
|
|
2348
2376
|
onClick: (_) => {
|
|
2349
|
-
v !== null ? (
|
|
2377
|
+
v !== null ? (T(!0), M.show(Oe)) : !n.disabled && !n.busy && d(_.currentTarget, null);
|
|
2350
2378
|
},
|
|
2351
2379
|
children: [
|
|
2352
2380
|
b ? /* @__PURE__ */ e(re, { name: "spinner" }) : /* @__PURE__ */ e(je, { name: n.icon }),
|
|
2353
2381
|
f ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
|
|
2354
|
-
|
|
2355
|
-
v !== null || u !== null && !a ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id:
|
|
2382
|
+
E ? /* @__PURE__ */ e(nn, {}) : null,
|
|
2383
|
+
v !== null || u !== null && !a ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: y, children: u }) : null
|
|
2356
2384
|
]
|
|
2357
2385
|
}
|
|
2358
2386
|
);
|
|
2359
2387
|
}
|
|
2360
2388
|
function nn() {
|
|
2361
|
-
return /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
2389
|
+
return /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(B, { name: "chevron-down", size: 14 }) });
|
|
2362
2390
|
}
|
|
2363
2391
|
function je({ name: n }) {
|
|
2364
2392
|
const t = Ue(n);
|
|
2365
|
-
return t === null ? null : /* @__PURE__ */ e(
|
|
2393
|
+
return t === null ? null : /* @__PURE__ */ e(B, { name: t, size: 18 });
|
|
2366
2394
|
}
|
|
2367
2395
|
function pl({ title: n, body: t = null, time: l = null, unread: r, unreadLabel: s, expandLabel: a, collapseLabel: h, action: d = null, onRead: m, leading: b }) {
|
|
2368
2396
|
const [i, g] = D(!1), f = fe(), v = () => {
|
|
2369
2397
|
r && m();
|
|
2370
|
-
}, u = (d == null ? void 0 : d.presentation) === "row" && d.onAction !== void 0,
|
|
2371
|
-
var
|
|
2372
|
-
v(), u && ((
|
|
2398
|
+
}, u = (d == null ? void 0 : d.presentation) === "row" && d.onAction !== void 0, y = (d == null ? void 0 : d.presentation) === "button" && d.onAction !== void 0 ? d : null, S = () => {
|
|
2399
|
+
var T;
|
|
2400
|
+
v(), u && ((T = d.onAction) == null || T.call(d));
|
|
2373
2401
|
};
|
|
2374
|
-
return /* @__PURE__ */ c("article", { className:
|
|
2402
|
+
return /* @__PURE__ */ c("article", { className: H("cms-notification", r && "is-unread", i && "is-expanded", u && "is-row-action"), "data-state": r ? "unread" : "read", children: [
|
|
2375
2403
|
/* @__PURE__ */ c(
|
|
2376
2404
|
"div",
|
|
2377
2405
|
{
|
|
@@ -2380,8 +2408,8 @@ function pl({ title: n, body: t = null, time: l = null, unread: r, unreadLabel:
|
|
|
2380
2408
|
tabIndex: 0,
|
|
2381
2409
|
"aria-describedby": t === null ? void 0 : f,
|
|
2382
2410
|
onClick: S,
|
|
2383
|
-
onKeyDown: (
|
|
2384
|
-
|
|
2411
|
+
onKeyDown: (T) => {
|
|
2412
|
+
T.target !== T.currentTarget || T.key !== "Enter" && T.key !== " " || (T.preventDefault(), S());
|
|
2385
2413
|
},
|
|
2386
2414
|
children: [
|
|
2387
2415
|
b != null ? /* @__PURE__ */ e("span", { className: "cms-notification__leading", children: b }) : null,
|
|
@@ -2412,21 +2440,21 @@ function pl({ title: n, body: t = null, time: l = null, unread: r, unreadLabel:
|
|
|
2412
2440
|
"aria-label": i ? h : a,
|
|
2413
2441
|
title: i ? h : a,
|
|
2414
2442
|
onClick: () => {
|
|
2415
|
-
i || v(), g((
|
|
2443
|
+
i || v(), g((T) => !T);
|
|
2416
2444
|
},
|
|
2417
|
-
children: /* @__PURE__ */ e(
|
|
2445
|
+
children: /* @__PURE__ */ e(B, { name: "chevron-down", size: 18 })
|
|
2418
2446
|
}
|
|
2419
2447
|
) : null,
|
|
2420
|
-
|
|
2448
|
+
y !== null ? /* @__PURE__ */ e(
|
|
2421
2449
|
"button",
|
|
2422
2450
|
{
|
|
2423
2451
|
type: "button",
|
|
2424
2452
|
className: "cms-button cms-notification__action",
|
|
2425
2453
|
onClick: () => {
|
|
2426
|
-
var
|
|
2427
|
-
v(), (
|
|
2454
|
+
var T;
|
|
2455
|
+
v(), (T = y.onAction) == null || T.call(y);
|
|
2428
2456
|
},
|
|
2429
|
-
children:
|
|
2457
|
+
children: y.label
|
|
2430
2458
|
}
|
|
2431
2459
|
) : null
|
|
2432
2460
|
] });
|
|
@@ -2482,7 +2510,7 @@ function gl(n) {
|
|
|
2482
2510
|
}
|
|
2483
2511
|
);
|
|
2484
2512
|
}, []);
|
|
2485
|
-
return
|
|
2513
|
+
return ee(() => {
|
|
2486
2514
|
b();
|
|
2487
2515
|
const i = () => b();
|
|
2488
2516
|
return window.addEventListener("focus", i), window.addEventListener(tn, i), () => {
|
|
@@ -2490,7 +2518,7 @@ function gl(n) {
|
|
|
2490
2518
|
};
|
|
2491
2519
|
}, [b]), { value: t, error: r, loading: a, reread: b };
|
|
2492
2520
|
}
|
|
2493
|
-
function
|
|
2521
|
+
function yl(n) {
|
|
2494
2522
|
return n === 412 ? { conflict: !0, message: "Someone changed this since you opened it. Nothing was saved; read it again to see the change." } : { conflict: !1 };
|
|
2495
2523
|
}
|
|
2496
2524
|
const At = "/errors/client-update-required";
|
|
@@ -2502,7 +2530,7 @@ function Tt(n, t) {
|
|
|
2502
2530
|
}
|
|
2503
2531
|
return !1;
|
|
2504
2532
|
}
|
|
2505
|
-
function
|
|
2533
|
+
function wl(n) {
|
|
2506
2534
|
return n.problemType !== void 0 && n.problemType.endsWith(At) ? !0 : n.minimumVersion !== void 0 && Tt(n.version, n.minimumVersion);
|
|
2507
2535
|
}
|
|
2508
2536
|
const Pe = "primary", Nn = 4, Lt = 48;
|
|
@@ -2513,7 +2541,7 @@ function Dt(n, t, l) {
|
|
|
2513
2541
|
const It = 800, $t = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
|
|
2514
2542
|
function Bt(n, t) {
|
|
2515
2543
|
const [l, r] = D(!1);
|
|
2516
|
-
return
|
|
2544
|
+
return ee(() => {
|
|
2517
2545
|
const s = n.current;
|
|
2518
2546
|
if (s === null || !t) {
|
|
2519
2547
|
r(!1);
|
|
@@ -2529,12 +2557,12 @@ function Bt(n, t) {
|
|
|
2529
2557
|
}, i = (f) => {
|
|
2530
2558
|
const v = f.target;
|
|
2531
2559
|
if (!(v instanceof HTMLElement)) return;
|
|
2532
|
-
const u = v.scrollTop,
|
|
2560
|
+
const u = v.scrollTop, y = a.get(v) ?? 0;
|
|
2533
2561
|
if (a.set(v, u), u <= 0) {
|
|
2534
2562
|
r(!1);
|
|
2535
2563
|
return;
|
|
2536
2564
|
}
|
|
2537
|
-
performance.now() - h > It || !(d === s || d === document.body || d instanceof Node && v.contains(d)) || (u <
|
|
2565
|
+
performance.now() - h > It || !(d === s || d === document.body || d instanceof Node && v.contains(d)) || (u < y - Nn ? r(!1) : u > y + Nn && u > Lt && Dt(s, v, u) && r(!0));
|
|
2538
2566
|
}, g = [["wheel", m], ["touchmove", m], ["pointerdown", m], ["keydown", b]];
|
|
2539
2567
|
for (const [f, v] of g) s.addEventListener(f, v, { capture: !0, passive: !0 });
|
|
2540
2568
|
return s.addEventListener("scroll", i, { capture: !0, passive: !0 }), () => {
|
|
@@ -2550,45 +2578,45 @@ function Ht({ bar: n, leading: t, gap: l, icon: r, iconGap: s, search: a, more:
|
|
|
2550
2578
|
}
|
|
2551
2579
|
function Nl({ title: n, back: t, navigation: l, search: r, searching: s, more: a = [], moreLabel: h = "More actions", globals: d, filter: m, primary: b, onRefresh: i, pullText: g, barHidden: f, children: v }) {
|
|
2552
2580
|
var Te, Ee;
|
|
2553
|
-
const u = b === void 0 || ("menu" in b ? !b.menu.some((R) => R.offer.offered) : ((Te = b.offer) == null ? void 0 : Te.offered) === !1) ? void 0 : b,
|
|
2581
|
+
const u = b === void 0 || ("menu" in b ? !b.menu.some((R) => R.offer.offered) : ((Te = b.offer) == null ? void 0 : Te.offered) === !1) ? void 0 : b, y = u !== void 0 && !("menu" in u) ? ((Ee = u.offer) == null ? void 0 : Ee.refusal) ?? null : null, S = fe(), [T, M] = D(!1), E = an(), _ = P(null), N = P(null), [I, K] = D(!1), [z, k] = D(null), [F, U] = D(null), Y = Ie(() => U(null), []), W = P(!1), j = P(null), X = P(null), ne = P(null), ce = a.some((R) => R.offer.offered), _e = F !== null && ce && s === void 0;
|
|
2554
2582
|
An(m);
|
|
2555
2583
|
const oe = m === void 0 ? null : Cn(m), [ue, Ce] = D(!1), pe = P(!1), le = P(!1), be = P(null), ve = m === void 0 ? void 0 : {
|
|
2556
2584
|
...m,
|
|
2557
2585
|
onChange: (R) => {
|
|
2558
2586
|
pe.current = !0, m.onChange(R);
|
|
2559
2587
|
}
|
|
2560
|
-
},
|
|
2561
|
-
const R = j.current,
|
|
2562
|
-
if (R === null ||
|
|
2563
|
-
const de = (
|
|
2564
|
-
if (
|
|
2565
|
-
const
|
|
2588
|
+
}, ye = oe === null ? "" : ` · ${oe.label}`, te = m !== void 0 && m.options.length >= 2, [we, w] = D(!1), C = te && ce && we, Z = JSON.stringify([te, ce, C, r !== void 0, s !== void 0, t !== void 0, n, ye]), G = Ie(() => {
|
|
2589
|
+
const R = j.current, J = X.current, Ne = ne.current;
|
|
2590
|
+
if (R === null || J === null || Ne === null || !te) return null;
|
|
2591
|
+
const de = (Q) => parseFloat(Q) || 0, o = getComputedStyle(R), A = R.getBoundingClientRect().width;
|
|
2592
|
+
if (A === 0) return null;
|
|
2593
|
+
const x = (Q) => {
|
|
2566
2594
|
var ke;
|
|
2567
|
-
return ((ke = R.querySelector(`.cms-screen__ruler > [data-ruler="${
|
|
2595
|
+
return ((ke = R.querySelector(`.cms-screen__ruler > [data-ruler="${Q}"]`)) == null ? void 0 : ke.getBoundingClientRect().width) ?? 0;
|
|
2568
2596
|
}, O = R.querySelector(".cms-screen__leading"), se = (r !== void 0 ? 1 : 0) + (C ? 0 : 1) + 1;
|
|
2569
2597
|
return Ht({
|
|
2570
|
-
bar:
|
|
2598
|
+
bar: A - de(o.paddingLeft) - de(o.paddingRight),
|
|
2571
2599
|
leading: O === null || O.childNodes.length === 0 ? 0 : de(getComputedStyle(O).minWidth),
|
|
2572
2600
|
gap: de(o.columnGap),
|
|
2573
2601
|
icon: Ne.getBoundingClientRect().width,
|
|
2574
|
-
iconGap: de(getComputedStyle(
|
|
2602
|
+
iconGap: de(getComputedStyle(J).columnGap),
|
|
2575
2603
|
search: r !== void 0,
|
|
2576
2604
|
more: !0,
|
|
2577
|
-
globals: Array.from(
|
|
2578
|
-
name:
|
|
2579
|
-
choice:
|
|
2605
|
+
globals: Array.from(J.children).slice(se).map((Q) => Q.getBoundingClientRect().width),
|
|
2606
|
+
name: x("name"),
|
|
2607
|
+
choice: x("choice")
|
|
2580
2608
|
});
|
|
2581
|
-
}, [
|
|
2609
|
+
}, [Z]);
|
|
2582
2610
|
$e(() => {
|
|
2583
|
-
const R = G() ??
|
|
2584
|
-
R !==
|
|
2585
|
-
}, [G]),
|
|
2611
|
+
const R = G() ?? we;
|
|
2612
|
+
R !== we && pe.current && (le.current = !0), pe.current = !1, w(R);
|
|
2613
|
+
}, [G]), ee(() => {
|
|
2586
2614
|
if (j.current === null || typeof ResizeObserver > "u") return;
|
|
2587
2615
|
const R = new ResizeObserver(() => {
|
|
2588
|
-
const
|
|
2589
|
-
|
|
2616
|
+
const J = G();
|
|
2617
|
+
J !== null && w(J);
|
|
2590
2618
|
});
|
|
2591
|
-
for (const
|
|
2619
|
+
for (const J of [j.current, X.current, ...j.current.querySelectorAll(".cms-screen__ruler > span")]) J !== null && R.observe(J);
|
|
2592
2620
|
return () => R.disconnect();
|
|
2593
2621
|
}, [G]);
|
|
2594
2622
|
const p = P(C);
|
|
@@ -2597,65 +2625,65 @@ function Nl({ title: n, back: t, navigation: l, search: r, searching: s, more: a
|
|
|
2597
2625
|
if (p.current === C) return;
|
|
2598
2626
|
p.current = C, U(null);
|
|
2599
2627
|
const R = document.activeElement;
|
|
2600
|
-
(R === document.body && be.current !== null && !be.current.isConnected || le.current && (R === document.body || ((Ne = j.current) == null ? void 0 : Ne.contains(R)) === !0)) && ((o = C ?
|
|
2628
|
+
(R === document.body && be.current !== null && !be.current.isConnected || le.current && (R === document.body || ((Ne = j.current) == null ? void 0 : Ne.contains(R)) === !0)) && ((o = C ? ne.current : (de = X.current) == null ? void 0 : de.querySelector(".cms-filter-menu")) == null || o.focus()), le.current = !1;
|
|
2601
2629
|
}, [C]);
|
|
2602
2630
|
const L = C && oe !== null && m !== void 0 ? `${h}, ${Sn(m)}` : h, me = st(N, i === void 0 ? null : () => {
|
|
2603
|
-
I || (
|
|
2631
|
+
I || (K(!0), i().finally(() => K(!1)));
|
|
2604
2632
|
}), ae = i === void 0 ? null : { distance: me, refreshing: I, text: g ?? null }, he = s !== void 0 || me > 0 || I || _e || ue, [Se, We] = Bt(_, f === void 0 && !he), Be = !he && (f ?? Se);
|
|
2605
2633
|
return /* @__PURE__ */ c(
|
|
2606
2634
|
"div",
|
|
2607
2635
|
{
|
|
2608
2636
|
ref: _,
|
|
2609
|
-
className:
|
|
2637
|
+
className: H("cms-screen", u !== void 0 && "cms-screen--with-primary"),
|
|
2610
2638
|
"data-bar-hidden": Be ? "" : void 0,
|
|
2611
2639
|
onFocus: (R) => {
|
|
2612
2640
|
be.current = R.target, Be && R.target instanceof Element && R.target.closest(".cms-screen__bar") !== null && We(!1);
|
|
2613
2641
|
},
|
|
2614
2642
|
children: [
|
|
2615
2643
|
s !== void 0 ? /* @__PURE__ */ c("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
|
|
2616
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": s.closeLabel, title: s.closeLabel, onClick: s.onClose, children: /* @__PURE__ */ e(
|
|
2644
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": s.closeLabel, title: s.closeLabel, onClick: s.onClose, children: /* @__PURE__ */ e(B, { name: "chevron-left" }) }),
|
|
2617
2645
|
/* @__PURE__ */ e("div", { className: "cms-screen__search", children: s.field })
|
|
2618
2646
|
] }) : /* @__PURE__ */ c("header", { ref: j, className: "cms-screen__bar", children: [
|
|
2619
2647
|
/* @__PURE__ */ e("div", { className: "cms-screen__leading", children: t !== void 0 ? t.href !== void 0 ? /* @__PURE__ */ c("a", { className: "cms-screen__back", href: t.href, onClick: t.onBack, children: [
|
|
2620
|
-
/* @__PURE__ */ e(
|
|
2648
|
+
/* @__PURE__ */ e(B, { name: "chevron-left" }),
|
|
2621
2649
|
/* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: t.label })
|
|
2622
2650
|
] }) : /* @__PURE__ */ c("button", { type: "button", className: "cms-screen__back", onClick: t.onBack, children: [
|
|
2623
|
-
/* @__PURE__ */ e(
|
|
2651
|
+
/* @__PURE__ */ e(B, { name: "chevron-left" }),
|
|
2624
2652
|
/* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: t.label })
|
|
2625
2653
|
] }) : l }),
|
|
2626
|
-
oe === null ? /* @__PURE__ */ e("h1", { className: "cms-screen__title", title: n, children: n }) : /* @__PURE__ */ c("h1", { className: "cms-screen__title cms-screen__title--filtered", title: n +
|
|
2654
|
+
oe === null ? /* @__PURE__ */ e("h1", { className: "cms-screen__title", title: n, children: n }) : /* @__PURE__ */ c("h1", { className: "cms-screen__title cms-screen__title--filtered", title: n + ye, children: [
|
|
2627
2655
|
/* @__PURE__ */ c("span", { className: "cms-screen__title-place", children: [
|
|
2628
2656
|
/* @__PURE__ */ e("span", { className: "cms-screen__title-name", children: n }),
|
|
2629
2657
|
/* @__PURE__ */ e("span", { className: "cms-screen__title-dot", children: " · " })
|
|
2630
2658
|
] }),
|
|
2631
2659
|
/* @__PURE__ */ e("span", { className: "cms-screen__title-choice", children: oe.label })
|
|
2632
2660
|
] }),
|
|
2633
|
-
|
|
2661
|
+
te && ce ? /* @__PURE__ */ c("span", { className: "cms-screen__ruler", "aria-hidden": "true", children: [
|
|
2634
2662
|
/* @__PURE__ */ e("span", { "data-ruler": "name", children: n }),
|
|
2635
|
-
oe !== null ? /* @__PURE__ */ e("span", { "data-ruler": "choice", children:
|
|
2663
|
+
oe !== null ? /* @__PURE__ */ e("span", { "data-ruler": "choice", children: ye }) : null
|
|
2636
2664
|
] }) : null,
|
|
2637
|
-
/* @__PURE__ */ c("div", { ref:
|
|
2638
|
-
r !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": r.label, title: r.label, onClick: r.onOpen, children: /* @__PURE__ */ e(
|
|
2665
|
+
/* @__PURE__ */ c("div", { ref: X, className: "cms-screen__trailing", children: [
|
|
2666
|
+
r !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": r.label, title: r.label, onClick: r.onOpen, children: /* @__PURE__ */ e(B, { name: "search" }) }) : null,
|
|
2639
2667
|
ve !== void 0 && !C ? /* @__PURE__ */ e(Tn, { ...ve, iconOnly: !0, onOpenChange: Ce }) : null,
|
|
2640
2668
|
ce ? /* @__PURE__ */ e(
|
|
2641
2669
|
"button",
|
|
2642
2670
|
{
|
|
2643
|
-
ref:
|
|
2671
|
+
ref: ne,
|
|
2644
2672
|
type: "button",
|
|
2645
|
-
className:
|
|
2673
|
+
className: H("cms-icon-button cms-screen__icon", C && oe !== null && "cms-screen__icon--active"),
|
|
2646
2674
|
"data-action": "more",
|
|
2647
2675
|
"aria-haspopup": "menu",
|
|
2648
2676
|
"aria-expanded": _e,
|
|
2649
2677
|
"aria-label": L,
|
|
2650
2678
|
title: L,
|
|
2651
2679
|
onMouseDown: () => {
|
|
2652
|
-
|
|
2680
|
+
W.current = _e;
|
|
2653
2681
|
},
|
|
2654
2682
|
onClick: (R) => {
|
|
2655
|
-
const
|
|
2656
|
-
U(
|
|
2683
|
+
const J = R.currentTarget.getBoundingClientRect();
|
|
2684
|
+
U(W.current ? null : { x: J.left, y: J.bottom + 4 }), W.current = !1;
|
|
2657
2685
|
},
|
|
2658
|
-
children: /* @__PURE__ */ e(
|
|
2686
|
+
children: /* @__PURE__ */ e(B, { name: "more" })
|
|
2659
2687
|
}
|
|
2660
2688
|
) : null,
|
|
2661
2689
|
d
|
|
@@ -2668,48 +2696,48 @@ function Nl({ title: n, back: t, navigation: l, search: r, searching: s, more: a
|
|
|
2668
2696
|
type: "button",
|
|
2669
2697
|
className: "cms-button cms-button--primary cms-screen__primary",
|
|
2670
2698
|
"aria-label": u.label,
|
|
2671
|
-
...
|
|
2699
|
+
...y === null ? { title: u.label } : {
|
|
2672
2700
|
"aria-disabled": !0,
|
|
2673
2701
|
"aria-describedby": S,
|
|
2674
|
-
...
|
|
2675
|
-
...
|
|
2702
|
+
...T ? { "data-reason-shown": "" } : {},
|
|
2703
|
+
...E.dismissed(Pe) ? { "data-tip-dismissed": "" } : {}
|
|
2676
2704
|
},
|
|
2677
|
-
..."menu" in u ? { "aria-haspopup": "menu", "aria-expanded":
|
|
2678
|
-
onFocus: () =>
|
|
2705
|
+
..."menu" in u ? { "aria-haspopup": "menu", "aria-expanded": z !== null } : {},
|
|
2706
|
+
onFocus: () => E.focusIn(Pe),
|
|
2679
2707
|
onBlur: () => {
|
|
2680
|
-
|
|
2708
|
+
M(!1), E.focusOut(Pe);
|
|
2681
2709
|
},
|
|
2682
|
-
onMouseEnter: () =>
|
|
2683
|
-
onMouseLeave: () =>
|
|
2710
|
+
onMouseEnter: () => E.pointerIn(Pe),
|
|
2711
|
+
onMouseLeave: () => E.pointerOut(Pe),
|
|
2684
2712
|
onKeyDown: (R) => {
|
|
2685
|
-
R.key === "Escape" &&
|
|
2713
|
+
R.key === "Escape" && y !== null && (M(!1), E.dismiss(Pe));
|
|
2686
2714
|
},
|
|
2687
2715
|
onClick: (R) => {
|
|
2688
|
-
if (
|
|
2689
|
-
|
|
2716
|
+
if (y !== null)
|
|
2717
|
+
M(!0), E.show(Pe);
|
|
2690
2718
|
else if ("menu" in u) {
|
|
2691
|
-
const
|
|
2692
|
-
k(
|
|
2719
|
+
const J = R.currentTarget.getBoundingClientRect();
|
|
2720
|
+
k(z === null ? { x: J.left, y: J.top } : null);
|
|
2693
2721
|
} else
|
|
2694
2722
|
u.onPress();
|
|
2695
2723
|
},
|
|
2696
2724
|
children: [
|
|
2697
|
-
/* @__PURE__ */ e(
|
|
2698
|
-
|
|
2725
|
+
/* @__PURE__ */ e(B, { name: u.icon, size: 24 }),
|
|
2726
|
+
y !== null ? /* @__PURE__ */ e("span", { className: "cms-screen__tip", role: "tooltip", id: S, children: y }) : null
|
|
2699
2727
|
]
|
|
2700
2728
|
}
|
|
2701
2729
|
) : null,
|
|
2702
2730
|
/* @__PURE__ */ e(
|
|
2703
2731
|
Ke,
|
|
2704
2732
|
{
|
|
2705
|
-
at: _e ?
|
|
2733
|
+
at: _e ? F : null,
|
|
2706
2734
|
items: C && ve !== void 0 ? [...a, ...En(ve, ve.label)] : a,
|
|
2707
|
-
onClose:
|
|
2735
|
+
onClose: Y,
|
|
2708
2736
|
label: h,
|
|
2709
2737
|
focus: "first"
|
|
2710
2738
|
}
|
|
2711
2739
|
),
|
|
2712
|
-
u !== void 0 && "menu" in u ? /* @__PURE__ */ e(Ke, { at:
|
|
2740
|
+
u !== void 0 && "menu" in u ? /* @__PURE__ */ e(Ke, { at: z, items: u.menu, onClose: () => k(null), label: u.label }) : null
|
|
2713
2741
|
]
|
|
2714
2742
|
}
|
|
2715
2743
|
);
|
|
@@ -2729,25 +2757,25 @@ export {
|
|
|
2729
2757
|
il as Composer,
|
|
2730
2758
|
Vt as ConfirmDialog,
|
|
2731
2759
|
Ke as ContextMenu,
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2760
|
+
Kn as EmptyState,
|
|
2761
|
+
Wn as ErrorBanner,
|
|
2762
|
+
yt as FILTER_MENU_LABELS,
|
|
2735
2763
|
Yt as FilePicker,
|
|
2736
2764
|
Qn as FilePickerDenied,
|
|
2737
2765
|
et as FilePickerRestart,
|
|
2738
2766
|
jt as FileViewer,
|
|
2739
2767
|
Nt as FilterMenu,
|
|
2740
|
-
|
|
2741
|
-
|
|
2768
|
+
zt as ICON_NAMES,
|
|
2769
|
+
B as Icon,
|
|
2742
2770
|
cl as IncomingCall,
|
|
2743
2771
|
Xt as List,
|
|
2744
2772
|
hl as ListHead,
|
|
2745
|
-
|
|
2773
|
+
Un as Loading,
|
|
2746
2774
|
vt as MAIL_ROW_LABELS,
|
|
2747
|
-
|
|
2775
|
+
zn as MODAL_CLOSE_MS,
|
|
2748
2776
|
rl as MailRow,
|
|
2749
|
-
|
|
2750
|
-
|
|
2777
|
+
xn as Modal,
|
|
2778
|
+
Fn as NamedIcon,
|
|
2751
2779
|
pl as Notification,
|
|
2752
2780
|
Qe as PULL_AT,
|
|
2753
2781
|
el as PageHeader,
|
|
@@ -2757,25 +2785,25 @@ export {
|
|
|
2757
2785
|
Nl as ScreenShell,
|
|
2758
2786
|
ll as SearchField,
|
|
2759
2787
|
Jt as SectionHeader,
|
|
2760
|
-
|
|
2788
|
+
Wt as Select,
|
|
2761
2789
|
ml as SignInForm,
|
|
2762
2790
|
ul as SignInLayout,
|
|
2763
2791
|
sl as SplitPanes,
|
|
2764
2792
|
pt as Splitter,
|
|
2765
2793
|
Le as State,
|
|
2766
2794
|
nl as TabStrip,
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2795
|
+
Kt as TextArea,
|
|
2796
|
+
Ut as TextField,
|
|
2797
|
+
qt as Toast,
|
|
2798
|
+
Gt as ToastRegion,
|
|
2799
|
+
Zt as Toggle,
|
|
2772
2800
|
_t as fitPanes,
|
|
2773
2801
|
Ue as iconForName,
|
|
2774
2802
|
dt as initialsOf,
|
|
2775
2803
|
Ct as isCapability,
|
|
2776
|
-
|
|
2804
|
+
wl as needsClientUpdate,
|
|
2777
2805
|
bl as offerFor,
|
|
2778
|
-
|
|
2806
|
+
yl as readConflict,
|
|
2779
2807
|
_l as readRefusal,
|
|
2780
2808
|
Et as refusalText,
|
|
2781
2809
|
vl as rereadAll,
|
|
@@ -2784,5 +2812,5 @@ export {
|
|
|
2784
2812
|
rt as usePullState,
|
|
2785
2813
|
gl as useReread,
|
|
2786
2814
|
Tt as versionBelow,
|
|
2787
|
-
|
|
2815
|
+
On as writtenOut
|
|
2788
2816
|
};
|