@coolms/ui-react 0.1.0-alpha.19 → 0.1.0-alpha.20
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/Icon.d.ts +12 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +697 -656
- package/package.json +1 -1
- package/src/kit.css +1 -0
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useId as q, useState as A, useRef as K, useEffect as J, useCallback as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
function
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as C } from "react/jsx-runtime";
|
|
2
|
+
import { useId as q, useState as A, useRef as K, useEffect as J, useCallback as _e, useMemo as He, useLayoutEffect as xe, useContext as Oe, createContext as Ue } from "react";
|
|
3
|
+
import { createPortal as Me } from "react-dom";
|
|
4
|
+
function ce(n, l) {
|
|
5
5
|
const t = { ...n };
|
|
6
|
-
for (const
|
|
7
|
-
const
|
|
8
|
-
|
|
6
|
+
for (const u of Object.keys(l ?? {})) {
|
|
7
|
+
const d = l == null ? void 0 : l[u];
|
|
8
|
+
d !== void 0 && (t[u] = d);
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
}
|
|
12
12
|
function E(...n) {
|
|
13
13
|
return n.filter(Boolean).join(" ");
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function R({ name: n }) {
|
|
16
16
|
const l = { width: 16, height: 16, viewBox: "0 0 16 16", "aria-hidden": !0, focusable: !1 };
|
|
17
17
|
switch (n) {
|
|
18
18
|
case "lock":
|
|
@@ -35,47 +35,47 @@ function ne({
|
|
|
35
35
|
variant: n = "secondary",
|
|
36
36
|
busy: l = !1,
|
|
37
37
|
busyLabel: t,
|
|
38
|
-
locked:
|
|
39
|
-
lockedReason:
|
|
38
|
+
locked: u = !1,
|
|
39
|
+
lockedReason: d,
|
|
40
40
|
icon: a,
|
|
41
41
|
disabled: r,
|
|
42
42
|
className: s,
|
|
43
43
|
children: m,
|
|
44
44
|
type: b = "button",
|
|
45
|
-
title:
|
|
45
|
+
title: c,
|
|
46
46
|
...h
|
|
47
47
|
}) {
|
|
48
|
-
const
|
|
49
|
-
return /* @__PURE__ */
|
|
48
|
+
const i = !!r || l;
|
|
49
|
+
return /* @__PURE__ */ o(
|
|
50
50
|
"button",
|
|
51
51
|
{
|
|
52
52
|
...h,
|
|
53
53
|
type: b,
|
|
54
|
-
className: E("cms-button", `cms-button--${n}`, l && "is-busy",
|
|
55
|
-
disabled:
|
|
54
|
+
className: E("cms-button", `cms-button--${n}`, l && "is-busy", u && "is-locked", s),
|
|
55
|
+
disabled: i,
|
|
56
56
|
"aria-busy": l || void 0,
|
|
57
|
-
title:
|
|
57
|
+
title: u ? d ?? c : c,
|
|
58
58
|
children: [
|
|
59
|
-
l ? /* @__PURE__ */ e(
|
|
59
|
+
l ? /* @__PURE__ */ e(R, { name: "spinner" }) : u ? /* @__PURE__ */ e(R, { name: "lock" }) : a,
|
|
60
60
|
/* @__PURE__ */ e("span", { className: "cms-button__label", children: l && t !== void 0 ? t : m }),
|
|
61
|
-
|
|
61
|
+
u && d ? /* @__PURE__ */ o("span", { className: "cms-visually-hidden", children: [
|
|
62
62
|
", ",
|
|
63
|
-
|
|
63
|
+
d
|
|
64
64
|
] }) : null
|
|
65
65
|
]
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return /* @__PURE__ */
|
|
69
|
+
function Ce({ id: n, label: l, help: t, error: u, pinned: d, children: a }) {
|
|
70
|
+
return /* @__PURE__ */ o("div", { className: E("cms-field", u != null && "is-invalid"), children: [
|
|
71
71
|
/* @__PURE__ */ e("label", { className: "cms-field__label", htmlFor: n, children: l }),
|
|
72
72
|
a,
|
|
73
|
-
|
|
74
|
-
/* @__PURE__ */ e(
|
|
73
|
+
d != null ? /* @__PURE__ */ o("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
|
|
74
|
+
/* @__PURE__ */ e(R, { name: "lock" }),
|
|
75
75
|
" ",
|
|
76
|
-
|
|
76
|
+
d
|
|
77
77
|
] }) : null,
|
|
78
|
-
|
|
78
|
+
u != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: u }) : null,
|
|
79
79
|
t != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${n}-help`, children: t }) : null
|
|
80
80
|
] });
|
|
81
81
|
}
|
|
@@ -83,27 +83,27 @@ function Se(n, l) {
|
|
|
83
83
|
const t = [l.error != null && `${n}-error`, l.pinned != null && `${n}-pinned`, l.help != null && `${n}-help`].filter(Boolean).join(" ");
|
|
84
84
|
return t === "" ? void 0 : t;
|
|
85
85
|
}
|
|
86
|
-
const
|
|
87
|
-
function
|
|
88
|
-
const
|
|
89
|
-
const h = new Date(Date.UTC(a, r - 1, s, m, b,
|
|
90
|
-
return h.setUTCFullYear(a), h.getUTCFullYear() === a && h.getUTCMonth() === r - 1 && h.getUTCDate() === s && h.getUTCHours() === m && h.getUTCMinutes() === b && h.getUTCSeconds() ===
|
|
91
|
-
},
|
|
86
|
+
const Re = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, ze = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
|
|
87
|
+
function Ze(n, l, t) {
|
|
88
|
+
const u = (a, r, s, m = 0, b = 0, c = 0) => {
|
|
89
|
+
const h = new Date(Date.UTC(a, r - 1, s, m, b, c));
|
|
90
|
+
return h.setUTCFullYear(a), h.getUTCFullYear() === a && h.getUTCMonth() === r - 1 && h.getUTCDate() === s && h.getUTCHours() === m && h.getUTCMinutes() === b && h.getUTCSeconds() === c ? h : null;
|
|
91
|
+
}, d = (a) => ({ hour: Number(a[1]), minute: Number(a[2]), second: Number(a[3] ?? 0) });
|
|
92
92
|
try {
|
|
93
93
|
if (n === "time") {
|
|
94
94
|
const r = l.match(ze);
|
|
95
95
|
if (r === null) return l;
|
|
96
|
-
const s =
|
|
96
|
+
const s = d(r), m = u(2e3, 1, 1, s.hour, s.minute, s.second);
|
|
97
97
|
return m === null ? l : new Intl.DateTimeFormat(t, { timeStyle: r[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
|
|
98
98
|
}
|
|
99
|
-
const a = l.match(
|
|
99
|
+
const a = l.match(Re);
|
|
100
100
|
if (a === null) return l;
|
|
101
101
|
if (n === "date" && a[4] === void 0) {
|
|
102
|
-
const r =
|
|
102
|
+
const r = u(Number(a[1]), Number(a[2]), Number(a[3]));
|
|
103
103
|
return r === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeZone: "UTC" }).format(r);
|
|
104
104
|
}
|
|
105
105
|
if (n === "datetime-local" && a[4] !== void 0) {
|
|
106
|
-
const r =
|
|
106
|
+
const r = u(Number(a[1]), Number(a[2]), Number(a[3]), Number(a[4]), Number(a[5]), Number(a[6] ?? 0));
|
|
107
107
|
return r === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeStyle: a[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(r);
|
|
108
108
|
}
|
|
109
109
|
} catch {
|
|
@@ -111,53 +111,53 @@ function Re(n, l, t) {
|
|
|
111
111
|
}
|
|
112
112
|
return l;
|
|
113
113
|
}
|
|
114
|
-
const
|
|
115
|
-
function
|
|
116
|
-
const x = q(),
|
|
117
|
-
return /* @__PURE__ */ e(
|
|
114
|
+
const Ve = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
|
|
115
|
+
function Dn({ label: n, help: l, error: t, disabled: u, readOnly: d, pinned: a, value: r, onChange: s, placeholder: m, type: b = "text", name: c, locale: h, min: i, max: f, step: p, minLength: g, maxLength: N, required: y }) {
|
|
116
|
+
const x = q(), S = d === !0 || a != null, M = S && Ve.has(b), z = b === "number" && (p === "any" || typeof p == "number" && !Number.isInteger(p));
|
|
117
|
+
return /* @__PURE__ */ e(Ce, { id: x, label: n, help: l, error: t, pinned: a, children: /* @__PURE__ */ e(
|
|
118
118
|
"input",
|
|
119
119
|
{
|
|
120
120
|
id: x,
|
|
121
|
-
name:
|
|
122
|
-
type:
|
|
121
|
+
name: c,
|
|
122
|
+
type: M ? "text" : b,
|
|
123
123
|
className: "cms-input",
|
|
124
|
-
value:
|
|
125
|
-
...
|
|
124
|
+
value: M ? Ze(b, r, h) : r,
|
|
125
|
+
...M ? { "data-value": r } : {},
|
|
126
126
|
lang: h,
|
|
127
127
|
placeholder: m,
|
|
128
|
-
disabled:
|
|
129
|
-
readOnly:
|
|
128
|
+
disabled: u,
|
|
129
|
+
readOnly: S,
|
|
130
130
|
required: y,
|
|
131
131
|
"aria-required": y || void 0,
|
|
132
|
-
min:
|
|
133
|
-
max:
|
|
134
|
-
step:
|
|
132
|
+
min: M ? void 0 : i,
|
|
133
|
+
max: M ? void 0 : f,
|
|
134
|
+
step: M ? void 0 : p,
|
|
135
135
|
minLength: g,
|
|
136
136
|
maxLength: N,
|
|
137
|
-
inputMode: b === "number" ?
|
|
137
|
+
inputMode: b === "number" ? z ? "decimal" : "numeric" : void 0,
|
|
138
138
|
"aria-invalid": t != null || void 0,
|
|
139
139
|
"aria-describedby": Se(x, { help: l, error: t, pinned: a }),
|
|
140
|
-
onChange: (
|
|
140
|
+
onChange: (H) => s == null ? void 0 : s(H.target.value)
|
|
141
141
|
}
|
|
142
142
|
) });
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function Tn({ label: n, help: l, error: t, disabled: u, readOnly: d, pinned: a, value: r, onChange: s, placeholder: m, rows: b = 4, name: c, locale: h, minLength: i, maxLength: f, required: p }) {
|
|
145
145
|
const g = q();
|
|
146
|
-
return /* @__PURE__ */ e(
|
|
146
|
+
return /* @__PURE__ */ e(Ce, { id: g, label: n, help: l, error: t, pinned: a, children: /* @__PURE__ */ e(
|
|
147
147
|
"textarea",
|
|
148
148
|
{
|
|
149
149
|
id: g,
|
|
150
|
-
name:
|
|
150
|
+
name: c,
|
|
151
151
|
className: "cms-input cms-textarea",
|
|
152
152
|
rows: b,
|
|
153
153
|
value: r,
|
|
154
154
|
lang: h,
|
|
155
155
|
placeholder: m,
|
|
156
|
-
disabled:
|
|
157
|
-
readOnly:
|
|
156
|
+
disabled: u,
|
|
157
|
+
readOnly: d === !0 || a != null,
|
|
158
158
|
required: p,
|
|
159
159
|
"aria-required": p || void 0,
|
|
160
|
-
minLength:
|
|
160
|
+
minLength: i,
|
|
161
161
|
maxLength: f,
|
|
162
162
|
"aria-invalid": t != null || void 0,
|
|
163
163
|
"aria-describedby": Se(g, { help: l, error: t, pinned: a }),
|
|
@@ -165,29 +165,29 @@ function En({ label: n, help: l, error: t, disabled: d, readOnly: o, pinned: a,
|
|
|
165
165
|
}
|
|
166
166
|
) });
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
const
|
|
170
|
-
return /* @__PURE__ */ e(
|
|
168
|
+
function Ln({ label: n, help: l, error: t, disabled: u, readOnly: d, value: a, options: r, onChange: s, emptyText: m = "Nothing to choose from yet.", name: b }) {
|
|
169
|
+
const c = q(), h = r.length === 0;
|
|
170
|
+
return /* @__PURE__ */ e(Ce, { id: c, label: n, help: h ? m : l, error: t, children: /* @__PURE__ */ e(
|
|
171
171
|
"select",
|
|
172
172
|
{
|
|
173
|
-
id:
|
|
173
|
+
id: c,
|
|
174
174
|
name: b,
|
|
175
175
|
className: "cms-input cms-select",
|
|
176
176
|
value: a,
|
|
177
|
-
disabled:
|
|
178
|
-
"aria-readonly":
|
|
177
|
+
disabled: u || h,
|
|
178
|
+
"aria-readonly": d || void 0,
|
|
179
179
|
"aria-invalid": t != null || void 0,
|
|
180
|
-
"aria-describedby": Se(
|
|
181
|
-
onChange: (
|
|
182
|
-
|
|
180
|
+
"aria-describedby": Se(c, { help: h ? m : l, error: t }),
|
|
181
|
+
onChange: (i) => {
|
|
182
|
+
d || s == null || s(i.target.value);
|
|
183
183
|
},
|
|
184
|
-
children: r.map((
|
|
184
|
+
children: r.map((i) => /* @__PURE__ */ e("option", { value: i.value, disabled: d && i.value !== a, children: i.label }, i.value))
|
|
185
185
|
}
|
|
186
186
|
) });
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function $n({ label: n, checked: l, onChange: t, disabled: u, readOnly: d, help: a }) {
|
|
189
189
|
const r = q();
|
|
190
|
-
return /* @__PURE__ */
|
|
190
|
+
return /* @__PURE__ */ o("div", { className: "cms-toggle-row", children: [
|
|
191
191
|
/* @__PURE__ */ e(
|
|
192
192
|
"button",
|
|
193
193
|
{
|
|
@@ -196,11 +196,11 @@ function Tn({ label: n, checked: l, onChange: t, disabled: d, readOnly: o, help:
|
|
|
196
196
|
role: "switch",
|
|
197
197
|
className: E("cms-toggle", l && "is-on"),
|
|
198
198
|
"aria-checked": l,
|
|
199
|
-
"aria-readonly":
|
|
199
|
+
"aria-readonly": d || void 0,
|
|
200
200
|
"aria-describedby": a != null ? `${r}-help` : void 0,
|
|
201
|
-
disabled:
|
|
201
|
+
disabled: u,
|
|
202
202
|
onClick: () => {
|
|
203
|
-
|
|
203
|
+
d || t == null || t(!l);
|
|
204
204
|
},
|
|
205
205
|
children: /* @__PURE__ */ e("span", { className: "cms-toggle__thumb" })
|
|
206
206
|
}
|
|
@@ -209,58 +209,58 @@ function Tn({ label: n, checked: l, onChange: t, disabled: d, readOnly: o, help:
|
|
|
209
209
|
a != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${r}-help`, children: a }) : null
|
|
210
210
|
] });
|
|
211
211
|
}
|
|
212
|
-
const
|
|
213
|
-
function
|
|
214
|
-
const [
|
|
212
|
+
const We = 150;
|
|
213
|
+
function Pe({ open: n, title: l, onClose: t, dirty: u = !1, onDirtyClose: d, children: a, footer: r, closeLabel: s = "Close", initialFocus: m, className: b }) {
|
|
214
|
+
const [c, h] = A(n), [i, f] = A(!1), p = K(null), g = K(null), N = q();
|
|
215
215
|
if (J(() => {
|
|
216
216
|
if (n) {
|
|
217
217
|
g.current = document.activeElement, h(!0), f(!1);
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
if (!
|
|
220
|
+
if (!c) return;
|
|
221
221
|
f(!0);
|
|
222
222
|
const x = window.setTimeout(() => {
|
|
223
|
-
var
|
|
224
|
-
h(!1), f(!1), (
|
|
225
|
-
},
|
|
223
|
+
var S, M;
|
|
224
|
+
h(!1), f(!1), (M = (S = g.current) == null ? void 0 : S.focus) == null || M.call(S);
|
|
225
|
+
}, We);
|
|
226
226
|
return () => window.clearTimeout(x);
|
|
227
|
-
}, [n,
|
|
228
|
-
var x,
|
|
229
|
-
if (n &&
|
|
230
|
-
const
|
|
231
|
-
(
|
|
227
|
+
}, [n, c]), J(() => {
|
|
228
|
+
var x, S;
|
|
229
|
+
if (n && c) {
|
|
230
|
+
const M = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
|
|
231
|
+
(S = (m == null ? void 0 : m.current) ?? ((x = p.current) == null ? void 0 : x.querySelector(`.cms-modal__body :is(${M}), .cms-modal__foot :is(${M})`)) ?? p.current) == null || S.focus();
|
|
232
232
|
}
|
|
233
|
-
}, [n,
|
|
233
|
+
}, [n, c, m]), !c) return null;
|
|
234
234
|
const y = () => {
|
|
235
|
-
|
|
235
|
+
u ? d == null || d() : t();
|
|
236
236
|
};
|
|
237
|
-
return
|
|
238
|
-
/* @__PURE__ */ e("div", { className: E("cms-modal-scrim",
|
|
237
|
+
return Me(
|
|
238
|
+
/* @__PURE__ */ e("div", { className: E("cms-modal-scrim", i && "is-closing"), onMouseDown: (x) => {
|
|
239
239
|
x.target === x.currentTarget && y();
|
|
240
|
-
}, children: /* @__PURE__ */
|
|
240
|
+
}, children: /* @__PURE__ */ o(
|
|
241
241
|
"div",
|
|
242
242
|
{
|
|
243
243
|
ref: p,
|
|
244
|
-
className: E("cms-modal", b,
|
|
244
|
+
className: E("cms-modal", b, i && "is-closing", u && "is-dirty"),
|
|
245
245
|
role: "dialog",
|
|
246
246
|
"aria-modal": "true",
|
|
247
247
|
"aria-labelledby": N,
|
|
248
248
|
tabIndex: -1,
|
|
249
249
|
onKeyDown: (x) => {
|
|
250
|
-
var
|
|
250
|
+
var S;
|
|
251
251
|
if (x.key === "Escape")
|
|
252
252
|
x.stopPropagation(), y();
|
|
253
253
|
else if (x.key === "Tab") {
|
|
254
|
-
const
|
|
255
|
-
if (!
|
|
256
|
-
const
|
|
257
|
-
x.shiftKey && document.activeElement ===
|
|
254
|
+
const M = (S = p.current) == null ? void 0 : S.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
|
|
255
|
+
if (!M || M.length === 0) return;
|
|
256
|
+
const z = M[0], H = M[M.length - 1];
|
|
257
|
+
x.shiftKey && document.activeElement === z ? (x.preventDefault(), H.focus()) : !x.shiftKey && document.activeElement === H && (x.preventDefault(), z.focus());
|
|
258
258
|
}
|
|
259
259
|
},
|
|
260
260
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ o("header", { className: "cms-modal__head", children: [
|
|
262
262
|
/* @__PURE__ */ e("h2", { className: "cms-modal__title", id: N, children: l }),
|
|
263
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": s, onClick: y, children: /* @__PURE__ */ e(
|
|
263
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": s, onClick: y, children: /* @__PURE__ */ e(R, { name: "close" }) })
|
|
264
264
|
] }),
|
|
265
265
|
/* @__PURE__ */ e("div", { className: "cms-modal__body", children: a }),
|
|
266
266
|
r != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: r }) : null
|
|
@@ -270,71 +270,71 @@ function $e({ open: n, title: l, onClose: t, dirty: d = !1, onDirtyClose: o, chi
|
|
|
270
270
|
document.body
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
const b =
|
|
273
|
+
function Pn({ open: n, title: l, message: t, kind: u = "default", confirmLabel: d, cancelLabel: a, closeLabel: r, onConfirm: s, onCancel: m }) {
|
|
274
|
+
const b = u === "discard-changes";
|
|
275
275
|
return /* @__PURE__ */ e(
|
|
276
|
-
|
|
276
|
+
Pe,
|
|
277
277
|
{
|
|
278
278
|
open: n,
|
|
279
279
|
title: l,
|
|
280
280
|
onClose: m,
|
|
281
281
|
...r === void 0 ? {} : { closeLabel: r },
|
|
282
|
-
footer: /* @__PURE__ */
|
|
282
|
+
footer: /* @__PURE__ */ o(C, { children: [
|
|
283
283
|
/* @__PURE__ */ e(ne, { onClick: m, children: a ?? (b ? "Keep editing" : "Cancel") }),
|
|
284
|
-
/* @__PURE__ */ e(ne, { variant:
|
|
284
|
+
/* @__PURE__ */ e(ne, { variant: u === "default" ? "primary" : "danger", onClick: s, children: d ?? (b ? "Discard changes" : "Confirm") })
|
|
285
285
|
] }),
|
|
286
|
-
children:
|
|
287
|
-
/* @__PURE__ */ e(
|
|
286
|
+
children: u !== "default" ? /* @__PURE__ */ o("p", { className: "cms-confirm__warning", children: [
|
|
287
|
+
/* @__PURE__ */ e(R, { name: "warning" }),
|
|
288
288
|
" ",
|
|
289
289
|
t
|
|
290
290
|
] }) : /* @__PURE__ */ e("p", { children: t })
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
return /* @__PURE__ */
|
|
296
|
-
/* @__PURE__ */ e(
|
|
294
|
+
function In({ kind: n, message: l, action: t, onDismiss: u, dismissLabel: d = "Dismiss" }) {
|
|
295
|
+
return /* @__PURE__ */ o("div", { className: E("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
|
|
296
|
+
/* @__PURE__ */ e(R, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
|
|
297
297
|
/* @__PURE__ */ e("span", { className: "cms-toast__message", children: l }),
|
|
298
298
|
t ? /* @__PURE__ */ e(ne, { className: "cms-toast__action", onClick: t.onAction, children: t.label }) : null,
|
|
299
|
-
|
|
299
|
+
u ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": d, onClick: u, children: /* @__PURE__ */ e(R, { name: "close" }) }) : null
|
|
300
300
|
] });
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function Bn({ children: n }) {
|
|
303
303
|
return /* @__PURE__ */ e("div", { className: "cms-toast-region", children: n });
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
return /* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */ e(
|
|
305
|
+
function je({ what: n, layout: l = "inline" }) {
|
|
306
|
+
return /* @__PURE__ */ o("div", { className: E("cms-loading", `cms-loading--${l}`), role: "status", "aria-live": "polite", children: [
|
|
307
|
+
/* @__PURE__ */ e(R, { name: "spinner" }),
|
|
308
308
|
/* @__PURE__ */ e("span", { children: n })
|
|
309
309
|
] });
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
return /* @__PURE__ */
|
|
311
|
+
function qe({ title: n, hint: l, action: t }) {
|
|
312
|
+
return /* @__PURE__ */ o("div", { className: "cms-empty", children: [
|
|
313
313
|
/* @__PURE__ */ e("p", { className: "cms-empty__title", children: n }),
|
|
314
314
|
l != null ? /* @__PURE__ */ e("p", { className: "cms-empty__hint", children: l }) : null,
|
|
315
315
|
t != null ? /* @__PURE__ */ e("div", { className: "cms-empty__action", children: t }) : null
|
|
316
316
|
] });
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
return /* @__PURE__ */
|
|
320
|
-
/* @__PURE__ */ e(
|
|
318
|
+
function Ye({ message: n, onRetry: l, retryLabel: t = "Try again" }) {
|
|
319
|
+
return /* @__PURE__ */ o("div", { className: "cms-error-banner", role: "alert", children: [
|
|
320
|
+
/* @__PURE__ */ e(R, { name: "warning" }),
|
|
321
321
|
/* @__PURE__ */ e("span", { className: "cms-error-banner__message", children: n }),
|
|
322
322
|
l ? /* @__PURE__ */ e(ne, { onClick: l, children: t }) : null
|
|
323
323
|
] });
|
|
324
324
|
}
|
|
325
325
|
const ye = 300;
|
|
326
|
-
function
|
|
326
|
+
function Xe() {
|
|
327
327
|
if (typeof window > "u" || typeof getComputedStyle != "function") return ye;
|
|
328
328
|
const n = getComputedStyle(document.documentElement).getPropertyValue("--cms-state-delay").trim(), l = n.endsWith("ms") ? Number.parseFloat(n) : n.endsWith("s") ? Number.parseFloat(n) * 1e3 : Number.NaN;
|
|
329
329
|
return Number.isFinite(l) && l >= 0 ? l : ye;
|
|
330
330
|
}
|
|
331
|
-
function
|
|
332
|
-
return /* @__PURE__ */
|
|
331
|
+
function Ge() {
|
|
332
|
+
return /* @__PURE__ */ o("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
|
|
333
333
|
/* @__PURE__ */ e("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
|
|
334
334
|
/* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
|
|
335
335
|
] });
|
|
336
336
|
}
|
|
337
|
-
function ee({ kind: n, title: l, description: t, action:
|
|
337
|
+
function ee({ kind: n, title: l, description: t, action: u, placement: d = "block" }) {
|
|
338
338
|
const [a, r] = A(n !== "loading");
|
|
339
339
|
return J(() => {
|
|
340
340
|
if (n !== "loading") {
|
|
@@ -342,133 +342,143 @@ function ee({ kind: n, title: l, description: t, action: d, placement: o = "bloc
|
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
344
344
|
r(!1);
|
|
345
|
-
const s = window.setTimeout(() => r(!0),
|
|
345
|
+
const s = window.setTimeout(() => r(!0), Xe());
|
|
346
346
|
return () => window.clearTimeout(s);
|
|
347
|
-
}, [n]), /* @__PURE__ */
|
|
347
|
+
}, [n]), /* @__PURE__ */ o(
|
|
348
348
|
"div",
|
|
349
349
|
{
|
|
350
|
-
className: E("cms-state", `cms-state--${n}`, `cms-state--${
|
|
350
|
+
className: E("cms-state", `cms-state--${n}`, `cms-state--${d}`, !a && "is-waiting"),
|
|
351
351
|
role: "status",
|
|
352
352
|
"aria-live": "polite",
|
|
353
353
|
"data-kind": n,
|
|
354
354
|
children: [
|
|
355
|
-
n === "loading" ? /* @__PURE__ */ e(
|
|
356
|
-
n === "error" || n === "denied" ? /* @__PURE__ */ e(
|
|
357
|
-
/* @__PURE__ */
|
|
355
|
+
n === "loading" ? /* @__PURE__ */ e(Ge, {}) : null,
|
|
356
|
+
n === "error" || n === "denied" ? /* @__PURE__ */ e(R, { name: n === "error" ? "warning" : "lock" }) : null,
|
|
357
|
+
/* @__PURE__ */ o("span", { className: "cms-state__text", children: [
|
|
358
358
|
/* @__PURE__ */ e("span", { className: "cms-state__title", children: l }),
|
|
359
359
|
t !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: t }) : null
|
|
360
360
|
] }),
|
|
361
|
-
|
|
361
|
+
u !== void 0 && n !== "denied" ? /* @__PURE__ */ e(ne, { className: "cms-state__action", onClick: u.onAction, children: u.label }) : null
|
|
362
362
|
]
|
|
363
363
|
}
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
|
-
const
|
|
367
|
-
mail: /* @__PURE__ */
|
|
366
|
+
const Ie = {
|
|
367
|
+
mail: /* @__PURE__ */ o(C, { children: [
|
|
368
368
|
/* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
369
369
|
/* @__PURE__ */ e("path", { d: "m3 7 9 6 9-6" })
|
|
370
370
|
] }),
|
|
371
371
|
// The envelope with its flap open above it: a message read, or the message itself again.
|
|
372
|
-
"mail-open": /* @__PURE__ */
|
|
372
|
+
"mail-open": /* @__PURE__ */ o(C, { children: [
|
|
373
373
|
/* @__PURE__ */ e("path", { d: "M3 10v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9" }),
|
|
374
374
|
/* @__PURE__ */ e("path", { d: "m3 10 9-6 9 6" }),
|
|
375
375
|
/* @__PURE__ */ e("path", { d: "m3 10 9 6 9-6" })
|
|
376
376
|
] }),
|
|
377
377
|
// A clipboard: copy what is shown.
|
|
378
|
-
copy: /* @__PURE__ */
|
|
378
|
+
copy: /* @__PURE__ */ o(C, { children: [
|
|
379
379
|
/* @__PURE__ */ e("rect", { x: "6", y: "4", width: "12", height: "17", rx: "2" }),
|
|
380
380
|
/* @__PURE__ */ e("path", { d: "M9 4V3h6v1" }),
|
|
381
381
|
/* @__PURE__ */ e("path", { d: "M9 10h6M9 14h6M9 18h3" })
|
|
382
382
|
] }),
|
|
383
383
|
chat: /* @__PURE__ */ e("path", { d: "M4 12a8 8 0 1 1 4 6.9L4 20l1.1-4A8 8 0 0 1 4 12Z" }),
|
|
384
384
|
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" }),
|
|
385
|
-
calendar: /* @__PURE__ */
|
|
385
|
+
calendar: /* @__PURE__ */ o(C, { children: [
|
|
386
386
|
/* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2" }),
|
|
387
387
|
/* @__PURE__ */ e("path", { d: "M3 10h18M8 3v4M16 3v4" })
|
|
388
388
|
] }),
|
|
389
|
-
file: /* @__PURE__ */
|
|
389
|
+
file: /* @__PURE__ */ o(C, { children: [
|
|
390
390
|
/* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
|
|
391
391
|
/* @__PURE__ */ e("path", { d: "M14 3v6h6M8 13h8M8 17h6" })
|
|
392
392
|
] }),
|
|
393
393
|
// The file, with code's angle brackets in place of its lines: a message's source.
|
|
394
|
-
"file-code": /* @__PURE__ */
|
|
394
|
+
"file-code": /* @__PURE__ */ o(C, { children: [
|
|
395
395
|
/* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
|
|
396
396
|
/* @__PURE__ */ e("path", { d: "M14 3v6h6" }),
|
|
397
397
|
/* @__PURE__ */ e("path", { d: "m10 12-2 2.5 2 2.5M14 12l2 2.5-2 2.5" })
|
|
398
398
|
] }),
|
|
399
|
-
image: /* @__PURE__ */
|
|
399
|
+
image: /* @__PURE__ */ o(C, { children: [
|
|
400
400
|
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
401
401
|
/* @__PURE__ */ e("circle", { cx: "9", cy: "10", r: "2" }),
|
|
402
402
|
/* @__PURE__ */ e("path", { d: "m21 17-5-5-9 8" })
|
|
403
403
|
] }),
|
|
404
|
-
search: /* @__PURE__ */
|
|
404
|
+
search: /* @__PURE__ */ o(C, { children: [
|
|
405
405
|
/* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "7" }),
|
|
406
406
|
/* @__PURE__ */ e("path", { d: "m20 20-4-4" })
|
|
407
407
|
] }),
|
|
408
|
-
bell: /* @__PURE__ */
|
|
408
|
+
bell: /* @__PURE__ */ o(C, { children: [
|
|
409
409
|
/* @__PURE__ */ e("path", { d: "M6 9a6 6 0 1 1 12 0c0 6 2 8 2 8H4s2-2 2-8Z" }),
|
|
410
410
|
/* @__PURE__ */ e("path", { d: "M10 20a2 2 0 0 0 4 0" })
|
|
411
411
|
] }),
|
|
412
|
-
pencil: /* @__PURE__ */
|
|
412
|
+
pencil: /* @__PURE__ */ o(C, { children: [
|
|
413
413
|
/* @__PURE__ */ e("path", { d: "M4 20h4L19 9l-4-4L4 16Z" }),
|
|
414
414
|
/* @__PURE__ */ e("path", { d: "m13 7 4 4" })
|
|
415
415
|
] }),
|
|
416
|
-
download: /* @__PURE__ */
|
|
416
|
+
download: /* @__PURE__ */ o(C, { children: [
|
|
417
417
|
/* @__PURE__ */ e("path", { d: "M12 4v11" }),
|
|
418
418
|
/* @__PURE__ */ e("path", { d: "m7 11 5 5 5-5" }),
|
|
419
419
|
/* @__PURE__ */ e("path", { d: "M4 20h16" })
|
|
420
420
|
] }),
|
|
421
|
-
print: /* @__PURE__ */
|
|
421
|
+
print: /* @__PURE__ */ o(C, { children: [
|
|
422
422
|
/* @__PURE__ */ e("path", { d: "M7 8V4h10v4" }),
|
|
423
423
|
/* @__PURE__ */ e("rect", { x: "3", y: "8", width: "18", height: "8", rx: "2" }),
|
|
424
424
|
/* @__PURE__ */ e("path", { d: "M7 14h10v6H7Z" })
|
|
425
425
|
] }),
|
|
426
|
-
"open-separately": /* @__PURE__ */
|
|
426
|
+
"open-separately": /* @__PURE__ */ o(C, { children: [
|
|
427
427
|
/* @__PURE__ */ e("path", { d: "M14 4h6v6" }),
|
|
428
428
|
/* @__PURE__ */ e("path", { d: "m20 4-9 9" }),
|
|
429
429
|
/* @__PURE__ */ e("path", { d: "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5" })
|
|
430
430
|
] }),
|
|
431
431
|
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" }),
|
|
432
|
-
send: /* @__PURE__ */
|
|
432
|
+
send: /* @__PURE__ */ o(C, { children: [
|
|
433
433
|
/* @__PURE__ */ e("path", { d: "M21 3 10 14" }),
|
|
434
434
|
/* @__PURE__ */ e("path", { d: "M21 3 14 21l-4-7-7-4Z" })
|
|
435
435
|
] }),
|
|
436
|
-
inbox: /* @__PURE__ */
|
|
436
|
+
inbox: /* @__PURE__ */ o(C, { children: [
|
|
437
437
|
/* @__PURE__ */ e("path", { d: "M3 13h5l1 3h6l1-3h5" }),
|
|
438
438
|
/* @__PURE__ */ e("path", { d: "M5 5h14l2 8v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" })
|
|
439
439
|
] }),
|
|
440
|
-
archive: /* @__PURE__ */
|
|
440
|
+
archive: /* @__PURE__ */ o(C, { children: [
|
|
441
441
|
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "5", rx: "1" }),
|
|
442
442
|
/* @__PURE__ */ e("path", { d: "M5 9v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9M10 13h4" })
|
|
443
443
|
] }),
|
|
444
|
-
trash: /* @__PURE__ */
|
|
444
|
+
trash: /* @__PURE__ */ o(C, { children: [
|
|
445
445
|
/* @__PURE__ */ e("path", { d: "M4 7h16M10 11v6M14 11v6" }),
|
|
446
446
|
/* @__PURE__ */ e("path", { d: "M6 7l1 13a2 2 0 0 0 2 1h6a2 2 0 0 0 2-1l1-13M9 7V4h6v3" })
|
|
447
447
|
] }),
|
|
448
448
|
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" }),
|
|
449
|
-
mic: /* @__PURE__ */
|
|
449
|
+
mic: /* @__PURE__ */ o(C, { children: [
|
|
450
450
|
/* @__PURE__ */ e("rect", { x: "9", y: "3", width: "6", height: "11", rx: "3" }),
|
|
451
451
|
/* @__PURE__ */ e("path", { d: "M5 11a7 7 0 0 0 14 0M12 18v3" })
|
|
452
452
|
] }),
|
|
453
|
-
speaker: /* @__PURE__ */
|
|
453
|
+
speaker: /* @__PURE__ */ o(C, { children: [
|
|
454
454
|
/* @__PURE__ */ e("path", { d: "M4 9h4l5-4v14l-5-4H4Z" }),
|
|
455
455
|
/* @__PURE__ */ e("path", { d: "M16 9a4 4 0 0 1 0 6M19 6a8 8 0 0 1 0 12" })
|
|
456
456
|
] }),
|
|
457
|
-
"user-plus": /* @__PURE__ */
|
|
457
|
+
"user-plus": /* @__PURE__ */ o(C, { children: [
|
|
458
458
|
/* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
|
|
459
459
|
/* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M19 8v6M16 11h6" })
|
|
460
460
|
] }),
|
|
461
461
|
// A person, nothing more: one whose account is gone.
|
|
462
|
-
user: /* @__PURE__ */
|
|
462
|
+
user: /* @__PURE__ */ o(C, { children: [
|
|
463
463
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "8", r: "4" }),
|
|
464
464
|
/* @__PURE__ */ e("path", { d: "M4 21a8 8 0 0 1 16 0" })
|
|
465
465
|
] }),
|
|
466
|
+
// A person with a tick: someone allowed.
|
|
467
|
+
"user-check": /* @__PURE__ */ o(C, { children: [
|
|
468
|
+
/* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
|
|
469
|
+
/* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M16 11l2 2 4-4" })
|
|
470
|
+
] }),
|
|
471
|
+
// A person with a cross: someone no longer allowed.
|
|
472
|
+
"user-x": /* @__PURE__ */ o(C, { children: [
|
|
473
|
+
/* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
|
|
474
|
+
/* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M17 8l4 4M21 8l-4 4" })
|
|
475
|
+
] }),
|
|
466
476
|
"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" }),
|
|
467
|
-
video: /* @__PURE__ */
|
|
477
|
+
video: /* @__PURE__ */ o(C, { children: [
|
|
468
478
|
/* @__PURE__ */ e("rect", { x: "3", y: "6", width: "13", height: "12", rx: "2" }),
|
|
469
479
|
/* @__PURE__ */ e("path", { d: "m16 10 5-3v10l-5-3" })
|
|
470
480
|
] }),
|
|
471
|
-
info: /* @__PURE__ */
|
|
481
|
+
info: /* @__PURE__ */ o(C, { children: [
|
|
472
482
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "9" }),
|
|
473
483
|
/* @__PURE__ */ e("path", { d: "M12 11v6M12 7.5v.5" })
|
|
474
484
|
] }),
|
|
@@ -476,8 +486,18 @@ const Pe = {
|
|
|
476
486
|
"chevron-left": /* @__PURE__ */ e("path", { d: "m15 18-6-6 6-6" }),
|
|
477
487
|
plus: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" }),
|
|
478
488
|
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" }),
|
|
489
|
+
// The folder with a plus inside: a new folder.
|
|
490
|
+
"folder-plus": /* @__PURE__ */ o(C, { children: [
|
|
491
|
+
/* @__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" }),
|
|
492
|
+
/* @__PURE__ */ e("path", { d: "M12 10.5v6M9 13.5h6" })
|
|
493
|
+
] }),
|
|
494
|
+
// The folder with a cross inside: a folder removed.
|
|
495
|
+
"folder-x": /* @__PURE__ */ o(C, { children: [
|
|
496
|
+
/* @__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" }),
|
|
497
|
+
/* @__PURE__ */ e("path", { d: "m9.5 11 5 5M14.5 11l-5 5" })
|
|
498
|
+
] }),
|
|
479
499
|
check: /* @__PURE__ */ e("path", { d: "m5 12 5 5 9-10" }),
|
|
480
|
-
server: /* @__PURE__ */
|
|
500
|
+
server: /* @__PURE__ */ o(C, { children: [
|
|
481
501
|
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "7", rx: "2" }),
|
|
482
502
|
/* @__PURE__ */ e("rect", { x: "3", y: "13", width: "18", height: "7", rx: "2" }),
|
|
483
503
|
/* @__PURE__ */ e("path", { d: "M7 7.5h.5M7 16.5h.5" })
|
|
@@ -504,11 +524,11 @@ function T({ name: n, size: l = 20, label: t }) {
|
|
|
504
524
|
strokeLinejoin: "round",
|
|
505
525
|
focusable: !1,
|
|
506
526
|
...t ? { role: "img", "aria-label": t } : { "aria-hidden": !0 },
|
|
507
|
-
children:
|
|
527
|
+
children: Ie[n]
|
|
508
528
|
}
|
|
509
529
|
);
|
|
510
530
|
}
|
|
511
|
-
const
|
|
531
|
+
const Fn = Object.keys(Ie), Ee = {
|
|
512
532
|
reply: "reply",
|
|
513
533
|
"reply-all": "reply",
|
|
514
534
|
forward: "forward",
|
|
@@ -525,23 +545,43 @@ const In = Object.keys(Pe), Ee = {
|
|
|
525
545
|
printer: "print",
|
|
526
546
|
"file-earmark-code": "file-code",
|
|
527
547
|
clipboard: "copy",
|
|
528
|
-
"three-dots": "more"
|
|
548
|
+
"three-dots": "more",
|
|
549
|
+
pencil: "pencil",
|
|
550
|
+
trash3: "trash",
|
|
551
|
+
"folder-plus": "folder-plus",
|
|
552
|
+
"folder-x": "folder-x",
|
|
553
|
+
image: "image",
|
|
554
|
+
"person-check": "user-check",
|
|
555
|
+
"person-x": "user-x"
|
|
529
556
|
};
|
|
530
|
-
function
|
|
557
|
+
function re(n) {
|
|
531
558
|
return Object.prototype.hasOwnProperty.call(Ee, n) ? Ee[n] : null;
|
|
532
559
|
}
|
|
533
|
-
|
|
534
|
-
|
|
560
|
+
function Je() {
|
|
561
|
+
try {
|
|
562
|
+
return process.env.NODE_ENV !== "production";
|
|
563
|
+
} catch {
|
|
564
|
+
return !1;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
const De = /* @__PURE__ */ new Set();
|
|
568
|
+
function Kn({ name: n, size: l = 18 }) {
|
|
569
|
+
if (n === "") return null;
|
|
570
|
+
const t = re(n);
|
|
571
|
+
return t !== null ? /* @__PURE__ */ e(T, { name: t, size: l }) : (!De.has(n) && Je() && (De.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: l, height: l }, "aria-hidden": "true", "data-icon-name": n }));
|
|
572
|
+
}
|
|
573
|
+
const Qe = 'input, select, textarea, button:not([disabled]), iframe, [href], [tabindex]:not([tabindex="-1"])', en = 60;
|
|
574
|
+
function nn(n) {
|
|
535
575
|
return n instanceof Element && n.closest('input, select, textarea, [contenteditable="true"], [data-viewer-keys]') !== null;
|
|
536
576
|
}
|
|
537
|
-
function
|
|
577
|
+
function ln(n) {
|
|
538
578
|
return n instanceof Element && n.closest("[data-viewer-gestures]") !== null;
|
|
539
579
|
}
|
|
540
|
-
function
|
|
580
|
+
function tn(n) {
|
|
541
581
|
return n.getClientRects().length > 0;
|
|
542
582
|
}
|
|
543
|
-
function
|
|
544
|
-
const { name: l, badge: t, closeLabel:
|
|
583
|
+
function Hn(n) {
|
|
584
|
+
const { name: l, badge: t, closeLabel: u, onClose: d, actions: a = [], moreLabel: r = "More", edit: s, editing: m, state: b, siblings: c, bar: h, thumbnails: i, strip: f, onZoom: p, children: g } = n, N = K(null), y = K(null), x = q(), [S, M] = A(!1), z = K(null);
|
|
545
585
|
J(() => {
|
|
546
586
|
var V;
|
|
547
587
|
const w = document.activeElement, B = document.body.style.overflow;
|
|
@@ -550,20 +590,20 @@ function Bn(n) {
|
|
|
550
590
|
document.body.style.overflow = B, (L = w == null ? void 0 : w.focus) == null || L.call(w);
|
|
551
591
|
};
|
|
552
592
|
}, []);
|
|
553
|
-
const
|
|
554
|
-
m != null && m.dirty ? m.onDirtyClose() :
|
|
593
|
+
const H = () => {
|
|
594
|
+
m != null && m.dirty ? m.onDirtyClose() : d();
|
|
555
595
|
}, le = (w) => {
|
|
556
596
|
const B = w.touches.length === 1 ? w.touches[0] : void 0;
|
|
557
|
-
|
|
597
|
+
z.current = B === void 0 || m !== void 0 || ln(w.target) ? null : { x: B.clientX, y: B.clientY };
|
|
558
598
|
}, Q = (w) => {
|
|
559
599
|
var Y, F;
|
|
560
|
-
const B =
|
|
561
|
-
if (
|
|
600
|
+
const B = z.current, V = w.changedTouches[0];
|
|
601
|
+
if (z.current = null, B === null || V === void 0) return;
|
|
562
602
|
const L = V.clientX - B.x;
|
|
563
|
-
Math.abs(L) <
|
|
603
|
+
Math.abs(L) < en || Math.abs(L) < Math.abs(V.clientY - B.y) || (L > 0 ? (Y = c == null ? void 0 : c.onPrevious) == null || Y.call(c) : (F = c == null ? void 0 : c.onNext) == null || F.call(c));
|
|
564
604
|
};
|
|
565
|
-
return
|
|
566
|
-
/* @__PURE__ */
|
|
605
|
+
return Me(
|
|
606
|
+
/* @__PURE__ */ o(
|
|
567
607
|
"div",
|
|
568
608
|
{
|
|
569
609
|
ref: N,
|
|
@@ -576,43 +616,43 @@ function Bn(n) {
|
|
|
576
616
|
var B, V, L;
|
|
577
617
|
if (w.key === "Escape") {
|
|
578
618
|
if (m !== void 0) return;
|
|
579
|
-
w.stopPropagation(),
|
|
619
|
+
w.stopPropagation(), S ? M(!1) : d();
|
|
580
620
|
} else if (w.key === "Tab") {
|
|
581
|
-
const Y = Array.from(((B = N.current) == null ? void 0 : B.querySelectorAll(
|
|
621
|
+
const Y = Array.from(((B = N.current) == null ? void 0 : B.querySelectorAll(Qe)) ?? []).filter(tn);
|
|
582
622
|
if (Y.length === 0) return;
|
|
583
623
|
const F = Y[0], X = Y[Y.length - 1];
|
|
584
624
|
w.shiftKey && document.activeElement === F ? (w.preventDefault(), X.focus()) : !w.shiftKey && document.activeElement === X && (w.preventDefault(), F.focus());
|
|
585
|
-
} else m === void 0 && !
|
|
625
|
+
} else m === void 0 && !nn(w.target) && !w.ctrlKey && !w.metaKey && !w.altKey && (w.key === "ArrowLeft" ? (V = c == null ? void 0 : c.onPrevious) == null || V.call(c) : w.key === "ArrowRight" ? (L = c == null ? void 0 : c.onNext) == null || L.call(c) : w.key === "+" || w.key === "=" ? p == null || p("in") : w.key === "-" ? p == null || p("out") : w.key === "0" && (p == null || p("reset")));
|
|
586
626
|
},
|
|
587
627
|
children: [
|
|
588
|
-
|
|
589
|
-
/* @__PURE__ */
|
|
590
|
-
/* @__PURE__ */ e("button", { ref: y, type: "button", className: "cms-viewer__icon", "aria-label":
|
|
628
|
+
c !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${l}, ${c.position}` }) : null,
|
|
629
|
+
/* @__PURE__ */ o("header", { className: "cms-viewer__top", children: [
|
|
630
|
+
/* @__PURE__ */ e("button", { ref: y, type: "button", className: "cms-viewer__icon", "aria-label": u, onClick: H, children: /* @__PURE__ */ e(R, { name: "close" }) }),
|
|
591
631
|
/* @__PURE__ */ e("span", { className: "cms-viewer__badge", children: t }),
|
|
592
632
|
/* @__PURE__ */ e("h2", { className: "cms-viewer__name", id: x, title: l, children: l }),
|
|
593
|
-
|
|
633
|
+
c !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: c.position }) : null,
|
|
594
634
|
/* @__PURE__ */ e("span", { className: "cms-viewer__space" }),
|
|
595
|
-
m !== void 0 ? /* @__PURE__ */
|
|
635
|
+
m !== void 0 ? /* @__PURE__ */ o(C, { children: [
|
|
596
636
|
/* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: m.status }),
|
|
597
637
|
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: m.onDone, children: m.doneLabel })
|
|
598
|
-
] }) : /* @__PURE__ */
|
|
599
|
-
/* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: a.map((w) => /* @__PURE__ */
|
|
638
|
+
] }) : /* @__PURE__ */ o(C, { children: [
|
|
639
|
+
/* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: a.map((w) => /* @__PURE__ */ o("button", { type: "button", className: "cms-viewer__button", onClick: w.onSelect, children: [
|
|
600
640
|
w.icon,
|
|
601
641
|
w.label
|
|
602
642
|
] }, w.label)) }),
|
|
603
|
-
s !== void 0 ? /* @__PURE__ */
|
|
643
|
+
s !== void 0 ? /* @__PURE__ */ o("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": s.label, onClick: s.onEdit, children: [
|
|
604
644
|
s.icon,
|
|
605
645
|
/* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: s.label })
|
|
606
646
|
] }) : null,
|
|
607
|
-
a.length > 0 ? /* @__PURE__ */
|
|
608
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": r, "aria-expanded":
|
|
609
|
-
|
|
647
|
+
a.length > 0 ? /* @__PURE__ */ o("span", { className: "cms-viewer__more", children: [
|
|
648
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": r, "aria-expanded": S, onClick: () => M((w) => !w), children: /* @__PURE__ */ e(T, { name: "more" }) }),
|
|
649
|
+
S ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: a.map((w) => /* @__PURE__ */ o(
|
|
610
650
|
"button",
|
|
611
651
|
{
|
|
612
652
|
type: "button",
|
|
613
653
|
className: "cms-viewer__button",
|
|
614
654
|
onClick: () => {
|
|
615
|
-
|
|
655
|
+
M(!1), w.onSelect();
|
|
616
656
|
},
|
|
617
657
|
children: [
|
|
618
658
|
w.icon,
|
|
@@ -624,18 +664,18 @@ function Bn(n) {
|
|
|
624
664
|
] }) : null
|
|
625
665
|
] })
|
|
626
666
|
] }),
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
-
|
|
629
|
-
/* @__PURE__ */
|
|
630
|
-
(m == null ? void 0 : m.conflict) !== void 0 ? /* @__PURE__ */
|
|
667
|
+
/* @__PURE__ */ o("div", { className: "cms-viewer__body", children: [
|
|
668
|
+
i != null && m === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: i }) : null,
|
|
669
|
+
/* @__PURE__ */ o("div", { className: "cms-viewer__content", onTouchStart: le, onTouchEnd: Q, children: [
|
|
670
|
+
(m == null ? void 0 : m.conflict) !== void 0 ? /* @__PURE__ */ o("div", { className: "cms-viewer__conflict", role: "alert", children: [
|
|
631
671
|
/* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: m.conflict.message }),
|
|
632
672
|
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: m.conflict.onOverwrite, children: m.conflict.overwriteLabel }),
|
|
633
673
|
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: m.conflict.onKeepBoth, children: m.conflict.keepBothLabel })
|
|
634
674
|
] }) : null,
|
|
635
|
-
b === void 0 ? g : /* @__PURE__ */ e(
|
|
636
|
-
m === void 0 && (
|
|
637
|
-
m === void 0 && (
|
|
638
|
-
m === void 0 &&
|
|
675
|
+
b === void 0 ? g : /* @__PURE__ */ e(an, { state: b }),
|
|
676
|
+
m === void 0 && (c != null && c.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": c.previousLabel, title: c.previousLabel, onClick: c.onPrevious, children: /* @__PURE__ */ e(R, { name: "back" }) }) : null,
|
|
677
|
+
m === void 0 && (c != null && c.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": c.nextLabel, title: c.nextLabel, onClick: c.onNext, children: /* @__PURE__ */ e(R, { name: "back" }) }) : null,
|
|
678
|
+
m === void 0 && c !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(c.total, 7) }, (w, B) => /* @__PURE__ */ e("i", { className: B === Math.min(c.index, 6) ? "is-current" : void 0 }, B)) }) : null
|
|
639
679
|
] })
|
|
640
680
|
] }),
|
|
641
681
|
m === void 0 && f != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: f }) : null,
|
|
@@ -646,7 +686,7 @@ function Bn(n) {
|
|
|
646
686
|
document.body
|
|
647
687
|
);
|
|
648
688
|
}
|
|
649
|
-
function
|
|
689
|
+
function an({ state: n }) {
|
|
650
690
|
switch (n.kind) {
|
|
651
691
|
case "loading":
|
|
652
692
|
return /* @__PURE__ */ e(ee, { kind: "loading", title: n.title, placement: "page" });
|
|
@@ -674,62 +714,62 @@ function ln({ state: n }) {
|
|
|
674
714
|
);
|
|
675
715
|
}
|
|
676
716
|
}
|
|
677
|
-
class
|
|
717
|
+
class sn extends Error {
|
|
678
718
|
constructor(l = "denied") {
|
|
679
719
|
super(l), this.name = "FilePickerDenied";
|
|
680
720
|
}
|
|
681
721
|
}
|
|
682
722
|
const Ne = (n, l) => `${n}
|
|
683
|
-
${l}`,
|
|
684
|
-
function
|
|
685
|
-
var
|
|
686
|
-
const { open: l, spaces: t, list:
|
|
723
|
+
${l}`, rn = (n, l) => n === "" ? l : `${n}/${l}`, cn = 48;
|
|
724
|
+
function On(n) {
|
|
725
|
+
var me, he;
|
|
726
|
+
const { open: l, spaces: t, list: u, disabledReason: d, budget: a, formatSize: r, labels: s, onConfirm: m, onCancel: b } = n, [c, h] = A(((me = t[0]) == null ? void 0 : me.id) ?? ""), [i, f] = A(""), [p, g] = A({ status: "loading" }), [N, y] = A(0), [x, S] = A(/* @__PURE__ */ new Map()), [M, z] = A(0), [H, le] = A(!1), Q = K(null), w = q();
|
|
687
727
|
J(() => {
|
|
688
728
|
var _;
|
|
689
|
-
l && (h(((_ = t[0]) == null ? void 0 : _.id) ?? ""), f(""),
|
|
729
|
+
l && (h(((_ = t[0]) == null ? void 0 : _.id) ?? ""), f(""), S(/* @__PURE__ */ new Map()), le(!1));
|
|
690
730
|
}, [l]), J(() => {
|
|
691
|
-
if (!l ||
|
|
731
|
+
if (!l || c === "") return;
|
|
692
732
|
let _ = !0;
|
|
693
|
-
return g({ status: "loading" }),
|
|
733
|
+
return g({ status: "loading" }), z(0), u(c, i).then(
|
|
694
734
|
(k) => _ && g({ status: "ready", entries: k.entries, next: k.next ?? null, paging: !1 }),
|
|
695
|
-
(k) => _ && g({ status: k instanceof
|
|
735
|
+
(k) => _ && g({ status: k instanceof sn ? "denied" : "error" })
|
|
696
736
|
), () => {
|
|
697
737
|
_ = !1;
|
|
698
738
|
};
|
|
699
|
-
}, [l,
|
|
700
|
-
const B =
|
|
739
|
+
}, [l, c, i, u, N]);
|
|
740
|
+
const B = _e(() => {
|
|
701
741
|
if (p.status !== "ready" || p.next === null || p.paging) return;
|
|
702
742
|
const _ = p.next, k = p.entries;
|
|
703
|
-
g({ ...p, paging: !0 }),
|
|
743
|
+
g({ ...p, paging: !0 }), u(c, i, _).then(
|
|
704
744
|
(I) => g({ status: "ready", entries: [...k, ...I.entries], next: I.next ?? null, paging: !1 }),
|
|
705
745
|
() => g({ status: "ready", entries: k, next: _, paging: !1 })
|
|
706
746
|
);
|
|
707
|
-
}, [p,
|
|
747
|
+
}, [p, u, c, i]), V = _e((_) => {
|
|
708
748
|
var k;
|
|
709
749
|
return ((k = a == null ? void 0 : a.cost) == null ? void 0 : k.call(a, _)) ?? _.size ?? 0;
|
|
710
|
-
}, [a]), L =
|
|
750
|
+
}, [a]), L = He(() => [...x.values()], [x]), Y = L.reduce((_, k) => _ + (k.size ?? 0), 0), F = a === void 0 ? null : a.limitBytes - a.usedBytes - L.reduce((_, k) => _ + V(k), 0), X = F !== null && F < 0, ie = (_) => {
|
|
711
751
|
if (_.kind !== "file") return null;
|
|
712
|
-
const k =
|
|
713
|
-
return k || (F !== null && !x.has(Ne(
|
|
714
|
-
},
|
|
715
|
-
const k = Ne(
|
|
716
|
-
!x.has(k) && ie(_) !== null ||
|
|
717
|
-
const
|
|
718
|
-
return
|
|
752
|
+
const k = d == null ? void 0 : d(_);
|
|
753
|
+
return k || (F !== null && !x.has(Ne(c, _.id)) && V(_) > F ? s.overBudget : null);
|
|
754
|
+
}, oe = (_) => {
|
|
755
|
+
const k = Ne(c, _.id);
|
|
756
|
+
!x.has(k) && ie(_) !== null || S((I) => {
|
|
757
|
+
const O = new Map(I);
|
|
758
|
+
return O.has(k) ? O.delete(k) : O.set(k, { ..._, space: c, path: i }), O;
|
|
719
759
|
});
|
|
720
|
-
}, v = (_) => f(
|
|
760
|
+
}, v = (_) => f(rn(i, _.name)), D = () => f(i.includes("/") ? i.slice(0, i.lastIndexOf("/")) : ""), Z = (_) => S((k) => {
|
|
721
761
|
const I = new Map(k);
|
|
722
762
|
return I.delete(_), I;
|
|
723
763
|
}), W = p.status === "ready" ? p.entries : [], $ = (_) => {
|
|
724
|
-
const k = W[
|
|
764
|
+
const k = W[M];
|
|
725
765
|
if (_.key === "ArrowDown" || _.key === "ArrowUp" || _.key === "Home" || _.key === "End") {
|
|
726
766
|
_.preventDefault();
|
|
727
|
-
const I = W.length - 1,
|
|
728
|
-
|
|
729
|
-
} else _.key === "Enter" && (k == null ? void 0 : k.kind) === "folder" ? (_.preventDefault(), v(k)) : _.key === " " && (k == null ? void 0 : k.kind) === "file" ? (_.preventDefault(),
|
|
730
|
-
}, j =
|
|
731
|
-
return /* @__PURE__ */
|
|
732
|
-
|
|
767
|
+
const I = W.length - 1, O = _.key === "Home" ? 0 : _.key === "End" ? I : Math.min(I, Math.max(0, M + (_.key === "ArrowDown" ? 1 : -1)));
|
|
768
|
+
z(O), O >= I - 1 && B();
|
|
769
|
+
} else _.key === "Enter" && (k == null ? void 0 : k.kind) === "folder" ? (_.preventDefault(), v(k)) : _.key === " " && (k == null ? void 0 : k.kind) === "file" ? (_.preventDefault(), oe(k)) : _.key === "Backspace" && i !== "" && (_.preventDefault(), D());
|
|
770
|
+
}, j = i === "" ? [] : i.split("/"), de = ((he = t.find((_) => _.id === c)) == null ? void 0 : he.name) ?? "", ue = (_) => `${w}-entry-${String(_)}`;
|
|
771
|
+
return /* @__PURE__ */ o(
|
|
772
|
+
Pe,
|
|
733
773
|
{
|
|
734
774
|
open: l,
|
|
735
775
|
title: s.title,
|
|
@@ -737,85 +777,85 @@ function Fn(n) {
|
|
|
737
777
|
closeLabel: s.close,
|
|
738
778
|
initialFocus: Q,
|
|
739
779
|
className: "cms-file-picker",
|
|
740
|
-
footer: /* @__PURE__ */
|
|
741
|
-
/* @__PURE__ */
|
|
780
|
+
footer: /* @__PURE__ */ o("div", { className: "cms-file-picker__foot", children: [
|
|
781
|
+
/* @__PURE__ */ o("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
|
|
742
782
|
L.length > 0 ? /* @__PURE__ */ e("span", { children: s.total(L.length, r(Y)) }) : null,
|
|
743
783
|
a !== void 0 && F !== null ? /* @__PURE__ */ e("span", { className: E(X && "is-over"), children: X ? s.overBudget : s.left(r(Math.max(0, F)), r(a.limitBytes)) }) : null
|
|
744
784
|
] }),
|
|
745
|
-
/* @__PURE__ */
|
|
785
|
+
/* @__PURE__ */ o("div", { className: "cms-file-picker__actions", children: [
|
|
746
786
|
/* @__PURE__ */ e(ne, { variant: "secondary", onClick: b, children: s.cancel }),
|
|
747
787
|
/* @__PURE__ */ e(ne, { variant: "primary", disabled: L.length === 0 || X, onClick: () => m(L), children: s.confirm(L.length) })
|
|
748
788
|
] })
|
|
749
789
|
] }),
|
|
750
790
|
children: [
|
|
751
|
-
/* @__PURE__ */
|
|
752
|
-
t.length > 1 ? /* @__PURE__ */
|
|
791
|
+
/* @__PURE__ */ o("div", { className: "cms-file-picker__top", children: [
|
|
792
|
+
t.length > 1 ? /* @__PURE__ */ o("label", { className: "cms-file-picker__space", children: [
|
|
753
793
|
/* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: s.space }),
|
|
754
|
-
/* @__PURE__ */ e("select", { className: "cms-input cms-select", value:
|
|
794
|
+
/* @__PURE__ */ e("select", { className: "cms-input cms-select", value: c, onChange: (_) => {
|
|
755
795
|
h(_.target.value), f("");
|
|
756
796
|
}, children: t.map((_) => /* @__PURE__ */ e("option", { value: _.id, children: _.name }, _.id)) })
|
|
757
797
|
] }) : null,
|
|
758
|
-
/* @__PURE__ */
|
|
759
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": s.up, disabled:
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
-
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current":
|
|
798
|
+
/* @__PURE__ */ o("nav", { className: "cms-file-picker__path", "aria-label": s.path, children: [
|
|
799
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": s.up, disabled: i === "", onClick: D, children: /* @__PURE__ */ e(T, { name: "chevron-left" }) }),
|
|
800
|
+
/* @__PURE__ */ o("ol", { children: [
|
|
801
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": i === "" ? "location" : void 0, onClick: () => f(""), children: de }) }),
|
|
762
802
|
j.map((_, k) => {
|
|
763
803
|
const I = j.slice(0, k + 1).join("/");
|
|
764
|
-
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": I ===
|
|
804
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": I === i ? "location" : void 0, onClick: () => f(I), children: _ }) }, I);
|
|
765
805
|
})
|
|
766
806
|
] })
|
|
767
807
|
] }),
|
|
768
|
-
L.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded":
|
|
808
|
+
L.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": H, onClick: () => le((_) => !_), children: s.selected(L.length) }) : null
|
|
769
809
|
] }),
|
|
770
|
-
|
|
771
|
-
/* @__PURE__ */ e("ul", { children: [...x.entries()].map(([_, k]) => /* @__PURE__ */
|
|
810
|
+
H && L.length > 0 ? /* @__PURE__ */ o("div", { className: "cms-file-picker__chosen", children: [
|
|
811
|
+
/* @__PURE__ */ e("ul", { children: [...x.entries()].map(([_, k]) => /* @__PURE__ */ o("li", { children: [
|
|
772
812
|
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: k.name }),
|
|
773
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": s.remove(k.name), onClick: () => Z(_), children: /* @__PURE__ */ e(
|
|
813
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": s.remove(k.name), onClick: () => Z(_), children: /* @__PURE__ */ e(R, { name: "close" }) })
|
|
774
814
|
] }, _)) }),
|
|
775
815
|
/* @__PURE__ */ e(ne, { variant: "secondary", onClick: () => {
|
|
776
|
-
|
|
816
|
+
S(/* @__PURE__ */ new Map()), le(!1);
|
|
777
817
|
}, children: s.clear })
|
|
778
818
|
] }) : null,
|
|
779
|
-
/* @__PURE__ */
|
|
819
|
+
/* @__PURE__ */ o("div", { className: "cms-file-picker__list", onScroll: (_) => {
|
|
780
820
|
const k = _.currentTarget;
|
|
781
|
-
k.scrollTop + k.clientHeight >= k.scrollHeight -
|
|
821
|
+
k.scrollTop + k.clientHeight >= k.scrollHeight - cn && B();
|
|
782
822
|
}, children: [
|
|
783
823
|
p.status === "loading" ? /* @__PURE__ */ e(ee, { kind: "loading", title: s.loading, placement: "block" }) : null,
|
|
784
824
|
p.status === "error" ? /* @__PURE__ */ e(ee, { kind: "error", title: s.error, placement: "block", action: { label: s.retry, onAction: () => y((_) => _ + 1) } }) : null,
|
|
785
825
|
p.status === "denied" ? /* @__PURE__ */ e(ee, { kind: "denied", title: s.denied, placement: "block" }) : null,
|
|
786
826
|
p.status === "ready" && W.length === 0 ? /* @__PURE__ */ e(ee, { kind: "empty", title: s.empty, placement: "block" }) : null,
|
|
787
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ o(
|
|
788
828
|
"div",
|
|
789
829
|
{
|
|
790
830
|
ref: Q,
|
|
791
831
|
role: "listbox",
|
|
792
832
|
"aria-multiselectable": "true",
|
|
793
833
|
"aria-label": s.files,
|
|
794
|
-
"aria-activedescendant": W.length > 0 ?
|
|
834
|
+
"aria-activedescendant": W.length > 0 ? ue(M) : void 0,
|
|
795
835
|
tabIndex: 0,
|
|
796
836
|
className: "cms-file-picker__entries",
|
|
797
837
|
hidden: p.status !== "ready" || W.length === 0,
|
|
798
838
|
onKeyDown: $,
|
|
799
839
|
children: [
|
|
800
840
|
W.map((_, k) => {
|
|
801
|
-
const I = _.kind === "file" && x.has(Ne(
|
|
802
|
-
return /* @__PURE__ */
|
|
841
|
+
const I = _.kind === "file" && x.has(Ne(c, _.id)), O = ie(_);
|
|
842
|
+
return /* @__PURE__ */ o(
|
|
803
843
|
"div",
|
|
804
844
|
{
|
|
805
|
-
id:
|
|
845
|
+
id: ue(k),
|
|
806
846
|
role: "option",
|
|
807
847
|
"aria-selected": _.kind === "file" ? I : void 0,
|
|
808
|
-
"aria-disabled":
|
|
809
|
-
className: E("cms-file-picker__entry", k ===
|
|
848
|
+
"aria-disabled": O !== null || void 0,
|
|
849
|
+
className: E("cms-file-picker__entry", k === M && "is-active", I && "is-ticked", O !== null && "is-disabled"),
|
|
810
850
|
onClick: () => {
|
|
811
|
-
|
|
851
|
+
z(k), _.kind === "folder" ? v(_) : oe(_);
|
|
812
852
|
},
|
|
813
853
|
children: [
|
|
814
854
|
/* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: I ? /* @__PURE__ */ e(T, { name: "check" }) : null }),
|
|
815
855
|
/* @__PURE__ */ e(T, { name: _.kind === "folder" ? "folder" : "file" }),
|
|
816
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ o("span", { className: "cms-file-picker__text", children: [
|
|
817
857
|
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: _.name }),
|
|
818
|
-
|
|
858
|
+
O !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: O }) : null
|
|
819
859
|
] }),
|
|
820
860
|
_.kind === "file" && _.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: r(_.size) }) : null
|
|
821
861
|
]
|
|
@@ -832,25 +872,25 @@ function Fn(n) {
|
|
|
832
872
|
}
|
|
833
873
|
);
|
|
834
874
|
}
|
|
835
|
-
function
|
|
836
|
-
return /* @__PURE__ */
|
|
837
|
-
|
|
875
|
+
function Un({ title: n, scope: l, actions: t, backLink: u }) {
|
|
876
|
+
return /* @__PURE__ */ o("header", { className: "cms-page-header", children: [
|
|
877
|
+
u ? /* @__PURE__ */ o(
|
|
838
878
|
"a",
|
|
839
879
|
{
|
|
840
880
|
className: "cms-page-header__back",
|
|
841
|
-
href:
|
|
842
|
-
onClick: (
|
|
843
|
-
|
|
881
|
+
href: u.href ?? "#",
|
|
882
|
+
onClick: (d) => {
|
|
883
|
+
u.onBack && (d.preventDefault(), u.onBack());
|
|
844
884
|
},
|
|
845
885
|
children: [
|
|
846
|
-
/* @__PURE__ */ e(
|
|
886
|
+
/* @__PURE__ */ e(R, { name: "back" }),
|
|
847
887
|
" ",
|
|
848
|
-
|
|
888
|
+
u.label
|
|
849
889
|
]
|
|
850
890
|
}
|
|
851
891
|
) : null,
|
|
852
|
-
/* @__PURE__ */
|
|
853
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ o("div", { className: "cms-page-header__row", children: [
|
|
893
|
+
/* @__PURE__ */ o("div", { className: "cms-page-header__titles", children: [
|
|
854
894
|
/* @__PURE__ */ e("h1", { className: "cms-page-header__title", children: n }),
|
|
855
895
|
l != null ? /* @__PURE__ */ e("p", { className: "cms-page-header__scope", children: l }) : null
|
|
856
896
|
] }),
|
|
@@ -858,22 +898,22 @@ function Kn({ title: n, scope: l, actions: t, backLink: d }) {
|
|
|
858
898
|
] })
|
|
859
899
|
] });
|
|
860
900
|
}
|
|
861
|
-
function
|
|
862
|
-
const
|
|
901
|
+
function Rn({ tabs: n, active: l, onSelect: t, label: u }) {
|
|
902
|
+
const d = K([]), a = (r, s) => {
|
|
863
903
|
var h;
|
|
864
904
|
const m = n.length - 1, b = r.key === "ArrowRight" ? s === m ? 0 : s + 1 : r.key === "ArrowLeft" ? s === 0 ? m : s - 1 : r.key === "Home" ? 0 : r.key === "End" ? m : null;
|
|
865
905
|
if (b === null) return;
|
|
866
906
|
r.preventDefault();
|
|
867
|
-
const
|
|
868
|
-
|
|
907
|
+
const c = n[b];
|
|
908
|
+
c && (t(c.id), (h = d.current[b]) == null || h.focus());
|
|
869
909
|
};
|
|
870
|
-
return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label":
|
|
910
|
+
return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": u, children: n.map((r, s) => {
|
|
871
911
|
const m = r.id === l;
|
|
872
|
-
return /* @__PURE__ */
|
|
912
|
+
return /* @__PURE__ */ o(
|
|
873
913
|
"button",
|
|
874
914
|
{
|
|
875
915
|
ref: (b) => {
|
|
876
|
-
|
|
916
|
+
d.current[s] = b;
|
|
877
917
|
},
|
|
878
918
|
type: "button",
|
|
879
919
|
role: "tab",
|
|
@@ -891,70 +931,70 @@ function On({ tabs: n, active: l, onSelect: t, label: d }) {
|
|
|
891
931
|
);
|
|
892
932
|
}) });
|
|
893
933
|
}
|
|
894
|
-
function
|
|
895
|
-
const l = n.trim().replace(/\s+via\s+\S.*$/, "").split(/\s+/).filter(Boolean), t = (
|
|
934
|
+
function on(n) {
|
|
935
|
+
const l = n.trim().replace(/\s+via\s+\S.*$/, "").split(/\s+/).filter(Boolean), t = (d) => {
|
|
896
936
|
var a;
|
|
897
|
-
return (a =
|
|
937
|
+
return (a = d == null ? void 0 : d.match(/[\p{L}\p{N}]/u)) == null ? void 0 : a[0];
|
|
898
938
|
};
|
|
899
939
|
return (l.length > 1 ? [t(l[0]), t(l[l.length - 1])] : [t(l[0])]).filter(Boolean).join("").toUpperCase();
|
|
900
940
|
}
|
|
901
|
-
function
|
|
941
|
+
function dn(n) {
|
|
902
942
|
let l = 0;
|
|
903
943
|
for (const t of n.trim().toLowerCase())
|
|
904
944
|
l = l * 31 + (t.codePointAt(0) ?? 0) >>> 0;
|
|
905
945
|
return l % 6 + 1;
|
|
906
946
|
}
|
|
907
|
-
function ve({ name: n, pictureUrl: l, presence: t, connection:
|
|
908
|
-
const r =
|
|
909
|
-
return /* @__PURE__ */
|
|
947
|
+
function ve({ name: n, pictureUrl: l, presence: t, connection: u, deleted: d = !1, size: a = 32 }) {
|
|
948
|
+
const r = u !== void 0 ? `is-${u.state === "offline" ? "disconnected" : u.state}` : t === void 0 ? null : `is-${t === "busy" ? "away" : t}`, s = u !== void 0 ? `${n}, ${u.label}` : t ? `${n}, ${t}` : n;
|
|
949
|
+
return /* @__PURE__ */ o(
|
|
910
950
|
"span",
|
|
911
951
|
{
|
|
912
|
-
className: E("cms-avatar",
|
|
952
|
+
className: E("cms-avatar", d ? "cms-avatar--deleted" : `cms-avatar--tint-${dn(n)}`),
|
|
913
953
|
style: { width: a, height: a, fontSize: Math.round(a * 0.4) },
|
|
914
954
|
role: "img",
|
|
915
955
|
"aria-label": s,
|
|
916
|
-
...
|
|
956
|
+
...u === void 0 ? {} : { title: u.label },
|
|
917
957
|
children: [
|
|
918
|
-
|
|
958
|
+
d ? /* @__PURE__ */ e(T, { name: "user", size: Math.round(a * 0.6) }) : l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: on(n) }),
|
|
919
959
|
r === null ? null : /* @__PURE__ */ e("span", { className: E("cms-avatar__presence", r), "aria-hidden": "true" })
|
|
920
960
|
]
|
|
921
961
|
}
|
|
922
962
|
);
|
|
923
963
|
}
|
|
924
|
-
function
|
|
925
|
-
return n <= 0 ? null : /* @__PURE__ */
|
|
964
|
+
function un({ count: n, label: l, max: t = 99 }) {
|
|
965
|
+
return n <= 0 ? null : /* @__PURE__ */ o("span", { className: "cms-badge", children: [
|
|
926
966
|
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: n > t ? `${t}+` : n }),
|
|
927
967
|
/* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: l })
|
|
928
968
|
] });
|
|
929
969
|
}
|
|
930
|
-
function
|
|
931
|
-
return /* @__PURE__ */
|
|
932
|
-
/* @__PURE__ */
|
|
970
|
+
function zn({ product: n, mark: l, rail: t, active: u, onNavigate: d, server: a, search: r, account: s, children: m, railLabel: b = "Sections" }) {
|
|
971
|
+
return /* @__PURE__ */ o("div", { className: "cms-shell", children: [
|
|
972
|
+
/* @__PURE__ */ o("nav", { className: "cms-shell__rail", "aria-label": b, children: [
|
|
933
973
|
/* @__PURE__ */ e("span", { className: "cms-shell__mark", "aria-hidden": "true", children: l }),
|
|
934
|
-
/* @__PURE__ */ e("ul", { className: "cms-shell__items", children: t.map((
|
|
935
|
-
const h =
|
|
936
|
-
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */
|
|
974
|
+
/* @__PURE__ */ e("ul", { className: "cms-shell__items", children: t.map((c) => {
|
|
975
|
+
const h = c.id === u;
|
|
976
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
|
|
937
977
|
"a",
|
|
938
978
|
{
|
|
939
|
-
href:
|
|
979
|
+
href: c.href,
|
|
940
980
|
className: E("cms-shell__item", h && "is-active"),
|
|
941
981
|
"aria-current": h ? "page" : void 0,
|
|
942
|
-
title:
|
|
943
|
-
onClick: (
|
|
944
|
-
|
|
982
|
+
title: c.label,
|
|
983
|
+
onClick: (i) => {
|
|
984
|
+
d && (i.preventDefault(), d(c.id));
|
|
945
985
|
},
|
|
946
986
|
children: [
|
|
947
|
-
/* @__PURE__ */
|
|
948
|
-
/* @__PURE__ */ e(T, { name:
|
|
949
|
-
|
|
987
|
+
/* @__PURE__ */ o("span", { className: "cms-shell__icon", children: [
|
|
988
|
+
/* @__PURE__ */ e(T, { name: c.icon, size: 22 }),
|
|
989
|
+
c.badge ? /* @__PURE__ */ e(un, { count: c.badge.count, label: c.badge.label }) : null
|
|
950
990
|
] }),
|
|
951
|
-
/* @__PURE__ */ e("span", { className: "cms-shell__label", children:
|
|
991
|
+
/* @__PURE__ */ e("span", { className: "cms-shell__label", children: c.label })
|
|
952
992
|
]
|
|
953
993
|
}
|
|
954
|
-
) },
|
|
994
|
+
) }, c.id);
|
|
955
995
|
}) })
|
|
956
996
|
] }),
|
|
957
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ o("header", { className: "cms-shell__top", children: [
|
|
958
998
|
/* @__PURE__ */ e("span", { className: "cms-shell__product", children: n }),
|
|
959
999
|
a != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: a }) : null,
|
|
960
1000
|
r != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: r }) : null,
|
|
@@ -963,14 +1003,14 @@ function Un({ product: n, mark: l, rail: t, active: d, onNavigate: o, server: a,
|
|
|
963
1003
|
/* @__PURE__ */ e("main", { className: "cms-shell__main", children: m })
|
|
964
1004
|
] });
|
|
965
1005
|
}
|
|
966
|
-
function
|
|
967
|
-
return /* @__PURE__ */
|
|
1006
|
+
function Zn({ label: n, placeholder: l, value: t, onChange: u, onSearch: d }) {
|
|
1007
|
+
return /* @__PURE__ */ o(
|
|
968
1008
|
"form",
|
|
969
1009
|
{
|
|
970
1010
|
role: "search",
|
|
971
1011
|
className: "cms-search",
|
|
972
1012
|
onSubmit: (a) => {
|
|
973
|
-
a.preventDefault(),
|
|
1013
|
+
a.preventDefault(), d == null || d(t);
|
|
974
1014
|
},
|
|
975
1015
|
children: [
|
|
976
1016
|
/* @__PURE__ */ e(T, { name: "search", size: 18 }),
|
|
@@ -982,29 +1022,29 @@ function Hn({ label: n, placeholder: l, value: t, onChange: d, onSearch: o }) {
|
|
|
982
1022
|
"aria-label": n,
|
|
983
1023
|
placeholder: l,
|
|
984
1024
|
value: t,
|
|
985
|
-
onChange: (a) =>
|
|
1025
|
+
onChange: (a) => u(a.target.value)
|
|
986
1026
|
}
|
|
987
1027
|
)
|
|
988
1028
|
]
|
|
989
1029
|
}
|
|
990
1030
|
);
|
|
991
1031
|
}
|
|
992
|
-
function
|
|
993
|
-
const
|
|
1032
|
+
function mn({ options: n, value: l, onChange: t, label: u }) {
|
|
1033
|
+
const d = K([]), a = (r, s) => {
|
|
994
1034
|
var h;
|
|
995
1035
|
const m = n.length - 1, b = r.key === "ArrowRight" || r.key === "ArrowDown" ? s === m ? 0 : s + 1 : r.key === "ArrowLeft" || r.key === "ArrowUp" ? s === 0 ? m : s - 1 : null;
|
|
996
1036
|
if (b === null) return;
|
|
997
1037
|
r.preventDefault();
|
|
998
|
-
const
|
|
999
|
-
|
|
1038
|
+
const c = n[b];
|
|
1039
|
+
c && (t(c.id), (h = d.current[b]) == null || h.focus());
|
|
1000
1040
|
};
|
|
1001
|
-
return /* @__PURE__ */ e("div", { className: "cms-chips", role: "radiogroup", "aria-label":
|
|
1041
|
+
return /* @__PURE__ */ e("div", { className: "cms-chips", role: "radiogroup", "aria-label": u, children: n.map((r, s) => {
|
|
1002
1042
|
const m = r.id === l;
|
|
1003
|
-
return /* @__PURE__ */
|
|
1043
|
+
return /* @__PURE__ */ o(
|
|
1004
1044
|
"button",
|
|
1005
1045
|
{
|
|
1006
1046
|
ref: (b) => {
|
|
1007
|
-
|
|
1047
|
+
d.current[s] = b;
|
|
1008
1048
|
},
|
|
1009
1049
|
type: "button",
|
|
1010
1050
|
role: "radio",
|
|
@@ -1022,18 +1062,18 @@ function dn({ options: n, value: l, onChange: t, label: d }) {
|
|
|
1022
1062
|
);
|
|
1023
1063
|
}) });
|
|
1024
1064
|
}
|
|
1025
|
-
const
|
|
1026
|
-
function
|
|
1027
|
-
const
|
|
1028
|
-
let
|
|
1029
|
-
for (let a =
|
|
1030
|
-
const r = Math.min(
|
|
1031
|
-
|
|
1065
|
+
const Te = 16;
|
|
1066
|
+
function hn(n, l, t) {
|
|
1067
|
+
const u = n.map((a) => Math.min(Math.max(a.width, a.min), a.max));
|
|
1068
|
+
let d = u.reduce((a, r) => a + r, 0) + t - l;
|
|
1069
|
+
for (let a = u.length - 1; a >= 0 && d > 0; a -= 1) {
|
|
1070
|
+
const r = Math.min(d, u[a] - n[a].min);
|
|
1071
|
+
u[a] = u[a] - r, d -= r;
|
|
1032
1072
|
}
|
|
1033
|
-
return
|
|
1073
|
+
return u;
|
|
1034
1074
|
}
|
|
1035
|
-
function
|
|
1036
|
-
const s = Math.max(l.min, Math.min(l.max,
|
|
1075
|
+
function fn({ index: n, size: l, shown: t, others: u, room: d, lastMin: a, onResize: r }) {
|
|
1076
|
+
const s = Math.max(l.min, Math.min(l.max, d > 0 ? d - u - a : l.max)), m = (h) => Math.round(Math.min(Math.max(h, l.min), s)), b = K(null), c = (h, i) => r == null ? void 0 : r(n, m(h), i);
|
|
1037
1077
|
return /* @__PURE__ */ e(
|
|
1038
1078
|
"div",
|
|
1039
1079
|
{
|
|
@@ -1047,33 +1087,33 @@ function mn({ index: n, size: l, shown: t, others: d, room: o, lastMin: a, onRes
|
|
|
1047
1087
|
className: "cms-panes__splitter",
|
|
1048
1088
|
style: { "--split-at": `var(--split-pane-end-${String(n)})` },
|
|
1049
1089
|
onPointerDown: (h) => {
|
|
1050
|
-
var
|
|
1051
|
-
h.button > 0 || (h.preventDefault(), (f = (
|
|
1090
|
+
var i, f, p;
|
|
1091
|
+
h.button > 0 || (h.preventDefault(), (f = (i = h.currentTarget).setPointerCapture) == null || f.call(i, h.pointerId), b.current = { x: h.clientX, from: t, last: t }, (p = h.currentTarget.closest(".cms-panes")) == null || p.classList.add("is-resizing"));
|
|
1052
1092
|
},
|
|
1053
1093
|
onPointerMove: (h) => {
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1094
|
+
const i = b.current;
|
|
1095
|
+
i === null || !Number.isFinite(h.clientX) || (i.last = m(i.from + h.clientX - i.x), c(i.last, !1));
|
|
1056
1096
|
},
|
|
1057
1097
|
onPointerUp: (h) => {
|
|
1058
1098
|
var f;
|
|
1059
|
-
const
|
|
1060
|
-
|
|
1099
|
+
const i = b.current;
|
|
1100
|
+
i !== null && (b.current = null, (f = h.currentTarget.closest(".cms-panes")) == null || f.classList.remove("is-resizing"), c(i.last, !0));
|
|
1061
1101
|
},
|
|
1062
1102
|
onPointerCancel: (h) => {
|
|
1063
1103
|
var f;
|
|
1064
|
-
const
|
|
1065
|
-
b.current = null, (f = h.currentTarget.closest(".cms-panes")) == null || f.classList.remove("is-resizing"),
|
|
1104
|
+
const i = b.current;
|
|
1105
|
+
b.current = null, (f = h.currentTarget.closest(".cms-panes")) == null || f.classList.remove("is-resizing"), i !== null && c(i.last, !0);
|
|
1066
1106
|
},
|
|
1067
|
-
onDoubleClick: () =>
|
|
1107
|
+
onDoubleClick: () => c(l.reset, !0),
|
|
1068
1108
|
onKeyDown: (h) => {
|
|
1069
|
-
const
|
|
1070
|
-
|
|
1109
|
+
const i = h.key === "ArrowLeft" ? t - Te : h.key === "ArrowRight" ? t + Te : h.key === "Home" ? l.min : h.key === "End" ? s : h.key === "Enter" ? l.reset : null;
|
|
1110
|
+
i !== null && (h.preventDefault(), c(i, !0));
|
|
1071
1111
|
}
|
|
1072
1112
|
}
|
|
1073
1113
|
);
|
|
1074
1114
|
}
|
|
1075
|
-
function
|
|
1076
|
-
const r = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), s = K(null), [m, b] = A(0),
|
|
1115
|
+
function Vn({ panes: n, active: l, back: t, sizes: u, lastMin: d = 360, onResize: a }) {
|
|
1116
|
+
const r = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), s = K(null), [m, b] = A(0), c = (u ?? []).slice(0, n.length - 1), h = c.length === n.length - 1 && c.every((p) => p !== void 0);
|
|
1077
1117
|
xe(() => {
|
|
1078
1118
|
const p = s.current;
|
|
1079
1119
|
if (p === null || !h) return;
|
|
@@ -1082,11 +1122,11 @@ function zn({ panes: n, active: l, back: t, sizes: d, lastMin: o = 360, onResize
|
|
|
1082
1122
|
const N = new ResizeObserver(g);
|
|
1083
1123
|
return N.observe(p), () => N.disconnect();
|
|
1084
1124
|
}, [h]);
|
|
1085
|
-
const
|
|
1125
|
+
const i = h ? hn(c, m > 0 ? m : Number.POSITIVE_INFINITY, d) : [], f = h ? Object.fromEntries(i.flatMap((p, g) => [
|
|
1086
1126
|
[`--split-pane-${String(g)}`, `${String(p)}px`],
|
|
1087
|
-
[`--split-pane-end-${String(g)}`, `${String(
|
|
1127
|
+
[`--split-pane-end-${String(g)}`, `${String(i.slice(0, g + 1).reduce((N, y) => N + y, 0))}px`]
|
|
1088
1128
|
])) : void 0;
|
|
1089
|
-
return /* @__PURE__ */
|
|
1129
|
+
return /* @__PURE__ */ o(
|
|
1090
1130
|
"div",
|
|
1091
1131
|
{
|
|
1092
1132
|
ref: s,
|
|
@@ -1094,22 +1134,22 @@ function zn({ panes: n, active: l, back: t, sizes: d, lastMin: o = 360, onResize
|
|
|
1094
1134
|
"data-active": r,
|
|
1095
1135
|
style: f,
|
|
1096
1136
|
children: [
|
|
1097
|
-
n.map((p, g) => /* @__PURE__ */
|
|
1098
|
-
g === r && t ? /* @__PURE__ */
|
|
1137
|
+
n.map((p, g) => /* @__PURE__ */ o("section", { className: "cms-panes__pane", "aria-label": p.label, "data-offset": r - g, children: [
|
|
1138
|
+
g === r && t ? /* @__PURE__ */ o("a", { className: "cms-panes__back", href: t.href, children: [
|
|
1099
1139
|
/* @__PURE__ */ e(T, { name: "chevron-left", size: 18 }),
|
|
1100
1140
|
t.label
|
|
1101
1141
|
] }) : null,
|
|
1102
1142
|
p.content
|
|
1103
1143
|
] }, p.label)),
|
|
1104
|
-
h ?
|
|
1105
|
-
|
|
1144
|
+
h ? c.map((p, g) => /* @__PURE__ */ e(
|
|
1145
|
+
fn,
|
|
1106
1146
|
{
|
|
1107
1147
|
index: g,
|
|
1108
1148
|
size: p,
|
|
1109
|
-
shown:
|
|
1110
|
-
others:
|
|
1149
|
+
shown: i[g],
|
|
1150
|
+
others: i.reduce((N, y, x) => x === g ? N : N + y, 0),
|
|
1111
1151
|
room: m,
|
|
1112
|
-
lastMin:
|
|
1152
|
+
lastMin: d,
|
|
1113
1153
|
onResize: a
|
|
1114
1154
|
},
|
|
1115
1155
|
p.label
|
|
@@ -1118,27 +1158,27 @@ function zn({ panes: n, active: l, back: t, sizes: d, lastMin: o = 360, onResize
|
|
|
1118
1158
|
}
|
|
1119
1159
|
);
|
|
1120
1160
|
}
|
|
1121
|
-
const
|
|
1122
|
-
function
|
|
1123
|
-
const b =
|
|
1124
|
-
return /* @__PURE__ */
|
|
1161
|
+
const pn = { attachment: "Has an attachment", unread: "Unread" };
|
|
1162
|
+
function Wn({ from: n, subject: l, preview: t, time: u, unread: d, hasAttachment: a, selected: r, onOpen: s, labels: m }) {
|
|
1163
|
+
const b = ce(pn, m);
|
|
1164
|
+
return /* @__PURE__ */ o(
|
|
1125
1165
|
"button",
|
|
1126
1166
|
{
|
|
1127
1167
|
type: "button",
|
|
1128
|
-
className: E("cms-mail-row",
|
|
1168
|
+
className: E("cms-mail-row", d && "is-unread", r && "is-selected"),
|
|
1129
1169
|
"aria-current": r ? "true" : void 0,
|
|
1130
1170
|
onClick: s,
|
|
1131
1171
|
children: [
|
|
1132
1172
|
/* @__PURE__ */ e(ve, { name: n, size: 40 }),
|
|
1133
|
-
/* @__PURE__ */
|
|
1134
|
-
/* @__PURE__ */
|
|
1173
|
+
/* @__PURE__ */ o("span", { className: "cms-mail-row__body", children: [
|
|
1174
|
+
/* @__PURE__ */ o("span", { className: "cms-mail-row__line", children: [
|
|
1135
1175
|
/* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: n }),
|
|
1136
1176
|
a ? /* @__PURE__ */ e(T, { name: "paperclip", size: 16, label: b.attachment }) : null,
|
|
1137
|
-
/* @__PURE__ */ e("span", { className: "cms-mail-row__time", children:
|
|
1177
|
+
/* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: u })
|
|
1138
1178
|
] }),
|
|
1139
|
-
/* @__PURE__ */
|
|
1179
|
+
/* @__PURE__ */ o("span", { className: "cms-mail-row__line", children: [
|
|
1140
1180
|
/* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: l }),
|
|
1141
|
-
|
|
1181
|
+
d ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": b.unread }) : null
|
|
1142
1182
|
] }),
|
|
1143
1183
|
/* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: t })
|
|
1144
1184
|
] })
|
|
@@ -1146,23 +1186,23 @@ function Rn({ from: n, subject: l, preview: t, time: d, unread: o, hasAttachment
|
|
|
1146
1186
|
}
|
|
1147
1187
|
);
|
|
1148
1188
|
}
|
|
1149
|
-
function
|
|
1150
|
-
return /* @__PURE__ */
|
|
1189
|
+
function jn({ direction: n, children: l, time: t, read: u, readLabel: d = "Read" }) {
|
|
1190
|
+
return /* @__PURE__ */ o("div", { className: E("cms-bubble", `cms-bubble--${n}`), children: [
|
|
1151
1191
|
/* @__PURE__ */ e("div", { className: "cms-bubble__text", children: l }),
|
|
1152
|
-
/* @__PURE__ */
|
|
1192
|
+
/* @__PURE__ */ o("div", { className: "cms-bubble__meta", children: [
|
|
1153
1193
|
t,
|
|
1154
|
-
n === "out" &&
|
|
1194
|
+
n === "out" && u ? /* @__PURE__ */ o(C, { children: [
|
|
1155
1195
|
" · ",
|
|
1156
|
-
|
|
1196
|
+
d
|
|
1157
1197
|
] }) : null
|
|
1158
1198
|
] })
|
|
1159
1199
|
] });
|
|
1160
1200
|
}
|
|
1161
|
-
function
|
|
1162
|
-
const h = q(),
|
|
1163
|
-
g.preventDefault(),
|
|
1164
|
-
}, p =
|
|
1165
|
-
return /* @__PURE__ */
|
|
1201
|
+
function qn({ label: n, value: l, onChange: t, onSend: u, onAttach: d, placeholder: a, variant: r = "chat", sendLabel: s = "Send", attachLabel: m = "Attach a file", leading: b, canSend: c }) {
|
|
1202
|
+
const h = q(), i = c ?? l.trim() !== "", f = (g) => {
|
|
1203
|
+
g.preventDefault(), i && u();
|
|
1204
|
+
}, p = d ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": m, onClick: d, children: /* @__PURE__ */ e(T, { name: "paperclip" }) }) : null;
|
|
1205
|
+
return /* @__PURE__ */ o("form", { className: E("cms-composer", `cms-composer--${r}`), onSubmit: f, children: [
|
|
1166
1206
|
/* @__PURE__ */ e("label", { htmlFor: h, className: r === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
|
|
1167
1207
|
r === "chat" ? p : null,
|
|
1168
1208
|
/* @__PURE__ */ e(
|
|
@@ -1175,13 +1215,13 @@ function Vn({ label: n, value: l, onChange: t, onSend: d, onAttach: o, placehold
|
|
|
1175
1215
|
value: l,
|
|
1176
1216
|
onChange: (g) => t(g.target.value),
|
|
1177
1217
|
onKeyDown: (g) => {
|
|
1178
|
-
g.nativeEvent.isComposing || g.keyCode === 229 || r === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(),
|
|
1218
|
+
g.nativeEvent.isComposing || g.keyCode === 229 || r === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(), i && u());
|
|
1179
1219
|
}
|
|
1180
1220
|
}
|
|
1181
1221
|
),
|
|
1182
1222
|
r === "reply" && b !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: b }) : null,
|
|
1183
1223
|
r === "reply" ? p : null,
|
|
1184
|
-
r === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": s, disabled: !
|
|
1224
|
+
r === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": s, disabled: !i, children: /* @__PURE__ */ e(T, { name: "send" }) }) : /* @__PURE__ */ o("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !i, children: [
|
|
1185
1225
|
s,
|
|
1186
1226
|
" ",
|
|
1187
1227
|
/* @__PURE__ */ e(T, { name: "send", size: 18 })
|
|
@@ -1209,25 +1249,25 @@ const Ae = {
|
|
|
1209
1249
|
onCallWith: (n) => `On a call with ${n}`,
|
|
1210
1250
|
returnToCall: "Return to call"
|
|
1211
1251
|
};
|
|
1212
|
-
function
|
|
1213
|
-
const a =
|
|
1214
|
-
return /* @__PURE__ */
|
|
1252
|
+
function Yn({ name: n, media: l, onAccept: t, onDecline: u, labels: d }) {
|
|
1253
|
+
const a = ce(Ae, d), r = l === "video" ? a.incomingVideo : a.incomingAudio;
|
|
1254
|
+
return /* @__PURE__ */ o("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": a.incomingFrom(r, n), children: [
|
|
1215
1255
|
/* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(ve, { name: n, size: 112 }) }),
|
|
1216
1256
|
/* @__PURE__ */ e("p", { className: "cms-call-incoming__name", children: n }),
|
|
1217
1257
|
/* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: r }),
|
|
1218
|
-
/* @__PURE__ */
|
|
1219
|
-
/* @__PURE__ */ e(ae, { icon: "phone-off", label: a.decline, tone: "hang-up", onClick:
|
|
1258
|
+
/* @__PURE__ */ o("div", { className: "cms-call-incoming__actions", children: [
|
|
1259
|
+
/* @__PURE__ */ e(ae, { icon: "phone-off", label: a.decline, tone: "hang-up", onClick: u }),
|
|
1220
1260
|
/* @__PURE__ */ e(ae, { icon: "phone", label: a.accept, tone: "accept", onClick: t })
|
|
1221
1261
|
] })
|
|
1222
1262
|
] });
|
|
1223
1263
|
}
|
|
1224
|
-
function ae({ icon: n, label: l, onClick: t, tone:
|
|
1225
|
-
return /* @__PURE__ */
|
|
1264
|
+
function ae({ icon: n, label: l, onClick: t, tone: u = "plain", pressed: d }) {
|
|
1265
|
+
return /* @__PURE__ */ o(
|
|
1226
1266
|
"button",
|
|
1227
1267
|
{
|
|
1228
1268
|
type: "button",
|
|
1229
|
-
className: E("cms-call-button", `cms-call-button--${
|
|
1230
|
-
"aria-pressed":
|
|
1269
|
+
className: E("cms-call-button", `cms-call-button--${u}`, d && "is-pressed"),
|
|
1270
|
+
"aria-pressed": d,
|
|
1231
1271
|
onClick: t,
|
|
1232
1272
|
children: [
|
|
1233
1273
|
/* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(T, { name: n, size: 24 }) }),
|
|
@@ -1236,55 +1276,55 @@ function ae({ icon: n, label: l, onClick: t, tone: d = "plain", pressed: o }) {
|
|
|
1236
1276
|
}
|
|
1237
1277
|
);
|
|
1238
1278
|
}
|
|
1239
|
-
function
|
|
1240
|
-
const
|
|
1241
|
-
return /* @__PURE__ */
|
|
1242
|
-
/* @__PURE__ */
|
|
1279
|
+
function Xn({ name: n, duration: l, connection: t, you: u, muted: d, speaker: a, onToggleMute: r, onToggleSpeaker: s, onAddPerson: m, onChat: b, onHangUp: c, labels: h }) {
|
|
1280
|
+
const i = ce(Ae, h);
|
|
1281
|
+
return /* @__PURE__ */ o("section", { className: "cms-call-panel", "aria-label": i.callWith(n), children: [
|
|
1282
|
+
/* @__PURE__ */ o("div", { className: "cms-call-panel__head", children: [
|
|
1243
1283
|
/* @__PURE__ */ e(ve, { name: n, size: 64 }),
|
|
1244
|
-
/* @__PURE__ */
|
|
1284
|
+
/* @__PURE__ */ o("div", { className: "cms-call-panel__who", children: [
|
|
1245
1285
|
/* @__PURE__ */ e("p", { className: "cms-call-panel__name", children: n }),
|
|
1246
|
-
/* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label":
|
|
1286
|
+
/* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": i.callTime(l), children: l })
|
|
1247
1287
|
] }),
|
|
1248
|
-
/* @__PURE__ */ e("span", { className: E("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ?
|
|
1288
|
+
/* @__PURE__ */ e("span", { className: E("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ? i.goodConnection : i.poorConnection })
|
|
1249
1289
|
] }),
|
|
1250
|
-
/* @__PURE__ */
|
|
1251
|
-
/* @__PURE__ */ e(ve, { name:
|
|
1252
|
-
/* @__PURE__ */ e("span", { children:
|
|
1253
|
-
|
|
1290
|
+
/* @__PURE__ */ o("div", { className: "cms-call-panel__you", children: [
|
|
1291
|
+
/* @__PURE__ */ e(ve, { name: u.name, size: 36 }),
|
|
1292
|
+
/* @__PURE__ */ e("span", { children: i.you }),
|
|
1293
|
+
u.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": i.speaking }) : null
|
|
1254
1294
|
] }),
|
|
1255
|
-
/* @__PURE__ */
|
|
1256
|
-
/* @__PURE__ */ e(ae, { icon: "mic", label:
|
|
1257
|
-
/* @__PURE__ */ e(ae, { icon: "speaker", label:
|
|
1258
|
-
m ? /* @__PURE__ */ e(ae, { icon: "user-plus", label:
|
|
1259
|
-
b ? /* @__PURE__ */ e(ae, { icon: "chat", label:
|
|
1260
|
-
/* @__PURE__ */ e(ae, { icon: "phone-off", label:
|
|
1295
|
+
/* @__PURE__ */ o("div", { className: "cms-call-panel__controls", children: [
|
|
1296
|
+
/* @__PURE__ */ e(ae, { icon: "mic", label: d ? i.unmute : i.mute, pressed: d, onClick: r }),
|
|
1297
|
+
/* @__PURE__ */ e(ae, { icon: "speaker", label: i.speaker, pressed: a, onClick: s }),
|
|
1298
|
+
m ? /* @__PURE__ */ e(ae, { icon: "user-plus", label: i.addPerson, onClick: m }) : null,
|
|
1299
|
+
b ? /* @__PURE__ */ e(ae, { icon: "chat", label: i.chat, onClick: b }) : null,
|
|
1300
|
+
/* @__PURE__ */ e(ae, { icon: "phone-off", label: i.hangUp, tone: "hang-up", onClick: c })
|
|
1261
1301
|
] })
|
|
1262
1302
|
] });
|
|
1263
1303
|
}
|
|
1264
|
-
function
|
|
1265
|
-
const s =
|
|
1266
|
-
return /* @__PURE__ */
|
|
1304
|
+
function Gn({ name: n, duration: l, muted: t, onToggleMute: u, onReturn: d, onHangUp: a, labels: r }) {
|
|
1305
|
+
const s = ce(Ae, r);
|
|
1306
|
+
return /* @__PURE__ */ o("section", { className: "cms-call-bar", "aria-label": s.callWith(n), children: [
|
|
1267
1307
|
/* @__PURE__ */ e("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
|
|
1268
1308
|
/* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: s.onCallWith(n) }),
|
|
1269
1309
|
/* @__PURE__ */ e("span", { className: "cms-call-bar__time", children: l }),
|
|
1270
|
-
/* @__PURE__ */
|
|
1271
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": t ? s.unmute : s.mute, "aria-pressed": t, onClick:
|
|
1272
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick:
|
|
1310
|
+
/* @__PURE__ */ o("span", { className: "cms-call-bar__actions", children: [
|
|
1311
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": t ? s.unmute : s.mute, "aria-pressed": t, onClick: u, children: /* @__PURE__ */ e(T, { name: "mic" }) }),
|
|
1312
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: d, children: s.returnToCall }),
|
|
1273
1313
|
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": s.hangUp, onClick: a, children: /* @__PURE__ */ e(T, { name: "phone-off" }) })
|
|
1274
1314
|
] })
|
|
1275
1315
|
] });
|
|
1276
1316
|
}
|
|
1277
|
-
function
|
|
1278
|
-
return /* @__PURE__ */
|
|
1279
|
-
/* @__PURE__ */
|
|
1280
|
-
/* @__PURE__ */
|
|
1317
|
+
function Jn({ mark: n, product: l, headline: t, lead: u, features: d = [], children: a }) {
|
|
1318
|
+
return /* @__PURE__ */ o("div", { className: "cms-signin", children: [
|
|
1319
|
+
/* @__PURE__ */ o("aside", { className: "cms-signin__brand", children: [
|
|
1320
|
+
/* @__PURE__ */ o("p", { className: "cms-signin__logo", children: [
|
|
1281
1321
|
/* @__PURE__ */ e("span", { className: "cms-signin__mark", "aria-hidden": "true", children: n }),
|
|
1282
1322
|
l
|
|
1283
1323
|
] }),
|
|
1284
|
-
/* @__PURE__ */
|
|
1324
|
+
/* @__PURE__ */ o("div", { className: "cms-signin__pitch", children: [
|
|
1285
1325
|
/* @__PURE__ */ e("p", { className: "cms-signin__headline", children: t }),
|
|
1286
|
-
/* @__PURE__ */ e("p", { className: "cms-signin__lead", children:
|
|
1287
|
-
|
|
1326
|
+
/* @__PURE__ */ e("p", { className: "cms-signin__lead", children: u }),
|
|
1327
|
+
d.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: d.map((r) => /* @__PURE__ */ o("li", { children: [
|
|
1288
1328
|
/* @__PURE__ */ e(T, { name: r.icon, size: 18 }),
|
|
1289
1329
|
r.label
|
|
1290
1330
|
] }, r.label)) }) : null
|
|
@@ -1293,7 +1333,7 @@ function Yn({ mark: n, product: l, headline: t, lead: d, features: o = [], child
|
|
|
1293
1333
|
/* @__PURE__ */ e("main", { className: "cms-signin__form", children: a })
|
|
1294
1334
|
] });
|
|
1295
1335
|
}
|
|
1296
|
-
const
|
|
1336
|
+
const bn = {
|
|
1297
1337
|
title: "Sign in",
|
|
1298
1338
|
identifier: "Email or username",
|
|
1299
1339
|
identifierPlaceholder: "name@example.com",
|
|
@@ -1305,13 +1345,13 @@ const fn = {
|
|
|
1305
1345
|
newHere: "New here?",
|
|
1306
1346
|
create: "Create an account"
|
|
1307
1347
|
};
|
|
1308
|
-
function
|
|
1309
|
-
const s =
|
|
1310
|
-
return /* @__PURE__ */
|
|
1348
|
+
function Qn({ server: n, onSubmit: l, forgotHref: t, createHref: u, error: d, busy: a, labels: r }) {
|
|
1349
|
+
const s = ce(bn, r), m = q(), [b, c] = A(""), [h, i] = A(""), [f, p] = A(!1);
|
|
1350
|
+
return /* @__PURE__ */ o("form", { className: "cms-signin-form", onSubmit: (N) => {
|
|
1311
1351
|
N.preventDefault(), l(b, h);
|
|
1312
|
-
}, "aria-describedby":
|
|
1352
|
+
}, "aria-describedby": d ? `${m}-error` : void 0, children: [
|
|
1313
1353
|
/* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: s.title }),
|
|
1314
|
-
/* @__PURE__ */
|
|
1354
|
+
/* @__PURE__ */ o("p", { className: "cms-signin-form__server", children: [
|
|
1315
1355
|
/* @__PURE__ */ e(T, { name: "server", size: 18 }),
|
|
1316
1356
|
n
|
|
1317
1357
|
] }),
|
|
@@ -1325,12 +1365,12 @@ function Xn({ server: n, onSubmit: l, forgotHref: t, createHref: d, error: o, bu
|
|
|
1325
1365
|
autoComplete: "username",
|
|
1326
1366
|
placeholder: s.identifierPlaceholder,
|
|
1327
1367
|
value: b,
|
|
1328
|
-
onChange: (N) =>
|
|
1368
|
+
onChange: (N) => c(N.target.value),
|
|
1329
1369
|
required: !0
|
|
1330
1370
|
}
|
|
1331
1371
|
),
|
|
1332
1372
|
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${m}-password`, children: s.password }),
|
|
1333
|
-
/* @__PURE__ */
|
|
1373
|
+
/* @__PURE__ */ o("span", { className: "cms-signin-form__password", children: [
|
|
1334
1374
|
/* @__PURE__ */ e(
|
|
1335
1375
|
"input",
|
|
1336
1376
|
{
|
|
@@ -1339,60 +1379,60 @@ function Xn({ server: n, onSubmit: l, forgotHref: t, createHref: d, error: o, bu
|
|
|
1339
1379
|
type: f ? "text" : "password",
|
|
1340
1380
|
autoComplete: "current-password",
|
|
1341
1381
|
value: h,
|
|
1342
|
-
onChange: (N) =>
|
|
1382
|
+
onChange: (N) => i(N.target.value),
|
|
1343
1383
|
required: !0
|
|
1344
1384
|
}
|
|
1345
1385
|
),
|
|
1346
1386
|
/* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": f, onClick: () => p((N) => !N), children: f ? s.hide : s.show })
|
|
1347
1387
|
] }),
|
|
1348
1388
|
t ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: t, children: s.forgot }) : null,
|
|
1349
|
-
|
|
1389
|
+
d ? /* @__PURE__ */ e("p", { id: `${m}-error`, className: "cms-signin-form__error", role: "alert", children: d }) : null,
|
|
1350
1390
|
/* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: a, "aria-busy": a || void 0, children: s.submit }),
|
|
1351
|
-
|
|
1391
|
+
u ? /* @__PURE__ */ o(C, { children: [
|
|
1352
1392
|
/* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: s.newHere }) }),
|
|
1353
|
-
/* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href:
|
|
1393
|
+
/* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: u, children: s.create })
|
|
1354
1394
|
] }) : null
|
|
1355
1395
|
] });
|
|
1356
1396
|
}
|
|
1357
1397
|
const we = 64;
|
|
1358
|
-
function
|
|
1359
|
-
const [t,
|
|
1360
|
-
return
|
|
1398
|
+
function _n(n, l) {
|
|
1399
|
+
const [t, u] = A(0), d = K(l);
|
|
1400
|
+
return d.current = l, J(() => {
|
|
1361
1401
|
const a = n.current;
|
|
1362
1402
|
if (a === null) return;
|
|
1363
1403
|
let r = null, s = 0;
|
|
1364
1404
|
const m = (h) => {
|
|
1365
1405
|
r = a.scrollTop <= 0 && h.touches.length === 1 ? h.touches[0].clientY : null, s = 0;
|
|
1366
1406
|
}, b = (h) => {
|
|
1367
|
-
if (r === null ||
|
|
1368
|
-
const
|
|
1369
|
-
if (
|
|
1370
|
-
r = null,
|
|
1407
|
+
if (r === null || d.current === null) return;
|
|
1408
|
+
const i = h.touches[0].clientY - r;
|
|
1409
|
+
if (i <= 0) {
|
|
1410
|
+
r = null, u(0);
|
|
1371
1411
|
return;
|
|
1372
1412
|
}
|
|
1373
|
-
h.cancelable && h.preventDefault(), s = Math.min(
|
|
1374
|
-
},
|
|
1413
|
+
h.cancelable && h.preventDefault(), s = Math.min(i * 0.6, we * 1.5), u(s);
|
|
1414
|
+
}, c = () => {
|
|
1375
1415
|
var h;
|
|
1376
|
-
r !== null && s >= we && ((h =
|
|
1416
|
+
r !== null && s >= we && ((h = d.current) == null || h.call(d)), r = null, s = 0, u(0);
|
|
1377
1417
|
};
|
|
1378
|
-
return a.addEventListener("touchstart", m, { passive: !0 }), a.addEventListener("touchmove", b, { passive: !1 }), a.addEventListener("touchend",
|
|
1379
|
-
a.removeEventListener("touchstart", m), a.removeEventListener("touchmove", b), a.removeEventListener("touchend",
|
|
1418
|
+
return a.addEventListener("touchstart", m, { passive: !0 }), a.addEventListener("touchmove", b, { passive: !1 }), a.addEventListener("touchend", c), a.addEventListener("touchcancel", c), () => {
|
|
1419
|
+
a.removeEventListener("touchstart", m), a.removeEventListener("touchmove", b), a.removeEventListener("touchend", c), a.removeEventListener("touchcancel", c);
|
|
1380
1420
|
};
|
|
1381
1421
|
}, [n]), t;
|
|
1382
1422
|
}
|
|
1383
|
-
const
|
|
1384
|
-
function
|
|
1385
|
-
return Oe(
|
|
1423
|
+
const Be = Ue(null);
|
|
1424
|
+
function vn() {
|
|
1425
|
+
return Oe(Be);
|
|
1386
1426
|
}
|
|
1387
|
-
function
|
|
1388
|
-
const
|
|
1389
|
-
if (t != null) return /* @__PURE__ */ e(
|
|
1390
|
-
if (l === null) return /* @__PURE__ */ e(
|
|
1391
|
-
if (l.length === 0) return /* @__PURE__ */ e(
|
|
1392
|
-
const
|
|
1427
|
+
function el({ label: n, rows: l, error: t, onRetry: u, loadingText: d = "Loading", emptyTitle: a = "Nothing here yet", emptyHint: r, selected: s, onOpen: m, onRowMenu: b }) {
|
|
1428
|
+
const c = K([]), h = vn();
|
|
1429
|
+
if (t != null) return /* @__PURE__ */ e(Ye, { message: t, onRetry: u });
|
|
1430
|
+
if (l === null) return /* @__PURE__ */ e(je, { what: d, layout: "block" });
|
|
1431
|
+
if (l.length === 0) return /* @__PURE__ */ e(qe, { title: a, hint: r });
|
|
1432
|
+
const i = (f, p, g) => {
|
|
1393
1433
|
var N;
|
|
1394
1434
|
if (f.key === "ArrowDown" || f.key === "ArrowUp")
|
|
1395
|
-
f.preventDefault(), (N =
|
|
1435
|
+
f.preventDefault(), (N = c.current[Math.min(l.length - 1, Math.max(0, p + (f.key === "ArrowDown" ? 1 : -1)))]) == null || N.focus();
|
|
1396
1436
|
else if (f.key === "Enter")
|
|
1397
1437
|
m == null || m(g);
|
|
1398
1438
|
else if ((f.key === "ContextMenu" || f.shiftKey && f.key === "F10") && b) {
|
|
@@ -1401,35 +1441,35 @@ function Gn({ label: n, rows: l, error: t, onRetry: d, loadingText: o = "Loading
|
|
|
1401
1441
|
b(g, { x: y.left + 16, y: y.bottom });
|
|
1402
1442
|
}
|
|
1403
1443
|
};
|
|
1404
|
-
return /* @__PURE__ */
|
|
1405
|
-
h !== null && (h.distance > 0 || h.refreshing) ? /* @__PURE__ */
|
|
1406
|
-
h.refreshing ? /* @__PURE__ */ e(
|
|
1444
|
+
return /* @__PURE__ */ o(C, { children: [
|
|
1445
|
+
h !== null && (h.distance > 0 || h.refreshing) ? /* @__PURE__ */ o("div", { className: "cms-list__pull", role: "status", style: { height: h.refreshing ? void 0 : h.distance }, "data-ready": h.distance >= we ? "" : void 0, children: [
|
|
1446
|
+
h.refreshing ? /* @__PURE__ */ e(R, { name: "spinner" }) : null,
|
|
1407
1447
|
h.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: h.text }) : null
|
|
1408
1448
|
] }) : null,
|
|
1409
1449
|
/* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: l.map((f, p) => {
|
|
1410
1450
|
const g = f.id === s;
|
|
1411
|
-
return /* @__PURE__ */
|
|
1451
|
+
return /* @__PURE__ */ o(
|
|
1412
1452
|
"li",
|
|
1413
1453
|
{
|
|
1414
1454
|
ref: (N) => {
|
|
1415
|
-
|
|
1455
|
+
c.current[p] = N;
|
|
1416
1456
|
},
|
|
1417
1457
|
role: "option",
|
|
1418
1458
|
"aria-selected": g,
|
|
1419
1459
|
tabIndex: g || s == null && p === 0 ? 0 : -1,
|
|
1420
1460
|
className: E("cms-list__row", g && "is-selected"),
|
|
1421
1461
|
onClick: () => m == null ? void 0 : m(f.id),
|
|
1422
|
-
onKeyDown: (N) =>
|
|
1462
|
+
onKeyDown: (N) => i(N, p, f.id),
|
|
1423
1463
|
onContextMenu: b ? (N) => {
|
|
1424
1464
|
N.preventDefault(), b(f.id, { x: N.clientX, y: N.clientY });
|
|
1425
1465
|
} : void 0,
|
|
1426
1466
|
children: [
|
|
1427
1467
|
f.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: f.lead }) : null,
|
|
1428
|
-
/* @__PURE__ */
|
|
1468
|
+
/* @__PURE__ */ o("span", { className: "cms-list__text", children: [
|
|
1429
1469
|
/* @__PURE__ */ e("span", { className: E("cms-list__primary", f.unread === !0 && "is-unread"), children: f.primary }),
|
|
1430
1470
|
f.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: f.secondary }) : null
|
|
1431
1471
|
] }),
|
|
1432
|
-
f.meta != null || f.count !== void 0 ? /* @__PURE__ */
|
|
1472
|
+
f.meta != null || f.count !== void 0 ? /* @__PURE__ */ o("span", { className: "cms-list__end", children: [
|
|
1433
1473
|
f.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: f.meta }) : null,
|
|
1434
1474
|
f.count !== void 0 && f.count > 0 ? /* @__PURE__ */ e("span", { className: "cms-badge cms-list__count", children: f.count }) : null
|
|
1435
1475
|
] }) : null
|
|
@@ -1440,18 +1480,18 @@ function Gn({ label: n, rows: l, error: t, onRetry: d, loadingText: o = "Loading
|
|
|
1440
1480
|
}) })
|
|
1441
1481
|
] });
|
|
1442
1482
|
}
|
|
1443
|
-
function
|
|
1444
|
-
const a = K(null), r = K(null), s = q(), [m, b] = A(n),
|
|
1483
|
+
function Fe({ at: n, items: l, onClose: t, label: u = "Actions", focus: d = "first" }) {
|
|
1484
|
+
const a = K(null), r = K(null), s = q(), [m, b] = A(n), c = l.filter((i) => i.offer.offered);
|
|
1445
1485
|
if (xe(() => {
|
|
1446
1486
|
if (!n) return;
|
|
1447
|
-
const
|
|
1487
|
+
const i = a.current, f = (i == null ? void 0 : i.offsetWidth) ?? 0, p = (i == null ? void 0 : i.offsetHeight) ?? 0;
|
|
1448
1488
|
b({ x: Math.max(0, Math.min(n.x, window.innerWidth - f)), y: Math.max(0, Math.min(n.y, window.innerHeight - p)) });
|
|
1449
1489
|
}, [n]), J(() => {
|
|
1450
1490
|
var p, g;
|
|
1451
1491
|
if (!n) return;
|
|
1452
1492
|
r.current = document.activeElement;
|
|
1453
|
-
const
|
|
1454
|
-
(g =
|
|
1493
|
+
const i = Array.from(((p = a.current) == null ? void 0 : p.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) ?? []);
|
|
1494
|
+
(g = d === "last" ? i[i.length - 1] : i[0]) == null || g.focus();
|
|
1455
1495
|
const f = (N) => {
|
|
1456
1496
|
var y;
|
|
1457
1497
|
(y = a.current) != null && y.contains(N.target) || t();
|
|
@@ -1460,53 +1500,53 @@ function Be({ at: n, items: l, onClose: t, label: d = "Actions", focus: o = "fir
|
|
|
1460
1500
|
var N, y;
|
|
1461
1501
|
document.removeEventListener("mousedown", f), (y = (N = r.current) == null ? void 0 : N.focus) == null || y.call(N);
|
|
1462
1502
|
};
|
|
1463
|
-
}, [n, t,
|
|
1464
|
-
const h = (
|
|
1503
|
+
}, [n, t, d]), !n || c.length === 0) return null;
|
|
1504
|
+
const h = (i) => {
|
|
1465
1505
|
var g, N;
|
|
1466
1506
|
const f = Array.from(((g = a.current) == null ? void 0 : g.querySelectorAll('[role="menuitem"]')) ?? []), p = f.indexOf(document.activeElement);
|
|
1467
|
-
if (
|
|
1468
|
-
|
|
1469
|
-
else if (
|
|
1470
|
-
|
|
1471
|
-
const y =
|
|
1507
|
+
if (i.key === "Escape" || i.key === "Tab")
|
|
1508
|
+
i.preventDefault(), t();
|
|
1509
|
+
else if (i.key === "ArrowDown" || i.key === "ArrowUp") {
|
|
1510
|
+
i.preventDefault();
|
|
1511
|
+
const y = i.key === "ArrowDown" ? 1 : -1;
|
|
1472
1512
|
(N = f[(p + y + f.length) % f.length]) == null || N.focus();
|
|
1473
1513
|
}
|
|
1474
1514
|
};
|
|
1475
|
-
return
|
|
1515
|
+
return Me(
|
|
1476
1516
|
/* @__PURE__ */ e(
|
|
1477
1517
|
"div",
|
|
1478
1518
|
{
|
|
1479
1519
|
ref: a,
|
|
1480
1520
|
className: "cms-menu",
|
|
1481
1521
|
role: "menu",
|
|
1482
|
-
"aria-label":
|
|
1522
|
+
"aria-label": u,
|
|
1483
1523
|
style: { left: (m ?? n).x, top: (m ?? n).y },
|
|
1484
1524
|
onKeyDown: h,
|
|
1485
|
-
onContextMenu: (
|
|
1486
|
-
children:
|
|
1487
|
-
const f =
|
|
1488
|
-
return /* @__PURE__ */
|
|
1525
|
+
onContextMenu: (i) => i.preventDefault(),
|
|
1526
|
+
children: c.map((i) => {
|
|
1527
|
+
const f = i.offer.refusal !== void 0;
|
|
1528
|
+
return /* @__PURE__ */ o(
|
|
1489
1529
|
"div",
|
|
1490
1530
|
{
|
|
1491
1531
|
role: "menuitem",
|
|
1492
1532
|
tabIndex: -1,
|
|
1493
1533
|
"aria-disabled": f || void 0,
|
|
1494
|
-
"aria-describedby": f ? `${s}-${
|
|
1495
|
-
title: f ?
|
|
1496
|
-
className: E("cms-menu__item",
|
|
1534
|
+
"aria-describedby": f ? `${s}-${i.id}` : void 0,
|
|
1535
|
+
title: f ? i.offer.refusal : void 0,
|
|
1536
|
+
className: E("cms-menu__item", i.danger && "is-danger", i.offer.locked && "is-locked", f && "is-refused"),
|
|
1497
1537
|
onClick: () => {
|
|
1498
|
-
f || (t(),
|
|
1538
|
+
f || (t(), i.onSelect());
|
|
1499
1539
|
},
|
|
1500
1540
|
onKeyDown: (p) => {
|
|
1501
|
-
(p.key === "Enter" || p.key === " ") && !f && (p.preventDefault(), t(),
|
|
1541
|
+
(p.key === "Enter" || p.key === " ") && !f && (p.preventDefault(), t(), i.onSelect());
|
|
1502
1542
|
},
|
|
1503
1543
|
children: [
|
|
1504
|
-
|
|
1505
|
-
/* @__PURE__ */ e("span", { className: "cms-menu__label", children:
|
|
1506
|
-
f ? /* @__PURE__ */ e("span", { id: `${s}-${
|
|
1544
|
+
i.offer.locked ? /* @__PURE__ */ e(R, { name: "lock" }) : null,
|
|
1545
|
+
/* @__PURE__ */ e("span", { className: "cms-menu__label", children: i.label }),
|
|
1546
|
+
f ? /* @__PURE__ */ e("span", { id: `${s}-${i.id}`, className: "cms-menu__refusal", children: i.offer.refusal }) : null
|
|
1507
1547
|
]
|
|
1508
1548
|
},
|
|
1509
|
-
|
|
1549
|
+
i.id
|
|
1510
1550
|
);
|
|
1511
1551
|
})
|
|
1512
1552
|
}
|
|
@@ -1514,54 +1554,54 @@ function Be({ at: n, items: l, onClose: t, label: d = "Actions", focus: o = "fir
|
|
|
1514
1554
|
document.body
|
|
1515
1555
|
);
|
|
1516
1556
|
}
|
|
1517
|
-
const
|
|
1518
|
-
function
|
|
1557
|
+
const Le = { bare: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Set() }, $e = (n, l) => n.size === l.size && [...n].every((t) => l.has(t));
|
|
1558
|
+
function gn(n) {
|
|
1519
1559
|
const l = /* @__PURE__ */ new Map();
|
|
1520
1560
|
for (const t of n) l.set(t.group, [...l.get(t.group) ?? [], t]);
|
|
1521
1561
|
return [...l.values()];
|
|
1522
1562
|
}
|
|
1523
|
-
function
|
|
1563
|
+
function Nn(n) {
|
|
1524
1564
|
const l = /* @__PURE__ */ new Map();
|
|
1525
1565
|
for (const t of n) t.overflow !== void 0 && t.overflow !== 0 && l.set(t.overflow, [...l.get(t.overflow) ?? [], t.id]);
|
|
1526
|
-
return [...l.entries()].sort(([t], [
|
|
1566
|
+
return [...l.entries()].sort(([t], [u]) => t - u).map(([, t]) => t);
|
|
1527
1567
|
}
|
|
1528
|
-
function
|
|
1529
|
-
const r = K(null), s = K(null), [m, b] = A(
|
|
1568
|
+
function nl({ label: n, actions: l, onAction: t, status: u, moreLabel: d, leading: a }) {
|
|
1569
|
+
const r = K(null), s = K(null), [m, b] = A(Le), [c, h] = A(null), [i, f] = A("first"), [p, g] = A(null), [N, y] = A(null), x = gn(l), S = Nn(l), M = x.flat(), z = M.filter((v) => v.overflow === 0), H = M.filter((v) => v.overflow !== 0), le = JSON.stringify([l.map((v) => [v.id, v.label, v.icon, v.group, v.overflow ?? null]), u ?? "", a !== void 0]), Q = _e(() => {
|
|
1530
1570
|
const v = r.current, D = s.current;
|
|
1531
1571
|
if (v === null || D === null) return;
|
|
1532
1572
|
const Z = getComputedStyle(v), W = parseFloat(Z.columnGap || "0") || 0, $ = v.clientWidth - (parseFloat(Z.paddingLeft) || 0) - (parseFloat(Z.paddingRight) || 0), j = (P) => {
|
|
1533
|
-
var
|
|
1534
|
-
return ((
|
|
1535
|
-
},
|
|
1536
|
-
const G = /* @__PURE__ */ new Set([...
|
|
1537
|
-
return
|
|
1538
|
-
}, k =
|
|
1539
|
-
let
|
|
1540
|
-
if (_(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= $)
|
|
1573
|
+
var U;
|
|
1574
|
+
return ((U = D.querySelector(P)) == null ? void 0 : U.getBoundingClientRect().width) ?? 0;
|
|
1575
|
+
}, de = j('[data-measure="leading"]'), ue = j('[data-measure="separator"]'), me = j('[data-measure="more"]'), he = (P, U) => j(`[data-measure="${U ? "full" : "icon"}"][data-measure-action="${CSS.escape(P)}"]`), _ = (P, U) => {
|
|
1576
|
+
const G = /* @__PURE__ */ new Set([...z.map((te) => te.id), ...U]), se = x.map((te) => te.filter((pe) => !G.has(pe.id))).filter((te) => te.length > 0), fe = se.flat(), Ke = fe.length + (se.length - 1) + (G.size > 0 ? 1 : 0) + (de > 0 ? 1 : 0);
|
|
1577
|
+
return de + fe.reduce((te, pe) => te + he(pe.id, !P.has(pe.id)), 0) + ue * Math.max(0, se.length - 1) + (G.size > 0 ? me : 0) + W * Math.max(0, Ke - 1);
|
|
1578
|
+
}, k = H.filter((P) => !S.some((U) => U.includes(P.id))).map((P) => P.id), I = [...S, ...[...k].reverse().map((P) => [P])];
|
|
1579
|
+
let O = null;
|
|
1580
|
+
if (_(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= $) O = Le;
|
|
1541
1581
|
else {
|
|
1542
1582
|
const P = /* @__PURE__ */ new Set();
|
|
1543
|
-
for (const
|
|
1544
|
-
for (const G of
|
|
1583
|
+
for (const U of I) {
|
|
1584
|
+
for (const G of U) P.add(G);
|
|
1545
1585
|
if (_(P, /* @__PURE__ */ new Set()) <= $) {
|
|
1546
|
-
|
|
1586
|
+
O = { bare: P, hidden: /* @__PURE__ */ new Set() };
|
|
1547
1587
|
break;
|
|
1548
1588
|
}
|
|
1549
1589
|
}
|
|
1550
1590
|
}
|
|
1551
|
-
if (
|
|
1552
|
-
const P = new Set(
|
|
1553
|
-
for (const G of
|
|
1554
|
-
for (const se of G)
|
|
1555
|
-
if (
|
|
1591
|
+
if (O === null) {
|
|
1592
|
+
const P = new Set(H.map((G) => G.id)), U = /* @__PURE__ */ new Set();
|
|
1593
|
+
for (const G of S) {
|
|
1594
|
+
for (const se of G) H.some((fe) => fe.id === se) && U.add(se);
|
|
1595
|
+
if (U.size >= 2 && _(P, U) <= $) break;
|
|
1556
1596
|
}
|
|
1557
|
-
if (_(P,
|
|
1597
|
+
if (_(P, U) > $) {
|
|
1558
1598
|
for (const G of [...k].reverse())
|
|
1559
|
-
if (
|
|
1599
|
+
if (U.add(G), _(P, U) <= $) break;
|
|
1560
1600
|
}
|
|
1561
|
-
|
|
1601
|
+
O = { bare: P, hidden: U };
|
|
1562
1602
|
}
|
|
1563
|
-
const ge =
|
|
1564
|
-
b((P) =>
|
|
1603
|
+
const ge = O;
|
|
1604
|
+
b((P) => $e(P.bare, ge.bare) && $e(P.hidden, ge.hidden) ? P : ge);
|
|
1565
1605
|
}, [le]);
|
|
1566
1606
|
xe(Q, [Q]), J(() => {
|
|
1567
1607
|
const v = r.current;
|
|
@@ -1569,12 +1609,12 @@ function Jn({ label: n, actions: l, onAction: t, status: d, moreLabel: o, leadin
|
|
|
1569
1609
|
const D = new ResizeObserver(() => Q());
|
|
1570
1610
|
return D.observe(v), () => D.disconnect();
|
|
1571
1611
|
}, [Q]);
|
|
1572
|
-
const w = /* @__PURE__ */ new Set([...
|
|
1573
|
-
...
|
|
1574
|
-
...
|
|
1612
|
+
const w = /* @__PURE__ */ new Set([...z.map((v) => v.id), ...m.hidden]), V = x.map((v) => v.filter((D) => !w.has(D.id))).filter((v) => v.length > 0).flat(), L = [
|
|
1613
|
+
...z,
|
|
1614
|
+
...S.flat().map((v) => M.find((D) => D.id === v)).filter((v) => v !== void 0 && m.hidden.has(v.id)),
|
|
1575
1615
|
// The pinned that a row too narrow for them sent behind ..., in the row's order.
|
|
1576
|
-
...
|
|
1577
|
-
], Y = new Set(
|
|
1616
|
+
...H.filter((v) => m.hidden.has(v.id) && !S.some((D) => D.includes(v.id)))
|
|
1617
|
+
], Y = new Set(H.filter((v) => !S.some((D) => D.includes(v.id))).map((v) => v.id)), F = [...V.map((v) => v.id), ...L.length > 0 ? ["more"] : []], X = p !== null && F.includes(p) ? p : F[0] ?? null, ie = (v) => {
|
|
1578
1618
|
var $, j;
|
|
1579
1619
|
const D = F.indexOf(X ?? "");
|
|
1580
1620
|
let Z = null;
|
|
@@ -1582,10 +1622,10 @@ function Jn({ label: n, actions: l, onAction: t, status: d, moreLabel: o, leadin
|
|
|
1582
1622
|
v.preventDefault();
|
|
1583
1623
|
const W = F[Z] ?? null;
|
|
1584
1624
|
g(W), (j = ($ = r.current) == null ? void 0 : $.querySelector(`[data-stop="${CSS.escape(W ?? "")}"]`)) == null || j.focus();
|
|
1585
|
-
},
|
|
1625
|
+
}, oe = L.map((v) => ({
|
|
1586
1626
|
id: v.id,
|
|
1587
|
-
label: /* @__PURE__ */
|
|
1588
|
-
/* @__PURE__ */ e(
|
|
1627
|
+
label: /* @__PURE__ */ o(C, { children: [
|
|
1628
|
+
/* @__PURE__ */ e(be, { name: v.icon }),
|
|
1589
1629
|
v.label
|
|
1590
1630
|
] }),
|
|
1591
1631
|
offer: v.disabled ? { offered: !0, locked: !1, refusal: v.reason ?? "" } : { offered: !0, locked: !1 },
|
|
@@ -1594,7 +1634,7 @@ function Jn({ label: n, actions: l, onAction: t, status: d, moreLabel: o, leadin
|
|
|
1594
1634
|
!v.disabled && !v.busy && t(v.id);
|
|
1595
1635
|
}
|
|
1596
1636
|
}));
|
|
1597
|
-
return /* @__PURE__ */
|
|
1637
|
+
return /* @__PURE__ */ o(
|
|
1598
1638
|
"div",
|
|
1599
1639
|
{
|
|
1600
1640
|
ref: r,
|
|
@@ -1602,18 +1642,18 @@ function Jn({ label: n, actions: l, onAction: t, status: d, moreLabel: o, leadin
|
|
|
1602
1642
|
"aria-label": n,
|
|
1603
1643
|
className: E(
|
|
1604
1644
|
"cms-pane-toolbar",
|
|
1605
|
-
|
|
1606
|
-
m.bare.size > 0 && m.bare.size <
|
|
1645
|
+
H.length > 0 && m.bare.size >= H.length && "cms-pane-toolbar--labels-hidden",
|
|
1646
|
+
m.bare.size > 0 && m.bare.size < H.length && "cms-pane-toolbar--labels-partly-hidden"
|
|
1607
1647
|
),
|
|
1608
1648
|
onKeyDown: ie,
|
|
1609
1649
|
children: [
|
|
1610
1650
|
a !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__leading", children: a }) : null,
|
|
1611
1651
|
x.map((v, D) => {
|
|
1612
1652
|
const Z = v.filter(($) => !w.has($.id)), W = x.slice(0, D).some(($) => $.some((j) => !w.has(j.id)));
|
|
1613
|
-
return /* @__PURE__ */
|
|
1653
|
+
return /* @__PURE__ */ o("div", { className: "cms-pane-toolbar__group-wrap", children: [
|
|
1614
1654
|
Z.length > 0 && W ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
|
|
1615
1655
|
/* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: Z.length === 0, children: v.map(($) => /* @__PURE__ */ e(
|
|
1616
|
-
|
|
1656
|
+
yn,
|
|
1617
1657
|
{
|
|
1618
1658
|
action: $,
|
|
1619
1659
|
labels: !m.bare.has($.id),
|
|
@@ -1636,15 +1676,15 @@ function Jn({ label: n, actions: l, onAction: t, status: d, moreLabel: o, leadin
|
|
|
1636
1676
|
type: "button",
|
|
1637
1677
|
className: "cms-icon-button cms-pane-toolbar__more",
|
|
1638
1678
|
"data-stop": "more",
|
|
1639
|
-
"aria-label":
|
|
1640
|
-
title:
|
|
1679
|
+
"aria-label": d,
|
|
1680
|
+
title: d,
|
|
1641
1681
|
"aria-haspopup": "menu",
|
|
1642
|
-
"aria-expanded":
|
|
1682
|
+
"aria-expanded": c !== null,
|
|
1643
1683
|
tabIndex: X === "more" ? 0 : -1,
|
|
1644
1684
|
onFocus: () => g("more"),
|
|
1645
1685
|
onClick: (v) => {
|
|
1646
1686
|
const D = v.currentTarget.getBoundingClientRect();
|
|
1647
|
-
f("first"), h(
|
|
1687
|
+
f("first"), h(c === null ? { x: D.left, y: D.bottom } : null);
|
|
1648
1688
|
},
|
|
1649
1689
|
onKeyDown: (v) => {
|
|
1650
1690
|
if (v.key === "ArrowDown" || v.key === "ArrowUp") {
|
|
@@ -1656,25 +1696,25 @@ function Jn({ label: n, actions: l, onAction: t, status: d, moreLabel: o, leadin
|
|
|
1656
1696
|
children: /* @__PURE__ */ e(T, { name: "more" })
|
|
1657
1697
|
}
|
|
1658
1698
|
) : null,
|
|
1659
|
-
|
|
1660
|
-
/* @__PURE__ */ e(
|
|
1661
|
-
/* @__PURE__ */
|
|
1699
|
+
u !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: u, children: u }) : null,
|
|
1700
|
+
/* @__PURE__ */ e(Fe, { at: c, items: oe, onClose: () => h(null), label: d, focus: i }),
|
|
1701
|
+
/* @__PURE__ */ o("div", { ref: s, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
|
|
1662
1702
|
a !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: a }) : null,
|
|
1663
1703
|
/* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
|
|
1664
1704
|
/* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(T, { name: "more" }) }),
|
|
1665
|
-
|
|
1666
|
-
/* @__PURE__ */
|
|
1667
|
-
/* @__PURE__ */ e(
|
|
1705
|
+
M.map((v) => /* @__PURE__ */ o("span", { children: [
|
|
1706
|
+
/* @__PURE__ */ o("span", { "data-measure": "full", "data-measure-action": v.id, className: "cms-pane-toolbar__action", children: [
|
|
1707
|
+
/* @__PURE__ */ e(be, { name: v.icon }),
|
|
1668
1708
|
/* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: v.label })
|
|
1669
1709
|
] }),
|
|
1670
|
-
/* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-action": v.id, className: E("cms-pane-toolbar__action",
|
|
1710
|
+
/* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-action": v.id, className: E("cms-pane-toolbar__action", re(v.icon) !== null && "cms-pane-toolbar__action--bare"), children: re(v.icon) !== null ? /* @__PURE__ */ e(be, { name: v.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: v.label }) })
|
|
1671
1711
|
] }, v.id))
|
|
1672
1712
|
] })
|
|
1673
1713
|
]
|
|
1674
1714
|
}
|
|
1675
1715
|
);
|
|
1676
1716
|
}
|
|
1677
|
-
function
|
|
1717
|
+
function yn({ action: n, labels: l, overflowed: t, pinned: u, tabbable: d, tipOff: a, onChoose: r, onFocus: s }) {
|
|
1678
1718
|
const [m, b] = A(!1);
|
|
1679
1719
|
J(() => {
|
|
1680
1720
|
if (!n.busy) {
|
|
@@ -1684,78 +1724,78 @@ function gn({ action: n, labels: l, overflowed: t, pinned: d, tabbable: o, tipOf
|
|
|
1684
1724
|
const y = setTimeout(() => b(!0), ye);
|
|
1685
1725
|
return () => clearTimeout(y);
|
|
1686
1726
|
}, [n.busy]);
|
|
1687
|
-
const
|
|
1688
|
-
return /* @__PURE__ */
|
|
1727
|
+
const c = re(n.icon) === null, h = l || c, i = n.disabled && n.reason ? n.reason : null, f = i ?? (h ? null : n.label), p = q(), [g, N] = A(!1);
|
|
1728
|
+
return /* @__PURE__ */ o(
|
|
1689
1729
|
"button",
|
|
1690
1730
|
{
|
|
1691
1731
|
type: "button",
|
|
1692
|
-
className: E("cms-pane-toolbar__action", !h && "cms-pane-toolbar__action--bare",
|
|
1732
|
+
className: E("cms-pane-toolbar__action", !h && "cms-pane-toolbar__action--bare", c && "cms-pane-toolbar__action--text", n.danger && "is-danger"),
|
|
1693
1733
|
"data-action": n.id,
|
|
1694
1734
|
"data-stop": n.id,
|
|
1695
1735
|
...t ? { "data-overflowed": "" } : {},
|
|
1696
|
-
...
|
|
1736
|
+
...u ? { "data-pinned": "" } : {},
|
|
1697
1737
|
hidden: t,
|
|
1698
1738
|
"aria-label": n.label,
|
|
1699
1739
|
"aria-disabled": n.disabled || void 0,
|
|
1700
1740
|
"aria-busy": n.busy || void 0,
|
|
1701
|
-
...
|
|
1702
|
-
...g &&
|
|
1703
|
-
tabIndex:
|
|
1741
|
+
...i === null ? {} : { "aria-describedby": p },
|
|
1742
|
+
...g && i !== null ? { "data-reason-shown": "" } : {},
|
|
1743
|
+
tabIndex: d ? 0 : -1,
|
|
1704
1744
|
onFocus: s,
|
|
1705
1745
|
onBlur: () => N(!1),
|
|
1706
1746
|
onKeyDown: (y) => {
|
|
1707
1747
|
y.key === "Escape" && N(!1);
|
|
1708
1748
|
},
|
|
1709
1749
|
onClick: () => {
|
|
1710
|
-
|
|
1750
|
+
i !== null ? N(!0) : !n.disabled && !n.busy && r();
|
|
1711
1751
|
},
|
|
1712
1752
|
children: [
|
|
1713
|
-
m ? /* @__PURE__ */ e(
|
|
1753
|
+
m ? /* @__PURE__ */ e(R, { name: "spinner" }) : /* @__PURE__ */ e(be, { name: n.icon }),
|
|
1714
1754
|
h ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
|
|
1715
|
-
|
|
1755
|
+
i !== null || f !== null && !a ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: p, children: f }) : null
|
|
1716
1756
|
]
|
|
1717
1757
|
}
|
|
1718
1758
|
);
|
|
1719
1759
|
}
|
|
1720
|
-
function
|
|
1721
|
-
const l =
|
|
1760
|
+
function be({ name: n }) {
|
|
1761
|
+
const l = re(n);
|
|
1722
1762
|
return l === null ? null : /* @__PURE__ */ e(T, { name: l, size: 18 });
|
|
1723
1763
|
}
|
|
1724
|
-
function
|
|
1725
|
-
const [
|
|
1726
|
-
|
|
1764
|
+
function ll({ title: n, body: l = null, time: t = null, unread: u, unreadLabel: d, expandLabel: a, collapseLabel: r, action: s = null, onRead: m, leading: b }) {
|
|
1765
|
+
const [c, h] = A(!1), i = q(), f = () => {
|
|
1766
|
+
u && m();
|
|
1727
1767
|
}, p = (s == null ? void 0 : s.presentation) === "row" && s.onAction !== void 0, g = (s == null ? void 0 : s.presentation) === "button" && s.onAction !== void 0 ? s : null, N = () => {
|
|
1728
1768
|
var y;
|
|
1729
1769
|
f(), p && ((y = s.onAction) == null || y.call(s));
|
|
1730
1770
|
};
|
|
1731
|
-
return /* @__PURE__ */
|
|
1732
|
-
/* @__PURE__ */
|
|
1771
|
+
return /* @__PURE__ */ o("article", { className: E("cms-notification", u && "is-unread", c && "is-expanded", p && "is-row-action"), "data-state": u ? "unread" : "read", children: [
|
|
1772
|
+
/* @__PURE__ */ o(
|
|
1733
1773
|
"div",
|
|
1734
1774
|
{
|
|
1735
1775
|
className: "cms-notification__row",
|
|
1736
1776
|
role: "button",
|
|
1737
1777
|
tabIndex: 0,
|
|
1738
|
-
"aria-describedby": l === null ? void 0 :
|
|
1778
|
+
"aria-describedby": l === null ? void 0 : i,
|
|
1739
1779
|
onClick: N,
|
|
1740
1780
|
onKeyDown: (y) => {
|
|
1741
1781
|
y.target !== y.currentTarget || y.key !== "Enter" && y.key !== " " || (y.preventDefault(), N());
|
|
1742
1782
|
},
|
|
1743
1783
|
children: [
|
|
1744
1784
|
b != null ? /* @__PURE__ */ e("span", { className: "cms-notification__leading", children: b }) : null,
|
|
1745
|
-
/* @__PURE__ */
|
|
1746
|
-
/* @__PURE__ */
|
|
1747
|
-
/* @__PURE__ */
|
|
1748
|
-
|
|
1749
|
-
|
|
1785
|
+
/* @__PURE__ */ o("span", { className: "cms-notification__text", children: [
|
|
1786
|
+
/* @__PURE__ */ o("span", { className: "cms-notification__head", children: [
|
|
1787
|
+
/* @__PURE__ */ o("span", { className: "cms-notification__title", children: [
|
|
1788
|
+
u ? /* @__PURE__ */ o("span", { className: "cms-visually-hidden", children: [
|
|
1789
|
+
d,
|
|
1750
1790
|
" "
|
|
1751
1791
|
] }) : null,
|
|
1752
1792
|
n
|
|
1753
1793
|
] }),
|
|
1754
1794
|
t !== null ? /* @__PURE__ */ e("span", { className: "cms-notification__time", children: t }) : null
|
|
1755
1795
|
] }),
|
|
1756
|
-
l !== null && l !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id:
|
|
1796
|
+
l !== null && l !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: i, children: l }) : null
|
|
1757
1797
|
] }),
|
|
1758
|
-
|
|
1798
|
+
u ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
|
|
1759
1799
|
]
|
|
1760
1800
|
}
|
|
1761
1801
|
),
|
|
@@ -1764,12 +1804,12 @@ function Qn({ title: n, body: l = null, time: t = null, unread: d, unreadLabel:
|
|
|
1764
1804
|
{
|
|
1765
1805
|
type: "button",
|
|
1766
1806
|
className: "cms-notification__chevron",
|
|
1767
|
-
"aria-expanded":
|
|
1768
|
-
"aria-controls":
|
|
1769
|
-
"aria-label":
|
|
1770
|
-
title:
|
|
1807
|
+
"aria-expanded": c,
|
|
1808
|
+
"aria-controls": i,
|
|
1809
|
+
"aria-label": c ? r : a,
|
|
1810
|
+
title: c ? r : a,
|
|
1771
1811
|
onClick: () => {
|
|
1772
|
-
|
|
1812
|
+
c || f(), h((y) => !y);
|
|
1773
1813
|
},
|
|
1774
1814
|
children: /* @__PURE__ */ e(T, { name: "chevron-down", size: 18 })
|
|
1775
1815
|
}
|
|
@@ -1788,11 +1828,11 @@ function Qn({ title: n, body: l = null, time: t = null, unread: d, unreadLabel:
|
|
|
1788
1828
|
) : null
|
|
1789
1829
|
] });
|
|
1790
1830
|
}
|
|
1791
|
-
function
|
|
1831
|
+
function wn(n) {
|
|
1792
1832
|
return n === "allowed" || n === "elevate" || n === "denied";
|
|
1793
1833
|
}
|
|
1794
|
-
function
|
|
1795
|
-
if (!
|
|
1834
|
+
function tl(n, l) {
|
|
1835
|
+
if (!wn(n))
|
|
1796
1836
|
return l.showRefused ? { offered: !0, locked: !1, refusal: "not available: the server gave an answer this app does not know", unknown: !0 } : { offered: !1, locked: !1, unknown: !0 };
|
|
1797
1837
|
switch (n) {
|
|
1798
1838
|
case "allowed":
|
|
@@ -1803,89 +1843,89 @@ function el(n, l) {
|
|
|
1803
1843
|
return l.showRefused ? { offered: !0, locked: !1, refusal: l.refusal ?? "not allowed" } : { offered: !1, locked: !1 };
|
|
1804
1844
|
}
|
|
1805
1845
|
}
|
|
1806
|
-
function
|
|
1846
|
+
function kn(n, l) {
|
|
1807
1847
|
if (!n) return;
|
|
1808
1848
|
if (typeof n.get == "function") return n.get(l) ?? void 0;
|
|
1809
|
-
const t = n,
|
|
1810
|
-
return
|
|
1849
|
+
const t = n, u = Object.keys(t).find((d) => d.toLowerCase() === l.toLowerCase());
|
|
1850
|
+
return u === void 0 ? void 0 : t[u];
|
|
1811
1851
|
}
|
|
1812
|
-
function
|
|
1852
|
+
function xn(n) {
|
|
1813
1853
|
if (n && typeof n == "object") {
|
|
1814
1854
|
const l = n;
|
|
1815
1855
|
if (typeof l.detail == "string" && l.detail !== "") return l.detail;
|
|
1816
1856
|
if (typeof l.title == "string" && l.title !== "") return l.title;
|
|
1817
1857
|
}
|
|
1818
1858
|
}
|
|
1819
|
-
function
|
|
1859
|
+
function al(n, l, t, u) {
|
|
1820
1860
|
if (n !== 403) return { kind: "none" };
|
|
1821
|
-
const
|
|
1822
|
-
return
|
|
1861
|
+
const d = xn(t);
|
|
1862
|
+
return kn(l, "X-Elevation-Required") !== void 0 ? u.elevates ? { kind: "elevation-required", message: d ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: d ?? "The server refused this." };
|
|
1823
1863
|
}
|
|
1824
1864
|
const ke = "coolms-kit:reread";
|
|
1825
|
-
function
|
|
1865
|
+
function sl() {
|
|
1826
1866
|
window.dispatchEvent(new Event(ke));
|
|
1827
1867
|
}
|
|
1828
|
-
function
|
|
1829
|
-
const [l, t] = A(void 0), [
|
|
1868
|
+
function rl(n) {
|
|
1869
|
+
const [l, t] = A(void 0), [u, d] = A(void 0), [a, r] = A(!0), s = K(n);
|
|
1830
1870
|
s.current = n;
|
|
1831
|
-
const m = K(0), b =
|
|
1832
|
-
const
|
|
1871
|
+
const m = K(0), b = _e(() => {
|
|
1872
|
+
const c = ++m.current;
|
|
1833
1873
|
r(!0), s.current().then(
|
|
1834
1874
|
(h) => {
|
|
1835
|
-
|
|
1875
|
+
c === m.current && (t(h), d(void 0), r(!1));
|
|
1836
1876
|
},
|
|
1837
1877
|
(h) => {
|
|
1838
|
-
|
|
1878
|
+
c === m.current && (d(h), r(!1));
|
|
1839
1879
|
}
|
|
1840
1880
|
);
|
|
1841
1881
|
}, []);
|
|
1842
1882
|
return J(() => {
|
|
1843
1883
|
b();
|
|
1844
|
-
const
|
|
1845
|
-
return window.addEventListener("focus",
|
|
1846
|
-
window.removeEventListener("focus",
|
|
1884
|
+
const c = () => b();
|
|
1885
|
+
return window.addEventListener("focus", c), window.addEventListener(ke, c), () => {
|
|
1886
|
+
window.removeEventListener("focus", c), window.removeEventListener(ke, c);
|
|
1847
1887
|
};
|
|
1848
|
-
}, [b]), { value: l, error:
|
|
1888
|
+
}, [b]), { value: l, error: u, loading: a, reread: b };
|
|
1849
1889
|
}
|
|
1850
|
-
function
|
|
1890
|
+
function cl(n) {
|
|
1851
1891
|
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 };
|
|
1852
1892
|
}
|
|
1853
|
-
const
|
|
1854
|
-
function
|
|
1855
|
-
const t = n.split(".").map((
|
|
1856
|
-
for (let
|
|
1857
|
-
const a = t[
|
|
1893
|
+
const Mn = "/errors/client-update-required";
|
|
1894
|
+
function Cn(n, l) {
|
|
1895
|
+
const t = n.split(".").map((d) => Number.parseInt(d, 10) || 0), u = l.split(".").map((d) => Number.parseInt(d, 10) || 0);
|
|
1896
|
+
for (let d = 0; d < Math.max(t.length, u.length); d++) {
|
|
1897
|
+
const a = t[d] ?? 0, r = u[d] ?? 0;
|
|
1858
1898
|
if (a !== r) return a < r;
|
|
1859
1899
|
}
|
|
1860
1900
|
return !1;
|
|
1861
1901
|
}
|
|
1862
|
-
function
|
|
1863
|
-
return n.problemType !== void 0 && n.problemType.endsWith(
|
|
1864
|
-
}
|
|
1865
|
-
function
|
|
1866
|
-
const h = K(null), [
|
|
1867
|
-
|
|
1868
|
-
}), x = m === void 0 ? null : { distance: y, refreshing:
|
|
1869
|
-
return /* @__PURE__ */
|
|
1870
|
-
|
|
1871
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label":
|
|
1872
|
-
/* @__PURE__ */ e("div", { className: "cms-screen__search", children:
|
|
1873
|
-
] }) : /* @__PURE__ */
|
|
1874
|
-
/* @__PURE__ */ e("div", { className: "cms-screen__leading", children: l !== void 0 ? l.href !== void 0 ? /* @__PURE__ */
|
|
1902
|
+
function il(n) {
|
|
1903
|
+
return n.problemType !== void 0 && n.problemType.endsWith(Mn) ? !0 : n.minimumVersion !== void 0 && Cn(n.version, n.minimumVersion);
|
|
1904
|
+
}
|
|
1905
|
+
function ol({ title: n, back: l, navigation: t, search: u, searching: d, globals: a, filters: r, primary: s, onRefresh: m, pullText: b, children: c }) {
|
|
1906
|
+
const h = K(null), [i, f] = A(!1), [p, g] = A(null), y = _n(h, m === void 0 ? null : () => {
|
|
1907
|
+
i || (f(!0), m().finally(() => f(!1)));
|
|
1908
|
+
}), x = m === void 0 ? null : { distance: y, refreshing: i, text: b ?? null };
|
|
1909
|
+
return /* @__PURE__ */ o("div", { className: E("cms-screen", s !== void 0 && "cms-screen--with-primary"), children: [
|
|
1910
|
+
d !== void 0 ? /* @__PURE__ */ o("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
|
|
1911
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": d.closeLabel, title: d.closeLabel, onClick: d.onClose, children: /* @__PURE__ */ e(T, { name: "chevron-left" }) }),
|
|
1912
|
+
/* @__PURE__ */ e("div", { className: "cms-screen__search", children: d.field })
|
|
1913
|
+
] }) : /* @__PURE__ */ o("header", { className: "cms-screen__bar", children: [
|
|
1914
|
+
/* @__PURE__ */ e("div", { className: "cms-screen__leading", children: l !== void 0 ? l.href !== void 0 ? /* @__PURE__ */ o("a", { className: "cms-screen__back", href: l.href, onClick: l.onBack, children: [
|
|
1875
1915
|
/* @__PURE__ */ e(T, { name: "chevron-left" }),
|
|
1876
1916
|
/* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: l.label })
|
|
1877
|
-
] }) : /* @__PURE__ */
|
|
1917
|
+
] }) : /* @__PURE__ */ o("button", { type: "button", className: "cms-screen__back", onClick: l.onBack, children: [
|
|
1878
1918
|
/* @__PURE__ */ e(T, { name: "chevron-left" }),
|
|
1879
1919
|
/* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: l.label })
|
|
1880
1920
|
] }) : t }),
|
|
1881
1921
|
/* @__PURE__ */ e("h1", { className: "cms-screen__title", title: n, children: n }),
|
|
1882
|
-
/* @__PURE__ */
|
|
1883
|
-
|
|
1922
|
+
/* @__PURE__ */ o("div", { className: "cms-screen__trailing", children: [
|
|
1923
|
+
u !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": u.label, title: u.label, onClick: u.onOpen, children: /* @__PURE__ */ e(T, { name: "search" }) }) : null,
|
|
1884
1924
|
a
|
|
1885
1925
|
] })
|
|
1886
1926
|
] }),
|
|
1887
|
-
r !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-screen__filters", children: /* @__PURE__ */ e(
|
|
1888
|
-
/* @__PURE__ */ e("div", { ref: h, className: "cms-screen__content", "data-pulling": y > 0 ? "" : void 0, "data-refreshing":
|
|
1927
|
+
r !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-screen__filters", children: /* @__PURE__ */ e(mn, { label: r.label, options: r.options, value: r.selected, onChange: r.onSelect }) }) : null,
|
|
1928
|
+
/* @__PURE__ */ e("div", { ref: h, className: "cms-screen__content", "data-pulling": y > 0 ? "" : void 0, "data-refreshing": i ? "" : void 0, children: /* @__PURE__ */ e(Be.Provider, { value: x, children: c }) }),
|
|
1889
1929
|
s !== void 0 ? /* @__PURE__ */ e(
|
|
1890
1930
|
"button",
|
|
1891
1931
|
{
|
|
@@ -1894,81 +1934,82 @@ function rl({ title: n, back: l, navigation: t, search: d, searching: o, globals
|
|
|
1894
1934
|
"aria-label": s.label,
|
|
1895
1935
|
title: s.label,
|
|
1896
1936
|
..."menu" in s ? { "aria-haspopup": "menu", "aria-expanded": p !== null } : {},
|
|
1897
|
-
onClick: (
|
|
1937
|
+
onClick: (S) => {
|
|
1898
1938
|
if ("menu" in s) {
|
|
1899
|
-
const
|
|
1900
|
-
g(p === null ? { x:
|
|
1939
|
+
const M = S.currentTarget.getBoundingClientRect();
|
|
1940
|
+
g(p === null ? { x: M.left, y: M.top } : null);
|
|
1901
1941
|
} else
|
|
1902
1942
|
s.onPress();
|
|
1903
1943
|
},
|
|
1904
1944
|
children: /* @__PURE__ */ e(T, { name: s.icon, size: 24 })
|
|
1905
1945
|
}
|
|
1906
1946
|
) : null,
|
|
1907
|
-
s !== void 0 && "menu" in s ? /* @__PURE__ */ e(
|
|
1947
|
+
s !== void 0 && "menu" in s ? /* @__PURE__ */ e(Fe, { at: p, items: s.menu, onClose: () => g(null), label: s.label }) : null
|
|
1908
1948
|
] });
|
|
1909
1949
|
}
|
|
1910
1950
|
export {
|
|
1911
|
-
|
|
1951
|
+
zn as AppShell,
|
|
1912
1952
|
ve as Avatar,
|
|
1913
1953
|
Ee as BOOTSTRAP_ICONS,
|
|
1914
|
-
|
|
1954
|
+
un as Badge,
|
|
1915
1955
|
ne as Button,
|
|
1916
1956
|
Ae as CALL_LABELS,
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1957
|
+
Mn as CLIENT_UPDATE_REQUIRED,
|
|
1958
|
+
Gn as CallBar,
|
|
1959
|
+
Xn as CallPanel,
|
|
1960
|
+
jn as ChatBubble,
|
|
1961
|
+
qn as Composer,
|
|
1962
|
+
Pn as ConfirmDialog,
|
|
1963
|
+
Fe as ContextMenu,
|
|
1964
|
+
qe as EmptyState,
|
|
1965
|
+
Ye as ErrorBanner,
|
|
1966
|
+
On as FilePicker,
|
|
1967
|
+
sn as FilePickerDenied,
|
|
1968
|
+
Hn as FileViewer,
|
|
1969
|
+
mn as FilterChips,
|
|
1970
|
+
Fn as ICON_NAMES,
|
|
1931
1971
|
T as Icon,
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1972
|
+
Yn as IncomingCall,
|
|
1973
|
+
el as List,
|
|
1974
|
+
je as Loading,
|
|
1975
|
+
pn as MAIL_ROW_LABELS,
|
|
1976
|
+
We as MODAL_CLOSE_MS,
|
|
1977
|
+
Wn as MailRow,
|
|
1978
|
+
Pe as Modal,
|
|
1979
|
+
Kn as NamedIcon,
|
|
1980
|
+
ll as Notification,
|
|
1940
1981
|
we as PULL_AT,
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1982
|
+
Un as PageHeader,
|
|
1983
|
+
nl as PaneToolbar,
|
|
1984
|
+
bn as SIGN_IN_LABELS,
|
|
1944
1985
|
ye as STATE_DELAY_MS,
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1986
|
+
ol as ScreenShell,
|
|
1987
|
+
Zn as SearchField,
|
|
1988
|
+
Ln as Select,
|
|
1989
|
+
Qn as SignInForm,
|
|
1990
|
+
Jn as SignInLayout,
|
|
1991
|
+
Vn as SplitPanes,
|
|
1951
1992
|
ee as State,
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1993
|
+
Rn as TabStrip,
|
|
1994
|
+
Tn as TextArea,
|
|
1995
|
+
Dn as TextField,
|
|
1996
|
+
In as Toast,
|
|
1997
|
+
Bn as ToastRegion,
|
|
1998
|
+
$n as Toggle,
|
|
1999
|
+
hn as fitPanes,
|
|
2000
|
+
re as iconForName,
|
|
2001
|
+
on as initialsOf,
|
|
2002
|
+
wn as isCapability,
|
|
2003
|
+
il as needsClientUpdate,
|
|
2004
|
+
tl as offerFor,
|
|
2005
|
+
cl as readConflict,
|
|
2006
|
+
al as readRefusal,
|
|
2007
|
+
xn as refusalText,
|
|
2008
|
+
sl as rereadAll,
|
|
2009
|
+
dn as tintOf,
|
|
2010
|
+
_n as usePull,
|
|
2011
|
+
vn as usePullState,
|
|
2012
|
+
rl as useReread,
|
|
2013
|
+
Cn as versionBelow,
|
|
2014
|
+
Ze as writtenOut
|
|
1974
2015
|
};
|