@brucesantos/design-space 0.2.0 → 0.4.0
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 +86 -0
- package/README.md +152 -2
- package/dist/contrast-B8I8gWGa.js +288 -0
- package/dist/contrast-B8I8gWGa.js.map +1 -0
- package/dist/controls/params.d.ts +3 -0
- package/dist/controls/state.d.ts +2 -0
- package/dist/deploy/index.d.ts +7 -1
- package/dist/design-space.css +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1353 -830
- package/dist/index.js.map +1 -1
- package/dist/registry/index.d.ts +25 -4
- package/dist/shell/Controls.d.ts +6 -3
- package/dist/shell/Home.d.ts +2 -1
- package/dist/shell/Inspector.d.ts +5 -3
- package/dist/shell/Sidebar.d.ts +9 -2
- package/dist/shell/Topbar.d.ts +7 -5
- package/dist/shell/labels.d.ts +26 -0
- package/dist/testing/index.d.ts +4 -4
- package/dist/testing.js +8 -8
- package/dist/testing.js.map +1 -1
- package/dist/types/index.d.ts +57 -1
- package/package.json +2 -2
- package/dist/contrast-BXd_acxo.js +0 -260
- package/dist/contrast-BXd_acxo.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,190 +1,237 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { v as
|
|
4
|
-
import { C as
|
|
5
|
-
function
|
|
6
|
-
const t = new Map(e.scenarios.map((
|
|
7
|
-
e.
|
|
8
|
-
), l = e.modules.map((
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsxs as d, jsx as o, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { useState as F, useEffect as B, useMemo as T, useCallback as I, useContext as se, createContext as ie, useRef as q, forwardRef as ce } from "react";
|
|
3
|
+
import { S as de, v as le, P as v, N as oe, s as ue, c as he, g as pe } from "./contrast-B8I8gWGa.js";
|
|
4
|
+
import { C as _t, a as Ct, b as Tt, d as Pt, e as At, f as Lt, h as Et, i as Ft, j as $t, k as Dt, p as Rt, r as Ot, l as It, m as Bt, n as Wt } from "./contrast-B8I8gWGa.js";
|
|
5
|
+
function me(e) {
|
|
6
|
+
const t = new Map(e.scenarios.map((l) => [l.id, l])), n = new Map(
|
|
7
|
+
(e.components ?? []).map((l) => [l.id, l])
|
|
8
|
+
), r = new Map(e.personas.map((l) => [l.id, l])), i = new Map(e.fixtures.map((l) => [l.id, l])), a = new Map((e.rules ?? []).map((l) => [l.id, l])), s = new Map(e.modules.map((l) => [l.id, l])), c = new Map(
|
|
9
|
+
e.modules.flatMap((l) => (l.flows ?? []).map((g) => [g.id, g]))
|
|
10
|
+
), p = e.modules.map((l) => ({
|
|
11
|
+
module: l,
|
|
12
|
+
scenarios: e.scenarios.filter((g) => g.id.split(".")[0] === l.id)
|
|
13
|
+
})), h = new Set(p.flatMap((l) => l.scenarios.map((g) => g.id))), m = e.scenarios.filter((l) => !h.has(l.id)), b = (l) => l ? t.get(l) : void 0, u = (l) => l ? r.get(l) : void 0, S = (l, g) => {
|
|
14
|
+
if (!(!l || !g))
|
|
15
|
+
return n.get(l)?.fixtures?.find((k) => k.id === g);
|
|
16
|
+
}, w = (l = {}) => e.scenarios.filter(
|
|
17
|
+
(g) => l.includePorted || g.status !== "ported" || g.id === l.activeScenario
|
|
18
|
+
), C = (l) => l ? l.permissions ? l.permissions : u(l.persona)?.permissions ?? [] : [];
|
|
12
19
|
return {
|
|
13
20
|
product: e,
|
|
14
|
-
tree:
|
|
15
|
-
orphans:
|
|
16
|
-
issues:
|
|
17
|
-
scenario:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
tree: p,
|
|
22
|
+
orphans: m,
|
|
23
|
+
issues: le(e),
|
|
24
|
+
scenario: b,
|
|
25
|
+
component: (l) => l ? n.get(l) : void 0,
|
|
26
|
+
componentFixture: S,
|
|
27
|
+
resolveComponentFixture: (l, g) => {
|
|
28
|
+
const k = l ? n.get(l) : void 0, M = S(l, g), _ = S(l, k?.defaultFixture) ?? k?.fixtures?.[0];
|
|
29
|
+
return {
|
|
30
|
+
fixture: M ?? _,
|
|
31
|
+
requestedId: g,
|
|
32
|
+
didFallback: !!(g && !M)
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
persona: u,
|
|
36
|
+
fixture: (l) => l ? i.get(l) : void 0,
|
|
37
|
+
rule: (l) => l ? a.get(l) : void 0,
|
|
38
|
+
module: (l) => l ? s.get(l) : void 0,
|
|
39
|
+
flow: (l) => l ? c.get(l) : void 0,
|
|
40
|
+
rulesOf: (l) => (l?.rules ?? []).map((g) => a.get(g)).filter((g) => !!g),
|
|
41
|
+
permissionsOf: C,
|
|
42
|
+
scenariosForRoute: (l, g) => {
|
|
43
|
+
const k = l.split("?")[0];
|
|
44
|
+
return w(g).filter((M) => M.route.split("?")[0] === k);
|
|
45
|
+
},
|
|
46
|
+
activeScenarios: w,
|
|
47
|
+
treeFor: (l) => {
|
|
48
|
+
const g = new Set(w(l).map((k) => k.id));
|
|
49
|
+
return p.map((k) => ({
|
|
50
|
+
...k,
|
|
51
|
+
scenarios: k.scenarios.filter((M) => g.has(M.id))
|
|
52
|
+
}));
|
|
28
53
|
},
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
54
|
+
orphansFor: (l) => {
|
|
55
|
+
const g = new Set(w(l).map((k) => k.id));
|
|
56
|
+
return m.filter((k) => g.has(k.id));
|
|
57
|
+
},
|
|
58
|
+
search: (l, g) => {
|
|
59
|
+
const k = Q(l), M = w(g);
|
|
60
|
+
return k ? M.filter((_) => {
|
|
61
|
+
const $ = s.get(_.id.split(".")[0] ?? "")?.name ?? "";
|
|
62
|
+
return Q(
|
|
34
63
|
[
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
(
|
|
42
|
-
(
|
|
64
|
+
_.title,
|
|
65
|
+
_.id,
|
|
66
|
+
_.intent ?? "",
|
|
67
|
+
_.route,
|
|
68
|
+
$,
|
|
69
|
+
r.get(_.persona)?.name ?? "",
|
|
70
|
+
(_.tags ?? []).join(" "),
|
|
71
|
+
(_.expected ?? []).join(" ")
|
|
43
72
|
].join(" ")
|
|
44
|
-
).includes(
|
|
45
|
-
}) :
|
|
73
|
+
).includes(k);
|
|
74
|
+
}) : M;
|
|
46
75
|
},
|
|
47
|
-
byStatus: (
|
|
48
|
-
coverage: () => {
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
implemented: 0,
|
|
55
|
-
superseded: 0
|
|
56
|
-
};
|
|
57
|
-
for (const h of e.scenarios) u[h.status] += 1;
|
|
58
|
-
return u;
|
|
76
|
+
byStatus: (l) => e.scenarios.filter((g) => g.status === l),
|
|
77
|
+
coverage: (l) => {
|
|
78
|
+
const g = Object.fromEntries(
|
|
79
|
+
de.map((k) => [k, 0])
|
|
80
|
+
);
|
|
81
|
+
for (const k of w(l)) g[k.status] += 1;
|
|
82
|
+
return g;
|
|
59
83
|
}
|
|
60
84
|
};
|
|
61
85
|
}
|
|
62
|
-
function
|
|
86
|
+
function Q(e) {
|
|
63
87
|
return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim();
|
|
64
88
|
}
|
|
65
|
-
const
|
|
89
|
+
const ne = [
|
|
66
90
|
{ id: "fit", label: "Ajustar" },
|
|
67
91
|
{ id: "mobile", label: "Celular", width: 390, height: 844 },
|
|
68
92
|
{ id: "tablet", label: "Tablet", width: 834, height: 1112 },
|
|
69
93
|
{ id: "desktop", label: "Desktop", width: 1440, height: 900 },
|
|
70
94
|
{ id: "custom", label: "Personalizado" }
|
|
71
|
-
],
|
|
72
|
-
function
|
|
73
|
-
const n = new URLSearchParams(e),
|
|
95
|
+
], fe = [1, 1.25, 1.5, 2];
|
|
96
|
+
function be(e, t) {
|
|
97
|
+
const n = new URLSearchParams(e), r = n.get(v.component) ?? void 0, i = t.component(r), a = n.get(v.scenario) ?? void 0, s = i ? void 0 : t.scenario(a), c = n.get(v.fixture) ?? void 0, p = i ? c ?? t.componentFixture(i.id, i.defaultFixture)?.id ?? i.fixtures?.[0]?.id : void 0, h = n.get(v.network), m = Number(n.get(v.textScale));
|
|
74
98
|
return {
|
|
75
|
-
scenario:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
99
|
+
scenario: s?.id,
|
|
100
|
+
showPorted: n.get(v.showPorted) === "1",
|
|
101
|
+
component: i?.id,
|
|
102
|
+
persona: n.get(v.persona) ?? s?.persona,
|
|
103
|
+
fixture: i ? p : c ?? s?.fixture,
|
|
104
|
+
network: we(h) ? h : s?.network ?? "success",
|
|
105
|
+
viewport: n.get(v.viewport) ?? "fit",
|
|
106
|
+
customWidth: Ne(n.get(v.customWidth)),
|
|
107
|
+
themeMode: n.get(v.themeMode) ?? t.product.theme?.modes?.[0],
|
|
108
|
+
locale: n.get(v.locale) ?? t.product.theme?.locales?.[0],
|
|
109
|
+
dataSource: n.get(v.dataSource) ?? t.product.dataSources?.default ?? "fixtures",
|
|
110
|
+
chromeTheme: ke(n.get(v.chromeTheme)) ? n.get(v.chromeTheme) : "dark",
|
|
84
111
|
// Chrome visível por padrão. `?chrome=0` é o modo de revisão limpa e captura
|
|
85
112
|
// de tela, então precisa ser explícito para não sumir sem pedido.
|
|
86
|
-
chrome: n.get(
|
|
87
|
-
keyboardMode: n.get(
|
|
88
|
-
reducedMotion: n.get(
|
|
89
|
-
textScale:
|
|
90
|
-
inspector: n.get(
|
|
113
|
+
chrome: n.get(v.chrome) !== "0",
|
|
114
|
+
keyboardMode: n.get(v.keyboardMode) === "1",
|
|
115
|
+
reducedMotion: n.get(v.reducedMotion) === "1",
|
|
116
|
+
textScale: fe.includes(m) ? m : 1,
|
|
117
|
+
inspector: n.get(v.inspector) !== "0"
|
|
91
118
|
};
|
|
92
119
|
}
|
|
93
|
-
function
|
|
94
|
-
const n = new URLSearchParams(),
|
|
95
|
-
e.scenario && n.set(
|
|
96
|
-
const
|
|
97
|
-
e.themeMode && e.themeMode !==
|
|
98
|
-
const
|
|
99
|
-
e.locale && e.locale !==
|
|
100
|
-
const
|
|
101
|
-
e.dataSource && e.dataSource !==
|
|
102
|
-
const
|
|
103
|
-
return
|
|
120
|
+
function G(e, t) {
|
|
121
|
+
const n = new URLSearchParams(), r = t.scenario(e.scenario);
|
|
122
|
+
e.component ? n.set(v.component, e.component) : e.scenario && n.set(v.scenario, e.scenario), e.showPorted && n.set(v.showPorted, "1"), e.persona && e.persona !== r?.persona && n.set(v.persona, e.persona), e.component && e.fixture ? n.set(v.fixture, e.fixture) : e.fixture && e.fixture !== r?.fixture && n.set(v.fixture, e.fixture), e.network !== (r?.network ?? "success") && n.set(v.network, e.network), e.viewport !== "fit" && n.set(v.viewport, e.viewport), e.viewport === "custom" && e.customWidth && n.set(v.customWidth, String(e.customWidth));
|
|
123
|
+
const i = t.product.theme?.modes?.[0];
|
|
124
|
+
e.themeMode && e.themeMode !== i && n.set(v.themeMode, e.themeMode);
|
|
125
|
+
const a = t.product.theme?.locales?.[0];
|
|
126
|
+
e.locale && e.locale !== a && n.set(v.locale, e.locale);
|
|
127
|
+
const s = t.product.dataSources?.default ?? "fixtures";
|
|
128
|
+
e.dataSource && e.dataSource !== s && n.set(v.dataSource, e.dataSource), e.chromeTheme === "light" && n.set(v.chromeTheme, "light"), e.chrome || n.set(v.chrome, "0"), e.keyboardMode && n.set(v.keyboardMode, "1"), e.reducedMotion && n.set(v.reducedMotion, "1"), e.textScale !== 1 && n.set(v.textScale, String(e.textScale)), e.inspector || n.set(v.inspector, "0");
|
|
129
|
+
const c = n.toString();
|
|
130
|
+
return c ? `?${c}` : "";
|
|
104
131
|
}
|
|
105
|
-
function
|
|
106
|
-
const [t, n] =
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
return window.addEventListener("popstate",
|
|
132
|
+
function ge(e) {
|
|
133
|
+
const [t, n] = F(() => X());
|
|
134
|
+
B(() => {
|
|
135
|
+
const m = () => n(X());
|
|
136
|
+
return window.addEventListener("popstate", m), () => window.removeEventListener("popstate", m);
|
|
110
137
|
}, []);
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
}, []),
|
|
115
|
-
(
|
|
116
|
-
const
|
|
117
|
-
|
|
138
|
+
const r = T(() => be(t.search, e), [t.search, e]), i = I((m, b, u = !1) => {
|
|
139
|
+
const S = `${m}${b}`;
|
|
140
|
+
u ? window.history.replaceState(null, "", S) : window.history.pushState(null, "", S), n({ path: m, search: b });
|
|
141
|
+
}, []), a = I(
|
|
142
|
+
(m) => {
|
|
143
|
+
const b = { ...r, ...m };
|
|
144
|
+
i(t.path, G(b, e), !0);
|
|
145
|
+
},
|
|
146
|
+
[r, t.path, i, e]
|
|
147
|
+
), s = I(
|
|
148
|
+
(m, b) => {
|
|
149
|
+
const [u, S] = m.split("?"), w = u || "/", C = S ? `?${S}` : t.search;
|
|
150
|
+
i(w, C, b?.replace ?? !1);
|
|
118
151
|
},
|
|
119
|
-
[
|
|
120
|
-
),
|
|
121
|
-
(
|
|
122
|
-
const
|
|
123
|
-
|
|
152
|
+
[t.search, i]
|
|
153
|
+
), c = I(
|
|
154
|
+
(m) => {
|
|
155
|
+
const b = e.scenario(m);
|
|
156
|
+
if (!b) return;
|
|
157
|
+
const u = {
|
|
158
|
+
...r,
|
|
159
|
+
scenario: b.id,
|
|
160
|
+
showPorted: r.showPorted,
|
|
161
|
+
component: void 0,
|
|
162
|
+
persona: b.persona,
|
|
163
|
+
fixture: b.fixture,
|
|
164
|
+
network: b.network ?? "success"
|
|
165
|
+
};
|
|
166
|
+
i(b.route, G(u, e), !1);
|
|
124
167
|
},
|
|
125
|
-
[
|
|
126
|
-
),
|
|
127
|
-
(
|
|
128
|
-
const
|
|
129
|
-
if (!
|
|
130
|
-
const
|
|
131
|
-
...
|
|
132
|
-
scenario:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
168
|
+
[r, i, e]
|
|
169
|
+
), p = I(
|
|
170
|
+
(m) => {
|
|
171
|
+
const b = e.component(m);
|
|
172
|
+
if (!b) return;
|
|
173
|
+
const u = {
|
|
174
|
+
...r,
|
|
175
|
+
scenario: void 0,
|
|
176
|
+
component: b.id,
|
|
177
|
+
persona: void 0,
|
|
178
|
+
fixture: void 0,
|
|
179
|
+
network: "success"
|
|
136
180
|
};
|
|
137
|
-
|
|
181
|
+
u.fixture = e.componentFixture(b.id, b.defaultFixture)?.id ?? b.fixtures?.[0]?.id, i("/", G(u, e), !1);
|
|
138
182
|
},
|
|
139
|
-
[
|
|
140
|
-
),
|
|
141
|
-
return { location: t, controls:
|
|
183
|
+
[r, i, e]
|
|
184
|
+
), h = T(() => ve(r), [r]);
|
|
185
|
+
return { location: t, controls: r, viewport: h, setControls: a, navigate: s, openScenario: c, openComponent: p };
|
|
142
186
|
}
|
|
143
|
-
function
|
|
144
|
-
const t =
|
|
187
|
+
function ve(e) {
|
|
188
|
+
const t = ne.find((n) => n.id === e.viewport);
|
|
145
189
|
return e.viewport === "custom" ? { id: "custom", label: "Personalizado", width: e.customWidth ?? 1024 } : t ?? { id: "fit", label: "Ajustar" };
|
|
146
190
|
}
|
|
147
|
-
function
|
|
191
|
+
function X() {
|
|
148
192
|
return typeof window > "u" ? { path: "/", search: "" } : { path: window.location.pathname, search: window.location.search };
|
|
149
193
|
}
|
|
150
|
-
function
|
|
151
|
-
return e !== null &&
|
|
194
|
+
function we(e) {
|
|
195
|
+
return e !== null && oe.includes(e);
|
|
196
|
+
}
|
|
197
|
+
function ke(e) {
|
|
198
|
+
return e === "dark" || e === "light";
|
|
152
199
|
}
|
|
153
|
-
function
|
|
200
|
+
function Ne(e) {
|
|
154
201
|
if (!e) return;
|
|
155
202
|
const t = Number.parseInt(e, 10);
|
|
156
203
|
return Number.isFinite(t) && t > 0 ? t : void 0;
|
|
157
204
|
}
|
|
158
|
-
function
|
|
159
|
-
const n = e.split("/").filter(Boolean),
|
|
160
|
-
for (const [
|
|
161
|
-
if (
|
|
162
|
-
return
|
|
163
|
-
const
|
|
164
|
-
if (
|
|
165
|
-
if (
|
|
166
|
-
|
|
205
|
+
function ye(e, t) {
|
|
206
|
+
const n = e.split("/").filter(Boolean), r = Se(t).split("/").filter(Boolean), i = {};
|
|
207
|
+
for (const [a, s] of n.entries()) {
|
|
208
|
+
if (s === "*")
|
|
209
|
+
return i["*"] = r.slice(a).join("/"), i;
|
|
210
|
+
const c = r[a];
|
|
211
|
+
if (c === void 0) return null;
|
|
212
|
+
if (s.startsWith(":")) {
|
|
213
|
+
i[s.slice(1)] = c;
|
|
167
214
|
continue;
|
|
168
215
|
}
|
|
169
|
-
if (
|
|
216
|
+
if (s !== c) return null;
|
|
170
217
|
}
|
|
171
|
-
return n.length !==
|
|
218
|
+
return n.length !== r.length ? null : i;
|
|
172
219
|
}
|
|
173
|
-
function
|
|
174
|
-
const n = [...e].sort((
|
|
175
|
-
for (const
|
|
176
|
-
const
|
|
177
|
-
if (
|
|
220
|
+
function xe(e, t) {
|
|
221
|
+
const n = [...e].sort((r, i) => Z(i.path) - Z(r.path));
|
|
222
|
+
for (const r of n) {
|
|
223
|
+
const i = ye(r.path, t);
|
|
224
|
+
if (i) return { definition: r, params: i };
|
|
178
225
|
}
|
|
179
226
|
}
|
|
180
|
-
function
|
|
227
|
+
function Z(e) {
|
|
181
228
|
const t = e.split("/").filter(Boolean);
|
|
182
229
|
let n = t.length;
|
|
183
|
-
for (const
|
|
184
|
-
|
|
230
|
+
for (const r of t)
|
|
231
|
+
r === "*" ? n -= 2 : r.startsWith(":") ? n += 1 : n += 4;
|
|
185
232
|
return n;
|
|
186
233
|
}
|
|
187
|
-
function
|
|
234
|
+
function Se(e) {
|
|
188
235
|
const t = e.split("?")[0] ?? e;
|
|
189
236
|
try {
|
|
190
237
|
return decodeURI(t);
|
|
@@ -192,17 +239,17 @@ function ge(e) {
|
|
|
192
239
|
return t;
|
|
193
240
|
}
|
|
194
241
|
}
|
|
195
|
-
const
|
|
196
|
-
class
|
|
242
|
+
const Me = 2500;
|
|
243
|
+
class _e extends Error {
|
|
197
244
|
constructor(t) {
|
|
198
245
|
super(`Falha de rede simulada no cenário "${t}".`), this.name = "SimulatedNetworkError";
|
|
199
246
|
}
|
|
200
247
|
}
|
|
201
|
-
function
|
|
248
|
+
function Y(e) {
|
|
202
249
|
if (e)
|
|
203
250
|
return typeof e.data == "function" ? e.data() : e.data;
|
|
204
251
|
}
|
|
205
|
-
const
|
|
252
|
+
const J = {
|
|
206
253
|
id: "fixtures",
|
|
207
254
|
label: "Fixtures",
|
|
208
255
|
load: async ({ scenario: e, fixture: t, network: n }) => {
|
|
@@ -210,66 +257,66 @@ const O = {
|
|
|
210
257
|
case "empty":
|
|
211
258
|
return null;
|
|
212
259
|
case "error":
|
|
213
|
-
throw new
|
|
260
|
+
throw new _e(e.id);
|
|
214
261
|
case "loading":
|
|
215
262
|
return new Promise(() => {
|
|
216
263
|
});
|
|
217
264
|
case "slow":
|
|
218
|
-
return await
|
|
265
|
+
return await Ce(Me), Y(t);
|
|
219
266
|
default:
|
|
220
|
-
return
|
|
267
|
+
return Y(t);
|
|
221
268
|
}
|
|
222
269
|
}
|
|
223
270
|
};
|
|
224
|
-
function
|
|
225
|
-
const { id: t, label: n, baseUrl:
|
|
271
|
+
function ft(e) {
|
|
272
|
+
const { id: t, label: n, baseUrl: r, path: i, init: a, fallbackToFixture: s = !0 } = e;
|
|
226
273
|
return {
|
|
227
274
|
id: t,
|
|
228
275
|
label: n,
|
|
229
|
-
load: async (
|
|
230
|
-
const
|
|
276
|
+
load: async (c) => {
|
|
277
|
+
const p = new URL(i ? i(c) : c.scenario.route, r);
|
|
231
278
|
try {
|
|
232
|
-
const
|
|
233
|
-
if (!
|
|
234
|
-
return await
|
|
235
|
-
} catch (
|
|
236
|
-
if (
|
|
237
|
-
throw new Error(`Adapter "${t}" falhou em ${
|
|
279
|
+
const h = await fetch(p, a);
|
|
280
|
+
if (!h.ok) throw new Error(`${h.status} ${h.statusText}`);
|
|
281
|
+
return await h.json();
|
|
282
|
+
} catch (h) {
|
|
283
|
+
if (s) return Y(c.fixture);
|
|
284
|
+
throw new Error(`Adapter "${t}" falhou em ${p.toString()}`, { cause: h });
|
|
238
285
|
}
|
|
239
286
|
}
|
|
240
287
|
};
|
|
241
288
|
}
|
|
242
|
-
function
|
|
289
|
+
function Ce(e) {
|
|
243
290
|
return new Promise((t) => setTimeout(t, e));
|
|
244
291
|
}
|
|
245
|
-
function
|
|
246
|
-
const { scenario: t, fixture: n, network:
|
|
292
|
+
function Te(e) {
|
|
293
|
+
const { scenario: t, fixture: n, network: r, adapter: i } = e, [a, s] = F({
|
|
247
294
|
data: void 0,
|
|
248
295
|
isLoading: !!t,
|
|
249
296
|
error: void 0
|
|
250
297
|
});
|
|
251
|
-
return
|
|
298
|
+
return B(() => {
|
|
252
299
|
if (!t) {
|
|
253
|
-
|
|
300
|
+
s({ data: void 0, isLoading: !1, error: void 0 });
|
|
254
301
|
return;
|
|
255
302
|
}
|
|
256
|
-
let
|
|
257
|
-
|
|
258
|
-
const
|
|
259
|
-
return Promise.resolve(
|
|
260
|
-
|
|
261
|
-
}).catch((
|
|
262
|
-
|
|
303
|
+
let c = !0;
|
|
304
|
+
s({ data: void 0, isLoading: !0, error: void 0 });
|
|
305
|
+
const p = i ?? J;
|
|
306
|
+
return Promise.resolve(p.load({ scenario: t, fixture: n, network: r })).then((h) => {
|
|
307
|
+
c && s({ data: h, isLoading: !1, error: void 0 });
|
|
308
|
+
}).catch((h) => {
|
|
309
|
+
c && s({
|
|
263
310
|
data: void 0,
|
|
264
311
|
isLoading: !1,
|
|
265
|
-
error:
|
|
312
|
+
error: h instanceof Error ? h : new Error(String(h))
|
|
266
313
|
});
|
|
267
314
|
}), () => {
|
|
268
|
-
|
|
315
|
+
c = !1;
|
|
269
316
|
};
|
|
270
|
-
}, [t, n,
|
|
317
|
+
}, [t, n, r, i]), a;
|
|
271
318
|
}
|
|
272
|
-
const
|
|
319
|
+
const Pe = {
|
|
273
320
|
a: "link",
|
|
274
321
|
article: "article",
|
|
275
322
|
aside: "complementary",
|
|
@@ -303,7 +350,7 @@ const ye = {
|
|
|
303
350
|
th: "columnheader",
|
|
304
351
|
tr: "row",
|
|
305
352
|
ul: "list"
|
|
306
|
-
},
|
|
353
|
+
}, Ae = {
|
|
307
354
|
button: "button",
|
|
308
355
|
checkbox: "checkbox",
|
|
309
356
|
email: "textbox",
|
|
@@ -318,65 +365,65 @@ const ye = {
|
|
|
318
365
|
text: "textbox",
|
|
319
366
|
url: "textbox"
|
|
320
367
|
};
|
|
321
|
-
function
|
|
368
|
+
function Le(e) {
|
|
322
369
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
323
|
-
const { name: t, nameFrom: n } =
|
|
370
|
+
const { name: t, nameFrom: n } = Fe(e);
|
|
324
371
|
return {
|
|
325
|
-
role:
|
|
372
|
+
role: Ee(e),
|
|
326
373
|
name: t,
|
|
327
374
|
nameFrom: n,
|
|
328
|
-
description:
|
|
329
|
-
states:
|
|
330
|
-
selector:
|
|
375
|
+
description: $e(e),
|
|
376
|
+
states: De(e),
|
|
377
|
+
selector: Ie(e),
|
|
331
378
|
hiddenFromTabOrder: e.tabIndex < 0,
|
|
332
|
-
hiddenFromAssistiveTech:
|
|
379
|
+
hiddenFromAssistiveTech: Re(e)
|
|
333
380
|
};
|
|
334
381
|
}
|
|
335
|
-
function
|
|
382
|
+
function Ee(e) {
|
|
336
383
|
const t = e.getAttribute("role");
|
|
337
384
|
if (t) return t.split(/\s+/)[0] ?? t;
|
|
338
385
|
const n = e.tagName.toLowerCase();
|
|
339
386
|
if (n === "input") {
|
|
340
|
-
const
|
|
341
|
-
return
|
|
387
|
+
const r = e.type.toLowerCase();
|
|
388
|
+
return Ae[r] ?? "textbox";
|
|
342
389
|
}
|
|
343
|
-
return n === "a" && !e.hasAttribute("href") ? "generic" :
|
|
390
|
+
return n === "a" && !e.hasAttribute("href") ? "generic" : Pe[n] ?? "generic";
|
|
344
391
|
}
|
|
345
|
-
function
|
|
392
|
+
function Fe(e) {
|
|
346
393
|
const t = e.getAttribute("aria-labelledby");
|
|
347
394
|
if (t) {
|
|
348
|
-
const
|
|
349
|
-
if (
|
|
395
|
+
const s = t.split(/\s+/).map((c) => e.ownerDocument.getElementById(c)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
|
|
396
|
+
if (s) return { name: s, nameFrom: "aria-labelledby" };
|
|
350
397
|
}
|
|
351
398
|
const n = e.getAttribute("aria-label")?.trim();
|
|
352
399
|
if (n) return { name: n, nameFrom: "aria-label" };
|
|
353
400
|
if (e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement) {
|
|
354
|
-
const
|
|
355
|
-
if (
|
|
401
|
+
const s = Array.from(e.labels ?? []).map((c) => c.textContent?.trim() ?? "").filter(Boolean);
|
|
402
|
+
if (s.length) return { name: s.join(" "), nameFrom: "label" };
|
|
356
403
|
}
|
|
357
404
|
if (e instanceof HTMLImageElement) {
|
|
358
|
-
const
|
|
359
|
-
if (
|
|
405
|
+
const s = e.getAttribute("alt");
|
|
406
|
+
if (s !== null) return { name: s, nameFrom: "alt" };
|
|
360
407
|
}
|
|
361
|
-
const
|
|
362
|
-
return
|
|
408
|
+
const r = e.getAttribute("title")?.trim(), i = Oe(e);
|
|
409
|
+
return i ? { name: i, nameFrom: "content" } : r ? { name: r, nameFrom: "title" } : e instanceof HTMLInputElement && e.value ? { name: e.value, nameFrom: "value" } : e.getAttribute("placeholder")?.trim() ? { name: "", nameFrom: "none" } : { name: "", nameFrom: "none" };
|
|
363
410
|
}
|
|
364
|
-
function
|
|
411
|
+
function $e(e) {
|
|
365
412
|
const t = e.getAttribute("aria-describedby");
|
|
366
413
|
if (t) {
|
|
367
|
-
const n = t.split(/\s+/).map((
|
|
414
|
+
const n = t.split(/\s+/).map((r) => e.ownerDocument.getElementById(r)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
|
|
368
415
|
if (n) return n;
|
|
369
416
|
}
|
|
370
417
|
return e.getAttribute("aria-description")?.trim() || void 0;
|
|
371
418
|
}
|
|
372
|
-
function
|
|
373
|
-
const t = [], n = (
|
|
374
|
-
const
|
|
375
|
-
|
|
419
|
+
function De(e) {
|
|
420
|
+
const t = [], n = (r, i = r.replace("aria-", "")) => {
|
|
421
|
+
const a = e.getAttribute(r);
|
|
422
|
+
a !== null && a !== "false" && t.push(a === "true" || a === "" ? i : `${i}=${a}`);
|
|
376
423
|
};
|
|
377
424
|
return e.disabled && t.push("disabled"), e.getAttribute("aria-disabled") === "true" && t.push("disabled"), e.required && t.push("required"), e.readOnly && t.push("readonly"), e.checked && t.push("checked"), n("aria-expanded"), n("aria-selected"), n("aria-checked"), n("aria-pressed"), n("aria-current"), n("aria-invalid"), n("aria-busy"), n("aria-live"), n("aria-haspopup"), n("aria-level", "level"), e.ownerDocument.activeElement === e && t.push("focused"), [...new Set(t)];
|
|
378
425
|
}
|
|
379
|
-
function
|
|
426
|
+
function Re(e) {
|
|
380
427
|
let t = e;
|
|
381
428
|
for (; t; ) {
|
|
382
429
|
if (t.getAttribute("aria-hidden") === "true" || t.hasAttribute("hidden")) return !0;
|
|
@@ -384,21 +431,21 @@ function Ee(e) {
|
|
|
384
431
|
}
|
|
385
432
|
return !1;
|
|
386
433
|
}
|
|
387
|
-
function
|
|
434
|
+
function Oe(e) {
|
|
388
435
|
const t = e.cloneNode(!0);
|
|
389
436
|
for (const n of t.querySelectorAll("[aria-hidden='true'],[hidden]"))
|
|
390
437
|
n.remove();
|
|
391
438
|
return (t.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 160);
|
|
392
439
|
}
|
|
393
|
-
function
|
|
440
|
+
function Ie(e) {
|
|
394
441
|
const t = e.tagName.toLowerCase();
|
|
395
442
|
if (e.id) return `${t}#${e.id}`;
|
|
396
443
|
const n = e.getAttribute("data-testid");
|
|
397
444
|
if (n) return `${t}[data-testid="${n}"]`;
|
|
398
|
-
const
|
|
399
|
-
return
|
|
445
|
+
const r = Array.from(e.classList).slice(0, 2);
|
|
446
|
+
return r.length ? `${t}.${r.join(".")}` : t;
|
|
400
447
|
}
|
|
401
|
-
function
|
|
448
|
+
function Be(e = document) {
|
|
402
449
|
const t = [
|
|
403
450
|
"a[href]",
|
|
404
451
|
"button",
|
|
@@ -411,41 +458,42 @@ function Fe(e = document) {
|
|
|
411
458
|
].join(",");
|
|
412
459
|
return Array.from(e.querySelectorAll(t)).filter((n) => {
|
|
413
460
|
if (n.tabIndex < 0 || n.disabled || n.getAttribute("aria-hidden") === "true") return !1;
|
|
414
|
-
const
|
|
415
|
-
return
|
|
461
|
+
const r = window.getComputedStyle(n);
|
|
462
|
+
return r.display === "none" || r.visibility === "hidden" ? !1 : n.offsetWidth > 0 || n.offsetHeight > 0 || n === document.activeElement;
|
|
416
463
|
});
|
|
417
464
|
}
|
|
418
|
-
function
|
|
419
|
-
const [n,
|
|
420
|
-
const
|
|
421
|
-
if (!
|
|
422
|
-
|
|
465
|
+
function We(e, t) {
|
|
466
|
+
const [n, r] = F(), [i, a] = F([]), s = I(() => {
|
|
467
|
+
const c = t.current;
|
|
468
|
+
if (!c) {
|
|
469
|
+
a([]);
|
|
423
470
|
return;
|
|
424
471
|
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
index:
|
|
428
|
-
element:
|
|
429
|
-
rect:
|
|
430
|
-
forcedOrder:
|
|
472
|
+
a(
|
|
473
|
+
Be(c).map((p, h) => ({
|
|
474
|
+
index: h + 1,
|
|
475
|
+
element: p,
|
|
476
|
+
rect: p.getBoundingClientRect(),
|
|
477
|
+
forcedOrder: p.tabIndex > 0
|
|
431
478
|
}))
|
|
432
479
|
);
|
|
433
480
|
}, [t]);
|
|
434
|
-
return
|
|
481
|
+
return B(() => {
|
|
435
482
|
if (!e) {
|
|
436
|
-
|
|
483
|
+
r(void 0), a([]);
|
|
437
484
|
return;
|
|
438
485
|
}
|
|
439
|
-
const
|
|
440
|
-
document.addEventListener("focusin",
|
|
441
|
-
const
|
|
442
|
-
return
|
|
443
|
-
document.removeEventListener("focusin",
|
|
486
|
+
const c = () => r(Le(document.activeElement));
|
|
487
|
+
document.addEventListener("focusin", c), window.addEventListener("resize", s), window.addEventListener("scroll", s, !0), c(), s();
|
|
488
|
+
const p = t.current, h = p ? new MutationObserver(() => s()) : void 0;
|
|
489
|
+
return h?.observe(p, { childList: !0, subtree: !0, attributes: !0 }), () => {
|
|
490
|
+
document.removeEventListener("focusin", c), window.removeEventListener("resize", s), window.removeEventListener("scroll", s, !0), h?.disconnect();
|
|
444
491
|
};
|
|
445
|
-
}, [e,
|
|
492
|
+
}, [e, s, t]), { focused: n, tabStops: i, refresh: s };
|
|
446
493
|
}
|
|
447
|
-
const
|
|
494
|
+
const E = {
|
|
448
495
|
status: {
|
|
496
|
+
ported: "Portado — não validado",
|
|
449
497
|
proposed: "Proposta",
|
|
450
498
|
"in-review": "Em revisão",
|
|
451
499
|
approved: "Aprovado",
|
|
@@ -454,6 +502,7 @@ const S = {
|
|
|
454
502
|
superseded: "Superado"
|
|
455
503
|
},
|
|
456
504
|
statusMeaning: {
|
|
505
|
+
ported: "Veio do sistema existente, mas não foi validado e não representa compromisso de implementação.",
|
|
457
506
|
proposed: "Exploração ainda não aprovada.",
|
|
458
507
|
"in-review": "Aberto para validação de design, negócio ou cliente.",
|
|
459
508
|
approved: "Referência autorizada, registrada por URL de commit.",
|
|
@@ -481,30 +530,48 @@ const S = {
|
|
|
481
530
|
custom: "Personalizado"
|
|
482
531
|
},
|
|
483
532
|
topbar: {
|
|
533
|
+
homeTitle: (e) => `Ir para a página inicial de ${e}`,
|
|
484
534
|
toggleNav: "Mostrar ou ocultar a navegação",
|
|
485
535
|
copyLink: "Copiar link",
|
|
486
536
|
copied: "Link copiado",
|
|
487
537
|
copyPrompt: "Copie o link do cenário:",
|
|
488
538
|
cleanReview: "Revisão limpa",
|
|
489
|
-
cleanReviewTitle: "
|
|
539
|
+
cleanReviewTitle: "Abrir a situação em uma nova aba, sem o chrome do Design Space",
|
|
490
540
|
panel: "Painel",
|
|
541
|
+
lightMode: "Modo claro",
|
|
542
|
+
darkMode: "Modo escuro",
|
|
491
543
|
branchTitle: (e) => `Branch: ${e}`,
|
|
492
544
|
commitTitle: (e) => `Commit: ${e}`,
|
|
493
545
|
envTitle: (e) => `Ambiente: ${e}`
|
|
494
546
|
},
|
|
495
547
|
sidebar: {
|
|
496
548
|
region: "Cenários do produto",
|
|
549
|
+
flowsTab: "Fluxos",
|
|
550
|
+
componentsTab: "Componentes",
|
|
497
551
|
searchPlaceholder: "Buscar situação…",
|
|
498
552
|
searchLabel: "Buscar cenário pelo vocabulário do produto",
|
|
553
|
+
componentSearchPlaceholder: "Buscar componente…",
|
|
554
|
+
componentSearchLabel: "Buscar componente do produto",
|
|
555
|
+
searchShortcut: "⌘K",
|
|
499
556
|
noMatch: (e) => `Nenhuma situação para "${e}".`,
|
|
500
557
|
matchCount: (e) => `${e} ${e === 1 ? "situação" : "situações"}.`,
|
|
558
|
+
noComponentMatch: (e) => `Nenhum componente para "${e}".`,
|
|
559
|
+
componentMatchCount: (e) => `${e} ${e === 1 ? "componente" : "componentes"}.`,
|
|
560
|
+
showPorted: "Mostrar portados",
|
|
561
|
+
activePorted: "Aberto por link direto; oculto do trabalho ativo",
|
|
501
562
|
emptyModule: "Nenhum cenário ainda.",
|
|
502
|
-
|
|
563
|
+
emptyComponents: "O produto ainda não registrou componentes.",
|
|
564
|
+
withoutModule: "Sem módulo",
|
|
565
|
+
scope: "Escopo ativo",
|
|
566
|
+
scopeData: "Dados",
|
|
567
|
+
scopePersona: "Persona",
|
|
568
|
+
scopeNetwork: "Rede"
|
|
503
569
|
},
|
|
504
570
|
controls: {
|
|
505
571
|
region: "Controles do cenário",
|
|
506
572
|
persona: "Persona",
|
|
507
573
|
fixture: "Dados",
|
|
574
|
+
componentFixture: "Dados do componente",
|
|
508
575
|
network: "Rede",
|
|
509
576
|
viewport: "Viewport",
|
|
510
577
|
customWidth: "Largura personalizada em pixels",
|
|
@@ -527,6 +594,11 @@ const S = {
|
|
|
527
594
|
tabDiagnostics: "Diagnóstico",
|
|
528
595
|
diagnosticsWithErrors: (e) => `Diagnóstico (${e})`,
|
|
529
596
|
noScenario: "Nenhum cenário ativo. Escolha uma situação na navegação para ver contexto, regras e critérios.",
|
|
597
|
+
componentReference: "Componente",
|
|
598
|
+
componentGroup: "Grupo",
|
|
599
|
+
componentFixture: "Fixture ativa",
|
|
600
|
+
componentFixtureDescription: "Descrição da fixture",
|
|
601
|
+
componentFixtureFallback: (e, t) => `A fixture \`${e}\` não existe neste componente. Exibindo \`${t}\` como fallback.`,
|
|
530
602
|
situation: "Situação",
|
|
531
603
|
reproduction: "Reprodução",
|
|
532
604
|
id: "Id",
|
|
@@ -576,253 +648,605 @@ const S = {
|
|
|
576
648
|
withoutModule: "Sem módulo",
|
|
577
649
|
withoutModuleHint: "O prefixo do id não corresponde a nenhum módulo registrado, então estas situações não aparecem na navegação por módulo.",
|
|
578
650
|
emptyModule: "Nenhuma situação registrada neste módulo ainda.",
|
|
579
|
-
keyboardBadge: "teclado"
|
|
651
|
+
keyboardBadge: "teclado",
|
|
652
|
+
noActiveWork: "Não há trabalho ativo. As referências portadas continuam registradas e podem ser exibidas com “Mostrar portados”."
|
|
580
653
|
},
|
|
581
654
|
shell: {
|
|
582
655
|
restoreChrome: "Mostrar controles",
|
|
583
656
|
noRoute: "Nenhuma rota para este endereço",
|
|
584
657
|
noRouteHint: "não casa com nenhuma rota declarada. Escolha uma situação na navegação."
|
|
585
658
|
}
|
|
659
|
+
}, bt = {
|
|
660
|
+
status: {
|
|
661
|
+
ported: "Ported — not validated",
|
|
662
|
+
proposed: "Proposed",
|
|
663
|
+
"in-review": "In review",
|
|
664
|
+
approved: "Approved",
|
|
665
|
+
"in-implementation": "In implementation",
|
|
666
|
+
implemented: "Implemented",
|
|
667
|
+
superseded: "Superseded"
|
|
668
|
+
},
|
|
669
|
+
statusMeaning: {
|
|
670
|
+
ported: "Imported from the existing system, but not validated and not an implementation commitment.",
|
|
671
|
+
proposed: "Exploration that has not been approved yet.",
|
|
672
|
+
"in-review": "Open for design, business, or client validation.",
|
|
673
|
+
approved: "Authorized reference, recorded with a commit URL.",
|
|
674
|
+
"in-implementation": "Linked to active engineering work.",
|
|
675
|
+
implemented: "Available in the real product and validated.",
|
|
676
|
+
superseded: "Kept for history or replaced by another decision."
|
|
677
|
+
},
|
|
678
|
+
network: {
|
|
679
|
+
success: "Success",
|
|
680
|
+
loading: "Loading",
|
|
681
|
+
empty: "Empty",
|
|
682
|
+
error: "Error",
|
|
683
|
+
slow: "Slow"
|
|
684
|
+
},
|
|
685
|
+
keyboard: {
|
|
686
|
+
full: "Journey can be completed with keyboard only",
|
|
687
|
+
partial: "Partially operable with keyboard",
|
|
688
|
+
"not-applicable": "Not applicable"
|
|
689
|
+
},
|
|
690
|
+
viewport: {
|
|
691
|
+
fit: "Fit",
|
|
692
|
+
mobile: "Mobile",
|
|
693
|
+
tablet: "Tablet",
|
|
694
|
+
desktop: "Desktop",
|
|
695
|
+
custom: "Custom"
|
|
696
|
+
},
|
|
697
|
+
topbar: {
|
|
698
|
+
homeTitle: (e) => `Go to ${e} home`,
|
|
699
|
+
toggleNav: "Show or hide navigation",
|
|
700
|
+
copyLink: "Copy link",
|
|
701
|
+
copied: "Link copied",
|
|
702
|
+
copyPrompt: "Copy the scenario link:",
|
|
703
|
+
cleanReview: "Clean review",
|
|
704
|
+
cleanReviewTitle: "Open this state in a new tab without the Design Space chrome",
|
|
705
|
+
panel: "Panel",
|
|
706
|
+
lightMode: "Light mode",
|
|
707
|
+
darkMode: "Dark mode",
|
|
708
|
+
branchTitle: (e) => `Branch: ${e}`,
|
|
709
|
+
commitTitle: (e) => `Commit: ${e}`,
|
|
710
|
+
envTitle: (e) => `Environment: ${e}`
|
|
711
|
+
},
|
|
712
|
+
sidebar: {
|
|
713
|
+
region: "Product scenarios",
|
|
714
|
+
flowsTab: "Flows",
|
|
715
|
+
componentsTab: "Components",
|
|
716
|
+
searchPlaceholder: "Search scenarios…",
|
|
717
|
+
searchLabel: "Search scenarios using product language",
|
|
718
|
+
componentSearchPlaceholder: "Search components…",
|
|
719
|
+
componentSearchLabel: "Search product components",
|
|
720
|
+
searchShortcut: "⌘K",
|
|
721
|
+
noMatch: (e) => `No scenarios found for "${e}".`,
|
|
722
|
+
matchCount: (e) => `${e} ${e === 1 ? "scenario" : "scenarios"}.`,
|
|
723
|
+
noComponentMatch: (e) => `No components found for "${e}".`,
|
|
724
|
+
componentMatchCount: (e) => `${e} ${e === 1 ? "component" : "components"}.`,
|
|
725
|
+
showPorted: "Show ported",
|
|
726
|
+
activePorted: "Opened by direct link; hidden from active work",
|
|
727
|
+
emptyModule: "No scenarios yet.",
|
|
728
|
+
emptyComponents: "The product has not registered any components yet.",
|
|
729
|
+
withoutModule: "No module",
|
|
730
|
+
scope: "Active scope",
|
|
731
|
+
scopeData: "Data",
|
|
732
|
+
scopePersona: "Persona",
|
|
733
|
+
scopeNetwork: "Network"
|
|
734
|
+
},
|
|
735
|
+
controls: {
|
|
736
|
+
region: "Scenario controls",
|
|
737
|
+
persona: "Persona",
|
|
738
|
+
fixture: "Data",
|
|
739
|
+
componentFixture: "Component data",
|
|
740
|
+
network: "Network",
|
|
741
|
+
viewport: "Viewport",
|
|
742
|
+
customWidth: "Custom width in pixels",
|
|
743
|
+
theme: "Theme",
|
|
744
|
+
locale: "Language",
|
|
745
|
+
dataSource: "Source",
|
|
746
|
+
fixturesOption: "Fixtures",
|
|
747
|
+
a11y: "Accessibility",
|
|
748
|
+
keyboardMode: "Keyboard",
|
|
749
|
+
keyboardModeTitle: "Complete the journey with keyboard only, showing focus and tab order",
|
|
750
|
+
reducedMotion: "Motion",
|
|
751
|
+
reducedMotionTitle: "Reduce motion inside the stage",
|
|
752
|
+
textScale: "Text size",
|
|
753
|
+
none: "—"
|
|
754
|
+
},
|
|
755
|
+
inspector: {
|
|
756
|
+
region: "Context panel",
|
|
757
|
+
tabScenario: "Scenario",
|
|
758
|
+
tabA11y: "Accessibility",
|
|
759
|
+
tabDiagnostics: "Diagnostics",
|
|
760
|
+
diagnosticsWithErrors: (e) => `Diagnostics (${e})`,
|
|
761
|
+
noScenario: "No active scenario. Choose a state in the navigation to see its context, rules, and criteria.",
|
|
762
|
+
componentReference: "Component",
|
|
763
|
+
componentGroup: "Group",
|
|
764
|
+
componentFixture: "Active fixture",
|
|
765
|
+
componentFixtureDescription: "Fixture description",
|
|
766
|
+
componentFixtureFallback: (e, t) => `Fixture \`${e}\` does not exist for this component. Showing \`${t}\` as fallback.`,
|
|
767
|
+
situation: "State",
|
|
768
|
+
reproduction: "Reproduction",
|
|
769
|
+
id: "ID",
|
|
770
|
+
route: "Route",
|
|
771
|
+
persona: "Persona",
|
|
772
|
+
personaSwapped: "changed",
|
|
773
|
+
data: "Data",
|
|
774
|
+
network: "Network",
|
|
775
|
+
goal: (e) => `Goal: ${e}`,
|
|
776
|
+
permissions: "Effective permissions",
|
|
777
|
+
preconditions: "Preconditions",
|
|
778
|
+
rules: "Rules",
|
|
779
|
+
actions: "Available actions",
|
|
780
|
+
expected: "Acceptance criteria",
|
|
781
|
+
approval: "Approval",
|
|
782
|
+
openApproved: "Open approved version",
|
|
783
|
+
engineering: "Engineering",
|
|
784
|
+
a11yContract: "Scenario contract",
|
|
785
|
+
keyboard: "Keyboard",
|
|
786
|
+
contrast: "Contrast",
|
|
787
|
+
contrastTarget: (e) => `WCAG 2.2 ${e}`,
|
|
788
|
+
announces: "Must be announced:",
|
|
789
|
+
focusedElement: "Focused element",
|
|
790
|
+
keyboardModeOff: "Turn on keyboard mode in the controls to inspect the accessibility tree.",
|
|
791
|
+
pressTab: (e) => `Press Tab inside the stage. ${e} tab ${e === 1 ? "stop was" : "stops were"} found.`,
|
|
792
|
+
role: "Role",
|
|
793
|
+
name: "Name",
|
|
794
|
+
noAccessibleName: "no accessible name",
|
|
795
|
+
nameFrom: "Name source",
|
|
796
|
+
description: "Description",
|
|
797
|
+
selector: "Selector",
|
|
798
|
+
focusableButHidden: "This element is focusable but hidden from assistive technology. A screen reader receives focus without receiving content.",
|
|
799
|
+
tabStopsInStage: (e) => `${e} tab ${e === 1 ? "stop" : "stops"} in the stage.`,
|
|
800
|
+
tokenContrast: "Token contrast",
|
|
801
|
+
noContrastPairs: "The product has not declared contrast pairs in theme.contrastPairs. Contrast belongs to a pair of colors; declaring pairs here validates them once, at the source.",
|
|
802
|
+
pair: "Pair",
|
|
803
|
+
ratio: "Ratio",
|
|
804
|
+
pairsFailing: (e) => `${e} ${e === 1 ? "pair is" : "pairs are"} below the target. The product token test fails the build for this.`,
|
|
805
|
+
automatedIsFloor: "Automated checks are a floor, not a ceiling. Confusing reading order, technically present but meaningless labels, and journeys that cannot be completed with a screen reader can still pass automated tools.",
|
|
806
|
+
coverage: "Coverage by status",
|
|
807
|
+
scenariosRegistered: (e) => `${e} ${e === 1 ? "scenario" : "scenarios"} registered.`,
|
|
808
|
+
scenarioContract: "Scenario contract",
|
|
809
|
+
noIssues: "No issues found."
|
|
810
|
+
},
|
|
811
|
+
home: {
|
|
812
|
+
lead: (e) => `Executable specification: each state below opens from a link with its own persona, data, and rules. ${e} ${e === 1 ? "state registered" : "states registered"}.`,
|
|
813
|
+
withoutModule: "No module",
|
|
814
|
+
withoutModuleHint: "The ID prefix does not match a registered module, so these states do not appear in module navigation.",
|
|
815
|
+
emptyModule: "No states have been registered in this module yet.",
|
|
816
|
+
keyboardBadge: "keyboard",
|
|
817
|
+
noActiveWork: "There is no active work. Ported references remain registered and can be included with “Show ported”."
|
|
818
|
+
},
|
|
819
|
+
shell: {
|
|
820
|
+
restoreChrome: "Show controls",
|
|
821
|
+
noRoute: "No route for this address",
|
|
822
|
+
noRouteHint: "does not match any declared route. Choose a state from the navigation."
|
|
823
|
+
}
|
|
586
824
|
};
|
|
587
|
-
function
|
|
588
|
-
if (!e) return
|
|
589
|
-
const t = { ...
|
|
590
|
-
for (const n of Object.keys(
|
|
591
|
-
const
|
|
592
|
-
|
|
825
|
+
function je(e) {
|
|
826
|
+
if (!e) return E;
|
|
827
|
+
const t = { ...E };
|
|
828
|
+
for (const n of Object.keys(E)) {
|
|
829
|
+
const r = e[n];
|
|
830
|
+
r && (t[n] = { ...E[n], ...r });
|
|
593
831
|
}
|
|
594
832
|
return t;
|
|
595
833
|
}
|
|
596
|
-
const
|
|
597
|
-
function
|
|
598
|
-
return ae
|
|
834
|
+
const ae = ie(E);
|
|
835
|
+
function A() {
|
|
836
|
+
return se(ae);
|
|
599
837
|
}
|
|
600
|
-
const
|
|
601
|
-
function
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
/* @__PURE__ */ a("span", { className: "ds-module__count", children: v.length })
|
|
659
|
-
] }),
|
|
660
|
-
/* @__PURE__ */ a("ul", { className: "ds-module__scenarios", children: v.map((h) => /* @__PURE__ */ a(
|
|
661
|
-
q,
|
|
662
|
-
{
|
|
663
|
-
scenario: h,
|
|
664
|
-
isActive: h.id === t,
|
|
665
|
-
onOpen: n
|
|
838
|
+
const gt = E.status, vt = E.statusMeaning, wt = E.network, kt = E.keyboard;
|
|
839
|
+
function He({
|
|
840
|
+
registry: e,
|
|
841
|
+
activeScenario: t,
|
|
842
|
+
activeComponent: n,
|
|
843
|
+
controls: r,
|
|
844
|
+
onOpenScenario: i,
|
|
845
|
+
onOpenComponent: a,
|
|
846
|
+
onShowPortedChange: s
|
|
847
|
+
}) {
|
|
848
|
+
const c = A(), [p, h] = F(n ? "components" : "flows"), [m, b] = F(""), [u, S] = F(/* @__PURE__ */ new Set()), w = q(null), C = q(/* @__PURE__ */ new Map());
|
|
849
|
+
B(() => {
|
|
850
|
+
n ? h("components") : t && h("flows");
|
|
851
|
+
}, [n, t]), B(() => {
|
|
852
|
+
const f = (N) => {
|
|
853
|
+
Ue(N) && (N.preventDefault(), w.current?.focus(), w.current?.select());
|
|
854
|
+
};
|
|
855
|
+
return window.addEventListener("keydown", f), () => window.removeEventListener("keydown", f);
|
|
856
|
+
}, []);
|
|
857
|
+
const l = T(() => {
|
|
858
|
+
if (m.trim())
|
|
859
|
+
return new Set(
|
|
860
|
+
e.search(m, { includePorted: r.showPorted }).map((f) => f.id)
|
|
861
|
+
);
|
|
862
|
+
}, [r.showPorted, m, e]), g = T(() => {
|
|
863
|
+
const f = te(m);
|
|
864
|
+
return (e.product.components ?? []).filter(
|
|
865
|
+
(N) => te([N.name, N.id, N.group, N.description].join(" ")).includes(
|
|
866
|
+
f
|
|
867
|
+
)
|
|
868
|
+
);
|
|
869
|
+
}, [m, e.product.components]), k = (f) => l ? f.filter((N) => l.has(N.id)) : f, M = {
|
|
870
|
+
includePorted: r.showPorted,
|
|
871
|
+
activeScenario: m.trim() ? void 0 : t?.id
|
|
872
|
+
}, _ = e.treeFor(M).map((f) => ({ ...f, scenarios: k(f.scenarios) })).filter((f) => l ? f.scenarios.length > 0 : !0), $ = k(e.orphansFor(M)), D = _.reduce((f, N) => f + N.scenarios.length, 0) + $.length, W = ze(g), R = p === "flows" ? [..._.flatMap((f) => f.scenarios), ...$].map((f) => f.id) : g.map((f) => f.id), j = (f, N) => {
|
|
873
|
+
if (R.length === 0) return;
|
|
874
|
+
const y = Ge(R, f, N);
|
|
875
|
+
y && C.current.get(y)?.focus();
|
|
876
|
+
}, U = (f) => {
|
|
877
|
+
f.key === "ArrowDown" ? (f.preventDefault(), j(void 0, 1)) : f.key === "Escape" && b("");
|
|
878
|
+
}, O = (f, N) => {
|
|
879
|
+
N.key !== "ArrowDown" && N.key !== "ArrowUp" || (N.preventDefault(), j(f, N.key === "ArrowDown" ? 1 : -1));
|
|
880
|
+
}, H = (f, N) => {
|
|
881
|
+
N ? C.current.set(f, N) : C.current.delete(f);
|
|
882
|
+
}, K = (f) => S((N) => {
|
|
883
|
+
const y = new Set(N);
|
|
884
|
+
return y.has(f) ? y.delete(f) : y.add(f), y;
|
|
885
|
+
});
|
|
886
|
+
return /* @__PURE__ */ d("nav", { className: "ds-chrome ds-sidebar", "aria-label": c.sidebar.region, children: [
|
|
887
|
+
/* @__PURE__ */ d("div", { className: "ds-sidebar__tabs", role: "tablist", children: [
|
|
888
|
+
/* @__PURE__ */ o(
|
|
889
|
+
"button",
|
|
890
|
+
{
|
|
891
|
+
type: "button",
|
|
892
|
+
role: "tab",
|
|
893
|
+
"aria-selected": p === "flows",
|
|
894
|
+
onClick: () => {
|
|
895
|
+
h("flows"), b("");
|
|
666
896
|
},
|
|
667
|
-
|
|
668
|
-
|
|
897
|
+
children: c.sidebar.flowsTab
|
|
898
|
+
}
|
|
899
|
+
),
|
|
900
|
+
/* @__PURE__ */ o(
|
|
901
|
+
"button",
|
|
902
|
+
{
|
|
903
|
+
type: "button",
|
|
904
|
+
role: "tab",
|
|
905
|
+
"aria-selected": p === "components",
|
|
906
|
+
onClick: () => {
|
|
907
|
+
h("components"), b("");
|
|
908
|
+
},
|
|
909
|
+
children: c.sidebar.componentsTab
|
|
910
|
+
}
|
|
911
|
+
)
|
|
912
|
+
] }),
|
|
913
|
+
/* @__PURE__ */ d("div", { className: "ds-sidebar__search", children: [
|
|
914
|
+
/* @__PURE__ */ o(
|
|
915
|
+
"input",
|
|
916
|
+
{
|
|
917
|
+
ref: w,
|
|
918
|
+
className: "ds-input ds-input--search",
|
|
919
|
+
type: "search",
|
|
920
|
+
value: m,
|
|
921
|
+
placeholder: p === "flows" ? c.sidebar.searchPlaceholder : c.sidebar.componentSearchPlaceholder,
|
|
922
|
+
"aria-label": p === "flows" ? c.sidebar.searchLabel : c.sidebar.componentSearchLabel,
|
|
923
|
+
onChange: (f) => b(f.target.value),
|
|
924
|
+
onKeyDown: U
|
|
925
|
+
}
|
|
926
|
+
),
|
|
927
|
+
/* @__PURE__ */ o("kbd", { children: c.sidebar.searchShortcut })
|
|
928
|
+
] }),
|
|
929
|
+
p === "flows" && /* @__PURE__ */ d("label", { className: "ds-sidebar__option", children: [
|
|
930
|
+
/* @__PURE__ */ o(
|
|
931
|
+
"input",
|
|
932
|
+
{
|
|
933
|
+
type: "checkbox",
|
|
934
|
+
checked: r.showPorted ?? !1,
|
|
935
|
+
onChange: (f) => s(f.target.checked)
|
|
936
|
+
}
|
|
937
|
+
),
|
|
938
|
+
/* @__PURE__ */ o("span", { children: c.sidebar.showPorted })
|
|
939
|
+
] }),
|
|
940
|
+
/* @__PURE__ */ d("div", { className: "ds-sidebar__tree", role: "tabpanel", children: [
|
|
941
|
+
m.trim() !== "" && /* @__PURE__ */ o("p", { className: "ds-sidebar__empty", role: "status", children: p === "flows" ? D === 0 ? c.sidebar.noMatch(m) : c.sidebar.matchCount(D) : g.length === 0 ? c.sidebar.noComponentMatch(m) : c.sidebar.componentMatchCount(g.length) }),
|
|
942
|
+
p === "flows" ? /* @__PURE__ */ o(
|
|
943
|
+
Ke,
|
|
944
|
+
{
|
|
945
|
+
nodes: _,
|
|
946
|
+
orphans: $,
|
|
947
|
+
matches: l,
|
|
948
|
+
collapsed: u,
|
|
949
|
+
activeScenario: t?.id,
|
|
950
|
+
showPorted: r.showPorted ?? !1,
|
|
951
|
+
activePortedLabel: c.sidebar.activePorted,
|
|
952
|
+
emptyModuleLabel: c.sidebar.emptyModule,
|
|
953
|
+
withoutModuleLabel: c.sidebar.withoutModule,
|
|
954
|
+
onToggle: K,
|
|
955
|
+
onOpen: i,
|
|
956
|
+
onKeyDown: O,
|
|
957
|
+
setItemRef: H
|
|
958
|
+
}
|
|
959
|
+
) : W.length === 0 && !m ? /* @__PURE__ */ o("p", { className: "ds-sidebar__empty", children: c.sidebar.emptyComponents }) : W.map(([f, N]) => /* @__PURE__ */ d("section", { className: "ds-component-group", children: [
|
|
960
|
+
/* @__PURE__ */ o("h2", { children: f }),
|
|
961
|
+
/* @__PURE__ */ o("ul", { children: N.map((y) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ d(
|
|
962
|
+
"button",
|
|
963
|
+
{
|
|
964
|
+
ref: (x) => H(y.id, x),
|
|
965
|
+
type: "button",
|
|
966
|
+
className: "ds-component-item",
|
|
967
|
+
"aria-current": y.id === n,
|
|
968
|
+
onClick: () => a(y.id),
|
|
969
|
+
onKeyDown: (x) => O(y.id, x),
|
|
970
|
+
children: [
|
|
971
|
+
/* @__PURE__ */ o("span", { children: y.name }),
|
|
972
|
+
y.description && /* @__PURE__ */ o("small", { children: y.description })
|
|
973
|
+
]
|
|
974
|
+
}
|
|
975
|
+
) }, y.id)) })
|
|
976
|
+
] }, f))
|
|
977
|
+
] }),
|
|
978
|
+
p === "flows" && t && /* @__PURE__ */ d("aside", { className: "ds-sidebar__scope", "aria-label": c.sidebar.scope, children: [
|
|
979
|
+
/* @__PURE__ */ o("h2", { children: c.sidebar.scope }),
|
|
980
|
+
/* @__PURE__ */ d("dl", { children: [
|
|
981
|
+
/* @__PURE__ */ o("dt", { children: c.sidebar.scopeData }),
|
|
982
|
+
/* @__PURE__ */ o("dd", { children: e.fixture(r.fixture ?? t.fixture)?.label ?? c.controls.none }),
|
|
983
|
+
/* @__PURE__ */ o("dt", { children: c.sidebar.scopePersona }),
|
|
984
|
+
/* @__PURE__ */ o("dd", { children: e.persona(r.persona ?? t.persona)?.name ?? c.controls.none }),
|
|
985
|
+
/* @__PURE__ */ o("dt", { children: c.sidebar.scopeNetwork }),
|
|
986
|
+
/* @__PURE__ */ o("dd", { children: c.network[r.network] })
|
|
669
987
|
] })
|
|
670
988
|
] })
|
|
671
989
|
] });
|
|
672
990
|
}
|
|
673
|
-
function
|
|
991
|
+
function Ke(e) {
|
|
992
|
+
return /* @__PURE__ */ d(P, { children: [
|
|
993
|
+
e.nodes.map((t) => {
|
|
994
|
+
const n = !e.collapsed.has(t.module.id) || !!e.matches;
|
|
995
|
+
return /* @__PURE__ */ d("section", { className: "ds-module", children: [
|
|
996
|
+
/* @__PURE__ */ d(
|
|
997
|
+
"button",
|
|
998
|
+
{
|
|
999
|
+
type: "button",
|
|
1000
|
+
className: "ds-module__header",
|
|
1001
|
+
"aria-expanded": n,
|
|
1002
|
+
onClick: () => e.onToggle(t.module.id),
|
|
1003
|
+
children: [
|
|
1004
|
+
/* @__PURE__ */ o("span", { className: "ds-module__chevron", "aria-hidden": "true", children: "▶" }),
|
|
1005
|
+
/* @__PURE__ */ o("span", { children: t.module.name }),
|
|
1006
|
+
/* @__PURE__ */ o("span", { className: "ds-module__count", children: t.scenarios.length })
|
|
1007
|
+
]
|
|
1008
|
+
}
|
|
1009
|
+
),
|
|
1010
|
+
n && /* @__PURE__ */ d("ul", { className: "ds-module__scenarios", children: [
|
|
1011
|
+
t.scenarios.map((r) => /* @__PURE__ */ o(ee, { scenario: r, ...e }, r.id)),
|
|
1012
|
+
t.scenarios.length === 0 && /* @__PURE__ */ o("li", { className: "ds-sidebar__empty", children: e.emptyModuleLabel })
|
|
1013
|
+
] })
|
|
1014
|
+
] }, t.module.id);
|
|
1015
|
+
}),
|
|
1016
|
+
e.orphans.length > 0 && /* @__PURE__ */ d("section", { className: "ds-module", children: [
|
|
1017
|
+
/* @__PURE__ */ d("div", { className: "ds-module__header", "aria-hidden": "true", children: [
|
|
1018
|
+
/* @__PURE__ */ o("span", { className: "ds-module__chevron", children: "▶" }),
|
|
1019
|
+
/* @__PURE__ */ o("span", { children: e.withoutModuleLabel }),
|
|
1020
|
+
/* @__PURE__ */ o("span", { className: "ds-module__count", children: e.orphans.length })
|
|
1021
|
+
] }),
|
|
1022
|
+
/* @__PURE__ */ o("ul", { className: "ds-module__scenarios", children: e.orphans.map((t) => /* @__PURE__ */ o(ee, { scenario: t, ...e }, t.id)) })
|
|
1023
|
+
] })
|
|
1024
|
+
] });
|
|
1025
|
+
}
|
|
1026
|
+
function ee({
|
|
674
1027
|
scenario: e,
|
|
675
|
-
|
|
676
|
-
|
|
1028
|
+
activeScenario: t,
|
|
1029
|
+
showPorted: n,
|
|
1030
|
+
activePortedLabel: r,
|
|
1031
|
+
onOpen: i,
|
|
1032
|
+
onKeyDown: a,
|
|
1033
|
+
setItemRef: s
|
|
677
1034
|
}) {
|
|
678
|
-
const
|
|
679
|
-
return /* @__PURE__ */
|
|
1035
|
+
const c = A().status[e.status], p = e.status === "ported" && e.id === t && !n;
|
|
1036
|
+
return /* @__PURE__ */ o("li", { children: /* @__PURE__ */ d(
|
|
680
1037
|
"button",
|
|
681
1038
|
{
|
|
1039
|
+
ref: (h) => s(e.id, h),
|
|
682
1040
|
type: "button",
|
|
683
1041
|
className: "ds-scenario",
|
|
684
|
-
"aria-current": t,
|
|
685
|
-
onClick: () =>
|
|
1042
|
+
"aria-current": e.id === t,
|
|
1043
|
+
onClick: () => i(e.id),
|
|
1044
|
+
onKeyDown: (h) => a(e.id, h),
|
|
686
1045
|
children: [
|
|
687
|
-
/* @__PURE__ */
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
"data-status": e.status,
|
|
692
|
-
title: s
|
|
693
|
-
}
|
|
694
|
-
),
|
|
695
|
-
/* @__PURE__ */ a("span", { className: "ds-scenario__title", children: e.title }),
|
|
696
|
-
/* @__PURE__ */ a("span", { className: "ds-visually-hidden", children: s })
|
|
1046
|
+
/* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": e.status, title: c }),
|
|
1047
|
+
/* @__PURE__ */ o("span", { className: "ds-scenario__title", children: e.title }),
|
|
1048
|
+
/* @__PURE__ */ o("span", { className: "ds-visually-hidden", children: c }),
|
|
1049
|
+
p && /* @__PURE__ */ o("span", { className: "ds-scenario__flag", title: r, children: c })
|
|
697
1050
|
]
|
|
698
1051
|
}
|
|
699
1052
|
) });
|
|
700
1053
|
}
|
|
701
|
-
function
|
|
1054
|
+
function ze(e) {
|
|
1055
|
+
const t = /* @__PURE__ */ new Map();
|
|
1056
|
+
for (const n of e) {
|
|
1057
|
+
const r = n.group ?? "Componentes";
|
|
1058
|
+
t.set(r, [...t.get(r) ?? [], n]);
|
|
1059
|
+
}
|
|
1060
|
+
return [...t.entries()];
|
|
1061
|
+
}
|
|
1062
|
+
function te(e) {
|
|
1063
|
+
return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim();
|
|
1064
|
+
}
|
|
1065
|
+
function Ue(e) {
|
|
1066
|
+
const t = e.key.toLowerCase();
|
|
1067
|
+
return (e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && (t === "k" || t === "f");
|
|
1068
|
+
}
|
|
1069
|
+
function Ge(e, t, n) {
|
|
1070
|
+
if (e.length === 0) return;
|
|
1071
|
+
const r = t ? e.indexOf(t) : -1, i = Math.max(0, Math.min(e.length - 1, r + n));
|
|
1072
|
+
return e[i];
|
|
1073
|
+
}
|
|
1074
|
+
function Ve({
|
|
702
1075
|
product: e,
|
|
703
1076
|
scenario: t,
|
|
704
1077
|
deploy: n,
|
|
705
|
-
inspectorOpen:
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
1078
|
+
inspectorOpen: r,
|
|
1079
|
+
chromeTheme: i,
|
|
1080
|
+
showPorted: a,
|
|
1081
|
+
onToggleInspector: s,
|
|
1082
|
+
onToggleChromeTheme: c
|
|
710
1083
|
}) {
|
|
711
|
-
const
|
|
712
|
-
const
|
|
1084
|
+
const p = A().topbar, [h, m] = F(!1), b = async () => {
|
|
1085
|
+
const w = t ? ue(t, {
|
|
1086
|
+
origin: n.origin,
|
|
1087
|
+
overrides: {
|
|
1088
|
+
...i === "light" ? { chromeTheme: i } : {},
|
|
1089
|
+
...a ? { showPorted: !0 } : {}
|
|
1090
|
+
}
|
|
1091
|
+
}) : `${n.origin}${window.location.pathname}${window.location.search}`;
|
|
713
1092
|
try {
|
|
714
|
-
await navigator.clipboard.writeText(
|
|
1093
|
+
await navigator.clipboard.writeText(w);
|
|
715
1094
|
} catch {
|
|
716
|
-
window.prompt(
|
|
1095
|
+
window.prompt(p.copyPrompt, w);
|
|
717
1096
|
}
|
|
718
|
-
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
|
|
1097
|
+
m(!0), window.setTimeout(() => m(!1), 1600);
|
|
1098
|
+
}, u = qe(
|
|
1099
|
+
typeof window > "u" ? `${n.origin}/` : window.location.href
|
|
1100
|
+
), S = Ye(n.origin, i, a);
|
|
1101
|
+
return /* @__PURE__ */ d("header", { className: "ds-chrome ds-topbar", children: [
|
|
1102
|
+
/* @__PURE__ */ d("div", { className: "ds-topbar__product", children: [
|
|
1103
|
+
/* @__PURE__ */ o(
|
|
1104
|
+
"a",
|
|
1105
|
+
{
|
|
1106
|
+
className: "ds-topbar__home",
|
|
1107
|
+
href: S,
|
|
1108
|
+
"aria-label": p.homeTitle(e.name),
|
|
1109
|
+
title: p.homeTitle(e.name),
|
|
1110
|
+
children: e.name
|
|
1111
|
+
}
|
|
1112
|
+
),
|
|
1113
|
+
e.tagline && /* @__PURE__ */ o("span", { className: "ds-topbar__tagline", children: e.tagline })
|
|
1114
|
+
] }),
|
|
1115
|
+
/* @__PURE__ */ o("div", { className: "ds-topbar__spacer" }),
|
|
1116
|
+
/* @__PURE__ */ d("div", { className: "ds-topbar__meta", children: [
|
|
1117
|
+
n.branch && /* @__PURE__ */ o("code", { title: p.branchTitle(n.branch), children: n.branch.length > 28 ? `${n.branch.slice(0, 27)}…` : n.branch }),
|
|
1118
|
+
n.commit && /* @__PURE__ */ o("code", { title: p.commitTitle(n.commit), children: n.shortCommit }),
|
|
1119
|
+
/* @__PURE__ */ o("code", { title: p.envTitle(n.env), children: n.env })
|
|
1120
|
+
] }),
|
|
1121
|
+
/* @__PURE__ */ o(
|
|
722
1122
|
"button",
|
|
723
1123
|
{
|
|
724
1124
|
type: "button",
|
|
725
|
-
className: "ds-btn ds-btn--
|
|
726
|
-
"aria-pressed":
|
|
727
|
-
|
|
728
|
-
title:
|
|
729
|
-
|
|
1125
|
+
className: "ds-btn ds-btn--icon",
|
|
1126
|
+
"aria-pressed": i === "light",
|
|
1127
|
+
"aria-label": i === "dark" ? p.lightMode : p.darkMode,
|
|
1128
|
+
title: i === "dark" ? p.lightMode : p.darkMode,
|
|
1129
|
+
onClick: c,
|
|
1130
|
+
children: /* @__PURE__ */ o(Je, { theme: i })
|
|
730
1131
|
}
|
|
731
1132
|
),
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
] }),
|
|
736
|
-
/* @__PURE__ */ a("div", { className: "ds-topbar__spacer" }),
|
|
737
|
-
/* @__PURE__ */ c("div", { className: "ds-topbar__meta", children: [
|
|
738
|
-
n.branch && /* @__PURE__ */ a("code", { title: m.branchTitle(n.branch), children: n.branch.length > 28 ? `${n.branch.slice(0, 27)}…` : n.branch }),
|
|
739
|
-
n.commit && /* @__PURE__ */ a("code", { title: m.commitTitle(n.commit), children: n.shortCommit }),
|
|
740
|
-
/* @__PURE__ */ a("code", { title: m.envTitle(n.env), children: n.env })
|
|
741
|
-
] }),
|
|
742
|
-
/* @__PURE__ */ a("button", { type: "button", className: "ds-btn", onClick: g, children: i ? m.copied : m.copyLink }),
|
|
743
|
-
/* @__PURE__ */ a(
|
|
744
|
-
"button",
|
|
1133
|
+
/* @__PURE__ */ o("button", { type: "button", className: "ds-btn", onClick: b, children: h ? p.copied : p.copyLink }),
|
|
1134
|
+
/* @__PURE__ */ o(
|
|
1135
|
+
"a",
|
|
745
1136
|
{
|
|
746
|
-
type: "button",
|
|
747
1137
|
className: "ds-btn",
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
1138
|
+
href: u,
|
|
1139
|
+
target: "_blank",
|
|
1140
|
+
rel: "noreferrer",
|
|
1141
|
+
title: p.cleanReviewTitle,
|
|
1142
|
+
children: p.cleanReview
|
|
751
1143
|
}
|
|
752
1144
|
),
|
|
753
|
-
/* @__PURE__ */
|
|
1145
|
+
/* @__PURE__ */ o(
|
|
754
1146
|
"button",
|
|
755
1147
|
{
|
|
756
1148
|
type: "button",
|
|
757
1149
|
className: "ds-btn",
|
|
758
|
-
"aria-pressed":
|
|
759
|
-
onClick:
|
|
760
|
-
children:
|
|
1150
|
+
"aria-pressed": r,
|
|
1151
|
+
onClick: s,
|
|
1152
|
+
children: p.panel
|
|
761
1153
|
}
|
|
762
1154
|
)
|
|
763
1155
|
] });
|
|
764
1156
|
}
|
|
765
|
-
function
|
|
766
|
-
const
|
|
767
|
-
return
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
1157
|
+
function qe(e) {
|
|
1158
|
+
const t = new URL(e);
|
|
1159
|
+
return t.searchParams.set(v.chrome, "0"), t.toString();
|
|
1160
|
+
}
|
|
1161
|
+
function Ye(e, t, n = !1) {
|
|
1162
|
+
const r = new URL("/", e);
|
|
1163
|
+
return t === "light" && r.searchParams.set(v.chromeTheme, t), n && r.searchParams.set(v.showPorted, "1"), r.toString();
|
|
1164
|
+
}
|
|
1165
|
+
function Je({ theme: e }) {
|
|
1166
|
+
const t = {
|
|
1167
|
+
width: 15,
|
|
1168
|
+
height: 15,
|
|
1169
|
+
viewBox: "0 0 24 24",
|
|
1170
|
+
fill: "none",
|
|
1171
|
+
stroke: "currentColor",
|
|
1172
|
+
strokeWidth: 2,
|
|
1173
|
+
strokeLinecap: "round",
|
|
1174
|
+
strokeLinejoin: "round",
|
|
1175
|
+
"aria-hidden": !0
|
|
1176
|
+
};
|
|
1177
|
+
return e === "dark" ? /* @__PURE__ */ d("svg", { ...t, children: [
|
|
1178
|
+
/* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "4" }),
|
|
1179
|
+
/* @__PURE__ */ o("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.42 1.42M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.42" })
|
|
1180
|
+
] }) : /* @__PURE__ */ o("svg", { ...t, children: /* @__PURE__ */ o("path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" }) });
|
|
1181
|
+
}
|
|
1182
|
+
function Qe({
|
|
1183
|
+
registry: e,
|
|
1184
|
+
controls: t,
|
|
1185
|
+
scenarioActive: n,
|
|
1186
|
+
component: r,
|
|
1187
|
+
componentFixture: i,
|
|
1188
|
+
onChange: a
|
|
1189
|
+
}) {
|
|
1190
|
+
const s = A(), c = s.controls, { product: p } = e, h = p.dataSources?.adapters ?? [], m = p.theme?.modes ?? [], b = p.theme?.locales ?? [];
|
|
1191
|
+
return /* @__PURE__ */ d("div", { className: "ds-chrome ds-controls", role: "group", "aria-label": c.region, children: [
|
|
1192
|
+
r?.fixtures?.length ? /* @__PURE__ */ d("div", { className: "ds-field", children: [
|
|
1193
|
+
/* @__PURE__ */ o("label", { htmlFor: "ds-component-fixture", children: c.componentFixture }),
|
|
1194
|
+
/* @__PURE__ */ o(
|
|
771
1195
|
"select",
|
|
772
1196
|
{
|
|
773
|
-
id: "ds-
|
|
1197
|
+
id: "ds-component-fixture",
|
|
774
1198
|
className: "ds-select",
|
|
775
|
-
value:
|
|
776
|
-
onChange: (
|
|
777
|
-
children:
|
|
778
|
-
/* @__PURE__ */ a("option", { value: "", children: r.none }),
|
|
779
|
-
o.personas.map((i) => /* @__PURE__ */ a("option", { value: i.id, children: i.name }, i.id))
|
|
780
|
-
]
|
|
1199
|
+
value: i?.fixture?.id ?? "",
|
|
1200
|
+
onChange: (u) => a({ fixture: u.target.value || void 0 }),
|
|
1201
|
+
children: r.fixtures.map((u) => /* @__PURE__ */ o("option", { value: u.id, children: u.label }, u.id))
|
|
781
1202
|
}
|
|
782
1203
|
)
|
|
783
|
-
] }),
|
|
784
|
-
/* @__PURE__ */
|
|
785
|
-
/* @__PURE__ */
|
|
786
|
-
/* @__PURE__ */
|
|
1204
|
+
] }) : null,
|
|
1205
|
+
n && /* @__PURE__ */ d("div", { className: "ds-field", children: [
|
|
1206
|
+
/* @__PURE__ */ o("label", { htmlFor: "ds-persona", children: c.persona }),
|
|
1207
|
+
/* @__PURE__ */ d(
|
|
787
1208
|
"select",
|
|
788
1209
|
{
|
|
789
|
-
id: "ds-
|
|
1210
|
+
id: "ds-persona",
|
|
790
1211
|
className: "ds-select",
|
|
791
|
-
value: t.
|
|
792
|
-
onChange: (
|
|
1212
|
+
value: t.persona ?? "",
|
|
1213
|
+
onChange: (u) => a({ persona: u.target.value || void 0 }),
|
|
793
1214
|
children: [
|
|
794
|
-
/* @__PURE__ */
|
|
795
|
-
|
|
1215
|
+
/* @__PURE__ */ o("option", { value: "", children: c.none }),
|
|
1216
|
+
p.personas.map((u) => /* @__PURE__ */ o("option", { value: u.id, children: u.name }, u.id))
|
|
796
1217
|
]
|
|
797
1218
|
}
|
|
798
1219
|
)
|
|
799
1220
|
] }),
|
|
800
|
-
/* @__PURE__ */
|
|
801
|
-
/* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */
|
|
1221
|
+
n && /* @__PURE__ */ d("div", { className: "ds-field", children: [
|
|
1222
|
+
/* @__PURE__ */ o("span", { className: "ds-field__label", id: "ds-network-label", children: c.network }),
|
|
1223
|
+
/* @__PURE__ */ o("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-network-label", children: oe.map((u) => /* @__PURE__ */ o(
|
|
803
1224
|
"button",
|
|
804
1225
|
{
|
|
805
1226
|
type: "button",
|
|
806
|
-
"aria-pressed": t.network ===
|
|
807
|
-
onClick: () =>
|
|
808
|
-
children: s.network[
|
|
1227
|
+
"aria-pressed": t.network === u,
|
|
1228
|
+
onClick: () => a({ network: u }),
|
|
1229
|
+
children: s.network[u]
|
|
809
1230
|
},
|
|
810
|
-
|
|
1231
|
+
u
|
|
811
1232
|
)) })
|
|
812
1233
|
] }),
|
|
813
|
-
/* @__PURE__ */
|
|
814
|
-
/* @__PURE__ */
|
|
815
|
-
/* @__PURE__ */
|
|
1234
|
+
/* @__PURE__ */ d("div", { className: "ds-field", children: [
|
|
1235
|
+
/* @__PURE__ */ o("span", { className: "ds-field__label", id: "ds-viewport-label", children: c.viewport }),
|
|
1236
|
+
/* @__PURE__ */ o("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-viewport-label", children: ne.map((u) => /* @__PURE__ */ o(
|
|
816
1237
|
"button",
|
|
817
1238
|
{
|
|
818
1239
|
type: "button",
|
|
819
|
-
"
|
|
820
|
-
|
|
821
|
-
|
|
1240
|
+
className: "ds-icon-button",
|
|
1241
|
+
"aria-pressed": t.viewport === u.id,
|
|
1242
|
+
"aria-label": s.viewport[u.id] ?? u.label,
|
|
1243
|
+
title: s.viewport[u.id] ?? u.label,
|
|
1244
|
+
onClick: () => a({ viewport: u.id }),
|
|
1245
|
+
children: /* @__PURE__ */ o(Xe, { id: u.id })
|
|
822
1246
|
},
|
|
823
|
-
|
|
1247
|
+
u.id
|
|
824
1248
|
)) }),
|
|
825
|
-
t.viewport === "custom" && /* @__PURE__ */
|
|
1249
|
+
t.viewport === "custom" && /* @__PURE__ */ o(
|
|
826
1250
|
"input",
|
|
827
1251
|
{
|
|
828
1252
|
className: "ds-input",
|
|
@@ -831,337 +1255,374 @@ function De({ registry: e, controls: t, onChange: n }) {
|
|
|
831
1255
|
max: 3840,
|
|
832
1256
|
step: 10,
|
|
833
1257
|
style: { width: 88 },
|
|
834
|
-
"aria-label":
|
|
1258
|
+
"aria-label": c.customWidth,
|
|
835
1259
|
value: t.customWidth ?? 1024,
|
|
836
|
-
onChange: (
|
|
1260
|
+
onChange: (u) => a({ customWidth: Number(u.target.value) || void 0 })
|
|
837
1261
|
}
|
|
838
1262
|
)
|
|
839
1263
|
] }),
|
|
840
|
-
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */
|
|
1264
|
+
m.length > 1 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
|
|
1265
|
+
/* @__PURE__ */ o("label", { htmlFor: "ds-theme", children: c.theme }),
|
|
1266
|
+
/* @__PURE__ */ o(
|
|
843
1267
|
"select",
|
|
844
1268
|
{
|
|
845
1269
|
id: "ds-theme",
|
|
846
1270
|
className: "ds-select",
|
|
847
|
-
value: t.themeMode ??
|
|
848
|
-
onChange: (
|
|
849
|
-
children:
|
|
1271
|
+
value: t.themeMode ?? m[0],
|
|
1272
|
+
onChange: (u) => a({ themeMode: u.target.value }),
|
|
1273
|
+
children: m.map((u) => /* @__PURE__ */ o("option", { value: u, children: u }, u))
|
|
850
1274
|
}
|
|
851
1275
|
)
|
|
852
1276
|
] }),
|
|
853
|
-
|
|
854
|
-
/* @__PURE__ */
|
|
855
|
-
/* @__PURE__ */
|
|
1277
|
+
b.length > 1 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
|
|
1278
|
+
/* @__PURE__ */ o("label", { htmlFor: "ds-locale", children: c.locale }),
|
|
1279
|
+
/* @__PURE__ */ o(
|
|
856
1280
|
"select",
|
|
857
1281
|
{
|
|
858
1282
|
id: "ds-locale",
|
|
859
1283
|
className: "ds-select",
|
|
860
|
-
value: t.locale ??
|
|
861
|
-
onChange: (
|
|
862
|
-
children:
|
|
1284
|
+
value: t.locale ?? b[0],
|
|
1285
|
+
onChange: (u) => a({ locale: u.target.value }),
|
|
1286
|
+
children: b.map((u) => /* @__PURE__ */ o("option", { value: u, children: u }, u))
|
|
863
1287
|
}
|
|
864
1288
|
)
|
|
865
1289
|
] }),
|
|
866
|
-
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
1290
|
+
n && h.length > 0 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
|
|
1291
|
+
/* @__PURE__ */ o("label", { htmlFor: "ds-source", children: c.dataSource }),
|
|
1292
|
+
/* @__PURE__ */ d(
|
|
869
1293
|
"select",
|
|
870
1294
|
{
|
|
871
1295
|
id: "ds-source",
|
|
872
1296
|
className: "ds-select",
|
|
873
1297
|
value: t.dataSource ?? "fixtures",
|
|
874
|
-
onChange: (
|
|
1298
|
+
onChange: (u) => a({ dataSource: u.target.value }),
|
|
875
1299
|
children: [
|
|
876
|
-
/* @__PURE__ */
|
|
877
|
-
|
|
1300
|
+
/* @__PURE__ */ o("option", { value: "fixtures", children: c.fixturesOption }),
|
|
1301
|
+
h.filter((u) => u.id !== "fixtures").map((u) => /* @__PURE__ */ o("option", { value: u.id, children: u.label }, u.id))
|
|
878
1302
|
]
|
|
879
1303
|
}
|
|
880
1304
|
)
|
|
881
|
-
] }),
|
|
882
|
-
/* @__PURE__ */ c("div", { className: "ds-field", children: [
|
|
883
|
-
/* @__PURE__ */ a("span", { className: "ds-field__label", children: r.a11y }),
|
|
884
|
-
/* @__PURE__ */ a(
|
|
885
|
-
"button",
|
|
886
|
-
{
|
|
887
|
-
type: "button",
|
|
888
|
-
className: "ds-btn",
|
|
889
|
-
"aria-pressed": t.keyboardMode,
|
|
890
|
-
onClick: () => n({ keyboardMode: !t.keyboardMode }),
|
|
891
|
-
title: r.keyboardModeTitle,
|
|
892
|
-
children: r.keyboardMode
|
|
893
|
-
}
|
|
894
|
-
),
|
|
895
|
-
/* @__PURE__ */ a(
|
|
896
|
-
"button",
|
|
897
|
-
{
|
|
898
|
-
type: "button",
|
|
899
|
-
className: "ds-btn",
|
|
900
|
-
"aria-pressed": t.reducedMotion,
|
|
901
|
-
onClick: () => n({ reducedMotion: !t.reducedMotion }),
|
|
902
|
-
title: r.reducedMotionTitle,
|
|
903
|
-
children: r.reducedMotion
|
|
904
|
-
}
|
|
905
|
-
),
|
|
906
|
-
/* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-label": r.textScale, children: Q.map((i) => /* @__PURE__ */ a(
|
|
907
|
-
"button",
|
|
908
|
-
{
|
|
909
|
-
type: "button",
|
|
910
|
-
"aria-pressed": t.textScale === i,
|
|
911
|
-
onClick: () => n({ textScale: i }),
|
|
912
|
-
children: i === 1 ? "100%" : `${i * 100}%`
|
|
913
|
-
},
|
|
914
|
-
i
|
|
915
|
-
)) })
|
|
916
1305
|
] })
|
|
917
1306
|
] });
|
|
918
1307
|
}
|
|
919
|
-
function
|
|
1308
|
+
function Xe({ id: e }) {
|
|
1309
|
+
const t = {
|
|
1310
|
+
width: 16,
|
|
1311
|
+
height: 16,
|
|
1312
|
+
viewBox: "0 0 24 24",
|
|
1313
|
+
fill: "none",
|
|
1314
|
+
stroke: "currentColor",
|
|
1315
|
+
strokeWidth: 2,
|
|
1316
|
+
strokeLinecap: "round",
|
|
1317
|
+
strokeLinejoin: "round",
|
|
1318
|
+
"aria-hidden": !0
|
|
1319
|
+
};
|
|
1320
|
+
return e === "fit" ? /* @__PURE__ */ o("svg", { ...t, children: /* @__PURE__ */ o("path", { d: "M8 3H5a2 2 0 0 0-2 2v3M16 3h3a2 2 0 0 1 2 2v3M8 21H5a2 2 0 0 1-2-2v-3M16 21h3a2 2 0 0 0 2-2v-3" }) }) : e === "mobile" ? /* @__PURE__ */ d("svg", { ...t, children: [
|
|
1321
|
+
/* @__PURE__ */ o("rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2" }),
|
|
1322
|
+
/* @__PURE__ */ o("path", { d: "M12 18h.01" })
|
|
1323
|
+
] }) : e === "tablet" ? /* @__PURE__ */ d("svg", { ...t, children: [
|
|
1324
|
+
/* @__PURE__ */ o("rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2" }),
|
|
1325
|
+
/* @__PURE__ */ o("path", { d: "M12 18h.01" })
|
|
1326
|
+
] }) : e === "desktop" ? /* @__PURE__ */ d("svg", { ...t, children: [
|
|
1327
|
+
/* @__PURE__ */ o("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
|
|
1328
|
+
/* @__PURE__ */ o("path", { d: "M8 21h8M12 17v4" })
|
|
1329
|
+
] }) : /* @__PURE__ */ o("svg", { ...t, children: /* @__PURE__ */ o("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) });
|
|
1330
|
+
}
|
|
1331
|
+
function Ze({
|
|
920
1332
|
registry: e,
|
|
921
1333
|
scenario: t,
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
1334
|
+
component: n,
|
|
1335
|
+
componentFixture: r,
|
|
1336
|
+
controls: i,
|
|
1337
|
+
focusedNode: a,
|
|
1338
|
+
tabStopCount: s
|
|
925
1339
|
}) {
|
|
926
|
-
const
|
|
927
|
-
return /* @__PURE__ */
|
|
928
|
-
/* @__PURE__ */
|
|
929
|
-
/* @__PURE__ */
|
|
930
|
-
/* @__PURE__ */
|
|
931
|
-
/* @__PURE__ */
|
|
1340
|
+
const c = A().inspector, [p, h] = F("scenario"), m = e.issues.filter((b) => b.level === "error").length;
|
|
1341
|
+
return /* @__PURE__ */ d("aside", { className: "ds-chrome ds-inspector", "aria-label": c.region, children: [
|
|
1342
|
+
/* @__PURE__ */ d("div", { className: "ds-inspector__tabs", role: "tablist", children: [
|
|
1343
|
+
/* @__PURE__ */ o(V, { id: "scenario", current: p, onSelect: h, children: n ? c.componentReference : c.tabScenario }),
|
|
1344
|
+
/* @__PURE__ */ o(V, { id: "a11y", current: p, onSelect: h, children: c.tabA11y }),
|
|
1345
|
+
/* @__PURE__ */ o(V, { id: "diagnostics", current: p, onSelect: h, children: m > 0 ? c.diagnosticsWithErrors(m) : c.tabDiagnostics })
|
|
932
1346
|
] }),
|
|
933
|
-
/* @__PURE__ */
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
je,
|
|
1347
|
+
/* @__PURE__ */ d("div", { className: "ds-inspector__body", role: "tabpanel", children: [
|
|
1348
|
+
p === "scenario" && /* @__PURE__ */ o(
|
|
1349
|
+
et,
|
|
937
1350
|
{
|
|
938
1351
|
registry: e,
|
|
939
1352
|
scenario: t,
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
1353
|
+
component: n,
|
|
1354
|
+
componentFixture: r,
|
|
1355
|
+
controls: i
|
|
943
1356
|
}
|
|
944
1357
|
),
|
|
945
|
-
|
|
1358
|
+
p === "a11y" && /* @__PURE__ */ o(
|
|
1359
|
+
tt,
|
|
1360
|
+
{
|
|
1361
|
+
registry: e,
|
|
1362
|
+
scenario: t,
|
|
1363
|
+
focusedNode: a,
|
|
1364
|
+
keyboardMode: i.keyboardMode,
|
|
1365
|
+
tabStopCount: s
|
|
1366
|
+
}
|
|
1367
|
+
),
|
|
1368
|
+
p === "diagnostics" && /* @__PURE__ */ o(ot, { registry: e })
|
|
946
1369
|
] })
|
|
947
1370
|
] });
|
|
948
1371
|
}
|
|
949
|
-
function
|
|
1372
|
+
function V({
|
|
950
1373
|
id: e,
|
|
951
1374
|
current: t,
|
|
952
1375
|
onSelect: n,
|
|
953
|
-
children:
|
|
1376
|
+
children: r
|
|
954
1377
|
}) {
|
|
955
|
-
return /* @__PURE__ */
|
|
1378
|
+
return /* @__PURE__ */ o(
|
|
956
1379
|
"button",
|
|
957
1380
|
{
|
|
958
1381
|
type: "button",
|
|
959
1382
|
role: "tab",
|
|
960
1383
|
"aria-selected": t === e,
|
|
961
1384
|
onClick: () => n(e),
|
|
962
|
-
children:
|
|
1385
|
+
children: r
|
|
963
1386
|
}
|
|
964
1387
|
);
|
|
965
1388
|
}
|
|
966
|
-
function
|
|
1389
|
+
function et({
|
|
967
1390
|
registry: e,
|
|
968
1391
|
scenario: t,
|
|
969
|
-
|
|
1392
|
+
component: n,
|
|
1393
|
+
componentFixture: r,
|
|
1394
|
+
controls: i
|
|
970
1395
|
}) {
|
|
971
|
-
const
|
|
1396
|
+
const a = A(), s = a.inspector;
|
|
972
1397
|
if (!t)
|
|
973
|
-
return /* @__PURE__ */
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1398
|
+
return n ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1399
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.componentReference }),
|
|
1400
|
+
/* @__PURE__ */ o("p", { style: { color: "var(--ds-fg)", fontSize: 15, fontWeight: 600 }, children: n.name }),
|
|
1401
|
+
n.description && /* @__PURE__ */ o("p", { children: n.description }),
|
|
1402
|
+
/* @__PURE__ */ d("dl", { className: "ds-kv", style: { marginTop: 14 }, children: [
|
|
1403
|
+
/* @__PURE__ */ o("dt", { children: s.id }),
|
|
1404
|
+
/* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: n.id }),
|
|
1405
|
+
n.group && /* @__PURE__ */ d(P, { children: [
|
|
1406
|
+
/* @__PURE__ */ o("dt", { children: s.componentGroup }),
|
|
1407
|
+
/* @__PURE__ */ o("dd", { children: n.group })
|
|
1408
|
+
] }),
|
|
1409
|
+
r?.fixture && /* @__PURE__ */ d(P, { children: [
|
|
1410
|
+
/* @__PURE__ */ o("dt", { children: s.componentFixture }),
|
|
1411
|
+
/* @__PURE__ */ d("dd", { children: [
|
|
1412
|
+
r.fixture.label,
|
|
1413
|
+
" ",
|
|
1414
|
+
/* @__PURE__ */ o("code", { children: r.fixture.id })
|
|
1415
|
+
] }),
|
|
1416
|
+
r.fixture.description && /* @__PURE__ */ d(P, { children: [
|
|
1417
|
+
/* @__PURE__ */ o("dt", { children: s.componentFixtureDescription }),
|
|
1418
|
+
/* @__PURE__ */ o("dd", { children: r.fixture.description })
|
|
1419
|
+
] })
|
|
1420
|
+
] })
|
|
1421
|
+
] }),
|
|
1422
|
+
r?.didFallback && r.fixture && /* @__PURE__ */ o("p", { className: "ds-note", "data-tone": "warn", children: s.componentFixtureFallback(
|
|
1423
|
+
r.requestedId ?? "",
|
|
1424
|
+
r.fixture.id
|
|
1425
|
+
) })
|
|
1426
|
+
] }) : /* @__PURE__ */ o("p", { className: "ds-block", children: s.noScenario });
|
|
1427
|
+
const c = e.persona(i.persona ?? t.persona), p = i.persona ? e.persona(i.persona)?.permissions ?? [] : e.permissionsOf(t), h = e.rulesOf(t), m = e.fixture(i.fixture ?? t.fixture), b = !!(i.persona && i.persona !== t.persona);
|
|
1428
|
+
return /* @__PURE__ */ d(P, { children: [
|
|
1429
|
+
/* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1430
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.situation }),
|
|
1431
|
+
/* @__PURE__ */ o("p", { style: { color: "var(--ds-fg)", fontSize: 14, fontWeight: 600 }, children: t.title }),
|
|
1432
|
+
t.intent && /* @__PURE__ */ o("p", { children: t.intent }),
|
|
1433
|
+
/* @__PURE__ */ d("div", { className: "ds-chips", children: [
|
|
1434
|
+
/* @__PURE__ */ o("span", { className: "ds-chip", "data-tone": at(t.status), children: a.status[t.status] }),
|
|
1435
|
+
(t.tags ?? []).map((u) => /* @__PURE__ */ o("span", { className: "ds-chip", children: u }, u))
|
|
983
1436
|
] }),
|
|
984
|
-
/* @__PURE__ */
|
|
1437
|
+
/* @__PURE__ */ o("p", { style: { marginTop: 6 }, children: a.statusMeaning[t.status] })
|
|
985
1438
|
] }),
|
|
986
|
-
/* @__PURE__ */
|
|
987
|
-
/* @__PURE__ */
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
-
/* @__PURE__ */
|
|
990
|
-
/* @__PURE__ */
|
|
991
|
-
/* @__PURE__ */
|
|
992
|
-
/* @__PURE__ */
|
|
993
|
-
/* @__PURE__ */
|
|
994
|
-
/* @__PURE__ */
|
|
995
|
-
|
|
996
|
-
|
|
1439
|
+
/* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1440
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.reproduction }),
|
|
1441
|
+
/* @__PURE__ */ d("dl", { className: "ds-kv", children: [
|
|
1442
|
+
/* @__PURE__ */ o("dt", { children: s.id }),
|
|
1443
|
+
/* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.id }),
|
|
1444
|
+
/* @__PURE__ */ o("dt", { children: s.route }),
|
|
1445
|
+
/* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.route }),
|
|
1446
|
+
/* @__PURE__ */ o("dt", { children: s.persona }),
|
|
1447
|
+
/* @__PURE__ */ d("dd", { children: [
|
|
1448
|
+
c?.name ?? "—",
|
|
1449
|
+
b && /* @__PURE__ */ o("span", { className: "ds-chip", "data-tone": "warn", style: { marginLeft: 6 }, children: s.personaSwapped })
|
|
997
1450
|
] }),
|
|
998
|
-
/* @__PURE__ */
|
|
999
|
-
/* @__PURE__ */
|
|
1000
|
-
/* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */
|
|
1451
|
+
/* @__PURE__ */ o("dt", { children: s.data }),
|
|
1452
|
+
/* @__PURE__ */ o("dd", { children: m?.label ?? "—" }),
|
|
1453
|
+
/* @__PURE__ */ o("dt", { children: s.network }),
|
|
1454
|
+
/* @__PURE__ */ o("dd", { children: a.network[i.network] })
|
|
1002
1455
|
] }),
|
|
1003
|
-
|
|
1456
|
+
c?.goal && /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: s.goal(c.goal) })
|
|
1004
1457
|
] }),
|
|
1005
|
-
|
|
1006
|
-
/* @__PURE__ */
|
|
1007
|
-
/* @__PURE__ */
|
|
1458
|
+
p.length > 0 && /* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1459
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.permissions }),
|
|
1460
|
+
/* @__PURE__ */ o("div", { className: "ds-chips", children: p.map((u) => /* @__PURE__ */ o("span", { className: "ds-chip", children: u }, u)) })
|
|
1008
1461
|
] }),
|
|
1009
|
-
t.preconditions?.length ? /* @__PURE__ */
|
|
1010
|
-
/* @__PURE__ */
|
|
1011
|
-
/* @__PURE__ */
|
|
1462
|
+
t.preconditions?.length ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1463
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.preconditions }),
|
|
1464
|
+
/* @__PURE__ */ o("ul", { className: "ds-list", children: t.preconditions.map((u) => /* @__PURE__ */ o("li", { children: u }, u)) })
|
|
1012
1465
|
] }) : null,
|
|
1013
|
-
|
|
1014
|
-
/* @__PURE__ */
|
|
1015
|
-
|
|
1016
|
-
/* @__PURE__ */
|
|
1017
|
-
/* @__PURE__ */
|
|
1018
|
-
|
|
1019
|
-
] },
|
|
1466
|
+
h.length > 0 && /* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1467
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.rules }),
|
|
1468
|
+
h.map((u) => /* @__PURE__ */ d("div", { className: "ds-rule", children: [
|
|
1469
|
+
/* @__PURE__ */ o("span", { className: "ds-rule__id", children: u.id }),
|
|
1470
|
+
/* @__PURE__ */ o("span", { className: "ds-rule__statement", children: u.statement }),
|
|
1471
|
+
u.rationale && /* @__PURE__ */ o("p", { className: "ds-rule__rationale", children: u.rationale })
|
|
1472
|
+
] }, u.id))
|
|
1020
1473
|
] }),
|
|
1021
|
-
t.actions?.length ? /* @__PURE__ */
|
|
1022
|
-
/* @__PURE__ */
|
|
1023
|
-
/* @__PURE__ */
|
|
1474
|
+
t.actions?.length ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1475
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.actions }),
|
|
1476
|
+
/* @__PURE__ */ o("ul", { className: "ds-list", children: t.actions.map((u) => /* @__PURE__ */ o("li", { children: u }, u)) })
|
|
1024
1477
|
] }) : null,
|
|
1025
|
-
t.expected?.length ? /* @__PURE__ */
|
|
1026
|
-
/* @__PURE__ */
|
|
1027
|
-
/* @__PURE__ */
|
|
1478
|
+
t.expected?.length ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1479
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.expected }),
|
|
1480
|
+
/* @__PURE__ */ o("ul", { className: "ds-list", children: t.expected.map((u) => /* @__PURE__ */ o("li", { children: u }, u)) })
|
|
1028
1481
|
] }) : null,
|
|
1029
|
-
t.approvedAt && /* @__PURE__ */
|
|
1030
|
-
/* @__PURE__ */
|
|
1031
|
-
/* @__PURE__ */
|
|
1482
|
+
t.approvedAt && /* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1483
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.approval }),
|
|
1484
|
+
/* @__PURE__ */ d("p", { children: [
|
|
1032
1485
|
t.approvedAt.date,
|
|
1033
1486
|
" · ",
|
|
1034
|
-
/* @__PURE__ */
|
|
1487
|
+
/* @__PURE__ */ o("code", { children: t.approvedAt.commit.slice(0, 7) })
|
|
1035
1488
|
] }),
|
|
1036
|
-
/* @__PURE__ */
|
|
1489
|
+
/* @__PURE__ */ o("a", { href: t.approvedAt.url, target: "_blank", rel: "noreferrer", children: s.openApproved })
|
|
1037
1490
|
] }),
|
|
1038
|
-
t.ticket && /* @__PURE__ */
|
|
1039
|
-
/* @__PURE__ */
|
|
1040
|
-
/* @__PURE__ */
|
|
1491
|
+
t.ticket && /* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1492
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.engineering }),
|
|
1493
|
+
/* @__PURE__ */ o("p", { children: t.ticket })
|
|
1041
1494
|
] })
|
|
1042
1495
|
] });
|
|
1043
1496
|
}
|
|
1044
|
-
function
|
|
1497
|
+
function tt({
|
|
1045
1498
|
registry: e,
|
|
1046
1499
|
scenario: t,
|
|
1047
1500
|
focusedNode: n,
|
|
1048
|
-
keyboardMode:
|
|
1049
|
-
tabStopCount:
|
|
1501
|
+
keyboardMode: r,
|
|
1502
|
+
tabStopCount: i
|
|
1050
1503
|
}) {
|
|
1051
|
-
const
|
|
1052
|
-
return /* @__PURE__ */
|
|
1053
|
-
t && /* @__PURE__ */
|
|
1054
|
-
/* @__PURE__ */
|
|
1055
|
-
/* @__PURE__ */
|
|
1056
|
-
/* @__PURE__ */
|
|
1057
|
-
/* @__PURE__ */
|
|
1058
|
-
/* @__PURE__ */
|
|
1059
|
-
/* @__PURE__ */
|
|
1504
|
+
const a = A(), s = a.inspector, c = he(e.product.theme?.contrastPairs), p = c.filter((h) => h.passes !== !0);
|
|
1505
|
+
return /* @__PURE__ */ d(P, { children: [
|
|
1506
|
+
t && /* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1507
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.a11yContract }),
|
|
1508
|
+
/* @__PURE__ */ d("dl", { className: "ds-kv", children: [
|
|
1509
|
+
/* @__PURE__ */ o("dt", { children: s.keyboard }),
|
|
1510
|
+
/* @__PURE__ */ o("dd", { children: a.keyboard[t.a11y.keyboard] }),
|
|
1511
|
+
/* @__PURE__ */ o("dt", { children: s.contrast }),
|
|
1512
|
+
/* @__PURE__ */ o("dd", { children: s.contrastTarget(t.a11y.contrast) })
|
|
1060
1513
|
] }),
|
|
1061
|
-
t.a11y.announces?.length ? /* @__PURE__ */
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
/* @__PURE__ */
|
|
1514
|
+
t.a11y.announces?.length ? /* @__PURE__ */ d(P, { children: [
|
|
1515
|
+
/* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: s.announces }),
|
|
1516
|
+
/* @__PURE__ */ o("div", { className: "ds-chips", children: t.a11y.announces.map((h) => /* @__PURE__ */ o("span", { className: "ds-chip", children: h }, h)) })
|
|
1064
1517
|
] }) : null,
|
|
1065
|
-
t.a11y.notes && /* @__PURE__ */
|
|
1518
|
+
t.a11y.notes && /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: t.a11y.notes })
|
|
1066
1519
|
] }),
|
|
1067
|
-
/* @__PURE__ */
|
|
1068
|
-
/* @__PURE__ */
|
|
1069
|
-
|
|
1070
|
-
/* @__PURE__ */
|
|
1071
|
-
/* @__PURE__ */
|
|
1072
|
-
/* @__PURE__ */
|
|
1073
|
-
/* @__PURE__ */
|
|
1074
|
-
/* @__PURE__ */
|
|
1075
|
-
/* @__PURE__ */
|
|
1076
|
-
/* @__PURE__ */
|
|
1077
|
-
n.description ? /* @__PURE__ */
|
|
1078
|
-
/* @__PURE__ */
|
|
1079
|
-
/* @__PURE__ */
|
|
1520
|
+
/* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1521
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.focusedElement }),
|
|
1522
|
+
r ? n ? /* @__PURE__ */ d(P, { children: [
|
|
1523
|
+
/* @__PURE__ */ d("dl", { className: "ds-kv", children: [
|
|
1524
|
+
/* @__PURE__ */ o("dt", { children: s.role }),
|
|
1525
|
+
/* @__PURE__ */ o("dd", { children: n.role }),
|
|
1526
|
+
/* @__PURE__ */ o("dt", { children: s.name }),
|
|
1527
|
+
/* @__PURE__ */ o("dd", { children: n.name ? n.name : /* @__PURE__ */ o("span", { style: { color: "var(--ds-err)" }, children: s.noAccessibleName }) }),
|
|
1528
|
+
/* @__PURE__ */ o("dt", { children: s.nameFrom }),
|
|
1529
|
+
/* @__PURE__ */ o("dd", { children: n.nameFrom }),
|
|
1530
|
+
n.description ? /* @__PURE__ */ d(P, { children: [
|
|
1531
|
+
/* @__PURE__ */ o("dt", { children: s.description }),
|
|
1532
|
+
/* @__PURE__ */ o("dd", { children: n.description })
|
|
1080
1533
|
] }) : null,
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
/* @__PURE__ */
|
|
1534
|
+
/* @__PURE__ */ o("dt", { children: s.selector }),
|
|
1535
|
+
/* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: n.selector })
|
|
1083
1536
|
] }),
|
|
1084
|
-
n.states.length > 0 && /* @__PURE__ */
|
|
1085
|
-
n.hiddenFromAssistiveTech && /* @__PURE__ */
|
|
1086
|
-
/* @__PURE__ */
|
|
1087
|
-
] }) : /* @__PURE__ */
|
|
1537
|
+
n.states.length > 0 && /* @__PURE__ */ o("div", { className: "ds-chips", style: { marginTop: 8 }, children: n.states.map((h) => /* @__PURE__ */ o("span", { className: "ds-chip", children: h }, h)) }),
|
|
1538
|
+
n.hiddenFromAssistiveTech && /* @__PURE__ */ o("p", { className: "ds-note", style: { marginTop: 8 }, children: s.focusableButHidden }),
|
|
1539
|
+
/* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: s.tabStopsInStage(i) })
|
|
1540
|
+
] }) : /* @__PURE__ */ o("p", { children: s.pressTab(i) }) : /* @__PURE__ */ o("p", { children: s.keyboardModeOff })
|
|
1088
1541
|
] }),
|
|
1089
|
-
/* @__PURE__ */
|
|
1090
|
-
/* @__PURE__ */
|
|
1091
|
-
|
|
1092
|
-
/* @__PURE__ */
|
|
1093
|
-
/* @__PURE__ */
|
|
1094
|
-
/* @__PURE__ */
|
|
1542
|
+
/* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1543
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.tokenContrast }),
|
|
1544
|
+
c.length === 0 ? /* @__PURE__ */ o("p", { children: s.noContrastPairs }) : /* @__PURE__ */ d("table", { className: "ds-contrast", children: [
|
|
1545
|
+
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ d("tr", { children: [
|
|
1546
|
+
/* @__PURE__ */ o("th", { scope: "col", children: s.pair }),
|
|
1547
|
+
/* @__PURE__ */ o("th", { scope: "col", children: s.ratio })
|
|
1095
1548
|
] }) }),
|
|
1096
|
-
/* @__PURE__ */
|
|
1097
|
-
/* @__PURE__ */
|
|
1098
|
-
/* @__PURE__ */
|
|
1549
|
+
/* @__PURE__ */ o("tbody", { children: c.map((h) => /* @__PURE__ */ d("tr", { children: [
|
|
1550
|
+
/* @__PURE__ */ d("td", { children: [
|
|
1551
|
+
/* @__PURE__ */ o(
|
|
1099
1552
|
"span",
|
|
1100
1553
|
{
|
|
1101
1554
|
className: "ds-swatch",
|
|
1102
|
-
style: { background:
|
|
1555
|
+
style: { background: h.pair.background },
|
|
1103
1556
|
"aria-hidden": "true"
|
|
1104
1557
|
}
|
|
1105
1558
|
),
|
|
1106
|
-
/* @__PURE__ */
|
|
1559
|
+
/* @__PURE__ */ o(
|
|
1107
1560
|
"span",
|
|
1108
1561
|
{
|
|
1109
1562
|
className: "ds-swatch",
|
|
1110
|
-
style: { background:
|
|
1563
|
+
style: { background: h.pair.foreground },
|
|
1111
1564
|
"aria-hidden": "true"
|
|
1112
1565
|
}
|
|
1113
1566
|
),
|
|
1114
|
-
|
|
1567
|
+
h.pair.name
|
|
1115
1568
|
] }),
|
|
1116
|
-
/* @__PURE__ */
|
|
1569
|
+
/* @__PURE__ */ o(
|
|
1117
1570
|
"td",
|
|
1118
1571
|
{
|
|
1119
1572
|
style: {
|
|
1120
|
-
color:
|
|
1573
|
+
color: h.passes === !0 ? "var(--ds-ok)" : h.passes === !1 ? "var(--ds-err)" : "var(--ds-warn)"
|
|
1121
1574
|
},
|
|
1122
|
-
children:
|
|
1575
|
+
children: h.label
|
|
1123
1576
|
}
|
|
1124
1577
|
)
|
|
1125
|
-
] },
|
|
1578
|
+
] }, h.pair.name)) })
|
|
1126
1579
|
] }),
|
|
1127
|
-
|
|
1580
|
+
p.length > 0 && /* @__PURE__ */ o("p", { className: "ds-note", style: { marginTop: 8 }, children: s.pairsFailing(p.length) })
|
|
1128
1581
|
] }),
|
|
1129
|
-
/* @__PURE__ */
|
|
1582
|
+
/* @__PURE__ */ o("p", { className: "ds-note", children: s.automatedIsFloor })
|
|
1130
1583
|
] });
|
|
1131
1584
|
}
|
|
1132
|
-
function
|
|
1133
|
-
const t =
|
|
1134
|
-
return /* @__PURE__ */
|
|
1135
|
-
/* @__PURE__ */
|
|
1136
|
-
/* @__PURE__ */
|
|
1137
|
-
/* @__PURE__ */
|
|
1138
|
-
/* @__PURE__ */
|
|
1139
|
-
/* @__PURE__ */
|
|
1140
|
-
] },
|
|
1141
|
-
/* @__PURE__ */
|
|
1585
|
+
function ot({ registry: e }) {
|
|
1586
|
+
const t = A(), n = t.inspector, r = e.coverage({ includePorted: !0 }), { issues: i } = e;
|
|
1587
|
+
return /* @__PURE__ */ d(P, { children: [
|
|
1588
|
+
/* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1589
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: n.coverage }),
|
|
1590
|
+
/* @__PURE__ */ o("dl", { className: "ds-kv", children: Object.entries(r).filter(([, a]) => a > 0).map(([a, s]) => /* @__PURE__ */ d("div", { style: { display: "contents" }, children: [
|
|
1591
|
+
/* @__PURE__ */ o("dt", { children: t.status[a] }),
|
|
1592
|
+
/* @__PURE__ */ o("dd", { style: { fontVariantNumeric: "tabular-nums" }, children: s })
|
|
1593
|
+
] }, a)) }),
|
|
1594
|
+
/* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: n.scenariosRegistered(e.product.scenarios.length) })
|
|
1142
1595
|
] }),
|
|
1143
|
-
/* @__PURE__ */
|
|
1144
|
-
/* @__PURE__ */
|
|
1145
|
-
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
|
|
1148
|
-
] }, `${
|
|
1596
|
+
/* @__PURE__ */ d("div", { className: "ds-block", children: [
|
|
1597
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: n.scenarioContract }),
|
|
1598
|
+
i.length === 0 ? /* @__PURE__ */ o("p", { children: n.noIssues }) : i.map((a, s) => /* @__PURE__ */ d("div", { className: "ds-issue", "data-level": a.level, children: [
|
|
1599
|
+
/* @__PURE__ */ o("span", { className: "ds-issue__where", children: a.where }),
|
|
1600
|
+
a.message
|
|
1601
|
+
] }, `${a.where}-${s}`))
|
|
1149
1602
|
] })
|
|
1150
1603
|
] });
|
|
1151
1604
|
}
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1605
|
+
const nt = {
|
|
1606
|
+
ported: void 0,
|
|
1607
|
+
proposed: "warn",
|
|
1608
|
+
"in-review": "warn",
|
|
1609
|
+
approved: "ok",
|
|
1610
|
+
"in-implementation": void 0,
|
|
1611
|
+
implemented: "ok",
|
|
1612
|
+
superseded: void 0
|
|
1613
|
+
};
|
|
1614
|
+
function at(e) {
|
|
1615
|
+
return nt[e];
|
|
1155
1616
|
}
|
|
1156
|
-
const
|
|
1157
|
-
return /* @__PURE__ */
|
|
1617
|
+
const rt = ce(function({ viewport: t, textScale: n, reducedMotion: r, keyboardMode: i, children: a }, s) {
|
|
1618
|
+
return /* @__PURE__ */ o("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ o(
|
|
1158
1619
|
"div",
|
|
1159
1620
|
{
|
|
1160
|
-
ref:
|
|
1621
|
+
ref: s,
|
|
1161
1622
|
className: "ds-stage",
|
|
1162
1623
|
"data-viewport": t.id,
|
|
1163
|
-
"data-keyboard-mode":
|
|
1164
|
-
"data-reduced-motion":
|
|
1624
|
+
"data-keyboard-mode": i,
|
|
1625
|
+
"data-reduced-motion": r,
|
|
1165
1626
|
style: {
|
|
1166
1627
|
width: t.width ? `${t.width}px` : "100%",
|
|
1167
1628
|
minHeight: t.height ? `${t.height}px` : void 0,
|
|
@@ -1170,12 +1631,12 @@ const Ue = re(function({ viewport: t, textScale: n, reducedMotion: s, keyboardMo
|
|
|
1170
1631
|
// texto grande e só dar zoom na captura de tela.
|
|
1171
1632
|
fontSize: n === 1 ? void 0 : `${n * 100}%`
|
|
1172
1633
|
},
|
|
1173
|
-
children:
|
|
1634
|
+
children: a
|
|
1174
1635
|
}
|
|
1175
1636
|
) });
|
|
1176
1637
|
});
|
|
1177
|
-
function
|
|
1178
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
1638
|
+
function st({ stops: e }) {
|
|
1639
|
+
return e.length === 0 ? null : /* @__PURE__ */ o("div", { className: "ds-chrome ds-taborder", "aria-hidden": "true", children: e.map((t) => /* @__PURE__ */ o(
|
|
1179
1640
|
"span",
|
|
1180
1641
|
{
|
|
1181
1642
|
className: "ds-taborder__badge",
|
|
@@ -1186,42 +1647,44 @@ function Ke({ stops: e }) {
|
|
|
1186
1647
|
`${t.index}-${t.rect.top}-${t.rect.left}`
|
|
1187
1648
|
)) });
|
|
1188
1649
|
}
|
|
1189
|
-
function
|
|
1190
|
-
return /* @__PURE__ */
|
|
1191
|
-
/* @__PURE__ */
|
|
1650
|
+
function it({ title: e, children: t }) {
|
|
1651
|
+
return /* @__PURE__ */ d("div", { className: "ds-chrome ds-stage-empty", children: [
|
|
1652
|
+
/* @__PURE__ */ o("h2", { children: e }),
|
|
1192
1653
|
t
|
|
1193
1654
|
] });
|
|
1194
1655
|
}
|
|
1195
|
-
function
|
|
1196
|
-
const
|
|
1197
|
-
return /* @__PURE__ */
|
|
1198
|
-
/* @__PURE__ */
|
|
1199
|
-
/* @__PURE__ */
|
|
1200
|
-
|
|
1201
|
-
/* @__PURE__ */
|
|
1202
|
-
/* @__PURE__ */
|
|
1203
|
-
|
|
1656
|
+
function ct({ registry: e, onOpenScenario: t, showPorted: n = !1 }) {
|
|
1657
|
+
const r = A(), { product: i } = e, a = { includePorted: n }, s = e.coverage(a), c = e.activeScenarios(a).length, p = e.treeFor(a).filter((m) => m.scenarios.length > 0), h = e.orphansFor(a);
|
|
1658
|
+
return /* @__PURE__ */ d("div", { className: "ds-chrome ds-home", children: [
|
|
1659
|
+
/* @__PURE__ */ d("header", { className: "ds-home__header", children: [
|
|
1660
|
+
/* @__PURE__ */ o("h1", { children: i.name }),
|
|
1661
|
+
i.tagline && /* @__PURE__ */ o("p", { className: "ds-home__tagline", children: i.tagline }),
|
|
1662
|
+
/* @__PURE__ */ o("p", { className: "ds-home__lead", children: r.home.lead(c) }),
|
|
1663
|
+
/* @__PURE__ */ o("div", { className: "ds-chips", children: Object.entries(s).filter(([, m]) => m > 0).map(([m, b]) => /* @__PURE__ */ d("span", { className: "ds-chip", children: [
|
|
1664
|
+
r.status[m],
|
|
1204
1665
|
": ",
|
|
1205
|
-
|
|
1206
|
-
] },
|
|
1666
|
+
b
|
|
1667
|
+
] }, m)) })
|
|
1207
1668
|
] }),
|
|
1208
|
-
|
|
1209
|
-
|
|
1669
|
+
c === 0 && /* @__PURE__ */ o("p", { className: "ds-home__empty", children: r.home.noActiveWork }),
|
|
1670
|
+
p.map(({ module: m, scenarios: b }) => /* @__PURE__ */ o(
|
|
1671
|
+
dt,
|
|
1210
1672
|
{
|
|
1211
|
-
module:
|
|
1212
|
-
scenarios:
|
|
1673
|
+
module: m,
|
|
1674
|
+
scenarios: b,
|
|
1213
1675
|
registry: e,
|
|
1676
|
+
showPorted: n,
|
|
1214
1677
|
onOpenScenario: t
|
|
1215
1678
|
},
|
|
1216
|
-
|
|
1679
|
+
m.id
|
|
1217
1680
|
)),
|
|
1218
|
-
|
|
1219
|
-
/* @__PURE__ */
|
|
1220
|
-
/* @__PURE__ */
|
|
1221
|
-
/* @__PURE__ */
|
|
1222
|
-
|
|
1681
|
+
h.length > 0 && /* @__PURE__ */ d("section", { className: "ds-home__module", children: [
|
|
1682
|
+
/* @__PURE__ */ o("h2", { children: r.home.withoutModule }),
|
|
1683
|
+
/* @__PURE__ */ o("p", { className: "ds-home__hint", children: r.home.withoutModuleHint }),
|
|
1684
|
+
/* @__PURE__ */ o(
|
|
1685
|
+
re,
|
|
1223
1686
|
{
|
|
1224
|
-
scenarios:
|
|
1687
|
+
scenarios: h,
|
|
1225
1688
|
registry: e,
|
|
1226
1689
|
onOpenScenario: t
|
|
1227
1690
|
}
|
|
@@ -1229,202 +1692,260 @@ function qe({ registry: e, onOpenScenario: t }) {
|
|
|
1229
1692
|
] })
|
|
1230
1693
|
] });
|
|
1231
1694
|
}
|
|
1232
|
-
function
|
|
1695
|
+
function dt({
|
|
1233
1696
|
module: e,
|
|
1234
1697
|
scenarios: t,
|
|
1235
1698
|
registry: n,
|
|
1236
|
-
|
|
1699
|
+
showPorted: r,
|
|
1700
|
+
onOpenScenario: i
|
|
1237
1701
|
}) {
|
|
1238
|
-
return /* @__PURE__ */
|
|
1239
|
-
/* @__PURE__ */
|
|
1240
|
-
e.description && /* @__PURE__ */
|
|
1241
|
-
(e.flows ?? []).map((
|
|
1242
|
-
|
|
1702
|
+
return /* @__PURE__ */ d("section", { className: "ds-home__module", children: [
|
|
1703
|
+
/* @__PURE__ */ o("h2", { children: e.name }),
|
|
1704
|
+
e.description && /* @__PURE__ */ o("p", { className: "ds-home__hint", children: e.description }),
|
|
1705
|
+
(e.flows ?? []).map((a) => /* @__PURE__ */ o(
|
|
1706
|
+
lt,
|
|
1707
|
+
{
|
|
1708
|
+
flow: a,
|
|
1709
|
+
registry: n,
|
|
1710
|
+
showPorted: r,
|
|
1711
|
+
onOpenScenario: i
|
|
1712
|
+
},
|
|
1713
|
+
a.id
|
|
1714
|
+
)),
|
|
1715
|
+
/* @__PURE__ */ o(re, { scenarios: t, registry: n, onOpenScenario: i })
|
|
1243
1716
|
] });
|
|
1244
1717
|
}
|
|
1245
|
-
function
|
|
1718
|
+
function lt({
|
|
1246
1719
|
flow: e,
|
|
1247
1720
|
registry: t,
|
|
1248
|
-
|
|
1721
|
+
showPorted: n,
|
|
1722
|
+
onOpenScenario: r
|
|
1249
1723
|
}) {
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1724
|
+
const i = e.steps.filter((a) => {
|
|
1725
|
+
const s = t.scenario(a.scenario);
|
|
1726
|
+
return s && (n || s.status !== "ported");
|
|
1727
|
+
});
|
|
1728
|
+
return i.length === 0 ? null : /* @__PURE__ */ d("div", { className: "ds-flow", children: [
|
|
1729
|
+
/* @__PURE__ */ o("h3", { children: e.title }),
|
|
1730
|
+
e.description && /* @__PURE__ */ o("p", { className: "ds-home__hint", children: e.description }),
|
|
1731
|
+
/* @__PURE__ */ o("ol", { className: "ds-flow__steps", children: i.map((a, s) => {
|
|
1732
|
+
const c = t.scenario(a.scenario), p = Object.entries(a.branches ?? {}).filter(([, h]) => {
|
|
1733
|
+
const m = t.scenario(h);
|
|
1734
|
+
return m && (n || m.status !== "ported");
|
|
1735
|
+
});
|
|
1736
|
+
return /* @__PURE__ */ d("li", { children: [
|
|
1737
|
+
/* @__PURE__ */ o("button", { type: "button", className: "ds-flow__step", onClick: () => r(a.scenario), children: a.label ?? c?.title ?? a.scenario }),
|
|
1738
|
+
a.decision && /* @__PURE__ */ o("p", { className: "ds-flow__decision", children: a.decision }),
|
|
1739
|
+
p.length > 0 && /* @__PURE__ */ o("ul", { className: "ds-flow__branches", children: p.map(([h, m]) => /* @__PURE__ */ d("li", { children: [
|
|
1740
|
+
/* @__PURE__ */ o("span", { className: "ds-flow__branch-label", children: h }),
|
|
1741
|
+
/* @__PURE__ */ o(
|
|
1261
1742
|
"button",
|
|
1262
1743
|
{
|
|
1263
1744
|
type: "button",
|
|
1264
1745
|
className: "ds-flow__step",
|
|
1265
|
-
onClick: () =>
|
|
1746
|
+
onClick: () => r(m),
|
|
1266
1747
|
children: t.scenario(m)?.title ?? m
|
|
1267
1748
|
}
|
|
1268
1749
|
)
|
|
1269
|
-
] },
|
|
1270
|
-
] }, `${
|
|
1750
|
+
] }, h)) })
|
|
1751
|
+
] }, `${a.scenario}-${s}`);
|
|
1271
1752
|
}) })
|
|
1272
1753
|
] });
|
|
1273
1754
|
}
|
|
1274
|
-
function
|
|
1755
|
+
function re({
|
|
1275
1756
|
scenarios: e,
|
|
1276
1757
|
registry: t,
|
|
1277
1758
|
onOpenScenario: n
|
|
1278
1759
|
}) {
|
|
1279
|
-
const
|
|
1280
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
1281
|
-
/* @__PURE__ */
|
|
1282
|
-
/* @__PURE__ */
|
|
1283
|
-
/* @__PURE__ */
|
|
1760
|
+
const r = A();
|
|
1761
|
+
return e.length === 0 ? /* @__PURE__ */ o("p", { className: "ds-home__hint", children: r.home.emptyModule }) : /* @__PURE__ */ o("ul", { className: "ds-home__grid", children: e.map((i) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ d("button", { type: "button", className: "ds-home__card", onClick: () => n(i.id), children: [
|
|
1762
|
+
/* @__PURE__ */ d("span", { className: "ds-home__card-head", children: [
|
|
1763
|
+
/* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": i.status }),
|
|
1764
|
+
/* @__PURE__ */ o("span", { className: "ds-home__card-title", children: i.title })
|
|
1284
1765
|
] }),
|
|
1285
|
-
|
|
1286
|
-
/* @__PURE__ */
|
|
1287
|
-
t.persona(
|
|
1766
|
+
i.intent && /* @__PURE__ */ o("span", { className: "ds-home__card-intent", children: i.intent }),
|
|
1767
|
+
/* @__PURE__ */ d("span", { className: "ds-home__card-meta", children: [
|
|
1768
|
+
t.persona(i.persona)?.name ?? i.persona,
|
|
1288
1769
|
" · ",
|
|
1289
|
-
|
|
1290
|
-
|
|
1770
|
+
r.status[i.status],
|
|
1771
|
+
i.a11y.keyboard === "full" ? ` · ${r.home.keyboardBadge}` : ""
|
|
1291
1772
|
] })
|
|
1292
|
-
] }) },
|
|
1773
|
+
] }) }, i.id)) });
|
|
1293
1774
|
}
|
|
1294
|
-
function
|
|
1295
|
-
const t =
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1775
|
+
function Nt({ product: e }) {
|
|
1776
|
+
const t = T(() => me(e), [e]), n = T(() => je(e.theme?.labels), [e.theme?.labels]), r = T(() => pe(e.deploy), [e.deploy]), { location: i, controls: a, viewport: s, setControls: c, navigate: p, openScenario: h, openComponent: m } = ge(t), b = q(null), { focused: u, tabStops: S } = We(a.keyboardMode, b), w = t.scenario(a.scenario), C = t.component(a.component), l = T(
|
|
1777
|
+
() => t.resolveComponentFixture(C?.id, C ? a.fixture : void 0),
|
|
1778
|
+
[C, a.fixture, t]
|
|
1779
|
+
), g = T(() => {
|
|
1780
|
+
const x = l.fixture?.data;
|
|
1781
|
+
return typeof x == "function" ? x() : x;
|
|
1782
|
+
}, [l.fixture]), k = t.persona(a.persona ?? w?.persona), M = t.fixture(a.fixture ?? w?.fixture), _ = T(() => {
|
|
1783
|
+
const x = a.dataSource ?? "fixtures";
|
|
1784
|
+
return x === "fixtures" ? J : e.dataSources?.adapters?.find((L) => L.id === x) ?? J;
|
|
1785
|
+
}, [a.dataSource, e.dataSources?.adapters]), { data: $, isLoading: D, error: W } = Te({ scenario: w, fixture: M, network: a.network, adapter: _ });
|
|
1786
|
+
B(() => {
|
|
1787
|
+
const x = (L) => {
|
|
1788
|
+
if (!(!L.shiftKey || L.metaKey || L.ctrlKey || L.altKey || L.target?.matches("input, textarea, select, [contenteditable='true']"))) {
|
|
1789
|
+
switch (L.key) {
|
|
1306
1790
|
case "K":
|
|
1307
|
-
|
|
1791
|
+
c({ keyboardMode: !a.keyboardMode });
|
|
1308
1792
|
break;
|
|
1309
1793
|
case "P":
|
|
1310
|
-
|
|
1794
|
+
c({ inspector: !a.inspector });
|
|
1311
1795
|
break;
|
|
1312
1796
|
default:
|
|
1313
1797
|
return;
|
|
1314
1798
|
}
|
|
1315
|
-
|
|
1799
|
+
L.preventDefault();
|
|
1316
1800
|
}
|
|
1317
1801
|
};
|
|
1318
|
-
return window.addEventListener("keydown",
|
|
1319
|
-
}, [
|
|
1320
|
-
const
|
|
1802
|
+
return window.addEventListener("keydown", x), () => window.removeEventListener("keydown", x);
|
|
1803
|
+
}, [a.keyboardMode, a.inspector, c]);
|
|
1804
|
+
const R = T(() => a.persona && a.persona !== w?.persona ? t.persona(a.persona)?.permissions ?? [] : t.permissionsOf(w), [a.persona, t, w]), j = T(
|
|
1321
1805
|
() => ({
|
|
1322
|
-
scenario:
|
|
1323
|
-
persona:
|
|
1324
|
-
permissions:
|
|
1325
|
-
can: (
|
|
1326
|
-
data:
|
|
1327
|
-
fixture:
|
|
1328
|
-
network:
|
|
1329
|
-
isLoading:
|
|
1330
|
-
error:
|
|
1331
|
-
rules: t.rulesOf(
|
|
1332
|
-
viewport:
|
|
1333
|
-
themeMode:
|
|
1334
|
-
locale:
|
|
1806
|
+
scenario: w,
|
|
1807
|
+
persona: k,
|
|
1808
|
+
permissions: R,
|
|
1809
|
+
can: (x) => R.includes(x),
|
|
1810
|
+
data: $,
|
|
1811
|
+
fixture: M,
|
|
1812
|
+
network: a.network,
|
|
1813
|
+
isLoading: D,
|
|
1814
|
+
error: W,
|
|
1815
|
+
rules: t.rulesOf(w),
|
|
1816
|
+
viewport: s,
|
|
1817
|
+
themeMode: a.themeMode,
|
|
1818
|
+
locale: a.locale,
|
|
1335
1819
|
a11y: {
|
|
1336
|
-
keyboardMode:
|
|
1337
|
-
reducedMotion:
|
|
1338
|
-
textScale:
|
|
1820
|
+
keyboardMode: a.keyboardMode,
|
|
1821
|
+
reducedMotion: a.reducedMotion,
|
|
1822
|
+
textScale: a.textScale
|
|
1339
1823
|
},
|
|
1340
|
-
navigate:
|
|
1341
|
-
openScenario:
|
|
1824
|
+
navigate: p,
|
|
1825
|
+
openScenario: h
|
|
1342
1826
|
}),
|
|
1343
1827
|
[
|
|
1344
|
-
b,
|
|
1345
1828
|
w,
|
|
1346
|
-
|
|
1829
|
+
k,
|
|
1347
1830
|
R,
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1831
|
+
$,
|
|
1832
|
+
M,
|
|
1833
|
+
a.network,
|
|
1834
|
+
a.themeMode,
|
|
1835
|
+
a.locale,
|
|
1836
|
+
a.keyboardMode,
|
|
1837
|
+
a.reducedMotion,
|
|
1838
|
+
a.textScale,
|
|
1356
1839
|
D,
|
|
1840
|
+
W,
|
|
1357
1841
|
t,
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1842
|
+
s,
|
|
1843
|
+
p,
|
|
1844
|
+
h
|
|
1361
1845
|
]
|
|
1362
|
-
),
|
|
1363
|
-
|
|
1846
|
+
), U = !w && !C && i.path === "/", O = xe(e.routes, i.path), H = e.wrapper, K = e.notFound, f = C?.preview, N = f ? /* @__PURE__ */ o(
|
|
1847
|
+
f,
|
|
1848
|
+
{
|
|
1849
|
+
fixture: l.fixture,
|
|
1850
|
+
data: g,
|
|
1851
|
+
viewport: s,
|
|
1852
|
+
themeMode: a.themeMode ?? "default",
|
|
1853
|
+
locale: a.locale ?? "default",
|
|
1854
|
+
a11y: {
|
|
1855
|
+
keyboardMode: a.keyboardMode,
|
|
1856
|
+
reducedMotion: a.reducedMotion,
|
|
1857
|
+
textScale: a.textScale
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
) : O ? /* @__PURE__ */ o(O.definition.screen, { params: O.params, context: j }) : K ? /* @__PURE__ */ o(K, { path: i.path }) : /* @__PURE__ */ o(it, { title: n.shell.noRoute, children: /* @__PURE__ */ d("p", { children: [
|
|
1861
|
+
/* @__PURE__ */ o("code", { children: i.path }),
|
|
1364
1862
|
" ",
|
|
1365
1863
|
n.shell.noRouteHint
|
|
1366
|
-
] }) }),
|
|
1367
|
-
return /* @__PURE__ */
|
|
1864
|
+
] }) }), y = H ? /* @__PURE__ */ o(H, { context: j, children: N }) : N;
|
|
1865
|
+
return /* @__PURE__ */ o(ae.Provider, { value: n, children: /* @__PURE__ */ d(
|
|
1368
1866
|
"div",
|
|
1369
1867
|
{
|
|
1370
1868
|
className: "ds-root",
|
|
1371
|
-
"data-chrome":
|
|
1372
|
-
"data-
|
|
1373
|
-
"data-
|
|
1374
|
-
"data-viewport":
|
|
1869
|
+
"data-chrome": a.chrome ? "visible" : "hidden",
|
|
1870
|
+
"data-appearance": a.chromeTheme ?? "dark",
|
|
1871
|
+
"data-inspector": a.inspector ? "open" : "closed",
|
|
1872
|
+
"data-viewport": s.id,
|
|
1375
1873
|
children: [
|
|
1376
|
-
|
|
1377
|
-
|
|
1874
|
+
a.chrome && /* @__PURE__ */ o(
|
|
1875
|
+
Ve,
|
|
1378
1876
|
{
|
|
1379
1877
|
product: e,
|
|
1380
|
-
scenario:
|
|
1381
|
-
deploy:
|
|
1382
|
-
inspectorOpen:
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1878
|
+
scenario: w,
|
|
1879
|
+
deploy: r,
|
|
1880
|
+
inspectorOpen: a.inspector,
|
|
1881
|
+
chromeTheme: a.chromeTheme ?? "dark",
|
|
1882
|
+
showPorted: a.showPorted ?? !1,
|
|
1883
|
+
onToggleInspector: () => c({ inspector: !a.inspector }),
|
|
1884
|
+
onToggleChromeTheme: () => c({ chromeTheme: a.chromeTheme === "light" ? "dark" : "light" })
|
|
1387
1885
|
}
|
|
1388
1886
|
),
|
|
1389
|
-
|
|
1390
|
-
|
|
1887
|
+
a.chrome && /* @__PURE__ */ o(
|
|
1888
|
+
He,
|
|
1391
1889
|
{
|
|
1392
1890
|
registry: t,
|
|
1393
|
-
activeScenario:
|
|
1394
|
-
|
|
1891
|
+
activeScenario: w,
|
|
1892
|
+
activeComponent: a.component,
|
|
1893
|
+
controls: a,
|
|
1894
|
+
onOpenScenario: h,
|
|
1895
|
+
onOpenComponent: m,
|
|
1896
|
+
onShowPortedChange: (x) => c({ showPorted: x })
|
|
1395
1897
|
}
|
|
1396
1898
|
),
|
|
1397
|
-
/* @__PURE__ */
|
|
1398
|
-
|
|
1399
|
-
|
|
1899
|
+
/* @__PURE__ */ d("div", { className: "ds-stage-area", children: [
|
|
1900
|
+
U ? /* @__PURE__ */ o("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ o(
|
|
1901
|
+
ct,
|
|
1400
1902
|
{
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1903
|
+
registry: t,
|
|
1904
|
+
showPorted: a.showPorted ?? !1,
|
|
1905
|
+
onOpenScenario: h
|
|
1906
|
+
}
|
|
1907
|
+
) }) : /* @__PURE__ */ o(
|
|
1908
|
+
rt,
|
|
1909
|
+
{
|
|
1910
|
+
ref: b,
|
|
1911
|
+
viewport: s,
|
|
1912
|
+
textScale: a.textScale,
|
|
1913
|
+
reducedMotion: a.reducedMotion,
|
|
1914
|
+
keyboardMode: a.keyboardMode,
|
|
1915
|
+
children: y
|
|
1407
1916
|
}
|
|
1408
1917
|
),
|
|
1409
|
-
|
|
1918
|
+
a.chrome && /* @__PURE__ */ o(
|
|
1919
|
+
Qe,
|
|
1920
|
+
{
|
|
1921
|
+
registry: t,
|
|
1922
|
+
controls: a,
|
|
1923
|
+
scenarioActive: !!w,
|
|
1924
|
+
component: C,
|
|
1925
|
+
componentFixture: l,
|
|
1926
|
+
onChange: c
|
|
1927
|
+
}
|
|
1928
|
+
)
|
|
1410
1929
|
] }),
|
|
1411
|
-
|
|
1412
|
-
|
|
1930
|
+
a.chrome && /* @__PURE__ */ o(
|
|
1931
|
+
Ze,
|
|
1413
1932
|
{
|
|
1414
1933
|
registry: t,
|
|
1415
|
-
scenario:
|
|
1416
|
-
|
|
1934
|
+
scenario: w,
|
|
1935
|
+
component: C,
|
|
1936
|
+
componentFixture: l,
|
|
1937
|
+
controls: a,
|
|
1417
1938
|
focusedNode: u,
|
|
1418
|
-
tabStopCount:
|
|
1939
|
+
tabStopCount: S.length
|
|
1419
1940
|
}
|
|
1420
1941
|
),
|
|
1421
|
-
|
|
1422
|
-
!
|
|
1942
|
+
a.keyboardMode && /* @__PURE__ */ o(st, { stops: S }),
|
|
1943
|
+
!a.chrome && /* @__PURE__ */ o(
|
|
1423
1944
|
"button",
|
|
1424
1945
|
{
|
|
1425
1946
|
type: "button",
|
|
1426
1947
|
className: "ds-chrome ds-restore",
|
|
1427
|
-
onClick: () =>
|
|
1948
|
+
onClick: () => c({ chrome: !0 }),
|
|
1428
1949
|
children: n.shell.restoreChrome
|
|
1429
1950
|
}
|
|
1430
1951
|
)
|
|
@@ -1432,75 +1953,77 @@ function st({ product: e }) {
|
|
|
1432
1953
|
}
|
|
1433
1954
|
) });
|
|
1434
1955
|
}
|
|
1435
|
-
function
|
|
1956
|
+
function z(e) {
|
|
1436
1957
|
return new Date(e.length === 10 ? `${e}T00:00:00` : e);
|
|
1437
1958
|
}
|
|
1438
|
-
function
|
|
1439
|
-
const n =
|
|
1440
|
-
let
|
|
1441
|
-
const
|
|
1442
|
-
return (
|
|
1959
|
+
function yt(e, t) {
|
|
1960
|
+
const n = z(e), r = z(t);
|
|
1961
|
+
let i = r.getFullYear() - n.getFullYear();
|
|
1962
|
+
const a = r.getMonth() - n.getMonth();
|
|
1963
|
+
return (a < 0 || a === 0 && r.getDate() < n.getDate()) && (i -= 1), i;
|
|
1443
1964
|
}
|
|
1444
|
-
function
|
|
1445
|
-
const n =
|
|
1446
|
-
return Math.floor((
|
|
1965
|
+
function xt(e, t) {
|
|
1966
|
+
const n = z(e), r = z(t);
|
|
1967
|
+
return Math.floor((r.getTime() - n.getTime()) / 864e5);
|
|
1447
1968
|
}
|
|
1448
1969
|
export {
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1970
|
+
_t as CONTRAST_THRESHOLDS,
|
|
1971
|
+
E as DEFAULT_LABELS,
|
|
1972
|
+
Nt as DesignSpace,
|
|
1973
|
+
bt as EN_US_LABELS,
|
|
1974
|
+
ct as Home,
|
|
1975
|
+
kt as KEYBOARD_LABELS,
|
|
1976
|
+
wt as NETWORK_LABELS,
|
|
1977
|
+
oe as NETWORK_STATES,
|
|
1978
|
+
v as PARAM,
|
|
1979
|
+
de as SCENARIO_STATUSES,
|
|
1980
|
+
Me as SLOW_NETWORK_DELAY_MS,
|
|
1981
|
+
gt as STATUS_LABELS,
|
|
1982
|
+
vt as STATUS_MEANING,
|
|
1983
|
+
_e as SimulatedNetworkError,
|
|
1984
|
+
rt as Stage,
|
|
1985
|
+
it as StageEmpty,
|
|
1986
|
+
fe as TEXT_SCALES,
|
|
1987
|
+
st as TabOrderOverlay,
|
|
1988
|
+
ne as VIEWPORTS,
|
|
1989
|
+
yt as ageInYears,
|
|
1990
|
+
Ct as applyOverrides,
|
|
1991
|
+
Tt as assertContrastPairs,
|
|
1992
|
+
Pt as checkContrastPair,
|
|
1993
|
+
he as checkContrastPairs,
|
|
1994
|
+
At as commitUrl,
|
|
1995
|
+
Lt as componentUrl,
|
|
1996
|
+
Ee as computeRole,
|
|
1997
|
+
Et as contrastRatio,
|
|
1998
|
+
ft as createHttpAdapter,
|
|
1999
|
+
me as createRegistry,
|
|
2000
|
+
xt as daysBetween,
|
|
2001
|
+
Le as describeElement,
|
|
2002
|
+
J as fixtureAdapter,
|
|
2003
|
+
Ft as flatten,
|
|
2004
|
+
$t as formatIssues,
|
|
2005
|
+
pe as getDeployContext,
|
|
2006
|
+
Dt as hasErrors,
|
|
2007
|
+
ye as matchPath,
|
|
2008
|
+
Rt as parseColor,
|
|
2009
|
+
be as parseControls,
|
|
2010
|
+
z as parseIsoDate,
|
|
2011
|
+
Ot as readCssVariable,
|
|
2012
|
+
It as relativeLuminance,
|
|
2013
|
+
Y as resolveFixture,
|
|
2014
|
+
je as resolveLabels,
|
|
2015
|
+
xe as resolveRoute,
|
|
2016
|
+
ve as resolveViewport,
|
|
2017
|
+
ue as scenarioUrl,
|
|
2018
|
+
G as serializeControls,
|
|
2019
|
+
Bt as serializeValue,
|
|
2020
|
+
Ie as shortSelector,
|
|
2021
|
+
Be as tabbableElements,
|
|
2022
|
+
ge as useDesignSpaceState,
|
|
2023
|
+
We as useKeyboardMode,
|
|
2024
|
+
A as useLabels,
|
|
2025
|
+
Te as useScenarioData,
|
|
2026
|
+
le as validateProduct,
|
|
2027
|
+
Wt as validateScenario
|
|
1505
2028
|
};
|
|
1506
2029
|
//# sourceMappingURL=index.js.map
|