@meddleware/ui 0.1.0 → 0.1.2
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 +2 -0
- package/dist/components/AppFooter.vue.d.ts +26 -0
- package/dist/components/AppHeader.vue.d.ts +29 -0
- package/dist/components/AppSidebar.vue.d.ts +28 -0
- package/dist/components/ColorModeControl.vue.d.ts +21 -0
- package/dist/components/UiButton.vue.d.ts +25 -0
- package/dist/components/UiCard.vue.d.ts +21 -0
- package/dist/components/UiNotice.vue.d.ts +22 -0
- package/dist/components/UiSelect.vue.d.ts +20 -0
- package/dist/composables/useColorMode.d.ts +15 -0
- package/dist/index.d.ts +11 -0
- package/dist/internal/panel.d.ts +19 -0
- package/dist/ui.js +6 -6
- package/package.json +4 -4
- package/dist/ui.css +0 -2
package/dist/base.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.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-5aa0ef5a]{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-5aa0ef5a]{border-bottom:1px solid var(--_border);padding:1rem}.mw-sidebar__nav[data-v-5aa0ef5a]{flex-direction:column;flex:auto;gap:.25rem;padding:.75rem;display:flex;overflow-y:auto}.mw-sidebar__foot[data-v-5aa0ef5a]{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-e4a6bf1d]{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-e4a6bf1d]{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-e4a6bf1d]:hover{opacity:1}.mw-mode__btn.is-active[data-v-e4a6bf1d]{opacity:1;background:color-mix(in srgb, var(--_text,var(--text)) 14%, transparent)}.mw-mode__btn[data-v-e4a6bf1d]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}@media (width<=640px){.mw-mode__label[data-v-e4a6bf1d]{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)}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type PanelVariant, type PanelColors } from '../internal/panel';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** light | dark | transparent — default transparent (footers sit over the page background). */
|
|
4
|
+
variant?: PanelVariant;
|
|
5
|
+
/** Per-instance colour overrides; token values are used by default. */
|
|
6
|
+
colors?: PanelColors;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
start?: (props: typeof __VLS_1) => any;
|
|
11
|
+
} & {
|
|
12
|
+
default?: (props: typeof __VLS_3) => any;
|
|
13
|
+
} & {
|
|
14
|
+
end?: (props: typeof __VLS_5) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
|
+
variant: PanelVariant;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type PanelVariant, type PanelColors } from '../internal/panel';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** light | dark | transparent — default dark (token defaults, overridable). */
|
|
4
|
+
variant?: PanelVariant;
|
|
5
|
+
/** Per-instance colour overrides; token values are used by default. */
|
|
6
|
+
colors?: PanelColors;
|
|
7
|
+
/** Stick to the top of the viewport (full-width shells). */
|
|
8
|
+
sticky?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
brand?: (props: typeof __VLS_1) => any;
|
|
13
|
+
} & {
|
|
14
|
+
default?: (props: typeof __VLS_3) => any;
|
|
15
|
+
} & {
|
|
16
|
+
actions?: (props: typeof __VLS_5) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
19
|
+
variant: PanelVariant;
|
|
20
|
+
sticky: boolean;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type PanelVariant, type PanelColors } from '../internal/panel';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** light | dark | transparent — default dark (token defaults, overridable). */
|
|
4
|
+
variant?: PanelVariant;
|
|
5
|
+
/** Per-instance colour overrides; token values are used by default. */
|
|
6
|
+
colors?: PanelColors;
|
|
7
|
+
/** Sidebar width (CSS length, e.g. '280px'). Defaults to `--mw-sidebar-width` (240px). */
|
|
8
|
+
width?: string;
|
|
9
|
+
};
|
|
10
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
head?: (props: typeof __VLS_1) => any;
|
|
13
|
+
} & {
|
|
14
|
+
default?: (props: typeof __VLS_3) => any;
|
|
15
|
+
} & {
|
|
16
|
+
foot?: (props: typeof __VLS_5) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
19
|
+
variant: PanelVariant;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ColorMode } from '../composables/useColorMode';
|
|
2
|
+
/**
|
|
3
|
+
* Presentational light/dark/system control. It owns NO state — bind it with
|
|
4
|
+
* `v-model` (or `:modelValue` + `@update:modelValue`) to external state, e.g.
|
|
5
|
+
* the `useColorMode()` composable or your store.
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
/** The currently selected colour mode (`v-model`). */
|
|
9
|
+
modelValue: ColorMode;
|
|
10
|
+
/** Which modes to offer (default all three). */
|
|
11
|
+
modes?: ColorMode[];
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (args_0: ColorMode) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((args_0: ColorMode) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
modes: ColorMode[];
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Visual style — primary (accent fill), secondary, ghost (outline), or danger (red). */
|
|
3
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
4
|
+
/** HTML button type attribute. Use 'submit' inside forms; 'button' otherwise. */
|
|
5
|
+
type?: 'button' | 'submit' | 'reset';
|
|
6
|
+
/** When true, the button is rendered faded and blocks all interaction. */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_1: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_1) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
variant: "primary" | "secondary" | "ghost" | "danger";
|
|
15
|
+
type: "button" | "submit" | "reset";
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Optional card heading rendered in the header slot fallback. */
|
|
3
|
+
title?: string;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
header?: (props: typeof __VLS_1) => any;
|
|
8
|
+
} & {
|
|
9
|
+
default?: (props: typeof __VLS_3) => any;
|
|
10
|
+
} & {
|
|
11
|
+
footer?: (props: typeof __VLS_5) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/**
|
|
3
|
+
* Semantic intent — controls colour and ARIA role.
|
|
4
|
+
* - `'info'` (default): neutral informational note.
|
|
5
|
+
* - `'error'`: danger-coloured, sets `role="alert"` for assistive technologies.
|
|
6
|
+
* - `'ok'`: success-coloured, sets `role="status"`.
|
|
7
|
+
*/
|
|
8
|
+
type?: 'info' | 'error' | 'ok';
|
|
9
|
+
};
|
|
10
|
+
declare var __VLS_1: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
default?: (props: typeof __VLS_1) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_ModelProps = {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
11
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
/** The user's colour-mode preference: force `light`/`dark`, or follow the OS with `system`. */
|
|
3
|
+
export type ColorMode = 'light' | 'dark' | 'system';
|
|
4
|
+
/**
|
|
5
|
+
* External colour-mode state manager. `ColorModeControl` is presentational and
|
|
6
|
+
* does NOT own state — bind it to `mode`/`set` (or your own store) instead.
|
|
7
|
+
*
|
|
8
|
+
* @param defaultMode used only on first init when nothing is persisted.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useColorMode(defaultMode?: ColorMode): {
|
|
11
|
+
mode: Ref<ColorMode, ColorMode>;
|
|
12
|
+
set: (m: ColorMode) => void;
|
|
13
|
+
cycle: () => void;
|
|
14
|
+
isDark: () => boolean;
|
|
15
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as AppHeader } from './components/AppHeader.vue';
|
|
2
|
+
export { default as AppSidebar } from './components/AppSidebar.vue';
|
|
3
|
+
export { default as AppFooter } from './components/AppFooter.vue';
|
|
4
|
+
export { default as ColorModeControl } from './components/ColorModeControl.vue';
|
|
5
|
+
export { default as UiButton } from './components/UiButton.vue';
|
|
6
|
+
export { default as UiCard } from './components/UiCard.vue';
|
|
7
|
+
export { default as UiSelect } from './components/UiSelect.vue';
|
|
8
|
+
export { default as UiNotice } from './components/UiNotice.vue';
|
|
9
|
+
export { useColorMode } from './composables/useColorMode.js';
|
|
10
|
+
export type { ColorMode } from './composables/useColorMode.js';
|
|
11
|
+
export type { PanelVariant, PanelColors } from './internal/panel.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CSSProperties } from 'vue';
|
|
2
|
+
/** Panel colour scheme: theme-independent `light`/`dark` panel tokens, or `transparent`. */
|
|
3
|
+
export type PanelVariant = 'light' | 'dark' | 'transparent';
|
|
4
|
+
/** Optional per-instance colour overrides (win over the token defaults). */
|
|
5
|
+
export interface PanelColors {
|
|
6
|
+
bg?: string;
|
|
7
|
+
surface?: string;
|
|
8
|
+
text?: string;
|
|
9
|
+
muted?: string;
|
|
10
|
+
border?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Resolve a panel variant to a set of local CSS variables (`--_bg`, `--_text`,
|
|
14
|
+
* …) that the header/sidebar/footer styles consume. Variants use the
|
|
15
|
+
* theme-INDEPENDENT `--mw-panel-*` tokens so a dark panel renders correctly on
|
|
16
|
+
* a light page (and vice-versa). Transparent inherits the page text colour.
|
|
17
|
+
* Any supplied `colors` override the defaults — token values are the default.
|
|
18
|
+
*/
|
|
19
|
+
export declare function panelVars(variant: PanelVariant, colors?: PanelColors): CSSProperties;
|
package/dist/ui.js
CHANGED
|
@@ -79,7 +79,7 @@ var ee = { class: "mw-header__brand" }, y = { class: "mw-header__center" }, b =
|
|
|
79
79
|
t.$slots.foot ? (l(), r("div", E, [f(t.$slots, "foot", {}, void 0, !0)])) : n("", !0)
|
|
80
80
|
], 6));
|
|
81
81
|
}
|
|
82
|
-
}), [["__scopeId", "data-v-
|
|
82
|
+
}), [["__scopeId", "data-v-5aa0ef5a"]]), O = { class: "mw-footer__start" }, k = { class: "mw-footer__center" }, A = { class: "mw-footer__end" }, j = /*#__PURE__*/ S(/* @__PURE__ */ a({
|
|
83
83
|
__name: "AppFooter",
|
|
84
84
|
props: {
|
|
85
85
|
variant: { default: "transparent" },
|
|
@@ -96,7 +96,7 @@ var ee = { class: "mw-header__brand" }, y = { class: "mw-header__center" }, b =
|
|
|
96
96
|
i("div", A, [f(t.$slots, "end", {}, void 0, !0)])
|
|
97
97
|
], 6));
|
|
98
98
|
}
|
|
99
|
-
}), [["__scopeId", "data-v-
|
|
99
|
+
}), [["__scopeId", "data-v-c646b8e1"]]), M = {
|
|
100
100
|
class: "mw-mode",
|
|
101
101
|
role: "group",
|
|
102
102
|
"aria-label": "Colour mode"
|
|
@@ -134,7 +134,7 @@ var ee = { class: "mw-header__brand" }, y = { class: "mw-header__center" }, b =
|
|
|
134
134
|
onClick: (t) => o.$emit("update:modelValue", e)
|
|
135
135
|
}, [i("span", P, p(a[e]), 1), i("span", te, p(n[e]), 1)], 10, N))), 128))]));
|
|
136
136
|
}
|
|
137
|
-
}), [["__scopeId", "data-v-
|
|
137
|
+
}), [["__scopeId", "data-v-e4a6bf1d"]]), I = ["type", "disabled"], L = /*#__PURE__*/ S(/* @__PURE__ */ a({
|
|
138
138
|
__name: "UiButton",
|
|
139
139
|
props: {
|
|
140
140
|
variant: { default: "primary" },
|
|
@@ -151,7 +151,7 @@ var ee = { class: "mw-header__brand" }, y = { class: "mw-header__center" }, b =
|
|
|
151
151
|
class: s(["mw-btn", `mw-btn--${e.variant}`])
|
|
152
152
|
}, [f(t.$slots, "default", {}, void 0, !0)], 10, I));
|
|
153
153
|
}
|
|
154
|
-
}), [["__scopeId", "data-v-
|
|
154
|
+
}), [["__scopeId", "data-v-299de2c3"]]), R = { class: "mw-card" }, z = {
|
|
155
155
|
key: 0,
|
|
156
156
|
class: "mw-card__header"
|
|
157
157
|
}, B = { class: "mw-card__title" }, V = { class: "mw-card__body" }, H = {
|
|
@@ -167,7 +167,7 @@ var ee = { class: "mw-header__brand" }, y = { class: "mw-header__center" }, b =
|
|
|
167
167
|
t.$slots.footer ? (l(), r("footer", H, [f(t.$slots, "footer", {}, void 0, !0)])) : n("", !0)
|
|
168
168
|
]));
|
|
169
169
|
}
|
|
170
|
-
}), [["__scopeId", "data-v-
|
|
170
|
+
}), [["__scopeId", "data-v-fd2fd7ab"]]), W = { class: "mw-select" }, G = /*#__PURE__*/ S(/* @__PURE__ */ a({
|
|
171
171
|
inheritAttrs: !1,
|
|
172
172
|
__name: "UiSelect",
|
|
173
173
|
props: {
|
|
@@ -199,7 +199,7 @@ var ee = { class: "mw-header__brand" }, y = { class: "mw-header__center" }, b =
|
|
|
199
199
|
role: i.value
|
|
200
200
|
}, [f(t.$slots, "default", {}, void 0, !0)], 10, K));
|
|
201
201
|
}
|
|
202
|
-
}), [["__scopeId", "data-v-
|
|
202
|
+
}), [["__scopeId", "data-v-6f53d0be"]]), J = "mw-color-mode", Y = u("system"), X = !1;
|
|
203
203
|
function Z() {
|
|
204
204
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
205
205
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meddleware/ui",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Shared Vue 3 component library for @meddleware UIs
|
|
3
|
+
"version": "0.1.2",
|
|
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
5
|
"license": "0BSD",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
|
-
"build": "vue-tsc -p tsconfig.build.json && vite build",
|
|
25
|
+
"build": "rm -rf dist && vue-tsc -p tsconfig.build.json && vite build",
|
|
26
26
|
"type-check": "vue-tsc --noEmit"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
@@ -41,4 +41,4 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
}
|
|
44
|
-
}
|
|
44
|
+
}
|
package/dist/ui.css
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.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-ccf6628a]{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-ccf6628a]{border-bottom:1px solid var(--_border);padding:1rem}.mw-sidebar__nav[data-v-ccf6628a]{flex-direction:column;flex:auto;gap:.25rem;padding:.75rem;display:flex;overflow-y:auto}.mw-sidebar__foot[data-v-ccf6628a]{border-top:1px solid var(--_border);color:var(--_muted);padding:.75rem 1rem;font-size:.85rem}.mw-footer[data-v-060bc806]{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-060bc806]{border-top:1px solid var(--border)}.mw-footer__center[data-v-060bc806]{flex:auto;min-width:0}.mw-footer__end[data-v-060bc806]{margin-left:auto}.mw-mode[data-v-c982c97c]{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-c982c97c]{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-c982c97c]:hover{opacity:1}.mw-mode__btn.is-active[data-v-c982c97c]{opacity:1;background:color-mix(in srgb, var(--_text,var(--text)) 14%, transparent)}.mw-mode__btn[data-v-c982c97c]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}@media (width<=640px){.mw-mode__label[data-v-c982c97c]{display:none}}.mw-btn[data-v-2a324058]{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-2a324058]:disabled{opacity:.55;cursor:not-allowed}.mw-btn[data-v-2a324058]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.mw-btn--primary[data-v-2a324058]{background:var(--accent);color:var(--accent-contrast)}.mw-btn--primary[data-v-2a324058]:not(:disabled):hover{filter:brightness(1.08)}.mw-btn--secondary[data-v-2a324058]{background:var(--secondary);color:var(--secondary-contrast)}.mw-btn--secondary[data-v-2a324058]:not(:disabled):hover{filter:brightness(1.08)}.mw-btn--ghost[data-v-2a324058]{color:var(--text);border-color:var(--border);background:0 0}.mw-btn--ghost[data-v-2a324058]:not(:disabled):hover{background:var(--lift)}.mw-btn--danger[data-v-2a324058]{background:var(--danger);color:#fff}.mw-btn--danger[data-v-2a324058]:not(:disabled):hover{filter:brightness(1.08)}.mw-card[data-v-d1a4446e]{background:var(--surface);border:1px solid var(--border);border-radius:var(--mw-radius,10px);color:var(--text);overflow:hidden}.mw-card__header[data-v-d1a4446e]{border-bottom:1px solid var(--border);padding:.85rem 1rem}.mw-card__title[data-v-d1a4446e]{margin:0;font-size:1rem;font-weight:600}.mw-card__body[data-v-d1a4446e]{padding:1rem}.mw-card__footer[data-v-d1a4446e]{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-7ba4f2bb]{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-7ba4f2bb]{border-left-color:var(--danger);color:var(--danger);background:color-mix(in srgb, var(--danger) 8%, transparent)}.mw-notice--ok[data-v-7ba4f2bb]{border-left-color:var(--ok);color:var(--ok);background:color-mix(in srgb, var(--ok) 8%, transparent)}
|
|
2
|
-
/*$vite$:1*/
|