@munet/ui 1.0.0
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/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/components/Button/LoadingBackground/index.d.ts +2 -0
- package/dist/components/Button/LoadingBackground/index.js +14 -0
- package/dist/components/Button/LoadingBackground/index.module.css +1 -0
- package/dist/components/Button/LoadingBackground/index.module.sass.js +7 -0
- package/dist/components/Button/index.d.ts +16 -0
- package/dist/components/Button/index.js +29 -0
- package/dist/components/CheckBox/FlagCheckBox.d.ts +35 -0
- package/dist/components/CheckBox/FlagCheckBox.js +41 -0
- package/dist/components/CheckBox/index.d.ts +26 -0
- package/dist/components/CheckBox/index.js +45 -0
- package/dist/components/DateFormat.d.ts +22 -0
- package/dist/components/DateFormat.js +23 -0
- package/dist/components/DropMenu/DropDown.d.ts +49 -0
- package/dist/components/DropMenu/DropDown.js +77 -0
- package/dist/components/DropMenu/index.d.ts +54 -0
- package/dist/components/DropMenu/index.js +48 -0
- package/dist/components/GlobalElementsContainer/ForegroundTask.d.ts +39 -0
- package/dist/components/GlobalElementsContainer/ForegroundTask.js +52 -0
- package/dist/components/GlobalElementsContainer/TaskManager.d.ts +45 -0
- package/dist/components/GlobalElementsContainer/TaskManager.js +90 -0
- package/dist/components/GlobalElementsContainer/TaskManager.module.css +1 -0
- package/dist/components/GlobalElementsContainer/TaskManager.module.sass.js +9 -0
- package/dist/components/GlobalElementsContainer/Toast.d.ts +14 -0
- package/dist/components/GlobalElementsContainer/Toast.js +41 -0
- package/dist/components/GlobalElementsContainer/ToastsDisplay.d.ts +2 -0
- package/dist/components/GlobalElementsContainer/ToastsDisplay.js +24 -0
- package/dist/components/GlobalElementsContainer/TransactionalDialog.d.ts +7 -0
- package/dist/components/GlobalElementsContainer/TransactionalDialog.js +45 -0
- package/dist/components/GlobalElementsContainer/index.d.ts +2 -0
- package/dist/components/GlobalElementsContainer/index.js +18 -0
- package/dist/components/Modal/index.d.ts +60 -0
- package/dist/components/Modal/index.js +124 -0
- package/dist/components/Modal/styles.module.css +1 -0
- package/dist/components/Modal/styles.module.sass.js +24 -0
- package/dist/components/NumberInput.d.ts +50 -0
- package/dist/components/NumberInput.js +60 -0
- package/dist/components/Qrcode.d.ts +18 -0
- package/dist/components/Qrcode.js +30 -0
- package/dist/components/Radio/index.d.ts +17 -0
- package/dist/components/Radio/index.js +34 -0
- package/dist/components/Range.css +1 -0
- package/dist/components/Range.vue.js +7 -0
- package/dist/components/Range.vue2.js +54 -0
- package/dist/components/ScrollText/index.d.ts +6 -0
- package/dist/components/ScrollText/index.js +48 -0
- package/dist/components/ScrollText/styles.module.css +1 -0
- package/dist/components/ScrollText/styles.module.sass.js +11 -0
- package/dist/components/Section/index.d.ts +12 -0
- package/dist/components/Section/index.js +35 -0
- package/dist/components/Select/index.d.ts +42 -0
- package/dist/components/Select/index.js +71 -0
- package/dist/components/Select/style.module.css +1 -0
- package/dist/components/Select/style.module.sass.js +33 -0
- package/dist/components/SubNaviBar/WhateverNaviBar.d.ts +21 -0
- package/dist/components/SubNaviBar/WhateverNaviBar.js +34 -0
- package/dist/components/TextInput/index.d.ts +45 -0
- package/dist/components/TextInput/index.js +106 -0
- package/dist/components/TextInput/style.module.css +1 -0
- package/dist/components/TextInput/style.module.sass.js +17 -0
- package/dist/components/TransitionOpacity.d.ts +15 -0
- package/dist/components/TransitionOpacity.js +26 -0
- package/dist/components/TransitionVertical.vue.js +97 -0
- package/dist/components/TransitionVertical.vue2.js +4 -0
- package/dist/components/WarningBackground/index.d.ts +14 -0
- package/dist/components/WarningBackground/index.js +22 -0
- package/dist/components/WarningBackground/index.module.css +1 -0
- package/dist/components/WarningBackground/index.module.sass.js +9 -0
- package/dist/components/Window/index.d.ts +89 -0
- package/dist/components/Window/index.js +169 -0
- package/dist/components/Window/styles.module.css +1 -0
- package/dist/components/Window/styles.module.sass.js +51 -0
- package/dist/controllers/toastController.d.ts +17 -0
- package/dist/controllers/toastController.js +13 -0
- package/dist/i18n/index.d.ts +26 -0
- package/dist/i18n/index.js +17 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +86 -0
- package/dist/states/modal.d.ts +31 -0
- package/dist/states/modal.js +16 -0
- package/dist/themes/aquadx/components.module.css +1 -0
- package/dist/themes/aquadx/components.module.scss.js +31 -0
- package/dist/themes/aquadx/index.d.ts +6 -0
- package/dist/themes/aquadx/index.js +10 -0
- package/dist/themes/aquadx/vars.d.ts +5 -0
- package/dist/themes/aquadx/vars.js +7 -0
- package/dist/themes/base/composer.d.ts +19 -0
- package/dist/themes/base/composer.js +19 -0
- package/dist/themes/base/types.d.ts +21 -0
- package/dist/themes/dynamicLight/components.module.css +1 -0
- package/dist/themes/dynamicLight/components.module.scss.js +33 -0
- package/dist/themes/dynamicLight/index.d.ts +6 -0
- package/dist/themes/dynamicLight/index.js +10 -0
- package/dist/themes/dynamicLight/vars.d.ts +5 -0
- package/dist/themes/dynamicLight/vars.js +7 -0
- package/dist/themes/global.module.css +1 -0
- package/dist/themes/global.module.sass.js +4 -0
- package/dist/themes/index.d.ts +30 -0
- package/dist/themes/index.js +82 -0
- package/dist/utils/animation.d.ts +1 -0
- package/dist/utils/animation.js +4 -0
- package/package.json +51 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { UIThemes as r, clearAppThemes as t, currentThemeVars as a, isLightTheme as f, realThemeName as m, registerAppTheme as s, selectedThemeHue as l, selectedThemeName as d, theme as p, themeClasses as x } from "./themes/index.js";
|
|
2
|
+
import { configureUIStrings as n, getUIString as i } from "./i18n/index.js";
|
|
3
|
+
import { addToast as g, toasts as h } from "./controllers/toastController.js";
|
|
4
|
+
import { getModalIndex as S, isTopModal as I, modalShowing as M, modalStack as k, registerModal as y, unregisterModal as B } from "./states/modal.js";
|
|
5
|
+
import { default as U } from "./components/Button/index.js";
|
|
6
|
+
import { default as C } from "./components/TextInput/index.js";
|
|
7
|
+
import { default as V } from "./components/CheckBox/index.js";
|
|
8
|
+
import { default as R } from "./components/CheckBox/FlagCheckBox.js";
|
|
9
|
+
import { default as b } from "./components/Radio/index.js";
|
|
10
|
+
import { default as v } from "./components/Modal/index.js";
|
|
11
|
+
import { default as F } from "./components/Modal/styles.module.sass.js";
|
|
12
|
+
import { default as G } from "./components/Window/index.js";
|
|
13
|
+
import { default as O } from "./components/Section/index.js";
|
|
14
|
+
import { default as j } from "./components/DateFormat.js";
|
|
15
|
+
import { default as J } from "./components/Qrcode.js";
|
|
16
|
+
import { default as P } from "./components/NumberInput.js";
|
|
17
|
+
import { default as Y } from "./components/Select/index.js";
|
|
18
|
+
import { default as _ } from "./components/TransitionVertical.vue.js";
|
|
19
|
+
import { default as ee } from "./components/Range.vue.js";
|
|
20
|
+
import { default as re } from "./components/TransitionOpacity.js";
|
|
21
|
+
import { default as ae } from "./components/DropMenu/index.js";
|
|
22
|
+
import { default as me } from "./components/DropMenu/DropDown.js";
|
|
23
|
+
import { default as le } from "./components/GlobalElementsContainer/index.js";
|
|
24
|
+
import { default as pe } from "./components/ScrollText/index.js";
|
|
25
|
+
import { default as ue } from "./components/SubNaviBar/WhateverNaviBar.js";
|
|
26
|
+
import { default as ie } from "./components/WarningBackground/index.js";
|
|
27
|
+
import { foregroundTask as ge } from "./components/GlobalElementsContainer/ForegroundTask.js";
|
|
28
|
+
import { showTransactionalDialog as Te } from "./components/GlobalElementsContainer/TransactionalDialog.js";
|
|
29
|
+
import { taskManager as Ie } from "./components/GlobalElementsContainer/TaskManager.js";
|
|
30
|
+
import { composeThemeRoots as ke, composeThemeStyles as ye, mergeStyles as Be } from "./themes/base/composer.js";
|
|
31
|
+
import { dynamicLightUI as Ue, dynamicLightVars as we } from "./themes/dynamicLight/index.js";
|
|
32
|
+
import { aquadxUI as Ne, aquadxVars as Ve } from "./themes/aquadx/index.js";
|
|
33
|
+
export {
|
|
34
|
+
U as Button,
|
|
35
|
+
V as CheckBox,
|
|
36
|
+
j as DateFormat,
|
|
37
|
+
me as DropDown,
|
|
38
|
+
ae as DropMenu,
|
|
39
|
+
R as FlagCheckBox,
|
|
40
|
+
le as GlobalElementsContainer,
|
|
41
|
+
v as Modal,
|
|
42
|
+
F as ModalStyles,
|
|
43
|
+
P as NumberInput,
|
|
44
|
+
J as Qrcode,
|
|
45
|
+
b as Radio,
|
|
46
|
+
ee as Range,
|
|
47
|
+
pe as ScrollText,
|
|
48
|
+
O as Section,
|
|
49
|
+
Y as Select,
|
|
50
|
+
C as TextInput,
|
|
51
|
+
re as TransitionOpacity,
|
|
52
|
+
_ as TransitionVertical,
|
|
53
|
+
r as UIThemes,
|
|
54
|
+
ie as WarningBackground,
|
|
55
|
+
ue as WhateverNaviBar,
|
|
56
|
+
G as Window,
|
|
57
|
+
g as addToast,
|
|
58
|
+
Ne as aquadxUI,
|
|
59
|
+
Ve as aquadxVars,
|
|
60
|
+
t as clearAppThemes,
|
|
61
|
+
ke as composeThemeRoots,
|
|
62
|
+
ye as composeThemeStyles,
|
|
63
|
+
n as configureUIStrings,
|
|
64
|
+
a as currentThemeVars,
|
|
65
|
+
Ue as dynamicLightUI,
|
|
66
|
+
we as dynamicLightVars,
|
|
67
|
+
ge as foregroundTask,
|
|
68
|
+
S as getModalIndex,
|
|
69
|
+
i as getUIString,
|
|
70
|
+
f as isLightTheme,
|
|
71
|
+
I as isTopModal,
|
|
72
|
+
Be as mergeStyles,
|
|
73
|
+
M as modalShowing,
|
|
74
|
+
k as modalStack,
|
|
75
|
+
m as realThemeName,
|
|
76
|
+
s as registerAppTheme,
|
|
77
|
+
y as registerModal,
|
|
78
|
+
l as selectedThemeHue,
|
|
79
|
+
d as selectedThemeName,
|
|
80
|
+
Te as showTransactionalDialog,
|
|
81
|
+
Ie as taskManager,
|
|
82
|
+
p as theme,
|
|
83
|
+
x as themeClasses,
|
|
84
|
+
h as toasts,
|
|
85
|
+
B as unregisterModal
|
|
86
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modal 实例栈,用于管理多个同时打开的 modal
|
|
3
|
+
* 每个元素包含 modal 的唯一 ID
|
|
4
|
+
*/
|
|
5
|
+
export declare const modalStack: import("vue").Ref<symbol[], symbol[]>;
|
|
6
|
+
/**
|
|
7
|
+
* 全局 modal 显示状态(向后兼容)
|
|
8
|
+
* 用于控制某些功能(如自动聚焦)在 modal 打开时的行为
|
|
9
|
+
*/
|
|
10
|
+
export declare const modalShowing: import("vue").ComputedRef<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* 注册一个 modal 实例
|
|
13
|
+
* @returns modal 的唯一 ID
|
|
14
|
+
*/
|
|
15
|
+
export declare const registerModal: () => symbol;
|
|
16
|
+
/**
|
|
17
|
+
* 注销一个 modal 实例
|
|
18
|
+
* @param id modal 的唯一 ID
|
|
19
|
+
*/
|
|
20
|
+
export declare const unregisterModal: (id: symbol) => void;
|
|
21
|
+
/**
|
|
22
|
+
* 获取 modal 在栈中的索引(用于计算 z-index)
|
|
23
|
+
* @param id modal 的唯一 ID
|
|
24
|
+
* @returns 索引,如果不存在返回 -1
|
|
25
|
+
*/
|
|
26
|
+
export declare const getModalIndex: (id: symbol) => number;
|
|
27
|
+
/**
|
|
28
|
+
* 检查是否是栈顶的 modal
|
|
29
|
+
* @param id modal 的唯一 ID
|
|
30
|
+
*/
|
|
31
|
+
export declare const isTopModal: (id: symbol) => boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ref as n, computed as l } from "vue";
|
|
2
|
+
const o = n([]), r = l(() => o.value.length > 0), d = () => {
|
|
3
|
+
const e = Symbol("modal");
|
|
4
|
+
return o.value.push(e), e;
|
|
5
|
+
}, s = (e) => {
|
|
6
|
+
const t = o.value.indexOf(e);
|
|
7
|
+
t > -1 && o.value.splice(t, 1);
|
|
8
|
+
}, u = (e) => o.value.indexOf(e), c = (e) => o.value[o.value.length - 1] === e;
|
|
9
|
+
export {
|
|
10
|
+
u as getModalIndex,
|
|
11
|
+
c as isTopModal,
|
|
12
|
+
r as modalShowing,
|
|
13
|
+
o as modalStack,
|
|
14
|
+
d as registerModal,
|
|
15
|
+
s as unregisterModal
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";body:has(.components-module_e-IS4){background:#222;--text-color: #ffffffde;--link-color: #b3c6ff;--modal-backdrop-bg: #2b2b2b;--modal-button-bg: rgb(70, 70, 70);--modal-button-hover-bg: rgb(76, 76, 76);--modal-button-active-bg: rgb(81, 81, 81);--modal-title-handle-bg: rgb(100, 108, 255);--fl-bg: rgba(255, 255, 255, .15)}body:has(.components-module_e-IS4) .components-module_e-IS4{display:none}body:has(.components-module_e-IS4) ::selection{background:#7280ea}body:has(.components-module_e-IS4) button,body:has(.components-module_e-IS4) select,body:has(.components-module_e-IS4) a.button{background-color:#ffffff14}body:has(.components-module_e-IS4) button:not(:disabled):hover,body:has(.components-module_e-IS4) select:not(:disabled):hover,body:has(.components-module_e-IS4) a.button:not(:disabled):hover{background-color:#ffffff1a}body:has(.components-module_e-IS4) button:not(:disabled):active,body:has(.components-module_e-IS4) select:not(:disabled):active,body:has(.components-module_e-IS4) a.button:not(:disabled):active{background-color:#ffffff20}body:has(.components-module_e-IS4) option{background-color:#222;color:#fff}body:has(.components-module_e-IS4) .components-module_fsgc0{border-color:#b3c6ff}body:has(.components-module_e-IS4) input[type=checkbox],body:has(.components-module_e-IS4) input[type=radio]{border-color:#b3c6ff}body:has(.components-module_e-IS4) input[type=checkbox]:checked,body:has(.components-module_e-IS4) input[type=radio]:checked{background-color:#b3c6ff;border-color:#b3c6ff}body:has(.components-module_e-IS4) .components-module_GT7Cc{color:var(--link-color)}@media (hover: hover){body:has(.components-module_e-IS4) .cst::-webkit-scrollbar-thumb{background-color:#999}body:has(.components-module_e-IS4) .cst::-webkit-scrollbar-thumb:hover{background-color:#666!important}}body:has(.components-module_e-IS4) .bg-splash{background:#111}body:has(.components-module_e-IS4) .bg-avatarMenu,body:has(.components-module_e-IS4) .bg-dropMenu{background:#3a3a3acc}body:has(.components-module_e-IS4) .bg-avatarMenuButton:hover{background:#fff1}body:has(.components-module_e-IS4) .bg-foregroundTask{background:#111c}body:has(.components-module_e-IS4) .bg-taskManager{background-color:#ffffff1a}body:has(.components-module_e-IS4) .c-taskManager-spin{color:#fff}body:has(.components-module_e-IS4) .c-taskManager-text{color:#fff}body:has(.components-module_e-IS4) .bg-toast-bar{background:#282828}body:has(.components-module_e-IS4) .bg-toast{background:#333}body:has(.components-module_e-IS4) .bg-dialogButton-error{background-color:#9f1239!important}body:has(.components-module_e-IS4) .bg-dialogButton-error:hover{background-color:#be123c!important}body:has(.components-module_e-IS4) .bg-modal{background:#383838}body:has(.components-module_e-IS4) .components-module_MNdKs{--border-hover-c: #b3c6ff;--hover-bg: #ffffff1a;--focus--bg: #ffffff20;--bg: #ffffff14}body:has(.components-module_e-IS4) .components-module_tSHNB .components-module_BUF00{background:#646cff;color:#fff}body:has(.components-module_e-IS4) .components-module_1s6C2 .components-module_4HjO-{background:#2a2a2a}body:has(.components-module_e-IS4) .components-module_1s6C2 .components-module_4HjO-:hover{background:#333}body:has(.components-module_e-IS4) .components-module_9aZnJ{background:#f0f0f0}body:has(.components-module_e-IS4) .components-module_3aGwJ{--color: #3f3f3f}body:has(.components-module_e-IS4) .components-module_On6-m>a:hover:not(.components-module_eZ-4N){background:#2c2c2c}body:has(.components-module_e-IS4) .components-module_On6-m :not(.components-module_eZ-4N) a:hover:not(.components-module_eZ-4N),body:has(.components-module_e-IS4) .components-module_On6-m :not(.components-module_eZ-4N) div:hover:not(.components-module_eZ-4N){background:#2c2c2c}body:has(.components-module_e-IS4) .components-module_On6-m .components-module_eZ-4N{background:#373737}body:has(.components-module_e-IS4) .components-module_ptXr7{--color: #973c00}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const o = "components-module_e-IS4", n = "components-module_fsgc0", t = "components-module_GT7Cc", e = "components-module_MNdKs", c = "components-module_tSHNB", s = "components-module_BUF00", d = "components-module_1s6C2", m = "components-module_4HjO-", l = "components-module_9aZnJ", r = "components-module_3aGwJ", a = "components-module_On6-m", u = "components-module_eZ-4N", p = "components-module_ptXr7", i = {
|
|
2
|
+
root: o,
|
|
3
|
+
selectedBorder: n,
|
|
4
|
+
lc: t,
|
|
5
|
+
textInput: e,
|
|
6
|
+
floatWindow: c,
|
|
7
|
+
titleBar: s,
|
|
8
|
+
section: d,
|
|
9
|
+
trigger: m,
|
|
10
|
+
qrCode: l,
|
|
11
|
+
loadingBackground: r,
|
|
12
|
+
subNaviBar: a,
|
|
13
|
+
active: u,
|
|
14
|
+
warningBackground: p
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
u as active,
|
|
18
|
+
i as default,
|
|
19
|
+
c as floatWindow,
|
|
20
|
+
t as lc,
|
|
21
|
+
r as loadingBackground,
|
|
22
|
+
l as qrCode,
|
|
23
|
+
o as root,
|
|
24
|
+
d as section,
|
|
25
|
+
n as selectedBorder,
|
|
26
|
+
a as subNaviBar,
|
|
27
|
+
e as textInput,
|
|
28
|
+
s as titleBar,
|
|
29
|
+
m as trigger,
|
|
30
|
+
p as warningBackground
|
|
31
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import type { StylesModule, ThemeLayer } from './types';
|
|
3
|
+
export declare function mergeStyles(...styles: StylesModule[]): StylesModule;
|
|
4
|
+
/**
|
|
5
|
+
* 合并多层主题的样式
|
|
6
|
+
* 如果同一个 key 在多层都存在,会合并为 "class1 class2 class3"
|
|
7
|
+
* 后面的层优先级更高(CSS 特异性:多个类 > 单个类)
|
|
8
|
+
*
|
|
9
|
+
* @param layers 主题层数组,可以是普通值或 ref/computed/getter(按优先级从低到高:global -> ui -> app)
|
|
10
|
+
* @returns 合并后的样式对象
|
|
11
|
+
*/
|
|
12
|
+
export declare function composeThemeStyles(...layers: MaybeRefOrGetter<ThemeLayer | undefined>[]): ComputedRef<StylesModule>;
|
|
13
|
+
/**
|
|
14
|
+
* 生成激活主题的根类名(空格分隔)
|
|
15
|
+
*
|
|
16
|
+
* @param layers 主题层数组,可以是普通值或 ref/computed/getter
|
|
17
|
+
* @returns 合并后的根类名字符串
|
|
18
|
+
*/
|
|
19
|
+
export declare function composeThemeRoots(...layers: MaybeRefOrGetter<ThemeLayer | undefined>[]): ComputedRef<string>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { computed as s, toValue as n } from "vue";
|
|
2
|
+
function m(...t) {
|
|
3
|
+
const e = {};
|
|
4
|
+
for (const f of t)
|
|
5
|
+
for (let [r, o] of Object.entries(f))
|
|
6
|
+
typeof o == "string" && (o = [o]), e[r] ? e[r].push(...o) : e[r] = [...o];
|
|
7
|
+
return e;
|
|
8
|
+
}
|
|
9
|
+
function i(...t) {
|
|
10
|
+
return s(() => m(...t.map((e) => n(e)).filter((e) => e && e.styles).map((e) => e.styles)));
|
|
11
|
+
}
|
|
12
|
+
function p(...t) {
|
|
13
|
+
return s(() => t.map((e) => n(e)).filter((e) => e && e.root).map((e) => e.root).join(" "));
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
p as composeThemeRoots,
|
|
17
|
+
i as composeThemeStyles,
|
|
18
|
+
m as mergeStyles
|
|
19
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS Modules 导出的样式对象
|
|
3
|
+
* key: 样式名, value: 哈希后的类名
|
|
4
|
+
*/
|
|
5
|
+
export type StylesModule = Record<string, string | string[]>;
|
|
6
|
+
/**
|
|
7
|
+
* 主题层
|
|
8
|
+
*/
|
|
9
|
+
export interface ThemeLayer {
|
|
10
|
+
/** 用于激活主题的根类(已被 CSS Modules 哈希化) */
|
|
11
|
+
root: string;
|
|
12
|
+
/** CSS Modules 导出的所有样式 */
|
|
13
|
+
styles: StylesModule;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 可扩展主题(包含 UI 和 App 两层)
|
|
17
|
+
*/
|
|
18
|
+
export interface ExtendableTheme {
|
|
19
|
+
ui: ThemeLayer;
|
|
20
|
+
app?: ThemeLayer;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";body:has(.components-module_aU6Th){background:oklch(.99 .005 var(--hue));--text-color: #303133;--link-color: oklch(.68 .17 var(--hue));--modal-backdrop-bg: oklch(.995 .005 var(--hue));--modal-button-bg: oklch(.92 .01 var(--hue));--modal-button-hover-bg: oklch(.9 .02 var(--hue));--modal-button-active-bg: oklch(.9 .035 var(--hue));--modal-title-handle-bg: oklch(.7 .15 var(--hue));--fl-bg: oklch(.5 .16 var(--hue) / 15%)}body:has(.components-module_aU6Th) .components-module_aU6Th{display:none}body:has(.components-module_aU6Th) ::selection{background:oklch(.75 .14 var(--hue))}body:has(.components-module_aU6Th) button,body:has(.components-module_aU6Th) select,body:has(.components-module_aU6Th) a.button{background-color:oklch(.7 .07 var(--hue)/10%)}body:has(.components-module_aU6Th) button:not(:disabled):hover,body:has(.components-module_aU6Th) select:not(:disabled):hover,body:has(.components-module_aU6Th) a.button:not(:disabled):hover{background-color:oklch(.7 .07 var(--hue)/17%)}body:has(.components-module_aU6Th) button:not(:disabled):active,body:has(.components-module_aU6Th) select:not(:disabled):active,body:has(.components-module_aU6Th) a.button:not(:disabled):active{background-color:oklch(.7 .07 var(--hue)/.2)}body:has(.components-module_aU6Th) option{background-color:oklch(.86 .01 var(--hue));color:#303133}body:has(.components-module_aU6Th) .components-module_q2zOw{border-color:oklch(.68 .17 var(--hue))}body:has(.components-module_aU6Th) input[type=checkbox],body:has(.components-module_aU6Th) input[type=radio]{border-color:oklch(.68 .17 var(--hue))}body:has(.components-module_aU6Th) input[type=checkbox]:checked,body:has(.components-module_aU6Th) input[type=radio]:checked{background-color:oklch(.68 .17 var(--hue));border-color:oklch(.68 .17 var(--hue))}body:has(.components-module_aU6Th) .components-module_hwJZP{color:var(--link-color)}@media (hover: hover){body:has(.components-module_aU6Th) .cst::-webkit-scrollbar-thumb{background-color:oklch(.86 .01 var(--hue))}body:has(.components-module_aU6Th) .cst::-webkit-scrollbar-thumb:hover{background-color:oklch(.7 .01 var(--hue))!important}}body:has(.components-module_aU6Th) .bg-splash{background:oklch(.95 .01 var(--hue))}body:has(.components-module_aU6Th) .bg-dropMenu{background:oklch(.9 .02 var(--hue)/50%)}body:has(.components-module_aU6Th) .bg-avatarMenu{background:oklch(.8 .02 var(--hue)/20%)}body:has(.components-module_aU6Th) .bg-avatarMenuButton:hover{background:oklch(.6 .1 var(--hue)/15%)}body:has(.components-module_aU6Th) .bg-foregroundTask{background:oklch(.95 .01 var(--hue)/80%)}body:has(.components-module_aU6Th) .bg-taskManager{background-color:oklch(.6 .2 var(--hue)/10%)}body:has(.components-module_aU6Th) .c-taskManager-spin{color:#000}body:has(.components-module_aU6Th) .c-taskManager-text{color:#000}body:has(.components-module_aU6Th) .bg-toast-bar{background:oklch(.9 .03 var(--hue))}body:has(.components-module_aU6Th) .bg-toast{background:oklch(.95 .02 var(--hue))}body:has(.components-module_aU6Th) .bg-dialogButton-error{background-color:#ffa3ae!important;background-color:oklch(81% .117 11.638deg)!important}body:has(.components-module_aU6Th) .bg-dialogButton-error:hover{background-color:#ff94a0!important;background-color:oklch(78.2% .194 13.428deg)!important}body:has(.components-module_aU6Th) .bg-modal{background:oklch(.96 .008 var(--hue))}body:has(.components-module_aU6Th) .components-module_War-Y{--border-hover-c: oklch(.68 .17 var(--hue));--hover-bg: oklch(.7 .07 var(--hue) / .17);--focus--bg: oklch(.7 .07 var(--hue) / .2);--bg: oklch(.7 .07 var(--hue) / .1)}body:has(.components-module_aU6Th) .components-module_GPoBj .components-module_hpzJ-{background:oklch(.8 .1 var(--hue));color:#fff}body:has(.components-module_aU6Th) .components-module_ufOko .components-module_DKGXD{background:oklch(.96 .01 var(--hue))}body:has(.components-module_aU6Th) .components-module_ufOko .components-module_DKGXD:hover{background:oklch(.95 .02 var(--hue))}body:has(.components-module_aU6Th) .mnui-modal-root .components-module_ufOko .components-module_DKGXD{background:oklch(.935 .03 var(--hue))}body:has(.components-module_aU6Th) .mnui-modal-root .components-module_ufOko .components-module_DKGXD:hover{background:oklch(.92 .04 var(--hue))}body:has(.components-module_aU6Th) .components-module_dAHW9{background:oklch(.99 .005 var(--hue))}body:has(.components-module_aU6Th) .components-module_Fllz5{--color: oklch(.9 .03 var(--hue))}body:has(.components-module_aU6Th) .components-module_04-hf>a:hover:not(.components-module_JBxO-):not(.components-module_gtFY1),body:has(.components-module_aU6Th) .components-module_04-hf div:hover:not(.components-module_JBxO-):not(.components-module_gtFY1){background:oklch(.95 .01 var(--hue))}body:has(.components-module_aU6Th) .components-module_04-hf :not(.components-module_JBxO-):not(.components-module_gtFY1) a:hover:not(.components-module_JBxO-):not(.components-module_gtFY1),body:has(.components-module_aU6Th) .components-module_04-hf :not(.components-module_JBxO-):not(.components-module_gtFY1) div:hover:not(.components-module_JBxO-):not(.components-module_gtFY1){background:oklch(.95 .01 var(--hue))}body:has(.components-module_aU6Th) .components-module_04-hf .components-module_JBxO-{background:oklch(.85 .07 var(--hue))}body:has(.components-module_aU6Th) .components-module_Zdbrb{--color: #ff8d49}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const o = "components-module_aU6Th", n = "components-module_q2zOw", t = "components-module_hwJZP", e = "components-module_War-Y", c = "components-module_GPoBj", s = "components-module_hpzJ-", d = "components-module_ufOko", l = "components-module_DKGXD", m = "components-module_dAHW9", r = "components-module_Fllz5", a = "components-module_04-hf", u = "components-module_JBxO-", i = "components-module_gtFY1", p = "components-module_Zdbrb", _ = {
|
|
2
|
+
root: o,
|
|
3
|
+
selectedBorder: n,
|
|
4
|
+
lc: t,
|
|
5
|
+
textInput: e,
|
|
6
|
+
floatWindow: c,
|
|
7
|
+
titleBar: s,
|
|
8
|
+
section: d,
|
|
9
|
+
trigger: l,
|
|
10
|
+
qrCode: m,
|
|
11
|
+
loadingBackground: r,
|
|
12
|
+
subNaviBar: a,
|
|
13
|
+
active: u,
|
|
14
|
+
disabled: i,
|
|
15
|
+
warningBackground: p
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
u as active,
|
|
19
|
+
_ as default,
|
|
20
|
+
i as disabled,
|
|
21
|
+
c as floatWindow,
|
|
22
|
+
t as lc,
|
|
23
|
+
r as loadingBackground,
|
|
24
|
+
m as qrCode,
|
|
25
|
+
o as root,
|
|
26
|
+
d as section,
|
|
27
|
+
n as selectedBorder,
|
|
28
|
+
a as subNaviBar,
|
|
29
|
+
e as textInput,
|
|
30
|
+
s as titleBar,
|
|
31
|
+
l as trigger,
|
|
32
|
+
p as warningBackground
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
html,body{overflow:hidden;font-family:Quicksand,Noto Sans SC;color:var(--text-color)}:focus-visible{outline:unset}:where(:root){cursor:default;-webkit-user-select:none;user-select:none;interpolate-size:allow-keywords}img{user-drag:none;-webkit-user-drag:none}button,a.button{border-radius:12px;border:1px solid transparent;padding:0 1.2em;font-size:1em;font-weight:500;font-family:inherit;opacity:.9;transition:all .25s;display:flex;justify-content:center;align-items:center;height:2.6em}button:disabled,a.button:disabled{opacity:.7;cursor:not-allowed}button:not(:disabled):hover,a.button:not(:disabled):hover{opacity:1;transform:scale(1.02)}button:not(:disabled):active,a.button:not(:disabled):active{opacity:1;transform:scale(.95)}select{border-radius:12px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;opacity:.9;transition:all .25s}select:disabled{opacity:.7;cursor:not-allowed}select:not(:disabled):hover{opacity:1}select:not(:disabled):active{opacity:1}select option{font-weight:500}code,pre{font-family:JetBrains Mono;font-variant-ligatures:none}input[type=checkbox],input[type=radio]{width:1.2em;height:1.2em;border-radius:999px;border:1px solid;appearance:none;transition:background-color .25s}.w-available{width:-webkit-fill-available}.h-available{height:-webkit-fill-available}.max-w-available{max-width:-webkit-fill-available}.max-h-available{max-height:-webkit-fill-available}.full{position:absolute;inset:0}.fl{position:relative}.fl:before{content:"";position:absolute;inset:-3px -5px;background:var(--fl-bg);border-radius:5px;transform:scale(.8);opacity:0;transition:transform .4s ease,opacity .4s ease;z-index:-1}.fl:hover:before{transform:scale(1);opacity:1}.mnui-modal-root .fl:before{z-index:0}@media (hover: hover){.cst::-webkit-scrollbar{width:6px;height:6px}.cst::-webkit-scrollbar-thumb{border-radius:3px;-webkit-box-shadow:none!important;background-image:none!important;transition:background .2s!important}}.absolute-full{position:absolute;inset:0}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ThemeLayer } from './base/types';
|
|
2
|
+
export * from './base/types';
|
|
3
|
+
export * from './base/composer';
|
|
4
|
+
export declare enum UIThemes {
|
|
5
|
+
Auto = 0,
|
|
6
|
+
DynamicLight = 1,
|
|
7
|
+
AquaDX = 2
|
|
8
|
+
}
|
|
9
|
+
export declare const selectedThemeName: import("@vueuse/core").RemovableRef<number>;
|
|
10
|
+
export declare const selectedThemeHue: import("@vueuse/core").RemovableRef<number>;
|
|
11
|
+
export declare const realThemeName: import("vue").ComputedRef<number>;
|
|
12
|
+
export declare const currentThemeVars: import("vue").ComputedRef<{
|
|
13
|
+
qrcodeColor: string;
|
|
14
|
+
heatmap: string[];
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* 注册业务主题扩展
|
|
18
|
+
* @param uiTheme 对应的 UI 主题,应该是一个 extend uiTheme 的 enum
|
|
19
|
+
* @param appTheme 业务主题层
|
|
20
|
+
*/
|
|
21
|
+
export declare function registerAppTheme(uiTheme: number, appTheme: ThemeLayer): void;
|
|
22
|
+
/**
|
|
23
|
+
* 清除所有注册的业务主题
|
|
24
|
+
*/
|
|
25
|
+
export declare function clearAppThemes(): void;
|
|
26
|
+
export declare const theme: import("vue").ComputedRef<import(".").StylesModule>;
|
|
27
|
+
export declare const themeClasses: import("vue").ComputedRef<string>;
|
|
28
|
+
export declare const isLightTheme: import("vue").ComputedRef<boolean>;
|
|
29
|
+
export { dynamicLightUI, dynamicLightVars } from './dynamicLight';
|
|
30
|
+
export { aquadxUI, aquadxVars } from './aquadx';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { computed as t, ref as f, watch as g } from "vue";
|
|
2
|
+
import { useStorage as s, usePreferredDark as v, useCssVar as d } from "@vueuse/core";
|
|
3
|
+
import u from "./global.module.sass.js";
|
|
4
|
+
import { dynamicLightUI as c, dynamicLightVars as y } from "./dynamicLight/index.js";
|
|
5
|
+
import { aquadxUI as T, aquadxVars as S } from "./aquadx/index.js";
|
|
6
|
+
import { composeThemeStyles as A, composeThemeRoots as D } from "./base/composer.js";
|
|
7
|
+
import { mergeStyles as E } from "./base/composer.js";
|
|
8
|
+
var L = /* @__PURE__ */ ((e) => (e[e.Auto = 0] = "Auto", e[e.DynamicLight = 1] = "DynamicLight", e[e.AquaDX = 2] = "AquaDX", e))(L || {});
|
|
9
|
+
const n = {
|
|
10
|
+
root: u.root,
|
|
11
|
+
styles: u
|
|
12
|
+
}, m = CSS.supports("color", "oklch(0.5 0.1 200)"), o = s(
|
|
13
|
+
"theme",
|
|
14
|
+
0
|
|
15
|
+
/* Auto */
|
|
16
|
+
), k = s("theme-hue", 300), l = v(), i = t(() => m ? o.value === 0 ? l.value ? 2 : 1 : o.value : 2), q = {
|
|
17
|
+
root: "",
|
|
18
|
+
styles: {}
|
|
19
|
+
}, a = t(() => {
|
|
20
|
+
switch (i.value) {
|
|
21
|
+
case 2:
|
|
22
|
+
return T;
|
|
23
|
+
case 1:
|
|
24
|
+
return c;
|
|
25
|
+
default:
|
|
26
|
+
return q;
|
|
27
|
+
}
|
|
28
|
+
}), R = t(() => {
|
|
29
|
+
switch (i.value) {
|
|
30
|
+
case 2:
|
|
31
|
+
return S;
|
|
32
|
+
case 1:
|
|
33
|
+
default:
|
|
34
|
+
return y;
|
|
35
|
+
}
|
|
36
|
+
}), r = f(/* @__PURE__ */ new Map());
|
|
37
|
+
function X(e, h) {
|
|
38
|
+
r.value.set(e, h);
|
|
39
|
+
}
|
|
40
|
+
function M() {
|
|
41
|
+
r.value.clear();
|
|
42
|
+
}
|
|
43
|
+
const p = t(() => {
|
|
44
|
+
if (!m)
|
|
45
|
+
return r.value.get(
|
|
46
|
+
2
|
|
47
|
+
/* AquaDX */
|
|
48
|
+
);
|
|
49
|
+
let e = o.value;
|
|
50
|
+
return e === 0 && (e = l.value ? 2 : 1), r.value.get(e);
|
|
51
|
+
}), O = A(
|
|
52
|
+
n,
|
|
53
|
+
a,
|
|
54
|
+
p
|
|
55
|
+
), P = D(
|
|
56
|
+
n,
|
|
57
|
+
a,
|
|
58
|
+
p
|
|
59
|
+
), w = d("--hue", document.body);
|
|
60
|
+
g(k, (e) => {
|
|
61
|
+
w.value = e.toString();
|
|
62
|
+
}, { immediate: !0 });
|
|
63
|
+
const j = t(() => a.value === c);
|
|
64
|
+
export {
|
|
65
|
+
L as UIThemes,
|
|
66
|
+
T as aquadxUI,
|
|
67
|
+
S as aquadxVars,
|
|
68
|
+
M as clearAppThemes,
|
|
69
|
+
D as composeThemeRoots,
|
|
70
|
+
A as composeThemeStyles,
|
|
71
|
+
R as currentThemeVars,
|
|
72
|
+
c as dynamicLightUI,
|
|
73
|
+
y as dynamicLightVars,
|
|
74
|
+
j as isLightTheme,
|
|
75
|
+
E as mergeStyles,
|
|
76
|
+
i as realThemeName,
|
|
77
|
+
X as registerAppTheme,
|
|
78
|
+
k as selectedThemeHue,
|
|
79
|
+
o as selectedThemeName,
|
|
80
|
+
O as theme,
|
|
81
|
+
P as themeClasses
|
|
82
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const waitOneFrame: () => Promise<unknown>;
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@munet/ui",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./themes": {
|
|
14
|
+
"import": "./dist/themes/index.js",
|
|
15
|
+
"types": "./dist/themes/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./components/*": {
|
|
18
|
+
"import": "./dist/components/*/index.js",
|
|
19
|
+
"types": "./dist/components/*/index.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./controllers/*": {
|
|
22
|
+
"import": "./dist/controllers/*.js",
|
|
23
|
+
"types": "./dist/controllers/*.d.ts"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@chenfengyuan/vue-qrcode": "^2.0.0",
|
|
31
|
+
"@vueuse/core": "^13.0.0",
|
|
32
|
+
"lodash-es": "^4.17.0",
|
|
33
|
+
"sass": "^1.70.0",
|
|
34
|
+
"vue": "^3.5.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/lodash-es": "^4.17.12",
|
|
38
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
39
|
+
"@vitejs/plugin-vue-jsx": "^5.0.1",
|
|
40
|
+
"@vueuse/core": "^13.5.0",
|
|
41
|
+
"lodash-es": "^4.17.21",
|
|
42
|
+
"sass": "^1.89.2",
|
|
43
|
+
"typescript": "^5.8.3",
|
|
44
|
+
"vite": "^7.0.2",
|
|
45
|
+
"vue": "^3.5.17"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"dev": "vite build --watch",
|
|
49
|
+
"build": "vite build && tsc --emitDeclarationOnly"
|
|
50
|
+
}
|
|
51
|
+
}
|