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