@leabankab/component-library 8.0.0 → 8.1.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 +107 -0
- package/dist/component-library.es.js +1496 -1231
- package/dist/component-library.es.js.map +1 -1
- package/dist/component-library.umd.js +2 -2
- package/dist/component-library.umd.js.map +1 -1
- package/dist/components/data-display/card.d.ts +25 -2
- package/dist/components/form/combo-field.d.ts +9 -1
- package/dist/components/form/email-input.d.ts +9 -1
- package/dist/components/form/field-parts.d.ts +16 -2
- package/dist/components/form/input.d.ts +7 -1
- package/dist/components/form/number-input-unit.d.ts +28 -0
- package/dist/components/form/number-input.d.ts +27 -5
- package/dist/components/form/phone-number-input/phone-number-input.d.ts +20 -1
- package/dist/cookie-consent-core-fntGUdFt.cjs +2 -0
- package/dist/cookie-consent-core-fntGUdFt.cjs.map +1 -0
- package/dist/{cookie-consent-core-mwVmy5nZ.mjs → cookie-consent-core-lX0QAEAo.mjs} +2 -1
- package/dist/cookie-consent-core-lX0QAEAo.mjs.map +1 -0
- package/dist/cookie-consent-react.cjs +1 -1
- package/dist/cookie-consent-react.mjs +1 -1
- package/dist/cookie-consent.cjs +1 -1
- package/dist/cookie-consent.css +1 -1
- package/dist/cookie-consent.mjs +1 -1
- package/dist/dev-panel/dev-panel.d.ts +52 -1
- package/dist/dev-panel/parts.d.ts +1 -1
- package/dist/dev-panel/use-dev-panel-labels.d.ts +1 -1
- package/dist/dev-panel.cjs +2 -2
- package/dist/dev-panel.cjs.map +1 -1
- package/dist/dev-panel.css +1 -1
- package/dist/dev-panel.mjs +384 -283
- package/dist/dev-panel.mjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/validation/email.d.ts +18 -0
- package/dist/validation/mobile-patterns.d.ts +10 -0
- package/dist/validation/national-id.d.ts +26 -0
- package/dist/validation/phone.d.ts +30 -0
- package/package.json +4 -2
- package/dist/cookie-consent-core-C4MP7GlV.cjs +0 -2
- package/dist/cookie-consent-core-C4MP7GlV.cjs.map +0 -1
- package/dist/cookie-consent-core-mwVmy5nZ.mjs.map +0 -1
package/dist/dev-panel.mjs
CHANGED
|
@@ -1,62 +1,65 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Braces as e, Check as t, ChevronRight as n, Copy as r,
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { createPortal as
|
|
2
|
+
import { Braces as e, Check as t, ChevronRight as n, Copy as r, EyeOff as i, Minus as a, Plus as o, RotateCcw as s, Upload as c, X as l } from "lucide-react";
|
|
3
|
+
import { Fragment as u, createContext as d, useCallback as f, useContext as p, useEffect as m, useId as h, useLayoutEffect as g, useMemo as _, useRef as v, useState as y } from "react";
|
|
4
|
+
import { Button as b, IconButton as x, Text as S, createTranslation as C } from "./component-library.es.js";
|
|
5
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
6
|
+
import { createPortal as D } from "react-dom";
|
|
7
7
|
import './dev-panel.css';//#region \0rolldown/runtime.js
|
|
8
|
-
var
|
|
8
|
+
var O = Object.defineProperty, k = (e, t) => {
|
|
9
9
|
let n = {};
|
|
10
|
-
for (var r in e)
|
|
10
|
+
for (var r in e) O(n, r, {
|
|
11
11
|
get: e[r],
|
|
12
12
|
enumerable: !0
|
|
13
13
|
});
|
|
14
|
-
return t ||
|
|
15
|
-
},
|
|
16
|
-
Badge: "
|
|
17
|
-
SectionLabel: "
|
|
18
|
-
SectionMeta: "
|
|
19
|
-
FlowLabel: "
|
|
20
|
-
CountryCode: "
|
|
21
|
-
StepLabel: "
|
|
22
|
-
PayloadCode: "
|
|
23
|
-
DevPanel: "
|
|
24
|
-
Header: "
|
|
25
|
-
HeaderTitle: "
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
14
|
+
return t || O(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
15
|
+
}, A = {
|
|
16
|
+
Badge: "_Badge_1xkno_23",
|
|
17
|
+
SectionLabel: "_SectionLabel_1xkno_24",
|
|
18
|
+
SectionMeta: "_SectionMeta_1xkno_25",
|
|
19
|
+
FlowLabel: "_FlowLabel_1xkno_26",
|
|
20
|
+
CountryCode: "_CountryCode_1xkno_27",
|
|
21
|
+
StepLabel: "_StepLabel_1xkno_28",
|
|
22
|
+
PayloadCode: "_PayloadCode_1xkno_29",
|
|
23
|
+
DevPanel: "_DevPanel_1xkno_38",
|
|
24
|
+
Header: "_Header_1xkno_53",
|
|
25
|
+
HeaderTitle: "_HeaderTitle_1xkno_65",
|
|
26
|
+
HeaderActions: "_HeaderActions_1xkno_75",
|
|
27
|
+
HeaderDot: "_HeaderDot_1xkno_82",
|
|
28
|
+
Handle: "_Handle_1xkno_112",
|
|
29
|
+
HideButton: "_HideButton_1xkno_191",
|
|
30
|
+
Body: "_Body_1xkno_197",
|
|
31
|
+
Section: "_Section_1xkno_24",
|
|
32
|
+
SectionHeaderRow: "_SectionHeaderRow_1xkno_215",
|
|
33
|
+
Flow: "_Flow_1xkno_26",
|
|
34
|
+
FlowText: "_FlowText_1xkno_257",
|
|
35
|
+
FlowSeparator: "_FlowSeparator_1xkno_282",
|
|
36
|
+
SegmentedGroup: "_SegmentedGroup_1xkno_295",
|
|
37
|
+
SegmentedOption: "_SegmentedOption_1xkno_316",
|
|
38
|
+
ChipGroup: "_ChipGroup_1xkno_368",
|
|
39
|
+
Chip: "_Chip_1xkno_368",
|
|
40
|
+
ChipDot: "_ChipDot_1xkno_407",
|
|
41
|
+
StepGrid: "_StepGrid_1xkno_431",
|
|
42
|
+
StepButton: "_StepButton_1xkno_437",
|
|
43
|
+
StepCircle: "_StepCircle_1xkno_461",
|
|
44
|
+
StepFlagDot: "_StepFlagDot_1xkno_503",
|
|
45
|
+
StepStateName: "_StepStateName_1xkno_534",
|
|
46
|
+
StatusGrid: "_StatusGrid_1xkno_543",
|
|
47
|
+
StatusCard: "_StatusCard_1xkno_550",
|
|
48
|
+
StatusDot: "_StatusDot_1xkno_609",
|
|
49
|
+
PayloadToggle: "_PayloadToggle_1xkno_621",
|
|
50
|
+
PayloadToggleLabel: "_PayloadToggleLabel_1xkno_641",
|
|
51
|
+
PayloadChevron: "_PayloadChevron_1xkno_648",
|
|
52
|
+
PayloadPanel: "_PayloadPanel_1xkno_672",
|
|
53
|
+
PayloadHeader: "_PayloadHeader_1xkno_680",
|
|
54
|
+
Token: "_Token_1xkno_715",
|
|
55
|
+
Flyout: "_Flyout_1xkno_749",
|
|
56
|
+
FlyoutTitle: "_FlyoutTitle_1xkno_763",
|
|
57
|
+
FlyoutFooter: "_FlyoutFooter_1xkno_777",
|
|
58
|
+
FlyoutCopyButton: "_FlyoutCopyButton_1xkno_784",
|
|
59
|
+
Footer: "_Footer_1xkno_824",
|
|
60
|
+
OnDark: "_OnDark_1xkno_852",
|
|
61
|
+
VisuallyHidden: "_VisuallyHidden_1xkno_863"
|
|
62
|
+
}, j = C({
|
|
60
63
|
copy: {
|
|
61
64
|
no: "Kopier",
|
|
62
65
|
se: "Kopiera",
|
|
@@ -93,6 +96,18 @@ var D = Object.defineProperty, O = (e, t) => {
|
|
|
93
96
|
fi: "Laajenna",
|
|
94
97
|
es: "Expandir"
|
|
95
98
|
},
|
|
99
|
+
hide: {
|
|
100
|
+
no: "Skjul",
|
|
101
|
+
se: "Dölj",
|
|
102
|
+
fi: "Piilota",
|
|
103
|
+
es: "Ocultar"
|
|
104
|
+
},
|
|
105
|
+
show: {
|
|
106
|
+
no: "Vis",
|
|
107
|
+
se: "Visa",
|
|
108
|
+
fi: "Näytä",
|
|
109
|
+
es: "Mostrar"
|
|
110
|
+
},
|
|
96
111
|
step: {
|
|
97
112
|
no: "Steg",
|
|
98
113
|
se: "Steg",
|
|
@@ -123,82 +138,167 @@ var D = Object.defineProperty, O = (e, t) => {
|
|
|
123
138
|
fi: "vaatii huomiota",
|
|
124
139
|
es: "requiere atención"
|
|
125
140
|
}
|
|
126
|
-
}),
|
|
127
|
-
function
|
|
128
|
-
return
|
|
141
|
+
}), M = (...e) => e.filter(Boolean).join(" "), N = d(void 0);
|
|
142
|
+
function P() {
|
|
143
|
+
return p(N);
|
|
129
144
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
145
|
+
var F = d(null), I = "(max-width: 599.95px)", L = () => typeof navigator < "u" && /mac|iphone|ipad/i.test(navigator.platform || navigator.userAgent);
|
|
146
|
+
function R(e, t) {
|
|
147
|
+
let n = t.split("+").map((e) => e.trim().toLowerCase()), r = n.pop();
|
|
148
|
+
if (!r) return !1;
|
|
149
|
+
let i = n.includes("mod"), a = {
|
|
150
|
+
ctrl: n.includes("ctrl") || i && !L(),
|
|
151
|
+
meta: n.includes("meta") || i && L(),
|
|
152
|
+
alt: n.includes("alt"),
|
|
153
|
+
shift: n.includes("shift")
|
|
154
|
+
};
|
|
155
|
+
return e.ctrlKey !== a.ctrl || e.metaKey !== a.meta || e.altKey !== a.alt || e.shiftKey !== a.shift ? !1 : e.key.toLowerCase() === r || e.code.toLowerCase() === `key${r}` || e.code.toLowerCase() === `digit${r}`;
|
|
156
|
+
}
|
|
157
|
+
function z({ title: e = "Dev controls", badge: t, showStatusDot: n = !0, minimisable: r = !0, minimised: s, defaultMinimised: c, onMinimisedChange: l, minimiseLabel: u, expandLabel: d, hidden: f, defaultHidden: p, onHiddenChange: g, hideable: _ = f !== void 0 || p !== void 0, shortcut: b = "Mod+Shift+D", handle: S, hideLabel: C, children: w, className: D, style: O }) {
|
|
158
|
+
let k = j(), N = s !== void 0, [P, L] = y(c ?? !1), z = N ? s : P, [B, H] = y(p ?? !1), U = _ && (f ?? B), W = v(null), G = v(null), K = v(null), q = v(null), J = () => {
|
|
159
|
+
let e = !z;
|
|
160
|
+
N || L(e), l?.(e);
|
|
161
|
+
}, Y = (e) => {
|
|
162
|
+
f === void 0 && H(e), g?.(e);
|
|
163
|
+
};
|
|
164
|
+
m(() => {
|
|
165
|
+
_ && !N && c === void 0 && typeof window < "u" && window.matchMedia?.(I).matches && L(!0);
|
|
166
|
+
}, []), m(() => {
|
|
167
|
+
let e = q.current;
|
|
168
|
+
q.current = null, e === "handle" && G.current?.focus(), e === "panel" && K.current?.focus();
|
|
169
|
+
});
|
|
170
|
+
let X = v({
|
|
171
|
+
isHidden: U,
|
|
172
|
+
setHiddenState: Y
|
|
173
|
+
});
|
|
174
|
+
X.current = {
|
|
175
|
+
isHidden: U,
|
|
176
|
+
setHiddenState: Y
|
|
177
|
+
}, m(() => {
|
|
178
|
+
if (!_ || b === !1) return;
|
|
179
|
+
let e = (e) => {
|
|
180
|
+
if (e.repeat || !R(e, b)) return;
|
|
181
|
+
e.preventDefault();
|
|
182
|
+
let { isHidden: t, setHiddenState: n } = X.current, r = document.activeElement;
|
|
183
|
+
!t && W.current?.contains(r) && (q.current = "handle"), t && r != null && r === G.current && (q.current = "panel"), n(!t);
|
|
184
|
+
};
|
|
185
|
+
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
186
|
+
}, [_, b]);
|
|
187
|
+
let Z = h();
|
|
188
|
+
return U ? /* @__PURE__ */ T(F.Provider, {
|
|
189
|
+
value: {
|
|
190
|
+
show: () => {
|
|
191
|
+
q.current = "panel", Y(!1);
|
|
192
|
+
},
|
|
193
|
+
title: e,
|
|
194
|
+
handleRef: G
|
|
195
|
+
},
|
|
196
|
+
children: S ?? /* @__PURE__ */ T(V, {})
|
|
197
|
+
}) : /* @__PURE__ */ E("div", {
|
|
198
|
+
ref: W,
|
|
136
199
|
"data-dev-panel-root": "",
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
200
|
+
"data-hideable": _ ? "" : void 0,
|
|
201
|
+
"data-minimised": z ? "" : void 0,
|
|
202
|
+
className: M(A.DevPanel, D),
|
|
203
|
+
style: O,
|
|
204
|
+
children: [/* @__PURE__ */ E("header", {
|
|
205
|
+
className: A.Header,
|
|
206
|
+
children: [/* @__PURE__ */ E("span", {
|
|
207
|
+
className: A.HeaderTitle,
|
|
143
208
|
children: [
|
|
144
|
-
n && /* @__PURE__ */
|
|
145
|
-
className:
|
|
209
|
+
n && /* @__PURE__ */ T("span", {
|
|
210
|
+
className: A.HeaderDot,
|
|
146
211
|
"aria-hidden": !0
|
|
147
212
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
t != null && /* @__PURE__ */
|
|
150
|
-
className:
|
|
213
|
+
/* @__PURE__ */ T("span", { children: e }),
|
|
214
|
+
t != null && /* @__PURE__ */ T("span", {
|
|
215
|
+
className: A.Badge,
|
|
151
216
|
children: t
|
|
152
217
|
})
|
|
153
218
|
]
|
|
154
|
-
}),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
"
|
|
165
|
-
|
|
219
|
+
}), /* @__PURE__ */ E("span", {
|
|
220
|
+
className: A.HeaderActions,
|
|
221
|
+
children: [_ && /* @__PURE__ */ T(x, {
|
|
222
|
+
ref: K,
|
|
223
|
+
className: A.HideButton,
|
|
224
|
+
"aria-label": C ?? k.hide,
|
|
225
|
+
onClick: () => {
|
|
226
|
+
q.current = "handle", Y(!0);
|
|
227
|
+
},
|
|
228
|
+
variant: "outline",
|
|
229
|
+
color: "secondary",
|
|
230
|
+
size: "sm",
|
|
231
|
+
children: /* @__PURE__ */ T(i, {
|
|
232
|
+
size: 18,
|
|
233
|
+
"aria-hidden": !0
|
|
234
|
+
})
|
|
235
|
+
}), r && /* @__PURE__ */ T(x, {
|
|
236
|
+
"aria-label": z ? d ?? k.expand : u ?? k.minimise,
|
|
237
|
+
"aria-expanded": !z,
|
|
238
|
+
"aria-controls": Z,
|
|
239
|
+
onClick: J,
|
|
240
|
+
variant: "outline",
|
|
241
|
+
color: "secondary",
|
|
242
|
+
size: "sm",
|
|
243
|
+
children: T(z ? o : a, {
|
|
244
|
+
size: 18,
|
|
245
|
+
"aria-hidden": !0
|
|
246
|
+
})
|
|
247
|
+
})]
|
|
166
248
|
})]
|
|
167
|
-
}), !
|
|
168
|
-
id:
|
|
169
|
-
className:
|
|
170
|
-
children:
|
|
249
|
+
}), !z && /* @__PURE__ */ T("div", {
|
|
250
|
+
id: Z,
|
|
251
|
+
className: A.Body,
|
|
252
|
+
children: w
|
|
171
253
|
})]
|
|
172
254
|
});
|
|
173
255
|
}
|
|
174
|
-
function
|
|
175
|
-
let a =
|
|
176
|
-
return /* @__PURE__ */
|
|
256
|
+
function B({ label: e, meta: t, children: n, className: r, style: i }) {
|
|
257
|
+
let a = h();
|
|
258
|
+
return /* @__PURE__ */ E("section", {
|
|
177
259
|
"aria-labelledby": a,
|
|
178
|
-
className:
|
|
260
|
+
className: M(A.Section, r),
|
|
179
261
|
style: i,
|
|
180
|
-
children: [/* @__PURE__ */
|
|
181
|
-
className:
|
|
182
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ E("div", {
|
|
263
|
+
className: A.SectionHeaderRow,
|
|
264
|
+
children: [/* @__PURE__ */ T("span", {
|
|
183
265
|
id: a,
|
|
184
|
-
className:
|
|
266
|
+
className: A.SectionLabel,
|
|
185
267
|
children: e
|
|
186
|
-
}), t != null && /* @__PURE__ */
|
|
187
|
-
className:
|
|
268
|
+
}), t != null && /* @__PURE__ */ T("span", {
|
|
269
|
+
className: A.SectionMeta,
|
|
188
270
|
children: t
|
|
189
271
|
})]
|
|
190
|
-
}), /* @__PURE__ */
|
|
272
|
+
}), /* @__PURE__ */ T(N.Provider, {
|
|
191
273
|
value: a,
|
|
192
274
|
children: n
|
|
193
275
|
})]
|
|
194
276
|
});
|
|
195
277
|
}
|
|
278
|
+
function V({ side: e = "right", label: t, className: n, style: r }) {
|
|
279
|
+
let i = j(), a = p(F);
|
|
280
|
+
if (!a) return null;
|
|
281
|
+
let o = t ?? a.title;
|
|
282
|
+
return /* @__PURE__ */ E("button", {
|
|
283
|
+
ref: a.handleRef,
|
|
284
|
+
type: "button",
|
|
285
|
+
className: M(A.Handle, n),
|
|
286
|
+
style: r,
|
|
287
|
+
"data-side": e,
|
|
288
|
+
"aria-label": typeof o == "string" ? `${i.show} ${o}` : void 0,
|
|
289
|
+
onClick: a.show,
|
|
290
|
+
children: [/* @__PURE__ */ T("span", {
|
|
291
|
+
className: A.HeaderDot,
|
|
292
|
+
"aria-hidden": !0
|
|
293
|
+
}), /* @__PURE__ */ T("span", { children: o })]
|
|
294
|
+
});
|
|
295
|
+
}
|
|
196
296
|
//#endregion
|
|
197
297
|
//#region src/dev-panel/use-roving-radio.ts
|
|
198
|
-
function
|
|
199
|
-
let i =
|
|
298
|
+
function H({ values: e, selected: t, onSelect: n, isDisabled: r }) {
|
|
299
|
+
let i = v([]), a = f((t) => r?.(e[t], t) ?? !1, [r, e]), o = e.findIndex((e) => e === t), s = e.findIndex((e, t) => !a(t)), c = o >= 0 && !a(o) ? o : s, l = f((t) => {
|
|
200
300
|
i.current[t]?.focus(), n(e[t]);
|
|
201
|
-
}, [n, e]), u =
|
|
301
|
+
}, [n, e]), u = f((t, n) => {
|
|
202
302
|
let r = e.length;
|
|
203
303
|
for (let e = 1; e <= r; e += 1) {
|
|
204
304
|
let i = (t + n * e + r * e) % r;
|
|
@@ -206,7 +306,7 @@ function I({ values: e, selected: t, onSelect: n, isDisabled: r }) {
|
|
|
206
306
|
}
|
|
207
307
|
return t;
|
|
208
308
|
}, [a, e.length]);
|
|
209
|
-
return { getItemProps:
|
|
309
|
+
return { getItemProps: f((r) => {
|
|
210
310
|
let o = e[r], s = a(r);
|
|
211
311
|
return {
|
|
212
312
|
ref: (e) => {
|
|
@@ -252,49 +352,49 @@ function I({ values: e, selected: t, onSelect: n, isDisabled: r }) {
|
|
|
252
352
|
}
|
|
253
353
|
//#endregion
|
|
254
354
|
//#region src/dev-panel/segmented-control.tsx
|
|
255
|
-
function
|
|
256
|
-
let o =
|
|
355
|
+
function U({ value: e, onChange: t, options: n, variant: r = "pill", "aria-label": i, "aria-labelledby": a }) {
|
|
356
|
+
let o = P(), s = a ?? (i ? void 0 : o), { getItemProps: c } = H({
|
|
257
357
|
values: n.map((e) => e.value),
|
|
258
358
|
selected: e,
|
|
259
359
|
onSelect: t,
|
|
260
360
|
isDisabled: (e, t) => n[t]?.disabled ?? !1
|
|
261
361
|
}), l = r === "chip";
|
|
262
|
-
return /* @__PURE__ */
|
|
362
|
+
return /* @__PURE__ */ T("div", {
|
|
263
363
|
role: "radiogroup",
|
|
264
364
|
"aria-label": i,
|
|
265
365
|
"aria-labelledby": s,
|
|
266
|
-
className: l ?
|
|
366
|
+
className: l ? A.ChipGroup : A.SegmentedGroup,
|
|
267
367
|
children: n.map((e, t) => {
|
|
268
368
|
let { onKeyDown: n, ...r } = c(t);
|
|
269
|
-
return /* @__PURE__ */
|
|
369
|
+
return /* @__PURE__ */ E("button", {
|
|
270
370
|
type: "button",
|
|
271
371
|
"data-disabled": e.disabled ? "" : void 0,
|
|
272
372
|
onKeyDown: n,
|
|
273
373
|
...r,
|
|
274
|
-
className: l ?
|
|
275
|
-
children: [l ? /* @__PURE__ */
|
|
276
|
-
className:
|
|
374
|
+
className: l ? A.Chip : A.SegmentedOption,
|
|
375
|
+
children: [l ? /* @__PURE__ */ T("span", {
|
|
376
|
+
className: A.ChipDot,
|
|
277
377
|
"aria-hidden": !0
|
|
278
|
-
}) : e.icon, /* @__PURE__ */
|
|
378
|
+
}) : e.icon, /* @__PURE__ */ T("span", { children: e.label })]
|
|
279
379
|
}, e.value);
|
|
280
380
|
})
|
|
281
381
|
});
|
|
282
382
|
}
|
|
283
383
|
//#endregion
|
|
284
384
|
//#region src/dev-panel/dev-panel-country.tsx
|
|
285
|
-
function
|
|
385
|
+
function W({ value: e, onChange: t, options: n, label: r = "Country" }) {
|
|
286
386
|
let i = n.map((e) => ({
|
|
287
387
|
value: e.value,
|
|
288
388
|
disabled: e.disabled,
|
|
289
389
|
label: e.label,
|
|
290
|
-
icon: e.code == null ? void 0 : /* @__PURE__ */
|
|
291
|
-
className:
|
|
390
|
+
icon: e.code == null ? void 0 : /* @__PURE__ */ T("span", {
|
|
391
|
+
className: A.CountryCode,
|
|
292
392
|
children: e.code
|
|
293
393
|
})
|
|
294
394
|
}));
|
|
295
|
-
return /* @__PURE__ */
|
|
395
|
+
return /* @__PURE__ */ T(B, {
|
|
296
396
|
label: r,
|
|
297
|
-
children: /* @__PURE__ */
|
|
397
|
+
children: /* @__PURE__ */ T(U, {
|
|
298
398
|
value: e,
|
|
299
399
|
onChange: t,
|
|
300
400
|
options: i
|
|
@@ -303,15 +403,15 @@ function R({ value: e, onChange: t, options: n, label: r = "Country" }) {
|
|
|
303
403
|
}
|
|
304
404
|
//#endregion
|
|
305
405
|
//#region src/dev-panel/dev-panel-variant.tsx
|
|
306
|
-
function
|
|
406
|
+
function G({ value: e, onChange: t, options: n, label: r = "Variant" }) {
|
|
307
407
|
let i = n.map((e) => ({
|
|
308
408
|
value: e.value,
|
|
309
409
|
label: e.label,
|
|
310
410
|
disabled: e.disabled
|
|
311
411
|
}));
|
|
312
|
-
return /* @__PURE__ */
|
|
412
|
+
return /* @__PURE__ */ T(B, {
|
|
313
413
|
label: r,
|
|
314
|
-
children: /* @__PURE__ */
|
|
414
|
+
children: /* @__PURE__ */ T(U, {
|
|
315
415
|
value: e,
|
|
316
416
|
onChange: t,
|
|
317
417
|
options: i
|
|
@@ -320,15 +420,15 @@ function z({ value: e, onChange: t, options: n, label: r = "Variant" }) {
|
|
|
320
420
|
}
|
|
321
421
|
//#endregion
|
|
322
422
|
//#region src/dev-panel/dev-panel-step-state.tsx
|
|
323
|
-
function
|
|
423
|
+
function K({ value: e, onChange: t, options: n, label: r = "Step state", stepLabel: i, variationsLabel: a = "Variations for" }) {
|
|
324
424
|
let o = n.map((e) => ({
|
|
325
425
|
value: e.value,
|
|
326
426
|
label: e.label,
|
|
327
427
|
disabled: e.disabled
|
|
328
428
|
}));
|
|
329
|
-
return /* @__PURE__ */
|
|
429
|
+
return /* @__PURE__ */ E(B, {
|
|
330
430
|
label: r,
|
|
331
|
-
children: [i != null && /* @__PURE__ */
|
|
431
|
+
children: [i != null && /* @__PURE__ */ E(S, {
|
|
332
432
|
textStyle: "body-sm",
|
|
333
433
|
style: {
|
|
334
434
|
color: "var(--lea-color-neutral-600)",
|
|
@@ -337,12 +437,12 @@ function B({ value: e, onChange: t, options: n, label: r = "Step state", stepLab
|
|
|
337
437
|
children: [
|
|
338
438
|
a,
|
|
339
439
|
" ",
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
className:
|
|
440
|
+
/* @__PURE__ */ T("span", {
|
|
441
|
+
className: A.StepStateName,
|
|
342
442
|
children: i
|
|
343
443
|
})
|
|
344
444
|
]
|
|
345
|
-
}), /* @__PURE__ */
|
|
445
|
+
}), /* @__PURE__ */ T(U, {
|
|
346
446
|
value: e,
|
|
347
447
|
onChange: t,
|
|
348
448
|
options: o,
|
|
@@ -352,19 +452,19 @@ function B({ value: e, onChange: t, options: n, label: r = "Step state", stepLab
|
|
|
352
452
|
}
|
|
353
453
|
//#endregion
|
|
354
454
|
//#region src/dev-panel/dev-panel-steps.tsx
|
|
355
|
-
var
|
|
455
|
+
var q = (e, t) => {
|
|
356
456
|
switch (e) {
|
|
357
457
|
case "complete": return t.statusCompleted;
|
|
358
458
|
case "current": return t.statusCurrent;
|
|
359
459
|
default: return t.statusUpcoming;
|
|
360
460
|
}
|
|
361
461
|
};
|
|
362
|
-
function
|
|
363
|
-
let o =
|
|
364
|
-
return /* @__PURE__ */
|
|
462
|
+
function J({ steps: e, currentStep: t, onStepSelect: n, label: r = "Jump to step", showCount: i = !0, columns: a = 4 }) {
|
|
463
|
+
let o = j(), s = e.length, c = i && t != null ? `${t} / ${s}` : void 0;
|
|
464
|
+
return /* @__PURE__ */ T(B, {
|
|
365
465
|
label: r,
|
|
366
466
|
meta: c,
|
|
367
|
-
children: /* @__PURE__ */
|
|
467
|
+
children: /* @__PURE__ */ T(Y, {
|
|
368
468
|
steps: e,
|
|
369
469
|
currentStep: t,
|
|
370
470
|
onStepSelect: n,
|
|
@@ -373,49 +473,49 @@ function H({ steps: e, currentStep: t, onStepSelect: n, label: r = "Jump to step
|
|
|
373
473
|
})
|
|
374
474
|
});
|
|
375
475
|
}
|
|
376
|
-
function
|
|
377
|
-
let o =
|
|
378
|
-
return /* @__PURE__ */
|
|
476
|
+
function Y({ steps: e, currentStep: n, onStepSelect: r, columns: i, t: a }) {
|
|
477
|
+
let o = P();
|
|
478
|
+
return /* @__PURE__ */ T("div", {
|
|
379
479
|
role: "group",
|
|
380
480
|
"aria-labelledby": o,
|
|
381
|
-
className:
|
|
481
|
+
className: A.StepGrid,
|
|
382
482
|
style: { "--_columns": i },
|
|
383
483
|
children: e.map((e, i) => {
|
|
384
484
|
let o = i + 1, s = e.status ?? (n == null ? "upcoming" : o < n ? "complete" : o === n ? "current" : "upcoming"), c = s === "current", l = s === "complete";
|
|
385
|
-
return /* @__PURE__ */
|
|
485
|
+
return /* @__PURE__ */ E("button", {
|
|
386
486
|
type: "button",
|
|
387
487
|
"aria-current": c ? "step" : void 0,
|
|
388
488
|
"data-state": s,
|
|
389
489
|
"data-disabled": e.disabled ? "" : void 0,
|
|
390
490
|
disabled: e.disabled,
|
|
391
491
|
onClick: () => r?.(o, e),
|
|
392
|
-
className:
|
|
492
|
+
className: A.StepButton,
|
|
393
493
|
children: [
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
className:
|
|
494
|
+
/* @__PURE__ */ E("span", {
|
|
495
|
+
className: A.StepCircle,
|
|
396
496
|
children: [
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
className:
|
|
497
|
+
/* @__PURE__ */ T("span", {
|
|
498
|
+
className: A.VisuallyHidden,
|
|
399
499
|
children: l ? `${a.step} ${o}` : `${a.step} `
|
|
400
500
|
}),
|
|
401
|
-
l ? /* @__PURE__ */
|
|
501
|
+
l ? /* @__PURE__ */ T(t, {
|
|
402
502
|
size: 18,
|
|
403
503
|
"aria-hidden": !0
|
|
404
504
|
}) : o,
|
|
405
|
-
e.flagged && /* @__PURE__ */
|
|
406
|
-
className:
|
|
505
|
+
e.flagged && /* @__PURE__ */ T("span", {
|
|
506
|
+
className: A.StepFlagDot,
|
|
407
507
|
"aria-hidden": !0
|
|
408
508
|
})
|
|
409
509
|
]
|
|
410
510
|
}),
|
|
411
511
|
" ",
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
-
className:
|
|
512
|
+
/* @__PURE__ */ T("span", {
|
|
513
|
+
className: A.StepLabel,
|
|
414
514
|
children: e.label
|
|
415
515
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
417
|
-
className:
|
|
418
|
-
children: `(${
|
|
516
|
+
/* @__PURE__ */ T("span", {
|
|
517
|
+
className: A.VisuallyHidden,
|
|
518
|
+
children: `(${q(s, a)}${e.flagged ? `, ${a.needsAttention}` : ""})`
|
|
419
519
|
})
|
|
420
520
|
]
|
|
421
521
|
}, o);
|
|
@@ -424,98 +524,98 @@ function U({ steps: e, currentStep: n, onStepSelect: r, columns: i, t: a }) {
|
|
|
424
524
|
}
|
|
425
525
|
//#endregion
|
|
426
526
|
//#region src/dev-panel/dev-panel-status.tsx
|
|
427
|
-
function
|
|
428
|
-
return /* @__PURE__ */
|
|
527
|
+
function X({ value: e, onChange: t, options: n, label: r = "Application status" }) {
|
|
528
|
+
return /* @__PURE__ */ T(B, {
|
|
429
529
|
label: r,
|
|
430
|
-
children: /* @__PURE__ */
|
|
530
|
+
children: /* @__PURE__ */ T(Z, {
|
|
431
531
|
value: e,
|
|
432
532
|
onChange: t,
|
|
433
533
|
options: n
|
|
434
534
|
})
|
|
435
535
|
});
|
|
436
536
|
}
|
|
437
|
-
function
|
|
438
|
-
let r =
|
|
537
|
+
function Z({ value: e, onChange: t, options: n }) {
|
|
538
|
+
let r = P(), { getItemProps: i } = H({
|
|
439
539
|
values: n.map((e) => e.value),
|
|
440
540
|
selected: e,
|
|
441
541
|
onSelect: t,
|
|
442
542
|
isDisabled: (e, t) => n[t]?.disabled ?? !1
|
|
443
543
|
});
|
|
444
|
-
return /* @__PURE__ */
|
|
544
|
+
return /* @__PURE__ */ T("div", {
|
|
445
545
|
role: "radiogroup",
|
|
446
546
|
"aria-labelledby": r,
|
|
447
|
-
className:
|
|
547
|
+
className: A.StatusGrid,
|
|
448
548
|
children: n.map((e, t) => {
|
|
449
549
|
let { onKeyDown: n, ...r } = i(t);
|
|
450
|
-
return /* @__PURE__ */
|
|
550
|
+
return /* @__PURE__ */ E("button", {
|
|
451
551
|
type: "button",
|
|
452
552
|
"data-color": e.color ?? "neutral",
|
|
453
553
|
"data-disabled": e.disabled ? "" : void 0,
|
|
454
554
|
onKeyDown: n,
|
|
455
555
|
...r,
|
|
456
|
-
className:
|
|
457
|
-
children: [/* @__PURE__ */
|
|
458
|
-
className:
|
|
556
|
+
className: A.StatusCard,
|
|
557
|
+
children: [/* @__PURE__ */ T("span", {
|
|
558
|
+
className: A.StatusDot,
|
|
459
559
|
"aria-hidden": !0
|
|
460
|
-
}), /* @__PURE__ */
|
|
560
|
+
}), /* @__PURE__ */ T("span", { children: e.label })]
|
|
461
561
|
}, e.value);
|
|
462
562
|
})
|
|
463
563
|
});
|
|
464
564
|
}
|
|
465
565
|
//#endregion
|
|
466
566
|
//#region src/dev-panel/use-copy.ts
|
|
467
|
-
function
|
|
468
|
-
let [e, t] =
|
|
567
|
+
function Q() {
|
|
568
|
+
let [e, t] = y(!1), n = v(void 0), r = f(async (e) => {
|
|
469
569
|
try {
|
|
470
570
|
await navigator.clipboard?.writeText(e);
|
|
471
571
|
} catch {}
|
|
472
572
|
t(!0), clearTimeout(n.current), n.current = setTimeout(() => t(!1), 2e3);
|
|
473
573
|
}, []);
|
|
474
|
-
return
|
|
574
|
+
return m(() => () => clearTimeout(n.current), []), {
|
|
475
575
|
copied: e,
|
|
476
576
|
copy: r
|
|
477
577
|
};
|
|
478
578
|
}
|
|
479
579
|
//#endregion
|
|
480
580
|
//#region src/dev-panel/dev-panel-flow.tsx
|
|
481
|
-
var
|
|
482
|
-
function
|
|
483
|
-
let d =
|
|
581
|
+
var ee = (e) => typeof e == "string" || typeof e == "number" ? String(e) : null;
|
|
582
|
+
function te({ flowId: e, process: n, variant: i, label: a = "Flow", showCopy: o = !0, copyValue: s, copyLabel: c, onCopy: l }) {
|
|
583
|
+
let d = j(), { copied: f, copy: p } = Q(), m = [
|
|
484
584
|
e,
|
|
485
585
|
n,
|
|
486
586
|
i
|
|
487
|
-
].filter((e) => e != null), h = m.map(
|
|
488
|
-
return /* @__PURE__ */
|
|
489
|
-
className:
|
|
587
|
+
].filter((e) => e != null), h = m.map(ee).filter((e) => e != null).join(" · "), g = s ?? h;
|
|
588
|
+
return /* @__PURE__ */ E("div", {
|
|
589
|
+
className: A.Flow,
|
|
490
590
|
children: [
|
|
491
|
-
/* @__PURE__ */
|
|
492
|
-
className:
|
|
493
|
-
children: [/* @__PURE__ */
|
|
494
|
-
className:
|
|
591
|
+
/* @__PURE__ */ E("div", {
|
|
592
|
+
className: A.FlowText,
|
|
593
|
+
children: [/* @__PURE__ */ T("span", {
|
|
594
|
+
className: A.FlowLabel,
|
|
495
595
|
children: a
|
|
496
|
-
}), /* @__PURE__ */
|
|
596
|
+
}), /* @__PURE__ */ T("span", { children: m.map((e, t) => /* @__PURE__ */ E(u, { children: [t > 0 && /* @__PURE__ */ T("span", {
|
|
497
597
|
"aria-hidden": !0,
|
|
498
|
-
className:
|
|
598
|
+
className: A.FlowSeparator,
|
|
499
599
|
children: "·"
|
|
500
600
|
}), e] }, t)) })]
|
|
501
601
|
}),
|
|
502
|
-
o && /* @__PURE__ */
|
|
602
|
+
o && /* @__PURE__ */ T(x, {
|
|
503
603
|
"aria-label": c ?? d.copy,
|
|
504
604
|
onClick: async () => {
|
|
505
|
-
await p(g),
|
|
605
|
+
await p(g), l?.();
|
|
506
606
|
},
|
|
507
607
|
variant: "outline",
|
|
508
608
|
color: "secondary",
|
|
509
609
|
size: "sm",
|
|
510
|
-
children:
|
|
610
|
+
children: T(f ? t : r, {
|
|
511
611
|
size: 16,
|
|
512
612
|
"aria-hidden": !0
|
|
513
613
|
})
|
|
514
614
|
}),
|
|
515
|
-
/* @__PURE__ */
|
|
615
|
+
/* @__PURE__ */ T("span", {
|
|
516
616
|
role: "status",
|
|
517
617
|
"aria-live": "polite",
|
|
518
|
-
className:
|
|
618
|
+
className: A.VisuallyHidden,
|
|
519
619
|
children: f ? d.copied : ""
|
|
520
620
|
})
|
|
521
621
|
]
|
|
@@ -523,18 +623,18 @@ function J({ flowId: e, process: n, variant: i, label: a = "Flow", showCopy: o =
|
|
|
523
623
|
}
|
|
524
624
|
//#endregion
|
|
525
625
|
//#region src/dev-panel/json-highlight.tsx
|
|
526
|
-
var
|
|
527
|
-
function
|
|
626
|
+
var ne = /"(?:\\.|[^"\\])*"|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|\b(?:true|false|null)\b/g, re = (e) => e === " " || e === " " || e === "\n" || e === "\r";
|
|
627
|
+
function ie(e, t, n) {
|
|
528
628
|
if (e[0] === "\"") {
|
|
529
629
|
let e = n;
|
|
530
|
-
for (; e < t.length &&
|
|
630
|
+
for (; e < t.length && re(t[e]);) e += 1;
|
|
531
631
|
return t[e] === ":" ? "key" : "string";
|
|
532
632
|
}
|
|
533
633
|
return e === "true" || e === "false" ? "boolean" : e === "null" ? "null" : "number";
|
|
534
634
|
}
|
|
535
|
-
function
|
|
635
|
+
function ae(e) {
|
|
536
636
|
let t = [], n = 0;
|
|
537
|
-
for (let r of e.matchAll(
|
|
637
|
+
for (let r of e.matchAll(ne)) {
|
|
538
638
|
let i = r.index ?? 0;
|
|
539
639
|
i > n && t.push({
|
|
540
640
|
type: "punctuation",
|
|
@@ -542,7 +642,7 @@ function ee(e) {
|
|
|
542
642
|
});
|
|
543
643
|
let a = r[0];
|
|
544
644
|
t.push({
|
|
545
|
-
type:
|
|
645
|
+
type: ie(a, e, i + a.length),
|
|
546
646
|
value: a
|
|
547
647
|
}), n = i + a.length;
|
|
548
648
|
}
|
|
@@ -551,7 +651,7 @@ function ee(e) {
|
|
|
551
651
|
value: e.slice(n)
|
|
552
652
|
}), t;
|
|
553
653
|
}
|
|
554
|
-
function
|
|
654
|
+
function oe(e) {
|
|
555
655
|
if (typeof e != "string") return e != null;
|
|
556
656
|
let t = e.trim();
|
|
557
657
|
if (!t) return !1;
|
|
@@ -561,37 +661,37 @@ function te(e) {
|
|
|
561
661
|
return !1;
|
|
562
662
|
}
|
|
563
663
|
}
|
|
564
|
-
function
|
|
565
|
-
let t =
|
|
566
|
-
return /* @__PURE__ */ w
|
|
567
|
-
className:
|
|
664
|
+
function se({ code: e }) {
|
|
665
|
+
let t = _(() => ae(e), [e]);
|
|
666
|
+
return /* @__PURE__ */ T(w, { children: t.map((e, t) => /* @__PURE__ */ T("span", {
|
|
667
|
+
className: A.Token,
|
|
568
668
|
"data-token": e.type,
|
|
569
669
|
children: e.value
|
|
570
670
|
}, t)) });
|
|
571
671
|
}
|
|
572
672
|
//#endregion
|
|
573
673
|
//#region src/dev-panel/dev-panel-payload.tsx
|
|
574
|
-
var
|
|
674
|
+
var ce = {
|
|
575
675
|
"--button-fg": "var(--lea-palette-text-contrast)",
|
|
576
676
|
"--button-border": "var(--lea-palette-border-contrast)",
|
|
577
677
|
"--button-tint": "var(--lea-color-neutral-800)"
|
|
578
|
-
},
|
|
678
|
+
}, le = (e) => {
|
|
579
679
|
if (typeof e == "string") return e;
|
|
580
680
|
try {
|
|
581
681
|
return JSON.stringify(e, null, 2);
|
|
582
682
|
} catch {
|
|
583
683
|
return String(e);
|
|
584
684
|
}
|
|
585
|
-
},
|
|
586
|
-
function
|
|
587
|
-
let C =
|
|
588
|
-
|
|
589
|
-
let W =
|
|
590
|
-
|
|
591
|
-
}, [
|
|
685
|
+
}, ue = typeof window < "u" ? g : m, $ = 12, de = 420, fe = 280;
|
|
686
|
+
function pe({ value: i, label: a = "Payload preview", title: o, placement: s = "inline", badge: c, open: u, defaultOpen: d = !1, onOpenChange: p, copyLabel: g, copyJsonLabel: _, closeLabel: b, highlight: S = !0 }) {
|
|
687
|
+
let C = j(), { copied: w, copy: O } = Q(), k = u !== void 0, [M, N] = y(d), P = k ? u : M, F = h(), I = h(), L = s === "side", R = v(null), z = v(null), [B, V] = y(null), [H, U] = y(null);
|
|
688
|
+
m(() => U(document.body), []);
|
|
689
|
+
let W = f((e) => {
|
|
690
|
+
k || N(e), p?.(e);
|
|
691
|
+
}, [k, p]), G = le(i), K = S && oe(i) ? /* @__PURE__ */ T(se, { code: G }) : G, q = f(() => {
|
|
592
692
|
let e = R.current?.closest("[data-dev-panel-root]") ?? R.current;
|
|
593
693
|
if (!e) return;
|
|
594
|
-
let t = e.getBoundingClientRect(), n = Math.min(
|
|
694
|
+
let t = e.getBoundingClientRect(), n = Math.min(de, Math.max(fe, t.width)), r = t.left - n - $;
|
|
595
695
|
r < $ && (r = Math.min(t.right + $, window.innerWidth - n - $));
|
|
596
696
|
let i = Math.min(t.height, window.innerHeight - 24), a = Math.min(Math.max($, t.top), window.innerHeight - $ - i);
|
|
597
697
|
V({
|
|
@@ -601,21 +701,21 @@ function se({ value: i, label: a = "Payload preview", title: o, placement: s = "
|
|
|
601
701
|
height: i
|
|
602
702
|
});
|
|
603
703
|
}, []);
|
|
604
|
-
|
|
704
|
+
ue(() => {
|
|
605
705
|
if (!L || !P) return;
|
|
606
|
-
|
|
607
|
-
let e = () =>
|
|
706
|
+
q();
|
|
707
|
+
let e = () => q();
|
|
608
708
|
return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
609
709
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
610
710
|
};
|
|
611
711
|
}, [
|
|
612
712
|
L,
|
|
613
713
|
P,
|
|
614
|
-
|
|
714
|
+
q
|
|
615
715
|
]);
|
|
616
|
-
let
|
|
617
|
-
|
|
618
|
-
if (!L || !P || !H || !
|
|
716
|
+
let J = B !== null;
|
|
717
|
+
m(() => {
|
|
718
|
+
if (!L || !P || !H || !J) return;
|
|
619
719
|
let e = z.current, t = R.current, n = () => Array.from(e?.querySelectorAll("button, [href], input, textarea, select, [tabindex]:not([tabindex=\"-1\"])") ?? []).filter((e) => !e.hasAttribute("disabled"));
|
|
620
720
|
(n()[0] ?? e)?.focus();
|
|
621
721
|
let r = (t) => {
|
|
@@ -642,64 +742,64 @@ function se({ value: i, label: a = "Payload preview", title: o, placement: s = "
|
|
|
642
742
|
L,
|
|
643
743
|
P,
|
|
644
744
|
H,
|
|
645
|
-
|
|
745
|
+
J,
|
|
646
746
|
W
|
|
647
747
|
]);
|
|
648
|
-
let
|
|
748
|
+
let Y = /* @__PURE__ */ T(x, {
|
|
649
749
|
"aria-label": g ?? C.copy,
|
|
650
750
|
onClick: () => O(G),
|
|
651
751
|
variant: "outline",
|
|
652
752
|
color: "secondary",
|
|
653
753
|
size: "sm",
|
|
654
|
-
className:
|
|
655
|
-
style:
|
|
656
|
-
children: w
|
|
754
|
+
className: A.OnDark,
|
|
755
|
+
style: ce,
|
|
756
|
+
children: T(w ? t : r, {
|
|
657
757
|
size: 16,
|
|
658
758
|
"aria-hidden": !0
|
|
659
759
|
})
|
|
660
760
|
});
|
|
661
|
-
return /* @__PURE__ */
|
|
662
|
-
/* @__PURE__ */
|
|
761
|
+
return /* @__PURE__ */ E("div", { children: [
|
|
762
|
+
/* @__PURE__ */ E("button", {
|
|
663
763
|
ref: R,
|
|
664
764
|
type: "button",
|
|
665
765
|
"aria-expanded": P,
|
|
666
766
|
"aria-controls": F,
|
|
667
767
|
"data-placement": s,
|
|
668
768
|
onClick: () => W(!P),
|
|
669
|
-
className:
|
|
670
|
-
children: [/* @__PURE__ */
|
|
671
|
-
className:
|
|
672
|
-
children: [/* @__PURE__ */
|
|
769
|
+
className: A.PayloadToggle,
|
|
770
|
+
children: [/* @__PURE__ */ E("span", {
|
|
771
|
+
className: A.PayloadToggleLabel,
|
|
772
|
+
children: [/* @__PURE__ */ T(e, {
|
|
673
773
|
size: 16,
|
|
674
774
|
"aria-hidden": !0
|
|
675
775
|
}), a]
|
|
676
|
-
}), /* @__PURE__ */
|
|
677
|
-
className:
|
|
678
|
-
children: /* @__PURE__ */
|
|
776
|
+
}), /* @__PURE__ */ T("span", {
|
|
777
|
+
className: A.PayloadChevron,
|
|
778
|
+
children: /* @__PURE__ */ T(n, {
|
|
679
779
|
size: 16,
|
|
680
780
|
"aria-hidden": !0
|
|
681
781
|
})
|
|
682
782
|
})]
|
|
683
783
|
}),
|
|
684
|
-
!L && P && /* @__PURE__ */
|
|
784
|
+
!L && P && /* @__PURE__ */ E("div", {
|
|
685
785
|
id: F,
|
|
686
|
-
className:
|
|
687
|
-
children: [/* @__PURE__ */
|
|
688
|
-
className:
|
|
689
|
-
children: [/* @__PURE__ */
|
|
690
|
-
}), /* @__PURE__ */
|
|
786
|
+
className: A.PayloadPanel,
|
|
787
|
+
children: [/* @__PURE__ */ E("div", {
|
|
788
|
+
className: A.PayloadHeader,
|
|
789
|
+
children: [/* @__PURE__ */ T("span", { children: o ?? a }), Y]
|
|
790
|
+
}), /* @__PURE__ */ T("pre", {
|
|
691
791
|
tabIndex: 0,
|
|
692
|
-
className:
|
|
693
|
-
children:
|
|
792
|
+
className: A.PayloadCode,
|
|
793
|
+
children: K
|
|
694
794
|
})]
|
|
695
795
|
}),
|
|
696
|
-
L && P && H &&
|
|
796
|
+
L && P && H && D(/* @__PURE__ */ E("div", {
|
|
697
797
|
ref: z,
|
|
698
798
|
id: F,
|
|
699
799
|
role: "dialog",
|
|
700
800
|
"aria-labelledby": I,
|
|
701
801
|
tabIndex: -1,
|
|
702
|
-
className:
|
|
802
|
+
className: A.Flyout,
|
|
703
803
|
style: B ? {
|
|
704
804
|
top: B.top,
|
|
705
805
|
left: B.left,
|
|
@@ -707,89 +807,89 @@ function se({ value: i, label: a = "Payload preview", title: o, placement: s = "
|
|
|
707
807
|
height: B.height
|
|
708
808
|
} : { visibility: "hidden" },
|
|
709
809
|
children: [
|
|
710
|
-
/* @__PURE__ */
|
|
711
|
-
className:
|
|
712
|
-
children: [/* @__PURE__ */
|
|
713
|
-
className:
|
|
714
|
-
children: [/* @__PURE__ */
|
|
810
|
+
/* @__PURE__ */ E("div", {
|
|
811
|
+
className: A.PayloadHeader,
|
|
812
|
+
children: [/* @__PURE__ */ E("span", {
|
|
813
|
+
className: A.FlyoutTitle,
|
|
814
|
+
children: [/* @__PURE__ */ T("span", {
|
|
715
815
|
id: I,
|
|
716
816
|
children: o ?? a
|
|
717
|
-
}),
|
|
718
|
-
className:
|
|
817
|
+
}), c != null && /* @__PURE__ */ T("span", {
|
|
818
|
+
className: A.Badge,
|
|
719
819
|
"data-on-dark": "",
|
|
720
|
-
children:
|
|
820
|
+
children: c
|
|
721
821
|
})]
|
|
722
|
-
}), /* @__PURE__ */
|
|
723
|
-
"aria-label":
|
|
822
|
+
}), /* @__PURE__ */ T(x, {
|
|
823
|
+
"aria-label": b ?? C.close,
|
|
724
824
|
onClick: () => W(!1),
|
|
725
825
|
variant: "outline",
|
|
726
826
|
color: "secondary",
|
|
727
827
|
size: "sm",
|
|
728
|
-
className:
|
|
729
|
-
style:
|
|
730
|
-
children: /* @__PURE__ */
|
|
828
|
+
className: A.OnDark,
|
|
829
|
+
style: ce,
|
|
830
|
+
children: /* @__PURE__ */ T(l, {
|
|
731
831
|
size: 16,
|
|
732
832
|
"aria-hidden": !0
|
|
733
833
|
})
|
|
734
834
|
})]
|
|
735
835
|
}),
|
|
736
|
-
/* @__PURE__ */
|
|
836
|
+
/* @__PURE__ */ T("pre", {
|
|
737
837
|
tabIndex: 0,
|
|
738
|
-
className:
|
|
739
|
-
children:
|
|
838
|
+
className: A.PayloadCode,
|
|
839
|
+
children: K
|
|
740
840
|
}),
|
|
741
|
-
/* @__PURE__ */
|
|
742
|
-
className:
|
|
743
|
-
children: /* @__PURE__ */
|
|
841
|
+
/* @__PURE__ */ T("div", {
|
|
842
|
+
className: A.FlyoutFooter,
|
|
843
|
+
children: /* @__PURE__ */ E("button", {
|
|
744
844
|
type: "button",
|
|
745
845
|
onClick: () => O(G),
|
|
746
|
-
className:
|
|
747
|
-
children: [w
|
|
846
|
+
className: A.FlyoutCopyButton,
|
|
847
|
+
children: [T(w ? t : r, {
|
|
748
848
|
size: 16,
|
|
749
849
|
"aria-hidden": !0
|
|
750
|
-
}),
|
|
850
|
+
}), w ? C.copied : _ ?? C.copyJson]
|
|
751
851
|
})
|
|
752
852
|
})
|
|
753
853
|
]
|
|
754
854
|
}), H),
|
|
755
|
-
/* @__PURE__ */
|
|
855
|
+
/* @__PURE__ */ T("span", {
|
|
756
856
|
role: "status",
|
|
757
857
|
"aria-live": "polite",
|
|
758
|
-
className:
|
|
759
|
-
children:
|
|
858
|
+
className: A.VisuallyHidden,
|
|
859
|
+
children: w ? C.copied : ""
|
|
760
860
|
})
|
|
761
861
|
] });
|
|
762
862
|
}
|
|
763
863
|
//#endregion
|
|
764
864
|
//#region src/dev-panel/dev-panel-footer.tsx
|
|
765
|
-
function
|
|
766
|
-
let { copy: d } =
|
|
767
|
-
return /* @__PURE__ */
|
|
768
|
-
className:
|
|
865
|
+
function me({ onReseed: e, reseedLabel: t = "Reseed", onCopyUrl: r, url: i, copyUrlLabel: a = "Copy URL", onConsole: o, consoleLabel: l = "Console", children: u }) {
|
|
866
|
+
let { copy: d } = Q();
|
|
867
|
+
return /* @__PURE__ */ E("div", {
|
|
868
|
+
className: A.Footer,
|
|
769
869
|
children: [
|
|
770
|
-
e && /* @__PURE__ */
|
|
870
|
+
e && /* @__PURE__ */ T(b, {
|
|
771
871
|
variant: "outline",
|
|
772
872
|
color: "secondary",
|
|
773
873
|
size: "sm",
|
|
774
|
-
startIcon: /* @__PURE__ */
|
|
874
|
+
startIcon: /* @__PURE__ */ T(s, { "aria-hidden": !0 }),
|
|
775
875
|
onClick: e,
|
|
776
876
|
children: t
|
|
777
877
|
}),
|
|
778
|
-
r && /* @__PURE__ */
|
|
878
|
+
r && /* @__PURE__ */ T(b, {
|
|
779
879
|
variant: "outline",
|
|
780
880
|
color: "secondary",
|
|
781
881
|
size: "sm",
|
|
782
|
-
startIcon: /* @__PURE__ */
|
|
882
|
+
startIcon: /* @__PURE__ */ T(c, { "aria-hidden": !0 }),
|
|
783
883
|
onClick: async () => {
|
|
784
884
|
i != null && await d(i), r?.();
|
|
785
885
|
},
|
|
786
886
|
children: a
|
|
787
887
|
}),
|
|
788
|
-
|
|
888
|
+
o && /* @__PURE__ */ T(b, {
|
|
789
889
|
variant: "solid",
|
|
790
890
|
size: "sm",
|
|
791
|
-
endIcon: /* @__PURE__ */
|
|
792
|
-
onClick:
|
|
891
|
+
endIcon: /* @__PURE__ */ T(n, { "aria-hidden": !0 }),
|
|
892
|
+
onClick: o,
|
|
793
893
|
style: { marginInlineStart: "auto" },
|
|
794
894
|
children: l
|
|
795
895
|
}),
|
|
@@ -799,20 +899,21 @@ function ce({ onReseed: e, reseedLabel: t = "Reseed", onCopyUrl: r, url: i, copy
|
|
|
799
899
|
}
|
|
800
900
|
//#endregion
|
|
801
901
|
//#region src/dev-panel/parts.ts
|
|
802
|
-
var
|
|
803
|
-
Country: () =>
|
|
804
|
-
Flow: () =>
|
|
805
|
-
Footer: () =>
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
902
|
+
var he = /* @__PURE__ */ k({
|
|
903
|
+
Country: () => W,
|
|
904
|
+
Flow: () => te,
|
|
905
|
+
Footer: () => me,
|
|
906
|
+
Handle: () => V,
|
|
907
|
+
Payload: () => pe,
|
|
908
|
+
Root: () => z,
|
|
909
|
+
Section: () => B,
|
|
910
|
+
Status: () => X,
|
|
911
|
+
StepState: () => K,
|
|
912
|
+
Steps: () => J,
|
|
913
|
+
Variant: () => G,
|
|
914
|
+
useSectionLabelId: () => P
|
|
814
915
|
});
|
|
815
916
|
//#endregion
|
|
816
|
-
export {
|
|
917
|
+
export { he as DevPanel };
|
|
817
918
|
|
|
818
919
|
//# sourceMappingURL=dev-panel.mjs.map
|