@meddleware/ui 0.1.43 → 0.1.45
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 +4 -4
- package/dist/components/AppHeader.css +1 -1
- package/dist/components/AppHeader.js +1 -1
- package/dist/components/AppHeader.vue.d.ts +3 -7
- package/dist/components/AppHeader.vue_vue_type_script_setup_true_lang.js +13 -28
- package/dist/components/AppToolShell.vue_vue_type_script_setup_true_lang.js +12 -5
- package/dist/components/ColorModeControl.css +1 -1
- package/dist/components/ColorModeControl.js +1 -1
- package/dist/components/ColorModeControl.vue.d.ts +9 -0
- package/dist/components/ColorModeControl.vue_vue_type_script_setup_true_lang.js +43 -28
- package/dist/components/CopyrightLine.css +1 -1
- package/dist/components/CopyrightLine.js +1 -1
- package/dist/components/UiButton.vue.d.ts +2 -2
- package/dist/components/UiFieldHint.css +1 -1
- package/dist/components/UiFieldHint.js +1 -1
- package/dist/components/UiFieldHint.vue_vue_type_script_setup_true_lang.js +84 -32
- package/dist/components/UiStatRow.vue.d.ts +1 -1
- package/dist/composables/useColorMode.d.ts +5 -0
- package/dist/composables/useColorMode.js +33 -25
- package/dist/internal/placeTip.d.ts +43 -0
- package/dist/internal/placeTip.js +49 -0
- package/package.json +10 -4
package/dist/base.css
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
@layer mw.reset, mw.components;
|
|
2
2
|
@layer mw.reset{*,:before,:after{box-sizing:border-box}html,body{margin:0;padding:0}html{scroll-padding-block:calc(var(--mw-header-offset,calc(var(--mw-header-height) * 2)) + var(--mw-sticky-extra,0px)) calc(var(--mw-header-height) * 2)}body{background:var(--bg);min-height:100vh;color:var(--text);font-family:var(--mw-font-sans);font-size:var(--font-size-base);line-height:var(--leading-normal);letter-spacing:var(--tracking-normal);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility}:where(ul,ol):where([role=list],[role=listitem]),:where(menu){margin:0;padding:0;list-style:none}.mw-visually-hidden{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.mw-panel--dark{--_bg:var(--mw-panel-dark-bg);--_surface:var(--mw-panel-dark-surface);--_text:var(--mw-panel-dark-text);--_muted:var(--mw-panel-dark-muted);--_border:var(--mw-panel-dark-border);--_ok:var(--mw-panel-dark-ok);--_danger:var(--mw-panel-dark-danger);--_info:var(--mw-panel-dark-info);--text:var(--_text);--muted:var(--_muted);--border:var(--_border);--bg:var(--_bg);--surface:var(--_surface);--lift:var(--_surface);--mw-link:var(--_text)}.mw-panel--light{--_bg:var(--mw-panel-light-bg);--_surface:var(--mw-panel-light-surface);--_text:var(--mw-panel-light-text);--_muted:var(--mw-panel-light-muted);--_border:var(--mw-panel-light-border);--_ok:var(--mw-panel-light-ok);--_danger:var(--mw-panel-light-danger);--_info:var(--mw-panel-light-info);--text:var(--_text);--muted:var(--_muted);--border:var(--_border);--bg:var(--_bg);--surface:var(--_surface);--lift:var(--_surface);--mw-link:var(--_text)}.mw-panel--transparent{--_bg:transparent;--_surface:transparent;--_text:var(--text);--_muted:var(--muted);--_border:transparent;--_ok:var(--ok);--_danger:var(--danger);--_info:var(--info)}:where(img,svg,video,canvas){max-width:100%;display:block}:where(fieldset){border:0;min-inline-size:0;margin:0;padding:0}:where(legend){overflow-wrap:anywhere;max-inline-size:100%;padding:0}a{color:var(--mw-link,var(--accent));text-underline-offset:.18em;transition:color var(--transition-base);text-decoration:underline;text-decoration-thickness:.08em}a:hover{text-decoration-thickness:.14em}:where(button,input,select,textarea){font-family:inherit}:where(button){padding:var(--space-3xs) var(--space-xs);color:var(--text);background-color:var(--lift);border:1px solid var(--border);border-radius:var(--radius-sm);font-size:inherit;cursor:pointer}:where(input[type=file])::file-selector-button{padding:var(--space-3xs) var(--space-xs);color:var(--text);background-color:var(--lift);border:1px solid var(--border);border-radius:var(--radius-sm);font-size:inherit;cursor:pointer}:where(input[type=file])::file-selector-button{margin-inline-end:var(--space-xs)}:where(button:disabled){cursor:not-allowed}:where(a,button,input,select,textarea):focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}.mw-mono{font-family:var(--mw-font-mono)}:where(code,kbd,samp){font-family:var(--mw-font-mono);overflow-wrap:anywhere}:where(pre) :where(code,kbd,samp){overflow-wrap:normal}.mw-noise{isolation:isolate;position:relative}.mw-noise:before{content:"";z-index:var(--z-below);background-image:var(--noise-overlay);opacity:var(--noise-opacity);pointer-events:none;background-repeat:repeat;position:absolute;inset:0}.mw-hand-drawn{display:inline-flex;position:relative}.mw-spinner{width:var(--space-sm);height:var(--space-sm);border:2px solid var(--border);border-top-color:var(--accent);animation:mw-spin var(--transition-slow) linear infinite;border-radius:50%;display:inline-block}@keyframes mw-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:0s!important;transition-delay:0s!important;animation-duration:.001ms!important}.mw-spinner{border-top-color:var(--accent);animation:none}}}@layer mw.components;
|
|
3
3
|
@layer mw.reset;@layer mw.components{.mw-footer[data-v-766c24d7]{align-items:center;gap:var(--space-sm);padding:var(--space-xs) var(--space-sm);background:var(--_bg);color:var(--_muted);border-top:1px solid var(--_border);font-family:var(--mw-font-sans);font-size:var(--font-size-sm);flex-wrap:wrap;display:flex}.mw-footer--transparent[data-v-766c24d7]{border-top:1px solid var(--border)}.mw-footer__docs[data-v-766c24d7]{align-items:center;gap:var(--space-2xs) var(--space-sm);flex-wrap:wrap;max-inline-size:100%;margin-inline-start:auto;display:flex}.mw-footer__docs a[data-v-766c24d7]{color:inherit;text-underline-offset:.18em;text-decoration:underline}.mw-footer__docs a[data-v-766c24d7]:hover{text-decoration-thickness:.14em}.mw-footer a[data-v-766c24d7-s]{color:inherit}.mw-footer[data-v-766c24d7]:not(.mw-footer--transparent){--ok:var(--_ok);--danger:var(--_danger);--info:var(--_info)}}
|
|
4
|
-
@layer mw.reset;@layer mw.components{.mw-header[data-v-
|
|
4
|
+
@layer mw.reset;@layer mw.components{.mw-header[data-v-a57cc4b5]{align-items:center;gap:var(--space-2xs);min-height:var(--mw-header-height);padding:var(--space-4xs) var(--space-sm);background:var(--_bg);color:var(--_text);border-bottom:1px solid var(--_border);font-family:var(--mw-font-sans);transition:background var(--transition-base), backdrop-filter var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);flex-wrap:wrap;display:flex}.mw-header--sticky[data-v-a57cc4b5]{z-index:var(--z-header);position:sticky;top:0}.mw-header--sticky.mw-header--transparent[data-v-a57cc4b5]{background:color-mix(in srgb, var(--bg) 82%, transparent);-webkit-backdrop-filter:blur(var(--space-2xs));backdrop-filter:blur(var(--space-2xs));border-bottom-color:var(--border);box-shadow:var(--shadow-1)}.mw-header__brand[data-v-a57cc4b5]{align-items:center;gap:var(--space-2xs);font-weight:var(--font-weight-brand);letter-spacing:var(--tracking-wide);overflow-wrap:anywhere;min-inline-size:0;margin-inline-end:auto;text-decoration:none;display:flex}.mw-header a[data-v-a57cc4b5-s]{color:inherit}.mw-header__menu[data-v-a57cc4b5]{padding:var(--space-3xs);border:1px solid var(--_border);border-radius:var(--radius-sm);color:inherit;cursor:pointer;background:0 0;justify-content:center;align-items:center;display:none}.mw-header__menu[data-v-a57cc4b5]:hover{background:color-mix(in srgb, currentColor 12%, transparent)}@media (width<45em){.mw-header__menu[data-v-a57cc4b5]{display:inline-flex}}.mw-header[data-v-a57cc4b5]:not(.mw-header--transparent){--ok:var(--_ok);--danger:var(--_danger);--info:var(--_info)}}
|
|
5
5
|
@layer mw.reset;@layer mw.components{.mw-sidebar[data-v-f5e6df6c]{--_width:var(--v4ba6c322);height:100%;width:var(--_width);background:var(--_bg);color:var(--_text);border:0;border-right:1px solid var(--_border);font-family:var(--mw-font-sans);flex-direction:column;margin:0;padding:0;display:flex;position:static;inset:auto;overflow:visible}.mw-sidebar__nav[data-v-f5e6df6c]{gap:var(--space-3xs);padding:var(--space-xs) 0;flex-direction:column;flex:auto;display:flex;overflow-y:auto}@media (width<45em){.mw-sidebar[data-v-f5e6df6c]:not(:popover-open){display:none}.mw-sidebar[data-v-f5e6df6c]:popover-open{width:min(var(--_width), 85vw);height:100dvh;box-shadow:var(--shadow-3);position:fixed;inset:0 auto 0 0}.mw-sidebar[data-v-f5e6df6c]::backdrop{background:var(--backdrop)}}.mw-sidebar a[data-v-f5e6df6c-s]{color:inherit}.mw-sidebar[data-v-f5e6df6c]:not(.mw-sidebar--transparent){--ok:var(--_ok);--danger:var(--_danger);--info:var(--_info)}}
|
|
6
6
|
@layer mw.reset;@layer mw.components{.mw-tab-nav[data-v-7b318cd8]{gap:var(--space-3xs);border-bottom:var(--space-4xs) solid var(--border);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.mw-tab-nav__item[data-v-7b318cd8]{display:contents}.mw-tab-nav__tab[data-v-7b318cd8]{appearance:none;border:none;border-bottom:var(--space-4xs) solid transparent;padding:var(--space-2xs) var(--space-sm);margin-bottom:calc(-1 * var(--space-4xs));cursor:pointer;font-size:var(--font-size-base);color:var(--muted);transition:color var(--transition-base), border-color var(--transition-base);background:0 0;border-radius:0}.mw-tab-nav__tab[data-v-7b318cd8]:hover{color:var(--text)}.mw-tab-nav__tab--active[data-v-7b318cd8]{border-bottom-color:var(--accent);color:var(--text);font-weight:var(--font-weight-semibold)}.mw-tab-nav--raised[data-v-7b318cd8]{border-bottom:1px solid var(--border);background:var(--surface);padding:var(--space-3xs) var(--space-3xs) 0;align-items:flex-end;gap:var(--space-4xs);scrollbar-width:none;flex-shrink:0;overflow-x:auto}.mw-tab-nav--raised[data-v-7b318cd8]::-webkit-scrollbar{display:none}.mw-tab-nav--raised .mw-tab-nav__tab[data-v-7b318cd8]{border-bottom:1px solid var(--border);padding:var(--space-3xs) var(--space-xs) var(--space-3xs);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);color:var(--muted);background:var(--lift);border-top:var(--space-4xs) solid transparent;white-space:nowrap;transition:color var(--transition-base), background var(--transition-base), border-color var(--transition-base);border-left:1px solid #0000;border-right:1px solid #0000;margin-bottom:-1px}.mw-tab-nav--raised .mw-tab-nav__tab[data-v-7b318cd8]:hover:not(.mw-tab-nav__tab--active){color:var(--text);background:var(--surface)}.mw-tab-nav--raised .mw-tab-nav__tab--active[data-v-7b318cd8]{color:var(--text);background:var(--bg);border-color:var(--accent) var(--border) var(--bg) var(--border);font-weight:var(--font-weight-semibold)}.mw-tab-nav--raised.mw-tab-nav--lg[data-v-7b318cd8]{gap:var(--space-4xs);padding:var(--space-3xs) var(--space-3xs) 0}.mw-tab-nav--raised.mw-tab-nav--lg .mw-tab-nav__tab[data-v-7b318cd8]{padding:var(--space-2xs) var(--space-sm);font-size:var(--font-size-base);font-weight:var(--font-weight-semibold)}.mw-tab-nav--flush[data-v-7b318cd8]{background:0 0;padding-inline:0}}
|
|
7
7
|
@layer mw.reset;@layer mw.components{.mw-brand-mark[data-v-701f75be]{inline-size:var(--mw-brand-size,1em);block-size:var(--mw-brand-size,1em);vertical-align:-.125em;flex:none;display:inline-block}}
|
|
8
|
-
@layer mw.reset;@layer mw.components{.mw-mode[data-v-
|
|
8
|
+
@layer mw.reset;@layer mw.components{.mw-mode[data-v-635622c5]{align-items:center;gap:var(--space-4xs);min-inline-size:0;padding:var(--space-4xs);border:1px solid var(--_border,var(--border));border-radius:var(--radius);flex-wrap:wrap;margin:0;display:inline-flex}.mw-mode__btn[data-v-635622c5]{justify-content:center;align-items:center;gap:var(--space-3xs);min-block-size:1.5rem;min-inline-size:1.5rem;padding:var(--space-3xs) var(--space-2xs);border-radius:var(--radius-sm);color:var(--_muted,var(--muted));font:inherit;font-size:var(--font-size-sm);cursor:pointer;transition:color var(--transition-base), background var(--transition-base);background:0 0;border:0;display:inline-flex}.mw-mode__btn[data-v-635622c5]:hover{color:var(--_text,var(--text))}.mw-mode__btn.is-active[data-v-635622c5]{color:var(--_text,var(--text));background:color-mix(in srgb, var(--_text,var(--text)) 14%, transparent)}.mw-mode__btn[data-v-635622c5]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px}.mw-mode__remember[data-v-635622c5]{align-items:center;gap:var(--space-3xs);min-block-size:1.5rem;padding-inline:var(--space-2xs);color:var(--_muted,var(--muted));font-size:var(--font-size-sm);cursor:pointer;display:inline-flex}.mw-mode__remember input[data-v-635622c5]{accent-color:var(--_text,var(--text));margin:0}@media (forced-colors:active){.mw-mode__btn.is-active[data-v-635622c5]{outline-offset:-2px;outline:2px solid highlight}}@media (width<40em){.mw-mode__label[data-v-635622c5]{display:none}}}
|
|
9
9
|
@layer mw.reset;@layer mw.components{.ca-root[data-v-60f80445]{align-items:center;gap:.35em;max-width:100%;display:inline-flex}.ca-value[data-v-60f80445]{font-family:var(--mw-font-mono);font-size:inherit;overflow-wrap:anywhere;white-space:normal;min-width:0}}
|
|
10
|
-
@layer mw.reset;@layer mw.components{.copyright-line[data-v-
|
|
10
|
+
@layer mw.reset;@layer mw.components{.copyright-line[data-v-77c14a9d]{text-align:center;max-width:100%;display:inline-block}.symbol-link[data-v-77c14a9d]{white-space:nowrap;color:inherit;vertical-align:text-top;padding:0 var(--space-4xs);align-items:center;text-decoration:none;display:inline-flex}.symbol-link[data-v-77c14a9d]:hover{text-decoration:underline}.symbol-mark[data-v-77c14a9d]{vertical-align:-.15em;display:inline}}
|
|
11
11
|
@layer mw.reset;@layer mw.components{.el-root[data-v-afd81c09]{min-block-size:calc(var(--space-sm) + var(--space-3xs));font-family:var(--mw-font-mono);font-size:inherit;color:var(--mw-link,var(--accent));text-underline-offset:.18em;transition:color var(--duration-base);-webkit-text-decoration:underline dotted;text-decoration:underline dotted;display:inline-block}.el-root[data-v-afd81c09]:hover{color:var(--text);text-decoration-style:solid}}
|
|
12
12
|
@layer mw.reset;@layer mw.components{.sidebar-group[data-v-d2020093]{border:0;min-inline-size:0;margin:0;padding:0}.sidebar-group--l1+.sidebar-group--l1[data-v-d2020093]{margin-block-start:var(--space-2xs)}.sidebar-group__label[data-v-d2020093]{float:inline-start;width:100%;padding:var(--space-3xs) var(--space-xs);font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);color:var(--_muted,var(--muted));-webkit-user-select:none;user-select:none}.sidebar-group__label[data-v-d2020093]+*{clear:both}.sidebar-group--l1>.sidebar-group__label[data-v-d2020093]{text-transform:uppercase;letter-spacing:var(--tracking-wide)}.sidebar-group--l2[data-v-d2020093]{padding-inline-start:var(--space-3xs)}.sidebar-group--l2>.sidebar-group__label[data-v-d2020093]{font-weight:var(--font-weight-medium);padding-inline-start:var(--space-xs)}}
|
|
13
13
|
@layer mw.reset;@layer mw.components{.sidebar-item[data-v-cb0a8084]{align-items:center;gap:var(--space-2xs);width:100%;padding:var(--space-2xs) var(--space-sm);color:var(--_muted,var(--muted));font:inherit;text-align:left;cursor:pointer;transition:background var(--transition-base), color var(--transition-base);background:0 0;border:0;border-radius:0;text-decoration:none;display:flex}.sidebar-item[data-v-cb0a8084]:hover:not(:disabled){background:color-mix(in srgb, currentColor 10%, transparent);color:var(--_text,var(--text))}.sidebar-item.is-active[data-v-cb0a8084]{background:color-mix(in srgb, var(--accent) 26%, transparent);color:var(--_text,var(--text))}.sidebar-item[data-v-cb0a8084]:disabled{cursor:default}@media (forced-colors:active){.sidebar-item.is-active[data-v-cb0a8084]{outline-offset:-2px;outline:2px solid highlight}}.sidebar-item[data-v-cb0a8084]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}.sidebar-item__icon[data-v-cb0a8084]{width:var(--space-sm);text-align:center}}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
@layer mw.reset;@layer mw.components{.mw-data-table-wrap[data-v-57394578]{scrollbar-width:thin;position:relative;overflow-x:auto}.mw-data-table-wrap[data-v-57394578]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}.mw-data-table[data-v-57394578]{border-collapse:collapse;width:100%;font-size:var(--font-size-sm)}.mw-data-table[data-v-57394578] th{text-align:left;padding:var(--space-3xs) var(--space-2xs);font-size:var(--font-size-2xs);font-weight:var(--font-weight-semibold);letter-spacing:var(--tracking-wide);text-transform:uppercase;color:var(--muted);border-bottom:1px solid var(--border);white-space:nowrap}.mw-data-table[data-v-57394578] tbody th[scope=row]{font-size:inherit;letter-spacing:normal;text-transform:none;color:var(--text);white-space:normal;vertical-align:middle}.mw-data-table[data-v-57394578] td{padding:var(--space-3xs) var(--space-2xs);border-bottom:1px solid var(--border);vertical-align:middle}.mw-data-table[data-v-57394578] tbody tr:last-child td,.mw-data-table[data-v-57394578] tbody tr:last-child th{border-bottom:none}.mw-data-table[data-v-57394578] tbody tr:nth-child(2n) td,.mw-data-table[data-v-57394578] tbody tr:nth-child(2n) th{background:var(--lift)}.mw-data-table__empty[data-v-57394578]{padding:var(--space-md) var(--space-sm);text-align:center;color:var(--muted);font-size:var(--font-size-sm);margin:0}.mw-data-table__hint[data-v-57394578]{padding:var(--space-3xs) var(--space-2xs);color:var(--muted);font-size:var(--font-size-xs);display:block;position:sticky;left:0}}
|
|
26
26
|
@layer mw.reset;@layer mw.components{.mw-dialog[data-v-a4a786e3]{--_width:var(--a58c281a);width:var(--_width);border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);max-height:90dvh;color:var(--text);box-shadow:var(--shadow-3);padding:0}.mw-dialog[data-v-a4a786e3]::backdrop{background:var(--backdrop);-webkit-backdrop-filter:blur(var(--space-4xs));backdrop-filter:blur(var(--space-4xs))}.mw-dialog__content[data-v-a4a786e3]{gap:var(--space-sm);padding:var(--space-md);flex-direction:column;display:flex}.mw-dialog__header[data-v-a4a786e3]{justify-content:space-between;align-items:center;gap:var(--space-sm);display:flex}.mw-dialog__title[data-v-a4a786e3]{font-size:var(--font-size-base);font-weight:var(--font-weight-semibold);margin:0}.mw-dialog__close[data-v-a4a786e3]{padding:0 var(--space-3xs);border-radius:var(--radius);color:var(--muted);font-size:var(--font-size-xl);cursor:pointer;background:0 0;border:0;line-height:1}.mw-dialog__close[data-v-a4a786e3]:hover{color:var(--text)}.mw-dialog__actions[data-v-a4a786e3]{justify-content:flex-end;gap:var(--space-xs);flex-wrap:wrap;display:flex}}
|
|
27
27
|
@layer mw.reset;@layer mw.components{.mw-empty[data-v-8463293a]{align-items:center;gap:var(--space-xs);padding:var(--space-md) var(--space-sm);text-align:center;flex-direction:column;display:flex}.mw-empty__text[data-v-8463293a]{color:var(--muted);margin:0}}
|
|
28
|
-
@layer mw.reset;@layer mw.components{.mw-field-hint[data-v-
|
|
28
|
+
@layer mw.reset;@layer mw.components{.mw-field-hint[data-v-14f7f1b2]{vertical-align:middle;margin-inline-start:var(--space-3xs);display:inline-block;position:relative}.mw-field-hint__btn[data-v-14f7f1b2]{inline-size:calc(var(--space-sm) + var(--space-3xs));block-size:calc(var(--space-sm) + var(--space-3xs));font-size:var(--font-size-sm);font-weight:var(--font-weight-bold);border:1px solid var(--muted);color:var(--muted);cursor:help;background:0 0;border-radius:50%;justify-content:center;align-items:center;padding:0;font-family:inherit;line-height:1;display:inline-flex}.mw-field-hint__btn[data-v-14f7f1b2]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px}.mw-field-hint__tip[data-v-14f7f1b2]{inset:auto;inline-size:max-content;max-inline-size:min(var(--mw-content-narrow), calc(100vw - 2 * var(--space-xs)));box-sizing:border-box;padding:var(--space-2xs) var(--space-xs);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-2);color:var(--text);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--leading-normal);letter-spacing:normal;text-transform:none;text-align:start;white-space:normal;overflow-wrap:anywhere;margin:0;position:absolute;inset-block-start:var(--mw-hint-y,0);inset-inline-start:var(--mw-hint-x,0);overflow:visible}}
|
|
29
29
|
@layer mw.reset;@layer mw.components{.mw-file[data-v-ef589318]{inline-size:100%;min-inline-size:0;max-inline-size:100%;color:var(--text);font:inherit}.mw-file[data-v-ef589318]::file-selector-button{padding:var(--space-2xs) var(--space-xs);border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--text);font:inherit;cursor:pointer;margin-inline-end:var(--space-xs)}.mw-file[data-v-ef589318]:disabled{filter:grayscale(.6);cursor:not-allowed}}
|
|
30
30
|
@layer mw.reset;@layer mw.components{.mw-form-field[data-v-1385d389]{min-inline-size:0;max-inline-size:100%;margin:0}.mw-form-field__label[data-v-1385d389]{font-weight:var(--font-weight-semibold);margin:var(--space-xs) 0 var(--space-3xs);display:inline-block}.mw-form-field :is(input[data-v-1385d389-s],select[data-v-1385d389-s],textarea[data-v-1385d389-s]){display:block}.mw-form-field__hint[data-v-1385d389],.mw-form-field__error[data-v-1385d389]{margin:var(--space-3xs) 0 0;font-size:var(--font-size-sm);display:block}.mw-form-field__hint[data-v-1385d389]{color:var(--muted);font-weight:var(--font-weight-regular)}.mw-form-field__error[data-v-1385d389]{color:var(--danger)}}
|
|
31
31
|
@layer mw.reset;@layer mw.components{.mw-input[data-v-d9f28e0e]{width:100%;padding:var(--space-2xs) var(--space-xs);background:var(--surface);color:var(--text);border:1px solid var(--control-border);border-radius:var(--radius);font:inherit}.mw-input[data-v-d9f28e0e]::placeholder{color:var(--muted)}.mw-input[data-v-d9f28e0e]:is(:focus-visible,:focus-within){outline:2px solid var(--focus-ring);outline-offset:1px}.mw-input[aria-invalid=true][data-v-d9f28e0e]{border-color:var(--danger)}.mw-input[data-v-d9f28e0e]:disabled{filter:grayscale(.6);cursor:not-allowed}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer mw.reset;@layer mw.components{.mw-header[data-v-
|
|
1
|
+
@layer mw.reset;@layer mw.components{.mw-header[data-v-a57cc4b5]{align-items:center;gap:var(--space-2xs);min-height:var(--mw-header-height);padding:var(--space-4xs) var(--space-sm);background:var(--_bg);color:var(--_text);border-bottom:1px solid var(--_border);font-family:var(--mw-font-sans);transition:background var(--transition-base), backdrop-filter var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);flex-wrap:wrap;display:flex}.mw-header--sticky[data-v-a57cc4b5]{z-index:var(--z-header);position:sticky;top:0}.mw-header--sticky.mw-header--transparent[data-v-a57cc4b5]{background:color-mix(in srgb, var(--bg) 82%, transparent);-webkit-backdrop-filter:blur(var(--space-2xs));backdrop-filter:blur(var(--space-2xs));border-bottom-color:var(--border);box-shadow:var(--shadow-1)}.mw-header__brand[data-v-a57cc4b5]{align-items:center;gap:var(--space-2xs);font-weight:var(--font-weight-brand);letter-spacing:var(--tracking-wide);overflow-wrap:anywhere;min-inline-size:0;margin-inline-end:auto;text-decoration:none;display:flex}.mw-header a[data-v-a57cc4b5-s]{color:inherit}.mw-header__menu[data-v-a57cc4b5]{padding:var(--space-3xs);border:1px solid var(--_border);border-radius:var(--radius-sm);color:inherit;cursor:pointer;background:0 0;justify-content:center;align-items:center;display:none}.mw-header__menu[data-v-a57cc4b5]:hover{background:color-mix(in srgb, currentColor 12%, transparent)}@media (width<45em){.mw-header__menu[data-v-a57cc4b5]{display:inline-flex}}.mw-header[data-v-a57cc4b5]:not(.mw-header--transparent){--ok:var(--_ok);--danger:var(--_danger);--info:var(--_info)}}
|
|
@@ -2,6 +2,6 @@ import e from "./AppHeader.vue_vue_type_script_setup_true_lang.js";
|
|
|
2
2
|
import "./AppHeader.css";
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
//#region src/components/AppHeader.vue
|
|
5
|
-
var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-
|
|
5
|
+
var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-a57cc4b5"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -4,14 +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
|
-
/** Stick to the top of the viewport (full-width shells). */
|
|
8
|
-
sticky?: boolean;
|
|
9
7
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* background so the brand/nav stay legible. No-op unless the header scrolls.
|
|
8
|
+
* Stick to the top of the viewport (full-width shells). A sticky `transparent` header is painted frosted from the first pixel,
|
|
9
|
+
* so it looks the same at every scroll position (it used to turn solid after 8 px of scroll, which read as a jolt).
|
|
13
10
|
*/
|
|
14
|
-
|
|
11
|
+
sticky?: boolean;
|
|
15
12
|
/**
|
|
16
13
|
* The `id` of an AppSidebar. When set, a menu button appears on narrow screens (below 45em) that opens the sidebar as a drawer;
|
|
17
14
|
* on wide screens the sidebar is always visible and the button is hidden.
|
|
@@ -33,7 +30,6 @@ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
|
33
30
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
34
31
|
variant: PanelVariant;
|
|
35
32
|
sticky: boolean;
|
|
36
|
-
solidifyOnScroll: boolean;
|
|
37
33
|
menuLabel: string;
|
|
38
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
35
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { usePanelOverrides as e } from "../internal/panel.js";
|
|
2
2
|
import { useStickyOffset as t } from "../composables/useStickyOffset.js";
|
|
3
|
-
import { createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, normalizeClass as o,
|
|
3
|
+
import { createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, ref as c, renderSlot as l } from "vue";
|
|
4
4
|
//#region src/components/AppHeader.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var u = ["popovertarget", "aria-label"], d = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "mw-header__brand"
|
|
8
|
-
},
|
|
8
|
+
}, f = /*@__PURE__*/ a({
|
|
9
9
|
__name: "AppHeader",
|
|
10
10
|
props: {
|
|
11
11
|
variant: { default: "dark" },
|
|
@@ -14,36 +14,21 @@ var f = ["popovertarget", "aria-label"], p = {
|
|
|
14
14
|
type: Boolean,
|
|
15
15
|
default: !0
|
|
16
16
|
},
|
|
17
|
-
solidifyOnScroll: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: !1
|
|
20
|
-
},
|
|
21
17
|
sidebarId: {},
|
|
22
18
|
menuLabel: { default: "Menu" }
|
|
23
19
|
},
|
|
24
20
|
setup(a) {
|
|
25
|
-
let
|
|
26
|
-
e(
|
|
27
|
-
let g = u(!1), _ = null;
|
|
28
|
-
return c(() => {
|
|
29
|
-
m.solidifyOnScroll && typeof window < "u" && (_ = () => {
|
|
30
|
-
g.value = window.scrollY > 8;
|
|
31
|
-
}, _(), window.addEventListener("scroll", _, { passive: !0 }));
|
|
32
|
-
}), s(() => {
|
|
33
|
-
_ && window.removeEventListener("scroll", _);
|
|
34
|
-
}), (e, t) => (l(), r("header", {
|
|
21
|
+
let f = a, p = c(null);
|
|
22
|
+
return e(p, () => f.colors), f.sticky && t(p, "--mw-header-offset"), (e, t) => (s(), r("header", {
|
|
35
23
|
ref_key: "root",
|
|
36
|
-
ref:
|
|
24
|
+
ref: p,
|
|
37
25
|
class: o(["mw-header", [
|
|
38
26
|
`mw-panel--${a.variant}`,
|
|
39
27
|
`mw-header--${a.variant}`,
|
|
40
|
-
{
|
|
41
|
-
"mw-header--sticky": a.sticky,
|
|
42
|
-
"mw-header--scrolled": a.solidifyOnScroll && g.value
|
|
43
|
-
}
|
|
28
|
+
{ "mw-header--sticky": a.sticky }
|
|
44
29
|
]])
|
|
45
30
|
}, [
|
|
46
|
-
a.sidebarId ? (
|
|
31
|
+
a.sidebarId ? (s(), r("button", {
|
|
47
32
|
key: 0,
|
|
48
33
|
type: "button",
|
|
49
34
|
class: "mw-header__menu",
|
|
@@ -58,12 +43,12 @@ var f = ["popovertarget", "aria-label"], p = {
|
|
|
58
43
|
"stroke-width": "2",
|
|
59
44
|
"stroke-linecap": "round",
|
|
60
45
|
"aria-hidden": "true"
|
|
61
|
-
}, [i("path", { d: "M4 6h16M4 12h16M4 18h16" })], -1)]], 8,
|
|
62
|
-
e.$slots.brand ? (
|
|
63
|
-
|
|
64
|
-
|
|
46
|
+
}, [i("path", { d: "M4 6h16M4 12h16M4 18h16" })], -1)]], 8, u)) : n("", !0),
|
|
47
|
+
e.$slots.brand ? (s(), r("span", d, [l(e.$slots, "brand")])) : n("", !0),
|
|
48
|
+
l(e.$slots, "default"),
|
|
49
|
+
l(e.$slots, "actions")
|
|
65
50
|
], 2));
|
|
66
51
|
}
|
|
67
52
|
});
|
|
68
53
|
//#endregion
|
|
69
|
-
export {
|
|
54
|
+
export { f as default };
|
|
@@ -34,19 +34,26 @@ var y = {
|
|
|
34
34
|
defaultMode: { default: "dark" }
|
|
35
35
|
},
|
|
36
36
|
setup(p) {
|
|
37
|
-
let b = p, { mode: x, set: S } = o(b.defaultMode),
|
|
37
|
+
let b = p, { mode: x, set: S, remember: C, setRemember: w } = o(b.defaultMode), T = s(() => b.docsUrl === !1 ? void 0 : b.docsUrl || `https://docs.meddleware.co.uk/blockchain/sui/${b.slug}/`), E = s(() => b.devUrl === !1 ? void 0 : b.devUrl || `https://meddleware.dev/sui/${b.slug}/`);
|
|
38
38
|
return (o, s) => (m(), c(a, { contained: p.contained }, {
|
|
39
39
|
header: v(() => [f(e, { variant: "dark" }, {
|
|
40
40
|
brand: v(() => [h(o.$slots, "brand", {}, () => [f(n), d(" " + g(p.title), 1)])]),
|
|
41
41
|
actions: v(() => [h(o.$slots, "actions"), f(r, {
|
|
42
42
|
"model-value": _(x),
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
remember: _(C),
|
|
44
|
+
"onUpdate:modelValue": _(S),
|
|
45
|
+
"onUpdate:remember": _(w)
|
|
46
|
+
}, null, 8, [
|
|
47
|
+
"model-value",
|
|
48
|
+
"remember",
|
|
49
|
+
"onUpdate:modelValue",
|
|
50
|
+
"onUpdate:remember"
|
|
51
|
+
])]),
|
|
45
52
|
_: 3
|
|
46
53
|
})]),
|
|
47
54
|
footer: v(() => [f(t, {
|
|
48
|
-
"docs-url":
|
|
49
|
-
"dev-url":
|
|
55
|
+
"docs-url": T.value,
|
|
56
|
+
"dev-url": E.value
|
|
50
57
|
}, {
|
|
51
58
|
start: v(() => [f(i, {
|
|
52
59
|
"symbol-variant": "kopimi",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer mw.reset;@layer mw.components{.mw-mode[data-v-
|
|
1
|
+
@layer mw.reset;@layer mw.components{.mw-mode[data-v-635622c5]{align-items:center;gap:var(--space-4xs);min-inline-size:0;padding:var(--space-4xs);border:1px solid var(--_border,var(--border));border-radius:var(--radius);flex-wrap:wrap;margin:0;display:inline-flex}.mw-mode__btn[data-v-635622c5]{justify-content:center;align-items:center;gap:var(--space-3xs);min-block-size:1.5rem;min-inline-size:1.5rem;padding:var(--space-3xs) var(--space-2xs);border-radius:var(--radius-sm);color:var(--_muted,var(--muted));font:inherit;font-size:var(--font-size-sm);cursor:pointer;transition:color var(--transition-base), background var(--transition-base);background:0 0;border:0;display:inline-flex}.mw-mode__btn[data-v-635622c5]:hover{color:var(--_text,var(--text))}.mw-mode__btn.is-active[data-v-635622c5]{color:var(--_text,var(--text));background:color-mix(in srgb, var(--_text,var(--text)) 14%, transparent)}.mw-mode__btn[data-v-635622c5]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px}.mw-mode__remember[data-v-635622c5]{align-items:center;gap:var(--space-3xs);min-block-size:1.5rem;padding-inline:var(--space-2xs);color:var(--_muted,var(--muted));font-size:var(--font-size-sm);cursor:pointer;display:inline-flex}.mw-mode__remember input[data-v-635622c5]{accent-color:var(--_text,var(--text));margin:0}@media (forced-colors:active){.mw-mode__btn.is-active[data-v-635622c5]{outline-offset:-2px;outline:2px solid highlight}}@media (width<40em){.mw-mode__label[data-v-635622c5]{display:none}}}
|
|
@@ -2,6 +2,6 @@ import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./ColorModeControl.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
import "./ColorModeControl.css";
|
|
4
4
|
//#region src/components/ColorModeControl.vue
|
|
5
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-635622c5"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -9,13 +9,22 @@ type __VLS_Props = {
|
|
|
9
9
|
modelValue: ColorMode;
|
|
10
10
|
/** Which modes to offer (default all three). */
|
|
11
11
|
modes?: ColorMode[];
|
|
12
|
+
/**
|
|
13
|
+
* Whether the choice is kept on this device (`v-model:remember`, e.g. `useColorMode().remember`). When bound, a
|
|
14
|
+
* "Remember on this device" box is shown beside the modes, unticked unless the person ticked it before; unticking forgets the
|
|
15
|
+
* stored choice. Leave it unbound and the control offers no storage at all (docs/legal STORAGE_LEDGER B2).
|
|
16
|
+
*/
|
|
17
|
+
remember?: boolean;
|
|
12
18
|
};
|
|
13
19
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
20
|
"update:modelValue": (args_0: ColorMode) => any;
|
|
21
|
+
"update:remember": (args_0: boolean) => any;
|
|
15
22
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
23
|
"onUpdate:modelValue"?: ((args_0: ColorMode) => any) | undefined;
|
|
24
|
+
"onUpdate:remember"?: ((args_0: boolean) => any) | undefined;
|
|
17
25
|
}>, {
|
|
18
26
|
modes: ColorMode[];
|
|
27
|
+
remember: boolean;
|
|
19
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
29
|
declare const _default: typeof __VLS_export;
|
|
21
30
|
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Fragment as e,
|
|
1
|
+
import { Fragment as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createTextVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, renderList as c, toDisplayString as l } from "vue";
|
|
2
2
|
//#region src/components/ColorModeControl.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
3
|
+
var u = { class: "mw-mode" }, d = [
|
|
4
4
|
"aria-pressed",
|
|
5
5
|
"title",
|
|
6
6
|
"onClick"
|
|
7
|
-
],
|
|
7
|
+
], f = {
|
|
8
8
|
viewBox: "0 0 24 24",
|
|
9
9
|
width: "1em",
|
|
10
10
|
height: "1em",
|
|
@@ -14,10 +14,13 @@ var c = { class: "mw-mode" }, l = [
|
|
|
14
14
|
"stroke-linecap": "round",
|
|
15
15
|
"stroke-linejoin": "round",
|
|
16
16
|
"aria-hidden": "true"
|
|
17
|
-
},
|
|
17
|
+
}, p = {
|
|
18
18
|
key: 1,
|
|
19
19
|
d: "M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"
|
|
20
|
-
},
|
|
20
|
+
}, m = { class: "mw-mode__label" }, h = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "mw-mode__remember"
|
|
23
|
+
}, g = ["checked"], _ = /*@__PURE__*/ a({
|
|
21
24
|
__name: "ColorModeControl",
|
|
22
25
|
props: {
|
|
23
26
|
modelValue: {},
|
|
@@ -25,34 +28,46 @@ var c = { class: "mw-mode" }, l = [
|
|
|
25
28
|
"light",
|
|
26
29
|
"dark",
|
|
27
30
|
"system"
|
|
28
|
-
] }
|
|
31
|
+
] },
|
|
32
|
+
remember: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: void 0
|
|
35
|
+
}
|
|
29
36
|
},
|
|
30
|
-
emits: ["update:modelValue"],
|
|
31
|
-
setup(
|
|
32
|
-
let
|
|
37
|
+
emits: ["update:modelValue", "update:remember"],
|
|
38
|
+
setup(a) {
|
|
39
|
+
let _ = {
|
|
33
40
|
light: "Light",
|
|
34
41
|
dark: "Dark",
|
|
35
42
|
system: "System"
|
|
36
43
|
};
|
|
37
|
-
return (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
y: "4",
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
return (v, y) => (s(), n("fieldset", u, [
|
|
45
|
+
y[6] ||= r("legend", { class: "mw-visually-hidden" }, "Colour mode", -1),
|
|
46
|
+
(s(!0), n(e, null, c(a.modes, (t) => (s(), n("button", {
|
|
47
|
+
key: t,
|
|
48
|
+
type: "button",
|
|
49
|
+
class: o(["mw-mode__btn", { "is-active": a.modelValue === t }]),
|
|
50
|
+
"aria-pressed": a.modelValue === t,
|
|
51
|
+
title: _[t],
|
|
52
|
+
onClick: (e) => v.$emit("update:modelValue", t)
|
|
53
|
+
}, [(s(), n("svg", f, [t === "light" ? (s(), n(e, { key: 0 }, [y[1] ||= r("circle", {
|
|
54
|
+
cx: "12",
|
|
55
|
+
cy: "12",
|
|
56
|
+
r: "4"
|
|
57
|
+
}, null, -1), y[2] ||= r("path", { d: "M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" }, null, -1)], 64)) : t === "dark" ? (s(), n("path", p)) : (s(), n(e, { key: 2 }, [y[3] ||= r("rect", {
|
|
58
|
+
x: "3",
|
|
59
|
+
y: "4",
|
|
60
|
+
width: "18",
|
|
61
|
+
height: "12",
|
|
62
|
+
rx: "2"
|
|
63
|
+
}, null, -1), y[4] ||= r("path", { d: "M8 20h8M12 16v4" }, null, -1)], 64))])), r("span", m, l(_[t]), 1)], 10, d))), 128)),
|
|
64
|
+
a.remember === void 0 ? t("", !0) : (s(), n("label", h, [r("input", {
|
|
65
|
+
type: "checkbox",
|
|
66
|
+
checked: a.remember,
|
|
67
|
+
onChange: y[0] ||= (e) => v.$emit("update:remember", e.target.checked)
|
|
68
|
+
}, null, 40, g), y[5] ||= i(" Remember on this device ", -1)]))
|
|
69
|
+
]));
|
|
55
70
|
}
|
|
56
71
|
});
|
|
57
72
|
//#endregion
|
|
58
|
-
export {
|
|
73
|
+
export { _ as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer mw.reset;@layer mw.components{.copyright-line[data-v-
|
|
1
|
+
@layer mw.reset;@layer mw.components{.copyright-line[data-v-77c14a9d]{text-align:center;max-width:100%;display:inline-block}.symbol-link[data-v-77c14a9d]{white-space:nowrap;color:inherit;vertical-align:text-top;padding:0 var(--space-4xs);align-items:center;text-decoration:none;display:inline-flex}.symbol-link[data-v-77c14a9d]:hover{text-decoration:underline}.symbol-mark[data-v-77c14a9d]{vertical-align:-.15em;display:inline}}
|
|
@@ -2,6 +2,6 @@ import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./CopyrightLine.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
import "./CopyrightLine.css";
|
|
4
4
|
//#region src/components/CopyrightLine.vue
|
|
5
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-77c14a9d"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -22,9 +22,9 @@ declare const __VLS_template: () => {
|
|
|
22
22
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
23
23
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
24
24
|
variant: "danger" | "link" | "primary" | "secondary" | "ghost";
|
|
25
|
-
type: "
|
|
26
|
-
disabled: boolean;
|
|
25
|
+
type: "button" | "submit" | "reset";
|
|
27
26
|
size: "md" | "sm";
|
|
27
|
+
disabled: boolean;
|
|
28
28
|
busy: boolean;
|
|
29
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer mw.reset;@layer mw.components{.mw-field-hint[data-v-
|
|
1
|
+
@layer mw.reset;@layer mw.components{.mw-field-hint[data-v-14f7f1b2]{vertical-align:middle;margin-inline-start:var(--space-3xs);display:inline-block;position:relative}.mw-field-hint__btn[data-v-14f7f1b2]{inline-size:calc(var(--space-sm) + var(--space-3xs));block-size:calc(var(--space-sm) + var(--space-3xs));font-size:var(--font-size-sm);font-weight:var(--font-weight-bold);border:1px solid var(--muted);color:var(--muted);cursor:help;background:0 0;border-radius:50%;justify-content:center;align-items:center;padding:0;font-family:inherit;line-height:1;display:inline-flex}.mw-field-hint__btn[data-v-14f7f1b2]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px}.mw-field-hint__tip[data-v-14f7f1b2]{inset:auto;inline-size:max-content;max-inline-size:min(var(--mw-content-narrow), calc(100vw - 2 * var(--space-xs)));box-sizing:border-box;padding:var(--space-2xs) var(--space-xs);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-2);color:var(--text);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--leading-normal);letter-spacing:normal;text-transform:none;text-align:start;white-space:normal;overflow-wrap:anywhere;margin:0;position:absolute;inset-block-start:var(--mw-hint-y,0);inset-inline-start:var(--mw-hint-x,0);overflow:visible}}
|
|
@@ -2,6 +2,6 @@ import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./UiFieldHint.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
import "./UiFieldHint.css";
|
|
4
4
|
//#region src/components/UiFieldHint.vue
|
|
5
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-14f7f1b2"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -1,49 +1,101 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { placeTip as e } from "../internal/placeTip.js";
|
|
2
|
+
import { createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, onBeforeUnmount as a, onMounted as o, openBlock as s, ref as c, renderSlot as l } from "vue";
|
|
2
3
|
//#region src/components/UiFieldHint.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
4
|
+
var u = ["aria-describedby"], d = ["id"], f = 150, p = 6, m = 8, h = /*@__PURE__*/ r({
|
|
4
5
|
__name: "UiFieldHint",
|
|
5
6
|
props: { fieldId: {} },
|
|
6
|
-
setup(
|
|
7
|
-
let
|
|
8
|
-
function
|
|
9
|
-
|
|
7
|
+
setup(r) {
|
|
8
|
+
let h = c(null), g = c(null), _ = c(!1), v = c(!1), y = !1, b = !1, x = !1, S = !1, C, w = 0, T = null;
|
|
9
|
+
function E() {
|
|
10
|
+
return !v.value && (y || b || x);
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
12
|
+
function D() {
|
|
13
|
+
let t = g.value, n = h.value?.querySelector("button");
|
|
14
|
+
if (!t || !n || !_.value) return;
|
|
15
|
+
let r = n.getBoundingClientRect(), i = t.getBoundingClientRect(), a = document.documentElement, o = e({
|
|
16
|
+
left: r.left,
|
|
17
|
+
top: r.top,
|
|
18
|
+
width: r.width,
|
|
19
|
+
height: r.height
|
|
20
|
+
}, {
|
|
21
|
+
width: i.width,
|
|
22
|
+
height: i.height
|
|
23
|
+
}, {
|
|
24
|
+
width: a.clientWidth,
|
|
25
|
+
height: a.clientHeight
|
|
26
|
+
}, {
|
|
27
|
+
x: window.scrollX,
|
|
28
|
+
y: window.scrollY
|
|
29
|
+
}, p, m);
|
|
30
|
+
t.style.setProperty("--mw-hint-x", `${o.left}px`), t.style.setProperty("--mw-hint-y", `${o.top}px`);
|
|
13
31
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
32
|
+
function O() {
|
|
33
|
+
w ||= requestAnimationFrame(() => {
|
|
34
|
+
w = 0, D();
|
|
35
|
+
});
|
|
16
36
|
}
|
|
17
|
-
function
|
|
18
|
-
|
|
37
|
+
function k(e) {
|
|
38
|
+
e !== S && (S = e, e ? document.addEventListener("keydown", A) : document.removeEventListener("keydown", A));
|
|
19
39
|
}
|
|
20
|
-
function
|
|
21
|
-
|
|
40
|
+
function A(e) {
|
|
41
|
+
e.key === "Escape" && (v.value = !0, x = !1, M());
|
|
22
42
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
43
|
+
function j(e) {
|
|
44
|
+
h.value && e.target instanceof Node && h.value.contains(e.target) || (x = !1, M());
|
|
25
45
|
}
|
|
26
|
-
|
|
27
|
-
let e =
|
|
28
|
-
e?.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
46
|
+
function M() {
|
|
47
|
+
let e = g.value, t = E();
|
|
48
|
+
t && !_.value ? (_.value = !0, e?.showPopover?.(), document.addEventListener("pointerdown", j), window.addEventListener("resize", O), document.addEventListener("scroll", O, {
|
|
49
|
+
capture: !0,
|
|
50
|
+
passive: !0
|
|
51
|
+
}), D(), e && typeof ResizeObserver < "u" && (T = new ResizeObserver(O), T.observe(e))) : !t && _.value && (_.value = !1, e?.hidePopover?.(), N()), !y && !b && !x && (v.value = !1, k(!1));
|
|
52
|
+
}
|
|
53
|
+
function N() {
|
|
54
|
+
T?.disconnect(), T = null, document.removeEventListener("pointerdown", j), window.removeEventListener("resize", O), document.removeEventListener("scroll", O, { capture: !0 }), w && cancelAnimationFrame(w), w = 0;
|
|
55
|
+
}
|
|
56
|
+
function P() {
|
|
57
|
+
clearTimeout(C), y = !0, k(!0), M();
|
|
58
|
+
}
|
|
59
|
+
function F() {
|
|
60
|
+
clearTimeout(C), C = setTimeout(() => {
|
|
61
|
+
y = !1, M();
|
|
62
|
+
}, f);
|
|
63
|
+
}
|
|
64
|
+
function I() {
|
|
65
|
+
b = !0, k(!0), M();
|
|
66
|
+
}
|
|
67
|
+
function L() {
|
|
68
|
+
b = !1, M();
|
|
69
|
+
}
|
|
70
|
+
function R(e) {
|
|
71
|
+
e.target instanceof Element && e.target.closest(".mw-field-hint__btn") && (x ? (x = !1, v.value = !0) : (v.value = !1, x = !0, k(!0)), M());
|
|
72
|
+
}
|
|
73
|
+
return o(() => {
|
|
74
|
+
let e = h.value;
|
|
75
|
+
e?.addEventListener("mouseenter", P), e?.addEventListener("mouseleave", F), e?.addEventListener("focusin", I), e?.addEventListener("focusout", L), e?.addEventListener("click", R);
|
|
76
|
+
}), a(() => {
|
|
77
|
+
let e = h.value;
|
|
78
|
+
e?.removeEventListener("mouseenter", P), e?.removeEventListener("mouseleave", F), e?.removeEventListener("focusin", I), e?.removeEventListener("focusout", L), e?.removeEventListener("click", R), clearTimeout(C), k(!1), _.value && g.value?.hidePopover?.(), N();
|
|
79
|
+
}), (e, a) => (s(), t("span", {
|
|
33
80
|
ref_key: "root",
|
|
34
|
-
ref:
|
|
35
|
-
class:
|
|
36
|
-
|
|
81
|
+
ref: h,
|
|
82
|
+
class: i(["mw-field-hint", {
|
|
83
|
+
"mw-field-hint--dismissed": v.value,
|
|
84
|
+
"mw-field-hint--open": _.value
|
|
85
|
+
}])
|
|
86
|
+
}, [n("button", {
|
|
37
87
|
type: "button",
|
|
38
88
|
class: "mw-field-hint__btn",
|
|
39
|
-
"aria-describedby": `${
|
|
89
|
+
"aria-describedby": `${r.fieldId}-hint`,
|
|
40
90
|
"aria-label": "Help"
|
|
41
|
-
}, "?", 8,
|
|
42
|
-
id: `${
|
|
43
|
-
|
|
91
|
+
}, "?", 8, u), n("small", {
|
|
92
|
+
id: `${r.fieldId}-hint`,
|
|
93
|
+
ref_key: "tip",
|
|
94
|
+
ref: g,
|
|
95
|
+
popover: "manual",
|
|
44
96
|
class: "mw-field-hint__tip"
|
|
45
|
-
}, [
|
|
97
|
+
}, [l(e.$slots, "default", {}, void 0, !0)], 8, d)], 2));
|
|
46
98
|
}
|
|
47
99
|
});
|
|
48
100
|
//#endregion
|
|
49
|
-
export {
|
|
101
|
+
export { h as default };
|
|
@@ -9,7 +9,7 @@ declare const __VLS_template: () => {
|
|
|
9
9
|
};
|
|
10
10
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
11
11
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
-
align: "
|
|
12
|
+
align: "right" | "left";
|
|
13
13
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
15
|
declare const _default: typeof __VLS_export;
|
|
@@ -5,11 +5,16 @@ export type ColorMode = 'light' | 'dark' | 'system';
|
|
|
5
5
|
* External colour-mode state manager. `ColorModeControl` is presentational and
|
|
6
6
|
* does NOT own state — bind it to `mode`/`set` (or your own store) instead.
|
|
7
7
|
*
|
|
8
|
+
* Nothing is stored unless the person asks: bind `remember` to the control's "Remember on this device" box
|
|
9
|
+
* (`ColorModeControl` `v-model:remember`). Without it, the system setting (or `defaultMode`) applies and choices last for the visit.
|
|
10
|
+
*
|
|
8
11
|
* @param defaultMode used only on first init when nothing is persisted.
|
|
9
12
|
*/
|
|
10
13
|
export declare function useColorMode(defaultMode?: ColorMode): {
|
|
11
14
|
mode: Ref<ColorMode, ColorMode>;
|
|
12
15
|
set: (m: ColorMode) => void;
|
|
13
16
|
cycle: () => void;
|
|
17
|
+
remember: Ref<boolean, boolean>;
|
|
18
|
+
setRemember: (keep: boolean) => void;
|
|
14
19
|
isDark: () => boolean;
|
|
15
20
|
};
|
|
@@ -1,46 +1,54 @@
|
|
|
1
1
|
import { effectScope as e, ref as t, watch as n } from "vue";
|
|
2
2
|
//#region src/composables/useColorMode.ts
|
|
3
|
-
var r = "mw-color-mode", i = t("system"), a = !1;
|
|
4
|
-
function
|
|
3
|
+
var r = "mw-color-mode", i = t("system"), a = t(!1), o = !1;
|
|
4
|
+
function s(e) {
|
|
5
|
+
try {
|
|
6
|
+
if (typeof localStorage > "u") return;
|
|
7
|
+
e === null ? localStorage.removeItem(r) : localStorage.setItem(r, e);
|
|
8
|
+
} catch {}
|
|
9
|
+
}
|
|
10
|
+
function c() {
|
|
5
11
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
6
12
|
}
|
|
7
|
-
function
|
|
8
|
-
return e === "dark" || e === "system" &&
|
|
13
|
+
function l(e) {
|
|
14
|
+
return e === "dark" || e === "system" && c();
|
|
9
15
|
}
|
|
10
|
-
function
|
|
11
|
-
typeof document < "u" && document.documentElement.setAttribute("data-theme",
|
|
16
|
+
function u(e) {
|
|
17
|
+
typeof document < "u" && document.documentElement.setAttribute("data-theme", l(e) ? "dark" : "light");
|
|
12
18
|
}
|
|
13
|
-
function
|
|
14
|
-
if (!
|
|
15
|
-
|
|
16
|
-
let
|
|
19
|
+
function d(t = "system") {
|
|
20
|
+
if (!o) {
|
|
21
|
+
o = !0;
|
|
22
|
+
let c = null;
|
|
17
23
|
try {
|
|
18
24
|
let e = typeof localStorage < "u" ? localStorage.getItem(r) : null;
|
|
19
|
-
(e === "light" || e === "dark" || e === "system") && (
|
|
25
|
+
(e === "light" || e === "dark" || e === "system") && (c = e);
|
|
20
26
|
} catch {}
|
|
21
|
-
i.value =
|
|
22
|
-
i.value === "system" &&
|
|
27
|
+
i.value = c ?? t, a.value = c !== null, u(i.value), typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
|
28
|
+
i.value === "system" && u("system");
|
|
23
29
|
}), e(!0).run(() => {
|
|
24
30
|
n(i, (e) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
typeof localStorage < "u" && localStorage.setItem(r, e);
|
|
28
|
-
} catch {}
|
|
29
|
-
});
|
|
31
|
+
u(e), a.value && s(e);
|
|
32
|
+
}), n(a, (e) => s(e ? i.value : null));
|
|
30
33
|
});
|
|
31
34
|
}
|
|
32
|
-
function
|
|
35
|
+
function c(e) {
|
|
33
36
|
i.value = e;
|
|
34
37
|
}
|
|
35
|
-
function
|
|
36
|
-
|
|
38
|
+
function d() {
|
|
39
|
+
c(i.value === "light" ? "dark" : i.value === "dark" ? "system" : "light");
|
|
40
|
+
}
|
|
41
|
+
function f(e) {
|
|
42
|
+
a.value = e;
|
|
37
43
|
}
|
|
38
44
|
return {
|
|
39
45
|
mode: i,
|
|
40
|
-
set:
|
|
41
|
-
cycle:
|
|
42
|
-
|
|
46
|
+
set: c,
|
|
47
|
+
cycle: d,
|
|
48
|
+
remember: a,
|
|
49
|
+
setRemember: f,
|
|
50
|
+
isDark: () => l(i.value)
|
|
43
51
|
};
|
|
44
52
|
}
|
|
45
53
|
//#endregion
|
|
46
|
-
export {
|
|
54
|
+
export { d as useColorMode };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** A rectangle in viewport coordinates (what `getBoundingClientRect()` returns, reduced to what is needed here). */
|
|
2
|
+
export interface Box {
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
}
|
|
8
|
+
/** Which side of the anchor the tip is on. */
|
|
9
|
+
export type Side = 'bottom' | 'top' | 'right' | 'left';
|
|
10
|
+
export interface Placement {
|
|
11
|
+
/** The tip's left edge in DOCUMENT coordinates (the page's own, so the tip scrolls with the page). */
|
|
12
|
+
left: number;
|
|
13
|
+
/** The tip's top edge in document coordinates. */
|
|
14
|
+
top: number;
|
|
15
|
+
side: Side;
|
|
16
|
+
/** False when no side keeps the whole tip inside the viewport: the default side is used and the page grows to hold it. */
|
|
17
|
+
fits: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** The order the sides are tried in: below the anchor is the default, then above, then beside it. */
|
|
20
|
+
export declare const SIDE_ORDER: readonly Side[];
|
|
21
|
+
/**
|
|
22
|
+
* Chooses the side and position of a tip. Each side is tried in {@link SIDE_ORDER}; on each, the tip is first slid along the side to
|
|
23
|
+
* stay on screen, and the side is taken when the whole tip then fits inside the viewport (less `margin` on every edge). If no side fits,
|
|
24
|
+
* the default side (below) is used, and because the result is in document coordinates the tip extends the page's own scroll area, so
|
|
25
|
+
* the person can scroll to read all of it. Nothing outside the table or panel that holds the anchor is affected.
|
|
26
|
+
*
|
|
27
|
+
* @param anchor The anchor's rectangle in viewport coordinates.
|
|
28
|
+
* @param tip The tip's measured size.
|
|
29
|
+
* @param viewport The visible area (`innerWidth`, `innerHeight`; the root element's client size where scrollbars take room).
|
|
30
|
+
* @param scroll The page's scroll offsets (`scrollX`, `scrollY`), added to turn viewport coordinates into document coordinates.
|
|
31
|
+
* @param gap The space between the anchor and the tip.
|
|
32
|
+
* @param margin The space kept clear at the viewport's edges.
|
|
33
|
+
*/
|
|
34
|
+
export declare function placeTip(anchor: Box, tip: {
|
|
35
|
+
width: number;
|
|
36
|
+
height: number;
|
|
37
|
+
}, viewport: {
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
}, scroll: {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
}, gap: number, margin: number): Placement;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//#region src/internal/placeTip.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"bottom",
|
|
4
|
+
"top",
|
|
5
|
+
"right",
|
|
6
|
+
"left"
|
|
7
|
+
];
|
|
8
|
+
function t(e, t, n, r) {
|
|
9
|
+
return Math.max(n, Math.min(e, r - t));
|
|
10
|
+
}
|
|
11
|
+
function n(e, n, r, i, a, o) {
|
|
12
|
+
let s = t(n.left, r.width, o, i.width - o), c = t(n.top, r.height, o, i.height - o);
|
|
13
|
+
switch (e) {
|
|
14
|
+
case "bottom": return {
|
|
15
|
+
left: s,
|
|
16
|
+
top: n.top + n.height + a
|
|
17
|
+
};
|
|
18
|
+
case "top": return {
|
|
19
|
+
left: s,
|
|
20
|
+
top: n.top - a - r.height
|
|
21
|
+
};
|
|
22
|
+
case "right": return {
|
|
23
|
+
left: n.left + n.width + a,
|
|
24
|
+
top: c
|
|
25
|
+
};
|
|
26
|
+
case "left": return {
|
|
27
|
+
left: n.left - a - r.width,
|
|
28
|
+
top: c
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function r(t, r, i, a, o, s) {
|
|
33
|
+
let c = (e) => e.left >= s && e.top >= s && e.left + r.width <= i.width - s && e.top + r.height <= i.height - s, l = null, u = n("bottom", t, r, i, o, s);
|
|
34
|
+
for (let a of e) {
|
|
35
|
+
let e = n(a, t, r, i, o, s);
|
|
36
|
+
if (c(e)) {
|
|
37
|
+
l = a, u = e;
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
left: Math.round(u.left + a.x),
|
|
43
|
+
top: Math.round(u.top + a.y),
|
|
44
|
+
side: l ?? "bottom",
|
|
45
|
+
fits: l !== null
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { e as SIDE_ORDER, r as placeTip };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meddleware/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.45",
|
|
4
4
|
"description": "Shared Vue 3 component library for @meddleware UIs — layout shell (header/sidebar/footer), colour-mode control, and primitives. Built on @meddleware/design-tokens.",
|
|
5
5
|
"homepage": "https://docs.meddleware.co.uk/",
|
|
6
6
|
"license": "0BSD",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@axe-core/playwright": "^4.13.0",
|
|
56
56
|
"@meddleware/eslint-config": "^0.0.4",
|
|
57
|
-
"@meddleware/frontend-config": "^0.0.
|
|
57
|
+
"@meddleware/frontend-config": "^0.0.14",
|
|
58
58
|
"@playwright/test": "~1.64.1",
|
|
59
59
|
"@resvg/resvg-js": "^2.6.2",
|
|
60
60
|
"@vitejs/plugin-vue": "^6.0.9",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"jsdom": "^30.1.2",
|
|
71
71
|
"postcss": "^8.4.49",
|
|
72
72
|
"postcss-html": "^2.0.0",
|
|
73
|
-
"stylelint": "^
|
|
74
|
-
"stylelint-config-standard": "^
|
|
73
|
+
"stylelint": "^18.0.0",
|
|
74
|
+
"stylelint-config-standard": "^41.0.0",
|
|
75
75
|
"typescript": "^6.0.0",
|
|
76
76
|
"vite": "^8.3.0",
|
|
77
77
|
"vitest": "~5.1.0",
|
|
@@ -85,5 +85,11 @@
|
|
|
85
85
|
],
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
|
+
},
|
|
89
|
+
"overrides": {
|
|
90
|
+
"js-beautify": {
|
|
91
|
+
"editorconfig": "^4.0.1",
|
|
92
|
+
"glob": "^14.0.6"
|
|
93
|
+
}
|
|
88
94
|
}
|
|
89
95
|
}
|