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