savor-ui 0.3.2 → 0.4.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/CHANGELOG.md +45 -0
- package/dist/es/components/index.d.ts +4 -0
- package/dist/es/components/index.mjs +6 -1
- package/dist/es/components/src/alert/alert.d.ts +22 -0
- package/dist/es/components/src/alert/alert.vue.mjs +5 -0
- package/dist/es/components/src/alert/alert.vue_vue_type_script_setup_true_vapor_true_lang.mjs +58 -0
- package/dist/es/components/src/alert/index.d.ts +26 -0
- package/dist/es/components/src/alert/index.mjs +7 -0
- package/dist/es/components/src/alert/types.d.ts +24 -0
- package/dist/es/components/src/cascader/cascader.vue_vue_type_script_setup_true_vapor_true_lang.mjs +93 -82
- package/dist/es/components/src/cascader/index.d.ts +1 -0
- package/dist/es/components/src/cascader/types.d.ts +2 -0
- package/dist/es/components/src/chat-list/chat-list.d.ts +35 -0
- package/dist/es/components/src/chat-list/chat-list.vue.mjs +5 -0
- package/dist/es/components/src/chat-list/chat-list.vue_vue_type_script_setup_true_vapor_true_lang.mjs +55 -0
- package/dist/es/components/src/chat-list/index.d.ts +47 -0
- package/dist/es/components/src/chat-list/index.mjs +7 -0
- package/dist/es/components/src/chat-list/types.d.ts +44 -0
- package/dist/es/components/src/chat-sender/chat-sender.d.ts +26 -0
- package/dist/es/components/src/chat-sender/chat-sender.vue.mjs +5 -0
- package/dist/es/components/src/chat-sender/chat-sender.vue_vue_type_script_setup_true_vapor_true_lang.mjs +92 -0
- package/dist/es/components/src/chat-sender/index.d.ts +27 -0
- package/dist/es/components/src/chat-sender/index.mjs +7 -0
- package/dist/es/components/src/chat-sender/types.d.ts +24 -0
- package/dist/es/components/src/collapse/collapse-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
- package/dist/es/components/src/date-picker/date-picker.vue_vue_type_script_setup_true_vapor_true_lang.mjs +28 -28
- package/dist/es/components/src/datetime-picker/datetime-picker.vue_vue_type_script_setup_true_vapor_true_lang.mjs +28 -28
- package/dist/es/components/src/drawer/drawer.vue_vue_type_script_setup_true_vapor_true_lang.mjs +72 -72
- package/dist/es/components/src/form/form-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +13 -13
- package/dist/es/components/src/form/use-form-item.d.ts +1 -1
- package/dist/es/components/src/grid/grid-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +26 -17
- package/dist/es/components/src/grid/grid.vue_vue_type_script_setup_true_vapor_true_lang.mjs +10 -6
- package/dist/es/components/src/grid/types.d.ts +2 -0
- package/dist/es/components/src/input/input.vue_vue_type_script_setup_true_vapor_true_lang.mjs +9 -9
- package/dist/es/components/src/input-number/input-number.vue_vue_type_script_setup_true_vapor_true_lang.mjs +83 -83
- package/dist/es/components/src/input-tag/input-tag.vue_vue_type_script_setup_true_vapor_true_lang.mjs +10 -10
- package/dist/es/components/src/layer/layer.vue_vue_type_script_setup_true_vapor_true_lang.mjs +105 -105
- package/dist/es/components/src/list/index.d.ts +5 -5
- package/dist/es/components/src/list/list.d.ts +3 -3
- package/dist/es/components/src/list/list.vue_vue_type_script_setup_true_vapor_true_lang.mjs +7 -12
- package/dist/es/components/src/list/types.d.ts +7 -5
- package/dist/es/components/src/menu/menu-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +46 -37
- package/dist/es/components/src/menu/sub-menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
- package/dist/es/components/src/modal/modal.vue_vue_type_script_setup_true_vapor_true_lang.mjs +121 -121
- package/dist/es/components/src/panel/panel.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
- package/dist/es/components/src/popover/index.d.ts +1 -0
- package/dist/es/components/src/popover/popover.vue_vue_type_script_setup_true_vapor_true_lang.mjs +77 -76
- package/dist/es/components/src/popover/types.d.ts +4 -0
- package/dist/es/components/src/scrollbar/index.d.ts +7 -2
- package/dist/es/components/src/scrollbar/scrollbar.d.ts +5 -2
- package/dist/es/components/src/scrollbar/scrollbar.vue_vue_type_script_setup_true_vapor_true_lang.mjs +131 -96
- package/dist/es/components/src/scrollbar/types.d.ts +15 -1
- package/dist/es/components/src/segmented/segmented.vue_vue_type_script_setup_true_vapor_true_lang.mjs +41 -45
- package/dist/es/components/src/select/select.vue_vue_type_script_setup_true_vapor_true_lang.mjs +9 -9
- package/dist/es/components/src/table/col-group.d.ts +22 -0
- package/dist/es/components/src/table/col-group.vue.mjs +5 -0
- package/dist/es/components/src/table/col-group.vue_vue_type_script_setup_true_vapor_true_lang.mjs +25 -0
- package/dist/es/components/src/table/index.d.ts +18 -41
- package/dist/es/components/src/table/index.mjs +1 -0
- package/dist/es/components/src/table/table-body.d.ts +32 -0
- package/dist/es/components/src/table/table-body.vue.mjs +5 -0
- package/dist/es/components/src/table/table-body.vue_vue_type_script_setup_true_vapor_true_lang.mjs +153 -0
- package/dist/es/components/src/table/table-header.d.ts +23 -0
- package/dist/es/components/src/table/table-header.vue.mjs +5 -0
- package/dist/es/components/src/table/table-header.vue_vue_type_script_setup_true_vapor_true_lang.mjs +80 -0
- package/dist/es/components/src/table/table.d.ts +12 -25
- package/dist/es/components/src/table/table.vue_vue_type_script_setup_true_vapor_true_lang.mjs +167 -380
- package/dist/es/components/src/table/types.d.ts +61 -45
- package/dist/es/components/src/table/types.mjs +4 -0
- package/dist/es/components/src/textarea/textarea.vue_vue_type_script_setup_true_vapor_true_lang.mjs +6 -6
- package/dist/es/components/src/tooltip/index.d.ts +1 -0
- package/dist/es/components/src/tooltip/tooltip.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -0
- package/dist/es/components/src/tooltip/types.d.ts +2 -0
- package/dist/es/components/src/transition/index.d.ts +29 -0
- package/dist/es/components/src/transition/index.mjs +7 -0
- package/dist/es/components/src/{_comp/HeightTransition.d.ts → transition/transition-height.d.ts} +0 -4
- package/dist/es/components/src/transition/transition-height.vue.mjs +5 -0
- package/dist/es/components/src/transition/transition-height.vue_vue_type_script_setup_true_vapor_true_lang.mjs +54 -0
- package/dist/es/components/src/transition/transition-opacity.vue.mjs +5 -0
- package/dist/es/components/src/{_comp/OpacityTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs → transition/transition-opacity.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +2 -2
- package/dist/es/components/src/transition/transition-scale.vue.mjs +5 -0
- package/dist/es/components/src/{_comp/ScaleTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs → transition/transition-scale.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +2 -2
- package/dist/es/components/src/transition/transition-side.vue.mjs +5 -0
- package/dist/es/components/src/{_comp/SideTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs → transition/transition-side.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +2 -2
- package/dist/es/components/src/transition/transition-width.d.ts +31 -0
- package/dist/es/components/src/transition/transition-width.vue.mjs +5 -0
- package/dist/es/components/src/transition/transition-width.vue_vue_type_script_setup_true_vapor_true_lang.mjs +54 -0
- package/dist/es/components/src/transition/transition.d.ts +27 -0
- package/dist/es/components/src/transition/transition.vue.mjs +5 -0
- package/dist/es/components/src/transition/transition.vue_vue_type_script_setup_true_vapor_true_lang.mjs +47 -0
- package/dist/es/components/src/transition/types.d.ts +28 -0
- package/dist/es/components/src/tree/index.d.ts +15 -7
- package/dist/es/components/src/tree/node.d.ts +2 -1
- package/dist/es/components/src/tree/node.vue_vue_type_script_setup_true_vapor_true_lang.mjs +27 -29
- package/dist/es/components/src/tree/tree.d.ts +8 -2
- package/dist/es/components/src/tree/tree.vue_vue_type_script_setup_true_vapor_true_lang.mjs +69 -65
- package/dist/es/components/src/tree/types.d.ts +18 -12
- package/dist/es/core/components.mjs +94 -86
- package/dist/es/core/index.mjs +84 -79
- package/dist/es/hooks/src/use-element-size.mjs +7 -38
- package/dist/es/icons/index.d.ts +4 -1
- package/dist/es/icons/index.mjs +3 -0
- package/dist/es/icons/src/loading-stop.d.ts +19 -0
- package/dist/es/icons/src/loading-stop.vue.mjs +11 -0
- package/dist/es/icons/src/send.d.ts +19 -0
- package/dist/es/icons/src/send.vue.mjs +11 -0
- package/dist/es/icons/src/stop.d.ts +19 -0
- package/dist/es/icons/src/stop.vue.mjs +5 -0
- package/dist/es/theme/components/alert.scss +101 -0
- package/dist/es/theme/components/button.scss +21 -4
- package/dist/es/theme/components/cascader.scss +3 -0
- package/dist/es/theme/components/chat-list.scss +134 -0
- package/dist/es/theme/components/chat-sender.scss +123 -0
- package/dist/es/theme/components/index.scss +3 -0
- package/dist/es/theme/components/input.scss +2 -1
- package/dist/es/theme/components/list.scss +7 -0
- package/dist/es/theme/components/menu.scss +14 -1
- package/dist/es/theme/components/scrollbar.scss +61 -7
- package/dist/es/theme/components/table.scss +360 -328
- package/dist/es/theme/components/transition.scss +21 -21
- package/dist/es/theme/components/tree.scss +8 -0
- package/dist/es/utils/src/tool.d.ts +8 -3
- package/dist/es/utils/src/tool.mjs +6 -6
- package/dist/json/vetur-attributes.json +196 -46
- package/dist/json/vetur-tags.json +82 -15
- package/dist/json/web-types.json +432 -75
- package/package.json +1 -1
- package/dist/es/components/src/_comp/HeightTransition.vue.mjs +0 -5
- package/dist/es/components/src/_comp/HeightTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs +0 -77
- package/dist/es/components/src/_comp/OpacityTransition.vue.mjs +0 -5
- package/dist/es/components/src/_comp/ScaleTransition.vue.mjs +0 -5
- package/dist/es/components/src/_comp/SideTransition.vue.mjs +0 -5
- /package/dist/es/components/src/{_comp/OpacityTransition.d.ts → transition/transition-opacity.d.ts} +0 -0
- /package/dist/es/components/src/{_comp/ScaleTransition.d.ts → transition/transition-scale.d.ts} +0 -0
- /package/dist/es/components/src/{_comp/SideTransition.d.ts → transition/transition-side.d.ts} +0 -0
|
@@ -3,16 +3,16 @@ import { PublicProps, VNode, Plugin } from 'vue';
|
|
|
3
3
|
export declare const SList: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
4
4
|
attrs: any;
|
|
5
5
|
slots: ListSlots;
|
|
6
|
-
emit: (((evt: "dragStart", data: any) => void) & ((evt: "dragEnd", data: any) => void)) & ((event: "update:modelValue", value:
|
|
6
|
+
emit: (((evt: "dragStart", data: any) => void) & ((evt: "dragEnd", data: any) => void)) & ((event: "update:modelValue", value: any) => void);
|
|
7
7
|
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
8
|
props: PublicProps & {
|
|
9
|
+
modelValue?: any;
|
|
9
10
|
data?: any[] | undefined;
|
|
10
11
|
hover?: boolean | undefined;
|
|
11
|
-
|
|
12
|
+
selectable?: boolean | undefined;
|
|
12
13
|
selectKey?: string | undefined;
|
|
13
|
-
modelValue?: string | number | undefined;
|
|
14
14
|
border?: boolean | undefined;
|
|
15
|
-
"onUpdate:modelValue"?: ((value:
|
|
15
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
16
16
|
onDragStart?: ((data: any) => any) | undefined;
|
|
17
17
|
onDragEnd?: ((data: any) => any) | undefined;
|
|
18
18
|
} & (typeof globalThis extends {
|
|
@@ -21,7 +21,7 @@ export declare const SList: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setu
|
|
|
21
21
|
expose: (exposed: {}) => void;
|
|
22
22
|
attrs: any;
|
|
23
23
|
slots: ListSlots;
|
|
24
|
-
emit: (((evt: "dragStart", data: any) => void) & ((evt: "dragEnd", data: any) => void)) & ((event: "update:modelValue", value:
|
|
24
|
+
emit: (((evt: "dragStart", data: any) => void) & ((evt: "dragEnd", data: any) => void)) & ((event: "update:modelValue", value: any) => void);
|
|
25
25
|
}>) => VNode & {
|
|
26
26
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
27
27
|
}) & Plugin;
|
|
@@ -2,9 +2,9 @@ import { ListProps, ListSlots } from './types';
|
|
|
2
2
|
import { PublicProps, VNode } from 'vue';
|
|
3
3
|
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: PublicProps & __VLS_PrettifyLocal<(ListProps & {
|
|
5
|
-
modelValue?:
|
|
5
|
+
modelValue?: any;
|
|
6
6
|
}) & {
|
|
7
|
-
"onUpdate:modelValue"?: ((value:
|
|
7
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
8
8
|
onDragStart?: ((data: any) => any) | undefined;
|
|
9
9
|
onDragEnd?: ((data: any) => any) | undefined;
|
|
10
10
|
}> & (typeof globalThis extends {
|
|
@@ -13,7 +13,7 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
13
13
|
expose: (exposed: {}) => void;
|
|
14
14
|
attrs: any;
|
|
15
15
|
slots: ListSlots;
|
|
16
|
-
emit: (((evt: "dragStart", data: any) => void) & ((evt: "dragEnd", data: any) => void)) & ((event: "update:modelValue", value:
|
|
16
|
+
emit: (((evt: "dragStart", data: any) => void) & ((evt: "dragEnd", data: any) => void)) & ((event: "update:modelValue", value: any) => void);
|
|
17
17
|
}>) => VNode & {
|
|
18
18
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
19
19
|
};
|
|
@@ -8,27 +8,21 @@ var b = /*@__PURE__*/ a({
|
|
|
8
8
|
name: "SList",
|
|
9
9
|
__name: "list",
|
|
10
10
|
props: /*@__PURE__*/ s({
|
|
11
|
+
modelValue: {},
|
|
11
12
|
data: {},
|
|
12
13
|
hover: { type: Boolean },
|
|
13
|
-
|
|
14
|
-
type: Boolean,
|
|
15
|
-
default: !1
|
|
16
|
-
},
|
|
14
|
+
selectable: { type: Boolean },
|
|
17
15
|
selectKey: { default: "id" },
|
|
18
|
-
|
|
19
|
-
border: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
default: !1
|
|
22
|
-
}
|
|
16
|
+
border: { type: Boolean }
|
|
23
17
|
}, {
|
|
24
|
-
modelValue: { default:
|
|
18
|
+
modelValue: { default: () => {} },
|
|
25
19
|
modelModifiers: {}
|
|
26
20
|
}),
|
|
27
21
|
emits: /*@__PURE__*/ s(["dragStart", "dragEnd"], ["update:modelValue"]),
|
|
28
22
|
setup(a, { emit: o }) {
|
|
29
23
|
let s = a, p = e("list"), b = g(a, "modelValue"), x = (e) => {
|
|
30
|
-
b.value = e[s.selectKey];
|
|
31
|
-
}, S = (e) => b.value === e[s.selectKey] && s.
|
|
24
|
+
!s.selectable || !s.selectKey || (b.value = e[s.selectKey]);
|
|
25
|
+
}, S = (e) => s.selectKey ? b.value === e[s.selectKey] && s.selectable : !1, C = y(), w = t(C);
|
|
32
26
|
return c(() => {
|
|
33
27
|
let e = h(p);
|
|
34
28
|
l(C, [e.b(), { [e.m("border")]: a.border }]), l(w, [e.e("wrapper")]);
|
|
@@ -39,6 +33,7 @@ var b = /*@__PURE__*/ a({
|
|
|
39
33
|
l(n, [
|
|
40
34
|
t.e("item"),
|
|
41
35
|
t.is("selected", S(e.value)),
|
|
36
|
+
t.is("selectable", a.selectable),
|
|
42
37
|
{ [t.m("hover")]: a.hover }
|
|
43
38
|
]);
|
|
44
39
|
}), u(n, null, 0), i("default", {
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
export interface ListProps {
|
|
2
|
+
/** 选中项(v-model) */
|
|
3
|
+
modelValue?: any;
|
|
2
4
|
/** 列表项数据 */
|
|
3
5
|
data?: any[];
|
|
4
6
|
/** 是否显示悬停状态 */
|
|
5
7
|
hover?: boolean;
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
/** 选中项键名
|
|
8
|
+
/** 是否可选择 */
|
|
9
|
+
selectable?: boolean;
|
|
10
|
+
/** 选中项键名
|
|
11
|
+
* @default id
|
|
12
|
+
*/
|
|
9
13
|
selectKey?: string;
|
|
10
|
-
/** 选中项(v-model) */
|
|
11
|
-
modelValue?: string | number;
|
|
12
14
|
/** 是否显示边框 */
|
|
13
15
|
border?: boolean;
|
|
14
16
|
}
|
package/dist/es/components/src/menu/menu-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -2,9 +2,9 @@ import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
|
2
2
|
import "../../../hooks/index.mjs";
|
|
3
3
|
import { STooltip as t } from "../tooltip/index.mjs";
|
|
4
4
|
import { menuContextKey as n, menuLevelContextKey as r, subMenuContextKey as i } from "./types.mjs";
|
|
5
|
-
import { child as a, createComponent as o, createIf as s, createInvoker as c, createSlot as l, defineVaporComponent as u, delegateEvents as d, inject as f,
|
|
5
|
+
import { child as a, createComponent as o, createIf as s, createInvoker as c, createSlot as l, defineVaporComponent as u, delegateEvents as d, inject as f, onMounted as p, renderEffect as m, setClass as h, setInsertionState as g, setStaticTemplateRef as _, setText as v, template as y, toDisplayString as b, unref as x, useTemplateRef as S } from "vue";
|
|
6
6
|
//#region ../components/src/menu/menu-item.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
7
|
-
var w =
|
|
7
|
+
var C = y("<div>"), w = y(" "), T = y("<div><div></div></div>"), E = y("<div><div>"), D = y("<div>", 1);
|
|
8
8
|
d("click");
|
|
9
9
|
var O = /*@__PURE__*/ u({
|
|
10
10
|
name: "SMenuItem",
|
|
@@ -16,54 +16,63 @@ var O = /*@__PURE__*/ u({
|
|
|
16
16
|
activePosition: { default: "center" },
|
|
17
17
|
item: {}
|
|
18
18
|
},
|
|
19
|
-
setup(u) {
|
|
20
|
-
let
|
|
21
|
-
|
|
19
|
+
setup(u, { slots: d }) {
|
|
20
|
+
let y = u, O = e("menu"), k = S("itemRef"), A = f(n, void 0), j = f(i, void 0), M = f(r, void 0), N = () => {
|
|
21
|
+
A?.itemClick(y.name, y.item), j?.outsideClick();
|
|
22
22
|
};
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
p(() => {
|
|
24
|
+
j?.registerDescendant(y.name), M || k.value?.style.setProperty("--s-menu-level", "0");
|
|
25
25
|
});
|
|
26
|
-
let
|
|
27
|
-
return
|
|
26
|
+
let P = D();
|
|
27
|
+
return m(() => {
|
|
28
|
+
let e = x(O);
|
|
29
|
+
h(P, [e.e("item"), e.is("collapse", x(A)?.isCollapsed.value)]);
|
|
30
|
+
}), g(P, null, 0), s(() => x(A)?.collapsed.value && !x(j), () => o(x(t), {
|
|
28
31
|
mini: "",
|
|
29
32
|
"popover-props": { placement: "right" }
|
|
30
33
|
}, {
|
|
31
34
|
content: () => l("default", null, () => {
|
|
32
35
|
let e = w();
|
|
33
|
-
return
|
|
36
|
+
return m(() => v(e, b(u.title))), e;
|
|
34
37
|
}, 4),
|
|
35
38
|
default: () => {
|
|
36
|
-
let e = T(), t = a(e
|
|
37
|
-
return
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
])
|
|
46
|
-
}),
|
|
39
|
+
let e = T(), t = a(e, 1);
|
|
40
|
+
return m(() => {
|
|
41
|
+
let t = x(O), n = x(A), r = u.name, i = u.activePosition, a = n.activeKey;
|
|
42
|
+
h(e, [
|
|
43
|
+
t.e("item-title"),
|
|
44
|
+
t.is("disabled", u.disabled),
|
|
45
|
+
t.is("active", a.value === r && i === "center"),
|
|
46
|
+
t.is("active-left", a.value === r && i === "left"),
|
|
47
|
+
t.is("active-right", a.value === r && i === "right")
|
|
48
|
+
]);
|
|
49
|
+
}), g(e, 0, 0), s(() => d.icon, () => {
|
|
50
|
+
let e = C();
|
|
51
|
+
return m(() => h(e, [x(O).e("item-icon")])), g(e, null, 0), l("icon"), e;
|
|
52
|
+
}), m(() => h(t, [x(O).e("item-label")])), g(t, null, 0), l("default", null, () => {
|
|
47
53
|
let e = w();
|
|
48
|
-
return
|
|
49
|
-
}), e.$evtclick = c(
|
|
54
|
+
return m(() => v(e, b(u.title))), e;
|
|
55
|
+
}), e.$evtclick = c(N), e;
|
|
50
56
|
}
|
|
51
57
|
}), () => {
|
|
52
|
-
let e = E(), t = a(e
|
|
53
|
-
return
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
])
|
|
62
|
-
}),
|
|
58
|
+
let e = E(), t = a(e, 1);
|
|
59
|
+
return m(() => {
|
|
60
|
+
let t = x(O), n = x(A), r = u.name, i = u.activePosition, a = n.activeKey;
|
|
61
|
+
h(e, [
|
|
62
|
+
t.e("item-title"),
|
|
63
|
+
t.is("disabled", u.disabled),
|
|
64
|
+
t.is("active", a.value === r && i === "center"),
|
|
65
|
+
t.is("active-left", a.value === r && i === "left"),
|
|
66
|
+
t.is("active-right", a.value === r && i === "right")
|
|
67
|
+
]);
|
|
68
|
+
}), g(e, 0, 0), s(() => d.icon, () => {
|
|
69
|
+
let e = C();
|
|
70
|
+
return m(() => h(e, [x(O).e("item-icon")])), g(e, null, 0), l("icon"), e;
|
|
71
|
+
}), m(() => h(t, [x(O).e("item-label")])), g(t, null, 0), l("default", null, () => {
|
|
63
72
|
let e = w();
|
|
64
|
-
return
|
|
65
|
-
}), e.$evtclick = c(
|
|
66
|
-
},
|
|
73
|
+
return m(() => v(e, b(u.title))), e;
|
|
74
|
+
}), e.$evtclick = c(N), e;
|
|
75
|
+
}, 517), _(P, k, null, "itemRef"), P;
|
|
67
76
|
}
|
|
68
77
|
});
|
|
69
78
|
//#endregion
|
package/dist/es/components/src/menu/sub-menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import n from "../../../icons/src/right.vue.mjs";
|
|
|
5
5
|
import r from "../../../icons/src/up.vue.mjs";
|
|
6
6
|
import "../../../icons/index.mjs";
|
|
7
7
|
import i from "../popover/popover.vue.mjs";
|
|
8
|
-
import a from "../
|
|
8
|
+
import { STransition as a } from "../transition/index.mjs";
|
|
9
9
|
import { menuContextKey as ee, menuLevelContextKey as o, subMenuContextKey as s } from "./types.mjs";
|
|
10
10
|
import { child as c, computed as l, createComponent as u, createIf as d, createInvoker as f, createSlot as p, createTemplateRefSetter as m, defineVaporComponent as h, delegateEvents as g, inject as _, next as v, onMounted as y, provide as b, ref as x, renderEffect as S, setClass as C, setInsertionState as w, setText as T, template as E, toDisplayString as D, unref as O, useTemplateRef as k, watch as A } from "vue";
|
|
11
11
|
//#region ../components/src/menu/sub-menu.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
@@ -119,7 +119,7 @@ var R = /*@__PURE__*/ h({
|
|
|
119
119
|
}), S(() => C(n, [O(R).e("sub-label")])), w(n, null, 0), p("title", null, () => {
|
|
120
120
|
let e = M();
|
|
121
121
|
return S(() => T(e, D(h.title))), e;
|
|
122
|
-
}), S(() => C(i, [O(R).e("sub-arrow")])), w(i, null, 0), d(() => W.value, () => u(O(r)), () => u(O(t)), 2309), e.$evtclick = f(K), [e, u(a,
|
|
122
|
+
}), S(() => C(i, [O(R).e("sub-arrow")])), w(i, null, 0), d(() => W.value, () => u(O(r)), () => u(O(t)), 2309), e.$evtclick = f(K), [e, u(O(a), { type: "height" }, () => d(() => W.value, () => {
|
|
123
123
|
let e = I(), t = c(e);
|
|
124
124
|
return S(() => C(t, [O(R).e("sub-content")])), w(t, null, 0), p(), e;
|
|
125
125
|
}, null, 129))];
|
package/dist/es/components/src/modal/modal.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -3,23 +3,22 @@ import "../../../utils/index.mjs";
|
|
|
3
3
|
import { useDrag as t } from "../../../hooks/src/use-drag.mjs";
|
|
4
4
|
import { useNamespace as n } from "../../../hooks/src/use-namespace.mjs";
|
|
5
5
|
import { useResize as ee } from "../../../hooks/src/use-resize.mjs";
|
|
6
|
-
import { useResizeObserver as
|
|
7
|
-
import { useScrollHidden as
|
|
8
|
-
import { useZIndex as
|
|
6
|
+
import { useResizeObserver as te } from "../../../hooks/src/use-resize-observer.mjs";
|
|
7
|
+
import { useScrollHidden as ne } from "../../../hooks/src/use-scroll-hidden.mjs";
|
|
8
|
+
import { useZIndex as re } from "../../../hooks/src/use-zIndex.mjs";
|
|
9
9
|
import "../../../hooks/index.mjs";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
10
|
+
import r from "../../../icons/src/close.vue.mjs";
|
|
11
|
+
import ie from "../../../icons/src/fullscreen-exit.vue.mjs";
|
|
12
|
+
import ae from "../../../icons/src/fullscreen.vue.mjs";
|
|
13
13
|
import "../../../icons/index.mjs";
|
|
14
|
-
import { SScrollbar as
|
|
15
|
-
import { SButton as
|
|
16
|
-
import
|
|
17
|
-
import se from "
|
|
18
|
-
import { VaporTeleport as ce, applyVShow as o, child as s, computed as c, createComponent as l, createIf as u, createInvoker as le, createSlot as d, createTemplateRefSetter as ue, defineVaporComponent as f, delegateEvents as p, mergeModels as m, next as de, nextTick as h, onUnmounted as fe, ref as g, renderEffect as _, setClass as v, setInsertionState as y, setStyle as b, setText as x, template as S, toDisplayString as C, toRefs as pe, unref as w, useModel as me, useTemplateRef as T, watch as E, watchEffect as he } from "vue";
|
|
14
|
+
import { SScrollbar as oe } from "../scrollbar/index.mjs";
|
|
15
|
+
import { SButton as i } from "../button/index.mjs";
|
|
16
|
+
import { STransition as a } from "../transition/index.mjs";
|
|
17
|
+
import { VaporTeleport as se, applyVShow as o, child as s, computed as c, createComponent as l, createIf as u, createInvoker as ce, createSlot as d, createTemplateRefSetter as le, defineVaporComponent as f, delegateEvents as p, mergeModels as m, next as h, nextTick as g, onUnmounted as ue, ref as _, renderEffect as v, setClass as y, setInsertionState as b, setStyle as x, setText as S, template as C, toDisplayString as w, toRefs as de, unref as T, useModel as fe, useTemplateRef as E, watch as D, watchEffect as pe } from "vue";
|
|
19
18
|
//#region ../components/src/modal/modal.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
20
|
-
var
|
|
19
|
+
var O = C("<div>"), k = C(" "), me = C("<div><div></div><div></div>"), he = C("<div style=\"flex: 1; overflow: hidden; display: flex; flex-direction: column\">"), ge = C("<div><div>");
|
|
21
20
|
p("click");
|
|
22
|
-
var
|
|
21
|
+
var A = /*@__PURE__*/ f({
|
|
23
22
|
name: "SModal",
|
|
24
23
|
__name: "modal",
|
|
25
24
|
props: /*@__PURE__*/ m({
|
|
@@ -99,159 +98,160 @@ var k = /*@__PURE__*/ f({
|
|
|
99
98
|
"confirm"
|
|
100
99
|
], ["update:modelValue"]),
|
|
101
100
|
setup(f, { expose: p, emit: m }) {
|
|
102
|
-
let
|
|
103
|
-
|
|
104
|
-
let e =
|
|
105
|
-
|
|
101
|
+
let C = f, A = m, j = n("modal"), { lockScroll: _e, unlockScroll: M } = ne(), { nextZIndex: ve } = re(), N = _(0), P = E("modalRef"), F = E("headerRef"), I = fe(f, "modelValue"), L = _(!1), R = _(!1), z = _(!1), B = _(!1), V = _(0), H = _(0), U = _(0), W = _(0), G = _(!1), K = _(0), q = _(0), J = c(() => typeof C.to == "string" ? document.querySelector(C.to) || document.body : C.to);
|
|
102
|
+
te(J, () => {
|
|
103
|
+
let e = J.value;
|
|
104
|
+
K.value = e.clientHeight, q.value = e.clientWidth, Q();
|
|
106
105
|
});
|
|
107
|
-
let
|
|
108
|
-
zIndex:
|
|
109
|
-
position:
|
|
110
|
-
})),
|
|
111
|
-
width:
|
|
112
|
-
height:
|
|
113
|
-
top: `${
|
|
114
|
-
left: `${
|
|
115
|
-
maxHeight:
|
|
116
|
-
...
|
|
117
|
-
}),
|
|
118
|
-
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
},
|
|
124
|
-
e ?
|
|
106
|
+
let ye = c(() => ({
|
|
107
|
+
zIndex: N.value,
|
|
108
|
+
position: C.to === "body" ? "fixed" : "absolute"
|
|
109
|
+
})), be = c(() => z.value ? {} : {
|
|
110
|
+
width: U.value ? `${U.value}px` : e(C.width),
|
|
111
|
+
height: W.value ? `${W.value}px` : e(C.height),
|
|
112
|
+
top: `${V.value}px`,
|
|
113
|
+
left: `${H.value}px`,
|
|
114
|
+
maxHeight: K.value ? `${K.value - 40}px` : void 0,
|
|
115
|
+
...C.modalStyle
|
|
116
|
+
}), xe = () => {
|
|
117
|
+
A("opened");
|
|
118
|
+
}, Se = () => {
|
|
119
|
+
R.value = !1, B.value = !1, G.value = !1, A("closed"), g(M);
|
|
120
|
+
}, Ce = () => {
|
|
121
|
+
C.closeOnOverlayClick && X();
|
|
122
|
+
}, we = (e) => {
|
|
123
|
+
e ? I.value = !1 : B.value = !1;
|
|
125
124
|
}, Y = () => {
|
|
126
|
-
|
|
125
|
+
B.value = !0, A("confirm", we);
|
|
127
126
|
}, X = () => {
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
|
|
127
|
+
I.value = !1, A("close");
|
|
128
|
+
}, Te = () => {
|
|
129
|
+
z.value = !z.value;
|
|
131
130
|
};
|
|
132
|
-
|
|
131
|
+
D(() => C.fullscreen, (e) => z.value = e, { immediate: !0 });
|
|
133
132
|
let Z = (e) => {
|
|
134
|
-
e.key === "Escape" &&
|
|
133
|
+
e.key === "Escape" && C.closeOnEsc && L.value && X();
|
|
135
134
|
}, Q = async () => {
|
|
136
|
-
if (await
|
|
137
|
-
let e =
|
|
138
|
-
|
|
135
|
+
if (await g(), !P.value || G.value) return;
|
|
136
|
+
let e = P.value;
|
|
137
|
+
C.center ? V.value = Math.max(0, (K.value - e.offsetHeight) / 2) : V.value = C.offset, H.value = Math.max(0, (q.value - e.offsetWidth) / 2);
|
|
139
138
|
};
|
|
140
|
-
|
|
141
|
-
e ? (
|
|
142
|
-
}, { immediate: !0 }),
|
|
143
|
-
|
|
139
|
+
D(() => I.value, async (e) => {
|
|
140
|
+
e ? (N.value = ve(), _e(), R.value = !0, await g(), L.value = !0, Q()) : L.value = !1;
|
|
141
|
+
}, { immediate: !0 }), pe((e) => {
|
|
142
|
+
L.value && (document.addEventListener("keydown", Z), e(() => document.removeEventListener("keydown", Z)));
|
|
144
143
|
});
|
|
145
|
-
let { minWidth:
|
|
144
|
+
let { minWidth: Ee, minHeight: De, maxWidth: Oe, maxHeight: ke } = de(C);
|
|
146
145
|
ee({
|
|
147
|
-
target: N,
|
|
148
|
-
container: q,
|
|
149
|
-
enable: c(() => S.resizable && !R.value),
|
|
150
|
-
minWidth: De,
|
|
151
|
-
minHeight: Oe,
|
|
152
|
-
maxWidth: ke,
|
|
153
|
-
maxHeight: Ae,
|
|
154
|
-
divWidth: H,
|
|
155
|
-
divHeight: U,
|
|
156
|
-
divTop: B,
|
|
157
|
-
divLeft: V
|
|
158
|
-
}), t({
|
|
159
|
-
container: N,
|
|
160
146
|
target: P,
|
|
161
|
-
|
|
162
|
-
enable: c(() =>
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
147
|
+
container: J,
|
|
148
|
+
enable: c(() => C.resizable && !z.value),
|
|
149
|
+
minWidth: Ee,
|
|
150
|
+
minHeight: De,
|
|
151
|
+
maxWidth: Oe,
|
|
152
|
+
maxHeight: ke,
|
|
153
|
+
divWidth: U,
|
|
154
|
+
divHeight: W,
|
|
155
|
+
divTop: V,
|
|
156
|
+
divLeft: H
|
|
157
|
+
}), t({
|
|
158
|
+
container: P,
|
|
159
|
+
target: F,
|
|
160
|
+
parent: J,
|
|
161
|
+
enable: c(() => C.draggable && !z.value),
|
|
162
|
+
divLeft: H,
|
|
163
|
+
divTop: V,
|
|
164
|
+
hasDragged: G
|
|
165
|
+
}), ue(() => {
|
|
166
|
+
M();
|
|
168
167
|
}), p({ handleClose: X });
|
|
169
|
-
let $ =
|
|
170
|
-
return l(
|
|
168
|
+
let $ = le();
|
|
169
|
+
return l(se, {
|
|
171
170
|
to: () => f.to,
|
|
172
171
|
defer: ""
|
|
173
172
|
}, () => {
|
|
174
|
-
let e =
|
|
175
|
-
return
|
|
176
|
-
|
|
177
|
-
}),
|
|
178
|
-
let e =
|
|
179
|
-
return e.$evtclick =
|
|
180
|
-
|
|
173
|
+
let e = ge(), t = s(e, 1);
|
|
174
|
+
return v(() => {
|
|
175
|
+
y(e, [T(j).e("container")]), x(e, ye.value);
|
|
176
|
+
}), b(e, 0, 0), l(T(a), { type: "opacity" }, () => u(() => f.mask && L.value, () => {
|
|
177
|
+
let e = O();
|
|
178
|
+
return e.$evtclick = ce(Ce), v(() => {
|
|
179
|
+
x(e, f.maskStyle), y(e, [T(j).e("mask")]);
|
|
181
180
|
}), e;
|
|
182
|
-
}, null, 129)),
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
}, null, 129)), v(() => y(t, [T(j).e("wrapper")])), b(t, null, 0), l(T(a), {
|
|
182
|
+
type: "scale",
|
|
183
|
+
onAfterLeave: () => Se,
|
|
184
|
+
onAfterEnter: () => xe
|
|
185
185
|
}, () => {
|
|
186
|
-
let e =
|
|
187
|
-
return
|
|
188
|
-
let t =
|
|
189
|
-
|
|
186
|
+
let e = O();
|
|
187
|
+
return v(() => {
|
|
188
|
+
let t = T(j);
|
|
189
|
+
y(e, [
|
|
190
190
|
t.b(),
|
|
191
191
|
t.is("drag", f.draggable),
|
|
192
|
-
t.is("fullscreen",
|
|
193
|
-
]),
|
|
194
|
-
}),
|
|
195
|
-
let e =
|
|
196
|
-
return
|
|
197
|
-
let n =
|
|
198
|
-
|
|
199
|
-
}),
|
|
200
|
-
let e =
|
|
201
|
-
return
|
|
202
|
-
}),
|
|
192
|
+
t.is("fullscreen", z.value)
|
|
193
|
+
]), x(e, be.value);
|
|
194
|
+
}), b(e, null, 0), u(() => f.header, () => {
|
|
195
|
+
let e = me(), t = s(e), n = h(t, 1);
|
|
196
|
+
return v(() => {
|
|
197
|
+
let n = T(j);
|
|
198
|
+
y(e, [n.e("header")]), y(t, [n.e("title")]);
|
|
199
|
+
}), b(t, null, 0), d("header", null, () => {
|
|
200
|
+
let e = k();
|
|
201
|
+
return v(() => S(e, w(f.title))), e;
|
|
202
|
+
}), v(() => y(n, [T(j).e("header-icon")])), b(n, null, 0), u(() => f.fullable, () => l(T(i), {
|
|
203
203
|
circle: "",
|
|
204
204
|
text: "",
|
|
205
205
|
size: "small",
|
|
206
|
-
onClick: () =>
|
|
207
|
-
}, { icon: () => u(() =>
|
|
206
|
+
onClick: () => Te
|
|
207
|
+
}, { icon: () => u(() => z.value, () => l(T(ie)), () => l(T(ae)), 645) })), b(n, null, 1), u(() => f.closable, () => l(T(i), {
|
|
208
208
|
circle: "",
|
|
209
209
|
text: "",
|
|
210
210
|
size: "small",
|
|
211
211
|
onClick: () => X
|
|
212
|
-
}, { icon: () => l(
|
|
213
|
-
}),
|
|
214
|
-
let e =
|
|
215
|
-
return
|
|
216
|
-
|
|
217
|
-
}),
|
|
218
|
-
let e =
|
|
219
|
-
return
|
|
212
|
+
}, { icon: () => l(T(r)) })), $(e, F, null, "headerRef"), e;
|
|
213
|
+
}), b(e, null, 1), u(() => !f.scrollContent, () => {
|
|
214
|
+
let e = O();
|
|
215
|
+
return v(() => {
|
|
216
|
+
y(e, [T(j).e("body")]), x(e, f.contentStyle);
|
|
217
|
+
}), b(e, null, 0), d("default", null, () => {
|
|
218
|
+
let e = k();
|
|
219
|
+
return v(() => S(e, w(f.content))), e;
|
|
220
220
|
}), e;
|
|
221
221
|
}, () => {
|
|
222
|
-
let e =
|
|
223
|
-
return
|
|
222
|
+
let e = he();
|
|
223
|
+
return b(e, null, 0), l(T(oe), { $: [() => ({
|
|
224
224
|
padding: "20px",
|
|
225
225
|
...f.scrollbarProps
|
|
226
226
|
})] }, () => d("default", null, () => {
|
|
227
|
-
let e =
|
|
228
|
-
return
|
|
227
|
+
let e = k();
|
|
228
|
+
return v(() => S(e, w(f.content))), e;
|
|
229
229
|
}, 4)), e;
|
|
230
|
-
}, 1541),
|
|
231
|
-
let e =
|
|
232
|
-
return
|
|
230
|
+
}, 1541), b(e, null, 2), u(() => f.footer, () => {
|
|
231
|
+
let e = O();
|
|
232
|
+
return v(() => y(e, [T(j).e("footer")])), b(e, null, 0), d("footer", null, () => u(() => f.btnReverse, () => [l(T(i), {
|
|
233
233
|
label: "确定",
|
|
234
|
-
loading: () =>
|
|
234
|
+
loading: () => B.value,
|
|
235
235
|
type: "primary",
|
|
236
236
|
onClick: () => Y
|
|
237
|
-
}), l(
|
|
237
|
+
}), l(T(i), {
|
|
238
238
|
label: "取消",
|
|
239
239
|
secondary: "",
|
|
240
240
|
onClick: () => X
|
|
241
|
-
})], () => [l(
|
|
241
|
+
})], () => [l(T(i), {
|
|
242
242
|
label: "取消",
|
|
243
243
|
secondary: "",
|
|
244
244
|
onClick: () => X
|
|
245
|
-
}), l(
|
|
245
|
+
}), l(T(i), {
|
|
246
246
|
label: "确定",
|
|
247
|
-
loading: () =>
|
|
247
|
+
loading: () => B.value,
|
|
248
248
|
type: "primary",
|
|
249
249
|
onClick: () => Y
|
|
250
250
|
})], 1930)), e;
|
|
251
|
-
}), o(e, () =>
|
|
252
|
-
}), o(e, () =>
|
|
251
|
+
}), o(e, () => L.value), $(e, P, null, "modalRef"), e;
|
|
252
|
+
}), o(e, () => R.value), e;
|
|
253
253
|
}, !0);
|
|
254
254
|
}
|
|
255
255
|
});
|
|
256
256
|
//#endregion
|
|
257
|
-
export {
|
|
257
|
+
export { A as default };
|
package/dist/es/components/src/panel/panel.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import t from "../../../icons/src/minus.vue.mjs";
|
|
|
4
4
|
import n from "../../../icons/src/plus.vue.mjs";
|
|
5
5
|
import "../../../icons/index.mjs";
|
|
6
6
|
import r from "../button/button.vue.mjs";
|
|
7
|
-
import i from "../
|
|
7
|
+
import { STransition as i } from "../transition/index.mjs";
|
|
8
8
|
import { child as a, createComponent as o, createIf as s, createSlot as c, defineVaporComponent as l, next as u, ref as d, renderEffect as f, setClass as p, setInsertionState as m, setText as h, template as g, toDisplayString as _, unref as v } from "vue";
|
|
9
9
|
//#region ../components/src/panel/panel.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
10
10
|
var y = g(" "), b = g("<div><div><div></div><div>"), x = g("<div><div><div></div><div>", 1), S = /*@__PURE__*/ l({
|
|
@@ -30,7 +30,7 @@ var y = g(" "), b = g("<div><div><div></div><div>"), x = g("<div><div><div></div
|
|
|
30
30
|
text: "",
|
|
31
31
|
circle: "",
|
|
32
32
|
onClick: () => T
|
|
33
|
-
}, { icon: () => s(() => w.value, () => o(v(t)), () => o(v(n)), 389) })), m(E, null, 1), o(i,
|
|
33
|
+
}, { icon: () => s(() => w.value, () => o(v(t)), () => o(v(n)), 389) })), m(E, null, 1), o(v(i), { type: "height" }, () => s(() => w.value, () => {
|
|
34
34
|
let e = b(), t = a(e), n = a(t), r = u(n, 1);
|
|
35
35
|
return f(() => {
|
|
36
36
|
let e = v(C);
|
|
@@ -16,6 +16,7 @@ export declare const SPopover: ((__VLS_props: NonNullable<Awaited<typeof __VLS_s
|
|
|
16
16
|
alignPoint?: boolean | undefined;
|
|
17
17
|
offset?: [number, number] | undefined;
|
|
18
18
|
arrowStyle?: Record<string, any> | undefined;
|
|
19
|
+
disabled?: boolean | undefined;
|
|
19
20
|
destroyOnClose?: boolean | undefined;
|
|
20
21
|
teleportBody?: boolean | undefined;
|
|
21
22
|
teleport?: string | undefined;
|