@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,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineComponent as e, createVNode as t } from "vue";
|
|
2
|
+
import r from "./index.module.sass.js";
|
|
3
|
+
const s = /* @__PURE__ */ e({
|
|
4
|
+
setup(a, {
|
|
5
|
+
slots: o
|
|
6
|
+
}) {
|
|
7
|
+
return () => t("div", {
|
|
8
|
+
class: r.loading
|
|
9
|
+
}, [o.default?.()]);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
s as default
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.index-module_o5f0y{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 top,#000,#0009,#0003,#0000);mask-image:linear-gradient(to top,#000,#0009,#0003,#0000);animation:index-module_SB-Ki .8s linear infinite}@keyframes index-module_SB-Ki{0%{background-position:0 0}to{background-position:-30px 0}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
onClick: PropType<() => any>;
|
|
4
|
+
onContextmenu: PropType<() => any>;
|
|
5
|
+
disabled: BooleanConstructor;
|
|
6
|
+
ing: BooleanConstructor;
|
|
7
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
onClick: PropType<() => any>;
|
|
9
|
+
onContextmenu: PropType<() => any>;
|
|
10
|
+
disabled: BooleanConstructor;
|
|
11
|
+
ing: BooleanConstructor;
|
|
12
|
+
}>> & Readonly<{}>, {
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
ing: boolean;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent as o, createVNode as n } from "vue";
|
|
2
|
+
import { theme as i } from "../../themes/index.js";
|
|
3
|
+
import l from "./LoadingBackground/index.js";
|
|
4
|
+
const m = /* @__PURE__ */ o({
|
|
5
|
+
props: {
|
|
6
|
+
onClick: Function,
|
|
7
|
+
onContextmenu: Function,
|
|
8
|
+
disabled: Boolean,
|
|
9
|
+
ing: Boolean
|
|
10
|
+
},
|
|
11
|
+
setup(e, {
|
|
12
|
+
emit: a,
|
|
13
|
+
slots: t
|
|
14
|
+
}) {
|
|
15
|
+
return () => n("button", {
|
|
16
|
+
class: "relative of-hidden",
|
|
17
|
+
disabled: e.disabled || e.ing,
|
|
18
|
+
onClick: e.onClick,
|
|
19
|
+
onContextmenu: e.onContextmenu
|
|
20
|
+
}, [n("div", {
|
|
21
|
+
class: "z-2 inline-flex items-center justify-center"
|
|
22
|
+
}, [t.default?.()]), e.ing && n(l, {
|
|
23
|
+
class: ["absolute bottom-0 left-0 right-0 top-25% z-1", i.value.loadingBackground]
|
|
24
|
+
}, null)]);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
m as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
value: {
|
|
4
|
+
type: NumberConstructor;
|
|
5
|
+
default: number;
|
|
6
|
+
};
|
|
7
|
+
flag: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
onChange: PropType<() => void>;
|
|
12
|
+
gap: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
value: {
|
|
18
|
+
type: NumberConstructor;
|
|
19
|
+
default: number;
|
|
20
|
+
};
|
|
21
|
+
flag: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
onChange: PropType<() => void>;
|
|
26
|
+
gap: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
}>> & Readonly<{}>, {
|
|
31
|
+
value: number;
|
|
32
|
+
gap: string;
|
|
33
|
+
flag: number;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
35
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent as n, computed as f, createVNode as g } from "vue";
|
|
2
|
+
import d from "./index.js";
|
|
3
|
+
const m = /* @__PURE__ */ n({
|
|
4
|
+
props: {
|
|
5
|
+
value: {
|
|
6
|
+
type: Number,
|
|
7
|
+
default: 0
|
|
8
|
+
},
|
|
9
|
+
flag: {
|
|
10
|
+
type: Number,
|
|
11
|
+
default: 0
|
|
12
|
+
},
|
|
13
|
+
onChange: Function,
|
|
14
|
+
gap: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "0.5rem"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(e, {
|
|
20
|
+
emit: t,
|
|
21
|
+
slots: l
|
|
22
|
+
}) {
|
|
23
|
+
const u = f({
|
|
24
|
+
get: () => !!(e.value & e.flag),
|
|
25
|
+
set: (a) => {
|
|
26
|
+
a ? t("update:value", e.value | e.flag) : t("update:value", e.value & ~e.flag), e.onChange?.();
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return () => g(d, {
|
|
30
|
+
value: u.value,
|
|
31
|
+
"onUpdate:value": (a) => u.value = a,
|
|
32
|
+
onChange: e.onChange,
|
|
33
|
+
gap: e.gap
|
|
34
|
+
}, {
|
|
35
|
+
default: () => [l.default?.()]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
m as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
value: BooleanConstructor;
|
|
4
|
+
egg: BooleanConstructor;
|
|
5
|
+
debounce: BooleanConstructor;
|
|
6
|
+
gap: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
onChange: PropType<() => void>;
|
|
11
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
value: BooleanConstructor;
|
|
13
|
+
egg: BooleanConstructor;
|
|
14
|
+
debounce: BooleanConstructor;
|
|
15
|
+
gap: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
onChange: PropType<() => void>;
|
|
20
|
+
}>> & Readonly<{}>, {
|
|
21
|
+
value: boolean;
|
|
22
|
+
egg: boolean;
|
|
23
|
+
debounce: boolean;
|
|
24
|
+
gap: string;
|
|
25
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineComponent as r, useId as f, ref as m, createVNode as o, withDirectives as h, vModelCheckbox as v } from "vue";
|
|
2
|
+
import { addToast as C } from "../../controllers/toastController.js";
|
|
3
|
+
import { useVModel as b } from "@vueuse/core";
|
|
4
|
+
import * as l from "lodash-es";
|
|
5
|
+
const y = /* @__PURE__ */ r({
|
|
6
|
+
props: {
|
|
7
|
+
value: Boolean,
|
|
8
|
+
egg: Boolean,
|
|
9
|
+
debounce: Boolean,
|
|
10
|
+
gap: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "0.5rem"
|
|
13
|
+
},
|
|
14
|
+
onChange: Function
|
|
15
|
+
},
|
|
16
|
+
setup(e, {
|
|
17
|
+
emit: u,
|
|
18
|
+
slots: c
|
|
19
|
+
}) {
|
|
20
|
+
const a = f(), t = b(e, "value", u), n = m(0), i = l.debounce(() => n.value = 0, 500), d = l.debounce(() => e.onChange?.(), 500), s = () => {
|
|
21
|
+
e.egg && (n.value++, n.value === 16 && C({
|
|
22
|
+
message: "不要再打了……要坏了………",
|
|
23
|
+
type: "warning"
|
|
24
|
+
}), i()), e.debounce ? d() : e.onChange?.();
|
|
25
|
+
};
|
|
26
|
+
return () => o("div", {
|
|
27
|
+
class: "flex items-center",
|
|
28
|
+
style: {
|
|
29
|
+
gap: e.gap
|
|
30
|
+
}
|
|
31
|
+
}, [h(o("input", {
|
|
32
|
+
class: "shrink-0",
|
|
33
|
+
id: a,
|
|
34
|
+
type: "checkbox",
|
|
35
|
+
"onUpdate:modelValue": (g) => t.value = g,
|
|
36
|
+
title: e.egg ? "是不是想对着这里打纵连?" : "",
|
|
37
|
+
onChange: s
|
|
38
|
+
}, null), [[v, t.value]]), o("label", {
|
|
39
|
+
for: a
|
|
40
|
+
}, [c.default?.()])]);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
y as default
|
|
45
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
value: {
|
|
3
|
+
type: (DateConstructor | StringConstructor | NumberConstructor)[];
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
format: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
}>, () => string, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
value: {
|
|
12
|
+
type: (DateConstructor | StringConstructor | NumberConstructor)[];
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
format: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
}>> & Readonly<{}>, {
|
|
20
|
+
format: string;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useDateFormat as r } from "@vueuse/core";
|
|
2
|
+
import { defineComponent as a } from "vue";
|
|
3
|
+
const n = /* @__PURE__ */ a({
|
|
4
|
+
props: {
|
|
5
|
+
value: {
|
|
6
|
+
type: [String, Number, Date],
|
|
7
|
+
required: !0
|
|
8
|
+
},
|
|
9
|
+
format: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "YYYY/MM/DD HH:mm:ss"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup(t, {
|
|
15
|
+
emit: m
|
|
16
|
+
}) {
|
|
17
|
+
const e = r(t.value, t.format);
|
|
18
|
+
return () => e.value;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
n as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PropType, CSSProperties } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
innerClass: (StringConstructor | ArrayConstructor)[];
|
|
4
|
+
innerStyle: PropType<CSSProperties>;
|
|
5
|
+
buttonText: {
|
|
6
|
+
type: PropType<string>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
buttonIng: BooleanConstructor;
|
|
10
|
+
gap: {
|
|
11
|
+
type: NumberConstructor;
|
|
12
|
+
default: number;
|
|
13
|
+
};
|
|
14
|
+
autoPosition: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
maxHeight: {
|
|
19
|
+
type: NumberConstructor;
|
|
20
|
+
default: number;
|
|
21
|
+
};
|
|
22
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
innerClass: (StringConstructor | ArrayConstructor)[];
|
|
24
|
+
innerStyle: PropType<CSSProperties>;
|
|
25
|
+
buttonText: {
|
|
26
|
+
type: PropType<string>;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
buttonIng: BooleanConstructor;
|
|
30
|
+
gap: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
default: number;
|
|
33
|
+
};
|
|
34
|
+
autoPosition: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
maxHeight: {
|
|
39
|
+
type: NumberConstructor;
|
|
40
|
+
default: number;
|
|
41
|
+
};
|
|
42
|
+
}>> & Readonly<{}>, {
|
|
43
|
+
gap: number;
|
|
44
|
+
buttonIng: boolean;
|
|
45
|
+
buttonText: string;
|
|
46
|
+
autoPosition: boolean;
|
|
47
|
+
maxHeight: number;
|
|
48
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
49
|
+
export default _default;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineComponent as p, ref as s, computed as b, createVNode as a } from "vue";
|
|
2
|
+
import { onClickOutside as v } from "@vueuse/core";
|
|
3
|
+
import y from "../TransitionVertical.vue.js";
|
|
4
|
+
import w from "../Button/index.js";
|
|
5
|
+
const H = /* @__PURE__ */ p({
|
|
6
|
+
props: {
|
|
7
|
+
innerClass: [String, Array],
|
|
8
|
+
innerStyle: [Object, String],
|
|
9
|
+
buttonText: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "Menu"
|
|
12
|
+
},
|
|
13
|
+
buttonIng: Boolean,
|
|
14
|
+
gap: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 8
|
|
17
|
+
},
|
|
18
|
+
autoPosition: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !0
|
|
21
|
+
},
|
|
22
|
+
maxHeight: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 200
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(o, {
|
|
28
|
+
emit: x,
|
|
29
|
+
slots: l,
|
|
30
|
+
expose: f
|
|
31
|
+
}) {
|
|
32
|
+
const n = s(!1), i = s(null), r = s("bottom");
|
|
33
|
+
v(i, (t) => n.value = !1);
|
|
34
|
+
const m = () => {
|
|
35
|
+
if (!o.autoPosition || !i.value) return;
|
|
36
|
+
const t = i.value.getBoundingClientRect(), c = window.innerHeight - t.bottom, d = t.top;
|
|
37
|
+
c < o.maxHeight && d > c ? r.value = "top" : r.value = "bottom";
|
|
38
|
+
}, u = (t) => {
|
|
39
|
+
const e = typeof t == "boolean" ? t : !n.value;
|
|
40
|
+
e && m(), n.value = e;
|
|
41
|
+
};
|
|
42
|
+
f({
|
|
43
|
+
setShow: (t) => {
|
|
44
|
+
u(t);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
const g = b(() => {
|
|
48
|
+
const t = o.innerStyle || {};
|
|
49
|
+
if (!o.autoPosition) return t;
|
|
50
|
+
const e = {
|
|
51
|
+
position: "absolute",
|
|
52
|
+
zIndex: 100
|
|
53
|
+
};
|
|
54
|
+
return r.value === "bottom" ? (e.top = `calc(100% + ${o.gap}px)`, e.transformOrigin = "top center") : (e.bottom = `calc(100% + ${o.gap}px)`, e.top = "auto", e.transformOrigin = "bottom center"), {
|
|
55
|
+
...t,
|
|
56
|
+
...e
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
return () => a("div", {
|
|
60
|
+
class: "relative",
|
|
61
|
+
ref: i
|
|
62
|
+
}, [l.trigger ? l.trigger(u) : a(w, {
|
|
63
|
+
ing: o.buttonIng,
|
|
64
|
+
onClick: () => u()
|
|
65
|
+
}, {
|
|
66
|
+
default: () => [o.buttonText]
|
|
67
|
+
}), a(y, null, {
|
|
68
|
+
default: () => [n.value && a("div", {
|
|
69
|
+
class: o.innerClass,
|
|
70
|
+
style: g.value
|
|
71
|
+
}, [l.default?.()])]
|
|
72
|
+
})]);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export {
|
|
76
|
+
H as default
|
|
77
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
buttonText: {
|
|
4
|
+
type: PropType<string>;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
width: {
|
|
8
|
+
type: PropType<string>;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
row: BooleanConstructor;
|
|
12
|
+
options: {
|
|
13
|
+
type: PropType<{
|
|
14
|
+
label: string;
|
|
15
|
+
action: () => any;
|
|
16
|
+
}[]>;
|
|
17
|
+
default: () => never[];
|
|
18
|
+
};
|
|
19
|
+
innerClass: {
|
|
20
|
+
type: PropType<string>;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
|
+
buttonText: {
|
|
25
|
+
type: PropType<string>;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
width: {
|
|
29
|
+
type: PropType<string>;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
row: BooleanConstructor;
|
|
33
|
+
options: {
|
|
34
|
+
type: PropType<{
|
|
35
|
+
label: string;
|
|
36
|
+
action: () => any;
|
|
37
|
+
}[]>;
|
|
38
|
+
default: () => never[];
|
|
39
|
+
};
|
|
40
|
+
innerClass: {
|
|
41
|
+
type: PropType<string>;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
}>> & Readonly<{}>, {
|
|
45
|
+
width: string;
|
|
46
|
+
innerClass: string;
|
|
47
|
+
options: {
|
|
48
|
+
label: string;
|
|
49
|
+
action: () => any;
|
|
50
|
+
}[];
|
|
51
|
+
buttonText: string;
|
|
52
|
+
row: boolean;
|
|
53
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
54
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent as a, ref as i, createVNode as r } from "vue";
|
|
2
|
+
import u from "./DropDown.js";
|
|
3
|
+
const s = /* @__PURE__ */ a({
|
|
4
|
+
props: {
|
|
5
|
+
buttonText: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: "Menu"
|
|
8
|
+
},
|
|
9
|
+
width: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "max-context"
|
|
12
|
+
},
|
|
13
|
+
row: Boolean,
|
|
14
|
+
options: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => []
|
|
17
|
+
},
|
|
18
|
+
innerClass: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ""
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(t, {
|
|
24
|
+
slots: o
|
|
25
|
+
}) {
|
|
26
|
+
const e = i();
|
|
27
|
+
return () => r(u, {
|
|
28
|
+
buttonText: t.buttonText,
|
|
29
|
+
innerStyle: {
|
|
30
|
+
width: t.width
|
|
31
|
+
},
|
|
32
|
+
ref: e,
|
|
33
|
+
innerClass: ["absolute top-full left-50% bg-dropMenu rounded-lg p-2 z-10 flex gap-2 translate-x--50% backdrop-blur-8", !t.row && "flex-col", t.innerClass]
|
|
34
|
+
}, {
|
|
35
|
+
default: () => t.options.map((n, l) => r("div", {
|
|
36
|
+
key: l,
|
|
37
|
+
class: "w-full min-w-max flex items-center justify-center px-4 py-2 rounded-lg bg-avatarMenuButton transition-colors",
|
|
38
|
+
onClick: () => {
|
|
39
|
+
e.value?.setShow(!1), n.action();
|
|
40
|
+
}
|
|
41
|
+
}, [n.label])),
|
|
42
|
+
trigger: o.trigger
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
s as default
|
|
48
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type MaybeRef, type Ref } from 'vue';
|
|
2
|
+
interface Task {
|
|
3
|
+
id: symbol;
|
|
4
|
+
name: MaybeRef<string>;
|
|
5
|
+
promise: Promise<any>;
|
|
6
|
+
status: 'pending' | 'success' | 'error';
|
|
7
|
+
error?: any;
|
|
8
|
+
}
|
|
9
|
+
export declare const foregroundTask: {
|
|
10
|
+
tasks: Ref<{
|
|
11
|
+
id: symbol;
|
|
12
|
+
name: string;
|
|
13
|
+
promise: {
|
|
14
|
+
then: <TResult1 = any, TResult2 = never>(onfulfilled?: ((value: any) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>;
|
|
15
|
+
catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<any>;
|
|
16
|
+
finally: (onfinally?: (() => void) | null | undefined) => Promise<any>;
|
|
17
|
+
readonly [Symbol.toStringTag]: string;
|
|
18
|
+
};
|
|
19
|
+
status: "pending" | "success" | "error";
|
|
20
|
+
error?: any;
|
|
21
|
+
}[], Task[] | {
|
|
22
|
+
id: symbol;
|
|
23
|
+
name: string;
|
|
24
|
+
promise: {
|
|
25
|
+
then: <TResult1 = any, TResult2 = never>(onfulfilled?: ((value: any) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>;
|
|
26
|
+
catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<any>;
|
|
27
|
+
finally: (onfinally?: (() => void) | null | undefined) => Promise<any>;
|
|
28
|
+
readonly [Symbol.toStringTag]: string;
|
|
29
|
+
};
|
|
30
|
+
status: "pending" | "success" | "error";
|
|
31
|
+
error?: any;
|
|
32
|
+
}[]>;
|
|
33
|
+
showErrorModal: Ref<boolean, boolean>;
|
|
34
|
+
currentError: Ref<any, any>;
|
|
35
|
+
register<T>(name: MaybeRef<string>, promise: Promise<T>): Promise<T>;
|
|
36
|
+
removeTask(id: symbol): void;
|
|
37
|
+
};
|
|
38
|
+
declare const _default: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ref as o, defineComponent as l, createVNode as n, Transition as i } from "vue";
|
|
2
|
+
const e = {
|
|
3
|
+
tasks: o([]),
|
|
4
|
+
showErrorModal: o(!1),
|
|
5
|
+
currentError: o(null),
|
|
6
|
+
async register(r, s) {
|
|
7
|
+
const a = {
|
|
8
|
+
id: Symbol(),
|
|
9
|
+
name: r,
|
|
10
|
+
promise: s,
|
|
11
|
+
status: "pending"
|
|
12
|
+
};
|
|
13
|
+
e.tasks.value.push(a);
|
|
14
|
+
try {
|
|
15
|
+
await s, a.status = "success";
|
|
16
|
+
} catch (t) {
|
|
17
|
+
throw a.status = "error", a.error = t, e.currentError.value = t, console.error(t), t;
|
|
18
|
+
} finally {
|
|
19
|
+
e.removeTask(a.id);
|
|
20
|
+
}
|
|
21
|
+
return console.log("Task completed:", a.name), await s;
|
|
22
|
+
},
|
|
23
|
+
removeTask(r) {
|
|
24
|
+
const s = e.tasks.value.findIndex((a) => a.id === r);
|
|
25
|
+
s !== -1 && e.tasks.value.splice(s, 1);
|
|
26
|
+
}
|
|
27
|
+
}, c = /* @__PURE__ */ l({
|
|
28
|
+
setup() {
|
|
29
|
+
return () => n(i, {
|
|
30
|
+
duration: {
|
|
31
|
+
enter: 500,
|
|
32
|
+
leave: 500
|
|
33
|
+
},
|
|
34
|
+
leaveActiveClass: "transition-opacity duration-500 transition-ease-in-out",
|
|
35
|
+
leaveFromClass: "opacity-100",
|
|
36
|
+
leaveToClass: "opacity-0",
|
|
37
|
+
enterActiveClass: "transition-opacity duration-500 transition-ease-in-out",
|
|
38
|
+
enterToClass: "opacity-100",
|
|
39
|
+
enterFromClass: "opacity-0"
|
|
40
|
+
}, {
|
|
41
|
+
default: () => [!!e.tasks.value.length && n("div", {
|
|
42
|
+
class: "full bg-foregroundTask backdrop-blur-lg flex flex-col items-center justify-center gap-14 z-40"
|
|
43
|
+
}, [n("div", {
|
|
44
|
+
class: "op-90"
|
|
45
|
+
}, [typeof e.tasks.value[0].name == "string" ? e.tasks.value[0].name : e.tasks.value[0].name.value])])]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
c as default,
|
|
51
|
+
e as foregroundTask
|
|
52
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type MaybeRef, type Ref } from 'vue';
|
|
2
|
+
interface Task {
|
|
3
|
+
id: symbol;
|
|
4
|
+
name: MaybeRef<string>;
|
|
5
|
+
promise: Promise<any>;
|
|
6
|
+
startTime: number;
|
|
7
|
+
status: 'pending' | 'success' | 'error';
|
|
8
|
+
error?: any;
|
|
9
|
+
showTimer?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const taskManager: {
|
|
12
|
+
tasks: Ref<{
|
|
13
|
+
id: symbol;
|
|
14
|
+
name: string;
|
|
15
|
+
promise: {
|
|
16
|
+
then: <TResult1 = any, TResult2 = never>(onfulfilled?: ((value: any) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>;
|
|
17
|
+
catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<any>;
|
|
18
|
+
finally: (onfinally?: (() => void) | null | undefined) => Promise<any>;
|
|
19
|
+
readonly [Symbol.toStringTag]: string;
|
|
20
|
+
};
|
|
21
|
+
startTime: number;
|
|
22
|
+
status: "pending" | "success" | "error";
|
|
23
|
+
error?: any;
|
|
24
|
+
showTimer?: number | undefined;
|
|
25
|
+
}[], Task[] | {
|
|
26
|
+
id: symbol;
|
|
27
|
+
name: string;
|
|
28
|
+
promise: {
|
|
29
|
+
then: <TResult1 = any, TResult2 = never>(onfulfilled?: ((value: any) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>;
|
|
30
|
+
catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<any>;
|
|
31
|
+
finally: (onfinally?: (() => void) | null | undefined) => Promise<any>;
|
|
32
|
+
readonly [Symbol.toStringTag]: string;
|
|
33
|
+
};
|
|
34
|
+
startTime: number;
|
|
35
|
+
status: "pending" | "success" | "error";
|
|
36
|
+
error?: any;
|
|
37
|
+
showTimer?: number | undefined;
|
|
38
|
+
}[]>;
|
|
39
|
+
showErrorModal: Ref<boolean, boolean>;
|
|
40
|
+
currentError: Ref<any, any>;
|
|
41
|
+
register<T>(name: MaybeRef<string>, promise: Promise<T>): Promise<T>;
|
|
42
|
+
removeTask(id: symbol): void;
|
|
43
|
+
};
|
|
44
|
+
declare const _default: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
45
|
+
export default _default;
|