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