@meddleware/ui 0.1.10 → 0.1.12

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/base.css CHANGED
@@ -1,2 +1,2 @@
1
- *,:before,:after{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg);min-height:100vh;color:var(--text);font-family:var(--mw-font-sans);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;font-size:16px;line-height:1.55}:where(ul,ol):where([role=list],[role=listitem]){margin:0;padding:0;list-style:none}:where(img,svg,video,canvas){max-width:100%;display:block}:where(fieldset){border:0;margin:0;padding:0}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}:where(button,input,select,textarea){font-family:inherit}:where(a,button,input,select,textarea):focus-visible{outline:2px solid var(--accent);outline-offset:2px}.mw-mono{font-family:var(--mw-font-mono)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.001ms!important;animation-duration:.001ms!important}}.mw-header[data-v-ad7cd1c5]{height:var(--mw-header-height,56px);background:var(--_bg);color:var(--_text);border-bottom:1px solid var(--_border);font-family:var(--mw-font-sans);align-items:center;gap:1rem;padding:0 1rem;display:flex}.mw-header--sticky[data-v-ad7cd1c5]{z-index:50;position:sticky;top:0}.mw-header__brand[data-v-ad7cd1c5]{letter-spacing:.01em;white-space:nowrap;align-items:center;gap:.5rem;font-weight:650;display:flex}.mw-header__center[data-v-ad7cd1c5]{flex:auto;min-width:0}.mw-header__actions[data-v-ad7cd1c5]{align-items:center;gap:.5rem;margin-left:auto;display:flex}.mw-sidebar[data-v-23c3c7f3]{height:100%;width:var(--mw-sidebar-width,240px);background:var(--_bg);color:var(--_text);border-right:1px solid var(--_border);font-family:var(--mw-font-sans);flex-direction:column;display:flex}.mw-sidebar__head[data-v-23c3c7f3]{border-bottom:1px solid var(--_border);padding:1rem}.mw-sidebar__nav[data-v-23c3c7f3]{flex-direction:column;flex:auto;gap:.25rem;padding:.75rem;display:flex;overflow-y:auto}.mw-sidebar__body[data-v-23c3c7f3]{flex-shrink:0}.mw-sidebar__foot[data-v-23c3c7f3]{border-top:1px solid var(--_border);color:var(--_muted);padding:.75rem 1rem;font-size:.85rem}.mw-footer[data-v-c646b8e1]{background:var(--_bg);color:var(--_muted);border-top:1px solid var(--_border);font-family:var(--mw-font-sans);flex-wrap:wrap;align-items:center;gap:1rem;padding:.75rem 1rem;font-size:.85rem;display:flex}.mw-footer--transparent[data-v-c646b8e1]{border-top:1px solid var(--border)}.mw-footer__center[data-v-c646b8e1]{flex:auto;min-width:0}.mw-footer__end[data-v-c646b8e1]{margin-left:auto}.mw-mode[data-v-186f8312]{border:1px solid var(--_border,var(--border));border-radius:var(--mw-radius,10px);background:color-mix(in srgb, var(--_text,var(--text)) 6%, transparent);gap:2px;padding:2px;display:inline-flex}.mw-mode__btn[data-v-186f8312]{border-radius:calc(var(--mw-radius,10px) - 3px);color:var(--_text,var(--text));font:inherit;cursor:pointer;opacity:.7;background:0 0;border:0;align-items:center;gap:.35rem;padding:.25rem .5rem;font-size:.8rem;display:inline-flex}.mw-mode__btn[data-v-186f8312]:hover{opacity:1}.mw-mode__btn.is-active[data-v-186f8312]{opacity:1;background:color-mix(in srgb, var(--_text,var(--text)) 14%, transparent)}.mw-mode__btn[data-v-186f8312]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}@media (width<=640px){.mw-mode__label[data-v-186f8312]{display:none}}.mw-btn[data-v-299de2c3]{border-radius:var(--mw-radius,10px);font:inherit;cursor:pointer;border:1px solid #0000;justify-content:center;align-items:center;gap:.4rem;padding:.5rem .9rem;font-weight:550;transition:filter .12s,background .12s;display:inline-flex}.mw-btn[data-v-299de2c3]:disabled{opacity:.55;cursor:not-allowed}.mw-btn[data-v-299de2c3]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.mw-btn--primary[data-v-299de2c3]{background:var(--accent);color:var(--accent-contrast)}.mw-btn--primary[data-v-299de2c3]:not(:disabled):hover{filter:brightness(1.08)}.mw-btn--secondary[data-v-299de2c3]{background:var(--secondary);color:var(--secondary-contrast)}.mw-btn--secondary[data-v-299de2c3]:not(:disabled):hover{filter:brightness(1.08)}.mw-btn--ghost[data-v-299de2c3]{color:var(--text);border-color:var(--border);background:0 0}.mw-btn--ghost[data-v-299de2c3]:not(:disabled):hover{background:var(--lift)}.mw-btn--danger[data-v-299de2c3]{background:var(--danger);color:var(--mw-neutral-000)}.mw-btn--danger[data-v-299de2c3]:not(:disabled):hover{filter:brightness(1.08)}.mw-card[data-v-fd2fd7ab]{background:var(--surface);border:1px solid var(--border);border-radius:var(--mw-radius,10px);color:var(--text);overflow:hidden}.mw-card__header[data-v-fd2fd7ab]{border-bottom:1px solid var(--border);padding:.85rem 1rem}.mw-card__title[data-v-fd2fd7ab]{margin:0;font-size:1rem;font-weight:600}.mw-card__body[data-v-fd2fd7ab]{padding:1rem}.mw-card__footer[data-v-fd2fd7ab]{border-top:1px solid var(--border);background:var(--lift);padding:.75rem 1rem}.mw-select[data-v-b9468387]{position:relative}.mw-select select[data-v-b9468387]{appearance:none;background:var(--surface);width:100%;color:var(--text);border:1px solid var(--border);border-radius:var(--mw-radius,10px);font:inherit;padding:.5rem 2.5rem .5rem .7rem}.mw-select select[data-v-b9468387]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.mw-select__chevron[data-v-b9468387]{pointer-events:none;stroke:var(--muted);stroke-width:1.5px;fill:none;position:absolute;top:50%;right:.75rem;transform:translateY(-50%)}.mw-notice[data-v-6f53d0be]{border:1px solid var(--border);border-radius:var(--mw-radius,10px);background:var(--lift);color:var(--text);border-left-width:3px;margin:0;padding:.6rem .8rem;font-size:.9rem}.mw-notice--error[data-v-6f53d0be]{border-left-color:var(--danger);color:var(--danger);background:color-mix(in srgb, var(--danger) 8%, transparent)}.mw-notice--ok[data-v-6f53d0be]{border-left-color:var(--ok);color:var(--ok);background:color-mix(in srgb, var(--ok) 8%, transparent)}.sidebar-item[data-v-e15afdf7]{border-radius:var(--mw-radius,10px);width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;opacity:.85;background:0 0;border:0;align-items:center;gap:.6rem;padding:.55rem .7rem;display:flex}.sidebar-item[data-v-e15afdf7]:hover:not(:disabled){background:color-mix(in srgb, currentColor 10%, transparent);opacity:1}.sidebar-item.is-active[data-v-e15afdf7]{background:color-mix(in srgb, var(--accent) 26%, transparent);opacity:1}.sidebar-item[data-v-e15afdf7]:disabled{cursor:default}.sidebar-item[data-v-e15afdf7]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.sidebar-item__icon[data-v-e15afdf7]{text-align:center;width:1.1rem}.ca-root[data-v-08c3420b]{align-items:center;gap:.35em;display:inline-flex}.ca-value[data-v-08c3420b]{font-family:monospace;font-size:inherit}.ca-copy[data-v-08c3420b]{color:var(--muted,#888);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;line-height:1;transition:color .15s;display:inline-flex}.ca-copy[data-v-08c3420b]:hover{color:var(--text,#f0f0f0)}.ca-copy--copied[data-v-08c3420b]{color:var(--accent,#6366f1)}.ca-icon[data-v-08c3420b]{display:block}.el-root[data-v-7a44607e]{font-family:monospace;font-size:inherit;color:var(--accent,#6366f1);text-underline-offset:2px;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;transition:color .15s}.el-root[data-v-7a44607e]:hover{color:var(--text,#f0f0f0);text-decoration-style:solid}.status-widget[data-v-20197983]{color:inherit;opacity:.85;align-items:center;gap:.4rem;font-size:.8rem;text-decoration:none;display:inline-flex}.status-widget[data-v-20197983]:hover{opacity:1}.status-widget__dot[data-v-20197983]{border-radius:50%;flex-shrink:0;width:.55rem;height:.55rem}.status-widget--ok .status-widget__dot[data-v-20197983]{background:var(--mw-ok-500)}.status-widget--degraded .status-widget__dot[data-v-20197983]{background:var(--mw-gold-500)}.status-widget--error .status-widget__dot[data-v-20197983]{background:var(--mw-danger-500)}
1
+ *,:before,:after{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg);min-height:100vh;color:var(--text);font-family:var(--mw-font-sans);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;font-size:16px;line-height:1.55}:where(ul,ol):where([role=list],[role=listitem]){margin:0;padding:0;list-style:none}:where(img,svg,video,canvas){max-width:100%;display:block}:where(fieldset){border:0;margin:0;padding:0}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}:where(button,input,select,textarea){font-family:inherit}:where(a,button,input,select,textarea):focus-visible{outline:2px solid var(--accent);outline-offset:2px}.mw-mono{font-family:var(--mw-font-mono)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.001ms!important;animation-duration:.001ms!important}}.mw-header[data-v-ad7cd1c5]{height:var(--mw-header-height,56px);background:var(--_bg);color:var(--_text);border-bottom:1px solid var(--_border);font-family:var(--mw-font-sans);align-items:center;gap:1rem;padding:0 1rem;display:flex}.mw-header--sticky[data-v-ad7cd1c5]{z-index:50;position:sticky;top:0}.mw-header__brand[data-v-ad7cd1c5]{letter-spacing:.01em;white-space:nowrap;align-items:center;gap:.5rem;font-weight:650;display:flex}.mw-header__center[data-v-ad7cd1c5]{flex:auto;min-width:0}.mw-header__actions[data-v-ad7cd1c5]{align-items:center;gap:.5rem;margin-left:auto;display:flex}.mw-sidebar[data-v-23c3c7f3]{height:100%;width:var(--mw-sidebar-width,240px);background:var(--_bg);color:var(--_text);border-right:1px solid var(--_border);font-family:var(--mw-font-sans);flex-direction:column;display:flex}.mw-sidebar__head[data-v-23c3c7f3]{border-bottom:1px solid var(--_border);padding:1rem}.mw-sidebar__nav[data-v-23c3c7f3]{flex-direction:column;flex:auto;gap:.25rem;padding:.75rem;display:flex;overflow-y:auto}.mw-sidebar__body[data-v-23c3c7f3]{flex-shrink:0}.mw-sidebar__foot[data-v-23c3c7f3]{border-top:1px solid var(--_border);color:var(--_muted);padding:.75rem 1rem;font-size:.85rem}.mw-footer[data-v-88269247]{background:var(--_bg);color:var(--_muted);border-top:1px solid var(--_border);font-family:var(--mw-font-sans);flex-wrap:wrap;align-items:center;gap:1rem;padding:.75rem 1rem;font-size:.85rem;display:flex}.mw-footer--transparent[data-v-88269247]{border-top:1px solid var(--border)}.mw-footer__center[data-v-88269247]{flex:auto;min-width:0}.mw-footer__end[data-v-88269247]{align-items:center;gap:1rem;margin-left:auto;display:flex}.mw-footer__docs-link[data-v-88269247]{color:inherit;text-underline-offset:2px;opacity:.7;text-decoration:underline}.mw-footer__docs-link[data-v-88269247]:hover{opacity:1}.mw-mode[data-v-186f8312]{border:1px solid var(--_border,var(--border));border-radius:var(--mw-radius,10px);background:color-mix(in srgb, var(--_text,var(--text)) 6%, transparent);gap:2px;padding:2px;display:inline-flex}.mw-mode__btn[data-v-186f8312]{border-radius:calc(var(--mw-radius,10px) - 3px);color:var(--_text,var(--text));font:inherit;cursor:pointer;opacity:.7;background:0 0;border:0;align-items:center;gap:.35rem;padding:.25rem .5rem;font-size:.8rem;display:inline-flex}.mw-mode__btn[data-v-186f8312]:hover{opacity:1}.mw-mode__btn.is-active[data-v-186f8312]{opacity:1;background:color-mix(in srgb, var(--_text,var(--text)) 14%, transparent)}.mw-mode__btn[data-v-186f8312]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}@media (width<=640px){.mw-mode__label[data-v-186f8312]{display:none}}.mw-btn[data-v-299de2c3]{border-radius:var(--mw-radius,10px);font:inherit;cursor:pointer;border:1px solid #0000;justify-content:center;align-items:center;gap:.4rem;padding:.5rem .9rem;font-weight:550;transition:filter .12s,background .12s;display:inline-flex}.mw-btn[data-v-299de2c3]:disabled{opacity:.55;cursor:not-allowed}.mw-btn[data-v-299de2c3]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.mw-btn--primary[data-v-299de2c3]{background:var(--accent);color:var(--accent-contrast)}.mw-btn--primary[data-v-299de2c3]:not(:disabled):hover{filter:brightness(1.08)}.mw-btn--secondary[data-v-299de2c3]{background:var(--secondary);color:var(--secondary-contrast)}.mw-btn--secondary[data-v-299de2c3]:not(:disabled):hover{filter:brightness(1.08)}.mw-btn--ghost[data-v-299de2c3]{color:var(--text);border-color:var(--border);background:0 0}.mw-btn--ghost[data-v-299de2c3]:not(:disabled):hover{background:var(--lift)}.mw-btn--danger[data-v-299de2c3]{background:var(--danger);color:var(--mw-neutral-000)}.mw-btn--danger[data-v-299de2c3]:not(:disabled):hover{filter:brightness(1.08)}.mw-card[data-v-fd2fd7ab]{background:var(--surface);border:1px solid var(--border);border-radius:var(--mw-radius,10px);color:var(--text);overflow:hidden}.mw-card__header[data-v-fd2fd7ab]{border-bottom:1px solid var(--border);padding:.85rem 1rem}.mw-card__title[data-v-fd2fd7ab]{margin:0;font-size:1rem;font-weight:600}.mw-card__body[data-v-fd2fd7ab]{padding:1rem}.mw-card__footer[data-v-fd2fd7ab]{border-top:1px solid var(--border);background:var(--lift);padding:.75rem 1rem}.mw-select[data-v-b9468387]{position:relative}.mw-select select[data-v-b9468387]{appearance:none;background:var(--surface);width:100%;color:var(--text);border:1px solid var(--border);border-radius:var(--mw-radius,10px);font:inherit;padding:.5rem 2.5rem .5rem .7rem}.mw-select select[data-v-b9468387]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.mw-select__chevron[data-v-b9468387]{pointer-events:none;stroke:var(--muted);stroke-width:1.5px;fill:none;position:absolute;top:50%;right:.75rem;transform:translateY(-50%)}.mw-notice[data-v-6f53d0be]{border:1px solid var(--border);border-radius:var(--mw-radius,10px);background:var(--lift);color:var(--text);border-left-width:3px;margin:0;padding:.6rem .8rem;font-size:.9rem}.mw-notice--error[data-v-6f53d0be]{border-left-color:var(--danger);color:var(--danger);background:color-mix(in srgb, var(--danger) 8%, transparent)}.mw-notice--ok[data-v-6f53d0be]{border-left-color:var(--ok);color:var(--ok);background:color-mix(in srgb, var(--ok) 8%, transparent)}.sidebar-item[data-v-cc70da78]{border-radius:var(--mw-radius,10px);width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;opacity:.85;background:0 0;border:0;align-items:center;gap:.6rem;padding:.55rem .7rem;display:flex}.sidebar-item[data-v-cc70da78]:hover:not(:disabled){background:color-mix(in srgb, currentColor 10%, transparent);opacity:1}.sidebar-item.is-active[data-v-cc70da78]{background:color-mix(in srgb, var(--accent) 26%, transparent);opacity:1}.sidebar-item[data-v-cc70da78]:disabled{cursor:default}.sidebar-item[data-v-cc70da78]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.sidebar-item__icon[data-v-cc70da78]{text-align:center;width:1.1rem}.mw-tab-nav[data-v-7c93ad15]{border-bottom:2px solid var(--border);gap:.25rem;display:flex}.mw-tab-nav__tab[data-v-7c93ad15]{appearance:none;cursor:pointer;color:var(--muted);background:0 0;border:none;border-bottom:2px solid #0000;margin-bottom:-2px;padding:.5rem 1rem;font-size:.95rem;transition:color .1s,border-color .1s}.mw-tab-nav__tab[data-v-7c93ad15]:hover{color:var(--text)}.mw-tab-nav__tab--active[data-v-7c93ad15]{border-bottom-color:var(--accent);color:var(--text);font-weight:600}.ca-root[data-v-08c3420b]{align-items:center;gap:.35em;display:inline-flex}.ca-value[data-v-08c3420b]{font-family:monospace;font-size:inherit}.ca-copy[data-v-08c3420b]{color:var(--muted,#888);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;line-height:1;transition:color .15s;display:inline-flex}.ca-copy[data-v-08c3420b]:hover{color:var(--text,#f0f0f0)}.ca-copy--copied[data-v-08c3420b]{color:var(--accent,#6366f1)}.ca-icon[data-v-08c3420b]{display:block}.el-root[data-v-7a44607e]{font-family:monospace;font-size:inherit;color:var(--accent,#6366f1);text-underline-offset:2px;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;transition:color .15s}.el-root[data-v-7a44607e]:hover{color:var(--text,#f0f0f0);text-decoration-style:solid}.status-widget[data-v-20197983]{color:inherit;opacity:.85;align-items:center;gap:.4rem;font-size:.8rem;text-decoration:none;display:inline-flex}.status-widget[data-v-20197983]:hover{opacity:1}.status-widget__dot[data-v-20197983]{border-radius:50%;flex-shrink:0;width:.55rem;height:.55rem}.status-widget--ok .status-widget__dot[data-v-20197983]{background:var(--mw-ok-500)}.status-widget--degraded .status-widget__dot[data-v-20197983]{background:var(--mw-gold-500)}.status-widget--error .status-widget__dot[data-v-20197983]{background:var(--mw-danger-500)}
2
2
  /*$vite$:1*/
@@ -4,6 +4,11 @@ type __VLS_Props = {
4
4
  variant?: PanelVariant;
5
5
  /** Per-instance colour overrides; token values are used by default. */
6
6
  colors?: PanelColors;
7
+ /**
8
+ * When set, renders a "Documentation" link pointing at this URL.
9
+ * Use `VITE_DOCS_URL` in the consuming app to make this configurable per deployment.
10
+ */
11
+ docsUrl?: string;
7
12
  };
8
13
  declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
9
14
  type __VLS_Slots = {} & {
@@ -0,0 +1,16 @@
1
+ export interface AppTab {
2
+ id: string;
3
+ label: string;
4
+ }
5
+ type __VLS_Props = {
6
+ tabs: AppTab[];
7
+ modelValue: string;
8
+ ariaLabel?: string;
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:modelValue": (id: string) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ "onUpdate:modelValue"?: ((id: string) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,8 @@ export { default as UiCard } from './components/UiCard.vue';
8
8
  export { default as UiSelect } from './components/UiSelect.vue';
9
9
  export { default as UiNotice } from './components/UiNotice.vue';
10
10
  export { default as SidebarItem } from './components/SidebarItem.vue';
11
+ export { default as AppTabNav } from './components/AppTabNav.vue';
12
+ export type { AppTab } from './components/AppTabNav.vue';
11
13
  export { default as CopyableAddress } from './components/CopyableAddress.vue';
12
14
  export { default as ExplorerLink } from './components/ExplorerLink.vue';
13
15
  export { default as StatusWidget } from './components/StatusWidget.vue';
package/dist/ui.js CHANGED
@@ -83,32 +83,39 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
83
83
  t.$slots.foot ? (d(), r("div", S, [m(t.$slots, "foot", {}, void 0, !0)])) : n("", !0)
84
84
  ], 6));
85
85
  }
86
- }), [["__scopeId", "data-v-23c3c7f3"]]), w = { class: "mw-footer__start" }, T = { class: "mw-footer__center" }, E = { class: "mw-footer__end" }, D = /*#__PURE__*/ _(/* @__PURE__ */ o({
86
+ }), [["__scopeId", "data-v-23c3c7f3"]]), w = { class: "mw-footer__start" }, T = { class: "mw-footer__center" }, E = { class: "mw-footer__end" }, D = ["href"], O = /*#__PURE__*/ _(/* @__PURE__ */ o({
87
87
  __name: "AppFooter",
88
88
  props: {
89
89
  variant: { default: "transparent" },
90
- colors: {}
90
+ colors: {},
91
+ docsUrl: {}
91
92
  },
92
93
  setup(e) {
93
- let n = e, a = t(() => g(n.variant, n.colors));
94
- return (t, n) => (d(), r("footer", {
94
+ let a = e, o = t(() => g(a.variant, a.colors));
95
+ return (t, a) => (d(), r("footer", {
95
96
  class: c(["mw-footer", `mw-footer--${e.variant}`]),
96
- style: l(a.value)
97
+ style: l(o.value)
97
98
  }, [
98
99
  i("div", w, [m(t.$slots, "start", {}, void 0, !0)]),
99
100
  i("div", T, [m(t.$slots, "default", {}, void 0, !0)]),
100
- i("div", E, [m(t.$slots, "end", {}, void 0, !0)])
101
+ i("div", E, [m(t.$slots, "end", {}, void 0, !0), e.docsUrl ? (d(), r("a", {
102
+ key: 0,
103
+ href: e.docsUrl,
104
+ target: "_blank",
105
+ rel: "noopener noreferrer",
106
+ class: "mw-footer__docs-link"
107
+ }, "Documentation", 8, D)) : n("", !0)])
101
108
  ], 6));
102
109
  }
103
- }), [["__scopeId", "data-v-c646b8e1"]]), O = {
110
+ }), [["__scopeId", "data-v-88269247"]]), k = {
104
111
  class: "mw-mode",
105
112
  role: "group",
106
113
  "aria-label": "Colour mode"
107
- }, k = [
114
+ }, A = [
108
115
  "aria-pressed",
109
116
  "title",
110
117
  "onClick"
111
- ], A = { "aria-hidden": "true" }, j = { class: "mw-mode__label" }, M = /*#__PURE__*/ _(/* @__PURE__ */ o({
118
+ ], j = { "aria-hidden": "true" }, M = { class: "mw-mode__label" }, N = /*#__PURE__*/ _(/* @__PURE__ */ o({
112
119
  __name: "ColorModeControl",
113
120
  props: {
114
121
  modelValue: {},
@@ -129,16 +136,16 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
129
136
  dark: "☾",
130
137
  system: "🖵"
131
138
  };
132
- return (o, s) => (d(), r("div", O, [(d(!0), r(e, null, p(t.modes, (e) => (d(), r("button", {
139
+ return (o, s) => (d(), r("div", k, [(d(!0), r(e, null, p(t.modes, (e) => (d(), r("button", {
133
140
  key: e,
134
141
  type: "button",
135
142
  class: c(["mw-mode__btn", { "is-active": t.modelValue === e }]),
136
143
  "aria-pressed": t.modelValue === e,
137
144
  title: n[e],
138
145
  onClick: (t) => o.$emit("update:modelValue", e)
139
- }, [i("span", A, h(a[e]), 1), i("span", j, h(n[e]), 1)], 10, k))), 128))]));
146
+ }, [i("span", j, h(a[e]), 1), i("span", M, h(n[e]), 1)], 10, A))), 128))]));
140
147
  }
141
- }), [["__scopeId", "data-v-186f8312"]]), N = ["type", "disabled"], P = /*#__PURE__*/ _(/* @__PURE__ */ o({
148
+ }), [["__scopeId", "data-v-186f8312"]]), P = ["type", "disabled"], F = /*#__PURE__*/ _(/* @__PURE__ */ o({
142
149
  __name: "UiButton",
143
150
  props: {
144
151
  variant: { default: "primary" },
@@ -153,25 +160,25 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
153
160
  type: e.type,
154
161
  disabled: e.disabled,
155
162
  class: c(["mw-btn", `mw-btn--${e.variant}`])
156
- }, [m(t.$slots, "default", {}, void 0, !0)], 10, N));
163
+ }, [m(t.$slots, "default", {}, void 0, !0)], 10, P));
157
164
  }
158
- }), [["__scopeId", "data-v-299de2c3"]]), F = { class: "mw-card" }, I = {
165
+ }), [["__scopeId", "data-v-299de2c3"]]), I = { class: "mw-card" }, L = {
159
166
  key: 0,
160
167
  class: "mw-card__header"
161
- }, L = { class: "mw-card__title" }, R = { class: "mw-card__body" }, z = {
168
+ }, R = { class: "mw-card__title" }, z = { class: "mw-card__body" }, B = {
162
169
  key: 1,
163
170
  class: "mw-card__footer"
164
- }, B = /*#__PURE__*/ _(/* @__PURE__ */ o({
171
+ }, V = /*#__PURE__*/ _(/* @__PURE__ */ o({
165
172
  __name: "UiCard",
166
173
  props: { title: {} },
167
174
  setup(e) {
168
- return (t, a) => (d(), r("section", F, [
169
- e.title || t.$slots.header ? (d(), r("header", I, [m(t.$slots, "header", {}, () => [i("h3", L, h(e.title), 1)], !0)])) : n("", !0),
170
- i("div", R, [m(t.$slots, "default", {}, void 0, !0)]),
171
- t.$slots.footer ? (d(), r("footer", z, [m(t.$slots, "footer", {}, void 0, !0)])) : n("", !0)
175
+ return (t, a) => (d(), r("section", I, [
176
+ e.title || t.$slots.header ? (d(), r("header", L, [m(t.$slots, "header", {}, () => [i("h3", R, h(e.title), 1)], !0)])) : n("", !0),
177
+ i("div", z, [m(t.$slots, "default", {}, void 0, !0)]),
178
+ t.$slots.footer ? (d(), r("footer", B, [m(t.$slots, "footer", {}, void 0, !0)])) : n("", !0)
172
179
  ]));
173
180
  }
174
- }), [["__scopeId", "data-v-fd2fd7ab"]]), le = { class: "mw-select" }, V = /*#__PURE__*/ _(/* @__PURE__ */ o({
181
+ }), [["__scopeId", "data-v-fd2fd7ab"]]), H = { class: "mw-select" }, U = /*#__PURE__*/ _(/* @__PURE__ */ o({
175
182
  inheritAttrs: !1,
176
183
  __name: "UiSelect",
177
184
  props: {
@@ -181,7 +188,7 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
181
188
  emits: ["update:modelValue"],
182
189
  setup(e) {
183
190
  let t = te(e, "modelValue");
184
- return (e, n) => (d(), r("div", le, [ie(i("select", s(e.$attrs, { "onUpdate:modelValue": n[0] ||= (e) => t.value = e }), [m(e.$slots, "default", {}, void 0, !0)], 16), [[ne, t.value]]), n[1] ||= i("svg", {
191
+ return (e, n) => (d(), r("div", H, [ie(i("select", s(e.$attrs, { "onUpdate:modelValue": n[0] ||= (e) => t.value = e }), [m(e.$slots, "default", {}, void 0, !0)], 16), [[ne, t.value]]), n[1] ||= i("svg", {
185
192
  class: "mw-select__chevron",
186
193
  xmlns: "http://www.w3.org/2000/svg",
187
194
  width: "12",
@@ -190,7 +197,7 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
190
197
  "aria-hidden": "true"
191
198
  }, [i("path", { d: "M1 1l5 5 5-5" })], -1)]));
192
199
  }
193
- }), [["__scopeId", "data-v-b9468387"]]), H = ["role"], U = /*#__PURE__*/ _(/* @__PURE__ */ o({
200
+ }), [["__scopeId", "data-v-b9468387"]]), W = ["role"], le = /*#__PURE__*/ _(/* @__PURE__ */ o({
194
201
  __name: "UiNotice",
195
202
  props: { type: {} },
196
203
  setup(e) {
@@ -201,13 +208,13 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
201
208
  return (t, n) => (d(), r("p", {
202
209
  class: c(["mw-notice", e.type && e.type !== "info" ? `mw-notice--${e.type}` : ""]),
203
210
  role: i.value
204
- }, [m(t.$slots, "default", {}, void 0, !0)], 10, H));
211
+ }, [m(t.$slots, "default", {}, void 0, !0)], 10, W));
205
212
  }
206
- }), [["__scopeId", "data-v-6f53d0be"]]), W = ["disabled", "aria-current"], ue = {
213
+ }), [["__scopeId", "data-v-6f53d0be"]]), ue = ["disabled", "aria-current"], de = {
207
214
  key: 0,
208
215
  class: "sidebar-item__icon",
209
216
  "aria-hidden": "true"
210
- }, de = { class: "sidebar-item__label" }, fe = /*#__PURE__*/ _(/* @__PURE__ */ o({
217
+ }, fe = { class: "sidebar-item__label" }, pe = /*#__PURE__*/ _(/* @__PURE__ */ o({
211
218
  __name: "SidebarItem",
212
219
  props: {
213
220
  label: {},
@@ -227,9 +234,30 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
227
234
  class: c(["sidebar-item", { "is-active": e.active }]),
228
235
  disabled: e.disabled,
229
236
  "aria-current": e.active ? "page" : void 0
230
- }, [e.icon ? (d(), r("span", ue, h(e.icon), 1)) : n("", !0), i("span", de, h(e.label), 1)], 10, W));
237
+ }, [e.icon ? (d(), r("span", de, h(e.icon), 1)) : n("", !0), i("span", fe, h(e.label), 1)], 10, ue));
238
+ }
239
+ }), [["__scopeId", "data-v-cc70da78"]]), me = ["aria-label"], he = ["aria-current", "onClick"], ge = /*#__PURE__*/ _(/* @__PURE__ */ o({
240
+ __name: "AppTabNav",
241
+ props: {
242
+ tabs: {},
243
+ modelValue: {},
244
+ ariaLabel: {}
245
+ },
246
+ emits: ["update:modelValue"],
247
+ setup(t, { emit: n }) {
248
+ let i = n;
249
+ return (n, a) => (d(), r("nav", {
250
+ class: "mw-tab-nav",
251
+ "aria-label": t.ariaLabel
252
+ }, [(d(!0), r(e, null, p(t.tabs, (e) => (d(), r("button", {
253
+ key: e.id,
254
+ type: "button",
255
+ class: c(["mw-tab-nav__tab", { "mw-tab-nav__tab--active": t.modelValue === e.id }]),
256
+ "aria-current": t.modelValue === e.id ? "page" : void 0,
257
+ onClick: (t) => i("update:modelValue", e.id)
258
+ }, h(e.label), 11, he))), 128))], 8, me));
231
259
  }
232
- }), [["__scopeId", "data-v-e15afdf7"]]), pe = { class: "ca-root" }, me = ["title"], he = ["title", "aria-label"], ge = {
260
+ }), [["__scopeId", "data-v-7c93ad15"]]), _e = { class: "ca-root" }, ve = ["title"], ye = ["title", "aria-label"], be = {
233
261
  key: 0,
234
262
  class: "ca-icon",
235
263
  viewBox: "0 0 24 24",
@@ -241,7 +269,7 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
241
269
  "stroke-linecap": "round",
242
270
  "stroke-linejoin": "round",
243
271
  "aria-hidden": "true"
244
- }, _e = {
272
+ }, xe = {
245
273
  key: 1,
246
274
  class: "ca-icon",
247
275
  viewBox: "0 0 24 24",
@@ -253,7 +281,7 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
253
281
  "stroke-linecap": "round",
254
282
  "stroke-linejoin": "round",
255
283
  "aria-hidden": "true"
256
- }, ve = /*#__PURE__*/ _(/* @__PURE__ */ o({
284
+ }, Se = /*#__PURE__*/ _(/* @__PURE__ */ o({
257
285
  __name: "CopyableAddress",
258
286
  props: {
259
287
  address: {},
@@ -275,25 +303,25 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
275
303
  o.value = !1;
276
304
  }, 1500);
277
305
  }
278
- return (t, n) => (d(), r("span", pe, [i("span", {
306
+ return (t, n) => (d(), r("span", _e, [i("span", {
279
307
  class: "ca-value",
280
308
  title: e.address
281
- }, [m(t.$slots, "default", {}, () => [a(h(s.value), 1)], !0)], 8, me), i("button", {
309
+ }, [m(t.$slots, "default", {}, () => [a(h(s.value), 1)], !0)], 8, ve), i("button", {
282
310
  type: "button",
283
311
  class: c(["ca-copy", { "ca-copy--copied": o.value }]),
284
312
  title: o.value ? "Copied!" : e.label,
285
313
  "aria-label": o.value ? "Copied" : e.label,
286
314
  onClick: l
287
- }, [o.value ? (d(), r("svg", ge, [...n[0] ||= [i("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (d(), r("svg", _e, [...n[1] ||= [i("rect", {
315
+ }, [o.value ? (d(), r("svg", be, [...n[0] ||= [i("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (d(), r("svg", xe, [...n[1] ||= [i("rect", {
288
316
  x: "9",
289
317
  y: "9",
290
318
  width: "13",
291
319
  height: "13",
292
320
  rx: "2",
293
321
  ry: "2"
294
- }, null, -1), i("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, he)]));
322
+ }, null, -1), i("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, ye)]));
295
323
  }
296
- }), [["__scopeId", "data-v-08c3420b"]]), ye = ["href", "title"], be = /*#__PURE__*/ _(/* @__PURE__ */ o({
324
+ }), [["__scopeId", "data-v-08c3420b"]]), Ce = ["href", "title"], we = /*#__PURE__*/ _(/* @__PURE__ */ o({
297
325
  __name: "ExplorerLink",
298
326
  props: {
299
327
  href: {},
@@ -317,16 +345,16 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
317
345
  target: "_blank",
318
346
  rel: "noopener noreferrer",
319
347
  title: e.value
320
- }, [m(t.$slots, "default", {}, () => [a(h(i.value), 1)], !0)], 8, ye));
348
+ }, [m(t.$slots, "default", {}, () => [a(h(i.value), 1)], !0)], 8, Ce));
321
349
  }
322
- }), [["__scopeId", "data-v-7a44607e"]]), xe = /* @__PURE__ */ new Set([
350
+ }), [["__scopeId", "data-v-7a44607e"]]), Te = /* @__PURE__ */ new Set([
323
351
  "operational",
324
352
  "degraded",
325
353
  "down",
326
354
  "unknown"
327
355
  ]);
328
356
  function G(e) {
329
- return typeof e == "string" && xe.has(e);
357
+ return typeof e == "string" && Te.has(e);
330
358
  }
331
359
  function K(e) {
332
360
  if (typeof e != "object" || !e) return null;
@@ -335,7 +363,7 @@ function K(e) {
335
363
  }
336
364
  //#endregion
337
365
  //#region src/components/StatusWidget.vue?vue&type=script&setup=true&lang.ts
338
- var Se = ["href", "title"], Ce = { class: "status-widget__label" }, we = /*#__PURE__*/ _(/* @__PURE__ */ o({
366
+ var Ee = ["href", "title"], q = { class: "status-widget__label" }, De = /*#__PURE__*/ _(/* @__PURE__ */ o({
339
367
  __name: "StatusWidget",
340
368
  props: {
341
369
  apiUrl: { default: "https://status.meddleware.co.uk/api/status" },
@@ -378,56 +406,56 @@ var Se = ["href", "title"], Ce = { class: "status-widget__label" }, we = /*#__PU
378
406
  }, [n[0] ||= i("span", {
379
407
  class: "status-widget__dot",
380
408
  "aria-hidden": "true"
381
- }, null, -1), i("span", Ce, h(s.value), 1)], 10, Se));
409
+ }, null, -1), i("span", q, h(s.value), 1)], 10, Ee));
382
410
  }
383
- }), [["__scopeId", "data-v-20197983"]]), q = {
411
+ }), [["__scopeId", "data-v-20197983"]]), J = {
384
412
  mainnet: "https://suivision.xyz",
385
413
  testnet: "https://testnet.suivision.xyz",
386
414
  devnet: "https://devnet.suivision.xyz"
387
415
  };
388
- function Te(e, t, n = "testnet") {
389
- return `${q[n] ?? q.testnet}/${e}/${t}`;
416
+ function Oe(e, t, n = "testnet") {
417
+ return `${J[n] ?? J.testnet}/${e}/${t}`;
390
418
  }
391
419
  //#endregion
392
420
  //#region src/composables/useColorMode.ts
393
- var J = "mw-color-mode", Y = f("system"), X = !1;
394
- function Z() {
421
+ var Y = "mw-color-mode", X = f("system"), Z = !1;
422
+ function ke() {
395
423
  return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches;
396
424
  }
397
425
  function Q(e) {
398
- return e === "dark" || e === "system" && Z();
426
+ return e === "dark" || e === "system" && ke();
399
427
  }
400
428
  function $(e) {
401
429
  typeof document > "u" || document.documentElement.setAttribute("data-theme", Q(e) ? "dark" : "light");
402
430
  }
403
- function Ee(e = "system") {
404
- if (!X) {
405
- X = !0;
431
+ function Ae(e = "system") {
432
+ if (!Z) {
433
+ Z = !0;
406
434
  let t = null;
407
435
  try {
408
- t = typeof localStorage < "u" ? localStorage.getItem(J) : null;
436
+ t = typeof localStorage < "u" ? localStorage.getItem(Y) : null;
409
437
  } catch {}
410
- Y.value = t ?? e, $(Y.value), typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
411
- Y.value === "system" && $("system");
412
- }), re(Y, (e) => {
438
+ X.value = t ?? e, $(X.value), typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
439
+ X.value === "system" && $("system");
440
+ }), re(X, (e) => {
413
441
  $(e);
414
442
  try {
415
- typeof localStorage < "u" && localStorage.setItem(J, e);
443
+ typeof localStorage < "u" && localStorage.setItem(Y, e);
416
444
  } catch {}
417
445
  });
418
446
  }
419
447
  function t(e) {
420
- Y.value = e;
448
+ X.value = e;
421
449
  }
422
450
  function n() {
423
- t(Y.value === "light" ? "dark" : Y.value === "dark" ? "system" : "light");
451
+ t(X.value === "light" ? "dark" : X.value === "dark" ? "system" : "light");
424
452
  }
425
453
  return {
426
- mode: Y,
454
+ mode: X,
427
455
  set: t,
428
456
  cycle: n,
429
- isDark: () => Q(Y.value)
457
+ isDark: () => Q(X.value)
430
458
  };
431
459
  }
432
460
  //#endregion
433
- export { D as AppFooter, v as AppHeader, C as AppSidebar, M as ColorModeControl, ve as CopyableAddress, be as ExplorerLink, fe as SidebarItem, we as StatusWidget, P as UiButton, B as UiCard, U as UiNotice, V as UiSelect, G as isStatusLevel, K as parseSnapshot, Te as suiExplorerUrl, Ee as useColorMode };
461
+ export { O as AppFooter, v as AppHeader, C as AppSidebar, ge as AppTabNav, N as ColorModeControl, Se as CopyableAddress, we as ExplorerLink, pe as SidebarItem, De as StatusWidget, F as UiButton, V as UiCard, le as UiNotice, U as UiSelect, G as isStatusLevel, K as parseSnapshot, Oe as suiExplorerUrl, Ae as useColorMode };
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@meddleware/ui",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "Shared Vue 3 component library for @meddleware UIs \u2014 layout shell (header/sidebar/footer), colour-mode control, and primitives. Built on @meddleware/design-tokens.",
5
+ "homepage": "https://docs.meddleware.co.uk/",
5
6
  "license": "0BSD",
6
7
  "type": "module",
7
8
  "sideEffects": [