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