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
package/dist/es/components/src/drawer/drawer.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -8,13 +8,12 @@ import i from "../../../icons/src/close.vue.mjs";
|
|
|
8
8
|
import "../../../icons/index.mjs";
|
|
9
9
|
import a from "../button/button.vue.mjs";
|
|
10
10
|
import o from "../scrollbar/scrollbar.vue.mjs";
|
|
11
|
-
import s from "../
|
|
12
|
-
import ee from "
|
|
13
|
-
import { VaporTeleport as c, applyVShow as l, child as u, computed as d, createComponent as f, createIf as p, createInvoker as m, createSlot as h, createTemplateRefSetter as te, defineVaporComponent as g, delegateEvents as _, mergeModels as v, next as y, nextTick as b, onMounted as ne, onUnmounted as re, ref as x, renderEffect as S, setClass as C, setInsertionState as w, setStyle as T, setText as ie, template as E, toDisplayString as D, txt as ae, unref as O, useModel as k, watch as A } from "vue";
|
|
11
|
+
import { STransition as s } from "../transition/index.mjs";
|
|
12
|
+
import { VaporTeleport as ee, applyVShow as c, child as l, computed as u, createComponent as d, createIf as f, createInvoker as p, createSlot as m, createTemplateRefSetter as h, defineVaporComponent as g, delegateEvents as _, mergeModels as v, next as y, nextTick as b, onMounted as x, onUnmounted as te, ref as S, renderEffect as C, setClass as w, setInsertionState as T, setStyle as E, setText as D, template as O, toDisplayString as ne, txt as re, unref as k, useModel as ie, watch as A } from "vue";
|
|
14
13
|
//#region ../components/src/drawer/drawer.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
15
|
-
var j =
|
|
14
|
+
var j = O("<div>"), ae = O("<div> "), oe = O("<div><div><div></div><div></div><div>");
|
|
16
15
|
_("click", "mousedown");
|
|
17
|
-
var
|
|
16
|
+
var M = /*@__PURE__*/ g({
|
|
18
17
|
name: "SDrawer",
|
|
19
18
|
__name: "drawer",
|
|
20
19
|
props: /*@__PURE__*/ v({
|
|
@@ -67,42 +66,42 @@ var N = /*@__PURE__*/ g({
|
|
|
67
66
|
"closed"
|
|
68
67
|
], ["update:modelValue"]),
|
|
69
68
|
setup(g, { emit: _ }) {
|
|
70
|
-
let v = g,
|
|
71
|
-
|
|
72
|
-
let
|
|
73
|
-
zIndex:
|
|
69
|
+
let v = g, O = _, M = t("drawer"), { nextZIndex: se } = r(), N = S(0), { lockScroll: ce, unlockScroll: le } = n(), P = ie(g, "modelValue"), F = S(!1), I = S(!1), L = S(!1), R = S(""), z = S("");
|
|
70
|
+
R.value = e(v.width), z.value = e(v.height);
|
|
71
|
+
let B = u(() => ({
|
|
72
|
+
zIndex: N.value,
|
|
74
73
|
position: v.to === "body" ? "fixed" : "absolute"
|
|
75
|
-
})),
|
|
74
|
+
})), V = u(() => {
|
|
76
75
|
let e = { ...v.drawerStyle };
|
|
77
|
-
return (v.placement === "left" || v.placement === "right") && (e.width =
|
|
78
|
-
}),
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
|
|
76
|
+
return (v.placement === "left" || v.placement === "right") && (e.width = R.value), (v.placement === "top" || v.placement === "bottom") && (e.height = z.value), e;
|
|
77
|
+
}), H = () => {
|
|
78
|
+
O("opened");
|
|
79
|
+
}, U = () => {
|
|
80
|
+
I.value = !1, O("closed"), b(() => {
|
|
82
81
|
Z.value && (Z.value.style.transition = "", Z.value.style.transform = ""), le();
|
|
83
82
|
});
|
|
84
83
|
}, W = () => {
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
v.closeOnMask && (W(),
|
|
88
|
-
},
|
|
89
|
-
e.preventDefault(),
|
|
90
|
-
},
|
|
91
|
-
if (
|
|
92
|
-
if (v.placement === "right" && (
|
|
84
|
+
P.value = !1, O("close");
|
|
85
|
+
}, G = () => {
|
|
86
|
+
v.closeOnMask && (W(), O("maskClick"));
|
|
87
|
+
}, ue = (e) => {
|
|
88
|
+
e.preventDefault(), L.value = !0;
|
|
89
|
+
}, K = (e) => {
|
|
90
|
+
if (L.value) {
|
|
91
|
+
if (v.placement === "right" && (R.value = X(window.innerWidth - e.clientX, v.minWidth, v.maxWidth, !0), $(R.value, !0)), v.placement === "left") {
|
|
93
92
|
let t = e.clientX;
|
|
94
|
-
|
|
93
|
+
R.value = X(t, v.minWidth, v.maxWidth, !0), $(R.value, !0);
|
|
95
94
|
}
|
|
96
|
-
if (v.placement === "bottom" && (
|
|
95
|
+
if (v.placement === "bottom" && (z.value = X(window.innerHeight - e.clientY, v.minHeight, v.maxHeight, !1), $(z.value, !0)), v.placement === "top") {
|
|
97
96
|
let t = e.clientY;
|
|
98
|
-
|
|
97
|
+
z.value = X(t, v.minHeight, v.maxHeight, !1), $(z.value, !0);
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
}, q = (e) => {
|
|
104
|
-
e.key === "Escape" && v.closeOnEsc && F.value && (W(), E("esc"));
|
|
100
|
+
}, q = () => {
|
|
101
|
+
L.value &&= !1;
|
|
105
102
|
}, J = (e) => {
|
|
103
|
+
e.key === "Escape" && v.closeOnEsc && P.value && (W(), O("esc"));
|
|
104
|
+
}, de = (e) => {
|
|
106
105
|
let t = String(e).trim().match(/^(\d*\.?\d+)(.*)$/);
|
|
107
106
|
return t ? {
|
|
108
107
|
num: parseFloat(t[1]),
|
|
@@ -112,7 +111,7 @@ var N = /*@__PURE__*/ g({
|
|
|
112
111
|
unit: "px"
|
|
113
112
|
};
|
|
114
113
|
}, Y = (e, t) => {
|
|
115
|
-
let { num: n, unit: r } =
|
|
114
|
+
let { num: n, unit: r } = de(e), i = t ? window.innerWidth : window.innerHeight;
|
|
116
115
|
switch (r) {
|
|
117
116
|
case "%":
|
|
118
117
|
case "vw":
|
|
@@ -123,73 +122,74 @@ var N = /*@__PURE__*/ g({
|
|
|
123
122
|
}, X = (e, t, n, r) => {
|
|
124
123
|
let i = Y(t, r), a = Y(n, r);
|
|
125
124
|
return Math.max(i, Math.min(e, a)) + "px";
|
|
126
|
-
}, Z =
|
|
125
|
+
}, Z = S(null), Q = () => {
|
|
127
126
|
v.to === "body" ? Z.value = document.querySelector("#app") : v.to instanceof HTMLElement ? Z.value = v.to : typeof v.to == "string" && (Z.value = document.querySelector(v.to));
|
|
128
127
|
}, $ = (e, t) => {
|
|
129
128
|
v.push && Z.value && (t ? (Z.value.style.transition = "transform 0.3s var(--s-bezier-out)", v.placement === "left" ? Z.value.style.transform = `translateX(${e})` : v.placement === "right" ? Z.value.style.transform = `translateX(-${e})` : v.placement === "top" ? Z.value.style.transform = `translateY(${e})` : v.placement === "bottom" && (Z.value.style.transform = `translateY(-${e})`)) : (Z.value.style.transition = "transform 0.3s var(--s-bezier-in)", Z.value.style.transform = "translate(0,0)"));
|
|
130
129
|
};
|
|
131
|
-
A(() => v.to, Q), A(() =>
|
|
132
|
-
e ? (
|
|
133
|
-
|
|
134
|
-
})) : (
|
|
130
|
+
A(() => v.to, Q), A(() => P.value, (e) => {
|
|
131
|
+
e ? (N.value = se(), ce(), I.value = !0, b(() => {
|
|
132
|
+
F.value = !0, v.placement === "left" || v.placement === "right" ? $(V.value.width, !0) : (v.placement === "top" || v.placement === "bottom") && $(V.value.height, !0), v.closeOnEsc && (document.removeEventListener("keydown", J), document.addEventListener("keydown", J)), O("open");
|
|
133
|
+
})) : (F.value = !1, document.removeEventListener("keydown", J), $("0", !1));
|
|
135
134
|
}, { immediate: !0 }), A(() => v.resizable, (e) => {
|
|
136
|
-
e ? (window.addEventListener("mousemove",
|
|
137
|
-
}, { immediate: !0 }),
|
|
135
|
+
e ? (window.addEventListener("mousemove", K), window.addEventListener("mouseup", q)) : (window.removeEventListener("mousemove", K), window.removeEventListener("mouseup", q));
|
|
136
|
+
}, { immediate: !0 }), x(() => {
|
|
138
137
|
Q();
|
|
139
|
-
}),
|
|
140
|
-
document.removeEventListener("keydown",
|
|
138
|
+
}), te(() => {
|
|
139
|
+
document.removeEventListener("keydown", J), window.removeEventListener("mousemove", K), window.removeEventListener("mouseup", q);
|
|
141
140
|
});
|
|
142
|
-
let
|
|
143
|
-
return
|
|
141
|
+
let fe = h();
|
|
142
|
+
return d(ee, {
|
|
144
143
|
to: () => g.to,
|
|
145
144
|
defer: ""
|
|
146
145
|
}, () => {
|
|
147
146
|
let e = j();
|
|
148
|
-
return
|
|
149
|
-
|
|
150
|
-
}),
|
|
147
|
+
return C(() => {
|
|
148
|
+
w(e, [k(M).e("container")]), E(e, B.value);
|
|
149
|
+
}), T(e, null, 0), d(k(s), { type: "opacity" }, () => f(() => g.mask && F.value, () => {
|
|
151
150
|
let e = j();
|
|
152
|
-
return e.$evtclick =
|
|
153
|
-
|
|
151
|
+
return e.$evtclick = p(G), C(() => {
|
|
152
|
+
w(e, [k(M).e("mask")]), E(e, g.maskStyle);
|
|
154
153
|
}), e;
|
|
155
|
-
}, null, 129)),
|
|
154
|
+
}, null, 129)), T(e, null, 1), d(k(s), {
|
|
155
|
+
type: "side",
|
|
156
156
|
placement: () => g.placement,
|
|
157
|
-
onAfterLeave: () =>
|
|
158
|
-
onAfterEnter: () =>
|
|
157
|
+
onAfterLeave: () => U,
|
|
158
|
+
onAfterEnter: () => H
|
|
159
159
|
}, () => {
|
|
160
|
-
let e = oe(), t =
|
|
161
|
-
return
|
|
162
|
-
let t =
|
|
163
|
-
|
|
164
|
-
}),
|
|
160
|
+
let e = oe(), t = l(e, 1), n = l(t), r = y(n, 1), s = y(r, 2);
|
|
161
|
+
return C(() => {
|
|
162
|
+
let t = k(M);
|
|
163
|
+
w(e, [t.b(), t.m(g.placement)]), E(e, V.value);
|
|
164
|
+
}), T(e, 0, 0), f(() => g.resizable, () => {
|
|
165
165
|
let e = j();
|
|
166
|
-
return e.$evtmousedown =
|
|
167
|
-
let t =
|
|
168
|
-
|
|
166
|
+
return e.$evtmousedown = p(ue), C(() => {
|
|
167
|
+
let t = k(M);
|
|
168
|
+
w(e, [t.e("trigger"), t.is("dragging", L.value)]);
|
|
169
169
|
}), e;
|
|
170
|
-
}),
|
|
171
|
-
let e =
|
|
172
|
-
|
|
173
|
-
}),
|
|
174
|
-
let e =
|
|
175
|
-
return
|
|
176
|
-
|
|
170
|
+
}), C(() => {
|
|
171
|
+
let e = k(M);
|
|
172
|
+
w(t, [e.e("wrapper")]), w(n, [e.e("header")]);
|
|
173
|
+
}), T(n, null, 0), m("header", null, () => {
|
|
174
|
+
let e = ae(), t = re(e);
|
|
175
|
+
return C(() => {
|
|
176
|
+
w(e, [k(M).e("title")]), D(t, ne(g.header));
|
|
177
177
|
}), e;
|
|
178
|
-
}),
|
|
178
|
+
}), T(n, null, 1), f(() => g.closable, () => d(a, {
|
|
179
179
|
circle: "",
|
|
180
180
|
text: "",
|
|
181
181
|
size: "small",
|
|
182
182
|
onClick: () => W
|
|
183
|
-
}, { icon: () =>
|
|
183
|
+
}, { icon: () => d(k(i)) })), C(() => w(r, [k(M).e("body")])), T(r, null, 0), f(() => g.bodyScroll, () => d(o, { $: [() => ({ ...g.scrollbarProps })] }, () => {
|
|
184
184
|
let e = j();
|
|
185
|
-
return
|
|
185
|
+
return C(() => w(e, [k(M).e("content")])), T(e, null, 0), m(), e;
|
|
186
186
|
}), () => {
|
|
187
187
|
let e = j();
|
|
188
|
-
return
|
|
189
|
-
}, 1029),
|
|
190
|
-
}),
|
|
188
|
+
return C(() => w(e, [k(M).e("content")])), T(e, null, 0), m(), e;
|
|
189
|
+
}, 1029), C(() => w(s, [k(M).e("footer")])), T(s, null, 0), m("footer"), c(e, () => F.value), e;
|
|
190
|
+
}), c(e, () => I.value), fe(e, "drawerContainerRef"), e;
|
|
191
191
|
}, !0);
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
194
|
//#endregion
|
|
195
|
-
export {
|
|
195
|
+
export { M as default };
|
package/dist/es/components/src/form/form-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import { getSize as e } from "../../../utils/src/tool.mjs";
|
|
|
2
2
|
import "../../../utils/index.mjs";
|
|
3
3
|
import { useNamespace as t } from "../../../hooks/src/use-namespace.mjs";
|
|
4
4
|
import "../../../hooks/index.mjs";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import o from "../../../icons/src/question.vue.mjs";
|
|
5
|
+
import n from "../../../icons/src/asterisk.vue.mjs";
|
|
6
|
+
import r from "../../../icons/src/question.vue.mjs";
|
|
8
7
|
import "../../../icons/index.mjs";
|
|
8
|
+
import { formContextKey as i, formItemContextKey as a, formItemStatusContextKey as o } from "./types.mjs";
|
|
9
9
|
import { STooltip as s } from "../tooltip/index.mjs";
|
|
10
10
|
import { child as c, computed as l, createComponent as u, createIf as d, createSlot as f, defineVaporComponent as p, inject as m, onMounted as h, onUnmounted as g, provide as _, ref as v, renderEffect as y, setClass as b, setInsertionState as x, setStyle as S, setText as C, template as w, toDisplayString as T, txt as E, unref as D } from "vue";
|
|
11
11
|
import O from "async-validator";
|
|
@@ -26,7 +26,7 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
setup(p, { expose: w }) {
|
|
29
|
-
let P = p, F = t("form-item"), I = m(
|
|
29
|
+
let P = p, F = t("form-item"), I = m(i), L = l(() => I?.labelPosition?.value === "top" ? "" : P.labelWidth || I?.labelWidth?.value), R = l(() => P.labelAlign ? P.labelAlign : I?.labelAlign?.value ? I?.labelAlign?.value : I?.labelPosition?.value === "top" ? "left" : "right"), z = null, B = l(() => {
|
|
30
30
|
let e = I?.model?.value;
|
|
31
31
|
return e && P.field && e[P.field] !== void 0 ? e[P.field] : null;
|
|
32
32
|
}), V = l(() => {
|
|
@@ -65,7 +65,7 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
65
65
|
resetField: q,
|
|
66
66
|
clearValidate: K
|
|
67
67
|
};
|
|
68
|
-
_(
|
|
68
|
+
_(a, Y), _(o, {
|
|
69
69
|
size: I?.size,
|
|
70
70
|
error: J
|
|
71
71
|
}), h(() => {
|
|
@@ -90,22 +90,22 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
90
90
|
e.m(n?.size?.value)
|
|
91
91
|
]);
|
|
92
92
|
}), x(X, 0, 0), d(() => W.value || p.label || p.tooltip, () => {
|
|
93
|
-
let t = j(),
|
|
93
|
+
let t = j(), i = c(t);
|
|
94
94
|
return y(() => {
|
|
95
|
-
let
|
|
96
|
-
b(t, [
|
|
97
|
-
}), x(
|
|
95
|
+
let n = D(F);
|
|
96
|
+
b(t, [n.e("label-wrapper")]), b(i, [n.e("label"), n.m("align-" + R.value)]), S(i, { width: D(e)(L.value) });
|
|
97
|
+
}), x(i, null, 0), d(() => W.value, () => {
|
|
98
98
|
let e = k();
|
|
99
|
-
return y(() => b(e, [D(F).e("required")])), x(e, null, 0), u(D(
|
|
100
|
-
}), x(
|
|
99
|
+
return y(() => b(e, [D(F).e("required")])), x(e, null, 0), u(D(n)), e;
|
|
100
|
+
}), x(i, null, 1), f("label", { label: () => p.label }, () => {
|
|
101
101
|
let e = A();
|
|
102
102
|
return y(() => C(e, T(p.label))), e;
|
|
103
|
-
}), x(
|
|
103
|
+
}), x(i, null, 2), d(() => p.tooltip, () => u(D(s), {
|
|
104
104
|
content: () => p.tooltip,
|
|
105
105
|
mini: ""
|
|
106
106
|
}, () => {
|
|
107
107
|
let e = k();
|
|
108
|
-
return y(() => b(e, [D(F).e("tooltip")])), x(e, null, 0), u(D(
|
|
108
|
+
return y(() => b(e, [D(F).e("tooltip")])), x(e, null, 0), u(D(r)), e;
|
|
109
109
|
})), t;
|
|
110
110
|
}), y(() => {
|
|
111
111
|
let e = D(F);
|
|
@@ -3,6 +3,6 @@ export declare const useFormItem: ({ size, error, }?: {
|
|
|
3
3
|
size?: Ref<"mini" | "small" | "medium" | "large">;
|
|
4
4
|
error?: Ref<boolean>;
|
|
5
5
|
}) => {
|
|
6
|
-
mergedSize: ComputedRef<"small" | "
|
|
6
|
+
mergedSize: ComputedRef<"small" | "medium" | "large" | "mini" | undefined>;
|
|
7
7
|
mergedError: ComputedRef<boolean | undefined>;
|
|
8
8
|
};
|
package/dist/es/components/src/grid/grid-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
2
|
import "../../../hooks/index.mjs";
|
|
3
3
|
import { gridContextKey as t } from "./types.mjs";
|
|
4
|
-
import { computed as n, createSlot as r, defineVaporComponent as i, inject as a, onMounted as o, onUnmounted as s, renderEffect as c, setClass as l, setInsertionState as u,
|
|
4
|
+
import { computed as n, createSlot as r, defineVaporComponent as i, inject as a, onMounted as o, onUnmounted as s, renderEffect as c, setClass as l, setInsertionState as u, setStaticTemplateRef as d, setStyle as f, template as p, unref as m, useId as h, useTemplateRef as g, watch as _ } from "vue";
|
|
5
5
|
//#region ../components/src/grid/grid-item.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
6
|
-
var
|
|
6
|
+
var v = p("<div>", 1), y = /*@__PURE__*/ i({
|
|
7
7
|
name: "SGridItem",
|
|
8
8
|
__name: "grid-item",
|
|
9
9
|
props: {
|
|
@@ -11,29 +11,38 @@ var h = f("<div>", 1), g = /*@__PURE__*/ i({
|
|
|
11
11
|
offset: { default: 0 }
|
|
12
12
|
},
|
|
13
13
|
setup(i) {
|
|
14
|
-
let
|
|
15
|
-
if (!
|
|
16
|
-
let e =
|
|
14
|
+
let p = i, y = g("gridItemRef"), b = e("grid-item"), x = "grid-item-" + h(), S = a(t, {}), C = n(() => {
|
|
15
|
+
if (!S?.positionList) return {};
|
|
16
|
+
let e = S?.positionList.value[x];
|
|
17
17
|
return e ? { gridColumn: `${e.start} / ${e.end}` } : {};
|
|
18
|
-
}),
|
|
19
|
-
|
|
20
|
-
...
|
|
21
|
-
uid:
|
|
18
|
+
}), w = () => {
|
|
19
|
+
S?.addGridItem?.({
|
|
20
|
+
...p,
|
|
21
|
+
uid: x,
|
|
22
|
+
el: y.value ?? void 0
|
|
22
23
|
});
|
|
23
24
|
};
|
|
24
25
|
o(() => {
|
|
25
|
-
|
|
26
|
+
w();
|
|
27
|
+
}), _(() => ({
|
|
28
|
+
span: p.span,
|
|
29
|
+
offset: p.offset
|
|
30
|
+
}), () => {
|
|
31
|
+
S?.updateGridItem?.({
|
|
32
|
+
...p,
|
|
33
|
+
uid: x
|
|
34
|
+
});
|
|
26
35
|
}), s(() => {
|
|
27
|
-
|
|
28
|
-
...
|
|
29
|
-
uid:
|
|
36
|
+
S?.removeGridItem?.({
|
|
37
|
+
...p,
|
|
38
|
+
uid: x
|
|
30
39
|
});
|
|
31
40
|
});
|
|
32
|
-
let
|
|
41
|
+
let T = v();
|
|
33
42
|
return c(() => {
|
|
34
|
-
l(
|
|
35
|
-
}), u(
|
|
43
|
+
l(T, [m(b).b()]), f(T, C.value);
|
|
44
|
+
}), u(T, null, 0), r(), d(T, y, null, "gridItemRef"), T;
|
|
36
45
|
}
|
|
37
46
|
});
|
|
38
47
|
//#endregion
|
|
39
|
-
export {
|
|
48
|
+
export { y as default };
|
|
@@ -21,16 +21,20 @@ var m = f("<div>", 1), h = /*@__PURE__*/ a({
|
|
|
21
21
|
});
|
|
22
22
|
o(n, {
|
|
23
23
|
addGridItem: (e) => {
|
|
24
|
-
_.value.
|
|
24
|
+
_.value = [..._.value, e];
|
|
25
25
|
},
|
|
26
26
|
removeGridItem: (e) => {
|
|
27
|
-
|
|
27
|
+
let t = typeof e == "string" ? e : e.uid;
|
|
28
|
+
_.value = _.value.filter((e) => e.uid !== t);
|
|
29
|
+
},
|
|
30
|
+
updateGridItem: (e) => {
|
|
31
|
+
_.value.findIndex((t) => t.uid === e.uid) !== -1 && (_.value = _.value.map((t) => t.uid === e.uid ? e : t));
|
|
28
32
|
},
|
|
29
33
|
positionList: r(() => {
|
|
30
|
-
let e = 1, t = {}, n = y.value;
|
|
31
|
-
for (let
|
|
32
|
-
let { uid:
|
|
33
|
-
t[
|
|
34
|
+
let e = 1, t = {}, n = y.value, r = [..._.value].sort((e, t) => e.el && t.el ? e.el.compareDocumentPosition(t.el) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1 : 0);
|
|
35
|
+
for (let i of r) {
|
|
36
|
+
let { uid: r, span: a = 1, offset: o = 0 } = i, s = e + o, c = s + a;
|
|
37
|
+
t[r] = {
|
|
34
38
|
start: s,
|
|
35
39
|
end: c
|
|
36
40
|
}, e = c, e > n && (e = 1);
|
|
@@ -34,10 +34,12 @@ export interface GridChildren {
|
|
|
34
34
|
span: number;
|
|
35
35
|
offset: number;
|
|
36
36
|
uid: string;
|
|
37
|
+
el?: HTMLElement;
|
|
37
38
|
}
|
|
38
39
|
export interface GridContext {
|
|
39
40
|
addGridItem?: (item: any) => void;
|
|
40
41
|
removeGridItem?: (item: any) => void;
|
|
42
|
+
updateGridItem?: (item: any) => void;
|
|
41
43
|
positionList?: ComputedRef<Record<string, {
|
|
42
44
|
start: number;
|
|
43
45
|
end: number;
|
package/dist/es/components/src/input/input.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
2
|
import "../../../hooks/index.mjs";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import n from "../../../icons/src/
|
|
6
|
-
import te from "../../../icons/src/eye-close.vue.mjs";
|
|
7
|
-
import ne from "../../../icons/src/eye.vue.mjs";
|
|
3
|
+
import t from "../../../icons/src/close.vue.mjs";
|
|
4
|
+
import ee from "../../../icons/src/eye-close.vue.mjs";
|
|
5
|
+
import n from "../../../icons/src/eye.vue.mjs";
|
|
8
6
|
import "../../../icons/index.mjs";
|
|
7
|
+
import { formItemContextKey as te } from "../form/types.mjs";
|
|
8
|
+
import { useFormItem as ne } from "../form/use-form-item.mjs";
|
|
9
9
|
import { configProviderContextKey as r } from "../config-provider/types.mjs";
|
|
10
10
|
import "../config-provider/index.mjs";
|
|
11
11
|
import "../form/index.mjs";
|
|
@@ -47,7 +47,7 @@ var A = /*@__PURE__*/ d({
|
|
|
47
47
|
"blur"
|
|
48
48
|
], ["update:modelValue"]),
|
|
49
49
|
setup(d, { expose: f, emit: m, slots: C }) {
|
|
50
|
-
let A = d, j = e("input"), M = m, { size: N, error: P } = re(A), { mergedSize: F, mergedError: I } =
|
|
50
|
+
let A = d, j = e("input"), M = m, { size: N, error: P } = re(A), { mergedSize: F, mergedError: I } = ne({
|
|
51
51
|
size: N,
|
|
52
52
|
error: P
|
|
53
53
|
}), L = p(r, void 0), R = a(() => L?.inputFilled?.value || A.filled), z = ie(d, "modelValue"), B = g(!1), V = () => {
|
|
@@ -78,7 +78,7 @@ var A = /*@__PURE__*/ d({
|
|
|
78
78
|
focus: () => J.value?.focus(),
|
|
79
79
|
blur: () => J.value?.blur()
|
|
80
80
|
});
|
|
81
|
-
let me = p(
|
|
81
|
+
let me = p(te, null), Y = (e) => {
|
|
82
82
|
me?.validate(e).catch(() => {});
|
|
83
83
|
}, he = u(), X = k(), Z = i(X), Q = i(Z, 1), $ = i(Q, 1);
|
|
84
84
|
return _(() => {
|
|
@@ -106,10 +106,10 @@ var A = /*@__PURE__*/ d({
|
|
|
106
106
|
S($, z.value), v($, [T(j).e("input")]), b($, "disabled", d.disabled), b($, "placeholder", d.placeholder), b($, "readonly", d.readonly ? !0 : void 0), b($, "type", e === "password" ? W.value ? "text" : "password" : e);
|
|
107
107
|
}), y(Q, null, 2), s(() => B.value && !!z.value && d.clearable, () => {
|
|
108
108
|
let e = O();
|
|
109
|
-
return _(() => v(e, T(j).e("close"))), y(e, null, 0), o(T(
|
|
109
|
+
return _(() => v(e, T(j).e("close"))), y(e, null, 0), o(T(t)), h(e, "click", oe(U, ["stop"])), e.$evtmousedown = se(() => {}, ["prevent"]), e;
|
|
110
110
|
}), y(Q, null, 3), s(() => d.type === "password", () => {
|
|
111
111
|
let e = O();
|
|
112
|
-
return _(() => v(e, [T(j).e("eye")])), y(e, null, 0), s(() => W.value, () => o(T(
|
|
112
|
+
return _(() => v(e, [T(j).e("eye")])), y(e, null, 0), s(() => W.value, () => o(T(n)), () => o(T(ee)), 1029), e.$evtclick = c(G), e;
|
|
113
113
|
}), y(Q, null, 4), s(() => C.suffix || d.suffix, () => {
|
|
114
114
|
let e = D();
|
|
115
115
|
return _(() => v(e, [T(j).e("suffix")])), y(e, null, 0), l("suffix", null, () => {
|