@coolms/ui-react 0.1.0-alpha.33 → 0.1.0-alpha.34
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 +7 -0
- package/dist/components/Structure.d.ts +3 -1
- package/dist/index.js +208 -208
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@coolms/ui-react` are listed here. Versions follow [semantic versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 0.1.0-alpha.34 (2026-11-27)
|
|
6
|
+
|
|
7
|
+
An avatar with no letter to show says "?", and its tint can come from a stable id.
|
|
8
|
+
|
|
9
|
+
- `Avatar` shows "?" when its name gives no letter (no name, a blank one, or one of signs only), never a letter of an identifier passed for a name. With no name, or a blank one, its accessible name is "?" too, with the presence or connection after it as before. (#132)
|
|
10
|
+
- `Avatar` has `tintSeed`: what its tint is chosen from, an id that stays the same (a user's, a conversation's). Left out, the name, as before. (#132)
|
|
11
|
+
|
|
5
12
|
## 0.1.0-alpha.33 (2026-11-25)
|
|
6
13
|
|
|
7
14
|
A list's filter is one menu button, the second row's label one step under the section's title, and design tokens v0.32.0.
|
|
@@ -52,6 +52,8 @@ export interface AvatarProps {
|
|
|
52
52
|
/** Their account is gone: a neutral person icon, never initials of the name stored for them. */
|
|
53
53
|
readonly deleted?: boolean;
|
|
54
54
|
readonly size?: number;
|
|
55
|
+
/** What the tint is chosen from: an id that stays the same (a user's, a conversation's). The name when left out. */
|
|
56
|
+
readonly tintSeed?: string;
|
|
55
57
|
}
|
|
56
58
|
export type AvatarPresence = 'online' | 'away' | 'busy' | 'offline';
|
|
57
59
|
export type AvatarConnection = 'connected' | 'reconnecting' | 'offline';
|
|
@@ -63,4 +65,4 @@ export declare function initialsOf(name: string): string;
|
|
|
63
65
|
/** Which of the six avatar tints a name takes: the same name always the same tint. */
|
|
64
66
|
export declare function tintOf(name: string): number;
|
|
65
67
|
/** A person or an account, by picture or initials (contract component `avatar`: picture, initials, presence). */
|
|
66
|
-
export declare function Avatar({ name, pictureUrl, presence, connection, deleted, size }: AvatarProps): ReactNode;
|
|
68
|
+
export declare function Avatar({ name, pictureUrl, presence, connection, deleted, size, tintSeed }: AvatarProps): ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -38,14 +38,14 @@ function he({
|
|
|
38
38
|
locked: r = !1,
|
|
39
39
|
lockedReason: c,
|
|
40
40
|
icon: s,
|
|
41
|
-
disabled:
|
|
41
|
+
disabled: m,
|
|
42
42
|
className: a,
|
|
43
|
-
children:
|
|
43
|
+
children: u,
|
|
44
44
|
type: v = "button",
|
|
45
45
|
title: o,
|
|
46
46
|
...p
|
|
47
47
|
}) {
|
|
48
|
-
const h = !!
|
|
48
|
+
const h = !!m || l;
|
|
49
49
|
return /* @__PURE__ */ i(
|
|
50
50
|
"button",
|
|
51
51
|
{
|
|
@@ -57,7 +57,7 @@ function he({
|
|
|
57
57
|
title: r ? c ?? o : o,
|
|
58
58
|
children: [
|
|
59
59
|
l ? /* @__PURE__ */ e(G, { name: "spinner" }) : r ? /* @__PURE__ */ e(G, { name: "lock" }) : s,
|
|
60
|
-
/* @__PURE__ */ e("span", { className: "cms-button__label", children: l && t !== void 0 ? t :
|
|
60
|
+
/* @__PURE__ */ e("span", { className: "cms-button__label", children: l && t !== void 0 ? t : u }),
|
|
61
61
|
r && c ? /* @__PURE__ */ i("span", { className: "cms-visually-hidden", children: [
|
|
62
62
|
", ",
|
|
63
63
|
c
|
|
@@ -85,26 +85,26 @@ function Be(n, l) {
|
|
|
85
85
|
}
|
|
86
86
|
const rn = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, cn = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
|
|
87
87
|
function on(n, l, t) {
|
|
88
|
-
const r = (s,
|
|
89
|
-
const p = new Date(Date.UTC(s,
|
|
90
|
-
return p.setUTCFullYear(s), p.getUTCFullYear() === s && p.getUTCMonth() ===
|
|
88
|
+
const r = (s, m, a, u = 0, v = 0, o = 0) => {
|
|
89
|
+
const p = new Date(Date.UTC(s, m - 1, a, u, v, o));
|
|
90
|
+
return p.setUTCFullYear(s), p.getUTCFullYear() === s && p.getUTCMonth() === m - 1 && p.getUTCDate() === a && p.getUTCHours() === u && p.getUTCMinutes() === v && p.getUTCSeconds() === o ? p : null;
|
|
91
91
|
}, c = (s) => ({ hour: Number(s[1]), minute: Number(s[2]), second: Number(s[3] ?? 0) });
|
|
92
92
|
try {
|
|
93
93
|
if (n === "time") {
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
const a = c(
|
|
97
|
-
return
|
|
94
|
+
const m = l.match(cn);
|
|
95
|
+
if (m === null) return l;
|
|
96
|
+
const a = c(m), u = r(2e3, 1, 1, a.hour, a.minute, a.second);
|
|
97
|
+
return u === null ? l : new Intl.DateTimeFormat(t, { timeStyle: m[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(u);
|
|
98
98
|
}
|
|
99
99
|
const s = l.match(rn);
|
|
100
100
|
if (s === null) return l;
|
|
101
101
|
if (n === "date" && s[4] === void 0) {
|
|
102
|
-
const
|
|
103
|
-
return
|
|
102
|
+
const m = r(Number(s[1]), Number(s[2]), Number(s[3]));
|
|
103
|
+
return m === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeZone: "UTC" }).format(m);
|
|
104
104
|
}
|
|
105
105
|
if (n === "datetime-local" && s[4] !== void 0) {
|
|
106
|
-
const
|
|
107
|
-
return
|
|
106
|
+
const m = r(Number(s[1]), Number(s[2]), Number(s[3]), Number(s[4]), Number(s[5]), Number(s[6] ?? 0));
|
|
107
|
+
return m === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeStyle: s[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
|
|
108
108
|
}
|
|
109
109
|
} catch {
|
|
110
110
|
return l;
|
|
@@ -112,7 +112,7 @@ function on(n, l, t) {
|
|
|
112
112
|
return l;
|
|
113
113
|
}
|
|
114
114
|
const dn = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
|
|
115
|
-
function il({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s, value:
|
|
115
|
+
function il({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s, value: m, onChange: a, placeholder: u, type: v = "text", name: o, locale: p, min: h, max: f, step: d, minLength: g, maxLength: k, required: x }) {
|
|
116
116
|
const C = se(), w = c === !0 || s != null, b = w && dn.has(v), y = v === "number" && (d === "any" || typeof d == "number" && !Number.isInteger(d));
|
|
117
117
|
return /* @__PURE__ */ e(Fe, { id: C, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
|
|
118
118
|
"input",
|
|
@@ -121,10 +121,10 @@ function il({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s,
|
|
|
121
121
|
name: o,
|
|
122
122
|
type: b ? "text" : v,
|
|
123
123
|
className: "cms-input",
|
|
124
|
-
value: b ? on(v,
|
|
125
|
-
...b ? { "data-value":
|
|
124
|
+
value: b ? on(v, m, p) : m,
|
|
125
|
+
...b ? { "data-value": m } : {},
|
|
126
126
|
lang: p,
|
|
127
|
-
placeholder:
|
|
127
|
+
placeholder: u,
|
|
128
128
|
disabled: r,
|
|
129
129
|
readOnly: w,
|
|
130
130
|
required: x,
|
|
@@ -141,7 +141,7 @@ function il({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s,
|
|
|
141
141
|
}
|
|
142
142
|
) });
|
|
143
143
|
}
|
|
144
|
-
function ol({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s, value:
|
|
144
|
+
function ol({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s, value: m, onChange: a, placeholder: u, rows: v = 4, name: o, locale: p, minLength: h, maxLength: f, required: d }) {
|
|
145
145
|
const g = se();
|
|
146
146
|
return /* @__PURE__ */ e(Fe, { id: g, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
|
|
147
147
|
"textarea",
|
|
@@ -150,9 +150,9 @@ function ol({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s,
|
|
|
150
150
|
name: o,
|
|
151
151
|
className: "cms-input cms-textarea",
|
|
152
152
|
rows: v,
|
|
153
|
-
value:
|
|
153
|
+
value: m,
|
|
154
154
|
lang: p,
|
|
155
|
-
placeholder:
|
|
155
|
+
placeholder: u,
|
|
156
156
|
disabled: r,
|
|
157
157
|
readOnly: c === !0 || s != null,
|
|
158
158
|
required: d,
|
|
@@ -165,9 +165,9 @@ function ol({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s,
|
|
|
165
165
|
}
|
|
166
166
|
) });
|
|
167
167
|
}
|
|
168
|
-
function dl({ label: n, help: l, error: t, disabled: r, readOnly: c, value: s, options:
|
|
169
|
-
const o = se(), p =
|
|
170
|
-
return /* @__PURE__ */ e(Fe, { id: o, label: n, help: p ?
|
|
168
|
+
function dl({ label: n, help: l, error: t, disabled: r, readOnly: c, value: s, options: m, onChange: a, emptyText: u = "Nothing to choose from yet.", name: v }) {
|
|
169
|
+
const o = se(), p = m.length === 0;
|
|
170
|
+
return /* @__PURE__ */ e(Fe, { id: o, label: n, help: p ? u : l, error: t, children: /* @__PURE__ */ e(
|
|
171
171
|
"select",
|
|
172
172
|
{
|
|
173
173
|
id: o,
|
|
@@ -177,27 +177,27 @@ function dl({ label: n, help: l, error: t, disabled: r, readOnly: c, value: s, o
|
|
|
177
177
|
disabled: r || p,
|
|
178
178
|
"aria-readonly": c || void 0,
|
|
179
179
|
"aria-invalid": t != null || void 0,
|
|
180
|
-
"aria-describedby": Be(o, { help: p ?
|
|
180
|
+
"aria-describedby": Be(o, { help: p ? u : l, error: t }),
|
|
181
181
|
onChange: (h) => {
|
|
182
182
|
c || a == null || a(h.target.value);
|
|
183
183
|
},
|
|
184
|
-
children:
|
|
184
|
+
children: m.map((h) => /* @__PURE__ */ e("option", { value: h.value, disabled: c && h.value !== s, children: h.label }, h.value))
|
|
185
185
|
}
|
|
186
186
|
) });
|
|
187
187
|
}
|
|
188
188
|
function ul({ label: n, checked: l, onChange: t, disabled: r, readOnly: c, help: s }) {
|
|
189
|
-
const
|
|
189
|
+
const m = se();
|
|
190
190
|
return /* @__PURE__ */ i("div", { className: "cms-toggle-row", children: [
|
|
191
191
|
/* @__PURE__ */ e(
|
|
192
192
|
"button",
|
|
193
193
|
{
|
|
194
|
-
id:
|
|
194
|
+
id: m,
|
|
195
195
|
type: "button",
|
|
196
196
|
role: "switch",
|
|
197
197
|
className: F("cms-toggle", l && "is-on"),
|
|
198
198
|
"aria-checked": l,
|
|
199
199
|
"aria-readonly": c || void 0,
|
|
200
|
-
"aria-describedby": s != null ? `${
|
|
200
|
+
"aria-describedby": s != null ? `${m}-help` : void 0,
|
|
201
201
|
disabled: r,
|
|
202
202
|
onClick: () => {
|
|
203
203
|
c || t == null || t(!l);
|
|
@@ -205,12 +205,12 @@ function ul({ label: n, checked: l, onChange: t, disabled: r, readOnly: c, help:
|
|
|
205
205
|
children: /* @__PURE__ */ e("span", { className: "cms-toggle__thumb" })
|
|
206
206
|
}
|
|
207
207
|
),
|
|
208
|
-
/* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor:
|
|
209
|
-
s != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${
|
|
208
|
+
/* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: m, children: n }),
|
|
209
|
+
s != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${m}-help`, children: s }) : null
|
|
210
210
|
] });
|
|
211
211
|
}
|
|
212
212
|
const un = 150;
|
|
213
|
-
function je({ open: n, title: l, onClose: t, dirty: r = !1, onDirtyClose: c, children: s, footer:
|
|
213
|
+
function je({ open: n, title: l, onClose: t, dirty: r = !1, onDirtyClose: c, children: s, footer: m, closeLabel: a = "Close", initialFocus: u, className: v }) {
|
|
214
214
|
const [o, p] = T(n), [h, f] = T(!1), d = H(null), g = H(null), k = se();
|
|
215
215
|
if (Q(() => {
|
|
216
216
|
if (n) {
|
|
@@ -228,9 +228,9 @@ function je({ open: n, title: l, onClose: t, dirty: r = !1, onDirtyClose: c, chi
|
|
|
228
228
|
var C, w;
|
|
229
229
|
if (n && o) {
|
|
230
230
|
const b = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
|
|
231
|
-
(w = (
|
|
231
|
+
(w = (u == null ? void 0 : u.current) ?? ((C = d.current) == null ? void 0 : C.querySelector(`.cms-modal__body :is(${b}), .cms-modal__foot :is(${b})`)) ?? d.current) == null || w.focus();
|
|
232
232
|
}
|
|
233
|
-
}, [n, o,
|
|
233
|
+
}, [n, o, u]), !o) return null;
|
|
234
234
|
const x = () => {
|
|
235
235
|
r ? c == null || c() : t();
|
|
236
236
|
};
|
|
@@ -263,24 +263,24 @@ function je({ open: n, title: l, onClose: t, dirty: r = !1, onDirtyClose: c, chi
|
|
|
263
263
|
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a, onClick: x, children: /* @__PURE__ */ e(G, { name: "close" }) })
|
|
264
264
|
] }),
|
|
265
265
|
/* @__PURE__ */ e("div", { className: "cms-modal__body", children: s }),
|
|
266
|
-
|
|
266
|
+
m != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: m }) : null
|
|
267
267
|
]
|
|
268
268
|
}
|
|
269
269
|
) }),
|
|
270
270
|
document.body
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
|
-
function ml({ open: n, title: l, message: t, kind: r = "default", confirmLabel: c, cancelLabel: s, closeLabel:
|
|
273
|
+
function ml({ open: n, title: l, message: t, kind: r = "default", confirmLabel: c, cancelLabel: s, closeLabel: m, onConfirm: a, onCancel: u }) {
|
|
274
274
|
const v = r === "discard-changes";
|
|
275
275
|
return /* @__PURE__ */ e(
|
|
276
276
|
je,
|
|
277
277
|
{
|
|
278
278
|
open: n,
|
|
279
279
|
title: l,
|
|
280
|
-
onClose:
|
|
281
|
-
...
|
|
280
|
+
onClose: u,
|
|
281
|
+
...m === void 0 ? {} : { closeLabel: m },
|
|
282
282
|
footer: /* @__PURE__ */ i(A, { children: [
|
|
283
|
-
/* @__PURE__ */ e(he, { onClick:
|
|
283
|
+
/* @__PURE__ */ e(he, { onClick: u, children: s ?? (v ? "Keep editing" : "Cancel") }),
|
|
284
284
|
/* @__PURE__ */ e(he, { variant: r === "default" ? "primary" : "danger", onClick: a, children: c ?? (v ? "Discard changes" : "Confirm") })
|
|
285
285
|
] }),
|
|
286
286
|
children: r !== "default" ? /* @__PURE__ */ i("p", { className: "cms-confirm__warning", children: [
|
|
@@ -580,19 +580,19 @@ function vn() {
|
|
|
580
580
|
] });
|
|
581
581
|
}
|
|
582
582
|
function me({ kind: n, title: l, description: t, action: r, placement: c = "block", icon: s }) {
|
|
583
|
-
const [
|
|
583
|
+
const [m, a] = T(n !== "loading");
|
|
584
584
|
return Q(() => {
|
|
585
585
|
if (n !== "loading") {
|
|
586
586
|
a(!0);
|
|
587
587
|
return;
|
|
588
588
|
}
|
|
589
589
|
a(!1);
|
|
590
|
-
const
|
|
591
|
-
return () => window.clearTimeout(
|
|
590
|
+
const u = window.setTimeout(() => a(!0), bn());
|
|
591
|
+
return () => window.clearTimeout(u);
|
|
592
592
|
}, [n]), /* @__PURE__ */ i(
|
|
593
593
|
"div",
|
|
594
594
|
{
|
|
595
|
-
className: F("cms-state", `cms-state--${n}`, `cms-state--${c}`, !
|
|
595
|
+
className: F("cms-state", `cms-state--${n}`, `cms-state--${c}`, !m && "is-waiting"),
|
|
596
596
|
role: "status",
|
|
597
597
|
"aria-live": "polite",
|
|
598
598
|
"data-kind": n,
|
|
@@ -620,7 +620,7 @@ function kn(n) {
|
|
|
620
620
|
return n.getClientRects().length > 0;
|
|
621
621
|
}
|
|
622
622
|
function _l(n) {
|
|
623
|
-
const { name: l, badge: t, closeLabel: r, onClose: c, actions: s = [], moreLabel:
|
|
623
|
+
const { name: l, badge: t, closeLabel: r, onClose: c, actions: s = [], moreLabel: m = "More", edit: a, editing: u, state: v, siblings: o, bar: p, thumbnails: h, strip: f, onZoom: d, children: g } = n, k = H(null), x = H(null), C = se(), [w, b] = T(!1), y = H(null);
|
|
624
624
|
Q(() => {
|
|
625
625
|
var z;
|
|
626
626
|
const M = document.activeElement, R = document.body.style.overflow;
|
|
@@ -630,10 +630,10 @@ function _l(n) {
|
|
|
630
630
|
};
|
|
631
631
|
}, []);
|
|
632
632
|
const D = () => {
|
|
633
|
-
|
|
633
|
+
u != null && u.dirty ? u.onDirtyClose() : c();
|
|
634
634
|
}, Z = (M) => {
|
|
635
635
|
const R = M.touches.length === 1 ? M.touches[0] : void 0;
|
|
636
|
-
y.current = R === void 0 ||
|
|
636
|
+
y.current = R === void 0 || u !== void 0 || yn(M.target) ? null : { x: R.clientX, y: R.clientY };
|
|
637
637
|
}, V = (M) => {
|
|
638
638
|
var U, j;
|
|
639
639
|
const R = y.current, z = M.changedTouches[0];
|
|
@@ -646,7 +646,7 @@ function _l(n) {
|
|
|
646
646
|
"div",
|
|
647
647
|
{
|
|
648
648
|
ref: k,
|
|
649
|
-
className: F("cms-viewer",
|
|
649
|
+
className: F("cms-viewer", u !== void 0 && "is-editing"),
|
|
650
650
|
role: "dialog",
|
|
651
651
|
"aria-modal": "true",
|
|
652
652
|
"aria-labelledby": C,
|
|
@@ -654,14 +654,14 @@ function _l(n) {
|
|
|
654
654
|
onKeyDown: (M) => {
|
|
655
655
|
var R, z, q;
|
|
656
656
|
if (M.key === "Escape") {
|
|
657
|
-
if (
|
|
657
|
+
if (u !== void 0) return;
|
|
658
658
|
M.stopPropagation(), w ? b(!1) : c();
|
|
659
659
|
} else if (M.key === "Tab") {
|
|
660
660
|
const U = Array.from(((R = k.current) == null ? void 0 : R.querySelectorAll(gn)) ?? []).filter(kn);
|
|
661
661
|
if (U.length === 0) return;
|
|
662
662
|
const j = U[0], le = U[U.length - 1];
|
|
663
663
|
M.shiftKey && document.activeElement === j ? (M.preventDefault(), le.focus()) : !M.shiftKey && document.activeElement === le && (M.preventDefault(), j.focus());
|
|
664
|
-
} else
|
|
664
|
+
} else u === void 0 && !wn(M.target) && !M.ctrlKey && !M.metaKey && !M.altKey && (M.key === "ArrowLeft" ? (z = o == null ? void 0 : o.onPrevious) == null || z.call(o) : M.key === "ArrowRight" ? (q = o == null ? void 0 : o.onNext) == null || q.call(o) : M.key === "+" || M.key === "=" ? d == null || d("in") : M.key === "-" ? d == null || d("out") : M.key === "0" && (d == null || d("reset")));
|
|
665
665
|
},
|
|
666
666
|
children: [
|
|
667
667
|
o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${l}, ${o.position}` }) : null,
|
|
@@ -671,9 +671,9 @@ function _l(n) {
|
|
|
671
671
|
/* @__PURE__ */ e("h2", { className: "cms-viewer__name", id: C, title: l, children: l }),
|
|
672
672
|
o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: o.position }) : null,
|
|
673
673
|
/* @__PURE__ */ e("span", { className: "cms-viewer__space" }),
|
|
674
|
-
|
|
675
|
-
/* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children:
|
|
676
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick:
|
|
674
|
+
u !== void 0 ? /* @__PURE__ */ i(A, { children: [
|
|
675
|
+
/* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: u.status }),
|
|
676
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: u.onDone, children: u.doneLabel })
|
|
677
677
|
] }) : /* @__PURE__ */ i(A, { children: [
|
|
678
678
|
/* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: s.map((M) => /* @__PURE__ */ i("button", { type: "button", className: "cms-viewer__button", onClick: M.onSelect, children: [
|
|
679
679
|
M.icon,
|
|
@@ -684,7 +684,7 @@ function _l(n) {
|
|
|
684
684
|
/* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: a.label })
|
|
685
685
|
] }) : null,
|
|
686
686
|
s.length > 0 ? /* @__PURE__ */ i("span", { className: "cms-viewer__more", children: [
|
|
687
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label":
|
|
687
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": m, "aria-expanded": w, onClick: () => b((M) => !M), children: /* @__PURE__ */ e(L, { name: "more" }) }),
|
|
688
688
|
w ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: s.map((M) => /* @__PURE__ */ i(
|
|
689
689
|
"button",
|
|
690
690
|
{
|
|
@@ -704,20 +704,20 @@ function _l(n) {
|
|
|
704
704
|
] })
|
|
705
705
|
] }),
|
|
706
706
|
/* @__PURE__ */ i("div", { className: "cms-viewer__body", children: [
|
|
707
|
-
h != null &&
|
|
707
|
+
h != null && u === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: h }) : null,
|
|
708
708
|
/* @__PURE__ */ i("div", { className: "cms-viewer__content", onTouchStart: Z, onTouchEnd: V, children: [
|
|
709
|
-
(
|
|
710
|
-
/* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children:
|
|
711
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick:
|
|
712
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick:
|
|
709
|
+
(u == null ? void 0 : u.conflict) !== void 0 ? /* @__PURE__ */ i("div", { className: "cms-viewer__conflict", role: "alert", children: [
|
|
710
|
+
/* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: u.conflict.message }),
|
|
711
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: u.conflict.onOverwrite, children: u.conflict.overwriteLabel }),
|
|
712
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: u.conflict.onKeepBoth, children: u.conflict.keepBothLabel })
|
|
713
713
|
] }) : null,
|
|
714
714
|
v === void 0 ? g : /* @__PURE__ */ e(xn, { state: v }),
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
715
|
+
u === void 0 && (o != null && o.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": o.previousLabel, title: o.previousLabel, onClick: o.onPrevious, children: /* @__PURE__ */ e(G, { name: "back" }) }) : null,
|
|
716
|
+
u === void 0 && (o != null && o.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": o.nextLabel, title: o.nextLabel, onClick: o.onNext, children: /* @__PURE__ */ e(G, { name: "back" }) }) : null,
|
|
717
|
+
u === void 0 && o !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(o.total, 7) }, (M, R) => /* @__PURE__ */ e("i", { className: R === Math.min(o.index, 6) ? "is-current" : void 0 }, R)) }) : null
|
|
718
718
|
] })
|
|
719
719
|
] }),
|
|
720
|
-
|
|
720
|
+
u === void 0 && f != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: f }) : null,
|
|
721
721
|
p != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: p }) : null
|
|
722
722
|
]
|
|
723
723
|
}
|
|
@@ -767,7 +767,7 @@ const Ae = (n, l) => `${n}
|
|
|
767
767
|
${l}`, Sn = (n, l) => n === "" ? l : `${n}/${l}`, En = 48;
|
|
768
768
|
function bl(n) {
|
|
769
769
|
var I, X;
|
|
770
|
-
const { open: l, spaces: t, list: r, disabledReason: c, budget: s, formatSize:
|
|
770
|
+
const { open: l, spaces: t, list: r, disabledReason: c, budget: s, formatSize: m, labels: a, onConfirm: u, onCancel: v } = n, [o, p] = T(((I = t[0]) == null ? void 0 : I.id) ?? ""), [h, f] = T(""), [d, g] = T({ status: "loading" }), [k, x] = T(0), [C, w] = T(/* @__PURE__ */ new Map()), [b, y] = T(0), [D, Z] = T(!1), V = H(null), M = H(!1);
|
|
771
771
|
Q(() => {
|
|
772
772
|
M.current = !1;
|
|
773
773
|
}, [l, o, h]);
|
|
@@ -839,12 +839,12 @@ function bl(n) {
|
|
|
839
839
|
className: "cms-file-picker",
|
|
840
840
|
footer: /* @__PURE__ */ i("div", { className: "cms-file-picker__foot", children: [
|
|
841
841
|
/* @__PURE__ */ i("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
|
|
842
|
-
U.length > 0 ? /* @__PURE__ */ e("span", { children: a.total(U.length,
|
|
843
|
-
s !== void 0 && le !== null ? /* @__PURE__ */ e("span", { className: F(ae && "is-over"), children: ae ? a.overBudget : a.left(
|
|
842
|
+
U.length > 0 ? /* @__PURE__ */ e("span", { children: a.total(U.length, m(j)) }) : null,
|
|
843
|
+
s !== void 0 && le !== null ? /* @__PURE__ */ e("span", { className: F(ae && "is-over"), children: ae ? a.overBudget : a.left(m(Math.max(0, le)), m(s.limitBytes)) }) : null
|
|
844
844
|
] }),
|
|
845
845
|
/* @__PURE__ */ i("div", { className: "cms-file-picker__actions", children: [
|
|
846
846
|
/* @__PURE__ */ e(he, { variant: "secondary", onClick: v, children: a.cancel }),
|
|
847
|
-
/* @__PURE__ */ e(he, { variant: "primary", disabled: U.length === 0 || ae, onClick: () =>
|
|
847
|
+
/* @__PURE__ */ e(he, { variant: "primary", disabled: U.length === 0 || ae, onClick: () => u(U), children: a.confirm(U.length) })
|
|
848
848
|
] })
|
|
849
849
|
] }),
|
|
850
850
|
children: [
|
|
@@ -919,7 +919,7 @@ function bl(n) {
|
|
|
919
919
|
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: N.name }),
|
|
920
920
|
Y !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: Y }) : null
|
|
921
921
|
] }),
|
|
922
|
-
N.kind === "file" && N.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children:
|
|
922
|
+
N.kind === "file" && N.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: m(N.size) }) : null
|
|
923
923
|
]
|
|
924
924
|
},
|
|
925
925
|
N.id
|
|
@@ -947,23 +947,23 @@ function Tn(n, l) {
|
|
|
947
947
|
return c.current = l, Q(() => {
|
|
948
948
|
const s = n.current;
|
|
949
949
|
if (s === null) return;
|
|
950
|
-
let
|
|
951
|
-
const
|
|
952
|
-
|
|
950
|
+
let m = null, a = 0;
|
|
951
|
+
const u = (p) => {
|
|
952
|
+
m = An(p.target, s) && p.touches.length === 1 ? p.touches[0].clientY : null, a = 0;
|
|
953
953
|
}, v = (p) => {
|
|
954
|
-
if (
|
|
955
|
-
const h = p.touches[0].clientY -
|
|
954
|
+
if (m === null || c.current === null) return;
|
|
955
|
+
const h = p.touches[0].clientY - m;
|
|
956
956
|
if (h <= 0) {
|
|
957
|
-
|
|
957
|
+
m = null, r(0);
|
|
958
958
|
return;
|
|
959
959
|
}
|
|
960
960
|
p.cancelable && p.preventDefault(), a = Math.min(h * 0.6, De * 1.5), r(a);
|
|
961
961
|
}, o = () => {
|
|
962
962
|
var p;
|
|
963
|
-
|
|
963
|
+
m !== null && a >= De && ((p = c.current) == null || p.call(c)), m = null, a = 0, r(0);
|
|
964
964
|
};
|
|
965
|
-
return s.addEventListener("touchstart",
|
|
966
|
-
s.removeEventListener("touchstart",
|
|
965
|
+
return s.addEventListener("touchstart", u, { passive: !0 }), s.addEventListener("touchmove", v, { passive: !1 }), s.addEventListener("touchend", o), s.addEventListener("touchcancel", o), () => {
|
|
966
|
+
s.removeEventListener("touchstart", u), s.removeEventListener("touchmove", v), s.removeEventListener("touchend", o), s.removeEventListener("touchcancel", o);
|
|
967
967
|
};
|
|
968
968
|
}, [n]), t;
|
|
969
969
|
}
|
|
@@ -971,17 +971,17 @@ const Ye = sn(null);
|
|
|
971
971
|
function Dn() {
|
|
972
972
|
return tn(Ye);
|
|
973
973
|
}
|
|
974
|
-
function vl({ label: n, rows: l, error: t, onRetry: r, loadingText: c = "Loading", emptyTitle: s = "Nothing here yet", emptyHint:
|
|
974
|
+
function vl({ label: n, rows: l, error: t, onRetry: r, loadingText: c = "Loading", emptyTitle: s = "Nothing here yet", emptyHint: m, selected: a, onOpen: u, onRowMenu: v }) {
|
|
975
975
|
const o = H([]), p = Dn();
|
|
976
976
|
if (t != null) return /* @__PURE__ */ e(fn, { message: t, onRetry: r });
|
|
977
977
|
if (l === null) return /* @__PURE__ */ e(mn, { what: c, layout: "block" });
|
|
978
|
-
if (l.length === 0) return /* @__PURE__ */ e(hn, { title: s, hint:
|
|
978
|
+
if (l.length === 0) return /* @__PURE__ */ e(hn, { title: s, hint: m });
|
|
979
979
|
const h = (f, d, g) => {
|
|
980
980
|
var k;
|
|
981
981
|
if (f.key === "ArrowDown" || f.key === "ArrowUp")
|
|
982
982
|
f.preventDefault(), (k = o.current[Math.min(l.length - 1, Math.max(0, d + (f.key === "ArrowDown" ? 1 : -1)))]) == null || k.focus();
|
|
983
983
|
else if (f.key === "Enter")
|
|
984
|
-
|
|
984
|
+
u == null || u(g);
|
|
985
985
|
else if ((f.key === "ContextMenu" || f.shiftKey && f.key === "F10") && v) {
|
|
986
986
|
f.preventDefault();
|
|
987
987
|
const x = f.currentTarget.getBoundingClientRect();
|
|
@@ -1005,7 +1005,7 @@ function vl({ label: n, rows: l, error: t, onRetry: r, loadingText: c = "Loading
|
|
|
1005
1005
|
"aria-selected": g,
|
|
1006
1006
|
tabIndex: g || a == null && d === 0 ? 0 : -1,
|
|
1007
1007
|
className: F("cms-list__row", g && "is-selected"),
|
|
1008
|
-
onClick: () =>
|
|
1008
|
+
onClick: () => u == null ? void 0 : u(f.id),
|
|
1009
1009
|
onKeyDown: (k) => h(k, d, f.id),
|
|
1010
1010
|
onContextMenu: v ? (k) => {
|
|
1011
1011
|
k.preventDefault(), v(f.id, { x: k.clientX, y: k.clientY });
|
|
@@ -1028,7 +1028,7 @@ function vl({ label: n, rows: l, error: t, onRetry: r, loadingText: c = "Loading
|
|
|
1028
1028
|
] });
|
|
1029
1029
|
}
|
|
1030
1030
|
function ge({ at: n, items: l, onClose: t, label: r = "Actions", focus: c = "current" }) {
|
|
1031
|
-
const s = H(null),
|
|
1031
|
+
const s = H(null), m = H(null), a = se(), [u, v] = T(n), o = l.filter((d) => d.offer.offered);
|
|
1032
1032
|
if (ve(() => {
|
|
1033
1033
|
if (!n) return;
|
|
1034
1034
|
const d = s.current, g = (d == null ? void 0 : d.offsetWidth) ?? 0, k = (d == null ? void 0 : d.offsetHeight) ?? 0;
|
|
@@ -1036,7 +1036,7 @@ function ge({ at: n, items: l, onClose: t, label: r = "Actions", focus: c = "cur
|
|
|
1036
1036
|
}, [n]), Q(() => {
|
|
1037
1037
|
var x, C;
|
|
1038
1038
|
if (!n) return;
|
|
1039
|
-
|
|
1039
|
+
m.current = document.activeElement;
|
|
1040
1040
|
const d = Array.from(((x = s.current) == null ? void 0 : x.querySelectorAll('[role^="menuitem"]:not([aria-disabled="true"])')) ?? []), g = c === "current" ? d.find((w) => w.getAttribute("aria-checked") === "true") : void 0;
|
|
1041
1041
|
(C = c === "last" ? d[d.length - 1] : g ?? d[0]) == null || C.focus();
|
|
1042
1042
|
const k = (w) => {
|
|
@@ -1045,7 +1045,7 @@ function ge({ at: n, items: l, onClose: t, label: r = "Actions", focus: c = "cur
|
|
|
1045
1045
|
};
|
|
1046
1046
|
return document.addEventListener("mousedown", k), () => {
|
|
1047
1047
|
var w, b;
|
|
1048
|
-
document.removeEventListener("mousedown", k), (b = (w =
|
|
1048
|
+
document.removeEventListener("mousedown", k), (b = (w = m.current) == null ? void 0 : w.focus) == null || b.call(w);
|
|
1049
1049
|
};
|
|
1050
1050
|
}, [n, t, c]), !n || o.length === 0) return null;
|
|
1051
1051
|
const p = (d) => {
|
|
@@ -1098,7 +1098,7 @@ function ge({ at: n, items: l, onClose: t, label: r = "Actions", focus: c = "cur
|
|
|
1098
1098
|
className: "cms-menu",
|
|
1099
1099
|
role: "menu",
|
|
1100
1100
|
"aria-label": r,
|
|
1101
|
-
style: { left: (
|
|
1101
|
+
style: { left: (u ?? n).x, top: (u ?? n).y },
|
|
1102
1102
|
onKeyDown: p,
|
|
1103
1103
|
onContextMenu: (d) => d.preventDefault(),
|
|
1104
1104
|
children: f.map((d, g) => /* @__PURE__ */ i(an, { children: [
|
|
@@ -1113,13 +1113,13 @@ function ge({ at: n, items: l, onClose: t, label: r = "Actions", focus: c = "cur
|
|
|
1113
1113
|
document.body
|
|
1114
1114
|
);
|
|
1115
1115
|
}
|
|
1116
|
-
function gl({ title: n, icon: l, primary: t, more: r = [], moreLabel: c, context: s, fullWidth:
|
|
1116
|
+
function gl({ title: n, icon: l, primary: t, more: r = [], moreLabel: c, context: s, fullWidth: m = !1 }) {
|
|
1117
1117
|
var k, x, C;
|
|
1118
|
-
const [a,
|
|
1118
|
+
const [a, u] = T(null), v = se(), o = r.filter((w) => w.offer.offered), p = (k = t == null ? void 0 : t.offer) == null ? void 0 : k.refusal, h = t !== void 0 && (((x = t.offer) == null ? void 0 : x.offered) === !1 || p !== void 0), f = t !== void 0 && "menu" in t ? t.menu.filter((w) => w.offer.offered) : [], d = t !== void 0 && "menu" in t && f.length > 0 ? t : null, g = (w, b) => {
|
|
1119
1119
|
const y = b.getBoundingClientRect();
|
|
1120
|
-
|
|
1120
|
+
u((a == null ? void 0 : a.which) === w ? null : { which: w, x: y.left, y: y.bottom + 4 });
|
|
1121
1121
|
};
|
|
1122
|
-
return /* @__PURE__ */ i("header", { className: `cms-section-header${
|
|
1122
|
+
return /* @__PURE__ */ i("header", { className: `cms-section-header${m ? " cms-section-header--full" : ""}`, children: [
|
|
1123
1123
|
/* @__PURE__ */ i("div", { className: "cms-section-header__row", "data-row": "1", children: [
|
|
1124
1124
|
l !== void 0 ? /* @__PURE__ */ e(L, { name: l }) : null,
|
|
1125
1125
|
/* @__PURE__ */ e("h1", { className: "cms-section-header__title", title: n, children: n }),
|
|
@@ -1176,8 +1176,8 @@ function gl({ title: n, icon: l, primary: t, more: r = [], moreLabel: c, context
|
|
|
1176
1176
|
] })
|
|
1177
1177
|
] }),
|
|
1178
1178
|
s != null ? /* @__PURE__ */ e("div", { className: "cms-section-header__context", "data-row": "2", children: s }) : null,
|
|
1179
|
-
d !== null ? /* @__PURE__ */ e(ge, { at: (a == null ? void 0 : a.which) === "primary" ? a : null, items: f, onClose: () =>
|
|
1180
|
-
/* @__PURE__ */ e(ge, { at: (a == null ? void 0 : a.which) === "more" ? a : null, items: r, onClose: () =>
|
|
1179
|
+
d !== null ? /* @__PURE__ */ e(ge, { at: (a == null ? void 0 : a.which) === "primary" ? a : null, items: f, onClose: () => u(null), label: d.menuLabel }) : null,
|
|
1180
|
+
/* @__PURE__ */ e(ge, { at: (a == null ? void 0 : a.which) === "more" ? a : null, items: r, onClose: () => u(null), label: c })
|
|
1181
1181
|
] });
|
|
1182
1182
|
}
|
|
1183
1183
|
function Nl({ title: n, scope: l, actions: t, backLink: r }) {
|
|
@@ -1207,16 +1207,16 @@ function Nl({ title: n, scope: l, actions: t, backLink: r }) {
|
|
|
1207
1207
|
] });
|
|
1208
1208
|
}
|
|
1209
1209
|
function wl({ tabs: n, active: l, onSelect: t, label: r }) {
|
|
1210
|
-
const c = H([]), s = (
|
|
1210
|
+
const c = H([]), s = (m, a) => {
|
|
1211
1211
|
var p;
|
|
1212
|
-
const
|
|
1212
|
+
const u = n.length - 1, v = m.key === "ArrowRight" ? a === u ? 0 : a + 1 : m.key === "ArrowLeft" ? a === 0 ? u : a - 1 : m.key === "Home" ? 0 : m.key === "End" ? u : null;
|
|
1213
1213
|
if (v === null) return;
|
|
1214
|
-
|
|
1214
|
+
m.preventDefault();
|
|
1215
1215
|
const o = n[v];
|
|
1216
1216
|
o && (t(o.id), (p = c.current[v]) == null || p.focus());
|
|
1217
1217
|
};
|
|
1218
|
-
return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": r, children: n.map((
|
|
1219
|
-
const
|
|
1218
|
+
return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": r, children: n.map((m, a) => {
|
|
1219
|
+
const u = m.id === l;
|
|
1220
1220
|
return /* @__PURE__ */ i(
|
|
1221
1221
|
"button",
|
|
1222
1222
|
{
|
|
@@ -1225,17 +1225,17 @@ function wl({ tabs: n, active: l, onSelect: t, label: r }) {
|
|
|
1225
1225
|
},
|
|
1226
1226
|
type: "button",
|
|
1227
1227
|
role: "tab",
|
|
1228
|
-
className: F("cms-tab",
|
|
1229
|
-
"aria-selected":
|
|
1230
|
-
tabIndex:
|
|
1231
|
-
onClick: () => t(
|
|
1228
|
+
className: F("cms-tab", u && "is-active"),
|
|
1229
|
+
"aria-selected": u,
|
|
1230
|
+
tabIndex: u ? 0 : -1,
|
|
1231
|
+
onClick: () => t(m.id),
|
|
1232
1232
|
onKeyDown: (v) => s(v, a),
|
|
1233
1233
|
children: [
|
|
1234
|
-
|
|
1235
|
-
|
|
1234
|
+
m.label,
|
|
1235
|
+
m.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: m.count }) : null
|
|
1236
1236
|
]
|
|
1237
1237
|
},
|
|
1238
|
-
|
|
1238
|
+
m.id
|
|
1239
1239
|
);
|
|
1240
1240
|
}) });
|
|
1241
1241
|
}
|
|
@@ -1252,19 +1252,19 @@ function $n(n) {
|
|
|
1252
1252
|
l = l * 31 + (t.codePointAt(0) ?? 0) >>> 0;
|
|
1253
1253
|
return l % 6 + 1;
|
|
1254
1254
|
}
|
|
1255
|
-
function Se({ name: n, pictureUrl: l, presence: t, connection: r, deleted: c = !1, size: s = 32 }) {
|
|
1256
|
-
const u = r !== void 0 ? `is-${r.state === "offline" ? "disconnected" : r.state}` : t === void 0 ? null : `is-${t === "busy" ? "away" : t}`,
|
|
1255
|
+
function Se({ name: n, pictureUrl: l, presence: t, connection: r, deleted: c = !1, size: s = 32, tintSeed: m }) {
|
|
1256
|
+
const a = Ln(n) || "?", u = n.trim() === "" ? "?" : n, v = r !== void 0 ? `is-${r.state === "offline" ? "disconnected" : r.state}` : t === void 0 ? null : `is-${t === "busy" ? "away" : t}`, o = r !== void 0 ? `${u}, ${r.label}` : t ? `${u}, ${t}` : u;
|
|
1257
1257
|
return /* @__PURE__ */ i(
|
|
1258
1258
|
"span",
|
|
1259
1259
|
{
|
|
1260
|
-
className: F("cms-avatar", c ? "cms-avatar--deleted" : `cms-avatar--tint-${$n(n)}`),
|
|
1260
|
+
className: F("cms-avatar", c ? "cms-avatar--deleted" : `cms-avatar--tint-${$n(m ?? n)}`),
|
|
1261
1261
|
style: { width: s, height: s, fontSize: Math.round(s * 0.4) },
|
|
1262
1262
|
role: "img",
|
|
1263
|
-
"aria-label":
|
|
1263
|
+
"aria-label": o,
|
|
1264
1264
|
...r === void 0 ? {} : { title: r.label },
|
|
1265
1265
|
children: [
|
|
1266
|
-
c ? /* @__PURE__ */ e(L, { name: "user", size: Math.round(s * 0.6) }) : l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children:
|
|
1267
|
-
|
|
1266
|
+
c ? /* @__PURE__ */ e(L, { name: "user", size: Math.round(s * 0.6) }) : l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: a }),
|
|
1267
|
+
v === null ? null : /* @__PURE__ */ e("span", { className: F("cms-avatar__presence", v), "aria-hidden": "true" })
|
|
1268
1268
|
]
|
|
1269
1269
|
}
|
|
1270
1270
|
);
|
|
@@ -1294,7 +1294,7 @@ function Fn(n) {
|
|
|
1294
1294
|
} catch {
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
|
-
function Bn({ storageKey: n, value: l, default: t, min: r, max: c, step: s = 16, label:
|
|
1297
|
+
function Bn({ storageKey: n, value: l, default: t, min: r, max: c, step: s = 16, label: m, onChange: a, className: u, style: v }) {
|
|
1298
1298
|
const o = Math.max(r, c), p = (b) => Math.round(Math.min(Math.max(b, r), o)), [h, f] = T(() => {
|
|
1299
1299
|
const b = n === void 0 ? null : Le(n);
|
|
1300
1300
|
return p(b ?? t);
|
|
@@ -1321,11 +1321,11 @@ function Bn({ storageKey: n, value: l, default: t, min: r, max: c, step: s = 16,
|
|
|
1321
1321
|
role: "separator",
|
|
1322
1322
|
tabIndex: 0,
|
|
1323
1323
|
"aria-orientation": "vertical",
|
|
1324
|
-
"aria-label":
|
|
1324
|
+
"aria-label": m,
|
|
1325
1325
|
"aria-valuenow": d,
|
|
1326
1326
|
"aria-valuemin": r,
|
|
1327
1327
|
"aria-valuemax": o,
|
|
1328
|
-
className: F("cms-splitter", k && "is-dragging", d <= r && "is-at-min", d >= o && "is-at-max",
|
|
1328
|
+
className: F("cms-splitter", k && "is-dragging", d <= r && "is-at-min", d >= o && "is-at-max", u),
|
|
1329
1329
|
style: v,
|
|
1330
1330
|
onPointerDown: (b) => {
|
|
1331
1331
|
var D, Z;
|
|
@@ -1358,7 +1358,7 @@ function Rn({ count: n, label: l, max: t = 99 }) {
|
|
|
1358
1358
|
/* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: l })
|
|
1359
1359
|
] });
|
|
1360
1360
|
}
|
|
1361
|
-
function yl({ product: n, mark: l, rail: t, active: r, onNavigate: c, server: s, search:
|
|
1361
|
+
function yl({ product: n, mark: l, rail: t, active: r, onNavigate: c, server: s, search: m, account: a, children: u, railLabel: v = "Sections" }) {
|
|
1362
1362
|
return /* @__PURE__ */ i("div", { className: "cms-shell", children: [
|
|
1363
1363
|
/* @__PURE__ */ i("nav", { className: "cms-shell__rail", "aria-label": v, children: [
|
|
1364
1364
|
/* @__PURE__ */ e("span", { className: "cms-shell__mark", "aria-hidden": "true", children: l }),
|
|
@@ -1388,10 +1388,10 @@ function yl({ product: n, mark: l, rail: t, active: r, onNavigate: c, server: s,
|
|
|
1388
1388
|
/* @__PURE__ */ i("header", { className: "cms-shell__top", children: [
|
|
1389
1389
|
/* @__PURE__ */ e("span", { className: "cms-shell__product", children: n }),
|
|
1390
1390
|
s != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: s }) : null,
|
|
1391
|
-
|
|
1391
|
+
m != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: m }) : null,
|
|
1392
1392
|
a != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: a }) : null
|
|
1393
1393
|
] }),
|
|
1394
|
-
/* @__PURE__ */ e("main", { className: "cms-shell__main", children:
|
|
1394
|
+
/* @__PURE__ */ e("main", { className: "cms-shell__main", children: u })
|
|
1395
1395
|
] });
|
|
1396
1396
|
}
|
|
1397
1397
|
function kl({ label: n, placeholder: l, value: t, onChange: r, onSearch: c }) {
|
|
@@ -1422,17 +1422,17 @@ function kl({ label: n, placeholder: l, value: t, onChange: r, onSearch: c }) {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
function Hn(n, l, t) {
|
|
1424
1424
|
const r = n.map((s) => Math.min(Math.max(s.width, s.min), s.max));
|
|
1425
|
-
let c = r.reduce((s,
|
|
1425
|
+
let c = r.reduce((s, m) => s + m, 0) + t - l;
|
|
1426
1426
|
for (let s = r.length - 1; s >= 0 && c > 0; s -= 1) {
|
|
1427
|
-
const
|
|
1428
|
-
r[s] = r[s] -
|
|
1427
|
+
const m = Math.min(c, r[s] - n[s].min);
|
|
1428
|
+
r[s] = r[s] - m, c -= m;
|
|
1429
1429
|
}
|
|
1430
1430
|
return r;
|
|
1431
1431
|
}
|
|
1432
|
-
function xl({ panes: n, active: l, back: t, sizes: r, lastMin: c = 360, onResize: s, storageKey:
|
|
1433
|
-
const a = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1),
|
|
1432
|
+
function xl({ panes: n, active: l, back: t, sizes: r, lastMin: c = 360, onResize: s, storageKey: m }) {
|
|
1433
|
+
const a = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), u = H(null), [v, o] = T(0), p = (r ?? []).slice(0, n.length - 1), [h, f] = T(() => m === void 0 ? [] : p.map((b, y) => Le(`${m}:${String(y)}`) ?? void 0)), [d, g] = T(!1), k = p.map((b, y) => b !== void 0 && h[y] !== void 0 ? { ...b, width: h[y] } : b), x = k.length === n.length - 1 && k.every((b) => b !== void 0);
|
|
1434
1434
|
ve(() => {
|
|
1435
|
-
const b =
|
|
1435
|
+
const b = u.current;
|
|
1436
1436
|
if (b === null || !x) return;
|
|
1437
1437
|
const y = () => o(b.clientWidth);
|
|
1438
1438
|
if (y(), typeof ResizeObserver > "u") return;
|
|
@@ -1446,7 +1446,7 @@ function xl({ panes: n, active: l, back: t, sizes: r, lastMin: c = 360, onResize
|
|
|
1446
1446
|
return /* @__PURE__ */ i(
|
|
1447
1447
|
"div",
|
|
1448
1448
|
{
|
|
1449
|
-
ref:
|
|
1449
|
+
ref: u,
|
|
1450
1450
|
className: F("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", x && "cms-panes--sized", d && "is-resizing"),
|
|
1451
1451
|
"data-active": a,
|
|
1452
1452
|
style: w,
|
|
@@ -1463,7 +1463,7 @@ function xl({ panes: n, active: l, back: t, sizes: r, lastMin: c = 360, onResize
|
|
|
1463
1463
|
return /* @__PURE__ */ e(
|
|
1464
1464
|
Bn,
|
|
1465
1465
|
{
|
|
1466
|
-
...
|
|
1466
|
+
...m === void 0 ? {} : { storageKey: `${m}:${String(y)}` },
|
|
1467
1467
|
value: C[y],
|
|
1468
1468
|
default: b.reset,
|
|
1469
1469
|
min: b.min,
|
|
@@ -1472,7 +1472,7 @@ function xl({ panes: n, active: l, back: t, sizes: r, lastMin: c = 360, onResize
|
|
|
1472
1472
|
className: "cms-panes__splitter",
|
|
1473
1473
|
style: { "--split-at": `var(--split-pane-end-${String(y)})` },
|
|
1474
1474
|
onChange: (V, M) => {
|
|
1475
|
-
|
|
1475
|
+
m !== void 0 && f((R) => {
|
|
1476
1476
|
const z = [...R];
|
|
1477
1477
|
return z[y] = V, z;
|
|
1478
1478
|
}), g(!M), s == null || s(y, V, M);
|
|
@@ -1486,29 +1486,29 @@ function xl({ panes: n, active: l, back: t, sizes: r, lastMin: c = 360, onResize
|
|
|
1486
1486
|
);
|
|
1487
1487
|
}
|
|
1488
1488
|
const On = { attachment: "Has an attachment", unread: "Unread" };
|
|
1489
|
-
function Ml({ from: n, subject: l, preview: t, time: r, unread: c, hasAttachment: s, selected:
|
|
1489
|
+
function Ml({ from: n, subject: l, preview: t, time: r, unread: c, hasAttachment: s, selected: m, onOpen: a, check: u, selecting: v, labels: o }) {
|
|
1490
1490
|
const p = ye(On, o), h = /* @__PURE__ */ e(Se, { name: n, size: 40 });
|
|
1491
|
-
return /* @__PURE__ */ i("div", { className: F("cms-mail-row", c && "is-unread",
|
|
1492
|
-
|
|
1491
|
+
return /* @__PURE__ */ i("div", { className: F("cms-mail-row", c && "is-unread", m && "is-selected", v && "is-selecting", (u == null ? void 0 : u.checked) && "is-checked"), children: [
|
|
1492
|
+
u !== void 0 ? /* @__PURE__ */ i("span", { className: "cms-mail-row__lead", children: [
|
|
1493
1493
|
h,
|
|
1494
1494
|
/* @__PURE__ */ e(
|
|
1495
1495
|
"input",
|
|
1496
1496
|
{
|
|
1497
1497
|
type: "checkbox",
|
|
1498
1498
|
className: "cms-mail-row__check",
|
|
1499
|
-
checked:
|
|
1500
|
-
disabled:
|
|
1501
|
-
"aria-disabled":
|
|
1502
|
-
"aria-busy":
|
|
1503
|
-
"aria-label":
|
|
1499
|
+
checked: u.checked,
|
|
1500
|
+
disabled: u.disabled,
|
|
1501
|
+
"aria-disabled": u.pending ? "true" : void 0,
|
|
1502
|
+
"aria-busy": u.pending ? "true" : void 0,
|
|
1503
|
+
"aria-label": u.label,
|
|
1504
1504
|
onChange: () => {
|
|
1505
1505
|
},
|
|
1506
1506
|
onClick: (f) => {
|
|
1507
|
-
if (f.stopPropagation(),
|
|
1507
|
+
if (f.stopPropagation(), u.pending) {
|
|
1508
1508
|
f.preventDefault();
|
|
1509
1509
|
return;
|
|
1510
1510
|
}
|
|
1511
|
-
|
|
1511
|
+
u.onCheck({ shift: f.shiftKey, toggle: f.ctrlKey || f.metaKey });
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
)
|
|
@@ -1518,10 +1518,10 @@ function Ml({ from: n, subject: l, preview: t, time: r, unread: c, hasAttachment
|
|
|
1518
1518
|
{
|
|
1519
1519
|
type: "button",
|
|
1520
1520
|
className: "cms-mail-row__open",
|
|
1521
|
-
"aria-current":
|
|
1521
|
+
"aria-current": m ? "true" : void 0,
|
|
1522
1522
|
onClick: a,
|
|
1523
1523
|
children: [
|
|
1524
|
-
|
|
1524
|
+
u === void 0 ? h : null,
|
|
1525
1525
|
/* @__PURE__ */ i("span", { className: "cms-mail-row__body", children: [
|
|
1526
1526
|
/* @__PURE__ */ i("span", { className: "cms-mail-row__line", children: [
|
|
1527
1527
|
/* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: n }),
|
|
@@ -1551,30 +1551,30 @@ function Cl({ direction: n, children: l, time: t, read: r, readLabel: c = "Read"
|
|
|
1551
1551
|
] })
|
|
1552
1552
|
] });
|
|
1553
1553
|
}
|
|
1554
|
-
function Sl({ label: n, value: l, onChange: t, onSend: r, onAttach: c, placeholder: s, variant:
|
|
1554
|
+
function Sl({ label: n, value: l, onChange: t, onSend: r, onAttach: c, placeholder: s, variant: m = "chat", sendLabel: a = "Send", attachLabel: u = "Attach a file", leading: v, canSend: o }) {
|
|
1555
1555
|
const p = se(), h = o ?? l.trim() !== "", f = (g) => {
|
|
1556
1556
|
g.preventDefault(), h && r();
|
|
1557
|
-
}, d = c ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label":
|
|
1558
|
-
return /* @__PURE__ */ i("form", { className: F("cms-composer", `cms-composer--${
|
|
1559
|
-
/* @__PURE__ */ e("label", { htmlFor: p, className:
|
|
1560
|
-
|
|
1557
|
+
}, d = c ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": u, onClick: c, children: /* @__PURE__ */ e(L, { name: "paperclip" }) }) : null;
|
|
1558
|
+
return /* @__PURE__ */ i("form", { className: F("cms-composer", `cms-composer--${m}`), onSubmit: f, children: [
|
|
1559
|
+
/* @__PURE__ */ e("label", { htmlFor: p, className: m === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
|
|
1560
|
+
m === "chat" ? d : null,
|
|
1561
1561
|
/* @__PURE__ */ e(
|
|
1562
1562
|
"textarea",
|
|
1563
1563
|
{
|
|
1564
1564
|
id: p,
|
|
1565
1565
|
className: "cms-composer__input",
|
|
1566
|
-
rows:
|
|
1566
|
+
rows: m === "reply" ? 3 : 1,
|
|
1567
1567
|
placeholder: s,
|
|
1568
1568
|
value: l,
|
|
1569
1569
|
onChange: (g) => t(g.target.value),
|
|
1570
1570
|
onKeyDown: (g) => {
|
|
1571
|
-
g.nativeEvent.isComposing || g.keyCode === 229 ||
|
|
1571
|
+
g.nativeEvent.isComposing || g.keyCode === 229 || m === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(), h && r());
|
|
1572
1572
|
}
|
|
1573
1573
|
}
|
|
1574
1574
|
),
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1575
|
+
m === "reply" && v !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: v }) : null,
|
|
1576
|
+
m === "reply" ? d : null,
|
|
1577
|
+
m === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": a, disabled: !h, children: /* @__PURE__ */ e(L, { name: "send" }) }) : /* @__PURE__ */ i("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !h, children: [
|
|
1578
1578
|
a,
|
|
1579
1579
|
" ",
|
|
1580
1580
|
/* @__PURE__ */ e(L, { name: "send", size: 18 })
|
|
@@ -1603,11 +1603,11 @@ const He = {
|
|
|
1603
1603
|
returnToCall: "Return to call"
|
|
1604
1604
|
};
|
|
1605
1605
|
function El({ name: n, media: l, onAccept: t, onDecline: r, labels: c }) {
|
|
1606
|
-
const s = ye(He, c),
|
|
1607
|
-
return /* @__PURE__ */ i("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": s.incomingFrom(
|
|
1606
|
+
const s = ye(He, c), m = l === "video" ? s.incomingVideo : s.incomingAudio;
|
|
1607
|
+
return /* @__PURE__ */ i("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": s.incomingFrom(m, n), children: [
|
|
1608
1608
|
/* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(Se, { name: n, size: 112 }) }),
|
|
1609
1609
|
/* @__PURE__ */ e("p", { className: "cms-call-incoming__name", children: n }),
|
|
1610
|
-
/* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children:
|
|
1610
|
+
/* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: m }),
|
|
1611
1611
|
/* @__PURE__ */ i("div", { className: "cms-call-incoming__actions", children: [
|
|
1612
1612
|
/* @__PURE__ */ e(_e, { icon: "phone-off", label: s.decline, tone: "hang-up", onClick: r }),
|
|
1613
1613
|
/* @__PURE__ */ e(_e, { icon: "phone", label: s.accept, tone: "accept", onClick: t })
|
|
@@ -1629,7 +1629,7 @@ function _e({ icon: n, label: l, onClick: t, tone: r = "plain", pressed: c }) {
|
|
|
1629
1629
|
}
|
|
1630
1630
|
);
|
|
1631
1631
|
}
|
|
1632
|
-
function Al({ name: n, duration: l, connection: t, you: r, muted: c, speaker: s, onToggleMute:
|
|
1632
|
+
function Al({ name: n, duration: l, connection: t, you: r, muted: c, speaker: s, onToggleMute: m, onToggleSpeaker: a, onAddPerson: u, onChat: v, onHangUp: o, labels: p }) {
|
|
1633
1633
|
const h = ye(He, p);
|
|
1634
1634
|
return /* @__PURE__ */ i("section", { className: "cms-call-panel", "aria-label": h.callWith(n), children: [
|
|
1635
1635
|
/* @__PURE__ */ i("div", { className: "cms-call-panel__head", children: [
|
|
@@ -1646,16 +1646,16 @@ function Al({ name: n, duration: l, connection: t, you: r, muted: c, speaker: s,
|
|
|
1646
1646
|
r.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": h.speaking }) : null
|
|
1647
1647
|
] }),
|
|
1648
1648
|
/* @__PURE__ */ i("div", { className: "cms-call-panel__controls", children: [
|
|
1649
|
-
/* @__PURE__ */ e(_e, { icon: "mic", label: c ? h.unmute : h.mute, pressed: c, onClick:
|
|
1649
|
+
/* @__PURE__ */ e(_e, { icon: "mic", label: c ? h.unmute : h.mute, pressed: c, onClick: m }),
|
|
1650
1650
|
/* @__PURE__ */ e(_e, { icon: "speaker", label: h.speaker, pressed: s, onClick: a }),
|
|
1651
|
-
|
|
1651
|
+
u ? /* @__PURE__ */ e(_e, { icon: "user-plus", label: h.addPerson, onClick: u }) : null,
|
|
1652
1652
|
v ? /* @__PURE__ */ e(_e, { icon: "chat", label: h.chat, onClick: v }) : null,
|
|
1653
1653
|
/* @__PURE__ */ e(_e, { icon: "phone-off", label: h.hangUp, tone: "hang-up", onClick: o })
|
|
1654
1654
|
] })
|
|
1655
1655
|
] });
|
|
1656
1656
|
}
|
|
1657
|
-
function Tl({ name: n, duration: l, muted: t, onToggleMute: r, onReturn: c, onHangUp: s, labels:
|
|
1658
|
-
const a = ye(He,
|
|
1657
|
+
function Tl({ name: n, duration: l, muted: t, onToggleMute: r, onReturn: c, onHangUp: s, labels: m }) {
|
|
1658
|
+
const a = ye(He, m);
|
|
1659
1659
|
return /* @__PURE__ */ i("section", { className: "cms-call-bar", "aria-label": a.callWith(n), children: [
|
|
1660
1660
|
/* @__PURE__ */ e("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
|
|
1661
1661
|
/* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: a.onCallWith(n) }),
|
|
@@ -1677,10 +1677,10 @@ function Dl({ mark: n, product: l, headline: t, lead: r, features: c = [], child
|
|
|
1677
1677
|
/* @__PURE__ */ i("div", { className: "cms-signin__pitch", children: [
|
|
1678
1678
|
/* @__PURE__ */ e("p", { className: "cms-signin__headline", children: t }),
|
|
1679
1679
|
/* @__PURE__ */ e("p", { className: "cms-signin__lead", children: r }),
|
|
1680
|
-
c.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: c.map((
|
|
1681
|
-
/* @__PURE__ */ e(L, { name:
|
|
1682
|
-
|
|
1683
|
-
] },
|
|
1680
|
+
c.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: c.map((m) => /* @__PURE__ */ i("li", { children: [
|
|
1681
|
+
/* @__PURE__ */ e(L, { name: m.icon, size: 18 }),
|
|
1682
|
+
m.label
|
|
1683
|
+
] }, m.label)) }) : null
|
|
1684
1684
|
] })
|
|
1685
1685
|
] }),
|
|
1686
1686
|
/* @__PURE__ */ e("main", { className: "cms-signin__form", children: s })
|
|
@@ -1698,21 +1698,21 @@ const Un = {
|
|
|
1698
1698
|
newHere: "New here?",
|
|
1699
1699
|
create: "Create an account"
|
|
1700
1700
|
};
|
|
1701
|
-
function Ll({ server: n, onSubmit: l, forgotHref: t, createHref: r, error: c, busy: s, labels:
|
|
1702
|
-
const a = ye(Un,
|
|
1701
|
+
function Ll({ server: n, onSubmit: l, forgotHref: t, createHref: r, error: c, busy: s, labels: m }) {
|
|
1702
|
+
const a = ye(Un, m), u = se(), [v, o] = T(""), [p, h] = T(""), [f, d] = T(!1);
|
|
1703
1703
|
return /* @__PURE__ */ i("form", { className: "cms-signin-form", onSubmit: (k) => {
|
|
1704
1704
|
k.preventDefault(), l(v, p);
|
|
1705
|
-
}, "aria-describedby": c ? `${
|
|
1705
|
+
}, "aria-describedby": c ? `${u}-error` : void 0, children: [
|
|
1706
1706
|
/* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: a.title }),
|
|
1707
1707
|
/* @__PURE__ */ i("p", { className: "cms-signin-form__server", children: [
|
|
1708
1708
|
/* @__PURE__ */ e(L, { name: "server", size: 18 }),
|
|
1709
1709
|
n
|
|
1710
1710
|
] }),
|
|
1711
|
-
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${
|
|
1711
|
+
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-identifier`, children: a.identifier }),
|
|
1712
1712
|
/* @__PURE__ */ e(
|
|
1713
1713
|
"input",
|
|
1714
1714
|
{
|
|
1715
|
-
id: `${
|
|
1715
|
+
id: `${u}-identifier`,
|
|
1716
1716
|
className: "cms-signin-form__input",
|
|
1717
1717
|
type: "text",
|
|
1718
1718
|
autoComplete: "username",
|
|
@@ -1722,12 +1722,12 @@ function Ll({ server: n, onSubmit: l, forgotHref: t, createHref: r, error: c, bu
|
|
|
1722
1722
|
required: !0
|
|
1723
1723
|
}
|
|
1724
1724
|
),
|
|
1725
|
-
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${
|
|
1725
|
+
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-password`, children: a.password }),
|
|
1726
1726
|
/* @__PURE__ */ i("span", { className: "cms-signin-form__password", children: [
|
|
1727
1727
|
/* @__PURE__ */ e(
|
|
1728
1728
|
"input",
|
|
1729
1729
|
{
|
|
1730
|
-
id: `${
|
|
1730
|
+
id: `${u}-password`,
|
|
1731
1731
|
className: "cms-signin-form__input",
|
|
1732
1732
|
type: f ? "text" : "password",
|
|
1733
1733
|
autoComplete: "current-password",
|
|
@@ -1739,7 +1739,7 @@ function Ll({ server: n, onSubmit: l, forgotHref: t, createHref: r, error: c, bu
|
|
|
1739
1739
|
/* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": f, onClick: () => d((k) => !k), children: f ? a.hide : a.show })
|
|
1740
1740
|
] }),
|
|
1741
1741
|
t ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: t, children: a.forgot }) : null,
|
|
1742
|
-
c ? /* @__PURE__ */ e("p", { id: `${
|
|
1742
|
+
c ? /* @__PURE__ */ e("p", { id: `${u}-error`, className: "cms-signin-form__error", role: "alert", children: c }) : null,
|
|
1743
1743
|
/* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: s, "aria-busy": s || void 0, children: a.submit }),
|
|
1744
1744
|
r ? /* @__PURE__ */ i(A, { children: [
|
|
1745
1745
|
/* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: a.newHere }) }),
|
|
@@ -1777,7 +1777,7 @@ function Ue(n, l) {
|
|
|
1777
1777
|
}
|
|
1778
1778
|
function en(n) {
|
|
1779
1779
|
var s;
|
|
1780
|
-
const l = H(null), t = (n == null ? void 0 : n.value) ?? null, c = n === void 0 || n.options.some((
|
|
1780
|
+
const l = H(null), t = (n == null ? void 0 : n.value) ?? null, c = n === void 0 || n.options.some((m) => m.id === n.value) ? null : ((s = Ue(n.options, n.defaultValue)) == null ? void 0 : s.id) ?? null;
|
|
1781
1781
|
Q(() => {
|
|
1782
1782
|
c === null ? l.current = null : l.current !== t && (l.current = t, n == null || n.onChange(c));
|
|
1783
1783
|
}, [c, t]);
|
|
@@ -1786,9 +1786,9 @@ function nn({ iconOnly: n = !1, onOpenChange: l, ...t }) {
|
|
|
1786
1786
|
return t.options.length < 2 ? null : /* @__PURE__ */ e(Kn, { ...t, iconOnly: n, onOpenChange: l });
|
|
1787
1787
|
}
|
|
1788
1788
|
function Kn({ iconOnly: n, onOpenChange: l, ...t }) {
|
|
1789
|
-
const [r, c] = T(null), s = be(() => c(null), []),
|
|
1789
|
+
const [r, c] = T(null), s = be(() => c(null), []), m = H(!1), a = r !== null;
|
|
1790
1790
|
Q(() => (l == null || l(a), () => l == null ? void 0 : l(!1)), [a, l]);
|
|
1791
|
-
const
|
|
1791
|
+
const u = Xe(t), v = u !== null && !n, o = Je(t), p = (h, f) => {
|
|
1792
1792
|
const d = h.getBoundingClientRect();
|
|
1793
1793
|
c({ x: d.left, y: d.bottom + 4, focus: f });
|
|
1794
1794
|
};
|
|
@@ -1797,22 +1797,22 @@ function Kn({ iconOnly: n, onOpenChange: l, ...t }) {
|
|
|
1797
1797
|
"button",
|
|
1798
1798
|
{
|
|
1799
1799
|
type: "button",
|
|
1800
|
-
className: F("cms-filter-menu",
|
|
1800
|
+
className: F("cms-filter-menu", u !== null && "cms-filter-menu--active", v && "cms-filter-menu--named"),
|
|
1801
1801
|
"aria-haspopup": "menu",
|
|
1802
1802
|
"aria-expanded": a,
|
|
1803
1803
|
"aria-label": o,
|
|
1804
1804
|
title: o,
|
|
1805
1805
|
onMouseDown: () => {
|
|
1806
|
-
|
|
1806
|
+
m.current = a;
|
|
1807
1807
|
},
|
|
1808
1808
|
onClick: (h) => {
|
|
1809
|
-
a ||
|
|
1809
|
+
a || m.current ? s() : p(h.currentTarget, "current"), m.current = !1;
|
|
1810
1810
|
},
|
|
1811
1811
|
onKeyDown: (h) => {
|
|
1812
|
-
|
|
1812
|
+
m.current = !1, (h.key === "ArrowDown" || h.key === "ArrowUp") && (h.preventDefault(), p(h.currentTarget, h.key === "ArrowUp" ? "last" : "current"));
|
|
1813
1813
|
},
|
|
1814
1814
|
children: v ? /* @__PURE__ */ i(A, { children: [
|
|
1815
|
-
/* @__PURE__ */ e("span", { className: "cms-filter-menu__choice", children:
|
|
1815
|
+
/* @__PURE__ */ e("span", { className: "cms-filter-menu__choice", children: u.label }),
|
|
1816
1816
|
/* @__PURE__ */ e(L, { name: "chevron-down", size: 16 })
|
|
1817
1817
|
] }) : /* @__PURE__ */ e(L, { name: "funnel" })
|
|
1818
1818
|
}
|
|
@@ -1851,8 +1851,8 @@ function Wn(n) {
|
|
|
1851
1851
|
return [...l.entries()].sort(([t], [r]) => t - r).map(([, t]) => t);
|
|
1852
1852
|
}
|
|
1853
1853
|
function Il({ label: n, actions: l, onAction: t, status: r, moreLabel: c, leading: s }) {
|
|
1854
|
-
const
|
|
1855
|
-
const _ = a.current, $ =
|
|
1854
|
+
const m = l.filter((_) => _.entries === void 0 || _.entries.length > 0), a = H(null), u = H(null), v = H(null), [o, p] = T(Ze), [h, f] = T(null), [d, g] = T("first"), [k, x] = T(null), [C, w] = T(null), b = Zn(m), y = Wn(m), D = b.flat(), Z = D.filter((_) => _.overflow === 0), V = D.filter((_) => _.overflow !== 0), M = JSON.stringify([m.map((_) => [_.id, _.label, _.icon, _.group, _.overflow ?? null, _.entries !== void 0]), r ?? "", s !== void 0]), R = be(() => {
|
|
1855
|
+
const _ = a.current, $ = u.current;
|
|
1856
1856
|
if (_ === null || $ === null) return;
|
|
1857
1857
|
const B = getComputedStyle(_), ne = parseFloat(B.columnGap || "0") || 0, I = _.clientWidth - (parseFloat(B.paddingLeft) || 0) - (parseFloat(B.paddingRight) || 0), X = (E) => {
|
|
1858
1858
|
var K;
|
|
@@ -2004,7 +2004,7 @@ function Il({ label: n, actions: l, onAction: t, status: r, moreLabel: c, leadin
|
|
|
2004
2004
|
r !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: r, children: r }) : null,
|
|
2005
2005
|
/* @__PURE__ */ e(ge, { at: (h == null ? void 0 : h.which) === "more" ? h : null, items: oe, onClose: () => f(null), label: c, focus: d }),
|
|
2006
2006
|
/* @__PURE__ */ e(ge, { at: J !== void 0 ? h : null, items: fe, onClose: () => f(null), label: (J == null ? void 0 : J.label) ?? "", focus: d }),
|
|
2007
|
-
/* @__PURE__ */ i("div", { ref:
|
|
2007
|
+
/* @__PURE__ */ i("div", { ref: u, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
|
|
2008
2008
|
s !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: s }) : null,
|
|
2009
2009
|
/* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
|
|
2010
2010
|
/* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(L, { name: "more" }) }),
|
|
@@ -2024,7 +2024,7 @@ function Il({ label: n, actions: l, onAction: t, status: r, moreLabel: c, leadin
|
|
|
2024
2024
|
}
|
|
2025
2025
|
);
|
|
2026
2026
|
}
|
|
2027
|
-
function qn({ action: n, labels: l, overflowed: t, pinned: r, tabbable: c, tipOff: s, menuOpen:
|
|
2027
|
+
function qn({ action: n, labels: l, overflowed: t, pinned: r, tabbable: c, tipOff: s, menuOpen: m, onChoose: a, onFocus: u }) {
|
|
2028
2028
|
const [v, o] = T(!1);
|
|
2029
2029
|
Q(() => {
|
|
2030
2030
|
if (!n.busy) {
|
|
@@ -2048,11 +2048,11 @@ function qn({ action: n, labels: l, overflowed: t, pinned: r, tabbable: c, tipOf
|
|
|
2048
2048
|
"aria-label": n.label,
|
|
2049
2049
|
"aria-disabled": n.disabled || void 0,
|
|
2050
2050
|
"aria-busy": n.busy || void 0,
|
|
2051
|
-
...C ? { "aria-haspopup": "menu", "aria-expanded":
|
|
2051
|
+
...C ? { "aria-haspopup": "menu", "aria-expanded": m } : {},
|
|
2052
2052
|
...f === null ? {} : { "aria-describedby": g },
|
|
2053
2053
|
...k && f !== null ? { "data-reason-shown": "" } : {},
|
|
2054
2054
|
tabIndex: c ? 0 : -1,
|
|
2055
|
-
onFocus:
|
|
2055
|
+
onFocus: u,
|
|
2056
2056
|
onBlur: () => x(!1),
|
|
2057
2057
|
onKeyDown: (w) => {
|
|
2058
2058
|
w.key === "Escape" && x(!1), C && (w.key === "ArrowDown" || w.key === "ArrowUp") && (w.preventDefault(), f !== null ? x(!0) : !n.disabled && !n.busy && a(w.currentTarget, w.key === "ArrowUp" ? "last" : "first"));
|
|
@@ -2076,9 +2076,9 @@ function xe({ name: n }) {
|
|
|
2076
2076
|
const l = we(n);
|
|
2077
2077
|
return l === null ? null : /* @__PURE__ */ e(L, { name: l, size: 18 });
|
|
2078
2078
|
}
|
|
2079
|
-
function Pl({ title: n, body: l = null, time: t = null, unread: r, unreadLabel: c, expandLabel: s, collapseLabel:
|
|
2079
|
+
function Pl({ title: n, body: l = null, time: t = null, unread: r, unreadLabel: c, expandLabel: s, collapseLabel: m, action: a = null, onRead: u, leading: v }) {
|
|
2080
2080
|
const [o, p] = T(!1), h = se(), f = () => {
|
|
2081
|
-
r &&
|
|
2081
|
+
r && u();
|
|
2082
2082
|
}, d = (a == null ? void 0 : a.presentation) === "row" && a.onAction !== void 0, g = (a == null ? void 0 : a.presentation) === "button" && a.onAction !== void 0 ? a : null, k = () => {
|
|
2083
2083
|
var x;
|
|
2084
2084
|
f(), d && ((x = a.onAction) == null || x.call(a));
|
|
@@ -2121,8 +2121,8 @@ function Pl({ title: n, body: l = null, time: t = null, unread: r, unreadLabel:
|
|
|
2121
2121
|
className: "cms-notification__chevron",
|
|
2122
2122
|
"aria-expanded": o,
|
|
2123
2123
|
"aria-controls": h,
|
|
2124
|
-
"aria-label": o ?
|
|
2125
|
-
title: o ?
|
|
2124
|
+
"aria-label": o ? m : s,
|
|
2125
|
+
title: o ? m : s,
|
|
2126
2126
|
onClick: () => {
|
|
2127
2127
|
o || f(), p((x) => !x);
|
|
2128
2128
|
},
|
|
@@ -2181,16 +2181,16 @@ function Rl() {
|
|
|
2181
2181
|
window.dispatchEvent(new Event(Ie));
|
|
2182
2182
|
}
|
|
2183
2183
|
function Hl(n) {
|
|
2184
|
-
const [l, t] = T(void 0), [r, c] = T(void 0), [s,
|
|
2184
|
+
const [l, t] = T(void 0), [r, c] = T(void 0), [s, m] = T(!0), a = H(n);
|
|
2185
2185
|
a.current = n;
|
|
2186
|
-
const
|
|
2187
|
-
const o = ++
|
|
2188
|
-
|
|
2186
|
+
const u = H(0), v = be(() => {
|
|
2187
|
+
const o = ++u.current;
|
|
2188
|
+
m(!0), a.current().then(
|
|
2189
2189
|
(p) => {
|
|
2190
|
-
o ===
|
|
2190
|
+
o === u.current && (t(p), c(void 0), m(!1));
|
|
2191
2191
|
},
|
|
2192
2192
|
(p) => {
|
|
2193
|
-
o ===
|
|
2193
|
+
o === u.current && (c(p), m(!1));
|
|
2194
2194
|
}
|
|
2195
2195
|
);
|
|
2196
2196
|
}, []);
|
|
@@ -2209,8 +2209,8 @@ const Xn = "/errors/client-update-required";
|
|
|
2209
2209
|
function Jn(n, l) {
|
|
2210
2210
|
const t = n.split(".").map((c) => Number.parseInt(c, 10) || 0), r = l.split(".").map((c) => Number.parseInt(c, 10) || 0);
|
|
2211
2211
|
for (let c = 0; c < Math.max(t.length, r.length); c++) {
|
|
2212
|
-
const s = t[c] ?? 0,
|
|
2213
|
-
if (s !==
|
|
2212
|
+
const s = t[c] ?? 0, m = r[c] ?? 0;
|
|
2213
|
+
if (s !== m) return s < m;
|
|
2214
2214
|
}
|
|
2215
2215
|
return !1;
|
|
2216
2216
|
}
|
|
@@ -2227,12 +2227,12 @@ function ll(n, l) {
|
|
|
2227
2227
|
return;
|
|
2228
2228
|
}
|
|
2229
2229
|
const s = /* @__PURE__ */ new WeakMap();
|
|
2230
|
-
let
|
|
2231
|
-
const
|
|
2232
|
-
|
|
2230
|
+
let m = Number.NEGATIVE_INFINITY, a = null;
|
|
2231
|
+
const u = (h) => {
|
|
2232
|
+
m = performance.now(), a = h.target;
|
|
2233
2233
|
}, v = (h) => {
|
|
2234
2234
|
const f = h.target;
|
|
2235
|
-
!(f instanceof HTMLElement && (f.isContentEditable || f.closest("input, textarea, select") !== null)) && nl.has(h.key) &&
|
|
2235
|
+
!(f instanceof HTMLElement && (f.isContentEditable || f.closest("input, textarea, select") !== null)) && nl.has(h.key) && u(h);
|
|
2236
2236
|
}, o = (h) => {
|
|
2237
2237
|
const f = h.target;
|
|
2238
2238
|
if (!(f instanceof HTMLElement)) return;
|
|
@@ -2241,8 +2241,8 @@ function ll(n, l) {
|
|
|
2241
2241
|
r(!1);
|
|
2242
2242
|
return;
|
|
2243
2243
|
}
|
|
2244
|
-
performance.now() -
|
|
2245
|
-
}, p = [["wheel",
|
|
2244
|
+
performance.now() - m > el || !(a === c || a === document.body || a instanceof Node && f.contains(a)) || (d < g - qe ? r(!1) : d > g + qe && d > Qn && r(!0));
|
|
2245
|
+
}, p = [["wheel", u], ["touchmove", u], ["pointerdown", u], ["keydown", v]];
|
|
2246
2246
|
for (const [h, f] of p) c.addEventListener(h, f, { capture: !0, passive: !0 });
|
|
2247
2247
|
return c.addEventListener("scroll", o, { capture: !0, passive: !0 }), () => {
|
|
2248
2248
|
for (const [h, f] of p) c.removeEventListener(h, f, { capture: !0 });
|
|
@@ -2251,19 +2251,19 @@ function ll(n, l) {
|
|
|
2251
2251
|
}, [n, l]), [t, r];
|
|
2252
2252
|
}
|
|
2253
2253
|
const tl = 64;
|
|
2254
|
-
function sl({ bar: n, leading: l, gap: t, icon: r, iconGap: c, search: s, more:
|
|
2254
|
+
function sl({ bar: n, leading: l, gap: t, icon: r, iconGap: c, search: s, more: m, globals: a, name: u, choice: v }) {
|
|
2255
2255
|
const o = [...s ? [r] : [], r, r, ...a], p = o.reduce((f, d) => f + d, 0) + c * (o.length - 1);
|
|
2256
|
-
return n - (l > 0 ? l + t : 0) - t - p + 0.01 < Math.min(tl,
|
|
2256
|
+
return n - (l > 0 ? l + t : 0) - t - p + 0.01 < Math.min(tl, u) + v;
|
|
2257
2257
|
}
|
|
2258
|
-
function zl({ title: n, back: l, navigation: t, search: r, searching: c, more: s = [], moreLabel:
|
|
2258
|
+
function zl({ title: n, back: l, navigation: t, search: r, searching: c, more: s = [], moreLabel: m = "More actions", globals: a, filter: u, primary: v, onRefresh: o, pullText: p, barHidden: h, children: f }) {
|
|
2259
2259
|
const d = v !== void 0 && "menu" in v && !v.menu.some((P) => P.offer.offered) ? void 0 : v, g = H(null), k = H(null), [x, C] = T(!1), [w, b] = T(null), [y, D] = T(null), Z = be(() => D(null), []), V = H(!1), M = H(null), R = H(null), z = H(null), q = s.some((P) => P.offer.offered), U = y !== null && q && c === void 0;
|
|
2260
|
-
en(
|
|
2261
|
-
const j =
|
|
2262
|
-
...
|
|
2260
|
+
en(u);
|
|
2261
|
+
const j = u === void 0 ? null : Xe(u), [le, ae] = T(!1), re = H(!1), ie = H(!1), oe = H(null), J = u === void 0 ? void 0 : {
|
|
2262
|
+
...u,
|
|
2263
2263
|
onChange: (P) => {
|
|
2264
|
-
re.current = !0,
|
|
2264
|
+
re.current = !0, u.onChange(P);
|
|
2265
2265
|
}
|
|
2266
|
-
}, fe = j === null ? "" : ` · ${j.label}`, ee =
|
|
2266
|
+
}, fe = j === null ? "" : ` · ${j.label}`, ee = u !== void 0 && u.options.length >= 2, [_, $] = T(!1), B = ee && q && _, ne = JSON.stringify([ee, q, B, r !== void 0, c !== void 0, l !== void 0, n, fe]), I = be(() => {
|
|
2267
2267
|
const P = M.current, E = R.current, K = z.current;
|
|
2268
2268
|
if (P === null || E === null || K === null || !ee) return null;
|
|
2269
2269
|
const W = (ke) => parseFloat(ke) || 0, te = getComputedStyle(P), pe = P.getBoundingClientRect().width;
|
|
@@ -2305,7 +2305,7 @@ function zl({ title: n, back: l, navigation: t, search: r, searching: c, more: s
|
|
|
2305
2305
|
const P = document.activeElement;
|
|
2306
2306
|
(P === document.body && oe.current !== null && !oe.current.isConnected || ie.current && (P === document.body || ((K = M.current) == null ? void 0 : K.contains(P)) === !0)) && ((te = B ? z.current : (W = R.current) == null ? void 0 : W.querySelector(".cms-filter-menu")) == null || te.focus()), ie.current = !1;
|
|
2307
2307
|
}, [B]);
|
|
2308
|
-
const N = B && j !== null &&
|
|
2308
|
+
const N = B && j !== null && u !== void 0 ? `${m}, ${Je(u)}` : m, O = Tn(k, o === void 0 ? null : () => {
|
|
2309
2309
|
x || (C(!0), o().finally(() => C(!1)));
|
|
2310
2310
|
}), Y = o === void 0 ? null : { distance: O, refreshing: x, text: p ?? null }, de = c !== void 0 || O > 0 || x || U || le, [Me, Ee] = ll(g, h === void 0 && !de), ue = !de && (h ?? Me);
|
|
2311
2311
|
return /* @__PURE__ */ i(
|
|
@@ -2392,7 +2392,7 @@ function zl({ title: n, back: l, navigation: t, search: r, searching: c, more: s
|
|
|
2392
2392
|
at: U ? y : null,
|
|
2393
2393
|
items: B && J !== void 0 ? [...s, ...Qe(J, J.label)] : s,
|
|
2394
2394
|
onClose: Z,
|
|
2395
|
-
label:
|
|
2395
|
+
label: m,
|
|
2396
2396
|
focus: "first"
|
|
2397
2397
|
}
|
|
2398
2398
|
),
|
package/package.json
CHANGED