@brucesantos/design-space 0.1.1 → 0.2.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 +93 -7
- package/README.md +55 -18
- package/dist/contrast-BXd_acxo.js +260 -0
- package/dist/contrast-BXd_acxo.js.map +1 -0
- package/dist/deploy/index.d.ts +16 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +864 -762
- package/dist/index.js.map +1 -1
- package/dist/registry/index.d.ts +1 -1
- package/dist/registry/validate.d.ts +1 -1
- package/dist/router/index.d.ts +2 -2
- package/dist/shell/labels.d.ts +135 -0
- package/dist/testing.js +2 -2
- package/dist/types/index.d.ts +36 -21
- package/dist/util/date.d.ts +3 -4
- package/package.json +2 -2
- package/dist/contrast-DsgJg12D.js +0 -265
- package/dist/contrast-DsgJg12D.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { v as
|
|
4
|
-
import { C as
|
|
5
|
-
function
|
|
6
|
-
const t = new Map(e.scenarios.map((
|
|
7
|
-
e.modules.flatMap((
|
|
8
|
-
),
|
|
9
|
-
module:
|
|
10
|
-
scenarios: e.scenarios.filter((h) => h.id.split(".")[0] ===
|
|
11
|
-
})),
|
|
1
|
+
import { jsxs as c, jsx as a, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import { useState as x, useEffect as E, useMemo as y, useCallback as C, useContext as ae, createContext as ne, forwardRef as re, useRef as se } from "react";
|
|
3
|
+
import { v as oe, P as f, N as Y, s as ie, c as de, g as ce } from "./contrast-BXd_acxo.js";
|
|
4
|
+
import { C as lt, S as ut, a as ht, b as mt, d as pt, e as bt, f as ft, h as vt, i as gt, j as wt, p as Nt, r as kt, k as _t, l as yt, m as St } from "./contrast-BXd_acxo.js";
|
|
5
|
+
function le(e) {
|
|
6
|
+
const t = new Map(e.scenarios.map((u) => [u.id, u])), n = new Map(e.personas.map((u) => [u.id, u])), s = new Map(e.fixtures.map((u) => [u.id, u])), r = new Map((e.rules ?? []).map((u) => [u.id, u])), o = new Map(e.modules.map((u) => [u.id, u])), d = new Map(
|
|
7
|
+
e.modules.flatMap((u) => (u.flows ?? []).map((h) => [h.id, h]))
|
|
8
|
+
), l = e.modules.map((u) => ({
|
|
9
|
+
module: u,
|
|
10
|
+
scenarios: e.scenarios.filter((h) => h.id.split(".")[0] === u.id)
|
|
11
|
+
})), m = new Set(l.flatMap((u) => u.scenarios.map((h) => h.id))), i = e.scenarios.filter((u) => !m.has(u.id)), p = (u) => u ? t.get(u) : void 0, g = (u) => u ? n.get(u) : void 0, v = (u) => u ? u.permissions ? u.permissions : g(u.persona)?.permissions ?? [] : [];
|
|
12
12
|
return {
|
|
13
13
|
product: e,
|
|
14
|
-
tree:
|
|
15
|
-
orphans:
|
|
16
|
-
issues:
|
|
17
|
-
scenario:
|
|
18
|
-
persona:
|
|
19
|
-
fixture: (
|
|
20
|
-
rule: (
|
|
21
|
-
module: (
|
|
22
|
-
flow: (
|
|
23
|
-
rulesOf: (
|
|
24
|
-
permissionsOf:
|
|
25
|
-
scenariosForRoute: (
|
|
26
|
-
const h =
|
|
14
|
+
tree: l,
|
|
15
|
+
orphans: i,
|
|
16
|
+
issues: oe(e),
|
|
17
|
+
scenario: p,
|
|
18
|
+
persona: g,
|
|
19
|
+
fixture: (u) => u ? s.get(u) : void 0,
|
|
20
|
+
rule: (u) => u ? r.get(u) : void 0,
|
|
21
|
+
module: (u) => u ? o.get(u) : void 0,
|
|
22
|
+
flow: (u) => u ? d.get(u) : void 0,
|
|
23
|
+
rulesOf: (u) => (u?.rules ?? []).map((h) => r.get(h)).filter((h) => !!h),
|
|
24
|
+
permissionsOf: v,
|
|
25
|
+
scenariosForRoute: (u) => {
|
|
26
|
+
const h = u.split("?")[0];
|
|
27
27
|
return e.scenarios.filter((b) => b.route.split("?")[0] === h);
|
|
28
28
|
},
|
|
29
|
-
search: (
|
|
30
|
-
const h =
|
|
29
|
+
search: (u) => {
|
|
30
|
+
const h = z(u);
|
|
31
31
|
return h ? e.scenarios.filter((b) => {
|
|
32
|
-
const
|
|
33
|
-
return
|
|
32
|
+
const w = o.get(b.id.split(".")[0] ?? "")?.name ?? "";
|
|
33
|
+
return z(
|
|
34
34
|
[
|
|
35
35
|
b.title,
|
|
36
36
|
b.id,
|
|
37
37
|
b.intent ?? "",
|
|
38
38
|
b.route,
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
w,
|
|
40
|
+
n.get(b.persona)?.name ?? "",
|
|
41
41
|
(b.tags ?? []).join(" "),
|
|
42
42
|
(b.expected ?? []).join(" ")
|
|
43
43
|
].join(" ")
|
|
44
44
|
).includes(h);
|
|
45
45
|
}) : e.scenarios;
|
|
46
46
|
},
|
|
47
|
-
byStatus: (
|
|
47
|
+
byStatus: (u) => e.scenarios.filter((h) => h.status === u),
|
|
48
48
|
coverage: () => {
|
|
49
|
-
const
|
|
49
|
+
const u = {
|
|
50
50
|
proposed: 0,
|
|
51
51
|
"in-review": 0,
|
|
52
52
|
approved: 0,
|
|
@@ -54,137 +54,137 @@ function oe(e) {
|
|
|
54
54
|
implemented: 0,
|
|
55
55
|
superseded: 0
|
|
56
56
|
};
|
|
57
|
-
for (const h of e.scenarios)
|
|
58
|
-
return
|
|
57
|
+
for (const h of e.scenarios) u[h.status] += 1;
|
|
58
|
+
return u;
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function z(e) {
|
|
63
63
|
return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim();
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const G = [
|
|
66
66
|
{ id: "fit", label: "Ajustar" },
|
|
67
67
|
{ id: "mobile", label: "Celular", width: 390, height: 844 },
|
|
68
68
|
{ id: "tablet", label: "Tablet", width: 834, height: 1112 },
|
|
69
69
|
{ id: "desktop", label: "Desktop", width: 1440, height: 900 },
|
|
70
70
|
{ id: "custom", label: "Personalizado" }
|
|
71
|
-
],
|
|
72
|
-
function
|
|
73
|
-
const
|
|
71
|
+
], Q = [1, 1.25, 1.5, 2];
|
|
72
|
+
function ue(e, t) {
|
|
73
|
+
const n = new URLSearchParams(e), s = n.get(f.scenario) ?? void 0, r = t.scenario(s), o = n.get(f.network), d = Number(n.get(f.textScale));
|
|
74
74
|
return {
|
|
75
|
-
scenario:
|
|
76
|
-
persona:
|
|
77
|
-
fixture:
|
|
78
|
-
network:
|
|
79
|
-
viewport:
|
|
80
|
-
customWidth:
|
|
81
|
-
themeMode:
|
|
82
|
-
locale:
|
|
83
|
-
dataSource:
|
|
75
|
+
scenario: r?.id,
|
|
76
|
+
persona: n.get(f.persona) ?? r?.persona,
|
|
77
|
+
fixture: n.get(f.fixture) ?? r?.fixture,
|
|
78
|
+
network: pe(o) ? o : r?.network ?? "success",
|
|
79
|
+
viewport: n.get(f.viewport) ?? "fit",
|
|
80
|
+
customWidth: be(n.get(f.customWidth)),
|
|
81
|
+
themeMode: n.get(f.themeMode) ?? t.product.theme?.modes?.[0],
|
|
82
|
+
locale: n.get(f.locale) ?? t.product.theme?.locales?.[0],
|
|
83
|
+
dataSource: n.get(f.dataSource) ?? t.product.dataSources?.default ?? "fixtures",
|
|
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(f.chrome) !== "0",
|
|
87
|
+
keyboardMode: n.get(f.keyboardMode) === "1",
|
|
88
|
+
reducedMotion: n.get(f.reducedMotion) === "1",
|
|
89
|
+
textScale: Q.includes(d) ? d : 1,
|
|
90
|
+
inspector: n.get(f.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 U(e, t) {
|
|
94
|
+
const n = new URLSearchParams(), s = t.scenario(e.scenario);
|
|
95
|
+
e.scenario && n.set(f.scenario, e.scenario), e.persona && e.persona !== s?.persona && n.set(f.persona, e.persona), e.fixture && e.fixture !== s?.fixture && n.set(f.fixture, e.fixture), e.network !== (s?.network ?? "success") && n.set(f.network, e.network), e.viewport !== "fit" && n.set(f.viewport, e.viewport), e.viewport === "custom" && e.customWidth && n.set(f.customWidth, String(e.customWidth));
|
|
96
|
+
const r = t.product.theme?.modes?.[0];
|
|
97
|
+
e.themeMode && e.themeMode !== r && n.set(f.themeMode, e.themeMode);
|
|
98
|
+
const o = t.product.theme?.locales?.[0];
|
|
99
|
+
e.locale && e.locale !== o && n.set(f.locale, e.locale);
|
|
100
|
+
const d = t.product.dataSources?.default ?? "fixtures";
|
|
101
|
+
e.dataSource && e.dataSource !== d && n.set(f.dataSource, e.dataSource), e.chrome || n.set(f.chrome, "0"), e.keyboardMode && n.set(f.keyboardMode, "1"), e.reducedMotion && n.set(f.reducedMotion, "1"), e.textScale !== 1 && n.set(f.textScale, String(e.textScale)), e.inspector || n.set(f.inspector, "0");
|
|
102
|
+
const l = n.toString();
|
|
103
|
+
return l ? `?${l}` : "";
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
const [t,
|
|
105
|
+
function he(e) {
|
|
106
|
+
const [t, n] = x(() => K());
|
|
107
107
|
E(() => {
|
|
108
|
-
const
|
|
109
|
-
return window.addEventListener("popstate",
|
|
108
|
+
const i = () => n(K());
|
|
109
|
+
return window.addEventListener("popstate", i), () => window.removeEventListener("popstate", i);
|
|
110
110
|
}, []);
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
}, []),
|
|
115
|
-
(
|
|
116
|
-
const
|
|
117
|
-
|
|
111
|
+
const s = y(() => ue(t.search, e), [t.search, e]), r = C((i, p, g = !1) => {
|
|
112
|
+
const v = `${i}${p}`;
|
|
113
|
+
g ? window.history.replaceState(null, "", v) : window.history.pushState(null, "", v), n({ path: i, search: p });
|
|
114
|
+
}, []), o = C(
|
|
115
|
+
(i) => {
|
|
116
|
+
const p = { ...s, ...i };
|
|
117
|
+
r(t.path, U(p, e), !0);
|
|
118
118
|
},
|
|
119
|
-
[
|
|
120
|
-
),
|
|
121
|
-
(
|
|
122
|
-
const [
|
|
123
|
-
|
|
119
|
+
[s, t.path, r, e]
|
|
120
|
+
), d = C(
|
|
121
|
+
(i, p) => {
|
|
122
|
+
const [g, v] = i.split("?"), u = g || "/", h = v ? `?${v}` : t.search;
|
|
123
|
+
r(u, h, p?.replace ?? !1);
|
|
124
124
|
},
|
|
125
|
-
[t.search,
|
|
126
|
-
),
|
|
127
|
-
(
|
|
128
|
-
const
|
|
129
|
-
if (!
|
|
130
|
-
const
|
|
131
|
-
...
|
|
132
|
-
scenario:
|
|
133
|
-
persona:
|
|
134
|
-
fixture:
|
|
135
|
-
network:
|
|
125
|
+
[t.search, r]
|
|
126
|
+
), l = C(
|
|
127
|
+
(i) => {
|
|
128
|
+
const p = e.scenario(i);
|
|
129
|
+
if (!p) return;
|
|
130
|
+
const g = {
|
|
131
|
+
...s,
|
|
132
|
+
scenario: p.id,
|
|
133
|
+
persona: p.persona,
|
|
134
|
+
fixture: p.fixture,
|
|
135
|
+
network: p.network ?? "success"
|
|
136
136
|
};
|
|
137
|
-
|
|
137
|
+
r(p.route, U(g, e), !1);
|
|
138
138
|
},
|
|
139
|
-
[
|
|
140
|
-
),
|
|
141
|
-
return { location: t, controls:
|
|
139
|
+
[s, r, e]
|
|
140
|
+
), m = y(() => me(s), [s]);
|
|
141
|
+
return { location: t, controls: s, viewport: m, setControls: o, navigate: d, openScenario: l };
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
const t =
|
|
143
|
+
function me(e) {
|
|
144
|
+
const t = G.find((n) => n.id === e.viewport);
|
|
145
145
|
return e.viewport === "custom" ? { id: "custom", label: "Personalizado", width: e.customWidth ?? 1024 } : t ?? { id: "fit", label: "Ajustar" };
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function K() {
|
|
148
148
|
return typeof window > "u" ? { path: "/", search: "" } : { path: window.location.pathname, search: window.location.search };
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
return e !== null &&
|
|
150
|
+
function pe(e) {
|
|
151
|
+
return e !== null && Y.includes(e);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function be(e) {
|
|
154
154
|
if (!e) return;
|
|
155
155
|
const t = Number.parseInt(e, 10);
|
|
156
156
|
return Number.isFinite(t) && t > 0 ? t : void 0;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
const
|
|
160
|
-
for (const [
|
|
161
|
-
if (
|
|
162
|
-
return
|
|
163
|
-
const
|
|
164
|
-
if (
|
|
165
|
-
if (
|
|
166
|
-
|
|
158
|
+
function fe(e, t) {
|
|
159
|
+
const n = e.split("/").filter(Boolean), s = ge(t).split("/").filter(Boolean), r = {};
|
|
160
|
+
for (const [o, d] of n.entries()) {
|
|
161
|
+
if (d === "*")
|
|
162
|
+
return r["*"] = s.slice(o).join("/"), r;
|
|
163
|
+
const l = s[o];
|
|
164
|
+
if (l === void 0) return null;
|
|
165
|
+
if (d.startsWith(":")) {
|
|
166
|
+
r[d.slice(1)] = l;
|
|
167
167
|
continue;
|
|
168
168
|
}
|
|
169
|
-
if (
|
|
169
|
+
if (d !== l) return null;
|
|
170
170
|
}
|
|
171
|
-
return
|
|
171
|
+
return n.length !== s.length ? null : r;
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
const
|
|
175
|
-
for (const
|
|
176
|
-
const
|
|
177
|
-
if (
|
|
173
|
+
function ve(e, t) {
|
|
174
|
+
const n = [...e].sort((s, r) => V(r.path) - V(s.path));
|
|
175
|
+
for (const s of n) {
|
|
176
|
+
const r = fe(s.path, t);
|
|
177
|
+
if (r) return { definition: s, params: r };
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function V(e) {
|
|
181
181
|
const t = e.split("/").filter(Boolean);
|
|
182
|
-
let
|
|
183
|
-
for (const
|
|
184
|
-
|
|
185
|
-
return
|
|
182
|
+
let n = t.length;
|
|
183
|
+
for (const s of t)
|
|
184
|
+
s === "*" ? n -= 2 : s.startsWith(":") ? n += 1 : n += 4;
|
|
185
|
+
return n;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function ge(e) {
|
|
188
188
|
const t = e.split("?")[0] ?? e;
|
|
189
189
|
try {
|
|
190
190
|
return decodeURI(t);
|
|
@@ -192,84 +192,84 @@ function pe(e) {
|
|
|
192
192
|
return t;
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
const
|
|
196
|
-
class
|
|
195
|
+
const we = 2500;
|
|
196
|
+
class Ne extends Error {
|
|
197
197
|
constructor(t) {
|
|
198
198
|
super(`Falha de rede simulada no cenário "${t}".`), this.name = "SimulatedNetworkError";
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function P(e) {
|
|
202
202
|
if (e)
|
|
203
203
|
return typeof e.data == "function" ? e.data() : e.data;
|
|
204
204
|
}
|
|
205
205
|
const O = {
|
|
206
206
|
id: "fixtures",
|
|
207
207
|
label: "Fixtures",
|
|
208
|
-
load: async ({ scenario: e, fixture: t, network:
|
|
209
|
-
switch (
|
|
208
|
+
load: async ({ scenario: e, fixture: t, network: n }) => {
|
|
209
|
+
switch (n) {
|
|
210
210
|
case "empty":
|
|
211
211
|
return null;
|
|
212
212
|
case "error":
|
|
213
|
-
throw new
|
|
213
|
+
throw new Ne(e.id);
|
|
214
214
|
case "loading":
|
|
215
215
|
return new Promise(() => {
|
|
216
216
|
});
|
|
217
217
|
case "slow":
|
|
218
|
-
return await
|
|
218
|
+
return await ke(we), P(t);
|
|
219
219
|
default:
|
|
220
|
-
return
|
|
220
|
+
return P(t);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
|
-
function
|
|
225
|
-
const { id: t, label:
|
|
224
|
+
function et(e) {
|
|
225
|
+
const { id: t, label: n, baseUrl: s, path: r, init: o, fallbackToFixture: d = !0 } = e;
|
|
226
226
|
return {
|
|
227
227
|
id: t,
|
|
228
|
-
label:
|
|
229
|
-
load: async (
|
|
230
|
-
const
|
|
228
|
+
label: n,
|
|
229
|
+
load: async (l) => {
|
|
230
|
+
const m = new URL(r ? r(l) : l.scenario.route, s);
|
|
231
231
|
try {
|
|
232
|
-
const
|
|
233
|
-
if (!
|
|
234
|
-
return await
|
|
235
|
-
} catch (
|
|
236
|
-
if (
|
|
237
|
-
throw new Error(`Adapter "${t}" falhou em ${
|
|
232
|
+
const i = await fetch(m, o);
|
|
233
|
+
if (!i.ok) throw new Error(`${i.status} ${i.statusText}`);
|
|
234
|
+
return await i.json();
|
|
235
|
+
} catch (i) {
|
|
236
|
+
if (d) return P(l.fixture);
|
|
237
|
+
throw new Error(`Adapter "${t}" falhou em ${m.toString()}`, { cause: i });
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function ke(e) {
|
|
243
243
|
return new Promise((t) => setTimeout(t, e));
|
|
244
244
|
}
|
|
245
|
-
function
|
|
246
|
-
const { scenario: t, fixture:
|
|
245
|
+
function _e(e) {
|
|
246
|
+
const { scenario: t, fixture: n, network: s, adapter: r } = e, [o, d] = x({
|
|
247
247
|
data: void 0,
|
|
248
248
|
isLoading: !!t,
|
|
249
249
|
error: void 0
|
|
250
250
|
});
|
|
251
251
|
return E(() => {
|
|
252
252
|
if (!t) {
|
|
253
|
-
|
|
253
|
+
d({ data: void 0, isLoading: !1, error: void 0 });
|
|
254
254
|
return;
|
|
255
255
|
}
|
|
256
|
-
let
|
|
257
|
-
|
|
258
|
-
const
|
|
259
|
-
return Promise.resolve(
|
|
260
|
-
|
|
261
|
-
}).catch((
|
|
262
|
-
|
|
256
|
+
let l = !0;
|
|
257
|
+
d({ data: void 0, isLoading: !0, error: void 0 });
|
|
258
|
+
const m = r ?? O;
|
|
259
|
+
return Promise.resolve(m.load({ scenario: t, fixture: n, network: s })).then((i) => {
|
|
260
|
+
l && d({ data: i, isLoading: !1, error: void 0 });
|
|
261
|
+
}).catch((i) => {
|
|
262
|
+
l && d({
|
|
263
263
|
data: void 0,
|
|
264
264
|
isLoading: !1,
|
|
265
|
-
error:
|
|
265
|
+
error: i instanceof Error ? i : new Error(String(i))
|
|
266
266
|
});
|
|
267
267
|
}), () => {
|
|
268
|
-
|
|
268
|
+
l = !1;
|
|
269
269
|
};
|
|
270
|
-
}, [t,
|
|
270
|
+
}, [t, n, s, r]), o;
|
|
271
271
|
}
|
|
272
|
-
const
|
|
272
|
+
const ye = {
|
|
273
273
|
a: "link",
|
|
274
274
|
article: "article",
|
|
275
275
|
aside: "complementary",
|
|
@@ -303,7 +303,7 @@ const Ne = {
|
|
|
303
303
|
th: "columnheader",
|
|
304
304
|
tr: "row",
|
|
305
305
|
ul: "list"
|
|
306
|
-
},
|
|
306
|
+
}, Se = {
|
|
307
307
|
button: "button",
|
|
308
308
|
checkbox: "checkbox",
|
|
309
309
|
email: "textbox",
|
|
@@ -318,65 +318,65 @@ const Ne = {
|
|
|
318
318
|
text: "textbox",
|
|
319
319
|
url: "textbox"
|
|
320
320
|
};
|
|
321
|
-
function
|
|
321
|
+
function xe(e) {
|
|
322
322
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
323
|
-
const { name: t, nameFrom:
|
|
323
|
+
const { name: t, nameFrom: n } = Ce(e);
|
|
324
324
|
return {
|
|
325
|
-
role:
|
|
325
|
+
role: Me(e),
|
|
326
326
|
name: t,
|
|
327
|
-
nameFrom:
|
|
328
|
-
description:
|
|
329
|
-
states:
|
|
330
|
-
selector:
|
|
327
|
+
nameFrom: n,
|
|
328
|
+
description: Te(e),
|
|
329
|
+
states: Ae(e),
|
|
330
|
+
selector: $e(e),
|
|
331
331
|
hiddenFromTabOrder: e.tabIndex < 0,
|
|
332
|
-
hiddenFromAssistiveTech:
|
|
332
|
+
hiddenFromAssistiveTech: Ee(e)
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function Me(e) {
|
|
336
336
|
const t = e.getAttribute("role");
|
|
337
337
|
if (t) return t.split(/\s+/)[0] ?? t;
|
|
338
|
-
const
|
|
339
|
-
if (
|
|
340
|
-
const
|
|
341
|
-
return
|
|
338
|
+
const n = e.tagName.toLowerCase();
|
|
339
|
+
if (n === "input") {
|
|
340
|
+
const s = e.type.toLowerCase();
|
|
341
|
+
return Se[s] ?? "textbox";
|
|
342
342
|
}
|
|
343
|
-
return
|
|
343
|
+
return n === "a" && !e.hasAttribute("href") ? "generic" : ye[n] ?? "generic";
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function Ce(e) {
|
|
346
346
|
const t = e.getAttribute("aria-labelledby");
|
|
347
347
|
if (t) {
|
|
348
|
-
const
|
|
349
|
-
if (
|
|
348
|
+
const d = t.split(/\s+/).map((l) => e.ownerDocument.getElementById(l)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
|
|
349
|
+
if (d) return { name: d, nameFrom: "aria-labelledby" };
|
|
350
350
|
}
|
|
351
|
-
const
|
|
352
|
-
if (
|
|
351
|
+
const n = e.getAttribute("aria-label")?.trim();
|
|
352
|
+
if (n) return { name: n, nameFrom: "aria-label" };
|
|
353
353
|
if (e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement) {
|
|
354
|
-
const
|
|
355
|
-
if (
|
|
354
|
+
const d = Array.from(e.labels ?? []).map((l) => l.textContent?.trim() ?? "").filter(Boolean);
|
|
355
|
+
if (d.length) return { name: d.join(" "), nameFrom: "label" };
|
|
356
356
|
}
|
|
357
357
|
if (e instanceof HTMLImageElement) {
|
|
358
|
-
const
|
|
359
|
-
if (
|
|
358
|
+
const d = e.getAttribute("alt");
|
|
359
|
+
if (d !== null) return { name: d, nameFrom: "alt" };
|
|
360
360
|
}
|
|
361
|
-
const
|
|
362
|
-
return
|
|
361
|
+
const s = e.getAttribute("title")?.trim(), r = Le(e);
|
|
362
|
+
return r ? { name: r, 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
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function Te(e) {
|
|
365
365
|
const t = e.getAttribute("aria-describedby");
|
|
366
366
|
if (t) {
|
|
367
|
-
const
|
|
368
|
-
if (
|
|
367
|
+
const n = t.split(/\s+/).map((s) => e.ownerDocument.getElementById(s)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
|
|
368
|
+
if (n) return n;
|
|
369
369
|
}
|
|
370
370
|
return e.getAttribute("aria-description")?.trim() || void 0;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
const t = [],
|
|
374
|
-
const
|
|
375
|
-
|
|
372
|
+
function Ae(e) {
|
|
373
|
+
const t = [], n = (s, r = s.replace("aria-", "")) => {
|
|
374
|
+
const o = e.getAttribute(s);
|
|
375
|
+
o !== null && o !== "false" && t.push(o === "true" || o === "" ? r : `${r}=${o}`);
|
|
376
376
|
};
|
|
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"),
|
|
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"), 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
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function Ee(e) {
|
|
380
380
|
let t = e;
|
|
381
381
|
for (; t; ) {
|
|
382
382
|
if (t.getAttribute("aria-hidden") === "true" || t.hasAttribute("hidden")) return !0;
|
|
@@ -384,21 +384,21 @@ function Me(e) {
|
|
|
384
384
|
}
|
|
385
385
|
return !1;
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function Le(e) {
|
|
388
388
|
const t = e.cloneNode(!0);
|
|
389
|
-
for (const
|
|
390
|
-
|
|
389
|
+
for (const n of t.querySelectorAll("[aria-hidden='true'],[hidden]"))
|
|
390
|
+
n.remove();
|
|
391
391
|
return (t.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 160);
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function $e(e) {
|
|
394
394
|
const t = e.tagName.toLowerCase();
|
|
395
395
|
if (e.id) return `${t}#${e.id}`;
|
|
396
|
-
const
|
|
397
|
-
if (
|
|
398
|
-
const
|
|
399
|
-
return
|
|
396
|
+
const n = e.getAttribute("data-testid");
|
|
397
|
+
if (n) return `${t}[data-testid="${n}"]`;
|
|
398
|
+
const s = Array.from(e.classList).slice(0, 2);
|
|
399
|
+
return s.length ? `${t}.${s.join(".")}` : t;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function Fe(e = document) {
|
|
402
402
|
const t = [
|
|
403
403
|
"a[href]",
|
|
404
404
|
"button",
|
|
@@ -409,215 +409,345 @@ function Te(e = document) {
|
|
|
409
409
|
"[tabindex]",
|
|
410
410
|
"[contenteditable='true']"
|
|
411
411
|
].join(",");
|
|
412
|
-
return Array.from(e.querySelectorAll(t)).filter((
|
|
413
|
-
if (
|
|
414
|
-
const
|
|
415
|
-
return
|
|
412
|
+
return Array.from(e.querySelectorAll(t)).filter((n) => {
|
|
413
|
+
if (n.tabIndex < 0 || n.disabled || n.getAttribute("aria-hidden") === "true") return !1;
|
|
414
|
+
const s = window.getComputedStyle(n);
|
|
415
|
+
return s.display === "none" || s.visibility === "hidden" ? !1 : n.offsetWidth > 0 || n.offsetHeight > 0 || n === document.activeElement;
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
|
-
function
|
|
419
|
-
const [
|
|
420
|
-
const
|
|
421
|
-
if (!
|
|
422
|
-
|
|
418
|
+
function Pe(e, t) {
|
|
419
|
+
const [n, s] = x(), [r, o] = x([]), d = C(() => {
|
|
420
|
+
const l = t.current;
|
|
421
|
+
if (!l) {
|
|
422
|
+
o([]);
|
|
423
423
|
return;
|
|
424
424
|
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
index:
|
|
428
|
-
element:
|
|
429
|
-
rect:
|
|
430
|
-
forcedOrder:
|
|
425
|
+
o(
|
|
426
|
+
Fe(l).map((m, i) => ({
|
|
427
|
+
index: i + 1,
|
|
428
|
+
element: m,
|
|
429
|
+
rect: m.getBoundingClientRect(),
|
|
430
|
+
forcedOrder: m.tabIndex > 0
|
|
431
431
|
}))
|
|
432
432
|
);
|
|
433
433
|
}, [t]);
|
|
434
434
|
return E(() => {
|
|
435
435
|
if (!e) {
|
|
436
|
-
|
|
436
|
+
s(void 0), o([]);
|
|
437
437
|
return;
|
|
438
438
|
}
|
|
439
|
-
const
|
|
440
|
-
document.addEventListener("focusin",
|
|
441
|
-
const
|
|
442
|
-
return
|
|
443
|
-
document.removeEventListener("focusin",
|
|
439
|
+
const l = () => s(xe(document.activeElement));
|
|
440
|
+
document.addEventListener("focusin", l), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0), l(), d();
|
|
441
|
+
const m = t.current, i = m ? new MutationObserver(() => d()) : void 0;
|
|
442
|
+
return i?.observe(m, { childList: !0, subtree: !0, attributes: !0 }), () => {
|
|
443
|
+
document.removeEventListener("focusin", l), window.removeEventListener("resize", d), window.removeEventListener("scroll", d, !0), i?.disconnect();
|
|
444
444
|
};
|
|
445
|
-
}, [e,
|
|
445
|
+
}, [e, d, t]), { focused: n, tabStops: r, refresh: d };
|
|
446
446
|
}
|
|
447
447
|
const S = {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
448
|
+
status: {
|
|
449
|
+
proposed: "Proposta",
|
|
450
|
+
"in-review": "Em revisão",
|
|
451
|
+
approved: "Aprovado",
|
|
452
|
+
"in-implementation": "Em implementação",
|
|
453
|
+
implemented: "Implementado",
|
|
454
|
+
superseded: "Superado"
|
|
455
|
+
},
|
|
456
|
+
statusMeaning: {
|
|
457
|
+
proposed: "Exploração ainda não aprovada.",
|
|
458
|
+
"in-review": "Aberto para validação de design, negócio ou cliente.",
|
|
459
|
+
approved: "Referência autorizada, registrada por URL de commit.",
|
|
460
|
+
"in-implementation": "Ligado a um trabalho ativo de engenharia.",
|
|
461
|
+
implemented: "Disponível no produto real e validado.",
|
|
462
|
+
superseded: "Mantido para histórico ou substituído por outra decisão."
|
|
463
|
+
},
|
|
464
|
+
network: {
|
|
465
|
+
success: "Sucesso",
|
|
466
|
+
loading: "Carregando",
|
|
467
|
+
empty: "Vazio",
|
|
468
|
+
error: "Erro",
|
|
469
|
+
slow: "Lento"
|
|
470
|
+
},
|
|
471
|
+
keyboard: {
|
|
472
|
+
full: "Jornada completável só por teclado",
|
|
473
|
+
partial: "Parcialmente operável por teclado",
|
|
474
|
+
"not-applicable": "Não se aplica"
|
|
475
|
+
},
|
|
476
|
+
viewport: {
|
|
477
|
+
fit: "Ajustar",
|
|
478
|
+
mobile: "Celular",
|
|
479
|
+
tablet: "Tablet",
|
|
480
|
+
desktop: "Desktop",
|
|
481
|
+
custom: "Personalizado"
|
|
482
|
+
},
|
|
483
|
+
topbar: {
|
|
484
|
+
toggleNav: "Mostrar ou ocultar a navegação",
|
|
485
|
+
copyLink: "Copiar link",
|
|
486
|
+
copied: "Link copiado",
|
|
487
|
+
copyPrompt: "Copie o link do cenário:",
|
|
488
|
+
cleanReview: "Revisão limpa",
|
|
489
|
+
cleanReviewTitle: "Ocultar o chrome do Design Space para revisão limpa e captura de tela",
|
|
490
|
+
panel: "Painel",
|
|
491
|
+
branchTitle: (e) => `Branch: ${e}`,
|
|
492
|
+
commitTitle: (e) => `Commit: ${e}`,
|
|
493
|
+
envTitle: (e) => `Ambiente: ${e}`
|
|
494
|
+
},
|
|
495
|
+
sidebar: {
|
|
496
|
+
region: "Cenários do produto",
|
|
497
|
+
searchPlaceholder: "Buscar situação…",
|
|
498
|
+
searchLabel: "Buscar cenário pelo vocabulário do produto",
|
|
499
|
+
noMatch: (e) => `Nenhuma situação para "${e}".`,
|
|
500
|
+
matchCount: (e) => `${e} ${e === 1 ? "situação" : "situações"}.`,
|
|
501
|
+
emptyModule: "Nenhum cenário ainda.",
|
|
502
|
+
withoutModule: "Sem módulo"
|
|
503
|
+
},
|
|
504
|
+
controls: {
|
|
505
|
+
region: "Controles do cenário",
|
|
506
|
+
persona: "Persona",
|
|
507
|
+
fixture: "Dados",
|
|
508
|
+
network: "Rede",
|
|
509
|
+
viewport: "Viewport",
|
|
510
|
+
customWidth: "Largura personalizada em pixels",
|
|
511
|
+
theme: "Tema",
|
|
512
|
+
locale: "Idioma",
|
|
513
|
+
dataSource: "Fonte",
|
|
514
|
+
fixturesOption: "Fixtures",
|
|
515
|
+
a11y: "Acessibilidade",
|
|
516
|
+
keyboardMode: "Teclado",
|
|
517
|
+
keyboardModeTitle: "Percorrer a jornada só por teclado, com foco visível e ordem de tabulação evidenciada",
|
|
518
|
+
reducedMotion: "Movimento",
|
|
519
|
+
reducedMotionTitle: "Reduzir movimento dentro do palco",
|
|
520
|
+
textScale: "Ampliação de texto",
|
|
521
|
+
none: "—"
|
|
522
|
+
},
|
|
523
|
+
inspector: {
|
|
524
|
+
region: "Painel de contexto",
|
|
525
|
+
tabScenario: "Cenário",
|
|
526
|
+
tabA11y: "Acessibilidade",
|
|
527
|
+
tabDiagnostics: "Diagnóstico",
|
|
528
|
+
diagnosticsWithErrors: (e) => `Diagnóstico (${e})`,
|
|
529
|
+
noScenario: "Nenhum cenário ativo. Escolha uma situação na navegação para ver contexto, regras e critérios.",
|
|
530
|
+
situation: "Situação",
|
|
531
|
+
reproduction: "Reprodução",
|
|
532
|
+
id: "Id",
|
|
533
|
+
route: "Rota",
|
|
534
|
+
persona: "Persona",
|
|
535
|
+
personaSwapped: "trocada",
|
|
536
|
+
data: "Dados",
|
|
537
|
+
network: "Rede",
|
|
538
|
+
goal: (e) => `Objetivo: ${e}`,
|
|
539
|
+
permissions: "Permissões efetivas",
|
|
540
|
+
preconditions: "Pré-condições",
|
|
541
|
+
rules: "Regras",
|
|
542
|
+
actions: "Ações disponíveis",
|
|
543
|
+
expected: "Critérios de aceite",
|
|
544
|
+
approval: "Aprovação",
|
|
545
|
+
openApproved: "Abrir a versão aprovada",
|
|
546
|
+
engineering: "Engenharia",
|
|
547
|
+
a11yContract: "Contrato do cenário",
|
|
548
|
+
keyboard: "Teclado",
|
|
549
|
+
contrast: "Contraste",
|
|
550
|
+
contrastTarget: (e) => `WCAG 2.2 ${e}`,
|
|
551
|
+
announces: "Precisa ser anunciado:",
|
|
552
|
+
focusedElement: "Elemento em foco",
|
|
553
|
+
keyboardModeOff: "Ligue o modo teclado na barra de controles para inspecionar a árvore acessível.",
|
|
554
|
+
pressTab: (e) => `Pressione Tab dentro do palco. ${e} paradas de tabulação foram encontradas.`,
|
|
555
|
+
role: "Papel",
|
|
556
|
+
name: "Nome",
|
|
557
|
+
noAccessibleName: "sem nome acessível",
|
|
558
|
+
nameFrom: "Nome vem de",
|
|
559
|
+
description: "Descrição",
|
|
560
|
+
selector: "Seletor",
|
|
561
|
+
focusableButHidden: "Este elemento é focável mas está escondido de tecnologia assistiva. Um leitor de tela recebe foco sem receber conteúdo.",
|
|
562
|
+
tabStopsInStage: (e) => `${e} paradas de tabulação no palco.`,
|
|
563
|
+
tokenContrast: "Contraste dos tokens",
|
|
564
|
+
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.",
|
|
565
|
+
pair: "Par",
|
|
566
|
+
ratio: "Razão",
|
|
567
|
+
pairsFailing: (e) => `${e} ${e === 1 ? "par" : "pares"} fora do alvo. O teste de tokens do produto falha o build por isso.`,
|
|
568
|
+
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.",
|
|
569
|
+
coverage: "Cobertura por status",
|
|
570
|
+
scenariosRegistered: (e) => `${e} cenários registrados.`,
|
|
571
|
+
scenarioContract: "Contrato de cenário",
|
|
572
|
+
noIssues: "Nenhum problema encontrado."
|
|
573
|
+
},
|
|
574
|
+
home: {
|
|
575
|
+
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"}.`,
|
|
576
|
+
withoutModule: "Sem módulo",
|
|
577
|
+
withoutModuleHint: "O prefixo do id não corresponde a nenhum módulo registrado, então estas situações não aparecem na navegação por módulo.",
|
|
578
|
+
emptyModule: "Nenhuma situação registrada neste módulo ainda.",
|
|
579
|
+
keyboardBadge: "teclado"
|
|
580
|
+
},
|
|
581
|
+
shell: {
|
|
582
|
+
restoreChrome: "Mostrar controles",
|
|
583
|
+
noRoute: "Nenhuma rota para este endereço",
|
|
584
|
+
noRouteHint: "não casa com nenhuma rota declarada. Escolha uma situação na navegação."
|
|
585
|
+
}
|
|
471
586
|
};
|
|
472
|
-
function Oe(
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
587
|
+
function Oe(e) {
|
|
588
|
+
if (!e) return S;
|
|
589
|
+
const t = { ...S };
|
|
590
|
+
for (const n of Object.keys(S)) {
|
|
591
|
+
const s = e[n];
|
|
592
|
+
s && (t[n] = { ...S[n], ...s });
|
|
593
|
+
}
|
|
594
|
+
return t;
|
|
595
|
+
}
|
|
596
|
+
const J = ne(S);
|
|
597
|
+
function N() {
|
|
598
|
+
return ae(J);
|
|
599
|
+
}
|
|
600
|
+
const tt = S.status, at = S.statusMeaning, nt = S.network, rt = S.keyboard;
|
|
601
|
+
function Re({ registry: e, activeScenario: t, onOpenScenario: n }) {
|
|
602
|
+
const s = N(), [r, o] = x(""), [d, l] = x(/* @__PURE__ */ new Set()), m = y(() => {
|
|
603
|
+
if (r.trim())
|
|
604
|
+
return new Set(e.search(r).map((h) => h.id));
|
|
605
|
+
}, [r, e]), i = (h) => l((b) => {
|
|
606
|
+
const w = new Set(b);
|
|
607
|
+
return w.has(h) ? w.delete(h) : w.add(h), w;
|
|
608
|
+
}), p = (h) => m ? h.filter((b) => m.has(b.id)) : h, g = e.tree.map((h) => ({ ...h, scenarios: p(h.scenarios) })).filter((h) => m ? h.scenarios.length > 0 : !0), v = p(e.orphans), u = g.reduce((h, b) => h + b.scenarios.length, 0) + v.length;
|
|
609
|
+
return /* @__PURE__ */ c("nav", { className: "ds-chrome ds-sidebar", "aria-label": s.sidebar.region, children: [
|
|
481
610
|
/* @__PURE__ */ a("div", { className: "ds-sidebar__search", children: /* @__PURE__ */ a(
|
|
482
611
|
"input",
|
|
483
612
|
{
|
|
484
613
|
className: "ds-input ds-input--search",
|
|
485
614
|
type: "search",
|
|
486
|
-
value:
|
|
487
|
-
placeholder:
|
|
488
|
-
"aria-label":
|
|
489
|
-
onChange: (
|
|
615
|
+
value: r,
|
|
616
|
+
placeholder: s.sidebar.searchPlaceholder,
|
|
617
|
+
"aria-label": s.sidebar.searchLabel,
|
|
618
|
+
onChange: (h) => o(h.target.value)
|
|
490
619
|
}
|
|
491
620
|
) }),
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
const
|
|
496
|
-
return /* @__PURE__ */
|
|
497
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ c("div", { className: "ds-sidebar__tree", children: [
|
|
622
|
+
r.trim() !== "" && /* @__PURE__ */ a("p", { className: "ds-sidebar__empty", role: "status", children: u === 0 ? s.sidebar.noMatch(r) : s.sidebar.matchCount(u) }),
|
|
623
|
+
g.map((h) => {
|
|
624
|
+
const b = !d.has(h.module.id) || !!m;
|
|
625
|
+
return /* @__PURE__ */ c("section", { className: "ds-module", children: [
|
|
626
|
+
/* @__PURE__ */ c(
|
|
498
627
|
"button",
|
|
499
628
|
{
|
|
500
629
|
type: "button",
|
|
501
630
|
className: "ds-module__header",
|
|
502
|
-
"aria-expanded":
|
|
503
|
-
onClick: () =>
|
|
631
|
+
"aria-expanded": b,
|
|
632
|
+
onClick: () => i(h.module.id),
|
|
504
633
|
children: [
|
|
505
634
|
/* @__PURE__ */ a("span", { className: "ds-module__chevron", "aria-hidden": "true", children: "▶" }),
|
|
506
|
-
/* @__PURE__ */ a("span", { children:
|
|
507
|
-
/* @__PURE__ */ a("span", { className: "ds-module__count", children:
|
|
635
|
+
/* @__PURE__ */ a("span", { children: h.module.name }),
|
|
636
|
+
/* @__PURE__ */ a("span", { className: "ds-module__count", children: h.scenarios.length })
|
|
508
637
|
]
|
|
509
638
|
}
|
|
510
639
|
),
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
640
|
+
b && /* @__PURE__ */ c("ul", { className: "ds-module__scenarios", children: [
|
|
641
|
+
h.scenarios.map((w) => /* @__PURE__ */ a(
|
|
642
|
+
q,
|
|
514
643
|
{
|
|
515
|
-
scenario:
|
|
516
|
-
isActive:
|
|
517
|
-
onOpen:
|
|
644
|
+
scenario: w,
|
|
645
|
+
isActive: w.id === t,
|
|
646
|
+
onOpen: n
|
|
518
647
|
},
|
|
519
|
-
|
|
648
|
+
w.id
|
|
520
649
|
)),
|
|
521
|
-
|
|
650
|
+
h.scenarios.length === 0 && /* @__PURE__ */ a("li", { className: "ds-sidebar__empty", children: s.sidebar.emptyModule })
|
|
522
651
|
] })
|
|
523
|
-
] },
|
|
652
|
+
] }, h.module.id);
|
|
524
653
|
}),
|
|
525
|
-
v.length > 0 && /* @__PURE__ */
|
|
526
|
-
/* @__PURE__ */
|
|
654
|
+
v.length > 0 && /* @__PURE__ */ c("section", { className: "ds-module", children: [
|
|
655
|
+
/* @__PURE__ */ c("div", { className: "ds-module__header", "aria-hidden": "true", children: [
|
|
527
656
|
/* @__PURE__ */ a("span", { className: "ds-module__chevron", children: "▶" }),
|
|
528
|
-
/* @__PURE__ */ a("span", { children:
|
|
657
|
+
/* @__PURE__ */ a("span", { children: s.sidebar.withoutModule }),
|
|
529
658
|
/* @__PURE__ */ a("span", { className: "ds-module__count", children: v.length })
|
|
530
659
|
] }),
|
|
531
|
-
/* @__PURE__ */ a("ul", { className: "ds-module__scenarios", children: v.map((
|
|
532
|
-
|
|
660
|
+
/* @__PURE__ */ a("ul", { className: "ds-module__scenarios", children: v.map((h) => /* @__PURE__ */ a(
|
|
661
|
+
q,
|
|
533
662
|
{
|
|
534
|
-
scenario:
|
|
535
|
-
isActive:
|
|
536
|
-
onOpen:
|
|
663
|
+
scenario: h,
|
|
664
|
+
isActive: h.id === t,
|
|
665
|
+
onOpen: n
|
|
537
666
|
},
|
|
538
|
-
|
|
667
|
+
h.id
|
|
539
668
|
)) })
|
|
540
669
|
] })
|
|
541
670
|
] })
|
|
542
671
|
] });
|
|
543
672
|
}
|
|
544
|
-
function
|
|
673
|
+
function q({
|
|
545
674
|
scenario: e,
|
|
546
675
|
isActive: t,
|
|
547
|
-
onOpen:
|
|
676
|
+
onOpen: n
|
|
548
677
|
}) {
|
|
549
|
-
|
|
678
|
+
const s = N().status[e.status];
|
|
679
|
+
return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ c(
|
|
550
680
|
"button",
|
|
551
681
|
{
|
|
552
682
|
type: "button",
|
|
553
683
|
className: "ds-scenario",
|
|
554
684
|
"aria-current": t,
|
|
555
|
-
onClick: () =>
|
|
685
|
+
onClick: () => n(e.id),
|
|
556
686
|
children: [
|
|
557
687
|
/* @__PURE__ */ a(
|
|
558
688
|
"span",
|
|
559
689
|
{
|
|
560
690
|
className: "ds-status-dot",
|
|
561
691
|
"data-status": e.status,
|
|
562
|
-
title:
|
|
692
|
+
title: s
|
|
563
693
|
}
|
|
564
694
|
),
|
|
565
695
|
/* @__PURE__ */ a("span", { className: "ds-scenario__title", children: e.title }),
|
|
566
|
-
/* @__PURE__ */ a("span", { className: "ds-visually-hidden", children:
|
|
696
|
+
/* @__PURE__ */ a("span", { className: "ds-visually-hidden", children: s })
|
|
567
697
|
]
|
|
568
698
|
}
|
|
569
699
|
) });
|
|
570
700
|
}
|
|
571
|
-
function
|
|
701
|
+
function Ie({
|
|
572
702
|
product: e,
|
|
573
703
|
scenario: t,
|
|
574
|
-
deploy:
|
|
575
|
-
inspectorOpen:
|
|
576
|
-
sidebarOpen:
|
|
577
|
-
onToggleInspector:
|
|
578
|
-
onToggleSidebar:
|
|
579
|
-
onHideChrome:
|
|
704
|
+
deploy: n,
|
|
705
|
+
inspectorOpen: s,
|
|
706
|
+
sidebarOpen: r,
|
|
707
|
+
onToggleInspector: o,
|
|
708
|
+
onToggleSidebar: d,
|
|
709
|
+
onHideChrome: l
|
|
580
710
|
}) {
|
|
581
|
-
const [
|
|
582
|
-
const v = t ?
|
|
711
|
+
const m = N().topbar, [i, p] = x(!1), g = async () => {
|
|
712
|
+
const v = t ? ie(t, { origin: n.origin }) : `${n.origin}${window.location.pathname}${window.location.search}`;
|
|
583
713
|
try {
|
|
584
714
|
await navigator.clipboard.writeText(v);
|
|
585
715
|
} catch {
|
|
586
|
-
window.prompt(
|
|
716
|
+
window.prompt(m.copyPrompt, v);
|
|
587
717
|
}
|
|
588
|
-
|
|
718
|
+
p(!0), window.setTimeout(() => p(!1), 1600);
|
|
589
719
|
};
|
|
590
|
-
return /* @__PURE__ */
|
|
720
|
+
return /* @__PURE__ */ c("header", { className: "ds-chrome ds-topbar", children: [
|
|
591
721
|
/* @__PURE__ */ a(
|
|
592
722
|
"button",
|
|
593
723
|
{
|
|
594
724
|
type: "button",
|
|
595
725
|
className: "ds-btn ds-btn--ghost",
|
|
596
|
-
"aria-pressed":
|
|
597
|
-
onClick:
|
|
598
|
-
title:
|
|
726
|
+
"aria-pressed": r,
|
|
727
|
+
onClick: d,
|
|
728
|
+
title: m.toggleNav,
|
|
599
729
|
children: "☰"
|
|
600
730
|
}
|
|
601
731
|
),
|
|
602
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ c("div", { className: "ds-topbar__product", children: [
|
|
603
733
|
/* @__PURE__ */ a("span", { children: e.name }),
|
|
604
734
|
e.tagline && /* @__PURE__ */ a("span", { className: "ds-topbar__tagline", children: e.tagline })
|
|
605
735
|
] }),
|
|
606
736
|
/* @__PURE__ */ a("div", { className: "ds-topbar__spacer" }),
|
|
607
|
-
/* @__PURE__ */
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
/* @__PURE__ */ a("code", { title:
|
|
737
|
+
/* @__PURE__ */ c("div", { className: "ds-topbar__meta", children: [
|
|
738
|
+
n.branch && /* @__PURE__ */ a("code", { title: m.branchTitle(n.branch), children: n.branch.length > 28 ? `${n.branch.slice(0, 27)}…` : n.branch }),
|
|
739
|
+
n.commit && /* @__PURE__ */ a("code", { title: m.commitTitle(n.commit), children: n.shortCommit }),
|
|
740
|
+
/* @__PURE__ */ a("code", { title: m.envTitle(n.env), children: n.env })
|
|
611
741
|
] }),
|
|
612
|
-
/* @__PURE__ */ a("button", { type: "button", className: "ds-btn", onClick:
|
|
742
|
+
/* @__PURE__ */ a("button", { type: "button", className: "ds-btn", onClick: g, children: i ? m.copied : m.copyLink }),
|
|
613
743
|
/* @__PURE__ */ a(
|
|
614
744
|
"button",
|
|
615
745
|
{
|
|
616
746
|
type: "button",
|
|
617
747
|
className: "ds-btn",
|
|
618
|
-
onClick:
|
|
619
|
-
title:
|
|
620
|
-
children:
|
|
748
|
+
onClick: l,
|
|
749
|
+
title: m.cleanReviewTitle,
|
|
750
|
+
children: m.cleanReview
|
|
621
751
|
}
|
|
622
752
|
),
|
|
623
753
|
/* @__PURE__ */ a(
|
|
@@ -625,72 +755,72 @@ function $e({
|
|
|
625
755
|
{
|
|
626
756
|
type: "button",
|
|
627
757
|
className: "ds-btn",
|
|
628
|
-
"aria-pressed":
|
|
629
|
-
onClick:
|
|
630
|
-
children:
|
|
758
|
+
"aria-pressed": s,
|
|
759
|
+
onClick: o,
|
|
760
|
+
children: m.panel
|
|
631
761
|
}
|
|
632
762
|
)
|
|
633
763
|
] });
|
|
634
764
|
}
|
|
635
|
-
function
|
|
636
|
-
const { product:
|
|
637
|
-
return /* @__PURE__ */
|
|
638
|
-
/* @__PURE__ */
|
|
639
|
-
/* @__PURE__ */ a("label", { htmlFor: "ds-persona", children:
|
|
640
|
-
/* @__PURE__ */
|
|
765
|
+
function De({ registry: e, controls: t, onChange: n }) {
|
|
766
|
+
const s = N(), r = s.controls, { product: o } = e, d = o.dataSources?.adapters ?? [], l = o.theme?.modes ?? [], m = o.theme?.locales ?? [];
|
|
767
|
+
return /* @__PURE__ */ c("div", { className: "ds-chrome ds-controls", role: "group", "aria-label": r.region, children: [
|
|
768
|
+
/* @__PURE__ */ c("div", { className: "ds-field", children: [
|
|
769
|
+
/* @__PURE__ */ a("label", { htmlFor: "ds-persona", children: r.persona }),
|
|
770
|
+
/* @__PURE__ */ c(
|
|
641
771
|
"select",
|
|
642
772
|
{
|
|
643
773
|
id: "ds-persona",
|
|
644
774
|
className: "ds-select",
|
|
645
775
|
value: t.persona ?? "",
|
|
646
|
-
onChange: (
|
|
776
|
+
onChange: (i) => n({ persona: i.target.value || void 0 }),
|
|
647
777
|
children: [
|
|
648
|
-
/* @__PURE__ */ a("option", { value: "", children:
|
|
649
|
-
|
|
778
|
+
/* @__PURE__ */ a("option", { value: "", children: r.none }),
|
|
779
|
+
o.personas.map((i) => /* @__PURE__ */ a("option", { value: i.id, children: i.name }, i.id))
|
|
650
780
|
]
|
|
651
781
|
}
|
|
652
782
|
)
|
|
653
783
|
] }),
|
|
654
|
-
/* @__PURE__ */
|
|
655
|
-
/* @__PURE__ */ a("label", { htmlFor: "ds-fixture", children:
|
|
656
|
-
/* @__PURE__ */
|
|
784
|
+
/* @__PURE__ */ c("div", { className: "ds-field", children: [
|
|
785
|
+
/* @__PURE__ */ a("label", { htmlFor: "ds-fixture", children: r.fixture }),
|
|
786
|
+
/* @__PURE__ */ c(
|
|
657
787
|
"select",
|
|
658
788
|
{
|
|
659
789
|
id: "ds-fixture",
|
|
660
790
|
className: "ds-select",
|
|
661
791
|
value: t.fixture ?? "",
|
|
662
|
-
onChange: (
|
|
792
|
+
onChange: (i) => n({ fixture: i.target.value || void 0 }),
|
|
663
793
|
children: [
|
|
664
|
-
/* @__PURE__ */ a("option", { value: "", children:
|
|
665
|
-
|
|
794
|
+
/* @__PURE__ */ a("option", { value: "", children: r.none }),
|
|
795
|
+
o.fixtures.map((i) => /* @__PURE__ */ a("option", { value: i.id, children: i.label }, i.id))
|
|
666
796
|
]
|
|
667
797
|
}
|
|
668
798
|
)
|
|
669
799
|
] }),
|
|
670
|
-
/* @__PURE__ */
|
|
671
|
-
/* @__PURE__ */ a("span", { className: "ds-field__label", id: "ds-network-label", children:
|
|
672
|
-
/* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-network-label", children:
|
|
800
|
+
/* @__PURE__ */ c("div", { className: "ds-field", children: [
|
|
801
|
+
/* @__PURE__ */ a("span", { className: "ds-field__label", id: "ds-network-label", children: r.network }),
|
|
802
|
+
/* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-network-label", children: Y.map((i) => /* @__PURE__ */ a(
|
|
673
803
|
"button",
|
|
674
804
|
{
|
|
675
805
|
type: "button",
|
|
676
|
-
"aria-pressed": t.network ===
|
|
677
|
-
onClick: () =>
|
|
678
|
-
children:
|
|
806
|
+
"aria-pressed": t.network === i,
|
|
807
|
+
onClick: () => n({ network: i }),
|
|
808
|
+
children: s.network[i]
|
|
679
809
|
},
|
|
680
|
-
|
|
810
|
+
i
|
|
681
811
|
)) })
|
|
682
812
|
] }),
|
|
683
|
-
/* @__PURE__ */
|
|
684
|
-
/* @__PURE__ */ a("span", { className: "ds-field__label", id: "ds-viewport-label", children:
|
|
685
|
-
/* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-viewport-label", children:
|
|
813
|
+
/* @__PURE__ */ c("div", { className: "ds-field", children: [
|
|
814
|
+
/* @__PURE__ */ a("span", { className: "ds-field__label", id: "ds-viewport-label", children: r.viewport }),
|
|
815
|
+
/* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-viewport-label", children: G.map((i) => /* @__PURE__ */ a(
|
|
686
816
|
"button",
|
|
687
817
|
{
|
|
688
818
|
type: "button",
|
|
689
|
-
"aria-pressed": t.viewport ===
|
|
690
|
-
onClick: () =>
|
|
691
|
-
children:
|
|
819
|
+
"aria-pressed": t.viewport === i.id,
|
|
820
|
+
onClick: () => n({ viewport: i.id }),
|
|
821
|
+
children: s.viewport[i.id] ?? i.label
|
|
692
822
|
},
|
|
693
|
-
|
|
823
|
+
i.id
|
|
694
824
|
)) }),
|
|
695
825
|
t.viewport === "custom" && /* @__PURE__ */ a(
|
|
696
826
|
"input",
|
|
@@ -701,65 +831,65 @@ function Pe({ registry: e, controls: t, onChange: r }) {
|
|
|
701
831
|
max: 3840,
|
|
702
832
|
step: 10,
|
|
703
833
|
style: { width: 88 },
|
|
704
|
-
"aria-label":
|
|
834
|
+
"aria-label": r.customWidth,
|
|
705
835
|
value: t.customWidth ?? 1024,
|
|
706
|
-
onChange: (
|
|
836
|
+
onChange: (i) => n({ customWidth: Number(i.target.value) || void 0 })
|
|
707
837
|
}
|
|
708
838
|
)
|
|
709
839
|
] }),
|
|
710
|
-
l.length > 1 && /* @__PURE__ */
|
|
711
|
-
/* @__PURE__ */ a("label", { htmlFor: "ds-theme", children:
|
|
840
|
+
l.length > 1 && /* @__PURE__ */ c("div", { className: "ds-field", children: [
|
|
841
|
+
/* @__PURE__ */ a("label", { htmlFor: "ds-theme", children: r.theme }),
|
|
712
842
|
/* @__PURE__ */ a(
|
|
713
843
|
"select",
|
|
714
844
|
{
|
|
715
845
|
id: "ds-theme",
|
|
716
846
|
className: "ds-select",
|
|
717
847
|
value: t.themeMode ?? l[0],
|
|
718
|
-
onChange: (
|
|
719
|
-
children: l.map((
|
|
848
|
+
onChange: (i) => n({ themeMode: i.target.value }),
|
|
849
|
+
children: l.map((i) => /* @__PURE__ */ a("option", { value: i, children: i }, i))
|
|
720
850
|
}
|
|
721
851
|
)
|
|
722
852
|
] }),
|
|
723
|
-
|
|
724
|
-
/* @__PURE__ */ a("label", { htmlFor: "ds-locale", children:
|
|
853
|
+
m.length > 1 && /* @__PURE__ */ c("div", { className: "ds-field", children: [
|
|
854
|
+
/* @__PURE__ */ a("label", { htmlFor: "ds-locale", children: r.locale }),
|
|
725
855
|
/* @__PURE__ */ a(
|
|
726
856
|
"select",
|
|
727
857
|
{
|
|
728
858
|
id: "ds-locale",
|
|
729
859
|
className: "ds-select",
|
|
730
|
-
value: t.locale ??
|
|
731
|
-
onChange: (
|
|
732
|
-
children:
|
|
860
|
+
value: t.locale ?? m[0],
|
|
861
|
+
onChange: (i) => n({ locale: i.target.value }),
|
|
862
|
+
children: m.map((i) => /* @__PURE__ */ a("option", { value: i, children: i }, i))
|
|
733
863
|
}
|
|
734
864
|
)
|
|
735
865
|
] }),
|
|
736
|
-
|
|
737
|
-
/* @__PURE__ */ a("label", { htmlFor: "ds-source", children:
|
|
738
|
-
/* @__PURE__ */
|
|
866
|
+
d.length > 0 && /* @__PURE__ */ c("div", { className: "ds-field", children: [
|
|
867
|
+
/* @__PURE__ */ a("label", { htmlFor: "ds-source", children: r.dataSource }),
|
|
868
|
+
/* @__PURE__ */ c(
|
|
739
869
|
"select",
|
|
740
870
|
{
|
|
741
871
|
id: "ds-source",
|
|
742
872
|
className: "ds-select",
|
|
743
873
|
value: t.dataSource ?? "fixtures",
|
|
744
|
-
onChange: (
|
|
874
|
+
onChange: (i) => n({ dataSource: i.target.value }),
|
|
745
875
|
children: [
|
|
746
|
-
/* @__PURE__ */ a("option", { value: "fixtures", children:
|
|
747
|
-
|
|
876
|
+
/* @__PURE__ */ a("option", { value: "fixtures", children: r.fixturesOption }),
|
|
877
|
+
d.filter((i) => i.id !== "fixtures").map((i) => /* @__PURE__ */ a("option", { value: i.id, children: i.label }, i.id))
|
|
748
878
|
]
|
|
749
879
|
}
|
|
750
880
|
)
|
|
751
881
|
] }),
|
|
752
|
-
/* @__PURE__ */
|
|
753
|
-
/* @__PURE__ */ a("span", { className: "ds-field__label", children:
|
|
882
|
+
/* @__PURE__ */ c("div", { className: "ds-field", children: [
|
|
883
|
+
/* @__PURE__ */ a("span", { className: "ds-field__label", children: r.a11y }),
|
|
754
884
|
/* @__PURE__ */ a(
|
|
755
885
|
"button",
|
|
756
886
|
{
|
|
757
887
|
type: "button",
|
|
758
888
|
className: "ds-btn",
|
|
759
889
|
"aria-pressed": t.keyboardMode,
|
|
760
|
-
onClick: () =>
|
|
761
|
-
title:
|
|
762
|
-
children:
|
|
890
|
+
onClick: () => n({ keyboardMode: !t.keyboardMode }),
|
|
891
|
+
title: r.keyboardModeTitle,
|
|
892
|
+
children: r.keyboardMode
|
|
763
893
|
}
|
|
764
894
|
),
|
|
765
895
|
/* @__PURE__ */ a(
|
|
@@ -768,59 +898,59 @@ function Pe({ registry: e, controls: t, onChange: r }) {
|
|
|
768
898
|
type: "button",
|
|
769
899
|
className: "ds-btn",
|
|
770
900
|
"aria-pressed": t.reducedMotion,
|
|
771
|
-
onClick: () =>
|
|
772
|
-
title:
|
|
773
|
-
children:
|
|
901
|
+
onClick: () => n({ reducedMotion: !t.reducedMotion }),
|
|
902
|
+
title: r.reducedMotionTitle,
|
|
903
|
+
children: r.reducedMotion
|
|
774
904
|
}
|
|
775
905
|
),
|
|
776
|
-
/* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-label":
|
|
906
|
+
/* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-label": r.textScale, children: Q.map((i) => /* @__PURE__ */ a(
|
|
777
907
|
"button",
|
|
778
908
|
{
|
|
779
909
|
type: "button",
|
|
780
|
-
"aria-pressed": t.textScale ===
|
|
781
|
-
onClick: () =>
|
|
782
|
-
children:
|
|
910
|
+
"aria-pressed": t.textScale === i,
|
|
911
|
+
onClick: () => n({ textScale: i }),
|
|
912
|
+
children: i === 1 ? "100%" : `${i * 100}%`
|
|
783
913
|
},
|
|
784
|
-
|
|
914
|
+
i
|
|
785
915
|
)) })
|
|
786
916
|
] })
|
|
787
917
|
] });
|
|
788
918
|
}
|
|
789
|
-
function
|
|
919
|
+
function Be({
|
|
790
920
|
registry: e,
|
|
791
921
|
scenario: t,
|
|
792
|
-
controls:
|
|
793
|
-
focusedNode:
|
|
794
|
-
tabStopCount:
|
|
922
|
+
controls: n,
|
|
923
|
+
focusedNode: s,
|
|
924
|
+
tabStopCount: r
|
|
795
925
|
}) {
|
|
796
|
-
const [
|
|
797
|
-
return /* @__PURE__ */
|
|
798
|
-
/* @__PURE__ */
|
|
799
|
-
/* @__PURE__ */ a(
|
|
800
|
-
/* @__PURE__ */ a(
|
|
801
|
-
/* @__PURE__ */ a(
|
|
926
|
+
const o = N().inspector, [d, l] = x("scenario"), m = e.issues.filter((i) => i.level === "error").length;
|
|
927
|
+
return /* @__PURE__ */ c("aside", { className: "ds-chrome ds-inspector", "aria-label": o.region, children: [
|
|
928
|
+
/* @__PURE__ */ c("div", { className: "ds-inspector__tabs", role: "tablist", children: [
|
|
929
|
+
/* @__PURE__ */ a(F, { id: "scenario", current: d, onSelect: l, children: o.tabScenario }),
|
|
930
|
+
/* @__PURE__ */ a(F, { id: "a11y", current: d, onSelect: l, children: o.tabA11y }),
|
|
931
|
+
/* @__PURE__ */ a(F, { id: "diagnostics", current: d, onSelect: l, children: m > 0 ? o.diagnosticsWithErrors(m) : o.tabDiagnostics })
|
|
802
932
|
] }),
|
|
803
|
-
/* @__PURE__ */
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
933
|
+
/* @__PURE__ */ c("div", { className: "ds-inspector__body", role: "tabpanel", children: [
|
|
934
|
+
d === "scenario" && /* @__PURE__ */ a(We, { registry: e, scenario: t, controls: n }),
|
|
935
|
+
d === "a11y" && /* @__PURE__ */ a(
|
|
936
|
+
je,
|
|
807
937
|
{
|
|
808
938
|
registry: e,
|
|
809
939
|
scenario: t,
|
|
810
|
-
focusedNode:
|
|
811
|
-
keyboardMode:
|
|
812
|
-
tabStopCount:
|
|
940
|
+
focusedNode: s,
|
|
941
|
+
keyboardMode: n.keyboardMode,
|
|
942
|
+
tabStopCount: r
|
|
813
943
|
}
|
|
814
944
|
),
|
|
815
|
-
|
|
945
|
+
d === "diagnostics" && /* @__PURE__ */ a(He, { registry: e })
|
|
816
946
|
] })
|
|
817
947
|
] });
|
|
818
948
|
}
|
|
819
|
-
function
|
|
949
|
+
function F({
|
|
820
950
|
id: e,
|
|
821
951
|
current: t,
|
|
822
|
-
onSelect:
|
|
823
|
-
children:
|
|
952
|
+
onSelect: n,
|
|
953
|
+
children: s
|
|
824
954
|
}) {
|
|
825
955
|
return /* @__PURE__ */ a(
|
|
826
956
|
"button",
|
|
@@ -828,164 +958,148 @@ function L({
|
|
|
828
958
|
type: "button",
|
|
829
959
|
role: "tab",
|
|
830
960
|
"aria-selected": t === e,
|
|
831
|
-
onClick: () =>
|
|
832
|
-
children:
|
|
961
|
+
onClick: () => n(e),
|
|
962
|
+
children: s
|
|
833
963
|
}
|
|
834
964
|
);
|
|
835
965
|
}
|
|
836
|
-
function
|
|
966
|
+
function We({
|
|
837
967
|
registry: e,
|
|
838
968
|
scenario: t,
|
|
839
|
-
controls:
|
|
969
|
+
controls: n
|
|
840
970
|
}) {
|
|
971
|
+
const s = N(), r = s.inspector;
|
|
841
972
|
if (!t)
|
|
842
|
-
return /* @__PURE__ */ a("p", { className: "ds-block", children:
|
|
843
|
-
const
|
|
844
|
-
return /* @__PURE__ */
|
|
845
|
-
/* @__PURE__ */
|
|
846
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
973
|
+
return /* @__PURE__ */ a("p", { className: "ds-block", children: r.noScenario });
|
|
974
|
+
const o = e.persona(n.persona ?? t.persona), d = n.persona ? e.persona(n.persona)?.permissions ?? [] : e.permissionsOf(t), l = e.rulesOf(t), m = e.fixture(n.fixture ?? t.fixture), i = !!(n.persona && n.persona !== t.persona);
|
|
975
|
+
return /* @__PURE__ */ c(M, { children: [
|
|
976
|
+
/* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
977
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.situation }),
|
|
847
978
|
/* @__PURE__ */ a("p", { style: { color: "var(--ds-fg)", fontSize: 14, fontWeight: 600 }, children: t.title }),
|
|
848
979
|
t.intent && /* @__PURE__ */ a("p", { children: t.intent }),
|
|
849
|
-
/* @__PURE__ */
|
|
850
|
-
/* @__PURE__ */ a("span", { className: "ds-chip", "data-tone":
|
|
851
|
-
(t.tags ?? []).map((
|
|
980
|
+
/* @__PURE__ */ c("div", { className: "ds-chips", children: [
|
|
981
|
+
/* @__PURE__ */ a("span", { className: "ds-chip", "data-tone": ze(t.status), children: s.status[t.status] }),
|
|
982
|
+
(t.tags ?? []).map((p) => /* @__PURE__ */ a("span", { className: "ds-chip", children: p }, p))
|
|
852
983
|
] }),
|
|
853
|
-
/* @__PURE__ */ a("p", { style: { marginTop: 6 }, children:
|
|
984
|
+
/* @__PURE__ */ a("p", { style: { marginTop: 6 }, children: s.statusMeaning[t.status] })
|
|
854
985
|
] }),
|
|
855
|
-
/* @__PURE__ */
|
|
856
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
857
|
-
/* @__PURE__ */
|
|
858
|
-
/* @__PURE__ */ a("dt", { children:
|
|
986
|
+
/* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
987
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.reproduction }),
|
|
988
|
+
/* @__PURE__ */ c("dl", { className: "ds-kv", children: [
|
|
989
|
+
/* @__PURE__ */ a("dt", { children: r.id }),
|
|
859
990
|
/* @__PURE__ */ a("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.id }),
|
|
860
|
-
/* @__PURE__ */ a("dt", { children:
|
|
991
|
+
/* @__PURE__ */ a("dt", { children: r.route }),
|
|
861
992
|
/* @__PURE__ */ a("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.route }),
|
|
862
|
-
/* @__PURE__ */ a("dt", { children:
|
|
863
|
-
/* @__PURE__ */
|
|
864
|
-
|
|
865
|
-
|
|
993
|
+
/* @__PURE__ */ a("dt", { children: r.persona }),
|
|
994
|
+
/* @__PURE__ */ c("dd", { children: [
|
|
995
|
+
o?.name ?? "—",
|
|
996
|
+
i && /* @__PURE__ */ a("span", { className: "ds-chip", "data-tone": "warn", style: { marginLeft: 6 }, children: r.personaSwapped })
|
|
866
997
|
] }),
|
|
867
|
-
/* @__PURE__ */ a("dt", { children:
|
|
868
|
-
/* @__PURE__ */ a("dd", { children:
|
|
869
|
-
/* @__PURE__ */ a("dt", { children:
|
|
870
|
-
/* @__PURE__ */ a("dd", { children:
|
|
998
|
+
/* @__PURE__ */ a("dt", { children: r.data }),
|
|
999
|
+
/* @__PURE__ */ a("dd", { children: m?.label ?? "—" }),
|
|
1000
|
+
/* @__PURE__ */ a("dt", { children: r.network }),
|
|
1001
|
+
/* @__PURE__ */ a("dd", { children: s.network[n.network] })
|
|
871
1002
|
] }),
|
|
872
|
-
|
|
873
|
-
"Objetivo: ",
|
|
874
|
-
n.goal
|
|
875
|
-
] })
|
|
1003
|
+
o?.goal && /* @__PURE__ */ a("p", { style: { marginTop: 8 }, children: r.goal(o.goal) })
|
|
876
1004
|
] }),
|
|
877
|
-
|
|
878
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
879
|
-
/* @__PURE__ */ a("div", { className: "ds-chips", children:
|
|
1005
|
+
d.length > 0 && /* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
1006
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.permissions }),
|
|
1007
|
+
/* @__PURE__ */ a("div", { className: "ds-chips", children: d.map((p) => /* @__PURE__ */ a("span", { className: "ds-chip", children: p }, p)) })
|
|
880
1008
|
] }),
|
|
881
|
-
t.preconditions?.length ? /* @__PURE__ */
|
|
882
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
883
|
-
/* @__PURE__ */ a("ul", { className: "ds-list", children: t.preconditions.map((
|
|
1009
|
+
t.preconditions?.length ? /* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
1010
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.preconditions }),
|
|
1011
|
+
/* @__PURE__ */ a("ul", { className: "ds-list", children: t.preconditions.map((p) => /* @__PURE__ */ a("li", { children: p }, p)) })
|
|
884
1012
|
] }) : null,
|
|
885
|
-
l.length > 0 && /* @__PURE__ */
|
|
886
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
887
|
-
l.map((
|
|
888
|
-
/* @__PURE__ */ a("span", { className: "ds-rule__id", children:
|
|
889
|
-
/* @__PURE__ */ a("span", { className: "ds-rule__statement", children:
|
|
890
|
-
|
|
891
|
-
] },
|
|
1013
|
+
l.length > 0 && /* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
1014
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.rules }),
|
|
1015
|
+
l.map((p) => /* @__PURE__ */ c("div", { className: "ds-rule", children: [
|
|
1016
|
+
/* @__PURE__ */ a("span", { className: "ds-rule__id", children: p.id }),
|
|
1017
|
+
/* @__PURE__ */ a("span", { className: "ds-rule__statement", children: p.statement }),
|
|
1018
|
+
p.rationale && /* @__PURE__ */ a("p", { className: "ds-rule__rationale", children: p.rationale })
|
|
1019
|
+
] }, p.id))
|
|
892
1020
|
] }),
|
|
893
|
-
t.actions?.length ? /* @__PURE__ */
|
|
894
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
895
|
-
/* @__PURE__ */ a("ul", { className: "ds-list", children: t.actions.map((
|
|
1021
|
+
t.actions?.length ? /* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
1022
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.actions }),
|
|
1023
|
+
/* @__PURE__ */ a("ul", { className: "ds-list", children: t.actions.map((p) => /* @__PURE__ */ a("li", { children: p }, p)) })
|
|
896
1024
|
] }) : null,
|
|
897
|
-
t.expected?.length ? /* @__PURE__ */
|
|
898
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
899
|
-
/* @__PURE__ */ a("ul", { className: "ds-list", children: t.expected.map((
|
|
1025
|
+
t.expected?.length ? /* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
1026
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.expected }),
|
|
1027
|
+
/* @__PURE__ */ a("ul", { className: "ds-list", children: t.expected.map((p) => /* @__PURE__ */ a("li", { children: p }, p)) })
|
|
900
1028
|
] }) : null,
|
|
901
|
-
t.approvedAt && /* @__PURE__ */
|
|
902
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
903
|
-
/* @__PURE__ */
|
|
1029
|
+
t.approvedAt && /* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
1030
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.approval }),
|
|
1031
|
+
/* @__PURE__ */ c("p", { children: [
|
|
904
1032
|
t.approvedAt.date,
|
|
905
1033
|
" · ",
|
|
906
1034
|
/* @__PURE__ */ a("code", { children: t.approvedAt.commit.slice(0, 7) })
|
|
907
1035
|
] }),
|
|
908
|
-
/* @__PURE__ */ a("a", { href: t.approvedAt.url, target: "_blank", rel: "noreferrer", children:
|
|
1036
|
+
/* @__PURE__ */ a("a", { href: t.approvedAt.url, target: "_blank", rel: "noreferrer", children: r.openApproved })
|
|
909
1037
|
] }),
|
|
910
|
-
t.ticket && /* @__PURE__ */
|
|
911
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
1038
|
+
t.ticket && /* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
1039
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.engineering }),
|
|
912
1040
|
/* @__PURE__ */ a("p", { children: t.ticket })
|
|
913
1041
|
] })
|
|
914
1042
|
] });
|
|
915
1043
|
}
|
|
916
|
-
function
|
|
1044
|
+
function je({
|
|
917
1045
|
registry: e,
|
|
918
1046
|
scenario: t,
|
|
919
|
-
focusedNode:
|
|
920
|
-
keyboardMode:
|
|
921
|
-
tabStopCount:
|
|
1047
|
+
focusedNode: n,
|
|
1048
|
+
keyboardMode: s,
|
|
1049
|
+
tabStopCount: r
|
|
922
1050
|
}) {
|
|
923
|
-
const l =
|
|
924
|
-
return /* @__PURE__ */
|
|
925
|
-
t && /* @__PURE__ */
|
|
926
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
927
|
-
/* @__PURE__ */
|
|
928
|
-
/* @__PURE__ */ a("dt", { children:
|
|
929
|
-
/* @__PURE__ */ a("dd", { children:
|
|
930
|
-
/* @__PURE__ */ a("dt", { children:
|
|
931
|
-
/* @__PURE__ */
|
|
932
|
-
"WCAG 2.2 ",
|
|
933
|
-
t.a11y.contrast
|
|
934
|
-
] })
|
|
1051
|
+
const o = N(), d = o.inspector, l = de(e.product.theme?.contrastPairs), m = l.filter((i) => i.passes !== !0);
|
|
1052
|
+
return /* @__PURE__ */ c(M, { children: [
|
|
1053
|
+
t && /* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
1054
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: d.a11yContract }),
|
|
1055
|
+
/* @__PURE__ */ c("dl", { className: "ds-kv", children: [
|
|
1056
|
+
/* @__PURE__ */ a("dt", { children: d.keyboard }),
|
|
1057
|
+
/* @__PURE__ */ a("dd", { children: o.keyboard[t.a11y.keyboard] }),
|
|
1058
|
+
/* @__PURE__ */ a("dt", { children: d.contrast }),
|
|
1059
|
+
/* @__PURE__ */ a("dd", { children: d.contrastTarget(t.a11y.contrast) })
|
|
935
1060
|
] }),
|
|
936
|
-
t.a11y.announces?.length ? /* @__PURE__ */
|
|
937
|
-
/* @__PURE__ */ a("p", { style: { marginTop: 8 }, children:
|
|
938
|
-
/* @__PURE__ */ a("div", { className: "ds-chips", children: t.a11y.announces.map((
|
|
1061
|
+
t.a11y.announces?.length ? /* @__PURE__ */ c(M, { children: [
|
|
1062
|
+
/* @__PURE__ */ a("p", { style: { marginTop: 8 }, children: d.announces }),
|
|
1063
|
+
/* @__PURE__ */ a("div", { className: "ds-chips", children: t.a11y.announces.map((i) => /* @__PURE__ */ a("span", { className: "ds-chip", children: i }, i)) })
|
|
939
1064
|
] }) : null,
|
|
940
1065
|
t.a11y.notes && /* @__PURE__ */ a("p", { style: { marginTop: 8 }, children: t.a11y.notes })
|
|
941
1066
|
] }),
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
944
|
-
|
|
945
|
-
/* @__PURE__ */
|
|
946
|
-
/* @__PURE__ */ a("dt", { children:
|
|
947
|
-
/* @__PURE__ */ a("dd", { children:
|
|
948
|
-
/* @__PURE__ */ a("dt", { children:
|
|
949
|
-
/* @__PURE__ */ a("dd", { children:
|
|
950
|
-
/* @__PURE__ */ a("dt", { children:
|
|
951
|
-
/* @__PURE__ */ a("dd", { children:
|
|
952
|
-
|
|
953
|
-
/* @__PURE__ */ a("dt", { children:
|
|
954
|
-
/* @__PURE__ */ a("dd", { children:
|
|
1067
|
+
/* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
1068
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: d.focusedElement }),
|
|
1069
|
+
s ? n ? /* @__PURE__ */ c(M, { children: [
|
|
1070
|
+
/* @__PURE__ */ c("dl", { className: "ds-kv", children: [
|
|
1071
|
+
/* @__PURE__ */ a("dt", { children: d.role }),
|
|
1072
|
+
/* @__PURE__ */ a("dd", { children: n.role }),
|
|
1073
|
+
/* @__PURE__ */ a("dt", { children: d.name }),
|
|
1074
|
+
/* @__PURE__ */ a("dd", { children: n.name ? n.name : /* @__PURE__ */ a("span", { style: { color: "var(--ds-err)" }, children: d.noAccessibleName }) }),
|
|
1075
|
+
/* @__PURE__ */ a("dt", { children: d.nameFrom }),
|
|
1076
|
+
/* @__PURE__ */ a("dd", { children: n.nameFrom }),
|
|
1077
|
+
n.description ? /* @__PURE__ */ c(M, { children: [
|
|
1078
|
+
/* @__PURE__ */ a("dt", { children: d.description }),
|
|
1079
|
+
/* @__PURE__ */ a("dd", { children: n.description })
|
|
955
1080
|
] }) : null,
|
|
956
|
-
/* @__PURE__ */ a("dt", { children:
|
|
957
|
-
/* @__PURE__ */ a("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children:
|
|
1081
|
+
/* @__PURE__ */ a("dt", { children: d.selector }),
|
|
1082
|
+
/* @__PURE__ */ a("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: n.selector })
|
|
958
1083
|
] }),
|
|
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." })
|
|
1084
|
+
n.states.length > 0 && /* @__PURE__ */ a("div", { className: "ds-chips", style: { marginTop: 8 }, children: n.states.map((i) => /* @__PURE__ */ a("span", { className: "ds-chip", children: i }, i)) }),
|
|
1085
|
+
n.hiddenFromAssistiveTech && /* @__PURE__ */ a("p", { className: "ds-note", style: { marginTop: 8 }, children: d.focusableButHidden }),
|
|
1086
|
+
/* @__PURE__ */ a("p", { style: { marginTop: 8 }, children: d.tabStopsInStage(r) })
|
|
1087
|
+
] }) : /* @__PURE__ */ a("p", { children: d.pressTab(r) }) : /* @__PURE__ */ a("p", { children: d.keyboardModeOff })
|
|
970
1088
|
] }),
|
|
971
|
-
/* @__PURE__ */
|
|
972
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
973
|
-
l.length === 0 ? /* @__PURE__ */
|
|
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" })
|
|
1089
|
+
/* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
1090
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: d.tokenContrast }),
|
|
1091
|
+
l.length === 0 ? /* @__PURE__ */ a("p", { children: d.noContrastPairs }) : /* @__PURE__ */ c("table", { className: "ds-contrast", children: [
|
|
1092
|
+
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ c("tr", { children: [
|
|
1093
|
+
/* @__PURE__ */ a("th", { scope: "col", children: d.pair }),
|
|
1094
|
+
/* @__PURE__ */ a("th", { scope: "col", children: d.ratio })
|
|
981
1095
|
] }) }),
|
|
982
|
-
/* @__PURE__ */ a("tbody", { children: l.map((
|
|
983
|
-
/* @__PURE__ */
|
|
1096
|
+
/* @__PURE__ */ a("tbody", { children: l.map((i) => /* @__PURE__ */ c("tr", { children: [
|
|
1097
|
+
/* @__PURE__ */ c("td", { children: [
|
|
984
1098
|
/* @__PURE__ */ a(
|
|
985
1099
|
"span",
|
|
986
1100
|
{
|
|
987
1101
|
className: "ds-swatch",
|
|
988
|
-
style: { background:
|
|
1102
|
+
style: { background: i.pair.background },
|
|
989
1103
|
"aria-hidden": "true"
|
|
990
1104
|
}
|
|
991
1105
|
),
|
|
@@ -993,82 +1107,74 @@ function Ie({
|
|
|
993
1107
|
"span",
|
|
994
1108
|
{
|
|
995
1109
|
className: "ds-swatch",
|
|
996
|
-
style: { background:
|
|
1110
|
+
style: { background: i.pair.foreground },
|
|
997
1111
|
"aria-hidden": "true"
|
|
998
1112
|
}
|
|
999
1113
|
),
|
|
1000
|
-
|
|
1114
|
+
i.pair.name
|
|
1001
1115
|
] }),
|
|
1002
1116
|
/* @__PURE__ */ a(
|
|
1003
1117
|
"td",
|
|
1004
1118
|
{
|
|
1005
1119
|
style: {
|
|
1006
|
-
color:
|
|
1120
|
+
color: i.passes === !0 ? "var(--ds-ok)" : i.passes === !1 ? "var(--ds-err)" : "var(--ds-warn)"
|
|
1007
1121
|
},
|
|
1008
|
-
children:
|
|
1122
|
+
children: i.label
|
|
1009
1123
|
}
|
|
1010
1124
|
)
|
|
1011
|
-
] },
|
|
1125
|
+
] }, i.pair.name)) })
|
|
1012
1126
|
] }),
|
|
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
|
-
] })
|
|
1127
|
+
m.length > 0 && /* @__PURE__ */ a("p", { className: "ds-note", style: { marginTop: 8 }, children: d.pairsFailing(m.length) })
|
|
1019
1128
|
] }),
|
|
1020
|
-
/* @__PURE__ */ a("p", { className: "ds-note", children:
|
|
1129
|
+
/* @__PURE__ */ a("p", { className: "ds-note", children: d.automatedIsFloor })
|
|
1021
1130
|
] });
|
|
1022
1131
|
}
|
|
1023
|
-
function
|
|
1024
|
-
const t = e.coverage(), { issues: r } = e;
|
|
1025
|
-
return /* @__PURE__ */
|
|
1026
|
-
/* @__PURE__ */
|
|
1027
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
1028
|
-
/* @__PURE__ */ a("dl", { className: "ds-kv", children: Object.entries(
|
|
1029
|
-
/* @__PURE__ */ a("dt", { children:
|
|
1030
|
-
/* @__PURE__ */ a("dd", { style: { fontVariantNumeric: "tabular-nums" }, children:
|
|
1031
|
-
] },
|
|
1032
|
-
/* @__PURE__ */
|
|
1033
|
-
e.product.scenarios.length,
|
|
1034
|
-
" cenários registrados."
|
|
1035
|
-
] })
|
|
1132
|
+
function He({ registry: e }) {
|
|
1133
|
+
const t = N(), n = t.inspector, s = e.coverage(), { issues: r } = e;
|
|
1134
|
+
return /* @__PURE__ */ c(M, { children: [
|
|
1135
|
+
/* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
1136
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: n.coverage }),
|
|
1137
|
+
/* @__PURE__ */ a("dl", { className: "ds-kv", children: Object.entries(s).filter(([, o]) => o > 0).map(([o, d]) => /* @__PURE__ */ c("div", { style: { display: "contents" }, children: [
|
|
1138
|
+
/* @__PURE__ */ a("dt", { children: t.status[o] }),
|
|
1139
|
+
/* @__PURE__ */ a("dd", { style: { fontVariantNumeric: "tabular-nums" }, children: d })
|
|
1140
|
+
] }, o)) }),
|
|
1141
|
+
/* @__PURE__ */ a("p", { style: { marginTop: 8 }, children: n.scenariosRegistered(e.product.scenarios.length) })
|
|
1036
1142
|
] }),
|
|
1037
|
-
/* @__PURE__ */
|
|
1038
|
-
/* @__PURE__ */ a("h2", { className: "ds-block__title", children:
|
|
1039
|
-
r.length === 0 ? /* @__PURE__ */ a("p", { children:
|
|
1040
|
-
/* @__PURE__ */ a("span", { className: "ds-issue__where", children:
|
|
1041
|
-
|
|
1042
|
-
] }, `${
|
|
1143
|
+
/* @__PURE__ */ c("div", { className: "ds-block", children: [
|
|
1144
|
+
/* @__PURE__ */ a("h2", { className: "ds-block__title", children: n.scenarioContract }),
|
|
1145
|
+
r.length === 0 ? /* @__PURE__ */ a("p", { children: n.noIssues }) : r.map((o, d) => /* @__PURE__ */ c("div", { className: "ds-issue", "data-level": o.level, children: [
|
|
1146
|
+
/* @__PURE__ */ a("span", { className: "ds-issue__where", children: o.where }),
|
|
1147
|
+
o.message
|
|
1148
|
+
] }, `${o.where}-${d}`))
|
|
1043
1149
|
] })
|
|
1044
1150
|
] });
|
|
1045
1151
|
}
|
|
1046
|
-
function
|
|
1152
|
+
function ze(e) {
|
|
1047
1153
|
if (e === "approved" || e === "implemented") return "ok";
|
|
1048
1154
|
if (e === "in-review" || e === "proposed") return "warn";
|
|
1049
1155
|
}
|
|
1050
|
-
const
|
|
1156
|
+
const Ue = re(function({ viewport: t, textScale: n, reducedMotion: s, keyboardMode: r, children: o }, d) {
|
|
1051
1157
|
return /* @__PURE__ */ a("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ a(
|
|
1052
1158
|
"div",
|
|
1053
1159
|
{
|
|
1054
|
-
ref:
|
|
1160
|
+
ref: d,
|
|
1055
1161
|
className: "ds-stage",
|
|
1056
1162
|
"data-viewport": t.id,
|
|
1057
|
-
"data-keyboard-mode":
|
|
1058
|
-
"data-reduced-motion":
|
|
1163
|
+
"data-keyboard-mode": r,
|
|
1164
|
+
"data-reduced-motion": s,
|
|
1059
1165
|
style: {
|
|
1060
1166
|
width: t.width ? `${t.width}px` : "100%",
|
|
1061
1167
|
minHeight: t.height ? `${t.height}px` : void 0,
|
|
1062
1168
|
// A ampliação é aplicada no `font-size` do contêiner, não com
|
|
1063
1169
|
// `transform: scale`. É a diferença entre testar se o layout aguenta
|
|
1064
1170
|
// texto grande e só dar zoom na captura de tela.
|
|
1065
|
-
fontSize:
|
|
1171
|
+
fontSize: n === 1 ? void 0 : `${n * 100}%`
|
|
1066
1172
|
},
|
|
1067
|
-
children:
|
|
1173
|
+
children: o
|
|
1068
1174
|
}
|
|
1069
1175
|
) });
|
|
1070
1176
|
});
|
|
1071
|
-
function
|
|
1177
|
+
function Ke({ stops: e }) {
|
|
1072
1178
|
return e.length === 0 ? null : /* @__PURE__ */ a("div", { className: "ds-chrome ds-taborder", "aria-hidden": "true", children: e.map((t) => /* @__PURE__ */ a(
|
|
1073
1179
|
"span",
|
|
1074
1180
|
{
|
|
@@ -1080,46 +1186,40 @@ function We({ stops: e }) {
|
|
|
1080
1186
|
`${t.index}-${t.rect.top}-${t.rect.left}`
|
|
1081
1187
|
)) });
|
|
1082
1188
|
}
|
|
1083
|
-
function
|
|
1084
|
-
return /* @__PURE__ */
|
|
1189
|
+
function Ve({ title: e, children: t }) {
|
|
1190
|
+
return /* @__PURE__ */ c("div", { className: "ds-chrome ds-stage-empty", children: [
|
|
1085
1191
|
/* @__PURE__ */ a("h2", { children: e }),
|
|
1086
1192
|
t
|
|
1087
1193
|
] });
|
|
1088
1194
|
}
|
|
1089
|
-
function
|
|
1090
|
-
const { product:
|
|
1091
|
-
return /* @__PURE__ */
|
|
1092
|
-
/* @__PURE__ */
|
|
1093
|
-
/* @__PURE__ */ a("h1", { children:
|
|
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],
|
|
1195
|
+
function qe({ registry: e, onOpenScenario: t }) {
|
|
1196
|
+
const n = N(), { product: s } = e, r = e.coverage(), o = s.scenarios.length;
|
|
1197
|
+
return /* @__PURE__ */ c("div", { className: "ds-chrome ds-home", children: [
|
|
1198
|
+
/* @__PURE__ */ c("header", { className: "ds-home__header", children: [
|
|
1199
|
+
/* @__PURE__ */ a("h1", { children: s.name }),
|
|
1200
|
+
s.tagline && /* @__PURE__ */ a("p", { className: "ds-home__tagline", children: s.tagline }),
|
|
1201
|
+
/* @__PURE__ */ a("p", { className: "ds-home__lead", children: n.home.lead(o) }),
|
|
1202
|
+
/* @__PURE__ */ a("div", { className: "ds-chips", children: Object.entries(r).filter(([, d]) => d > 0).map(([d, l]) => /* @__PURE__ */ c("span", { className: "ds-chip", children: [
|
|
1203
|
+
n.status[d],
|
|
1104
1204
|
": ",
|
|
1105
|
-
|
|
1106
|
-
] },
|
|
1205
|
+
l
|
|
1206
|
+
] }, d)) })
|
|
1107
1207
|
] }),
|
|
1108
|
-
e.tree.map(({ module:
|
|
1109
|
-
|
|
1208
|
+
e.tree.map(({ module: d, scenarios: l }) => /* @__PURE__ */ a(
|
|
1209
|
+
Ye,
|
|
1110
1210
|
{
|
|
1111
|
-
module:
|
|
1112
|
-
scenarios:
|
|
1211
|
+
module: d,
|
|
1212
|
+
scenarios: l,
|
|
1113
1213
|
registry: e,
|
|
1114
1214
|
onOpenScenario: t
|
|
1115
1215
|
},
|
|
1116
|
-
|
|
1216
|
+
d.id
|
|
1117
1217
|
)),
|
|
1118
|
-
e.orphans.length > 0 && /* @__PURE__ */
|
|
1119
|
-
/* @__PURE__ */ a("h2", { children:
|
|
1120
|
-
/* @__PURE__ */ a("p", { className: "ds-home__hint", children:
|
|
1218
|
+
e.orphans.length > 0 && /* @__PURE__ */ c("section", { className: "ds-home__module", children: [
|
|
1219
|
+
/* @__PURE__ */ a("h2", { children: n.home.withoutModule }),
|
|
1220
|
+
/* @__PURE__ */ a("p", { className: "ds-home__hint", children: n.home.withoutModuleHint }),
|
|
1121
1221
|
/* @__PURE__ */ a(
|
|
1122
|
-
|
|
1222
|
+
X,
|
|
1123
1223
|
{
|
|
1124
1224
|
scenarios: e.orphans,
|
|
1125
1225
|
registry: e,
|
|
@@ -1129,276 +1229,278 @@ function Ue({ registry: e, onOpenScenario: t }) {
|
|
|
1129
1229
|
] })
|
|
1130
1230
|
] });
|
|
1131
1231
|
}
|
|
1132
|
-
function
|
|
1232
|
+
function Ye({
|
|
1133
1233
|
module: e,
|
|
1134
1234
|
scenarios: t,
|
|
1135
|
-
registry:
|
|
1136
|
-
onOpenScenario:
|
|
1235
|
+
registry: n,
|
|
1236
|
+
onOpenScenario: s
|
|
1137
1237
|
}) {
|
|
1138
|
-
return /* @__PURE__ */
|
|
1238
|
+
return /* @__PURE__ */ c("section", { className: "ds-home__module", children: [
|
|
1139
1239
|
/* @__PURE__ */ a("h2", { children: e.name }),
|
|
1140
1240
|
e.description && /* @__PURE__ */ a("p", { className: "ds-home__hint", children: e.description }),
|
|
1141
|
-
(e.flows ?? []).map((
|
|
1142
|
-
/* @__PURE__ */ a(
|
|
1241
|
+
(e.flows ?? []).map((r) => /* @__PURE__ */ a(Ge, { flow: r, registry: n, onOpenScenario: s }, r.id)),
|
|
1242
|
+
/* @__PURE__ */ a(X, { scenarios: t, registry: n, onOpenScenario: s })
|
|
1143
1243
|
] });
|
|
1144
1244
|
}
|
|
1145
|
-
function
|
|
1245
|
+
function Ge({
|
|
1146
1246
|
flow: e,
|
|
1147
1247
|
registry: t,
|
|
1148
|
-
onOpenScenario:
|
|
1248
|
+
onOpenScenario: n
|
|
1149
1249
|
}) {
|
|
1150
|
-
return /* @__PURE__ */
|
|
1250
|
+
return /* @__PURE__ */ c("div", { className: "ds-flow", children: [
|
|
1151
1251
|
/* @__PURE__ */ a("h3", { children: e.title }),
|
|
1152
1252
|
e.description && /* @__PURE__ */ a("p", { className: "ds-home__hint", children: e.description }),
|
|
1153
|
-
/* @__PURE__ */ a("ol", { className: "ds-flow__steps", children: e.steps.map((
|
|
1154
|
-
const
|
|
1155
|
-
return /* @__PURE__ */
|
|
1156
|
-
/* @__PURE__ */ a("button", { type: "button", className: "ds-flow__step", onClick: () =>
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
/* @__PURE__ */ a("span", { className: "ds-flow__branch-label", children:
|
|
1253
|
+
/* @__PURE__ */ a("ol", { className: "ds-flow__steps", children: e.steps.map((s, r) => {
|
|
1254
|
+
const o = t.scenario(s.scenario), d = Object.entries(s.branches ?? {});
|
|
1255
|
+
return /* @__PURE__ */ c("li", { children: [
|
|
1256
|
+
/* @__PURE__ */ a("button", { type: "button", className: "ds-flow__step", onClick: () => n(s.scenario), children: s.label ?? o?.title ?? s.scenario }),
|
|
1257
|
+
s.decision && /* @__PURE__ */ a("p", { className: "ds-flow__decision", children: s.decision }),
|
|
1258
|
+
d.length > 0 && /* @__PURE__ */ a("ul", { className: "ds-flow__branches", children: d.map(([l, m]) => /* @__PURE__ */ c("li", { children: [
|
|
1259
|
+
/* @__PURE__ */ a("span", { className: "ds-flow__branch-label", children: l }),
|
|
1160
1260
|
/* @__PURE__ */ a(
|
|
1161
1261
|
"button",
|
|
1162
1262
|
{
|
|
1163
1263
|
type: "button",
|
|
1164
1264
|
className: "ds-flow__step",
|
|
1165
|
-
onClick: () =>
|
|
1166
|
-
children: t.scenario(
|
|
1265
|
+
onClick: () => n(m),
|
|
1266
|
+
children: t.scenario(m)?.title ?? m
|
|
1167
1267
|
}
|
|
1168
1268
|
)
|
|
1169
|
-
] },
|
|
1170
|
-
] }, `${
|
|
1269
|
+
] }, l)) })
|
|
1270
|
+
] }, `${s.scenario}-${r}`);
|
|
1171
1271
|
}) })
|
|
1172
1272
|
] });
|
|
1173
1273
|
}
|
|
1174
|
-
function
|
|
1274
|
+
function X({
|
|
1175
1275
|
scenarios: e,
|
|
1176
1276
|
registry: t,
|
|
1177
|
-
onOpenScenario:
|
|
1277
|
+
onOpenScenario: n
|
|
1178
1278
|
}) {
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
/* @__PURE__ */ a("span", { className: "ds-
|
|
1279
|
+
const s = N();
|
|
1280
|
+
return e.length === 0 ? /* @__PURE__ */ a("p", { className: "ds-home__hint", children: s.home.emptyModule }) : /* @__PURE__ */ a("ul", { className: "ds-home__grid", children: e.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ c("button", { type: "button", className: "ds-home__card", onClick: () => n(r.id), children: [
|
|
1281
|
+
/* @__PURE__ */ c("span", { className: "ds-home__card-head", children: [
|
|
1282
|
+
/* @__PURE__ */ a("span", { className: "ds-status-dot", "data-status": r.status }),
|
|
1283
|
+
/* @__PURE__ */ a("span", { className: "ds-home__card-title", children: r.title })
|
|
1183
1284
|
] }),
|
|
1184
|
-
|
|
1185
|
-
/* @__PURE__ */
|
|
1186
|
-
t.persona(
|
|
1285
|
+
r.intent && /* @__PURE__ */ a("span", { className: "ds-home__card-intent", children: r.intent }),
|
|
1286
|
+
/* @__PURE__ */ c("span", { className: "ds-home__card-meta", children: [
|
|
1287
|
+
t.persona(r.persona)?.name ?? r.persona,
|
|
1187
1288
|
" · ",
|
|
1188
|
-
|
|
1189
|
-
|
|
1289
|
+
s.status[r.status],
|
|
1290
|
+
r.a11y.keyboard === "full" ? ` · ${s.home.keyboardBadge}` : ""
|
|
1190
1291
|
] })
|
|
1191
|
-
] }) },
|
|
1292
|
+
] }) }, r.id)) });
|
|
1192
1293
|
}
|
|
1193
|
-
function
|
|
1194
|
-
const t =
|
|
1195
|
-
const
|
|
1196
|
-
return
|
|
1197
|
-
}, [
|
|
1294
|
+
function st({ product: e }) {
|
|
1295
|
+
const t = y(() => le(e), [e]), n = y(() => Oe(e.theme?.labels), [e.theme?.labels]), s = y(() => ce(e.deploy), [e.deploy]), { location: r, controls: o, viewport: d, setControls: l, navigate: m, openScenario: i } = he(t), [p, g] = x(!0), v = se(null), { focused: u, tabStops: h } = Pe(o.keyboardMode, v), b = t.scenario(o.scenario), w = t.persona(o.persona ?? b?.persona), T = t.fixture(o.fixture ?? b?.fixture), Z = y(() => {
|
|
1296
|
+
const k = o.dataSource ?? "fixtures";
|
|
1297
|
+
return k === "fixtures" ? O : e.dataSources?.adapters?.find((_) => _.id === k) ?? O;
|
|
1298
|
+
}, [o.dataSource, e.dataSources?.adapters]), { data: R, isLoading: I, error: D } = _e({ scenario: b, fixture: T, network: o.network, adapter: Z });
|
|
1198
1299
|
E(() => {
|
|
1199
|
-
const
|
|
1200
|
-
if (!(!
|
|
1201
|
-
switch (
|
|
1300
|
+
const k = (_) => {
|
|
1301
|
+
if (!(!_.shiftKey || _.metaKey || _.ctrlKey || _.altKey || _.target?.matches("input, textarea, select, [contenteditable='true']"))) {
|
|
1302
|
+
switch (_.key) {
|
|
1202
1303
|
case "C":
|
|
1203
|
-
|
|
1304
|
+
l({ chrome: !o.chrome });
|
|
1204
1305
|
break;
|
|
1205
1306
|
case "K":
|
|
1206
|
-
|
|
1307
|
+
l({ keyboardMode: !o.keyboardMode });
|
|
1207
1308
|
break;
|
|
1208
1309
|
case "P":
|
|
1209
|
-
|
|
1310
|
+
l({ inspector: !o.inspector });
|
|
1210
1311
|
break;
|
|
1211
1312
|
default:
|
|
1212
1313
|
return;
|
|
1213
1314
|
}
|
|
1214
|
-
|
|
1315
|
+
_.preventDefault();
|
|
1215
1316
|
}
|
|
1216
1317
|
};
|
|
1217
|
-
return window.addEventListener("keydown",
|
|
1218
|
-
}, [
|
|
1219
|
-
const
|
|
1318
|
+
return window.addEventListener("keydown", k), () => window.removeEventListener("keydown", k);
|
|
1319
|
+
}, [o.chrome, o.keyboardMode, o.inspector, l]);
|
|
1320
|
+
const L = y(() => o.persona && o.persona !== b?.persona ? t.persona(o.persona)?.permissions ?? [] : t.permissionsOf(b), [o.persona, t, b]), B = y(
|
|
1220
1321
|
() => ({
|
|
1221
|
-
scenario:
|
|
1222
|
-
persona:
|
|
1223
|
-
permissions:
|
|
1224
|
-
can: (
|
|
1225
|
-
data:
|
|
1226
|
-
fixture:
|
|
1227
|
-
network:
|
|
1228
|
-
isLoading:
|
|
1322
|
+
scenario: b,
|
|
1323
|
+
persona: w,
|
|
1324
|
+
permissions: L,
|
|
1325
|
+
can: (k) => L.includes(k),
|
|
1326
|
+
data: R,
|
|
1327
|
+
fixture: T,
|
|
1328
|
+
network: o.network,
|
|
1329
|
+
isLoading: I,
|
|
1229
1330
|
error: D,
|
|
1230
|
-
rules: t.rulesOf(
|
|
1231
|
-
viewport:
|
|
1232
|
-
themeMode:
|
|
1233
|
-
locale:
|
|
1331
|
+
rules: t.rulesOf(b),
|
|
1332
|
+
viewport: d,
|
|
1333
|
+
themeMode: o.themeMode,
|
|
1334
|
+
locale: o.locale,
|
|
1234
1335
|
a11y: {
|
|
1235
|
-
keyboardMode:
|
|
1236
|
-
reducedMotion:
|
|
1237
|
-
textScale:
|
|
1336
|
+
keyboardMode: o.keyboardMode,
|
|
1337
|
+
reducedMotion: o.reducedMotion,
|
|
1338
|
+
textScale: o.textScale
|
|
1238
1339
|
},
|
|
1239
|
-
navigate:
|
|
1240
|
-
openScenario:
|
|
1340
|
+
navigate: m,
|
|
1341
|
+
openScenario: i
|
|
1241
1342
|
}),
|
|
1242
1343
|
[
|
|
1243
|
-
h,
|
|
1244
1344
|
b,
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
y,
|
|
1248
|
-
s.network,
|
|
1249
|
-
s.themeMode,
|
|
1250
|
-
s.locale,
|
|
1251
|
-
s.keyboardMode,
|
|
1252
|
-
s.reducedMotion,
|
|
1253
|
-
s.textScale,
|
|
1345
|
+
w,
|
|
1346
|
+
L,
|
|
1254
1347
|
R,
|
|
1348
|
+
T,
|
|
1349
|
+
o.network,
|
|
1350
|
+
o.themeMode,
|
|
1351
|
+
o.locale,
|
|
1352
|
+
o.keyboardMode,
|
|
1353
|
+
o.reducedMotion,
|
|
1354
|
+
o.textScale,
|
|
1355
|
+
I,
|
|
1255
1356
|
D,
|
|
1256
1357
|
t,
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1358
|
+
d,
|
|
1359
|
+
m,
|
|
1360
|
+
i
|
|
1260
1361
|
]
|
|
1261
|
-
),
|
|
1262
|
-
/* @__PURE__ */ a("code", { children:
|
|
1263
|
-
" não casa com nenhuma rota declarada em",
|
|
1362
|
+
), ee = !b && r.path === "/", $ = ve(e.routes, r.path), W = e.wrapper, j = e.notFound, H = $ ? /* @__PURE__ */ a($.definition.screen, { params: $.params, context: B }) : j ? /* @__PURE__ */ a(j, { path: r.path }) : /* @__PURE__ */ a(Ve, { title: n.shell.noRoute, children: /* @__PURE__ */ c("p", { children: [
|
|
1363
|
+
/* @__PURE__ */ a("code", { children: r.path }),
|
|
1264
1364
|
" ",
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
return /* @__PURE__ */ d(
|
|
1365
|
+
n.shell.noRouteHint
|
|
1366
|
+
] }) }), te = W ? /* @__PURE__ */ a(W, { context: B, children: H }) : H;
|
|
1367
|
+
return /* @__PURE__ */ a(J.Provider, { value: n, children: /* @__PURE__ */ c(
|
|
1269
1368
|
"div",
|
|
1270
1369
|
{
|
|
1271
1370
|
className: "ds-root",
|
|
1272
|
-
"data-chrome":
|
|
1273
|
-
"data-inspector":
|
|
1274
|
-
"data-sidebar":
|
|
1275
|
-
"data-viewport":
|
|
1371
|
+
"data-chrome": o.chrome ? "visible" : "hidden",
|
|
1372
|
+
"data-inspector": o.inspector ? "open" : "closed",
|
|
1373
|
+
"data-sidebar": p ? "open" : "closed",
|
|
1374
|
+
"data-viewport": d.id,
|
|
1276
1375
|
children: [
|
|
1277
|
-
|
|
1278
|
-
|
|
1376
|
+
o.chrome && /* @__PURE__ */ a(
|
|
1377
|
+
Ie,
|
|
1279
1378
|
{
|
|
1280
1379
|
product: e,
|
|
1281
|
-
scenario:
|
|
1282
|
-
deploy:
|
|
1283
|
-
inspectorOpen:
|
|
1284
|
-
sidebarOpen:
|
|
1285
|
-
onToggleInspector: () =>
|
|
1286
|
-
onToggleSidebar: () =>
|
|
1287
|
-
onHideChrome: () =>
|
|
1380
|
+
scenario: b,
|
|
1381
|
+
deploy: s,
|
|
1382
|
+
inspectorOpen: o.inspector,
|
|
1383
|
+
sidebarOpen: p,
|
|
1384
|
+
onToggleInspector: () => l({ inspector: !o.inspector }),
|
|
1385
|
+
onToggleSidebar: () => g((k) => !k),
|
|
1386
|
+
onHideChrome: () => l({ chrome: !1 })
|
|
1288
1387
|
}
|
|
1289
1388
|
),
|
|
1290
|
-
|
|
1291
|
-
|
|
1389
|
+
o.chrome && /* @__PURE__ */ a(
|
|
1390
|
+
Re,
|
|
1292
1391
|
{
|
|
1293
1392
|
registry: t,
|
|
1294
|
-
activeScenario:
|
|
1295
|
-
onOpenScenario:
|
|
1393
|
+
activeScenario: o.scenario,
|
|
1394
|
+
onOpenScenario: i
|
|
1296
1395
|
}
|
|
1297
1396
|
),
|
|
1298
|
-
/* @__PURE__ */
|
|
1299
|
-
|
|
1300
|
-
|
|
1397
|
+
/* @__PURE__ */ c("div", { className: "ds-stage-area", children: [
|
|
1398
|
+
ee ? /* @__PURE__ */ a("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ a(qe, { registry: t, onOpenScenario: i }) }) : /* @__PURE__ */ a(
|
|
1399
|
+
Ue,
|
|
1301
1400
|
{
|
|
1302
1401
|
ref: v,
|
|
1303
|
-
viewport:
|
|
1304
|
-
textScale:
|
|
1305
|
-
reducedMotion:
|
|
1306
|
-
keyboardMode:
|
|
1307
|
-
children:
|
|
1402
|
+
viewport: d,
|
|
1403
|
+
textScale: o.textScale,
|
|
1404
|
+
reducedMotion: o.reducedMotion,
|
|
1405
|
+
keyboardMode: o.keyboardMode,
|
|
1406
|
+
children: te
|
|
1308
1407
|
}
|
|
1309
1408
|
),
|
|
1310
|
-
|
|
1409
|
+
o.chrome && /* @__PURE__ */ a(De, { registry: t, controls: o, onChange: l })
|
|
1311
1410
|
] }),
|
|
1312
|
-
|
|
1313
|
-
|
|
1411
|
+
o.chrome && /* @__PURE__ */ a(
|
|
1412
|
+
Be,
|
|
1314
1413
|
{
|
|
1315
1414
|
registry: t,
|
|
1316
|
-
scenario:
|
|
1317
|
-
controls:
|
|
1318
|
-
focusedNode:
|
|
1319
|
-
tabStopCount:
|
|
1415
|
+
scenario: b,
|
|
1416
|
+
controls: o,
|
|
1417
|
+
focusedNode: u,
|
|
1418
|
+
tabStopCount: h.length
|
|
1320
1419
|
}
|
|
1321
1420
|
),
|
|
1322
|
-
|
|
1323
|
-
!
|
|
1421
|
+
o.keyboardMode && /* @__PURE__ */ a(Ke, { stops: h }),
|
|
1422
|
+
!o.chrome && /* @__PURE__ */ a(
|
|
1324
1423
|
"button",
|
|
1325
1424
|
{
|
|
1326
1425
|
type: "button",
|
|
1327
1426
|
className: "ds-chrome ds-restore",
|
|
1328
|
-
onClick: () =>
|
|
1329
|
-
children:
|
|
1427
|
+
onClick: () => l({ chrome: !0 }),
|
|
1428
|
+
children: n.shell.restoreChrome
|
|
1330
1429
|
}
|
|
1331
1430
|
)
|
|
1332
1431
|
]
|
|
1333
1432
|
}
|
|
1334
|
-
);
|
|
1433
|
+
) });
|
|
1335
1434
|
}
|
|
1336
|
-
function
|
|
1435
|
+
function A(e) {
|
|
1337
1436
|
return new Date(e.length === 10 ? `${e}T00:00:00` : e);
|
|
1338
1437
|
}
|
|
1339
|
-
function
|
|
1340
|
-
const
|
|
1341
|
-
let
|
|
1342
|
-
const
|
|
1343
|
-
return (
|
|
1438
|
+
function ot(e, t) {
|
|
1439
|
+
const n = A(e), s = A(t);
|
|
1440
|
+
let r = s.getFullYear() - n.getFullYear();
|
|
1441
|
+
const o = s.getMonth() - n.getMonth();
|
|
1442
|
+
return (o < 0 || o === 0 && s.getDate() < n.getDate()) && (r -= 1), r;
|
|
1344
1443
|
}
|
|
1345
|
-
function
|
|
1346
|
-
const
|
|
1347
|
-
return Math.floor((
|
|
1444
|
+
function it(e, t) {
|
|
1445
|
+
const n = A(e), s = A(t);
|
|
1446
|
+
return Math.floor((s.getTime() - n.getTime()) / 864e5);
|
|
1348
1447
|
}
|
|
1349
1448
|
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
|
-
|
|
1449
|
+
lt as CONTRAST_THRESHOLDS,
|
|
1450
|
+
S as DEFAULT_LABELS,
|
|
1451
|
+
st as DesignSpace,
|
|
1452
|
+
qe as Home,
|
|
1453
|
+
rt as KEYBOARD_LABELS,
|
|
1454
|
+
nt as NETWORK_LABELS,
|
|
1455
|
+
Y as NETWORK_STATES,
|
|
1456
|
+
f as PARAM,
|
|
1457
|
+
ut as SCENARIO_STATUSES,
|
|
1458
|
+
we as SLOW_NETWORK_DELAY_MS,
|
|
1459
|
+
tt as STATUS_LABELS,
|
|
1460
|
+
at as STATUS_MEANING,
|
|
1461
|
+
Ne as SimulatedNetworkError,
|
|
1462
|
+
Ue as Stage,
|
|
1463
|
+
Ve as StageEmpty,
|
|
1464
|
+
Q as TEXT_SCALES,
|
|
1465
|
+
Ke as TabOrderOverlay,
|
|
1466
|
+
G as VIEWPORTS,
|
|
1467
|
+
ot as ageInYears,
|
|
1468
|
+
ht as applyOverrides,
|
|
1469
|
+
mt as assertContrastPairs,
|
|
1470
|
+
pt as checkContrastPair,
|
|
1471
|
+
de as checkContrastPairs,
|
|
1472
|
+
bt as commitUrl,
|
|
1473
|
+
Me as computeRole,
|
|
1474
|
+
ft as contrastRatio,
|
|
1475
|
+
et as createHttpAdapter,
|
|
1476
|
+
le as createRegistry,
|
|
1477
|
+
it as daysBetween,
|
|
1478
|
+
xe as describeElement,
|
|
1379
1479
|
O as fixtureAdapter,
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1480
|
+
vt as flatten,
|
|
1481
|
+
gt as formatIssues,
|
|
1482
|
+
ce as getDeployContext,
|
|
1483
|
+
wt as hasErrors,
|
|
1484
|
+
fe as matchPath,
|
|
1485
|
+
Nt as parseColor,
|
|
1486
|
+
ue as parseControls,
|
|
1487
|
+
A as parseIsoDate,
|
|
1488
|
+
kt as readCssVariable,
|
|
1489
|
+
_t as relativeLuminance,
|
|
1490
|
+
P as resolveFixture,
|
|
1491
|
+
Oe as resolveLabels,
|
|
1492
|
+
ve as resolveRoute,
|
|
1493
|
+
me as resolveViewport,
|
|
1494
|
+
ie as scenarioUrl,
|
|
1495
|
+
U as serializeControls,
|
|
1496
|
+
yt as serializeValue,
|
|
1497
|
+
$e as shortSelector,
|
|
1498
|
+
Fe as tabbableElements,
|
|
1499
|
+
he as useDesignSpaceState,
|
|
1500
|
+
Pe as useKeyboardMode,
|
|
1501
|
+
N as useLabels,
|
|
1502
|
+
_e as useScenarioData,
|
|
1503
|
+
oe as validateProduct,
|
|
1504
|
+
St as validateScenario
|
|
1403
1505
|
};
|
|
1404
1506
|
//# sourceMappingURL=index.js.map
|