@brucesantos/design-space 0.4.0 → 0.5.1
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 +39 -0
- package/README.md +15 -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 +947 -820
- 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 +12 -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 ue, createContext as he, useRef as Q, forwardRef as pe } from "react";
|
|
3
|
+
import { S as se, v as me, P as g, N as ie, 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])), a = new Map((e.rules ?? []).map((d) => [d.id, d])), r = 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 ? a.get(d) : void 0,
|
|
38
|
+
module: (d) => d ? r.get(d) : void 0,
|
|
39
|
+
flow: (d) => d ? c.get(d) : void 0,
|
|
40
|
+
rulesOf: (d) => (d?.rules ?? []).map((f) => a.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 = r.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
|
+
se.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 ce = [
|
|
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), a = n.get(g.scenario) ?? void 0, r = l ? void 0 : t.scenario(a), 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 = r?.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: r?.id,
|
|
100
|
+
view: i,
|
|
101
|
+
showPorted: i === "ported",
|
|
102
|
+
component: l?.id,
|
|
103
|
+
persona: n.get(g.persona) ?? r?.persona,
|
|
104
|
+
fixture: l ? h : c ?? r?.fixture,
|
|
105
|
+
network: ye(p) ? p : r?.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 !==
|
|
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);
|
|
125
126
|
const a = t.product.theme?.locales?.[0];
|
|
126
|
-
e.locale && e.locale !== a && n.set(
|
|
127
|
-
const
|
|
128
|
-
e.dataSource && e.dataSource !==
|
|
127
|
+
e.locale && e.locale !== a && n.set(g.locale, e.locale);
|
|
128
|
+
const r = t.product.dataSources?.default ?? "fixtures";
|
|
129
|
+
e.dataSource && e.dataSource !== r && 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
|
-
}, []), a =
|
|
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
|
+
}, []), a = E(
|
|
143
|
+
(v) => {
|
|
144
|
+
const i = v.view ?? (v.showPorted === void 0 ? void 0 : v.showPorted ? "ported" : "active"), N = {
|
|
145
|
+
...s,
|
|
146
|
+
...v,
|
|
147
|
+
...i ? { view: i, showPorted: i === "ported" } : {}
|
|
148
|
+
};
|
|
149
|
+
l(t.path, q(N, e), !0);
|
|
150
|
+
},
|
|
151
|
+
[s, t.path, l, e]
|
|
152
|
+
), r = 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);
|
|
145
166
|
},
|
|
146
|
-
[
|
|
147
|
-
),
|
|
148
|
-
(
|
|
149
|
-
const [
|
|
150
|
-
|
|
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);
|
|
151
172
|
},
|
|
152
|
-
[t.search,
|
|
153
|
-
),
|
|
154
|
-
(
|
|
155
|
-
const
|
|
156
|
-
if (!
|
|
157
|
-
const
|
|
158
|
-
...
|
|
159
|
-
scenario:
|
|
160
|
-
|
|
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: a,
|
|
212
|
+
setScenarioView: r,
|
|
213
|
+
navigate: c,
|
|
214
|
+
openScenario: h,
|
|
215
|
+
openComponent: p
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
function ee(e) {
|
|
219
|
+
return e.view ?? (e.showPorted ? "ported" : "active");
|
|
186
220
|
}
|
|
187
|
-
function
|
|
188
|
-
const t =
|
|
221
|
+
function xe(e) {
|
|
222
|
+
const t = ce.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 && ie.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 [a,
|
|
208
|
-
if (
|
|
209
|
-
return
|
|
210
|
-
const c =
|
|
239
|
+
function Me(e, t) {
|
|
240
|
+
const n = e.split("/").filter(Boolean), s = Te(t).split("/").filter(Boolean), l = {};
|
|
241
|
+
for (const [a, r] of n.entries()) {
|
|
242
|
+
if (r === "*")
|
|
243
|
+
return l["*"] = s.slice(a).join("/"), l;
|
|
244
|
+
const c = s[a];
|
|
211
245
|
if (c === void 0) return null;
|
|
212
|
-
if (
|
|
213
|
-
|
|
246
|
+
if (r.startsWith(":")) {
|
|
247
|
+
l[r.slice(1)] = c;
|
|
214
248
|
continue;
|
|
215
249
|
}
|
|
216
|
-
if (
|
|
250
|
+
if (r !== 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: a, fallbackToFixture: r = !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, a);
|
|
314
|
+
if (!p.ok) throw new Error(`${p.status} ${p.statusText}`);
|
|
315
|
+
return await p.json();
|
|
316
|
+
} catch (p) {
|
|
317
|
+
if (r) 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, [a, r] = $({
|
|
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
|
+
r({ 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
|
+
r({ 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 && r({ data: p, isLoading: !1, error: void 0 });
|
|
342
|
+
}).catch((p) => {
|
|
343
|
+
c && r({
|
|
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]), a;
|
|
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 r = t.split(/\s+/).map((c) => e.ownerDocument.getElementById(c)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
|
|
430
|
+
if (r) return { name: r, 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 r = Array.from(e.labels ?? []).map((c) => c.textContent?.trim() ?? "").filter(Boolean);
|
|
436
|
+
if (r.length) return { name: r.join(" "), nameFrom: "label" };
|
|
403
437
|
}
|
|
404
438
|
if (e instanceof HTMLImageElement) {
|
|
405
|
-
const
|
|
406
|
-
if (
|
|
439
|
+
const r = e.getAttribute("alt");
|
|
440
|
+
if (r !== null) return { name: r, 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 a = e.getAttribute(
|
|
422
|
-
a !== null && a !== "false" && t.push(a === "true" || a === "" ?
|
|
453
|
+
function Be(e) {
|
|
454
|
+
const t = [], n = (s, l = s.replace("aria-", "")) => {
|
|
455
|
+
const a = e.getAttribute(s);
|
|
456
|
+
a !== null && a !== "false" && t.push(a === "true" || a === "" ? l : `${l}=${a}`);
|
|
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, a] = $([]), r = E(() => {
|
|
467
501
|
const c = t.current;
|
|
468
502
|
if (!c) {
|
|
469
503
|
a([]);
|
|
470
504
|
return;
|
|
471
505
|
}
|
|
472
506
|
a(
|
|
473
|
-
|
|
474
|
-
index:
|
|
475
|
-
element:
|
|
476
|
-
rect:
|
|
477
|
-
forcedOrder:
|
|
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), a([]);
|
|
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", r), window.addEventListener("scroll", r, !0), c(), r();
|
|
522
|
+
const h = t.current, p = h ? new MutationObserver(() => r()) : void 0;
|
|
523
|
+
return p?.observe(h, { childList: !0, subtree: !0, attributes: !0 }), () => {
|
|
524
|
+
document.removeEventListener("focusin", c), window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0), p?.disconnect();
|
|
491
525
|
};
|
|
492
|
-
}, [e,
|
|
526
|
+
}, [e, r, t]), { focused: n, tabStops: l, refresh: r };
|
|
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.",
|
|
@@ -645,18 +686,20 @@ const E = {
|
|
|
645
686
|
},
|
|
646
687
|
home: {
|
|
647
688
|
lead: (e) => `Especificação executável: cada situação abaixo abre por link, com persona, dados e regras próprios. ${e} ${e === 1 ? "situação registrada" : "situações registradas"}.`,
|
|
689
|
+
statusLegend: "Legenda dos status",
|
|
648
690
|
withoutModule: "Sem módulo",
|
|
649
691
|
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
692
|
emptyModule: "Nenhuma situação registrada neste módulo ainda.",
|
|
651
693
|
keyboardBadge: "teclado",
|
|
652
|
-
noActiveWork: "Não há trabalho ativo.
|
|
694
|
+
noActiveWork: "Não há cenários no trabalho ativo.",
|
|
695
|
+
noPortedReferences: "Não há referências portadas nesta coleção."
|
|
653
696
|
},
|
|
654
697
|
shell: {
|
|
655
698
|
restoreChrome: "Mostrar controles",
|
|
656
699
|
noRoute: "Nenhuma rota para este endereço",
|
|
657
700
|
noRouteHint: "não casa com nenhuma rota declarada. Escolha uma situação na navegação."
|
|
658
701
|
}
|
|
659
|
-
},
|
|
702
|
+
}, wt = {
|
|
660
703
|
status: {
|
|
661
704
|
ported: "Ported — not validated",
|
|
662
705
|
proposed: "Proposed",
|
|
@@ -722,6 +765,13 @@ const E = {
|
|
|
722
765
|
matchCount: (e) => `${e} ${e === 1 ? "scenario" : "scenarios"}.`,
|
|
723
766
|
noComponentMatch: (e) => `No components found for "${e}".`,
|
|
724
767
|
componentMatchCount: (e) => `${e} ${e === 1 ? "component" : "components"}.`,
|
|
768
|
+
activeWork: "Active work",
|
|
769
|
+
portedReferences: (e) => `Ported references · ${e}`,
|
|
770
|
+
viewPorted: (e) => `View ${e} ported ${e === 1 ? "reference" : "references"}`,
|
|
771
|
+
backToActive: "Back to active work",
|
|
772
|
+
currentView: (e) => `Current view: ${e}`,
|
|
773
|
+
noActiveWork: "There are no scenarios in active work.",
|
|
774
|
+
noPortedReferences: "There are no ported references.",
|
|
725
775
|
showPorted: "Show ported",
|
|
726
776
|
activePorted: "Opened by direct link; hidden from active work",
|
|
727
777
|
emptyModule: "No scenarios yet.",
|
|
@@ -810,11 +860,13 @@ const E = {
|
|
|
810
860
|
},
|
|
811
861
|
home: {
|
|
812
862
|
lead: (e) => `Executable specification: each state below opens from a link with its own persona, data, and rules. ${e} ${e === 1 ? "state registered" : "states registered"}.`,
|
|
863
|
+
statusLegend: "Status legend",
|
|
813
864
|
withoutModule: "No module",
|
|
814
865
|
withoutModuleHint: "The ID prefix does not match a registered module, so these states do not appear in module navigation.",
|
|
815
866
|
emptyModule: "No states have been registered in this module yet.",
|
|
816
867
|
keyboardBadge: "keyboard",
|
|
817
|
-
noActiveWork: "There
|
|
868
|
+
noActiveWork: "There are no scenarios in active work.",
|
|
869
|
+
noPortedReferences: "There are no ported references in this collection."
|
|
818
870
|
},
|
|
819
871
|
shell: {
|
|
820
872
|
restoreChrome: "Show controls",
|
|
@@ -822,77 +874,76 @@ const E = {
|
|
|
822
874
|
noRouteHint: "does not match any declared route. Choose a state from the navigation."
|
|
823
875
|
}
|
|
824
876
|
};
|
|
825
|
-
function
|
|
826
|
-
if (!e) return
|
|
827
|
-
const t = { ...
|
|
828
|
-
for (const n of Object.keys(
|
|
829
|
-
const
|
|
830
|
-
|
|
877
|
+
function Ue(e) {
|
|
878
|
+
if (!e) return L;
|
|
879
|
+
const t = { ...L };
|
|
880
|
+
for (const n of Object.keys(L)) {
|
|
881
|
+
const s = e[n];
|
|
882
|
+
s && (t[n] = { ...L[n], ...s });
|
|
831
883
|
}
|
|
832
884
|
return t;
|
|
833
885
|
}
|
|
834
|
-
const
|
|
835
|
-
function
|
|
836
|
-
return
|
|
886
|
+
const de = he(L);
|
|
887
|
+
function P() {
|
|
888
|
+
return ue(de);
|
|
837
889
|
}
|
|
838
|
-
const
|
|
839
|
-
function
|
|
890
|
+
const kt = L.status, Nt = L.statusMeaning, xt = L.network, yt = L.keyboard;
|
|
891
|
+
function Ve({
|
|
840
892
|
registry: e,
|
|
841
893
|
activeScenario: t,
|
|
842
894
|
activeComponent: n,
|
|
843
|
-
controls:
|
|
844
|
-
onOpenScenario:
|
|
895
|
+
controls: s,
|
|
896
|
+
onOpenScenario: l,
|
|
845
897
|
onOpenComponent: a,
|
|
846
|
-
|
|
898
|
+
onViewChange: r
|
|
847
899
|
}) {
|
|
848
|
-
const c =
|
|
849
|
-
|
|
850
|
-
n ?
|
|
851
|
-
}, [n, t]),
|
|
852
|
-
const
|
|
853
|
-
|
|
900
|
+
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;
|
|
901
|
+
I(() => {
|
|
902
|
+
n ? p("components") : t && p("flows");
|
|
903
|
+
}, [n, t]), I(() => {
|
|
904
|
+
const b = (w) => {
|
|
905
|
+
Ye(w) && (w.preventDefault(), x.current?.focus(), x.current?.select());
|
|
854
906
|
};
|
|
855
|
-
return window.addEventListener("keydown",
|
|
907
|
+
return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
|
|
856
908
|
}, []);
|
|
857
|
-
const
|
|
909
|
+
const _ = C(() => {
|
|
858
910
|
if (m.trim())
|
|
859
911
|
return new Set(
|
|
860
|
-
e.search(m, {
|
|
912
|
+
e.search(m, { view: d }).map((b) => b.id)
|
|
861
913
|
);
|
|
862
|
-
}, [
|
|
863
|
-
const
|
|
914
|
+
}, [m, e, d]), T = C(() => {
|
|
915
|
+
const b = re(m);
|
|
864
916
|
return (e.product.components ?? []).filter(
|
|
865
|
-
(
|
|
866
|
-
|
|
917
|
+
(w) => re([w.name, w.id, w.group, w.description].join(" ")).includes(
|
|
918
|
+
b
|
|
867
919
|
)
|
|
868
920
|
);
|
|
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;
|
|
921
|
+
}, [m, e.product.components]), B = (b) => _ ? b.filter((w) => _.has(w.id)) : b, W = {
|
|
922
|
+
view: d
|
|
923
|
+
}, 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) => {
|
|
924
|
+
if (z.length === 0) return;
|
|
925
|
+
const y = Je(z, b, w);
|
|
926
|
+
y && S.current.get(y)?.focus();
|
|
927
|
+
}, U = (b) => {
|
|
928
|
+
b.key === "ArrowDown" ? (b.preventDefault(), O(void 0, 1)) : b.key === "Escape" && v("");
|
|
929
|
+
}, H = (b, w) => {
|
|
930
|
+
w.key !== "ArrowDown" && w.key !== "ArrowUp" || (w.preventDefault(), O(b, w.key === "ArrowDown" ? 1 : -1));
|
|
931
|
+
}, K = (b, w) => {
|
|
932
|
+
w ? S.current.set(b, w) : S.current.delete(b);
|
|
933
|
+
}, V = (b) => N((w) => {
|
|
934
|
+
const y = new Set(w);
|
|
935
|
+
return y.has(b) ? y.delete(b) : y.add(b), y;
|
|
885
936
|
});
|
|
886
|
-
return /* @__PURE__ */
|
|
887
|
-
/* @__PURE__ */
|
|
937
|
+
return /* @__PURE__ */ u("nav", { className: "ds-chrome ds-sidebar", "aria-label": c.sidebar.region, children: [
|
|
938
|
+
/* @__PURE__ */ u("div", { className: "ds-sidebar__tabs", role: "tablist", children: [
|
|
888
939
|
/* @__PURE__ */ o(
|
|
889
940
|
"button",
|
|
890
941
|
{
|
|
891
942
|
type: "button",
|
|
892
943
|
role: "tab",
|
|
893
|
-
"aria-selected":
|
|
944
|
+
"aria-selected": h === "flows",
|
|
894
945
|
onClick: () => {
|
|
895
|
-
|
|
946
|
+
p("flows"), v("");
|
|
896
947
|
},
|
|
897
948
|
children: c.sidebar.flowsTab
|
|
898
949
|
}
|
|
@@ -902,98 +953,124 @@ function He({
|
|
|
902
953
|
{
|
|
903
954
|
type: "button",
|
|
904
955
|
role: "tab",
|
|
905
|
-
"aria-selected":
|
|
956
|
+
"aria-selected": h === "components",
|
|
906
957
|
onClick: () => {
|
|
907
|
-
|
|
958
|
+
p("components"), v("");
|
|
908
959
|
},
|
|
909
960
|
children: c.sidebar.componentsTab
|
|
910
961
|
}
|
|
911
962
|
)
|
|
912
963
|
] }),
|
|
913
|
-
/* @__PURE__ */
|
|
964
|
+
/* @__PURE__ */ u("div", { className: "ds-sidebar__search", children: [
|
|
914
965
|
/* @__PURE__ */ o(
|
|
915
966
|
"input",
|
|
916
967
|
{
|
|
917
|
-
ref:
|
|
968
|
+
ref: x,
|
|
918
969
|
className: "ds-input ds-input--search",
|
|
919
970
|
type: "search",
|
|
920
971
|
value: m,
|
|
921
|
-
placeholder:
|
|
922
|
-
"aria-label":
|
|
923
|
-
onChange: (
|
|
972
|
+
placeholder: h === "flows" ? c.sidebar.searchPlaceholder : c.sidebar.componentSearchPlaceholder,
|
|
973
|
+
"aria-label": h === "flows" ? c.sidebar.searchLabel : c.sidebar.componentSearchLabel,
|
|
974
|
+
onChange: (b) => v(b.target.value),
|
|
924
975
|
onKeyDown: U
|
|
925
976
|
}
|
|
926
977
|
),
|
|
927
978
|
/* @__PURE__ */ o("kbd", { children: c.sidebar.searchShortcut })
|
|
928
979
|
] }),
|
|
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
|
-
|
|
980
|
+
/* @__PURE__ */ u(
|
|
981
|
+
"div",
|
|
982
|
+
{
|
|
983
|
+
className: "ds-sidebar__tree",
|
|
984
|
+
role: "tabpanel",
|
|
985
|
+
"aria-label": h === "flows" ? c.sidebar.currentView(M) : void 0,
|
|
986
|
+
children: [
|
|
987
|
+
h === "flows" && /* @__PURE__ */ u("header", { className: "ds-sidebar__view-header", children: [
|
|
988
|
+
/* @__PURE__ */ o("h2", { children: M }),
|
|
989
|
+
d === "ported" && /* @__PURE__ */ o(
|
|
990
|
+
"button",
|
|
991
|
+
{
|
|
992
|
+
type: "button",
|
|
993
|
+
className: "ds-text-action",
|
|
994
|
+
onClick: () => r("active"),
|
|
995
|
+
children: c.sidebar.backToActive
|
|
996
|
+
}
|
|
997
|
+
)
|
|
998
|
+
] }),
|
|
999
|
+
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) }),
|
|
1000
|
+
h === "flows" && m.trim() === "" && k === 0 ? /* @__PURE__ */ u("div", { className: "ds-sidebar__view-empty", children: [
|
|
1001
|
+
/* @__PURE__ */ o("p", { children: d === "ported" ? c.sidebar.noPortedReferences : c.sidebar.noActiveWork }),
|
|
1002
|
+
d === "active" && f > 0 && /* @__PURE__ */ o(
|
|
1003
|
+
"button",
|
|
1004
|
+
{
|
|
1005
|
+
type: "button",
|
|
1006
|
+
className: "ds-text-action",
|
|
1007
|
+
onClick: () => r("ported"),
|
|
1008
|
+
children: c.sidebar.viewPorted(f)
|
|
1009
|
+
}
|
|
1010
|
+
)
|
|
1011
|
+
] }) : h === "flows" ? /* @__PURE__ */ o(
|
|
1012
|
+
Ge,
|
|
1013
|
+
{
|
|
1014
|
+
nodes: F,
|
|
1015
|
+
orphans: R,
|
|
1016
|
+
matches: _,
|
|
1017
|
+
collapsed: i,
|
|
1018
|
+
activeScenario: t?.id,
|
|
1019
|
+
withoutModuleLabel: c.sidebar.withoutModule,
|
|
1020
|
+
onToggle: V,
|
|
1021
|
+
onOpen: l,
|
|
1022
|
+
onKeyDown: H,
|
|
1023
|
+
setItemRef: K
|
|
1024
|
+
}
|
|
1025
|
+
) : 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: [
|
|
1026
|
+
/* @__PURE__ */ o("h2", { children: b }),
|
|
1027
|
+
/* @__PURE__ */ o("ul", { children: w.map((y) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ u(
|
|
1028
|
+
"button",
|
|
1029
|
+
{
|
|
1030
|
+
ref: (G) => K(y.id, G),
|
|
1031
|
+
type: "button",
|
|
1032
|
+
className: "ds-component-item",
|
|
1033
|
+
"aria-current": y.id === n,
|
|
1034
|
+
onClick: () => a(y.id),
|
|
1035
|
+
onKeyDown: (G) => H(y.id, G),
|
|
1036
|
+
children: [
|
|
1037
|
+
/* @__PURE__ */ o("span", { children: y.name }),
|
|
1038
|
+
y.description && /* @__PURE__ */ o("small", { children: y.description })
|
|
1039
|
+
]
|
|
1040
|
+
}
|
|
1041
|
+
) }, y.id)) })
|
|
1042
|
+
] }, b))
|
|
1043
|
+
]
|
|
1044
|
+
}
|
|
1045
|
+
),
|
|
1046
|
+
h === "flows" && d === "active" && k > 0 && f > 0 && /* @__PURE__ */ o("div", { className: "ds-sidebar__view-footer", children: /* @__PURE__ */ o(
|
|
1047
|
+
"button",
|
|
1048
|
+
{
|
|
1049
|
+
type: "button",
|
|
1050
|
+
className: "ds-text-action",
|
|
1051
|
+
onClick: () => r("ported"),
|
|
1052
|
+
children: c.sidebar.viewPorted(f)
|
|
1053
|
+
}
|
|
1054
|
+
) }),
|
|
1055
|
+
h === "flows" && t && /* @__PURE__ */ u("aside", { className: "ds-sidebar__scope", "aria-label": c.sidebar.scope, children: [
|
|
979
1056
|
/* @__PURE__ */ o("h2", { children: c.sidebar.scope }),
|
|
980
|
-
/* @__PURE__ */
|
|
1057
|
+
/* @__PURE__ */ u("dl", { children: [
|
|
981
1058
|
/* @__PURE__ */ o("dt", { children: c.sidebar.scopeData }),
|
|
982
|
-
/* @__PURE__ */ o("dd", { children: e.fixture(
|
|
1059
|
+
/* @__PURE__ */ o("dd", { children: e.fixture(s.fixture ?? t.fixture)?.label ?? c.controls.none }),
|
|
983
1060
|
/* @__PURE__ */ o("dt", { children: c.sidebar.scopePersona }),
|
|
984
|
-
/* @__PURE__ */ o("dd", { children: e.persona(
|
|
1061
|
+
/* @__PURE__ */ o("dd", { children: e.persona(s.persona ?? t.persona)?.name ?? c.controls.none }),
|
|
985
1062
|
/* @__PURE__ */ o("dt", { children: c.sidebar.scopeNetwork }),
|
|
986
|
-
/* @__PURE__ */ o("dd", { children: c.network[
|
|
1063
|
+
/* @__PURE__ */ o("dd", { children: c.network[s.network] })
|
|
987
1064
|
] })
|
|
988
1065
|
] })
|
|
989
1066
|
] });
|
|
990
1067
|
}
|
|
991
|
-
function
|
|
992
|
-
return /* @__PURE__ */
|
|
1068
|
+
function Ge(e) {
|
|
1069
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
993
1070
|
e.nodes.map((t) => {
|
|
994
1071
|
const n = !e.collapsed.has(t.module.id) || !!e.matches;
|
|
995
|
-
return /* @__PURE__ */
|
|
996
|
-
/* @__PURE__ */
|
|
1072
|
+
return /* @__PURE__ */ u("section", { className: "ds-module", children: [
|
|
1073
|
+
/* @__PURE__ */ u(
|
|
997
1074
|
"button",
|
|
998
1075
|
{
|
|
999
1076
|
type: "button",
|
|
@@ -1007,139 +1084,133 @@ function Ke(e) {
|
|
|
1007
1084
|
]
|
|
1008
1085
|
}
|
|
1009
1086
|
),
|
|
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
|
-
] })
|
|
1087
|
+
n && /* @__PURE__ */ o("ul", { className: "ds-module__scenarios", children: t.scenarios.map((s) => /* @__PURE__ */ o(ae, { scenario: s, ...e }, s.id)) })
|
|
1014
1088
|
] }, t.module.id);
|
|
1015
1089
|
}),
|
|
1016
|
-
e.orphans.length > 0 && /* @__PURE__ */
|
|
1017
|
-
/* @__PURE__ */
|
|
1090
|
+
e.orphans.length > 0 && /* @__PURE__ */ u("section", { className: "ds-module", children: [
|
|
1091
|
+
/* @__PURE__ */ u("div", { className: "ds-module__header", "aria-hidden": "true", children: [
|
|
1018
1092
|
/* @__PURE__ */ o("span", { className: "ds-module__chevron", children: "▶" }),
|
|
1019
1093
|
/* @__PURE__ */ o("span", { children: e.withoutModuleLabel }),
|
|
1020
1094
|
/* @__PURE__ */ o("span", { className: "ds-module__count", children: e.orphans.length })
|
|
1021
1095
|
] }),
|
|
1022
|
-
/* @__PURE__ */ o("ul", { className: "ds-module__scenarios", children: e.orphans.map((t) => /* @__PURE__ */ o(
|
|
1096
|
+
/* @__PURE__ */ o("ul", { className: "ds-module__scenarios", children: e.orphans.map((t) => /* @__PURE__ */ o(ae, { scenario: t, ...e }, t.id)) })
|
|
1023
1097
|
] })
|
|
1024
1098
|
] });
|
|
1025
1099
|
}
|
|
1026
|
-
function
|
|
1100
|
+
function ae({
|
|
1027
1101
|
scenario: e,
|
|
1028
1102
|
activeScenario: t,
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
onKeyDown: a,
|
|
1033
|
-
setItemRef: s
|
|
1103
|
+
onOpen: n,
|
|
1104
|
+
onKeyDown: s,
|
|
1105
|
+
setItemRef: l
|
|
1034
1106
|
}) {
|
|
1035
|
-
const
|
|
1036
|
-
return /* @__PURE__ */ o("li", { children: /* @__PURE__ */
|
|
1107
|
+
const a = P().status[e.status];
|
|
1108
|
+
return /* @__PURE__ */ o("li", { children: /* @__PURE__ */ u(
|
|
1037
1109
|
"button",
|
|
1038
1110
|
{
|
|
1039
|
-
ref: (
|
|
1111
|
+
ref: (r) => l(e.id, r),
|
|
1040
1112
|
type: "button",
|
|
1041
1113
|
className: "ds-scenario",
|
|
1042
1114
|
"aria-current": e.id === t,
|
|
1043
|
-
onClick: () =>
|
|
1044
|
-
onKeyDown: (
|
|
1115
|
+
onClick: () => n(e.id),
|
|
1116
|
+
onKeyDown: (r) => s(e.id, r),
|
|
1045
1117
|
children: [
|
|
1046
|
-
/* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": e.status, title:
|
|
1118
|
+
/* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": e.status, title: a }),
|
|
1047
1119
|
/* @__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 })
|
|
1120
|
+
/* @__PURE__ */ o("span", { className: "ds-visually-hidden", children: a })
|
|
1050
1121
|
]
|
|
1051
1122
|
}
|
|
1052
1123
|
) });
|
|
1053
1124
|
}
|
|
1054
|
-
function
|
|
1125
|
+
function qe(e) {
|
|
1055
1126
|
const t = /* @__PURE__ */ new Map();
|
|
1056
1127
|
for (const n of e) {
|
|
1057
|
-
const
|
|
1058
|
-
t.set(
|
|
1128
|
+
const s = n.group ?? "Componentes";
|
|
1129
|
+
t.set(s, [...t.get(s) ?? [], n]);
|
|
1059
1130
|
}
|
|
1060
1131
|
return [...t.entries()];
|
|
1061
1132
|
}
|
|
1062
|
-
function
|
|
1133
|
+
function re(e) {
|
|
1063
1134
|
return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim();
|
|
1064
1135
|
}
|
|
1065
|
-
function
|
|
1136
|
+
function Ye(e) {
|
|
1066
1137
|
const t = e.key.toLowerCase();
|
|
1067
1138
|
return (e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && (t === "k" || t === "f");
|
|
1068
1139
|
}
|
|
1069
|
-
function
|
|
1140
|
+
function Je(e, t, n) {
|
|
1070
1141
|
if (e.length === 0) return;
|
|
1071
|
-
const
|
|
1072
|
-
return e[
|
|
1142
|
+
const s = t ? e.indexOf(t) : -1, l = Math.max(0, Math.min(e.length - 1, s + n));
|
|
1143
|
+
return e[l];
|
|
1073
1144
|
}
|
|
1074
|
-
function
|
|
1145
|
+
function Qe({
|
|
1075
1146
|
product: e,
|
|
1076
1147
|
scenario: t,
|
|
1077
1148
|
deploy: n,
|
|
1078
|
-
inspectorOpen:
|
|
1079
|
-
chromeTheme:
|
|
1080
|
-
|
|
1081
|
-
onToggleInspector:
|
|
1149
|
+
inspectorOpen: s,
|
|
1150
|
+
chromeTheme: l,
|
|
1151
|
+
view: a,
|
|
1152
|
+
onToggleInspector: r,
|
|
1082
1153
|
onToggleChromeTheme: c
|
|
1083
1154
|
}) {
|
|
1084
|
-
const
|
|
1085
|
-
const
|
|
1155
|
+
const h = P().topbar, [p, m] = $(!1), v = async () => {
|
|
1156
|
+
const x = t ? fe(t, {
|
|
1086
1157
|
origin: n.origin,
|
|
1087
1158
|
overrides: {
|
|
1088
|
-
...
|
|
1089
|
-
...a ? {
|
|
1159
|
+
...l === "light" ? { chromeTheme: l } : {},
|
|
1160
|
+
...a === "ported" ? { view: a } : {}
|
|
1090
1161
|
}
|
|
1091
1162
|
}) : `${n.origin}${window.location.pathname}${window.location.search}`;
|
|
1092
1163
|
try {
|
|
1093
|
-
await navigator.clipboard.writeText(
|
|
1164
|
+
await navigator.clipboard.writeText(x);
|
|
1094
1165
|
} catch {
|
|
1095
|
-
window.prompt(
|
|
1166
|
+
window.prompt(h.copyPrompt, x);
|
|
1096
1167
|
}
|
|
1097
1168
|
m(!0), window.setTimeout(() => m(!1), 1600);
|
|
1098
|
-
},
|
|
1169
|
+
}, i = Xe(
|
|
1099
1170
|
typeof window > "u" ? `${n.origin}/` : window.location.href
|
|
1100
|
-
),
|
|
1101
|
-
return /* @__PURE__ */
|
|
1102
|
-
/* @__PURE__ */
|
|
1171
|
+
), N = Ze(n.origin, l, a);
|
|
1172
|
+
return /* @__PURE__ */ u("header", { className: "ds-chrome ds-topbar", children: [
|
|
1173
|
+
/* @__PURE__ */ u("div", { className: "ds-topbar__product", children: [
|
|
1103
1174
|
/* @__PURE__ */ o(
|
|
1104
1175
|
"a",
|
|
1105
1176
|
{
|
|
1106
1177
|
className: "ds-topbar__home",
|
|
1107
|
-
href:
|
|
1108
|
-
"aria-label":
|
|
1109
|
-
title:
|
|
1178
|
+
href: N,
|
|
1179
|
+
"aria-label": h.homeTitle(e.name),
|
|
1180
|
+
title: h.homeTitle(e.name),
|
|
1110
1181
|
children: e.name
|
|
1111
1182
|
}
|
|
1112
1183
|
),
|
|
1113
1184
|
e.tagline && /* @__PURE__ */ o("span", { className: "ds-topbar__tagline", children: e.tagline })
|
|
1114
1185
|
] }),
|
|
1115
1186
|
/* @__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:
|
|
1187
|
+
/* @__PURE__ */ u("div", { className: "ds-topbar__meta", children: [
|
|
1188
|
+
n.branch && /* @__PURE__ */ o("code", { title: h.branchTitle(n.branch), children: n.branch.length > 28 ? `${n.branch.slice(0, 27)}…` : n.branch }),
|
|
1189
|
+
n.commit && /* @__PURE__ */ o("code", { title: h.commitTitle(n.commit), children: n.shortCommit }),
|
|
1190
|
+
/* @__PURE__ */ o("code", { title: h.envTitle(n.env), children: n.env })
|
|
1120
1191
|
] }),
|
|
1121
1192
|
/* @__PURE__ */ o(
|
|
1122
1193
|
"button",
|
|
1123
1194
|
{
|
|
1124
1195
|
type: "button",
|
|
1125
1196
|
className: "ds-btn ds-btn--icon",
|
|
1126
|
-
"aria-pressed":
|
|
1127
|
-
"aria-label":
|
|
1128
|
-
title:
|
|
1197
|
+
"aria-pressed": l === "light",
|
|
1198
|
+
"aria-label": l === "dark" ? h.lightMode : h.darkMode,
|
|
1199
|
+
title: l === "dark" ? h.lightMode : h.darkMode,
|
|
1129
1200
|
onClick: c,
|
|
1130
|
-
children: /* @__PURE__ */ o(
|
|
1201
|
+
children: /* @__PURE__ */ o(et, { theme: l })
|
|
1131
1202
|
}
|
|
1132
1203
|
),
|
|
1133
|
-
/* @__PURE__ */ o("button", { type: "button", className: "ds-btn", onClick:
|
|
1204
|
+
/* @__PURE__ */ o("button", { type: "button", className: "ds-btn", onClick: v, children: p ? h.copied : h.copyLink }),
|
|
1134
1205
|
/* @__PURE__ */ o(
|
|
1135
1206
|
"a",
|
|
1136
1207
|
{
|
|
1137
1208
|
className: "ds-btn",
|
|
1138
|
-
href:
|
|
1209
|
+
href: i,
|
|
1139
1210
|
target: "_blank",
|
|
1140
1211
|
rel: "noreferrer",
|
|
1141
|
-
title:
|
|
1142
|
-
children:
|
|
1212
|
+
title: h.cleanReviewTitle,
|
|
1213
|
+
children: h.cleanReview
|
|
1143
1214
|
}
|
|
1144
1215
|
),
|
|
1145
1216
|
/* @__PURE__ */ o(
|
|
@@ -1147,22 +1218,22 @@ function Ve({
|
|
|
1147
1218
|
{
|
|
1148
1219
|
type: "button",
|
|
1149
1220
|
className: "ds-btn",
|
|
1150
|
-
"aria-pressed":
|
|
1151
|
-
onClick:
|
|
1152
|
-
children:
|
|
1221
|
+
"aria-pressed": s,
|
|
1222
|
+
onClick: r,
|
|
1223
|
+
children: h.panel
|
|
1153
1224
|
}
|
|
1154
1225
|
)
|
|
1155
1226
|
] });
|
|
1156
1227
|
}
|
|
1157
|
-
function
|
|
1228
|
+
function Xe(e) {
|
|
1158
1229
|
const t = new URL(e);
|
|
1159
|
-
return t.searchParams.set(
|
|
1230
|
+
return t.searchParams.set(g.chrome, "0"), t.toString();
|
|
1160
1231
|
}
|
|
1161
|
-
function
|
|
1162
|
-
const
|
|
1163
|
-
return t === "light" &&
|
|
1232
|
+
function Ze(e, t, n = "active") {
|
|
1233
|
+
const s = new URL("/", e);
|
|
1234
|
+
return t === "light" && s.searchParams.set(g.chromeTheme, t), n === "ported" && s.searchParams.set(g.view, "ported"), s.toString();
|
|
1164
1235
|
}
|
|
1165
|
-
function
|
|
1236
|
+
function et({ theme: e }) {
|
|
1166
1237
|
const t = {
|
|
1167
1238
|
width: 15,
|
|
1168
1239
|
height: 15,
|
|
@@ -1174,77 +1245,77 @@ function Je({ theme: e }) {
|
|
|
1174
1245
|
strokeLinejoin: "round",
|
|
1175
1246
|
"aria-hidden": !0
|
|
1176
1247
|
};
|
|
1177
|
-
return e === "dark" ? /* @__PURE__ */
|
|
1248
|
+
return e === "dark" ? /* @__PURE__ */ u("svg", { ...t, children: [
|
|
1178
1249
|
/* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "4" }),
|
|
1179
1250
|
/* @__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
1251
|
] }) : /* @__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
1252
|
}
|
|
1182
|
-
function
|
|
1253
|
+
function tt({
|
|
1183
1254
|
registry: e,
|
|
1184
1255
|
controls: t,
|
|
1185
1256
|
scenarioActive: n,
|
|
1186
|
-
component:
|
|
1187
|
-
componentFixture:
|
|
1257
|
+
component: s,
|
|
1258
|
+
componentFixture: l,
|
|
1188
1259
|
onChange: a
|
|
1189
1260
|
}) {
|
|
1190
|
-
const
|
|
1191
|
-
return /* @__PURE__ */
|
|
1192
|
-
|
|
1261
|
+
const r = P(), c = r.controls, { product: h } = e, p = h.dataSources?.adapters ?? [], m = h.theme?.modes ?? [], v = h.theme?.locales ?? [];
|
|
1262
|
+
return /* @__PURE__ */ u("div", { className: "ds-chrome ds-controls", role: "group", "aria-label": c.region, children: [
|
|
1263
|
+
s?.fixtures?.length ? /* @__PURE__ */ u("div", { className: "ds-field", children: [
|
|
1193
1264
|
/* @__PURE__ */ o("label", { htmlFor: "ds-component-fixture", children: c.componentFixture }),
|
|
1194
1265
|
/* @__PURE__ */ o(
|
|
1195
1266
|
"select",
|
|
1196
1267
|
{
|
|
1197
1268
|
id: "ds-component-fixture",
|
|
1198
1269
|
className: "ds-select",
|
|
1199
|
-
value:
|
|
1200
|
-
onChange: (
|
|
1201
|
-
children:
|
|
1270
|
+
value: l?.fixture?.id ?? "",
|
|
1271
|
+
onChange: (i) => a({ fixture: i.target.value || void 0 }),
|
|
1272
|
+
children: s.fixtures.map((i) => /* @__PURE__ */ o("option", { value: i.id, children: i.label }, i.id))
|
|
1202
1273
|
}
|
|
1203
1274
|
)
|
|
1204
1275
|
] }) : null,
|
|
1205
|
-
n && /* @__PURE__ */
|
|
1276
|
+
n && /* @__PURE__ */ u("div", { className: "ds-field", children: [
|
|
1206
1277
|
/* @__PURE__ */ o("label", { htmlFor: "ds-persona", children: c.persona }),
|
|
1207
|
-
/* @__PURE__ */
|
|
1278
|
+
/* @__PURE__ */ u(
|
|
1208
1279
|
"select",
|
|
1209
1280
|
{
|
|
1210
1281
|
id: "ds-persona",
|
|
1211
1282
|
className: "ds-select",
|
|
1212
1283
|
value: t.persona ?? "",
|
|
1213
|
-
onChange: (
|
|
1284
|
+
onChange: (i) => a({ persona: i.target.value || void 0 }),
|
|
1214
1285
|
children: [
|
|
1215
1286
|
/* @__PURE__ */ o("option", { value: "", children: c.none }),
|
|
1216
|
-
|
|
1287
|
+
h.personas.map((i) => /* @__PURE__ */ o("option", { value: i.id, children: i.name }, i.id))
|
|
1217
1288
|
]
|
|
1218
1289
|
}
|
|
1219
1290
|
)
|
|
1220
1291
|
] }),
|
|
1221
|
-
n && /* @__PURE__ */
|
|
1292
|
+
n && /* @__PURE__ */ u("div", { className: "ds-field", children: [
|
|
1222
1293
|
/* @__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:
|
|
1294
|
+
/* @__PURE__ */ o("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-network-label", children: ie.map((i) => /* @__PURE__ */ o(
|
|
1224
1295
|
"button",
|
|
1225
1296
|
{
|
|
1226
1297
|
type: "button",
|
|
1227
|
-
"aria-pressed": t.network ===
|
|
1228
|
-
onClick: () => a({ network:
|
|
1229
|
-
children:
|
|
1298
|
+
"aria-pressed": t.network === i,
|
|
1299
|
+
onClick: () => a({ network: i }),
|
|
1300
|
+
children: r.network[i]
|
|
1230
1301
|
},
|
|
1231
|
-
|
|
1302
|
+
i
|
|
1232
1303
|
)) })
|
|
1233
1304
|
] }),
|
|
1234
|
-
/* @__PURE__ */
|
|
1305
|
+
/* @__PURE__ */ u("div", { className: "ds-field", children: [
|
|
1235
1306
|
/* @__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:
|
|
1307
|
+
/* @__PURE__ */ o("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-viewport-label", children: ce.map((i) => /* @__PURE__ */ o(
|
|
1237
1308
|
"button",
|
|
1238
1309
|
{
|
|
1239
1310
|
type: "button",
|
|
1240
1311
|
className: "ds-icon-button",
|
|
1241
|
-
"aria-pressed": t.viewport ===
|
|
1242
|
-
"aria-label":
|
|
1243
|
-
title:
|
|
1244
|
-
onClick: () => a({ viewport:
|
|
1245
|
-
children: /* @__PURE__ */ o(
|
|
1312
|
+
"aria-pressed": t.viewport === i.id,
|
|
1313
|
+
"aria-label": r.viewport[i.id] ?? i.label,
|
|
1314
|
+
title: r.viewport[i.id] ?? i.label,
|
|
1315
|
+
onClick: () => a({ viewport: i.id }),
|
|
1316
|
+
children: /* @__PURE__ */ o(ot, { id: i.id })
|
|
1246
1317
|
},
|
|
1247
|
-
|
|
1318
|
+
i.id
|
|
1248
1319
|
)) }),
|
|
1249
1320
|
t.viewport === "custom" && /* @__PURE__ */ o(
|
|
1250
1321
|
"input",
|
|
@@ -1257,11 +1328,11 @@ function Qe({
|
|
|
1257
1328
|
style: { width: 88 },
|
|
1258
1329
|
"aria-label": c.customWidth,
|
|
1259
1330
|
value: t.customWidth ?? 1024,
|
|
1260
|
-
onChange: (
|
|
1331
|
+
onChange: (i) => a({ customWidth: Number(i.target.value) || void 0 })
|
|
1261
1332
|
}
|
|
1262
1333
|
)
|
|
1263
1334
|
] }),
|
|
1264
|
-
m.length > 1 && /* @__PURE__ */
|
|
1335
|
+
m.length > 1 && /* @__PURE__ */ u("div", { className: "ds-field", children: [
|
|
1265
1336
|
/* @__PURE__ */ o("label", { htmlFor: "ds-theme", children: c.theme }),
|
|
1266
1337
|
/* @__PURE__ */ o(
|
|
1267
1338
|
"select",
|
|
@@ -1269,43 +1340,43 @@ function Qe({
|
|
|
1269
1340
|
id: "ds-theme",
|
|
1270
1341
|
className: "ds-select",
|
|
1271
1342
|
value: t.themeMode ?? m[0],
|
|
1272
|
-
onChange: (
|
|
1273
|
-
children: m.map((
|
|
1343
|
+
onChange: (i) => a({ themeMode: i.target.value }),
|
|
1344
|
+
children: m.map((i) => /* @__PURE__ */ o("option", { value: i, children: i }, i))
|
|
1274
1345
|
}
|
|
1275
1346
|
)
|
|
1276
1347
|
] }),
|
|
1277
|
-
|
|
1348
|
+
v.length > 1 && /* @__PURE__ */ u("div", { className: "ds-field", children: [
|
|
1278
1349
|
/* @__PURE__ */ o("label", { htmlFor: "ds-locale", children: c.locale }),
|
|
1279
1350
|
/* @__PURE__ */ o(
|
|
1280
1351
|
"select",
|
|
1281
1352
|
{
|
|
1282
1353
|
id: "ds-locale",
|
|
1283
1354
|
className: "ds-select",
|
|
1284
|
-
value: t.locale ??
|
|
1285
|
-
onChange: (
|
|
1286
|
-
children:
|
|
1355
|
+
value: t.locale ?? v[0],
|
|
1356
|
+
onChange: (i) => a({ locale: i.target.value }),
|
|
1357
|
+
children: v.map((i) => /* @__PURE__ */ o("option", { value: i, children: i }, i))
|
|
1287
1358
|
}
|
|
1288
1359
|
)
|
|
1289
1360
|
] }),
|
|
1290
|
-
n &&
|
|
1361
|
+
n && p.length > 0 && /* @__PURE__ */ u("div", { className: "ds-field", children: [
|
|
1291
1362
|
/* @__PURE__ */ o("label", { htmlFor: "ds-source", children: c.dataSource }),
|
|
1292
|
-
/* @__PURE__ */
|
|
1363
|
+
/* @__PURE__ */ u(
|
|
1293
1364
|
"select",
|
|
1294
1365
|
{
|
|
1295
1366
|
id: "ds-source",
|
|
1296
1367
|
className: "ds-select",
|
|
1297
1368
|
value: t.dataSource ?? "fixtures",
|
|
1298
|
-
onChange: (
|
|
1369
|
+
onChange: (i) => a({ dataSource: i.target.value }),
|
|
1299
1370
|
children: [
|
|
1300
1371
|
/* @__PURE__ */ o("option", { value: "fixtures", children: c.fixturesOption }),
|
|
1301
|
-
|
|
1372
|
+
p.filter((i) => i.id !== "fixtures").map((i) => /* @__PURE__ */ o("option", { value: i.id, children: i.label }, i.id))
|
|
1302
1373
|
]
|
|
1303
1374
|
}
|
|
1304
1375
|
)
|
|
1305
1376
|
] })
|
|
1306
1377
|
] });
|
|
1307
1378
|
}
|
|
1308
|
-
function
|
|
1379
|
+
function ot({ id: e }) {
|
|
1309
1380
|
const t = {
|
|
1310
1381
|
width: 16,
|
|
1311
1382
|
height: 16,
|
|
@@ -1317,63 +1388,63 @@ function Xe({ id: e }) {
|
|
|
1317
1388
|
strokeLinejoin: "round",
|
|
1318
1389
|
"aria-hidden": !0
|
|
1319
1390
|
};
|
|
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__ */
|
|
1391
|
+
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
1392
|
/* @__PURE__ */ o("rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2" }),
|
|
1322
1393
|
/* @__PURE__ */ o("path", { d: "M12 18h.01" })
|
|
1323
|
-
] }) : e === "tablet" ? /* @__PURE__ */
|
|
1394
|
+
] }) : e === "tablet" ? /* @__PURE__ */ u("svg", { ...t, children: [
|
|
1324
1395
|
/* @__PURE__ */ o("rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2" }),
|
|
1325
1396
|
/* @__PURE__ */ o("path", { d: "M12 18h.01" })
|
|
1326
|
-
] }) : e === "desktop" ? /* @__PURE__ */
|
|
1397
|
+
] }) : e === "desktop" ? /* @__PURE__ */ u("svg", { ...t, children: [
|
|
1327
1398
|
/* @__PURE__ */ o("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
|
|
1328
1399
|
/* @__PURE__ */ o("path", { d: "M8 21h8M12 17v4" })
|
|
1329
1400
|
] }) : /* @__PURE__ */ o("svg", { ...t, children: /* @__PURE__ */ o("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) });
|
|
1330
1401
|
}
|
|
1331
|
-
function
|
|
1402
|
+
function nt({
|
|
1332
1403
|
registry: e,
|
|
1333
1404
|
scenario: t,
|
|
1334
1405
|
component: n,
|
|
1335
|
-
componentFixture:
|
|
1336
|
-
controls:
|
|
1406
|
+
componentFixture: s,
|
|
1407
|
+
controls: l,
|
|
1337
1408
|
focusedNode: a,
|
|
1338
|
-
tabStopCount:
|
|
1409
|
+
tabStopCount: r
|
|
1339
1410
|
}) {
|
|
1340
|
-
const c =
|
|
1341
|
-
return /* @__PURE__ */
|
|
1342
|
-
/* @__PURE__ */
|
|
1343
|
-
/* @__PURE__ */ o(
|
|
1344
|
-
/* @__PURE__ */ o(
|
|
1345
|
-
/* @__PURE__ */ o(
|
|
1411
|
+
const c = P().inspector, [h, p] = $("scenario"), m = e.issues.filter((v) => v.level === "error").length;
|
|
1412
|
+
return /* @__PURE__ */ u("aside", { className: "ds-chrome ds-inspector", "aria-label": c.region, children: [
|
|
1413
|
+
/* @__PURE__ */ u("div", { className: "ds-inspector__tabs", role: "tablist", children: [
|
|
1414
|
+
/* @__PURE__ */ o(J, { id: "scenario", current: h, onSelect: p, children: n ? c.componentReference : c.tabScenario }),
|
|
1415
|
+
/* @__PURE__ */ o(J, { id: "a11y", current: h, onSelect: p, children: c.tabA11y }),
|
|
1416
|
+
/* @__PURE__ */ o(J, { id: "diagnostics", current: h, onSelect: p, children: m > 0 ? c.diagnosticsWithErrors(m) : c.tabDiagnostics })
|
|
1346
1417
|
] }),
|
|
1347
|
-
/* @__PURE__ */
|
|
1348
|
-
|
|
1349
|
-
|
|
1418
|
+
/* @__PURE__ */ u("div", { className: "ds-inspector__body", role: "tabpanel", children: [
|
|
1419
|
+
h === "scenario" && /* @__PURE__ */ o(
|
|
1420
|
+
at,
|
|
1350
1421
|
{
|
|
1351
1422
|
registry: e,
|
|
1352
1423
|
scenario: t,
|
|
1353
1424
|
component: n,
|
|
1354
|
-
componentFixture:
|
|
1355
|
-
controls:
|
|
1425
|
+
componentFixture: s,
|
|
1426
|
+
controls: l
|
|
1356
1427
|
}
|
|
1357
1428
|
),
|
|
1358
|
-
|
|
1359
|
-
|
|
1429
|
+
h === "a11y" && /* @__PURE__ */ o(
|
|
1430
|
+
rt,
|
|
1360
1431
|
{
|
|
1361
1432
|
registry: e,
|
|
1362
1433
|
scenario: t,
|
|
1363
1434
|
focusedNode: a,
|
|
1364
|
-
keyboardMode:
|
|
1365
|
-
tabStopCount:
|
|
1435
|
+
keyboardMode: l.keyboardMode,
|
|
1436
|
+
tabStopCount: r
|
|
1366
1437
|
}
|
|
1367
1438
|
),
|
|
1368
|
-
|
|
1439
|
+
h === "diagnostics" && /* @__PURE__ */ o(st, { registry: e })
|
|
1369
1440
|
] })
|
|
1370
1441
|
] });
|
|
1371
1442
|
}
|
|
1372
|
-
function
|
|
1443
|
+
function J({
|
|
1373
1444
|
id: e,
|
|
1374
1445
|
current: t,
|
|
1375
1446
|
onSelect: n,
|
|
1376
|
-
children:
|
|
1447
|
+
children: s
|
|
1377
1448
|
}) {
|
|
1378
1449
|
return /* @__PURE__ */ o(
|
|
1379
1450
|
"button",
|
|
@@ -1382,177 +1453,177 @@ function V({
|
|
|
1382
1453
|
role: "tab",
|
|
1383
1454
|
"aria-selected": t === e,
|
|
1384
1455
|
onClick: () => n(e),
|
|
1385
|
-
children:
|
|
1456
|
+
children: s
|
|
1386
1457
|
}
|
|
1387
1458
|
);
|
|
1388
1459
|
}
|
|
1389
|
-
function
|
|
1460
|
+
function at({
|
|
1390
1461
|
registry: e,
|
|
1391
1462
|
scenario: t,
|
|
1392
1463
|
component: n,
|
|
1393
|
-
componentFixture:
|
|
1394
|
-
controls:
|
|
1464
|
+
componentFixture: s,
|
|
1465
|
+
controls: l
|
|
1395
1466
|
}) {
|
|
1396
|
-
const a =
|
|
1467
|
+
const a = P(), r = a.inspector;
|
|
1397
1468
|
if (!t)
|
|
1398
|
-
return n ? /* @__PURE__ */
|
|
1399
|
-
/* @__PURE__ */ o("h2", { className: "ds-block__title", children:
|
|
1469
|
+
return n ? /* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1470
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.componentReference }),
|
|
1400
1471
|
/* @__PURE__ */ o("p", { style: { color: "var(--ds-fg)", fontSize: 15, fontWeight: 600 }, children: n.name }),
|
|
1401
1472
|
n.description && /* @__PURE__ */ o("p", { children: n.description }),
|
|
1402
|
-
/* @__PURE__ */
|
|
1403
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1473
|
+
/* @__PURE__ */ u("dl", { className: "ds-kv", style: { marginTop: 14 }, children: [
|
|
1474
|
+
/* @__PURE__ */ o("dt", { children: r.id }),
|
|
1404
1475
|
/* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: n.id }),
|
|
1405
|
-
n.group && /* @__PURE__ */
|
|
1406
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1476
|
+
n.group && /* @__PURE__ */ u(A, { children: [
|
|
1477
|
+
/* @__PURE__ */ o("dt", { children: r.componentGroup }),
|
|
1407
1478
|
/* @__PURE__ */ o("dd", { children: n.group })
|
|
1408
1479
|
] }),
|
|
1409
|
-
|
|
1410
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1411
|
-
/* @__PURE__ */
|
|
1412
|
-
|
|
1480
|
+
s?.fixture && /* @__PURE__ */ u(A, { children: [
|
|
1481
|
+
/* @__PURE__ */ o("dt", { children: r.componentFixture }),
|
|
1482
|
+
/* @__PURE__ */ u("dd", { children: [
|
|
1483
|
+
s.fixture.label,
|
|
1413
1484
|
" ",
|
|
1414
|
-
/* @__PURE__ */ o("code", { children:
|
|
1485
|
+
/* @__PURE__ */ o("code", { children: s.fixture.id })
|
|
1415
1486
|
] }),
|
|
1416
|
-
|
|
1417
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1418
|
-
/* @__PURE__ */ o("dd", { children:
|
|
1487
|
+
s.fixture.description && /* @__PURE__ */ u(A, { children: [
|
|
1488
|
+
/* @__PURE__ */ o("dt", { children: r.componentFixtureDescription }),
|
|
1489
|
+
/* @__PURE__ */ o("dd", { children: s.fixture.description })
|
|
1419
1490
|
] })
|
|
1420
1491
|
] })
|
|
1421
1492
|
] }),
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1493
|
+
s?.didFallback && s.fixture && /* @__PURE__ */ o("p", { className: "ds-note", "data-tone": "warn", children: r.componentFixtureFallback(
|
|
1494
|
+
s.requestedId ?? "",
|
|
1495
|
+
s.fixture.id
|
|
1425
1496
|
) })
|
|
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:
|
|
1497
|
+
] }) : /* @__PURE__ */ o("p", { className: "ds-block", children: r.noScenario });
|
|
1498
|
+
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);
|
|
1499
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
1500
|
+
/* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1501
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.situation }),
|
|
1431
1502
|
/* @__PURE__ */ o("p", { style: { color: "var(--ds-fg)", fontSize: 14, fontWeight: 600 }, children: t.title }),
|
|
1432
1503
|
t.intent && /* @__PURE__ */ o("p", { children: t.intent }),
|
|
1433
|
-
/* @__PURE__ */
|
|
1434
|
-
/* @__PURE__ */ o("span", { className: "ds-chip", "data-tone":
|
|
1435
|
-
(t.tags ?? []).map((
|
|
1504
|
+
/* @__PURE__ */ u("div", { className: "ds-chips", children: [
|
|
1505
|
+
/* @__PURE__ */ o("span", { className: "ds-chip", "data-tone": ct(t.status), children: a.status[t.status] }),
|
|
1506
|
+
(t.tags ?? []).map((i) => /* @__PURE__ */ o("span", { className: "ds-chip", children: i }, i))
|
|
1436
1507
|
] }),
|
|
1437
1508
|
/* @__PURE__ */ o("p", { style: { marginTop: 6 }, children: a.statusMeaning[t.status] })
|
|
1438
1509
|
] }),
|
|
1439
|
-
/* @__PURE__ */
|
|
1440
|
-
/* @__PURE__ */ o("h2", { className: "ds-block__title", children:
|
|
1441
|
-
/* @__PURE__ */
|
|
1442
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1510
|
+
/* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1511
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.reproduction }),
|
|
1512
|
+
/* @__PURE__ */ u("dl", { className: "ds-kv", children: [
|
|
1513
|
+
/* @__PURE__ */ o("dt", { children: r.id }),
|
|
1443
1514
|
/* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.id }),
|
|
1444
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1515
|
+
/* @__PURE__ */ o("dt", { children: r.route }),
|
|
1445
1516
|
/* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.route }),
|
|
1446
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1447
|
-
/* @__PURE__ */
|
|
1517
|
+
/* @__PURE__ */ o("dt", { children: r.persona }),
|
|
1518
|
+
/* @__PURE__ */ u("dd", { children: [
|
|
1448
1519
|
c?.name ?? "—",
|
|
1449
|
-
|
|
1520
|
+
v && /* @__PURE__ */ o("span", { className: "ds-chip", "data-tone": "warn", style: { marginLeft: 6 }, children: r.personaSwapped })
|
|
1450
1521
|
] }),
|
|
1451
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1522
|
+
/* @__PURE__ */ o("dt", { children: r.data }),
|
|
1452
1523
|
/* @__PURE__ */ o("dd", { children: m?.label ?? "—" }),
|
|
1453
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1454
|
-
/* @__PURE__ */ o("dd", { children: a.network[
|
|
1524
|
+
/* @__PURE__ */ o("dt", { children: r.network }),
|
|
1525
|
+
/* @__PURE__ */ o("dd", { children: a.network[l.network] })
|
|
1455
1526
|
] }),
|
|
1456
|
-
c?.goal && /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children:
|
|
1527
|
+
c?.goal && /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: r.goal(c.goal) })
|
|
1457
1528
|
] }),
|
|
1458
|
-
|
|
1459
|
-
/* @__PURE__ */ o("h2", { className: "ds-block__title", children:
|
|
1460
|
-
/* @__PURE__ */ o("div", { className: "ds-chips", children:
|
|
1529
|
+
h.length > 0 && /* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1530
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.permissions }),
|
|
1531
|
+
/* @__PURE__ */ o("div", { className: "ds-chips", children: h.map((i) => /* @__PURE__ */ o("span", { className: "ds-chip", children: i }, i)) })
|
|
1461
1532
|
] }),
|
|
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((
|
|
1533
|
+
t.preconditions?.length ? /* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1534
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.preconditions }),
|
|
1535
|
+
/* @__PURE__ */ o("ul", { className: "ds-list", children: t.preconditions.map((i) => /* @__PURE__ */ o("li", { children: i }, i)) })
|
|
1465
1536
|
] }) : 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
|
-
] },
|
|
1537
|
+
p.length > 0 && /* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1538
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.rules }),
|
|
1539
|
+
p.map((i) => /* @__PURE__ */ u("div", { className: "ds-rule", children: [
|
|
1540
|
+
/* @__PURE__ */ o("span", { className: "ds-rule__id", children: i.id }),
|
|
1541
|
+
/* @__PURE__ */ o("span", { className: "ds-rule__statement", children: i.statement }),
|
|
1542
|
+
i.rationale && /* @__PURE__ */ o("p", { className: "ds-rule__rationale", children: i.rationale })
|
|
1543
|
+
] }, i.id))
|
|
1473
1544
|
] }),
|
|
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((
|
|
1545
|
+
t.actions?.length ? /* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1546
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.actions }),
|
|
1547
|
+
/* @__PURE__ */ o("ul", { className: "ds-list", children: t.actions.map((i) => /* @__PURE__ */ o("li", { children: i }, i)) })
|
|
1477
1548
|
] }) : 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((
|
|
1549
|
+
t.expected?.length ? /* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1550
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.expected }),
|
|
1551
|
+
/* @__PURE__ */ o("ul", { className: "ds-list", children: t.expected.map((i) => /* @__PURE__ */ o("li", { children: i }, i)) })
|
|
1481
1552
|
] }) : null,
|
|
1482
|
-
t.approvedAt && /* @__PURE__ */
|
|
1483
|
-
/* @__PURE__ */ o("h2", { className: "ds-block__title", children:
|
|
1484
|
-
/* @__PURE__ */
|
|
1553
|
+
t.approvedAt && /* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1554
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.approval }),
|
|
1555
|
+
/* @__PURE__ */ u("p", { children: [
|
|
1485
1556
|
t.approvedAt.date,
|
|
1486
1557
|
" · ",
|
|
1487
1558
|
/* @__PURE__ */ o("code", { children: t.approvedAt.commit.slice(0, 7) })
|
|
1488
1559
|
] }),
|
|
1489
|
-
/* @__PURE__ */ o("a", { href: t.approvedAt.url, target: "_blank", rel: "noreferrer", children:
|
|
1560
|
+
/* @__PURE__ */ o("a", { href: t.approvedAt.url, target: "_blank", rel: "noreferrer", children: r.openApproved })
|
|
1490
1561
|
] }),
|
|
1491
|
-
t.ticket && /* @__PURE__ */
|
|
1492
|
-
/* @__PURE__ */ o("h2", { className: "ds-block__title", children:
|
|
1562
|
+
t.ticket && /* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1563
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.engineering }),
|
|
1493
1564
|
/* @__PURE__ */ o("p", { children: t.ticket })
|
|
1494
1565
|
] })
|
|
1495
1566
|
] });
|
|
1496
1567
|
}
|
|
1497
|
-
function
|
|
1568
|
+
function rt({
|
|
1498
1569
|
registry: e,
|
|
1499
1570
|
scenario: t,
|
|
1500
1571
|
focusedNode: n,
|
|
1501
|
-
keyboardMode:
|
|
1502
|
-
tabStopCount:
|
|
1572
|
+
keyboardMode: s,
|
|
1573
|
+
tabStopCount: l
|
|
1503
1574
|
}) {
|
|
1504
|
-
const a =
|
|
1505
|
-
return /* @__PURE__ */
|
|
1506
|
-
t && /* @__PURE__ */
|
|
1507
|
-
/* @__PURE__ */ o("h2", { className: "ds-block__title", children:
|
|
1508
|
-
/* @__PURE__ */
|
|
1509
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1575
|
+
const a = P(), r = a.inspector, c = be(e.product.theme?.contrastPairs), h = c.filter((p) => p.passes !== !0);
|
|
1576
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
1577
|
+
t && /* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1578
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.a11yContract }),
|
|
1579
|
+
/* @__PURE__ */ u("dl", { className: "ds-kv", children: [
|
|
1580
|
+
/* @__PURE__ */ o("dt", { children: r.keyboard }),
|
|
1510
1581
|
/* @__PURE__ */ o("dd", { children: a.keyboard[t.a11y.keyboard] }),
|
|
1511
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1512
|
-
/* @__PURE__ */ o("dd", { children:
|
|
1582
|
+
/* @__PURE__ */ o("dt", { children: r.contrast }),
|
|
1583
|
+
/* @__PURE__ */ o("dd", { children: r.contrastTarget(t.a11y.contrast) })
|
|
1513
1584
|
] }),
|
|
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((
|
|
1585
|
+
t.a11y.announces?.length ? /* @__PURE__ */ u(A, { children: [
|
|
1586
|
+
/* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: r.announces }),
|
|
1587
|
+
/* @__PURE__ */ o("div", { className: "ds-chips", children: t.a11y.announces.map((p) => /* @__PURE__ */ o("span", { className: "ds-chip", children: p }, p)) })
|
|
1517
1588
|
] }) : null,
|
|
1518
1589
|
t.a11y.notes && /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: t.a11y.notes })
|
|
1519
1590
|
] }),
|
|
1520
|
-
/* @__PURE__ */
|
|
1521
|
-
/* @__PURE__ */ o("h2", { className: "ds-block__title", children:
|
|
1522
|
-
|
|
1523
|
-
/* @__PURE__ */
|
|
1524
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1591
|
+
/* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1592
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.focusedElement }),
|
|
1593
|
+
s ? n ? /* @__PURE__ */ u(A, { children: [
|
|
1594
|
+
/* @__PURE__ */ u("dl", { className: "ds-kv", children: [
|
|
1595
|
+
/* @__PURE__ */ o("dt", { children: r.role }),
|
|
1525
1596
|
/* @__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:
|
|
1597
|
+
/* @__PURE__ */ o("dt", { children: r.name }),
|
|
1598
|
+
/* @__PURE__ */ o("dd", { children: n.name ? n.name : /* @__PURE__ */ o("span", { style: { color: "var(--ds-err)" }, children: r.noAccessibleName }) }),
|
|
1599
|
+
/* @__PURE__ */ o("dt", { children: r.nameFrom }),
|
|
1529
1600
|
/* @__PURE__ */ o("dd", { children: n.nameFrom }),
|
|
1530
|
-
n.description ? /* @__PURE__ */
|
|
1531
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1601
|
+
n.description ? /* @__PURE__ */ u(A, { children: [
|
|
1602
|
+
/* @__PURE__ */ o("dt", { children: r.description }),
|
|
1532
1603
|
/* @__PURE__ */ o("dd", { children: n.description })
|
|
1533
1604
|
] }) : null,
|
|
1534
|
-
/* @__PURE__ */ o("dt", { children:
|
|
1605
|
+
/* @__PURE__ */ o("dt", { children: r.selector }),
|
|
1535
1606
|
/* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: n.selector })
|
|
1536
1607
|
] }),
|
|
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:
|
|
1608
|
+
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)) }),
|
|
1609
|
+
n.hiddenFromAssistiveTech && /* @__PURE__ */ o("p", { className: "ds-note", style: { marginTop: 8 }, children: r.focusableButHidden }),
|
|
1610
|
+
/* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: r.tabStopsInStage(l) })
|
|
1611
|
+
] }) : /* @__PURE__ */ o("p", { children: r.pressTab(l) }) : /* @__PURE__ */ o("p", { children: r.keyboardModeOff })
|
|
1541
1612
|
] }),
|
|
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:
|
|
1613
|
+
/* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1614
|
+
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.tokenContrast }),
|
|
1615
|
+
c.length === 0 ? /* @__PURE__ */ o("p", { children: r.noContrastPairs }) : /* @__PURE__ */ u("table", { className: "ds-contrast", children: [
|
|
1616
|
+
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ u("tr", { children: [
|
|
1617
|
+
/* @__PURE__ */ o("th", { scope: "col", children: r.pair }),
|
|
1618
|
+
/* @__PURE__ */ o("th", { scope: "col", children: r.ratio })
|
|
1548
1619
|
] }) }),
|
|
1549
|
-
/* @__PURE__ */ o("tbody", { children: c.map((
|
|
1550
|
-
/* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ o("tbody", { children: c.map((p) => /* @__PURE__ */ u("tr", { children: [
|
|
1621
|
+
/* @__PURE__ */ u("td", { children: [
|
|
1551
1622
|
/* @__PURE__ */ o(
|
|
1552
1623
|
"span",
|
|
1553
1624
|
{
|
|
1554
1625
|
className: "ds-swatch",
|
|
1555
|
-
style: { background:
|
|
1626
|
+
style: { background: p.pair.background },
|
|
1556
1627
|
"aria-hidden": "true"
|
|
1557
1628
|
}
|
|
1558
1629
|
),
|
|
@@ -1560,49 +1631,49 @@ function tt({
|
|
|
1560
1631
|
"span",
|
|
1561
1632
|
{
|
|
1562
1633
|
className: "ds-swatch",
|
|
1563
|
-
style: { background:
|
|
1634
|
+
style: { background: p.pair.foreground },
|
|
1564
1635
|
"aria-hidden": "true"
|
|
1565
1636
|
}
|
|
1566
1637
|
),
|
|
1567
|
-
|
|
1638
|
+
p.pair.name
|
|
1568
1639
|
] }),
|
|
1569
1640
|
/* @__PURE__ */ o(
|
|
1570
1641
|
"td",
|
|
1571
1642
|
{
|
|
1572
1643
|
style: {
|
|
1573
|
-
color:
|
|
1644
|
+
color: p.passes === !0 ? "var(--ds-ok)" : p.passes === !1 ? "var(--ds-err)" : "var(--ds-warn)"
|
|
1574
1645
|
},
|
|
1575
|
-
children:
|
|
1646
|
+
children: p.label
|
|
1576
1647
|
}
|
|
1577
1648
|
)
|
|
1578
|
-
] },
|
|
1649
|
+
] }, p.pair.name)) })
|
|
1579
1650
|
] }),
|
|
1580
|
-
|
|
1651
|
+
h.length > 0 && /* @__PURE__ */ o("p", { className: "ds-note", style: { marginTop: 8 }, children: r.pairsFailing(h.length) })
|
|
1581
1652
|
] }),
|
|
1582
|
-
/* @__PURE__ */ o("p", { className: "ds-note", children:
|
|
1653
|
+
/* @__PURE__ */ o("p", { className: "ds-note", children: r.automatedIsFloor })
|
|
1583
1654
|
] });
|
|
1584
1655
|
}
|
|
1585
|
-
function
|
|
1586
|
-
const t =
|
|
1587
|
-
return /* @__PURE__ */
|
|
1588
|
-
/* @__PURE__ */
|
|
1656
|
+
function st({ registry: e }) {
|
|
1657
|
+
const t = P(), n = t.inspector, s = e.coverage({ includePorted: !0 }), { issues: l } = e;
|
|
1658
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
1659
|
+
/* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1589
1660
|
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: n.coverage }),
|
|
1590
|
-
/* @__PURE__ */ o("dl", { className: "ds-kv", children: Object.entries(
|
|
1661
|
+
/* @__PURE__ */ o("dl", { className: "ds-kv", children: Object.entries(s).filter(([, a]) => a > 0).map(([a, r]) => /* @__PURE__ */ u("div", { style: { display: "contents" }, children: [
|
|
1591
1662
|
/* @__PURE__ */ o("dt", { children: t.status[a] }),
|
|
1592
|
-
/* @__PURE__ */ o("dd", { style: { fontVariantNumeric: "tabular-nums" }, children:
|
|
1663
|
+
/* @__PURE__ */ o("dd", { style: { fontVariantNumeric: "tabular-nums" }, children: r })
|
|
1593
1664
|
] }, a)) }),
|
|
1594
1665
|
/* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: n.scenariosRegistered(e.product.scenarios.length) })
|
|
1595
1666
|
] }),
|
|
1596
|
-
/* @__PURE__ */
|
|
1667
|
+
/* @__PURE__ */ u("div", { className: "ds-block", children: [
|
|
1597
1668
|
/* @__PURE__ */ o("h2", { className: "ds-block__title", children: n.scenarioContract }),
|
|
1598
|
-
|
|
1669
|
+
l.length === 0 ? /* @__PURE__ */ o("p", { children: n.noIssues }) : l.map((a, r) => /* @__PURE__ */ u("div", { className: "ds-issue", "data-level": a.level, children: [
|
|
1599
1670
|
/* @__PURE__ */ o("span", { className: "ds-issue__where", children: a.where }),
|
|
1600
1671
|
a.message
|
|
1601
|
-
] }, `${a.where}-${
|
|
1672
|
+
] }, `${a.where}-${r}`))
|
|
1602
1673
|
] })
|
|
1603
1674
|
] });
|
|
1604
1675
|
}
|
|
1605
|
-
const
|
|
1676
|
+
const it = {
|
|
1606
1677
|
ported: void 0,
|
|
1607
1678
|
proposed: "warn",
|
|
1608
1679
|
"in-review": "warn",
|
|
@@ -1611,18 +1682,18 @@ const nt = {
|
|
|
1611
1682
|
implemented: "ok",
|
|
1612
1683
|
superseded: void 0
|
|
1613
1684
|
};
|
|
1614
|
-
function
|
|
1615
|
-
return
|
|
1685
|
+
function ct(e) {
|
|
1686
|
+
return it[e];
|
|
1616
1687
|
}
|
|
1617
|
-
const
|
|
1688
|
+
const dt = pe(function({ viewport: t, textScale: n, reducedMotion: s, keyboardMode: l, children: a }, r) {
|
|
1618
1689
|
return /* @__PURE__ */ o("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ o(
|
|
1619
1690
|
"div",
|
|
1620
1691
|
{
|
|
1621
|
-
ref:
|
|
1692
|
+
ref: r,
|
|
1622
1693
|
className: "ds-stage",
|
|
1623
1694
|
"data-viewport": t.id,
|
|
1624
|
-
"data-keyboard-mode":
|
|
1625
|
-
"data-reduced-motion":
|
|
1695
|
+
"data-keyboard-mode": l,
|
|
1696
|
+
"data-reduced-motion": s,
|
|
1626
1697
|
style: {
|
|
1627
1698
|
width: t.width ? `${t.width}px` : "100%",
|
|
1628
1699
|
minHeight: t.height ? `${t.height}px` : void 0,
|
|
@@ -1635,7 +1706,7 @@ const rt = ce(function({ viewport: t, textScale: n, reducedMotion: r, keyboardMo
|
|
|
1635
1706
|
}
|
|
1636
1707
|
) });
|
|
1637
1708
|
});
|
|
1638
|
-
function
|
|
1709
|
+
function lt({ stops: e }) {
|
|
1639
1710
|
return e.length === 0 ? null : /* @__PURE__ */ o("div", { className: "ds-chrome ds-taborder", "aria-hidden": "true", children: e.map((t) => /* @__PURE__ */ o(
|
|
1640
1711
|
"span",
|
|
1641
1712
|
{
|
|
@@ -1647,44 +1718,90 @@ function st({ stops: e }) {
|
|
|
1647
1718
|
`${t.index}-${t.rect.top}-${t.rect.left}`
|
|
1648
1719
|
)) });
|
|
1649
1720
|
}
|
|
1650
|
-
function
|
|
1651
|
-
return /* @__PURE__ */
|
|
1721
|
+
function ut({ title: e, children: t }) {
|
|
1722
|
+
return /* @__PURE__ */ u("div", { className: "ds-chrome ds-stage-empty", children: [
|
|
1652
1723
|
/* @__PURE__ */ o("h2", { children: e }),
|
|
1653
1724
|
t
|
|
1654
1725
|
] });
|
|
1655
1726
|
}
|
|
1656
|
-
function
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1727
|
+
function ht({
|
|
1728
|
+
registry: e,
|
|
1729
|
+
onOpenScenario: t,
|
|
1730
|
+
view: n,
|
|
1731
|
+
onViewChange: s,
|
|
1732
|
+
showPorted: l = !1
|
|
1733
|
+
}) {
|
|
1734
|
+
const a = P(), { product: r } = 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" ? a.sidebar.portedReferences(N) : a.sidebar.activeWork;
|
|
1735
|
+
return /* @__PURE__ */ u("div", { className: "ds-chrome ds-home", children: [
|
|
1736
|
+
/* @__PURE__ */ u("header", { className: "ds-home__header", children: [
|
|
1737
|
+
/* @__PURE__ */ o("p", { className: "ds-home__view", "aria-live": "polite", children: x }),
|
|
1738
|
+
/* @__PURE__ */ o("h1", { children: r.name }),
|
|
1739
|
+
r.tagline && /* @__PURE__ */ o("p", { className: "ds-home__tagline", children: r.tagline }),
|
|
1740
|
+
/* @__PURE__ */ o("p", { className: "ds-home__lead", children: a.home.lead(m) }),
|
|
1741
|
+
/* @__PURE__ */ o("div", { className: "ds-chips", children: Object.entries(p).filter(([, S]) => S > 0).map(([S, d]) => /* @__PURE__ */ u("span", { className: "ds-chip", children: [
|
|
1742
|
+
a.status[S],
|
|
1665
1743
|
": ",
|
|
1666
|
-
|
|
1667
|
-
] },
|
|
1744
|
+
d
|
|
1745
|
+
] }, S)) }),
|
|
1746
|
+
m > 0 && c === "active" && N > 0 && /* @__PURE__ */ o(
|
|
1747
|
+
"button",
|
|
1748
|
+
{
|
|
1749
|
+
type: "button",
|
|
1750
|
+
className: "ds-text-action ds-home__view-action",
|
|
1751
|
+
onClick: () => s?.("ported"),
|
|
1752
|
+
children: a.sidebar.viewPorted(N)
|
|
1753
|
+
}
|
|
1754
|
+
),
|
|
1755
|
+
c === "ported" && /* @__PURE__ */ o(
|
|
1756
|
+
"button",
|
|
1757
|
+
{
|
|
1758
|
+
type: "button",
|
|
1759
|
+
className: "ds-text-action ds-home__view-action",
|
|
1760
|
+
onClick: () => s?.("active"),
|
|
1761
|
+
children: a.sidebar.backToActive
|
|
1762
|
+
}
|
|
1763
|
+
)
|
|
1764
|
+
] }),
|
|
1765
|
+
/* @__PURE__ */ u("section", { className: "ds-home__legend", "aria-labelledby": "ds-status-legend-title", children: [
|
|
1766
|
+
/* @__PURE__ */ o("h2", { id: "ds-status-legend-title", children: a.home.statusLegend }),
|
|
1767
|
+
/* @__PURE__ */ o("ul", { children: se.map((S) => /* @__PURE__ */ u("li", { children: [
|
|
1768
|
+
/* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": S, "aria-hidden": "true" }),
|
|
1769
|
+
/* @__PURE__ */ u("span", { children: [
|
|
1770
|
+
/* @__PURE__ */ o("strong", { children: a.status[S] }),
|
|
1771
|
+
/* @__PURE__ */ o("small", { children: a.statusMeaning[S] })
|
|
1772
|
+
] })
|
|
1773
|
+
] }, S)) })
|
|
1774
|
+
] }),
|
|
1775
|
+
m === 0 && /* @__PURE__ */ u("section", { className: "ds-home__empty", "aria-label": a.sidebar.currentView(x), children: [
|
|
1776
|
+
/* @__PURE__ */ o("p", { children: c === "ported" ? a.home.noPortedReferences : a.home.noActiveWork }),
|
|
1777
|
+
c === "active" && N > 0 && /* @__PURE__ */ o(
|
|
1778
|
+
"button",
|
|
1779
|
+
{
|
|
1780
|
+
type: "button",
|
|
1781
|
+
className: "ds-text-action",
|
|
1782
|
+
onClick: () => s?.("ported"),
|
|
1783
|
+
children: a.sidebar.viewPorted(N)
|
|
1784
|
+
}
|
|
1785
|
+
)
|
|
1668
1786
|
] }),
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
dt,
|
|
1787
|
+
v.map(({ module: S, scenarios: d }) => /* @__PURE__ */ o(
|
|
1788
|
+
pt,
|
|
1672
1789
|
{
|
|
1673
|
-
module:
|
|
1674
|
-
scenarios:
|
|
1790
|
+
module: S,
|
|
1791
|
+
scenarios: d,
|
|
1675
1792
|
registry: e,
|
|
1676
|
-
|
|
1793
|
+
view: c,
|
|
1677
1794
|
onOpenScenario: t
|
|
1678
1795
|
},
|
|
1679
|
-
|
|
1796
|
+
S.id
|
|
1680
1797
|
)),
|
|
1681
|
-
|
|
1682
|
-
/* @__PURE__ */ o("h2", { children:
|
|
1683
|
-
/* @__PURE__ */ o("p", { className: "ds-home__hint", children:
|
|
1798
|
+
i.length > 0 && /* @__PURE__ */ u("section", { className: "ds-home__module", children: [
|
|
1799
|
+
/* @__PURE__ */ o("h2", { children: a.home.withoutModule }),
|
|
1800
|
+
/* @__PURE__ */ o("p", { className: "ds-home__hint", children: a.home.withoutModuleHint }),
|
|
1684
1801
|
/* @__PURE__ */ o(
|
|
1685
|
-
|
|
1802
|
+
le,
|
|
1686
1803
|
{
|
|
1687
|
-
scenarios:
|
|
1804
|
+
scenarios: i,
|
|
1688
1805
|
registry: e,
|
|
1689
1806
|
onOpenScenario: t
|
|
1690
1807
|
}
|
|
@@ -1692,101 +1809,110 @@ function ct({ registry: e, onOpenScenario: t, showPorted: n = !1 }) {
|
|
|
1692
1809
|
] })
|
|
1693
1810
|
] });
|
|
1694
1811
|
}
|
|
1695
|
-
function
|
|
1812
|
+
function pt({
|
|
1696
1813
|
module: e,
|
|
1697
1814
|
scenarios: t,
|
|
1698
1815
|
registry: n,
|
|
1699
|
-
|
|
1700
|
-
onOpenScenario:
|
|
1816
|
+
view: s,
|
|
1817
|
+
onOpenScenario: l
|
|
1701
1818
|
}) {
|
|
1702
|
-
return /* @__PURE__ */
|
|
1819
|
+
return /* @__PURE__ */ u("section", { className: "ds-home__module", children: [
|
|
1703
1820
|
/* @__PURE__ */ o("h2", { children: e.name }),
|
|
1704
1821
|
e.description && /* @__PURE__ */ o("p", { className: "ds-home__hint", children: e.description }),
|
|
1705
1822
|
(e.flows ?? []).map((a) => /* @__PURE__ */ o(
|
|
1706
|
-
|
|
1823
|
+
mt,
|
|
1707
1824
|
{
|
|
1708
1825
|
flow: a,
|
|
1709
1826
|
registry: n,
|
|
1710
|
-
|
|
1711
|
-
onOpenScenario:
|
|
1827
|
+
view: s,
|
|
1828
|
+
onOpenScenario: l
|
|
1712
1829
|
},
|
|
1713
1830
|
a.id
|
|
1714
1831
|
)),
|
|
1715
|
-
/* @__PURE__ */ o(
|
|
1832
|
+
/* @__PURE__ */ o(le, { scenarios: t, registry: n, onOpenScenario: l })
|
|
1716
1833
|
] });
|
|
1717
1834
|
}
|
|
1718
|
-
function
|
|
1835
|
+
function mt({
|
|
1719
1836
|
flow: e,
|
|
1720
1837
|
registry: t,
|
|
1721
|
-
|
|
1722
|
-
onOpenScenario:
|
|
1838
|
+
view: n,
|
|
1839
|
+
onOpenScenario: s
|
|
1723
1840
|
}) {
|
|
1724
|
-
const
|
|
1725
|
-
const
|
|
1726
|
-
return
|
|
1841
|
+
const l = e.steps.filter((a) => {
|
|
1842
|
+
const r = t.scenario(a.scenario);
|
|
1843
|
+
return r && (n === "ported" ? r.status === "ported" : r.status !== "ported");
|
|
1727
1844
|
});
|
|
1728
|
-
return
|
|
1845
|
+
return l.length === 0 ? null : /* @__PURE__ */ u("div", { className: "ds-flow", children: [
|
|
1729
1846
|
/* @__PURE__ */ o("h3", { children: e.title }),
|
|
1730
1847
|
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(a.scenario),
|
|
1733
|
-
const m = t.scenario(
|
|
1734
|
-
return m && (n
|
|
1848
|
+
/* @__PURE__ */ o("ol", { className: "ds-flow__steps", children: l.map((a, r) => {
|
|
1849
|
+
const c = t.scenario(a.scenario), h = Object.entries(a.branches ?? {}).filter(([, p]) => {
|
|
1850
|
+
const m = t.scenario(p);
|
|
1851
|
+
return m && (n === "ported" ? m.status === "ported" : m.status !== "ported");
|
|
1735
1852
|
});
|
|
1736
|
-
return /* @__PURE__ */
|
|
1737
|
-
/* @__PURE__ */ o("button", { type: "button", className: "ds-flow__step", onClick: () =>
|
|
1853
|
+
return /* @__PURE__ */ u("li", { children: [
|
|
1854
|
+
/* @__PURE__ */ o("button", { type: "button", className: "ds-flow__step", onClick: () => s(a.scenario), children: a.label ?? c?.title ?? a.scenario }),
|
|
1738
1855
|
a.decision && /* @__PURE__ */ o("p", { className: "ds-flow__decision", children: a.decision }),
|
|
1739
|
-
|
|
1740
|
-
/* @__PURE__ */ o("span", { className: "ds-flow__branch-label", children:
|
|
1856
|
+
h.length > 0 && /* @__PURE__ */ o("ul", { className: "ds-flow__branches", children: h.map(([p, m]) => /* @__PURE__ */ u("li", { children: [
|
|
1857
|
+
/* @__PURE__ */ o("span", { className: "ds-flow__branch-label", children: p }),
|
|
1741
1858
|
/* @__PURE__ */ o(
|
|
1742
1859
|
"button",
|
|
1743
1860
|
{
|
|
1744
1861
|
type: "button",
|
|
1745
1862
|
className: "ds-flow__step",
|
|
1746
|
-
onClick: () =>
|
|
1863
|
+
onClick: () => s(m),
|
|
1747
1864
|
children: t.scenario(m)?.title ?? m
|
|
1748
1865
|
}
|
|
1749
1866
|
)
|
|
1750
|
-
] },
|
|
1751
|
-
] }, `${a.scenario}-${
|
|
1867
|
+
] }, p)) })
|
|
1868
|
+
] }, `${a.scenario}-${r}`);
|
|
1752
1869
|
}) })
|
|
1753
1870
|
] });
|
|
1754
1871
|
}
|
|
1755
|
-
function
|
|
1872
|
+
function le({
|
|
1756
1873
|
scenarios: e,
|
|
1757
1874
|
registry: t,
|
|
1758
1875
|
onOpenScenario: n
|
|
1759
1876
|
}) {
|
|
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:
|
|
1877
|
+
const s = P();
|
|
1878
|
+
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: [
|
|
1879
|
+
/* @__PURE__ */ u("span", { className: "ds-home__card-head", children: [
|
|
1880
|
+
/* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": l.status }),
|
|
1881
|
+
/* @__PURE__ */ o("span", { className: "ds-home__card-title", children: l.title })
|
|
1765
1882
|
] }),
|
|
1766
|
-
|
|
1767
|
-
/* @__PURE__ */
|
|
1768
|
-
t.persona(
|
|
1883
|
+
l.intent && /* @__PURE__ */ o("span", { className: "ds-home__card-intent", children: l.intent }),
|
|
1884
|
+
/* @__PURE__ */ u("span", { className: "ds-home__card-meta", children: [
|
|
1885
|
+
t.persona(l.persona)?.name ?? l.persona,
|
|
1769
1886
|
" · ",
|
|
1770
|
-
|
|
1771
|
-
|
|
1887
|
+
s.status[l.status],
|
|
1888
|
+
l.a11y.keyboard === "full" ? ` · ${s.home.keyboardBadge}` : ""
|
|
1772
1889
|
] })
|
|
1773
|
-
] }) },
|
|
1890
|
+
] }) }, l.id)) });
|
|
1774
1891
|
}
|
|
1775
|
-
function
|
|
1776
|
-
const t =
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
},
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1892
|
+
function St({ product: e }) {
|
|
1893
|
+
const t = C(() => ge(e), [e]), n = C(() => Ue(e.theme?.labels), [e.theme?.labels]), s = C(() => ve(e.deploy), [e.deploy]), {
|
|
1894
|
+
location: l,
|
|
1895
|
+
controls: a,
|
|
1896
|
+
viewport: r,
|
|
1897
|
+
setControls: c,
|
|
1898
|
+
setScenarioView: h,
|
|
1899
|
+
navigate: p,
|
|
1900
|
+
openScenario: m,
|
|
1901
|
+
openComponent: v
|
|
1902
|
+
} = Ne(t), i = ee(a), N = Q(null), { focused: x, tabStops: S } = ze(a.keyboardMode, N), d = t.scenario(a.scenario), f = t.component(a.component), k = C(
|
|
1903
|
+
() => t.resolveComponentFixture(f?.id, f ? a.fixture : void 0),
|
|
1904
|
+
[f, a.fixture, t]
|
|
1905
|
+
), M = C(() => {
|
|
1906
|
+
const w = k.fixture?.data;
|
|
1907
|
+
return typeof w == "function" ? w() : w;
|
|
1908
|
+
}, [k.fixture]), _ = t.persona(a.persona ?? d?.persona), T = t.fixture(a.fixture ?? d?.fixture), B = C(() => {
|
|
1909
|
+
const w = a.dataSource ?? "fixtures";
|
|
1910
|
+
return w === "fixtures" ? Z : e.dataSources?.adapters?.find((y) => y.id === w) ?? Z;
|
|
1911
|
+
}, [a.dataSource, e.dataSources?.adapters]), { data: W, isLoading: F, error: R } = $e({ scenario: d, fixture: T, network: a.network, adapter: B });
|
|
1912
|
+
I(() => {
|
|
1913
|
+
const w = (y) => {
|
|
1914
|
+
if (!(!y.shiftKey || y.metaKey || y.ctrlKey || y.altKey || y.target?.matches("input, textarea, select, [contenteditable='true']"))) {
|
|
1915
|
+
switch (y.key) {
|
|
1790
1916
|
case "K":
|
|
1791
1917
|
c({ keyboardMode: !a.keyboardMode });
|
|
1792
1918
|
break;
|
|
@@ -1796,24 +1922,24 @@ function Nt({ product: e }) {
|
|
|
1796
1922
|
default:
|
|
1797
1923
|
return;
|
|
1798
1924
|
}
|
|
1799
|
-
|
|
1925
|
+
y.preventDefault();
|
|
1800
1926
|
}
|
|
1801
1927
|
};
|
|
1802
|
-
return window.addEventListener("keydown",
|
|
1928
|
+
return window.addEventListener("keydown", w), () => window.removeEventListener("keydown", w);
|
|
1803
1929
|
}, [a.keyboardMode, a.inspector, c]);
|
|
1804
|
-
const
|
|
1930
|
+
const D = C(() => a.persona && a.persona !== d?.persona ? t.persona(a.persona)?.permissions ?? [] : t.permissionsOf(d), [a.persona, t, d]), j = C(
|
|
1805
1931
|
() => ({
|
|
1806
|
-
scenario:
|
|
1807
|
-
persona:
|
|
1808
|
-
permissions:
|
|
1809
|
-
can: (
|
|
1810
|
-
data:
|
|
1811
|
-
fixture:
|
|
1932
|
+
scenario: d,
|
|
1933
|
+
persona: _,
|
|
1934
|
+
permissions: D,
|
|
1935
|
+
can: (w) => D.includes(w),
|
|
1936
|
+
data: W,
|
|
1937
|
+
fixture: T,
|
|
1812
1938
|
network: a.network,
|
|
1813
|
-
isLoading:
|
|
1814
|
-
error:
|
|
1815
|
-
rules: t.rulesOf(
|
|
1816
|
-
viewport:
|
|
1939
|
+
isLoading: F,
|
|
1940
|
+
error: R,
|
|
1941
|
+
rules: t.rulesOf(d),
|
|
1942
|
+
viewport: r,
|
|
1817
1943
|
themeMode: a.themeMode,
|
|
1818
1944
|
locale: a.locale,
|
|
1819
1945
|
a11y: {
|
|
@@ -1822,33 +1948,33 @@ function Nt({ product: e }) {
|
|
|
1822
1948
|
textScale: a.textScale
|
|
1823
1949
|
},
|
|
1824
1950
|
navigate: p,
|
|
1825
|
-
openScenario:
|
|
1951
|
+
openScenario: m
|
|
1826
1952
|
}),
|
|
1827
1953
|
[
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1954
|
+
d,
|
|
1955
|
+
_,
|
|
1956
|
+
D,
|
|
1957
|
+
W,
|
|
1958
|
+
T,
|
|
1833
1959
|
a.network,
|
|
1834
1960
|
a.themeMode,
|
|
1835
1961
|
a.locale,
|
|
1836
1962
|
a.keyboardMode,
|
|
1837
1963
|
a.reducedMotion,
|
|
1838
1964
|
a.textScale,
|
|
1839
|
-
|
|
1840
|
-
|
|
1965
|
+
F,
|
|
1966
|
+
R,
|
|
1841
1967
|
t,
|
|
1842
|
-
|
|
1968
|
+
r,
|
|
1843
1969
|
p,
|
|
1844
|
-
|
|
1970
|
+
m
|
|
1845
1971
|
]
|
|
1846
|
-
),
|
|
1847
|
-
|
|
1972
|
+
), z = !d && !f && l.path === "/", O = Ce(e.routes, l.path), U = e.wrapper, H = e.notFound, K = f?.preview, V = K ? /* @__PURE__ */ o(
|
|
1973
|
+
K,
|
|
1848
1974
|
{
|
|
1849
|
-
fixture:
|
|
1850
|
-
data:
|
|
1851
|
-
viewport:
|
|
1975
|
+
fixture: k.fixture,
|
|
1976
|
+
data: M,
|
|
1977
|
+
viewport: r,
|
|
1852
1978
|
themeMode: a.themeMode ?? "default",
|
|
1853
1979
|
locale: a.locale ?? "default",
|
|
1854
1980
|
a11y: {
|
|
@@ -1857,89 +1983,90 @@ function Nt({ product: e }) {
|
|
|
1857
1983
|
textScale: a.textScale
|
|
1858
1984
|
}
|
|
1859
1985
|
}
|
|
1860
|
-
) : O ? /* @__PURE__ */ o(O.definition.screen, { params: O.params, context: j }) :
|
|
1861
|
-
/* @__PURE__ */ o("code", { children:
|
|
1986
|
+
) : 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: [
|
|
1987
|
+
/* @__PURE__ */ o("code", { children: l.path }),
|
|
1862
1988
|
" ",
|
|
1863
1989
|
n.shell.noRouteHint
|
|
1864
|
-
] }) }),
|
|
1865
|
-
return /* @__PURE__ */ o(
|
|
1990
|
+
] }) }), b = U ? /* @__PURE__ */ o(U, { context: j, children: V }) : V;
|
|
1991
|
+
return /* @__PURE__ */ o(de.Provider, { value: n, children: /* @__PURE__ */ u(
|
|
1866
1992
|
"div",
|
|
1867
1993
|
{
|
|
1868
1994
|
className: "ds-root",
|
|
1869
1995
|
"data-chrome": a.chrome ? "visible" : "hidden",
|
|
1870
1996
|
"data-appearance": a.chromeTheme ?? "dark",
|
|
1871
1997
|
"data-inspector": a.inspector ? "open" : "closed",
|
|
1872
|
-
"data-viewport":
|
|
1998
|
+
"data-viewport": r.id,
|
|
1873
1999
|
children: [
|
|
1874
2000
|
a.chrome && /* @__PURE__ */ o(
|
|
1875
|
-
|
|
2001
|
+
Qe,
|
|
1876
2002
|
{
|
|
1877
2003
|
product: e,
|
|
1878
|
-
scenario:
|
|
1879
|
-
deploy:
|
|
2004
|
+
scenario: d,
|
|
2005
|
+
deploy: s,
|
|
1880
2006
|
inspectorOpen: a.inspector,
|
|
1881
2007
|
chromeTheme: a.chromeTheme ?? "dark",
|
|
1882
|
-
|
|
2008
|
+
view: i,
|
|
1883
2009
|
onToggleInspector: () => c({ inspector: !a.inspector }),
|
|
1884
2010
|
onToggleChromeTheme: () => c({ chromeTheme: a.chromeTheme === "light" ? "dark" : "light" })
|
|
1885
2011
|
}
|
|
1886
2012
|
),
|
|
1887
2013
|
a.chrome && /* @__PURE__ */ o(
|
|
1888
|
-
|
|
2014
|
+
Ve,
|
|
1889
2015
|
{
|
|
1890
2016
|
registry: t,
|
|
1891
|
-
activeScenario:
|
|
2017
|
+
activeScenario: d,
|
|
1892
2018
|
activeComponent: a.component,
|
|
1893
2019
|
controls: a,
|
|
1894
|
-
onOpenScenario:
|
|
1895
|
-
onOpenComponent:
|
|
1896
|
-
|
|
2020
|
+
onOpenScenario: m,
|
|
2021
|
+
onOpenComponent: v,
|
|
2022
|
+
onViewChange: h
|
|
1897
2023
|
}
|
|
1898
2024
|
),
|
|
1899
|
-
/* @__PURE__ */
|
|
1900
|
-
|
|
1901
|
-
|
|
2025
|
+
/* @__PURE__ */ u("div", { className: "ds-stage-area", children: [
|
|
2026
|
+
z ? /* @__PURE__ */ o("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ o(
|
|
2027
|
+
ht,
|
|
1902
2028
|
{
|
|
1903
2029
|
registry: t,
|
|
1904
|
-
|
|
1905
|
-
|
|
2030
|
+
view: i,
|
|
2031
|
+
onViewChange: h,
|
|
2032
|
+
onOpenScenario: m
|
|
1906
2033
|
}
|
|
1907
2034
|
) }) : /* @__PURE__ */ o(
|
|
1908
|
-
|
|
2035
|
+
dt,
|
|
1909
2036
|
{
|
|
1910
|
-
ref:
|
|
1911
|
-
viewport:
|
|
2037
|
+
ref: N,
|
|
2038
|
+
viewport: r,
|
|
1912
2039
|
textScale: a.textScale,
|
|
1913
2040
|
reducedMotion: a.reducedMotion,
|
|
1914
2041
|
keyboardMode: a.keyboardMode,
|
|
1915
|
-
children:
|
|
2042
|
+
children: b
|
|
1916
2043
|
}
|
|
1917
2044
|
),
|
|
1918
2045
|
a.chrome && /* @__PURE__ */ o(
|
|
1919
|
-
|
|
2046
|
+
tt,
|
|
1920
2047
|
{
|
|
1921
2048
|
registry: t,
|
|
1922
2049
|
controls: a,
|
|
1923
|
-
scenarioActive: !!
|
|
1924
|
-
component:
|
|
1925
|
-
componentFixture:
|
|
2050
|
+
scenarioActive: !!d,
|
|
2051
|
+
component: f,
|
|
2052
|
+
componentFixture: k,
|
|
1926
2053
|
onChange: c
|
|
1927
2054
|
}
|
|
1928
2055
|
)
|
|
1929
2056
|
] }),
|
|
1930
2057
|
a.chrome && /* @__PURE__ */ o(
|
|
1931
|
-
|
|
2058
|
+
nt,
|
|
1932
2059
|
{
|
|
1933
2060
|
registry: t,
|
|
1934
|
-
scenario:
|
|
1935
|
-
component:
|
|
1936
|
-
componentFixture:
|
|
2061
|
+
scenario: d,
|
|
2062
|
+
component: f,
|
|
2063
|
+
componentFixture: k,
|
|
1937
2064
|
controls: a,
|
|
1938
|
-
focusedNode:
|
|
2065
|
+
focusedNode: x,
|
|
1939
2066
|
tabStopCount: S.length
|
|
1940
2067
|
}
|
|
1941
2068
|
),
|
|
1942
|
-
a.keyboardMode && /* @__PURE__ */ o(
|
|
2069
|
+
a.keyboardMode && /* @__PURE__ */ o(lt, { stops: S }),
|
|
1943
2070
|
!a.chrome && /* @__PURE__ */ o(
|
|
1944
2071
|
"button",
|
|
1945
2072
|
{
|
|
@@ -1953,77 +2080,77 @@ function Nt({ product: e }) {
|
|
|
1953
2080
|
}
|
|
1954
2081
|
) });
|
|
1955
2082
|
}
|
|
1956
|
-
function
|
|
2083
|
+
function Y(e) {
|
|
1957
2084
|
return new Date(e.length === 10 ? `${e}T00:00:00` : e);
|
|
1958
2085
|
}
|
|
1959
|
-
function
|
|
1960
|
-
const n =
|
|
1961
|
-
let
|
|
1962
|
-
const a =
|
|
1963
|
-
return (a < 0 || a === 0 &&
|
|
2086
|
+
function _t(e, t) {
|
|
2087
|
+
const n = Y(e), s = Y(t);
|
|
2088
|
+
let l = s.getFullYear() - n.getFullYear();
|
|
2089
|
+
const a = s.getMonth() - n.getMonth();
|
|
2090
|
+
return (a < 0 || a === 0 && s.getDate() < n.getDate()) && (l -= 1), l;
|
|
1964
2091
|
}
|
|
1965
|
-
function
|
|
1966
|
-
const n =
|
|
1967
|
-
return Math.floor((
|
|
2092
|
+
function Mt(e, t) {
|
|
2093
|
+
const n = Y(e), s = Y(t);
|
|
2094
|
+
return Math.floor((s.getTime() - n.getTime()) / 864e5);
|
|
1968
2095
|
}
|
|
1969
2096
|
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
|
-
|
|
2097
|
+
At as CONTRAST_THRESHOLDS,
|
|
2098
|
+
L as DEFAULT_LABELS,
|
|
2099
|
+
St as DesignSpace,
|
|
2100
|
+
wt as EN_US_LABELS,
|
|
2101
|
+
ht as Home,
|
|
2102
|
+
yt as KEYBOARD_LABELS,
|
|
2103
|
+
xt as NETWORK_LABELS,
|
|
2104
|
+
ie as NETWORK_STATES,
|
|
2105
|
+
g as PARAM,
|
|
2106
|
+
se as SCENARIO_STATUSES,
|
|
2107
|
+
Ae as SLOW_NETWORK_DELAY_MS,
|
|
2108
|
+
kt as STATUS_LABELS,
|
|
2109
|
+
Nt as STATUS_MEANING,
|
|
2110
|
+
Pe as SimulatedNetworkError,
|
|
2111
|
+
dt as Stage,
|
|
2112
|
+
ut as StageEmpty,
|
|
2113
|
+
we as TEXT_SCALES,
|
|
2114
|
+
lt as TabOrderOverlay,
|
|
2115
|
+
ce as VIEWPORTS,
|
|
2116
|
+
_t as ageInYears,
|
|
2117
|
+
Pt as applyOverrides,
|
|
2118
|
+
Lt as assertContrastPairs,
|
|
2119
|
+
$t as checkContrastPair,
|
|
2120
|
+
be as checkContrastPairs,
|
|
2121
|
+
Et as commitUrl,
|
|
2122
|
+
Ft as componentUrl,
|
|
2123
|
+
De as computeRole,
|
|
2124
|
+
Rt as contrastRatio,
|
|
2125
|
+
gt as createHttpAdapter,
|
|
2126
|
+
ge as createRegistry,
|
|
2127
|
+
Mt as daysBetween,
|
|
2128
|
+
Re as describeElement,
|
|
2129
|
+
Z as fixtureAdapter,
|
|
2130
|
+
Dt as flatten,
|
|
2131
|
+
Ot as formatIssues,
|
|
2132
|
+
ve as getDeployContext,
|
|
2133
|
+
It as hasErrors,
|
|
2134
|
+
Me as matchPath,
|
|
2135
|
+
Bt as parseColor,
|
|
2136
|
+
ke as parseControls,
|
|
2137
|
+
Y as parseIsoDate,
|
|
2138
|
+
Wt as readCssVariable,
|
|
2139
|
+
jt as relativeLuminance,
|
|
2140
|
+
X as resolveFixture,
|
|
2141
|
+
Ue as resolveLabels,
|
|
2142
|
+
Ce as resolveRoute,
|
|
2143
|
+
xe as resolveViewport,
|
|
2144
|
+
fe as scenarioUrl,
|
|
2145
|
+
q as serializeControls,
|
|
2146
|
+
Ht as serializeValue,
|
|
2147
|
+
He as shortSelector,
|
|
2148
|
+
Ke as tabbableElements,
|
|
2149
|
+
Ne as useDesignSpaceState,
|
|
2150
|
+
ze as useKeyboardMode,
|
|
2151
|
+
P as useLabels,
|
|
2152
|
+
$e as useScenarioData,
|
|
2153
|
+
me as validateProduct,
|
|
2154
|
+
Kt as validateScenario
|
|
2028
2155
|
};
|
|
2029
2156
|
//# sourceMappingURL=index.js.map
|