@meddleware/ui 0.1.26 → 0.1.28

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/dist/ui.js CHANGED
@@ -1,6 +1,6 @@
1
- import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, defineComponent as s, mergeProps as c, normalizeClass as l, normalizeStyle as u, onMounted as ee, onUnmounted as d, openBlock as f, ref as p, renderList as m, renderSlot as h, resolveDynamicComponent as te, toDisplayString as g, unref as _, useModel as ne, vModelSelect as re, watch as ie, withCtx as ae, withDirectives as oe } from "vue";
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeModels as l, normalizeClass as u, onBeforeUnmount as d, onMounted as f, onUnmounted as p, openBlock as m, ref as h, renderList as g, renderSlot as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, useCssVars as x, useId as S, useModel as C, useSlots as w, vModelSelect as T, watch as E, withCtx as D, withDirectives as O } from "vue";
2
2
  //#region src/internal/panel.ts
3
- function v(e, t) {
3
+ function k(e, t) {
4
4
  let n;
5
5
  return n = e === "transparent" ? {
6
6
  "--_bg": "transparent",
@@ -24,7 +24,7 @@ function v(e, t) {
24
24
  }
25
25
  //#endregion
26
26
  //#region src/components/AppHeader.vue?vue&type=script&setup=true&lang.ts
27
- var se = { class: "mw-header__brand" }, ce = { class: "mw-header__center" }, le = { class: "mw-header__actions" }, ue = /*@__PURE__*/ s({
27
+ var A = /*@__PURE__*/ c({
28
28
  __name: "AppHeader",
29
29
  props: {
30
30
  variant: { default: "dark" },
@@ -32,36 +32,44 @@ var se = { class: "mw-header__brand" }, ce = { class: "mw-header__center" }, le
32
32
  sticky: {
33
33
  type: Boolean,
34
34
  default: !0
35
+ },
36
+ solidifyOnScroll: {
37
+ type: Boolean,
38
+ default: !1
35
39
  }
36
40
  },
37
41
  setup(e) {
38
- let n = e, r = t(() => v(n.variant, n.colors));
39
- return (t, n) => (f(), i("header", {
40
- class: l(["mw-header", [`mw-header--${e.variant}`, { "mw-header--sticky": e.sticky }]]),
41
- style: u(r.value)
42
- }, [
43
- a("div", se, [h(t.$slots, "brand", {}, void 0, !0)]),
44
- a("div", ce, [h(t.$slots, "default", {}, void 0, !0)]),
45
- a("div", le, [h(t.$slots, "actions", {}, void 0, !0)])
46
- ], 6));
47
- }
48
- }), y = (e, t) => {
42
+ x((e) => ({
43
+ v7dfc9c9a: r.value["--_bg"],
44
+ v3dfe910e: r.value["--_surface"],
45
+ v100a5d02: r.value["--_text"],
46
+ cbf62068: r.value["--_muted"],
47
+ v21deec7e: r.value["--_border"]
48
+ }));
49
+ let n = e, r = t(() => k(n.variant, n.colors)), a = h(!1), o = null;
50
+ return f(() => {
51
+ n.solidifyOnScroll && typeof window < "u" && (o = () => {
52
+ a.value = window.scrollY > 8;
53
+ }, o(), window.addEventListener("scroll", o, { passive: !0 }));
54
+ }), d(() => {
55
+ o && window.removeEventListener("scroll", o);
56
+ }), (t, n) => (m(), i("header", { class: u(["mw-header", [`mw-header--${e.variant}`, {
57
+ "mw-header--sticky": e.sticky,
58
+ "mw-header--scrolled": e.solidifyOnScroll && a.value
59
+ }]]) }, [
60
+ _(t.$slots, "brand"),
61
+ _(t.$slots, "default"),
62
+ _(t.$slots, "actions")
63
+ ], 2));
64
+ }
65
+ }), j = (e, t) => {
49
66
  let n = e.__vccOpts || e;
50
67
  for (let [e, r] of t) n[e] = r;
51
68
  return n;
52
- }, de = /*#__PURE__*/ y(ue, [["__scopeId", "data-v-9b9826d5"]]), b = {
53
- key: 0,
54
- class: "mw-sidebar__head"
55
- }, x = {
69
+ }, ee = /*#__PURE__*/ j(A, [["__scopeId", "data-v-3bfe2697"]]), te = {
56
70
  class: "mw-sidebar__nav",
57
71
  "aria-label": "Primary"
58
- }, S = {
59
- key: 1,
60
- class: "mw-sidebar__body"
61
- }, C = {
62
- key: 2,
63
- class: "mw-sidebar__foot"
64
- }, w = /*#__PURE__*/ y(/* @__PURE__ */ s({
72
+ }, ne = /*#__PURE__*/ j(/* @__PURE__ */ c({
65
73
  __name: "AppSidebar",
66
74
  props: {
67
75
  variant: { default: "dark" },
@@ -69,24 +77,26 @@ var se = { class: "mw-header__brand" }, ce = { class: "mw-header__center" }, le
69
77
  width: {}
70
78
  },
71
79
  setup(e) {
72
- let n = e, o = t(() => {
73
- let e = v(n.variant, n.colors);
74
- return n.width && (e["--mw-sidebar-width"] = n.width), e;
75
- });
76
- return (t, n) => (f(), i("aside", {
77
- class: l(["mw-sidebar", `mw-sidebar--${e.variant}`]),
78
- style: u(o.value)
79
- }, [
80
- t.$slots.head ? (f(), i("div", b, [h(t.$slots, "head", {}, void 0, !0)])) : r("", !0),
81
- a("nav", x, [h(t.$slots, "default", {}, void 0, !0)]),
82
- t.$slots.body ? (f(), i("div", S, [h(t.$slots, "body", {}, void 0, !0)])) : r("", !0),
83
- t.$slots.foot ? (f(), i("div", C, [h(t.$slots, "foot", {}, void 0, !0)])) : r("", !0)
84
- ], 6));
85
- }
86
- }), [["__scopeId", "data-v-a2b8405c"]]);
80
+ x((e) => ({
81
+ v561aca24: r.value["--_bg"],
82
+ v7e3149c4: r.value["--_surface"],
83
+ v5953500c: r.value["--_text"],
84
+ v79da5e02: r.value["--_muted"],
85
+ v09e8e24b: r.value["--_border"],
86
+ v0716c1ba: o.value
87
+ }));
88
+ let n = e, r = t(() => k(n.variant, n.colors)), o = t(() => n.width ?? "var(--mw-sidebar-width, 240px)");
89
+ return (t, n) => (m(), i("aside", { class: u(["mw-sidebar", `mw-sidebar--${e.variant}`]) }, [
90
+ _(t.$slots, "head", {}, void 0, !0),
91
+ a("nav", te, [_(t.$slots, "default", {}, void 0, !0)]),
92
+ _(t.$slots, "body", {}, void 0, !0),
93
+ _(t.$slots, "foot", {}, void 0, !0)
94
+ ], 2));
95
+ }
96
+ }), [["__scopeId", "data-v-7d26a9e6"]]);
87
97
  //#endregion
88
98
  //#region src/safe-href.ts
89
- function T(e) {
99
+ function M(e) {
90
100
  if (e) try {
91
101
  let t = new URL(e);
92
102
  if (t.protocol === "https:" || t.protocol === "http:" && (t.hostname === "localhost" || t.hostname === "127.0.0.1")) return e;
@@ -94,7 +104,11 @@ function T(e) {
94
104
  }
95
105
  //#endregion
96
106
  //#region src/components/AppFooter.vue?vue&type=script&setup=true&lang.ts
97
- var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = { class: "mw-footer__end" }, k = ["href"], A = ["href"], j = /*#__PURE__*/ y(/* @__PURE__ */ s({
107
+ var re = {
108
+ key: 0,
109
+ class: "mw-footer__docs",
110
+ "aria-label": "Documentation"
111
+ }, ie = ["href"], ae = ["href"], oe = /*#__PURE__*/ j(/* @__PURE__ */ c({
98
112
  __name: "AppFooter",
99
113
  props: {
100
114
  variant: { default: "transparent" },
@@ -103,42 +117,37 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
103
117
  devUrl: {}
104
118
  },
105
119
  setup(e) {
106
- let n = e, o = t(() => v(n.variant, n.colors));
107
- return (t, n) => (f(), i("footer", {
108
- class: l(["mw-footer", `mw-footer--${e.variant}`]),
109
- style: u(o.value)
110
- }, [
111
- a("div", E, [h(t.$slots, "start", {}, void 0, !0)]),
112
- a("div", D, [h(t.$slots, "default", {}, void 0, !0)]),
113
- a("div", O, [
114
- h(t.$slots, "end", {}, void 0, !0),
115
- e.docsUrl ? (f(), i("a", {
116
- key: 0,
117
- href: _(T)(e.docsUrl),
118
- target: "_blank",
119
- rel: "noopener noreferrer",
120
- class: "mw-footer__docs-link"
121
- }, "Documentation", 8, k)) : r("", !0),
122
- e.devUrl ? (f(), i("a", {
123
- key: 1,
124
- href: _(T)(e.devUrl),
125
- target: "_blank",
126
- rel: "noopener noreferrer",
127
- "aria-label": "Developer documentation",
128
- class: "mw-footer__docs-link"
129
- }, "Developer docs", 8, A)) : r("", !0)
130
- ])
131
- ], 6));
132
- }
133
- }), [["__scopeId", "data-v-979579a9"]]), M = {
134
- class: "mw-mode",
135
- role: "group",
136
- "aria-label": "Colour mode"
137
- }, N = [
120
+ x((e) => ({
121
+ bf930b0c: a.value["--_bg"],
122
+ v34a45f2e: a.value["--_surface"],
123
+ e9777a3c: a.value["--_text"],
124
+ f3f07428: a.value["--_muted"],
125
+ f92f10be: a.value["--_border"]
126
+ }));
127
+ let n = e, a = t(() => k(n.variant, n.colors));
128
+ return (t, n) => (m(), i("footer", { class: u(["mw-footer", `mw-footer--${e.variant}`]) }, [
129
+ _(t.$slots, "start", {}, void 0, !0),
130
+ _(t.$slots, "default", {}, void 0, !0),
131
+ _(t.$slots, "end", {}, void 0, !0),
132
+ e.docsUrl || e.devUrl ? (m(), i("nav", re, [e.docsUrl ? (m(), i("a", {
133
+ key: 0,
134
+ href: b(M)(e.docsUrl),
135
+ target: "_blank",
136
+ rel: "noopener noreferrer"
137
+ }, "Documentation", 8, ie)) : r("", !0), e.devUrl ? (m(), i("a", {
138
+ key: 1,
139
+ href: b(M)(e.devUrl),
140
+ target: "_blank",
141
+ rel: "noopener noreferrer",
142
+ "aria-label": "Developer documentation"
143
+ }, "Developer docs", 8, ae)) : r("", !0)])) : r("", !0)
144
+ ], 2));
145
+ }
146
+ }), [["__scopeId", "data-v-6055f18c"]]), se = { class: "mw-mode" }, ce = [
138
147
  "aria-pressed",
139
148
  "title",
140
149
  "onClick"
141
- ], P = { "aria-hidden": "true" }, F = { class: "mw-mode__label" }, I = /*#__PURE__*/ y(/* @__PURE__ */ s({
150
+ ], le = { "aria-hidden": "true" }, ue = { class: "mw-mode__label" }, de = /*#__PURE__*/ j(/* @__PURE__ */ c({
142
151
  __name: "ColorModeControl",
143
152
  props: {
144
153
  modelValue: {},
@@ -159,16 +168,16 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
159
168
  dark: "☾",
160
169
  system: "🖵"
161
170
  };
162
- return (o, s) => (f(), i("div", M, [(f(!0), i(e, null, m(t.modes, (e) => (f(), i("button", {
171
+ return (o, s) => (m(), i("fieldset", se, [s[0] ||= a("legend", { class: "mw-visually-hidden" }, "Colour mode", -1), (m(!0), i(e, null, g(t.modes, (e) => (m(), i("button", {
163
172
  key: e,
164
173
  type: "button",
165
- class: l(["mw-mode__btn", { "is-active": t.modelValue === e }]),
174
+ class: u(["mw-mode__btn", { "is-active": t.modelValue === e }]),
166
175
  "aria-pressed": t.modelValue === e,
167
176
  title: n[e],
168
177
  onClick: (t) => o.$emit("update:modelValue", e)
169
- }, [a("span", P, g(r[e]), 1), a("span", F, g(n[e]), 1)], 10, N))), 128))]));
178
+ }, [a("span", le, y(r[e]), 1), a("span", ue, y(n[e]), 1)], 10, ce))), 128))]));
170
179
  }
171
- }), [["__scopeId", "data-v-345f2b04"]]), L = ["type", "disabled"], R = /*#__PURE__*/ y(/* @__PURE__ */ s({
180
+ }), [["__scopeId", "data-v-e5cba7a7"]]), fe = ["type", "disabled"], pe = /*#__PURE__*/ j(/* @__PURE__ */ c({
172
181
  __name: "UiButton",
173
182
  props: {
174
183
  variant: { default: "primary" },
@@ -179,30 +188,29 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
179
188
  }
180
189
  },
181
190
  setup(e) {
182
- return (t, n) => (f(), i("button", {
191
+ return (t, n) => (m(), i("button", {
183
192
  type: e.type,
184
193
  disabled: e.disabled,
185
- class: l(["mw-btn", `mw-btn--${e.variant}`])
186
- }, [h(t.$slots, "default", {}, void 0, !0)], 10, L));
194
+ class: u(["mw-btn", `mw-btn--${e.variant}`])
195
+ }, [_(t.$slots, "default", {}, void 0, !0)], 10, fe));
187
196
  }
188
- }), [["__scopeId", "data-v-bc33cc23"]]), z = { class: "mw-card" }, B = {
197
+ }), [["__scopeId", "data-v-bc33cc23"]]), me = { class: "mw-card" }, N = {
189
198
  key: 0,
190
199
  class: "mw-card__header"
191
- }, V = { class: "mw-card__title" }, H = { class: "mw-card__body" }, fe = {
200
+ }, P = { class: "mw-card__title" }, F = {
192
201
  key: 1,
193
202
  class: "mw-card__footer"
194
- }, pe = /*#__PURE__*/ y(/* @__PURE__ */ s({
203
+ }, I = /*#__PURE__*/ j(/* @__PURE__ */ c({
195
204
  __name: "UiCard",
196
205
  props: { title: {} },
197
206
  setup(e) {
198
- return (t, n) => (f(), i("section", z, [
199
- e.title || t.$slots.header ? (f(), i("header", B, [h(t.$slots, "header", {}, () => [a("h3", V, g(e.title), 1)], !0)])) : r("", !0),
200
- a("div", H, [h(t.$slots, "default", {}, void 0, !0)]),
201
- t.$slots.footer ? (f(), i("footer", fe, [h(t.$slots, "footer", {}, void 0, !0)])) : r("", !0)
207
+ return (t, n) => (m(), i("section", me, [
208
+ e.title || t.$slots.header ? (m(), i("header", N, [_(t.$slots, "header", {}, () => [a("h3", P, y(e.title), 1)], !0)])) : r("", !0),
209
+ _(t.$slots, "default", {}, void 0, !0),
210
+ t.$slots.footer ? (m(), i("footer", F, [_(t.$slots, "footer", {}, void 0, !0)])) : r("", !0)
202
211
  ]));
203
212
  }
204
- }), [["__scopeId", "data-v-883f87f5"]]), me = { class: "mw-select" }, he = /*#__PURE__*/ y(/* @__PURE__ */ s({
205
- inheritAttrs: !1,
213
+ }), [["__scopeId", "data-v-384b36cf"]]), L = /*#__PURE__*/ j(/* @__PURE__ */ c({
206
214
  __name: "UiSelect",
207
215
  props: {
208
216
  modelValue: {},
@@ -210,17 +218,13 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
210
218
  },
211
219
  emits: ["update:modelValue"],
212
220
  setup(e) {
213
- let t = ne(e, "modelValue");
214
- return (e, n) => (f(), i("div", me, [oe(a("select", c(e.$attrs, { "onUpdate:modelValue": n[0] ||= (e) => t.value = e }), [h(e.$slots, "default", {}, void 0, !0)], 16), [[re, t.value]]), n[1] ||= a("svg", {
215
- class: "mw-select__chevron",
216
- xmlns: "http://www.w3.org/2000/svg",
217
- width: "12",
218
- height: "8",
219
- viewBox: "0 0 12 8",
220
- "aria-hidden": "true"
221
- }, [a("path", { d: "M1 1l5 5 5-5" })], -1)]));
221
+ let t = C(e, "modelValue");
222
+ return (e, n) => O((m(), i("select", {
223
+ "onUpdate:modelValue": n[0] ||= (e) => t.value = e,
224
+ class: "mw-select"
225
+ }, [_(e.$slots, "default", {}, void 0, !0)], 512)), [[T, t.value]]);
222
226
  }
223
- }), [["__scopeId", "data-v-3096db80"]]), ge = ["role"], _e = /*#__PURE__*/ y(/* @__PURE__ */ s({
227
+ }), [["__scopeId", "data-v-38fbd9b5"]]), R = ["role"], z = /*#__PURE__*/ j(/* @__PURE__ */ c({
224
228
  __name: "UiNotice",
225
229
  props: { type: {} },
226
230
  setup(e) {
@@ -228,16 +232,16 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
228
232
  if (n.type === "error") return "alert";
229
233
  if (n.type === "ok") return "status";
230
234
  });
231
- return (t, n) => (f(), i("p", {
232
- class: l(["mw-notice", e.type && e.type !== "info" ? `mw-notice--${e.type}` : ""]),
235
+ return (t, n) => (m(), i("p", {
236
+ class: u(["mw-notice", e.type && e.type !== "info" ? `mw-notice--${e.type}` : ""]),
233
237
  role: r.value
234
- }, [h(t.$slots, "default", {}, void 0, !0)], 10, ge));
238
+ }, [_(t.$slots, "default", {}, void 0, !0)], 10, R));
235
239
  }
236
- }), [["__scopeId", "data-v-ee7fffb1"]]), ve = ["disabled", "aria-current"], ye = {
240
+ }), [["__scopeId", "data-v-ee7fffb1"]]), he = ["disabled", "aria-current"], ge = {
237
241
  key: 0,
238
242
  class: "sidebar-item__icon",
239
243
  "aria-hidden": "true"
240
- }, be = { class: "sidebar-item__label" }, xe = /*#__PURE__*/ y(/* @__PURE__ */ s({
244
+ }, _e = /*#__PURE__*/ j(/* @__PURE__ */ c({
241
245
  __name: "SidebarItem",
242
246
  props: {
243
247
  label: {},
@@ -252,52 +256,174 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
252
256
  }
253
257
  },
254
258
  setup(e) {
255
- return (t, n) => (f(), i("button", {
259
+ return (t, n) => (m(), i("button", {
256
260
  type: "button",
257
- class: l(["sidebar-item", { "is-active": e.active }]),
261
+ class: u(["sidebar-item", { "is-active": e.active }]),
258
262
  disabled: e.disabled,
259
263
  "aria-current": e.active ? "page" : void 0
260
- }, [e.icon ? (f(), i("span", ye, g(e.icon), 1)) : r("", !0), a("span", be, g(e.label), 1)], 10, ve));
264
+ }, [e.icon ? (m(), i("span", ge, y(e.icon), 1)) : r("", !0), o(" " + y(e.label), 1)], 10, he));
261
265
  }
262
- }), [["__scopeId", "data-v-8da2d583"]]), Se = ["aria-label"], Ce = {
263
- class: "sidebar-group__label",
264
- "aria-hidden": "true"
265
- }, we = { class: "sidebar-group__items" }, Te = /*#__PURE__*/ y(/* @__PURE__ */ s({
266
+ }), [["__scopeId", "data-v-c8ae7e5f"]]), ve = { class: "sidebar-group__label" }, ye = /*#__PURE__*/ j(/* @__PURE__ */ c({
266
267
  __name: "SidebarGroup",
267
268
  props: {
268
269
  label: {},
269
270
  level: { default: 1 }
270
271
  },
271
272
  setup(e) {
272
- return (t, n) => (f(), i("div", {
273
- class: l(["sidebar-group", `sidebar-group--l${e.level}`]),
274
- role: "group",
275
- "aria-label": e.label
276
- }, [a("div", Ce, g(e.label), 1), a("div", we, [h(t.$slots, "default", {}, void 0, !0)])], 10, Se));
273
+ return (t, n) => (m(), i("fieldset", { class: u(["sidebar-group", `sidebar-group--l${e.level}`]) }, [a("legend", ve, y(e.label), 1), _(t.$slots, "default", {}, void 0, !0)], 2));
277
274
  }
278
- }), [["__scopeId", "data-v-c8f6c8b2"]]), Ee = ["aria-label"], De = ["aria-current", "onClick"], Oe = /*#__PURE__*/ y(/* @__PURE__ */ s({
275
+ }), [["__scopeId", "data-v-95acc444"]]);
276
+ //#endregion
277
+ //#region src/tabs.ts
278
+ function B(e, t) {
279
+ return {
280
+ tab: `${e}-tab-${t}`,
281
+ panel: `${e}-panel-${t}`
282
+ };
283
+ }
284
+ //#endregion
285
+ //#region src/components/AppTabNav.vue?vue&type=script&setup=true&lang.ts
286
+ var be = ["aria-label"], xe = [
287
+ "id",
288
+ "aria-selected",
289
+ "aria-controls",
290
+ "tabindex",
291
+ "onClick",
292
+ "onKeydown"
293
+ ], Se = /*#__PURE__*/ j(/* @__PURE__ */ c({
279
294
  __name: "AppTabNav",
280
295
  props: {
281
296
  tabs: {},
282
297
  modelValue: {},
298
+ idPrefix: {},
283
299
  ariaLabel: {},
284
- variant: { default: "underline" }
300
+ variant: { default: "underline" },
301
+ size: { default: "md" }
285
302
  },
286
303
  emits: ["update:modelValue"],
287
304
  setup(t, { emit: n }) {
288
- let r = n;
289
- return (n, a) => (f(), i("nav", {
290
- class: l(["mw-tab-nav", { "mw-tab-nav--raised": t.variant === "raised" }]),
305
+ let r = t, o = n, s = [];
306
+ function c(e) {
307
+ let t = r.tabs[e];
308
+ t && (o("update:modelValue", t.id), s[e]?.focus());
309
+ }
310
+ function l(e, t) {
311
+ let n = r.tabs.length - 1, i = e.key === "ArrowRight" ? t === n ? 0 : t + 1 : e.key === "ArrowLeft" ? t === 0 ? n : t - 1 : e.key === "Home" ? 0 : e.key === "End" ? n : -1;
312
+ i < 0 || (e.preventDefault(), c(i));
313
+ }
314
+ return (n, r) => (m(), i("menu", {
315
+ role: "tablist",
316
+ class: u(["mw-tab-nav", {
317
+ "mw-tab-nav--raised": t.variant === "raised",
318
+ "mw-tab-nav--lg": t.size === "lg"
319
+ }]),
291
320
  "aria-label": t.ariaLabel
292
- }, [(f(!0), i(e, null, m(t.tabs, (e) => (f(), i("button", {
321
+ }, [(m(!0), i(e, null, g(t.tabs, (e, n) => (m(), i("li", {
293
322
  key: e.id,
323
+ role: "presentation",
324
+ class: "mw-tab-nav__item"
325
+ }, [a("button", {
326
+ id: b(B)(t.idPrefix, e.id).tab,
327
+ ref_for: !0,
328
+ ref: (e) => {
329
+ s[n] = e;
330
+ },
294
331
  type: "button",
295
- class: l(["mw-tab-nav__tab", { "mw-tab-nav__tab--active": t.modelValue === e.id }]),
296
- "aria-current": t.modelValue === e.id ? "page" : void 0,
297
- onClick: (t) => r("update:modelValue", e.id)
298
- }, g(e.label), 11, De))), 128))], 10, Ee));
332
+ role: "tab",
333
+ class: u(["mw-tab-nav__tab", { "mw-tab-nav__tab--active": t.modelValue === e.id }]),
334
+ "aria-selected": t.modelValue === e.id,
335
+ "aria-controls": b(B)(t.idPrefix, e.id).panel,
336
+ tabindex: t.modelValue === e.id ? 0 : -1,
337
+ onClick: (t) => o("update:modelValue", e.id),
338
+ onKeydown: (e) => l(e, n)
339
+ }, y(e.label), 43, xe)]))), 128))], 10, be));
340
+ }
341
+ }), [["__scopeId", "data-v-a5f710b1"]]), Ce = ["id", "aria-labelledby"], we = /*#__PURE__*/ j(/* @__PURE__ */ c({
342
+ __name: "UiTabPanel",
343
+ props: {
344
+ idPrefix: {},
345
+ tab: {}
346
+ },
347
+ setup(e) {
348
+ let n = e, r = t(() => B(n.idPrefix, n.tab));
349
+ return (e, t) => (m(), i("section", {
350
+ id: r.value.panel,
351
+ role: "tabpanel",
352
+ "aria-labelledby": r.value.tab,
353
+ tabindex: "0",
354
+ class: "mw-tab-panel"
355
+ }, [_(e.$slots, "default", {}, void 0, !0)], 8, Ce));
356
+ }
357
+ }), [["__scopeId", "data-v-add194c8"]]), Te = ["aria-labelledby"], Ee = { class: "mw-dialog__content" }, De = { class: "mw-dialog__header" }, Oe = ["id"], ke = ["aria-label"], Ae = {
358
+ key: 0,
359
+ class: "mw-dialog__actions"
360
+ }, je = /*#__PURE__*/ j(/* @__PURE__ */ c({
361
+ __name: "UiDialog",
362
+ props: /*@__PURE__*/ l({
363
+ title: {},
364
+ dismissible: {
365
+ type: Boolean,
366
+ default: !0
367
+ },
368
+ closeLabel: { default: "Close" },
369
+ width: {}
370
+ }, {
371
+ open: {
372
+ type: Boolean,
373
+ default: !1
374
+ },
375
+ openModifiers: {}
376
+ }),
377
+ emits: /*@__PURE__*/ l(["close"], ["update:open"]),
378
+ setup(e, { expose: n, emit: s }) {
379
+ x((e) => ({ ce627f2e: v.value }));
380
+ let c = C(e, "open"), l = e, u = s, p = h(null), g = S(), v = t(() => l.width ?? "min(420px, 90vw)"), w = typeof HTMLDialogElement < "u" && "closedBy" in HTMLDialogElement.prototype;
381
+ function T(e = "") {
382
+ p.value?.open && p.value.close(e);
383
+ }
384
+ function D(e) {
385
+ let t = p.value;
386
+ t && (e && !t.open ? t.showModal() : !e && t.open && t.close());
387
+ }
388
+ function O() {
389
+ p.value?.setAttribute("closedby", l.dismissible ? "any" : "none");
390
+ }
391
+ function k(e) {
392
+ l.dismissible && e.target === p.value && T();
393
+ }
394
+ function A(e) {
395
+ l.dismissible || e.preventDefault();
396
+ }
397
+ function j() {
398
+ c.value = !1, u("close", p.value?.returnValue ?? "");
399
+ }
400
+ return f(() => {
401
+ O(), w || p.value?.addEventListener("click", k), D(c.value);
402
+ }), d(() => {
403
+ p.value?.removeEventListener("click", k);
404
+ }), E(c, D, { flush: "post" }), E(() => l.dismissible, O), n({ close: T }), (t, n) => (m(), i("dialog", {
405
+ ref_key: "el",
406
+ ref: p,
407
+ class: "mw-dialog",
408
+ "aria-labelledby": b(g),
409
+ onCancel: A,
410
+ onClose: j
411
+ }, [a("article", Ee, [
412
+ a("header", De, [a("h2", {
413
+ id: b(g),
414
+ class: "mw-dialog__title"
415
+ }, [_(t.$slots, "title", {}, () => [o(y(e.title), 1)], !0)], 8, Oe), e.dismissible ? (m(), i("button", {
416
+ key: 0,
417
+ type: "button",
418
+ class: "mw-dialog__close",
419
+ "aria-label": e.closeLabel,
420
+ onClick: n[0] ||= (e) => T()
421
+ }, "×", 8, ke)) : r("", !0)]),
422
+ _(t.$slots, "default", {}, void 0, !0),
423
+ t.$slots.actions ? (m(), i("footer", Ae, [_(t.$slots, "actions", { close: T }, void 0, !0)])) : r("", !0)
424
+ ])], 40, Te));
299
425
  }
300
- }), [["__scopeId", "data-v-00b3c666"]]), ke = { class: "ca-root" }, Ae = ["title"], je = ["title", "aria-label"], Me = {
426
+ }), [["__scopeId", "data-v-78973168"]]), Me = { class: "ca-root" }, Ne = ["title"], Pe = ["title", "aria-label"], Fe = {
301
427
  key: 0,
302
428
  class: "ca-icon",
303
429
  viewBox: "0 0 24 24",
@@ -309,7 +435,7 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
309
435
  "stroke-linecap": "round",
310
436
  "stroke-linejoin": "round",
311
437
  "aria-hidden": "true"
312
- }, U = {
438
+ }, Ie = {
313
439
  key: 1,
314
440
  class: "ca-icon",
315
441
  viewBox: "0 0 24 24",
@@ -321,7 +447,7 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
321
447
  "stroke-linecap": "round",
322
448
  "stroke-linejoin": "round",
323
449
  "aria-hidden": "true"
324
- }, Ne = /*#__PURE__*/ y(/* @__PURE__ */ s({
450
+ }, Le = /*#__PURE__*/ j(/* @__PURE__ */ c({
325
451
  __name: "CopyableAddress",
326
452
  props: {
327
453
  address: {},
@@ -333,7 +459,7 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
333
459
  label: { default: "Copy" }
334
460
  },
335
461
  setup(e) {
336
- let n = e, r = p(!1), s = t(() => {
462
+ let n = e, r = h(!1), s = t(() => {
337
463
  if (!n.truncate) return n.address;
338
464
  let [e, t] = n.chars;
339
465
  return `${n.address.slice(0, e)}…${n.address.slice(-t)}`;
@@ -343,25 +469,25 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
343
469
  r.value = !1;
344
470
  }, 1500);
345
471
  }
346
- return (t, n) => (f(), i("span", ke, [a("span", {
472
+ return (t, n) => (m(), i("span", Me, [a("span", {
347
473
  class: "ca-value",
348
474
  title: e.address
349
- }, [h(t.$slots, "default", {}, () => [o(g(s.value), 1)], !0)], 8, Ae), a("button", {
475
+ }, [_(t.$slots, "default", {}, () => [o(y(s.value), 1)], !0)], 8, Ne), a("button", {
350
476
  type: "button",
351
- class: l(["ca-copy", { "ca-copy--copied": r.value }]),
477
+ class: u(["ca-copy", { "ca-copy--copied": r.value }]),
352
478
  title: r.value ? "Copied!" : e.label,
353
479
  "aria-label": r.value ? "Copied" : e.label,
354
480
  onClick: c
355
- }, [r.value ? (f(), i("svg", Me, [...n[0] ||= [a("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (f(), i("svg", U, [...n[1] ||= [a("rect", {
481
+ }, [r.value ? (m(), i("svg", Fe, [...n[0] ||= [a("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (m(), i("svg", Ie, [...n[1] ||= [a("rect", {
356
482
  x: "9",
357
483
  y: "9",
358
484
  width: "13",
359
485
  height: "13",
360
486
  rx: "2",
361
487
  ry: "2"
362
- }, null, -1), a("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]]))], 10, je)]));
488
+ }, null, -1), a("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]]))], 10, Pe)]));
363
489
  }
364
- }), [["__scopeId", "data-v-b43dabdd"]]), Pe = ["href", "title"], Fe = /*#__PURE__*/ y(/* @__PURE__ */ s({
490
+ }), [["__scopeId", "data-v-b43dabdd"]]), Re = ["href", "title"], ze = /*#__PURE__*/ j(/* @__PURE__ */ c({
365
491
  __name: "ExplorerLink",
366
492
  props: {
367
493
  href: {},
@@ -379,18 +505,18 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
379
505
  let [e, t] = n.chars;
380
506
  return `${n.value.slice(0, e)}…${n.value.slice(-t)}`;
381
507
  });
382
- return (t, n) => (f(), i("a", {
508
+ return (t, n) => (m(), i("a", {
383
509
  class: "el-root",
384
- href: _(T)(e.href),
510
+ href: b(M)(e.href),
385
511
  target: "_blank",
386
512
  rel: "noopener noreferrer",
387
513
  title: e.value
388
- }, [h(t.$slots, "default", {}, () => [o(g(r.value), 1)], !0)], 8, Pe));
514
+ }, [_(t.$slots, "default", {}, () => [o(y(r.value), 1)], !0)], 8, Re));
389
515
  }
390
- }), [["__scopeId", "data-v-073d1bbe"]]), Ie = { class: "copyright-line" }, Le = ["href", "aria-label"], Re = { key: 0 }, ze = { key: 1 }, Be = {
516
+ }), [["__scopeId", "data-v-073d1bbe"]]), Be = { class: "copyright-line" }, Ve = ["href", "aria-label"], He = { key: 0 }, Ue = { key: 1 }, We = {
391
517
  key: 2,
392
518
  class: "kopimi-symbol"
393
- }, Ve = { class: "text-content" }, He = { key: 0 }, Ue = /*#__PURE__*/ y(/* @__PURE__ */ s({
519
+ }, Ge = { class: "text-content" }, Ke = { key: 0 }, qe = /*#__PURE__*/ j(/* @__PURE__ */ c({
394
520
  __name: "CopyrightLine",
395
521
  props: {
396
522
  organisationName: {},
@@ -402,13 +528,13 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
402
528
  },
403
529
  setup(e) {
404
530
  let n = e, s = t(() => n.symbolVariant), c = t(() => n.symbolHref || (s.value === "kopimi" ? "/legal/powr.broccoli-kopimi.pdf" : s.value === "copyleft" ? "/legal/copyleft.html" : "/legal/copyright.html")), l = t(() => n.symbolLabel || (s.value === "kopimi" ? "Kopimi legal notice" : s.value === "copyleft" ? "Copyleft legal notice" : "Copyright legal notice")), u = t(() => n.rightsStatement === "" ? "" : n.rightsStatement === "none" ? "No rights reserved." : n.rightsStatement === "all" || !n.rightsStatement ? "All rights reserved." : n.rightsStatement === "jam" ? "All jams preserved." : n.rightsStatement);
405
- return (t, n) => (f(), i("small", Ie, [a("a", {
531
+ return (t, n) => (m(), i("small", Be, [a("a", {
406
532
  href: c.value,
407
533
  class: "symbol-link",
408
534
  target: "_blank",
409
535
  rel: "noopener noreferrer",
410
536
  "aria-label": l.value
411
- }, [s.value === "copyright" ? (f(), i("span", Re, "©")) : s.value === "copyleft" ? (f(), i("span", ze, "🄯")) : s.value === "kopimi" ? (f(), i("span", Be, [...n[0] ||= [a("svg", {
537
+ }, [s.value === "copyright" ? (m(), i("span", He, "©")) : s.value === "copyleft" ? (m(), i("span", Ue, "🄯")) : s.value === "kopimi" ? (m(), i("span", We, [...n[0] ||= [a("svg", {
412
538
  viewBox: "0 0 24 24",
413
539
  width: "1em",
414
540
  height: "1em",
@@ -428,58 +554,53 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
428
554
  "font-family": "system-ui, sans-serif",
429
555
  "font-size": "11",
430
556
  fill: "currentColor"
431
- }, " C ")], -1)]])) : r("", !0)], 8, Le), a("span", Ve, [o(g(e.year) + " " + g(e.organisationName) + ".", 1), u.value ? (f(), i("span", He, g(`
557
+ }, " C ")], -1)]])) : r("", !0)], 8, Ve), a("span", Ge, [o(y(e.year) + " " + y(e.organisationName) + ".", 1), u.value ? (m(), i("span", Ke, y(`
432
558
  ${u.value}`), 1)) : r("", !0)])]));
433
559
  }
434
- }), [["__scopeId", "data-v-1f9a5da9"]]), We = {
560
+ }), [["__scopeId", "data-v-44b327f4"]]), Je = {
435
561
  class: "ui-stepper",
436
562
  role: "list"
437
- }, Ge = {
438
- key: 0,
439
- "aria-hidden": "true"
440
- }, Ke = {
563
+ }, Ye = ["aria-current"], Xe = ["aria-label", "onClick"], Ze = {
441
564
  key: 1,
565
+ class: "ui-stepper__badge",
442
566
  "aria-hidden": "true"
443
- }, qe = { class: "ui-stepper__label" }, Je = /*#__PURE__*/ y(/* @__PURE__ */ s({
567
+ }, Qe = { class: "ui-stepper__label" }, $e = /*#__PURE__*/ j(/* @__PURE__ */ c({
444
568
  __name: "UiStepper",
445
569
  props: {
446
570
  steps: {},
447
571
  modelValue: {}
448
572
  },
449
573
  emits: ["update:modelValue"],
450
- setup(t, { emit: r }) {
451
- let o = t, s = r;
452
- function c(e) {
453
- return e < o.modelValue ? "done" : e === o.modelValue ? "active" : "upcoming";
574
+ setup(t, { emit: n }) {
575
+ let r = t, o = n;
576
+ function s(e) {
577
+ return e < r.modelValue ? "done" : e === r.modelValue ? "active" : "upcoming";
454
578
  }
455
- function u(e) {
456
- e < o.modelValue && s("update:modelValue", e);
579
+ function c(e) {
580
+ e < r.modelValue && o("update:modelValue", e);
457
581
  }
458
- return (r, o) => (f(), i("ol", We, [(f(!0), i(e, null, m(t.steps, (e, t) => (f(), i("li", {
582
+ return (n, r) => (m(), i("ol", Je, [(m(!0), i(e, null, g(t.steps, (e, t) => (m(), i("li", {
459
583
  key: e.id,
460
- class: l(["ui-stepper__step", `is-${c(t)}`])
461
- }, [(f(), n(te(c(t) === "done" ? "button" : "span"), {
584
+ class: u(["ui-stepper__step", `is-${s(t)}`]),
585
+ "aria-current": s(t) === "active" ? "step" : void 0
586
+ }, [s(t) === "done" ? (m(), i("button", {
587
+ key: 0,
588
+ type: "button",
462
589
  class: "ui-stepper__badge",
463
- type: c(t) === "done" ? "button" : void 0,
464
- "aria-label": c(t) === "done" ? `Back to ${e.label}` : void 0,
465
- "aria-current": c(t) === "active" ? "step" : void 0,
466
- onClick: (e) => c(t) === "done" && u(t)
467
- }, {
468
- default: ae(() => [c(t) === "done" ? (f(), i("span", Ge, "✓")) : (f(), i("span", Ke, g(t + 1), 1))]),
469
- _: 2
470
- }, 1032, [
471
- "type",
472
- "aria-label",
473
- "aria-current",
474
- "onClick"
475
- ])), a("span", qe, g(e.label), 1)], 2))), 128))]));
476
- }
477
- }), [["__scopeId", "data-v-33717fc3"]]), Ye = ["aria-label"], Xe = ["title"], Ze = [
590
+ "aria-label": `Back to ${e.label}`,
591
+ onClick: (e) => c(t)
592
+ }, "✓", 8, Xe)) : (m(), i("span", Ze, y(t + 1), 1)), a("span", Qe, y(e.label), 1)], 10, Ye))), 128))]));
593
+ }
594
+ }), [["__scopeId", "data-v-6f5db325"]]), et = { class: "mw-seg" }, tt = {
595
+ key: 0,
596
+ class: "mw-visually-hidden"
597
+ }, nt = ["title"], rt = [
598
+ "name",
478
599
  "value",
479
600
  "checked",
480
601
  "disabled",
481
602
  "onChange"
482
- ], Qe = /*#__PURE__*/ y(/* @__PURE__ */ s({
603
+ ], it = /*#__PURE__*/ j(/* @__PURE__ */ c({
483
604
  __name: "UiSegmentedControl",
484
605
  props: {
485
606
  options: {},
@@ -488,49 +609,43 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
488
609
  },
489
610
  emits: ["update:modelValue"],
490
611
  setup(t, { emit: n }) {
491
- let r = n;
492
- return (n, s) => (f(), i("div", {
493
- class: "mw-seg",
494
- role: "group",
495
- "aria-label": t.ariaLabel
496
- }, [(f(!0), i(e, null, m(t.options, (e) => (f(), i("label", {
612
+ let s = n, c = S();
613
+ return (n, l) => (m(), i("fieldset", et, [t.ariaLabel ? (m(), i("legend", tt, y(t.ariaLabel), 1)) : r("", !0), (m(!0), i(e, null, g(t.options, (e) => (m(), i("label", {
497
614
  key: e.id,
498
- class: l(["mw-seg__item", {
615
+ class: u(["mw-seg__item", {
499
616
  "mw-seg__item--active": t.modelValue === e.id,
500
617
  "mw-seg__item--disabled": e.disabled
501
618
  }]),
502
619
  title: e.title
503
620
  }, [a("input", {
504
621
  type: "radio",
622
+ name: b(c),
505
623
  value: e.id,
506
624
  checked: t.modelValue === e.id,
507
625
  disabled: e.disabled,
508
- onChange: (t) => r("update:modelValue", e.id)
509
- }, null, 40, Ze), o(" " + g(e.label), 1)], 10, Xe))), 128))], 8, Ye));
626
+ onChange: (t) => s("update:modelValue", e.id)
627
+ }, null, 40, rt), o(" " + y(e.label), 1)], 10, nt))), 128))]));
510
628
  }
511
- }), [["__scopeId", "data-v-0dacb6ea"]]), $e = { class: "mw-field-hint" }, et = ["aria-describedby"], tt = ["id"], nt = /*#__PURE__*/ y(/* @__PURE__ */ s({
629
+ }), [["__scopeId", "data-v-430ffdd6"]]), at = { class: "mw-field-hint" }, ot = ["aria-describedby"], st = ["id"], ct = /*#__PURE__*/ j(/* @__PURE__ */ c({
512
630
  __name: "UiFieldHint",
513
631
  props: { fieldId: {} },
514
632
  setup(e) {
515
633
  function t(e) {
516
634
  e.key === "Escape" && e.currentTarget.blur();
517
635
  }
518
- return (n, r) => (f(), i("span", $e, [a("button", {
636
+ return (n, r) => (m(), i("span", at, [a("button", {
519
637
  type: "button",
520
638
  class: "mw-field-hint__btn",
521
639
  "aria-describedby": `${e.fieldId}-hint`,
522
640
  "aria-label": "Help",
523
641
  onKeydown: t
524
- }, "?", 40, et), a("span", {
642
+ }, "?", 40, ot), a("span", {
525
643
  id: `${e.fieldId}-hint`,
526
644
  role: "tooltip",
527
645
  class: "mw-field-hint__tip"
528
- }, [h(n.$slots, "default", {}, void 0, !0)], 8, tt)]));
646
+ }, [_(n.$slots, "default", {}, void 0, !0)], 8, st)]));
529
647
  }
530
- }), [["__scopeId", "data-v-29d9a629"]]), rt = { class: "mw-form-field" }, it = ["for"], at = {
531
- key: 0,
532
- class: "mw-form-field__hint"
533
- }, ot = ["id"], st = /*#__PURE__*/ y(/* @__PURE__ */ s({
648
+ }), [["__scopeId", "data-v-29d9a629"]]), lt = { class: "mw-form-field" }, ut = ["for"], dt = ["id"], ft = ["id"], pt = /*#__PURE__*/ j(/* @__PURE__ */ c({
534
649
  __name: "UiFormField",
535
650
  props: {
536
651
  id: {},
@@ -539,61 +654,214 @@ var E = { class: "mw-footer__start" }, D = { class: "mw-footer__center" }, O = {
539
654
  hint: {}
540
655
  },
541
656
  setup(e) {
542
- let n = e, s = t(() => `${n.id}-err`), c = t(() => ({
657
+ let n = e, o = t(() => `${n.id}-err`), s = t(() => `${n.id}-hint-text`), c = t(() => ({
543
658
  id: n.id,
544
659
  "aria-invalid": n.error ? !0 : void 0,
545
- "aria-describedby": n.error ? s.value : void 0
660
+ "aria-describedby": n.error ? o.value : n.hint ? s.value : void 0
546
661
  }));
547
- return (t, n) => (f(), i("div", rt, [
548
- a("label", { for: e.id }, [o(g(e.label), 1), h(t.$slots, "label-suffix", {}, void 0, !0)], 8, it),
549
- h(t.$slots, "default", { attrs: c.value }, void 0, !0),
550
- e.hint && !e.error ? (f(), i("p", at, g(e.hint), 1)) : r("", !0),
551
- e.error ? (f(), i("p", {
552
- key: 1,
662
+ return (t, n) => (m(), i("p", lt, [
663
+ a("label", {
664
+ for: e.id,
665
+ class: "mw-form-field__label"
666
+ }, y(e.label), 9, ut),
667
+ _(t.$slots, "label-suffix"),
668
+ _(t.$slots, "default", { attrs: c.value }),
669
+ e.hint && !e.error ? (m(), i("small", {
670
+ key: 0,
553
671
  id: s.value,
672
+ class: "mw-form-field__hint"
673
+ }, y(e.hint), 9, dt)) : r("", !0),
674
+ e.error ? (m(), i("small", {
675
+ key: 1,
676
+ id: o.value,
554
677
  class: "mw-form-field__error"
555
- }, g(e.error), 9, ot)) : r("", !0)
678
+ }, y(e.error), 9, ft)) : r("", !0)
679
+ ]));
680
+ }
681
+ }), [["__scopeId", "data-v-5aef34d9"]]), mt = { class: "mw-tool-intro" }, ht = /*#__PURE__*/ j(/* @__PURE__ */ c({
682
+ __name: "UiToolIntro",
683
+ setup(e) {
684
+ return (e, t) => (m(), i("p", mt, [_(e.$slots, "default", {}, void 0, !0)]));
685
+ }
686
+ }), [["__scopeId", "data-v-9a5436b9"]]), gt = { class: "mw-panel" }, _t = /*#__PURE__*/ j(/* @__PURE__ */ c({
687
+ __name: "UiPanel",
688
+ props: {
689
+ title: {},
690
+ level: { default: 2 }
691
+ },
692
+ setup(e) {
693
+ let a = e, s = w(), c = t(() => !!(a.title || s.title));
694
+ return (t, a) => (m(), i("section", gt, [c.value ? (m(), n(v(`h${e.level}`), {
695
+ key: 0,
696
+ class: "mw-panel__title"
697
+ }, {
698
+ default: D(() => [_(t.$slots, "title", {}, () => [o(y(e.title), 1)], !0)]),
699
+ _: 3
700
+ })) : r("", !0), _(t.$slots, "default", {}, void 0, !0)]));
701
+ }
702
+ }), [["__scopeId", "data-v-62fac524"]]), vt = /*#__PURE__*/ j(/* @__PURE__ */ c({
703
+ __name: "UiBadge",
704
+ props: { variant: { default: "neutral" } },
705
+ setup(e) {
706
+ return (t, n) => (m(), i("span", { class: u(["mw-badge", `mw-badge--${e.variant}`]) }, [_(t.$slots, "default", {}, void 0, !0)], 2));
707
+ }
708
+ }), [["__scopeId", "data-v-5aa44ef5"]]), yt = {
709
+ type: "button",
710
+ class: "mw-toolbar-btn"
711
+ }, V = /*#__PURE__*/ j(/* @__PURE__ */ c({
712
+ __name: "UiToolbarButton",
713
+ setup(e) {
714
+ return (e, t) => (m(), i("button", yt, [_(e.$slots, "default", {}, void 0, !0)]));
715
+ }
716
+ }), [["__scopeId", "data-v-d5f19134"]]), bt = { class: "mw-toolbar" }, xt = /*#__PURE__*/ j(/* @__PURE__ */ c({
717
+ __name: "UiToolbar",
718
+ props: { actions: {} },
719
+ emits: ["action"],
720
+ setup(t, { emit: n }) {
721
+ let r = n;
722
+ return (n, a) => (m(), i("menu", bt, [(m(!0), i(e, null, g(t.actions, (e) => (m(), i("li", { key: e.id }, [s(V, {
723
+ disabled: e.disabled,
724
+ onClick: (t) => r("action", e.id)
725
+ }, {
726
+ default: D(() => [o(y(e.label), 1)]),
727
+ _: 2
728
+ }, 1032, ["disabled", "onClick"])]))), 128))]));
729
+ }
730
+ }), [["__scopeId", "data-v-170c8eb5"]]), St = { class: "mw-stat-grid" }, Ct = /*#__PURE__*/ j(/* @__PURE__ */ c({
731
+ __name: "UiStatGrid",
732
+ setup(e) {
733
+ return (e, t) => (m(), i("dl", St, [_(e.$slots, "default", {}, void 0, !0)]));
734
+ }
735
+ }), [["__scopeId", "data-v-3608575d"]]), wt = { class: "mw-stat-grid__label" }, Tt = /*#__PURE__*/ j(/* @__PURE__ */ c({
736
+ __name: "UiStatRow",
737
+ props: {
738
+ label: {},
739
+ align: { default: "right" }
740
+ },
741
+ setup(t) {
742
+ return (n, r) => (m(), i(e, null, [a("dt", wt, y(t.label), 1), a("dd", { class: u(["mw-stat-grid__value", { "mw-stat-grid__value--left": t.align === "left" }]) }, [_(n.$slots, "default", {}, void 0, !0)], 2)], 64));
743
+ }
744
+ }), [["__scopeId", "data-v-829f7772"]]), Et = { class: "mw-data-table-wrap" }, Dt = { class: "mw-data-table" }, Ot = {
745
+ key: 0,
746
+ class: "mw-data-table__empty"
747
+ }, kt = /*#__PURE__*/ j(/* @__PURE__ */ c({
748
+ __name: "UiDataTable",
749
+ props: { empty: {} },
750
+ setup(e) {
751
+ let t = w();
752
+ return (n, o) => (m(), i("div", Et, [a("table", Dt, [a("thead", null, [a("tr", null, [_(n.$slots, "head", {}, void 0, !0)])]), a("tbody", null, [_(n.$slots, "default", {}, void 0, !0)])]), e.empty && !t.default ? (m(), i("p", Ot, y(e.empty), 1)) : r("", !0)]));
753
+ }
754
+ }), [["__scopeId", "data-v-de139c21"]]), H = /*#__PURE__*/ j(/* @__PURE__ */ c({
755
+ __name: "UiStatusDot",
756
+ props: { status: { default: "ok" } },
757
+ setup(e) {
758
+ return (t, n) => (m(), i("span", {
759
+ class: u(["mw-status-dot", `mw-status-dot--${e.status}`]),
760
+ "aria-hidden": "true"
761
+ }, null, 2));
762
+ }
763
+ }), [["__scopeId", "data-v-62e9a7cc"]]), At = {
764
+ role: "list",
765
+ class: "mw-statusbar",
766
+ "aria-label": "Status"
767
+ }, jt = { key: 0 }, Mt = { class: "mw-visually-hidden" }, Nt = { key: 0 }, Pt = {
768
+ key: 1,
769
+ class: "mw-statusbar__pending"
770
+ }, Ft = { key: 0 }, It = {
771
+ key: 1,
772
+ class: "mw-statusbar__pending"
773
+ }, Lt = /*#__PURE__*/ j(/* @__PURE__ */ c({
774
+ __name: "UiStatusBar",
775
+ props: {
776
+ network: {},
777
+ healthy: {
778
+ type: Boolean,
779
+ default: !0
780
+ },
781
+ epoch: {},
782
+ lastRefresh: {}
783
+ },
784
+ setup(n) {
785
+ let c = n, l = t(() => c.network ? c.network.charAt(0).toUpperCase() + c.network.slice(1) : "");
786
+ function u(e) {
787
+ let t = Math.floor((Date.now() - e.getTime()) / 1e3);
788
+ return t < 5 ? "just now" : t < 60 ? `${t}s ago` : `${Math.floor(t / 60)}m ago`;
789
+ }
790
+ return (t, c) => (m(), i("ul", At, [
791
+ n.network ? (m(), i("li", jt, [
792
+ s(H, { status: n.healthy ? "ok" : "error" }, null, 8, ["status"]),
793
+ o(" " + y(l.value) + " ", 1),
794
+ a("span", Mt, "(" + y(n.healthy ? "status OK" : "status error") + ")", 1)
795
+ ])) : r("", !0),
796
+ n.epoch === void 0 ? r("", !0) : (m(), i(e, { key: 1 }, [n.epoch === null ? (m(), i("li", Pt, "Epoch —")) : (m(), i("li", Nt, "Epoch " + y(n.epoch), 1))], 64)),
797
+ n.lastRefresh === void 0 ? r("", !0) : (m(), i(e, { key: 2 }, [n.lastRefresh ? (m(), i("li", Ft, "Refreshed " + y(u(n.lastRefresh)), 1)) : (m(), i("li", It, "Loading…"))], 64)),
798
+ _(t.$slots, "default", {}, void 0, !0)
556
799
  ]));
557
800
  }
558
- }), [["__scopeId", "data-v-c22333c7"]]), ct = /* @__PURE__ */ new Set([
801
+ }), [["__scopeId", "data-v-cb4a19b8"]]), Rt = {
802
+ class: "mw-feed",
803
+ role: "list"
804
+ }, zt = /*#__PURE__*/ j(/* @__PURE__ */ c({
805
+ __name: "UiActivityFeed",
806
+ setup(e) {
807
+ return (e, t) => (m(), i("ul", Rt, [_(e.$slots, "default", {}, void 0, !0)]));
808
+ }
809
+ }), [["__scopeId", "data-v-9e578c9d"]]), Bt = { class: "mw-feed__item" }, Vt = ["datetime"], Ht = {
810
+ key: 1,
811
+ class: "mw-feed__meta"
812
+ }, Ut = /*#__PURE__*/ j(/* @__PURE__ */ c({
813
+ __name: "UiActivityItem",
814
+ props: {
815
+ type: {},
816
+ time: {},
817
+ datetime: {}
818
+ },
819
+ setup(e) {
820
+ return (t, n) => (m(), i("li", Bt, [_(t.$slots, "type", {}, () => [o(y(e.type), 1)], !0), e.datetime ? (m(), i("time", {
821
+ key: 0,
822
+ class: "mw-feed__meta",
823
+ datetime: e.datetime
824
+ }, [_(t.$slots, "time", {}, () => [o(y(e.time), 1)], !0)], 8, Vt)) : (m(), i("small", Ht, [_(t.$slots, "time", {}, () => [o(y(e.time), 1)], !0)]))]));
825
+ }
826
+ }), [["__scopeId", "data-v-797b66a9"]]), Wt = /* @__PURE__ */ new Set([
559
827
  "operational",
560
828
  "degraded",
561
829
  "down",
562
830
  "unknown"
563
831
  ]);
832
+ function U(e) {
833
+ return typeof e == "string" && Wt.has(e);
834
+ }
564
835
  function W(e) {
565
- return typeof e == "string" && ct.has(e);
836
+ return U(e) ? e : "unknown";
566
837
  }
567
838
  function G(e) {
568
- return W(e) ? e : "unknown";
569
- }
570
- function K(e) {
571
839
  return typeof e != "string" || e.trim() === "" ? "" : e.replace(/[<>&"]/g, "");
572
840
  }
573
- function lt(e) {
841
+ function Gt(e) {
574
842
  if (typeof e != "object" || !e) return null;
575
- let t = e, n = K(t.name);
843
+ let t = e, n = G(t.name);
576
844
  return n ? {
577
845
  name: n,
578
- status: G(t.status)
846
+ status: W(t.status)
579
847
  } : null;
580
848
  }
581
- function ut(e) {
849
+ function Kt(e) {
582
850
  if (typeof e != "object" || !e) return null;
583
- let t = e, n = K(t.name);
851
+ let t = e, n = G(t.name);
584
852
  if (!n) return null;
585
- let r = Array.isArray(t.components) ? t.components.map(lt).filter((e) => e !== null) : [];
853
+ let r = Array.isArray(t.components) ? t.components.map(Gt).filter((e) => e !== null) : [];
586
854
  return {
587
855
  name: n,
588
- status: G(t.status),
856
+ status: W(t.status),
589
857
  components: r
590
858
  };
591
859
  }
592
- function q(e) {
860
+ function K(e) {
593
861
  if (typeof e != "object" || !e) return null;
594
862
  let t = e;
595
- if (!W(t.overall) || typeof t.generated_at != "string" || !Array.isArray(t.groups)) return null;
596
- let n = t.groups.map(ut).filter((e) => e !== null);
863
+ if (!U(t.overall) || typeof t.generated_at != "string" || !Array.isArray(t.groups)) return null;
864
+ let n = t.groups.map(Kt).filter((e) => e !== null);
597
865
  return {
598
866
  generated_at: t.generated_at,
599
867
  overall: t.overall,
@@ -602,7 +870,7 @@ function q(e) {
602
870
  }
603
871
  //#endregion
604
872
  //#region src/components/StatusWidget.vue?vue&type=script&setup=true&lang.ts
605
- var dt = ["href", "title"], ft = { class: "status-widget__label" }, pt = /*#__PURE__*/ y(/* @__PURE__ */ s({
873
+ var q = ["href", "title"], qt = /*#__PURE__*/ j(/* @__PURE__ */ c({
606
874
  __name: "StatusWidget",
607
875
  props: {
608
876
  apiUrl: { default: "https://status.meddleware.co.uk/api/status" },
@@ -620,54 +888,51 @@ var dt = ["href", "title"], ft = { class: "status-widget__label" }, pt = /*#__PU
620
888
  degraded: "Degraded",
621
889
  down: "Major outage",
622
890
  unknown: "Status unknown"
623
- }, o = p("ok"), s = p("All systems operational"), c = null;
624
- async function u() {
891
+ }, a = h("ok"), o = h("All systems operational"), s = null;
892
+ async function c() {
625
893
  try {
626
894
  let e = await fetch(t.apiUrl);
627
895
  if (!e.ok) throw Error(`HTTP ${e.status}`);
628
- let i = q(await e.json());
896
+ let i = K(await e.json());
629
897
  if (!i) throw Error("unexpected response shape");
630
- o.value = n[i.overall], s.value = r[i.overall];
898
+ a.value = n[i.overall], o.value = r[i.overall];
631
899
  } catch {
632
- o.value = "error", s.value = "Status unavailable";
900
+ a.value = "error", o.value = "Status unavailable";
633
901
  }
634
902
  }
635
- return ee(() => {
636
- u(), c = setInterval(u, t.pollInterval);
637
- }), d(() => {
638
- c !== null && clearInterval(c);
639
- }), (t, n) => (f(), i("a", {
640
- href: _(T)(e.href),
903
+ return f(() => {
904
+ c(), s = setInterval(c, t.pollInterval);
905
+ }), p(() => {
906
+ s !== null && clearInterval(s);
907
+ }), (t, n) => (m(), i("a", {
908
+ href: b(M)(e.href),
641
909
  target: "_blank",
642
910
  rel: "noopener noreferrer",
643
- class: l(["status-widget", `status-widget--${o.value}`]),
644
- title: `Platform status: ${s.value}`
645
- }, [n[0] ||= a("span", {
646
- class: "status-widget__dot",
647
- "aria-hidden": "true"
648
- }, null, -1), a("span", ft, g(s.value), 1)], 10, dt));
911
+ class: u(["status-widget", `status-widget--${a.value}`]),
912
+ title: `Platform status: ${o.value}`
913
+ }, y(o.value), 11, q));
649
914
  }
650
- }), [["__scopeId", "data-v-6436368e"]]), J = {
915
+ }), [["__scopeId", "data-v-6562bc0e"]]), J = {
651
916
  mainnet: "https://suivision.xyz",
652
917
  testnet: "https://testnet.suivision.xyz",
653
918
  devnet: "https://devnet.suivision.xyz"
654
919
  };
655
- function mt(e, t, n = "testnet") {
920
+ function Jt(e, t, n = "testnet") {
656
921
  return `${J[n] ?? J.testnet}/${e}/${t}`;
657
922
  }
658
923
  //#endregion
659
924
  //#region src/composables/useColorMode.ts
660
- var Y = "mw-color-mode", X = p("system"), Z = !1;
661
- function ht() {
925
+ var Y = "mw-color-mode", X = h("system"), Z = !1;
926
+ function Yt() {
662
927
  return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches;
663
928
  }
664
929
  function Q(e) {
665
- return e === "dark" || e === "system" && ht();
930
+ return e === "dark" || e === "system" && Yt();
666
931
  }
667
932
  function $(e) {
668
933
  typeof document < "u" && document.documentElement.setAttribute("data-theme", Q(e) ? "dark" : "light");
669
934
  }
670
- function gt(e = "system") {
935
+ function Xt(e = "system") {
671
936
  if (!Z) {
672
937
  Z = !0;
673
938
  let t = null;
@@ -676,7 +941,7 @@ function gt(e = "system") {
676
941
  } catch {}
677
942
  X.value = t ?? e, $(X.value), typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
678
943
  X.value === "system" && $("system");
679
- }), ie(X, (e) => {
944
+ }), E(X, (e) => {
680
945
  $(e);
681
946
  try {
682
947
  typeof localStorage < "u" && localStorage.setItem(Y, e);
@@ -698,10 +963,10 @@ function gt(e = "system") {
698
963
  }
699
964
  //#endregion
700
965
  //#region src/composables/useSeason.ts
701
- function _t() {
966
+ function Zt() {
702
967
  if (typeof document > "u") return;
703
968
  let e = (/* @__PURE__ */ new Date()).getMonth(), t = e >= 2 && e <= 4 ? "spring" : e >= 5 && e <= 7 ? "summer" : e >= 8 && e <= 10 ? "autumn" : "winter";
704
969
  document.documentElement.dataset.season = t;
705
970
  }
706
971
  //#endregion
707
- export { j as AppFooter, de as AppHeader, w as AppSidebar, Oe as AppTabNav, I as ColorModeControl, Ne as CopyableAddress, Ue as CopyrightLine, Fe as ExplorerLink, Te as SidebarGroup, xe as SidebarItem, pt as StatusWidget, R as UiButton, pe as UiCard, nt as UiFieldHint, st as UiFormField, _e as UiNotice, Qe as UiSegmentedControl, he as UiSelect, Je as UiStepper, W as isStatusLevel, q as parseSnapshot, T as safeHref, mt as suiExplorerUrl, gt as useColorMode, _t as useSeason };
972
+ export { oe as AppFooter, ee as AppHeader, ne as AppSidebar, Se as AppTabNav, de as ColorModeControl, Le as CopyableAddress, qe as CopyrightLine, ze as ExplorerLink, ye as SidebarGroup, _e as SidebarItem, qt as StatusWidget, zt as UiActivityFeed, Ut as UiActivityItem, vt as UiBadge, pe as UiButton, I as UiCard, kt as UiDataTable, je as UiDialog, ct as UiFieldHint, pt as UiFormField, z as UiNotice, _t as UiPanel, it as UiSegmentedControl, L as UiSelect, Ct as UiStatGrid, Tt as UiStatRow, Lt as UiStatusBar, H as UiStatusDot, $e as UiStepper, we as UiTabPanel, ht as UiToolIntro, xt as UiToolbar, V as UiToolbarButton, U as isStatusLevel, K as parseSnapshot, M as safeHref, Jt as suiExplorerUrl, B as tabIds, Xt as useColorMode, Zt as useSeason };