@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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineComponent as a, createVNode as o, Transition as i } from "vue";
|
|
2
|
+
const s = /* @__PURE__ */ a({
|
|
3
|
+
props: {
|
|
4
|
+
mode: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: "default"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
setup(t, {
|
|
10
|
+
slots: e
|
|
11
|
+
}) {
|
|
12
|
+
return () => o(i, {
|
|
13
|
+
duration: 300,
|
|
14
|
+
mode: t.mode,
|
|
15
|
+
enterActiveClass: "transition-opacity transition-300 transition-ease",
|
|
16
|
+
leaveActiveClass: "transition-opacity transition-300 transition-ease",
|
|
17
|
+
enterFromClass: "op-0!",
|
|
18
|
+
leaveToClass: "op-0!"
|
|
19
|
+
}, {
|
|
20
|
+
default: () => [e.default?.()]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
s as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { defineComponent as v, createBlock as B, openBlock as b, Transition as w, withCtx as W, renderSlot as E } from "vue";
|
|
2
|
+
const n = "0px", _ = /* @__PURE__ */ v({
|
|
3
|
+
__name: "TransitionVertical",
|
|
4
|
+
props: {
|
|
5
|
+
duration: { default: 250 },
|
|
6
|
+
easingEnter: { default: "ease-in-out" },
|
|
7
|
+
easingLeave: { default: "ease-in-out" },
|
|
8
|
+
opacityClosed: { default: 0 },
|
|
9
|
+
opacityOpened: { default: 1 }
|
|
10
|
+
},
|
|
11
|
+
setup(l) {
|
|
12
|
+
const e = l;
|
|
13
|
+
function h(t) {
|
|
14
|
+
return {
|
|
15
|
+
height: t.style.height,
|
|
16
|
+
width: t.style.width,
|
|
17
|
+
position: t.style.position,
|
|
18
|
+
visibility: t.style.visibility,
|
|
19
|
+
overflow: t.style.overflow,
|
|
20
|
+
paddingTop: t.style.paddingTop,
|
|
21
|
+
paddingBottom: t.style.paddingBottom,
|
|
22
|
+
borderTopWidth: t.style.borderTopWidth,
|
|
23
|
+
borderBottomWidth: t.style.borderBottomWidth,
|
|
24
|
+
marginTop: t.style.marginTop,
|
|
25
|
+
marginBottom: t.style.marginBottom
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
let s = null, g = null;
|
|
29
|
+
function y(t, o) {
|
|
30
|
+
const { width: i } = getComputedStyle(t);
|
|
31
|
+
t.style.width = i, t.style.position = "absolute", t.style.visibility = "hidden", t.style.height = "";
|
|
32
|
+
const { height: r } = getComputedStyle(t);
|
|
33
|
+
return t.style.width = o.width, t.style.position = o.position, t.style.visibility = o.visibility, t.style.height = n, t.style.overflow = "hidden", o.height && o.height !== n ? o.height : r;
|
|
34
|
+
}
|
|
35
|
+
function u(t, o, i, r, a) {
|
|
36
|
+
g = t, s = t.animate(r, a), t.style.height = o.height, s.onfinish = () => {
|
|
37
|
+
t.style.overflow = o.overflow, i();
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function f(t, o) {
|
|
41
|
+
return [
|
|
42
|
+
{
|
|
43
|
+
height: n,
|
|
44
|
+
opacity: e.opacityClosed,
|
|
45
|
+
paddingTop: n,
|
|
46
|
+
paddingBottom: n,
|
|
47
|
+
borderTopWidth: n,
|
|
48
|
+
borderBottomWidth: n,
|
|
49
|
+
marginTop: n,
|
|
50
|
+
marginBottom: n
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
height: t,
|
|
54
|
+
opacity: e.opacityOpened,
|
|
55
|
+
paddingTop: o.paddingTop,
|
|
56
|
+
paddingBottom: o.paddingBottom,
|
|
57
|
+
borderTopWidth: o.borderTopWidth,
|
|
58
|
+
borderBottomWidth: o.borderBottomWidth,
|
|
59
|
+
marginTop: o.marginTop,
|
|
60
|
+
marginBottom: o.marginBottom
|
|
61
|
+
}
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
function c(t, o, i) {
|
|
65
|
+
return t !== g || !s || s.playState !== "running" ? !1 : (s.onfinish = () => {
|
|
66
|
+
t.style.overflow = o, i();
|
|
67
|
+
}, s.reverse(), !0);
|
|
68
|
+
}
|
|
69
|
+
function m(t, o) {
|
|
70
|
+
const i = t, r = h(i);
|
|
71
|
+
if (c(i, r.overflow, o)) return;
|
|
72
|
+
const a = y(i, r), d = f(a, r), p = { duration: e.duration, easing: e.easingEnter };
|
|
73
|
+
u(i, r, o, d, p);
|
|
74
|
+
}
|
|
75
|
+
function T(t, o) {
|
|
76
|
+
const i = t, r = h(i);
|
|
77
|
+
if (c(i, r.overflow, o)) return;
|
|
78
|
+
const { height: a } = getComputedStyle(i);
|
|
79
|
+
i.style.height = a, i.style.overflow = "hidden";
|
|
80
|
+
const d = f(a, r).reverse(), p = { duration: e.duration, easing: e.easingLeave };
|
|
81
|
+
u(i, r, o, d, p);
|
|
82
|
+
}
|
|
83
|
+
return (t, o) => (b(), B(w, {
|
|
84
|
+
css: !1,
|
|
85
|
+
onEnter: m,
|
|
86
|
+
onLeave: T
|
|
87
|
+
}, {
|
|
88
|
+
default: W(() => [
|
|
89
|
+
E(t.$slots, "default")
|
|
90
|
+
]),
|
|
91
|
+
_: 3
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
export {
|
|
96
|
+
_ as default
|
|
97
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
animate: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
animate: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
}>> & Readonly<{}>, {
|
|
12
|
+
animate: boolean;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineComponent as n, createVNode as r } from "vue";
|
|
2
|
+
import { theme as o } from "../../themes/index.js";
|
|
3
|
+
import e from "./index.module.sass.js";
|
|
4
|
+
const d = /* @__PURE__ */ n({
|
|
5
|
+
props: {
|
|
6
|
+
animate: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: !0
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
setup(t, {
|
|
12
|
+
emit: i,
|
|
13
|
+
slots: a
|
|
14
|
+
}) {
|
|
15
|
+
return () => r("div", {
|
|
16
|
+
class: [e.warning, o.value.warningBackground, t.animate && e.animate]
|
|
17
|
+
}, [a.default?.()]);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
d as default
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.index-module_dU5DS{width:100%;background-image:repeating-linear-gradient(-45deg,var(--color) 25%,transparent 0,transparent 50%,var(--color) 0,var(--color) 75%,transparent 0);background-size:30px 30px;-webkit-mask-image:linear-gradient(to bottom,#000,#0000);mask-image:linear-gradient(to bottom,#000,#0000);pointer-events:none}.index-module_dU5DS.index-module_Lvzk1{animation:index-module_2fSCZ 2s linear infinite}@keyframes index-module_2fSCZ{0%{background-position:0 0}to{background-position:-30px 0}}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
title: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
closable: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
minimizable: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
resizable: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
defaultWidth: {
|
|
20
|
+
type: NumberConstructor;
|
|
21
|
+
default: number;
|
|
22
|
+
};
|
|
23
|
+
defaultHeight: {
|
|
24
|
+
type: NumberConstructor;
|
|
25
|
+
default: number;
|
|
26
|
+
};
|
|
27
|
+
defaultX: {
|
|
28
|
+
type: NumberConstructor;
|
|
29
|
+
default: number;
|
|
30
|
+
};
|
|
31
|
+
defaultY: {
|
|
32
|
+
type: NumberConstructor;
|
|
33
|
+
default: number;
|
|
34
|
+
};
|
|
35
|
+
icon: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
onClose: PropType<() => void>;
|
|
40
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
+
title: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
closable: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
minimizable: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
resizable: {
|
|
54
|
+
type: BooleanConstructor;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
57
|
+
defaultWidth: {
|
|
58
|
+
type: NumberConstructor;
|
|
59
|
+
default: number;
|
|
60
|
+
};
|
|
61
|
+
defaultHeight: {
|
|
62
|
+
type: NumberConstructor;
|
|
63
|
+
default: number;
|
|
64
|
+
};
|
|
65
|
+
defaultX: {
|
|
66
|
+
type: NumberConstructor;
|
|
67
|
+
default: number;
|
|
68
|
+
};
|
|
69
|
+
defaultY: {
|
|
70
|
+
type: NumberConstructor;
|
|
71
|
+
default: number;
|
|
72
|
+
};
|
|
73
|
+
icon: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: string;
|
|
76
|
+
};
|
|
77
|
+
onClose: PropType<() => void>;
|
|
78
|
+
}>> & Readonly<{}>, {
|
|
79
|
+
title: string;
|
|
80
|
+
closable: boolean;
|
|
81
|
+
minimizable: boolean;
|
|
82
|
+
resizable: boolean;
|
|
83
|
+
defaultWidth: number;
|
|
84
|
+
defaultHeight: number;
|
|
85
|
+
defaultX: number;
|
|
86
|
+
defaultY: number;
|
|
87
|
+
icon: string;
|
|
88
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
89
|
+
export default _default;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { defineComponent as J, ref as l, onMounted as K, onUnmounted as Q, createVNode as n, Fragment as U } from "vue";
|
|
2
|
+
import t from "./styles.module.sass.js";
|
|
3
|
+
import { waitOneFrame as Z } from "../../utils/animation.js";
|
|
4
|
+
import { theme as O } from "../../themes/index.js";
|
|
5
|
+
const ae = /* @__PURE__ */ J({
|
|
6
|
+
props: {
|
|
7
|
+
title: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "窗口"
|
|
10
|
+
},
|
|
11
|
+
closable: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !0
|
|
14
|
+
},
|
|
15
|
+
minimizable: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !0
|
|
18
|
+
},
|
|
19
|
+
resizable: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !0
|
|
22
|
+
},
|
|
23
|
+
defaultWidth: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 40
|
|
26
|
+
},
|
|
27
|
+
// 百分比
|
|
28
|
+
defaultHeight: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 50
|
|
31
|
+
},
|
|
32
|
+
// 百分比
|
|
33
|
+
defaultX: {
|
|
34
|
+
type: Number,
|
|
35
|
+
default: 10
|
|
36
|
+
},
|
|
37
|
+
// 百分比
|
|
38
|
+
defaultY: {
|
|
39
|
+
type: Number,
|
|
40
|
+
default: 10
|
|
41
|
+
},
|
|
42
|
+
// 百分比
|
|
43
|
+
icon: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "i-carbon:unknown"
|
|
46
|
+
},
|
|
47
|
+
onClose: Function
|
|
48
|
+
},
|
|
49
|
+
setup(a, {
|
|
50
|
+
emit: _,
|
|
51
|
+
slots: T
|
|
52
|
+
}) {
|
|
53
|
+
const i = l(!1), j = l(), s = l(a.defaultX), o = l(a.defaultY), v = l(a.defaultWidth), m = l(a.defaultHeight), b = l(!1), S = l(0), B = l(0), W = l(0), D = l(0), x = l(!1), z = l(!1), C = l(""), N = l(0), k = l(0), X = l(0), p = l(0), E = l(0), V = l(0), y = (e, d, g, f) => {
|
|
54
|
+
const c = -(g - 5);
|
|
55
|
+
return {
|
|
56
|
+
x: Math.max(c, Math.min(95, e)),
|
|
57
|
+
y: Math.max(0, Math.min(95, d))
|
|
58
|
+
};
|
|
59
|
+
}, q = (e) => {
|
|
60
|
+
z.value || (b.value = !0, S.value = e.clientX, B.value = e.clientY, W.value = s.value, D.value = o.value, e.preventDefault());
|
|
61
|
+
}, u = (e, d) => {
|
|
62
|
+
a.resizable && (z.value = !0, C.value = d, N.value = e.clientX, k.value = e.clientY, X.value = v.value, p.value = m.value, E.value = s.value, V.value = o.value, e.preventDefault(), e.stopPropagation());
|
|
63
|
+
}, F = (e) => {
|
|
64
|
+
if (b.value) {
|
|
65
|
+
const d = e.clientX - S.value, g = e.clientY - B.value, f = d / window.innerWidth * 100, w = g / window.innerHeight * 100, c = W.value + f, h = D.value + w, r = y(c, h, v.value, m.value);
|
|
66
|
+
s.value = r.x, o.value = r.y, x.value = !0;
|
|
67
|
+
} else if (z.value) {
|
|
68
|
+
const d = e.clientX - N.value, g = e.clientY - k.value, f = d / window.innerWidth * 100, w = g / window.innerHeight * 100, c = C.value, h = 200 / window.innerWidth * 100, r = 150 / window.innerHeight * 100;
|
|
69
|
+
let H = s.value, I = o.value, Y = v.value, P = m.value;
|
|
70
|
+
if (c.includes("e") && (Y = Math.max(h, X.value + f)), c.includes("s") && (P = Math.max(r, p.value + w)), c.includes("w")) {
|
|
71
|
+
const M = Math.max(h, X.value - f);
|
|
72
|
+
M > h && (H = E.value + f, Y = M);
|
|
73
|
+
}
|
|
74
|
+
if (c.includes("n")) {
|
|
75
|
+
const M = Math.max(r, p.value - w);
|
|
76
|
+
M > r && (I = V.value + w, P = M);
|
|
77
|
+
}
|
|
78
|
+
const R = y(H, I, Y);
|
|
79
|
+
s.value = R.x, o.value = R.y, v.value = Y, m.value = P;
|
|
80
|
+
}
|
|
81
|
+
}, L = async () => {
|
|
82
|
+
b.value = !1, z.value = !1, await Z(), x.value = !1;
|
|
83
|
+
}, $ = () => {
|
|
84
|
+
x.value || (i.value = !i.value);
|
|
85
|
+
}, A = () => {
|
|
86
|
+
a.onClose?.();
|
|
87
|
+
}, G = () => {
|
|
88
|
+
};
|
|
89
|
+
return K(() => {
|
|
90
|
+
const e = y(s.value, o.value, v.value, m.value);
|
|
91
|
+
s.value = e.x, o.value = e.y, document.addEventListener("mousemove", F), document.addEventListener("mouseup", L);
|
|
92
|
+
}), Q(() => {
|
|
93
|
+
document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", L);
|
|
94
|
+
}), () => n("div", {
|
|
95
|
+
ref: j,
|
|
96
|
+
class: [t.window, O.value.floatWindow, i.value && t.minimized, b.value && t.dragging, z.value && t.resizing],
|
|
97
|
+
style: {
|
|
98
|
+
left: `${s.value}%`,
|
|
99
|
+
top: `${o.value}%`,
|
|
100
|
+
width: i.value ? "60px" : `${v.value}%`,
|
|
101
|
+
height: i.value ? "60px" : `${m.value}%`
|
|
102
|
+
}
|
|
103
|
+
}, [n("div", {
|
|
104
|
+
class: [t.titleBar, O.value.titleBar],
|
|
105
|
+
onMousedown: q,
|
|
106
|
+
onDblclick: G
|
|
107
|
+
}, [!i.value && n(U, null, [n("div", {
|
|
108
|
+
class: t.title
|
|
109
|
+
}, [a.title]), n("div", {
|
|
110
|
+
class: t.controls
|
|
111
|
+
}, [a.minimizable && n("button", {
|
|
112
|
+
class: [t.controlBtn, t.minimizeBtn],
|
|
113
|
+
onClick: (e) => {
|
|
114
|
+
e.stopPropagation(), $();
|
|
115
|
+
},
|
|
116
|
+
onMousedown: (e) => {
|
|
117
|
+
e.stopPropagation();
|
|
118
|
+
},
|
|
119
|
+
title: "最小化"
|
|
120
|
+
}, [n("div", {
|
|
121
|
+
class: t.minimizeIcon
|
|
122
|
+
}, null)]), a.closable && n("button", {
|
|
123
|
+
class: [t.controlBtn, t.closeBtn],
|
|
124
|
+
onClick: (e) => {
|
|
125
|
+
e.stopPropagation(), A();
|
|
126
|
+
},
|
|
127
|
+
onMousedown: (e) => {
|
|
128
|
+
e.stopPropagation();
|
|
129
|
+
},
|
|
130
|
+
title: "关闭"
|
|
131
|
+
}, [n("div", {
|
|
132
|
+
class: t.closeIcon
|
|
133
|
+
}, null)])])]), i.value && n("div", {
|
|
134
|
+
class: t.minimizedIcon,
|
|
135
|
+
onClick: $
|
|
136
|
+
}, [n("span", {
|
|
137
|
+
class: a.icon
|
|
138
|
+
}, null)])]), !i.value && n("div", {
|
|
139
|
+
class: t.content
|
|
140
|
+
}, [T.default?.()]), !i.value && a.resizable && n(U, null, [n("div", {
|
|
141
|
+
class: [t.resizeHandle, t.resizeN],
|
|
142
|
+
onMousedown: (e) => u(e, "n")
|
|
143
|
+
}, null), n("div", {
|
|
144
|
+
class: [t.resizeHandle, t.resizeS],
|
|
145
|
+
onMousedown: (e) => u(e, "s")
|
|
146
|
+
}, null), n("div", {
|
|
147
|
+
class: [t.resizeHandle, t.resizeW],
|
|
148
|
+
onMousedown: (e) => u(e, "w")
|
|
149
|
+
}, null), n("div", {
|
|
150
|
+
class: [t.resizeHandle, t.resizeE],
|
|
151
|
+
onMousedown: (e) => u(e, "e")
|
|
152
|
+
}, null), n("div", {
|
|
153
|
+
class: [t.resizeHandle, t.resizeNw],
|
|
154
|
+
onMousedown: (e) => u(e, "nw")
|
|
155
|
+
}, null), n("div", {
|
|
156
|
+
class: [t.resizeHandle, t.resizeNe],
|
|
157
|
+
onMousedown: (e) => u(e, "ne")
|
|
158
|
+
}, null), n("div", {
|
|
159
|
+
class: [t.resizeHandle, t.resizeSw],
|
|
160
|
+
onMousedown: (e) => u(e, "sw")
|
|
161
|
+
}, null), n("div", {
|
|
162
|
+
class: [t.resizeHandle, t.resizeSe],
|
|
163
|
+
onMousedown: (e) => u(e, "se")
|
|
164
|
+
}, null)])]);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
export {
|
|
168
|
+
ae as default
|
|
169
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.styles-module_vH5bX{position:fixed;display:flex;flex-direction:column;background:#fffffff2;border-radius:12px;box-shadow:0 8px 32px #00000026;overflow:hidden;z-index:1000;transition:opacity .3s cubic-bezier(.4,0,.2,1);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.styles-module_vH5bX.styles-module_D6FCS{border-radius:50%;box-shadow:0 4px 16px #0003;overflow:visible}.styles-module_vH5bX.styles-module_JEzZ-{cursor:move;-webkit-user-select:none;user-select:none;opacity:.5}.styles-module_vH5bX.styles-module_Jb4A-{-webkit-user-select:none;user-select:none}.styles-module_oRWf9{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;cursor:move;-webkit-user-select:none;user-select:none;min-height:48px}.styles-module_D6FCS .styles-module_oRWf9{width:100%;height:100%;padding:0;justify-content:center;align-items:center;border-radius:50%}.styles-module_gZYca{font-size:16px;font-weight:600;flex:1;pointer-events:none}.styles-module_w4ZYt{display:flex;gap:8px;align-items:center}.styles-module_mMxfr{width:28px;height:28px;border:none;border-radius:6px;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center;padding:0}.styles-module_mMxfr:hover{transform:scale(1.1)}.styles-module_mMxfr:active{transform:scale(.95)}.styles-module_08gUH .styles-module_8H7H2{width:12px;height:2px;background:#fff;border-radius:1px;pointer-events:none}.styles-module_NIi37 .styles-module_v-HVi{width:14px;height:14px;position:relative;pointer-events:none}.styles-module_NIi37 .styles-module_v-HVi:before,.styles-module_NIi37 .styles-module_v-HVi:after{content:"";position:absolute;width:100%;height:2px;background:#fff;top:50%;left:50%;border-radius:1px}.styles-module_NIi37 .styles-module_v-HVi:before{transform:translate(-50%,-50%) rotate(45deg)}.styles-module_NIi37 .styles-module_v-HVi:after{transform:translate(-50%,-50%) rotate(-45deg)}.styles-module_DSTGP{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:1.8rem;font-weight:700;color:#fff;cursor:pointer;-webkit-user-select:none;user-select:none}.styles-module_kEF0N{flex:1;overflow:auto;background:#fffffffa}.styles-module_YPKot{position:absolute;z-index:10}.styles-module_YPKot.styles-module_8uxBX,.styles-module_YPKot.styles-module_lKTc4{left:0;right:0;height:4px;cursor:ns-resize}.styles-module_YPKot.styles-module_8uxBX{top:0}.styles-module_YPKot.styles-module_lKTc4{bottom:0}.styles-module_YPKot.styles-module_0PTNd,.styles-module_YPKot.styles-module_AWO1H{top:0;bottom:0;width:4px;cursor:ew-resize}.styles-module_YPKot.styles-module_0PTNd{left:0}.styles-module_YPKot.styles-module_AWO1H{right:0}.styles-module_YPKot.styles-module_BxMvI,.styles-module_YPKot.styles-module_hXRF0,.styles-module_YPKot.styles-module_uxu7A,.styles-module_YPKot.styles-module_L9k27{width:16px;height:16px}.styles-module_YPKot.styles-module_BxMvI{top:0;left:0;cursor:nwse-resize}.styles-module_YPKot.styles-module_hXRF0{top:0;right:0;cursor:nesw-resize}.styles-module_YPKot.styles-module_uxu7A{bottom:0;left:0;cursor:nesw-resize}.styles-module_YPKot.styles-module_L9k27{bottom:0;right:0;cursor:nwse-resize}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const e = "styles-module_vH5bX", s = "styles-module_D6FCS", t = "styles-module_JEzZ-", o = "styles-module_Jb4A-", l = "styles-module_oRWf9", n = "styles-module_gZYca", i = "styles-module_w4ZYt", c = "styles-module_mMxfr", m = "styles-module_08gUH", d = "styles-module_8H7H2", r = "styles-module_NIi37", z = "styles-module_v-HVi", u = "styles-module_DSTGP", y = "styles-module_kEF0N", _ = "styles-module_YPKot", g = "styles-module_8uxBX", B = "styles-module_lKTc4", a = "styles-module_0PTNd", w = "styles-module_AWO1H", N = "styles-module_BxMvI", H = "styles-module_hXRF0", I = "styles-module_uxu7A", S = "styles-module_L9k27", x = {
|
|
2
|
+
window: e,
|
|
3
|
+
minimized: s,
|
|
4
|
+
dragging: t,
|
|
5
|
+
resizing: o,
|
|
6
|
+
titleBar: l,
|
|
7
|
+
title: n,
|
|
8
|
+
controls: i,
|
|
9
|
+
controlBtn: c,
|
|
10
|
+
minimizeBtn: m,
|
|
11
|
+
minimizeIcon: d,
|
|
12
|
+
closeBtn: r,
|
|
13
|
+
closeIcon: z,
|
|
14
|
+
minimizedIcon: u,
|
|
15
|
+
content: y,
|
|
16
|
+
resizeHandle: _,
|
|
17
|
+
resizeN: g,
|
|
18
|
+
resizeS: B,
|
|
19
|
+
resizeW: a,
|
|
20
|
+
resizeE: w,
|
|
21
|
+
resizeNw: N,
|
|
22
|
+
resizeNe: H,
|
|
23
|
+
resizeSw: I,
|
|
24
|
+
resizeSe: S
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
r as closeBtn,
|
|
28
|
+
z as closeIcon,
|
|
29
|
+
y as content,
|
|
30
|
+
c as controlBtn,
|
|
31
|
+
i as controls,
|
|
32
|
+
x as default,
|
|
33
|
+
t as dragging,
|
|
34
|
+
m as minimizeBtn,
|
|
35
|
+
d as minimizeIcon,
|
|
36
|
+
s as minimized,
|
|
37
|
+
u as minimizedIcon,
|
|
38
|
+
w as resizeE,
|
|
39
|
+
_ as resizeHandle,
|
|
40
|
+
g as resizeN,
|
|
41
|
+
H as resizeNe,
|
|
42
|
+
N as resizeNw,
|
|
43
|
+
B as resizeS,
|
|
44
|
+
S as resizeSe,
|
|
45
|
+
I as resizeSw,
|
|
46
|
+
a as resizeW,
|
|
47
|
+
o as resizing,
|
|
48
|
+
n as title,
|
|
49
|
+
l as titleBar,
|
|
50
|
+
e as window
|
|
51
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type Toast = {
|
|
2
|
+
message: string;
|
|
3
|
+
type: 'info' | 'success' | 'warning' | 'error';
|
|
4
|
+
};
|
|
5
|
+
export type ToastInternal = Toast & {
|
|
6
|
+
rand: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const toasts: import("vue").Ref<{
|
|
9
|
+
message: string;
|
|
10
|
+
type: "info" | "success" | "warning" | "error";
|
|
11
|
+
rand: number;
|
|
12
|
+
}[], ToastInternal[] | {
|
|
13
|
+
message: string;
|
|
14
|
+
type: "info" | "success" | "warning" | "error";
|
|
15
|
+
rand: number;
|
|
16
|
+
}[]>;
|
|
17
|
+
export declare function addToast(toast: Toast): number;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface UIStrings {
|
|
2
|
+
confirm: string;
|
|
3
|
+
cancel: string;
|
|
4
|
+
taskFailed: string;
|
|
5
|
+
unknownError: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 配置 UI 字符串(用于 i18n)
|
|
9
|
+
* @param strings 要覆盖的字符串
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { configureUIStrings } from '@munet/ui';
|
|
13
|
+
* import { t } from './locales';
|
|
14
|
+
*
|
|
15
|
+
* configureUIStrings({
|
|
16
|
+
* confirm: t('common.confirm'),
|
|
17
|
+
* cancel: t('common.cancel'),
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function configureUIStrings(strings: Partial<UIStrings>): void;
|
|
22
|
+
/**
|
|
23
|
+
* 获取 UI 字符串
|
|
24
|
+
* @param key 字符串键名
|
|
25
|
+
*/
|
|
26
|
+
export declare function getUIString(key: keyof UIStrings): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
confirm: "确认",
|
|
3
|
+
cancel: "取消",
|
|
4
|
+
taskFailed: "任务执行失败",
|
|
5
|
+
unknownError: "发生未知错误"
|
|
6
|
+
};
|
|
7
|
+
let r = { ...t };
|
|
8
|
+
function e(n) {
|
|
9
|
+
r = { ...r, ...n };
|
|
10
|
+
}
|
|
11
|
+
function i(n) {
|
|
12
|
+
return r[n];
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
e as configureUIStrings,
|
|
16
|
+
i as getUIString
|
|
17
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export * from './themes';
|
|
2
|
+
export * from './i18n';
|
|
3
|
+
export * from './controllers/toastController';
|
|
4
|
+
export * from './states/modal';
|
|
5
|
+
export { default as Button } from './components/Button';
|
|
6
|
+
export { default as TextInput } from './components/TextInput';
|
|
7
|
+
export { default as CheckBox } from './components/CheckBox';
|
|
8
|
+
export { default as FlagCheckBox } from './components/CheckBox/FlagCheckBox';
|
|
9
|
+
export { default as Radio } from './components/Radio';
|
|
10
|
+
export { default as Modal, modalShowing } from './components/Modal';
|
|
11
|
+
export { default as ModalStyles } from './components/Modal/styles.module.sass';
|
|
12
|
+
export { default as Window } from './components/Window';
|
|
13
|
+
export { default as Section } from './components/Section';
|
|
14
|
+
export { default as DateFormat } from './components/DateFormat';
|
|
15
|
+
export { default as Qrcode } from './components/Qrcode';
|
|
16
|
+
export { default as NumberInput } from './components/NumberInput';
|
|
17
|
+
export { default as Select } from './components/Select';
|
|
18
|
+
export type { SelectOption, SelectExposed, SelectInstance } from './components/Select';
|
|
19
|
+
export { default as TransitionVertical } from './components/TransitionVertical.vue';
|
|
20
|
+
export { default as Range } from './components/Range.vue';
|
|
21
|
+
export { default as TransitionOpacity } from './components/TransitionOpacity';
|
|
22
|
+
export { default as DropMenu } from './components/DropMenu';
|
|
23
|
+
export { default as DropDown } from './components/DropMenu/DropDown';
|
|
24
|
+
export { default as GlobalElementsContainer } from './components/GlobalElementsContainer';
|
|
25
|
+
export { default as ScrollText } from './components/ScrollText';
|
|
26
|
+
export { default as WhateverNaviBar } from './components/SubNaviBar/WhateverNaviBar';
|
|
27
|
+
export { default as WarningBackground } from './components/WarningBackground';
|
|
28
|
+
export type { NaviItem } from './components/SubNaviBar/WhateverNaviBar';
|
|
29
|
+
export { foregroundTask } from './components/GlobalElementsContainer/ForegroundTask';
|
|
30
|
+
export { showTransactionalDialog } from './components/GlobalElementsContainer/TransactionalDialog';
|
|
31
|
+
export { taskManager } from './components/GlobalElementsContainer/TaskManager';
|
|
32
|
+
export { mergeStyles } from './themes/base/composer';
|