savor-ui 0.2.0 → 0.3.1
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 +27 -0
- package/dist/es/components/index.mjs +3 -3
- package/dist/es/components/src/anchor/anchor.vue_vue_type_script_setup_true_vapor_true_lang.mjs +46 -35
- package/dist/es/components/src/avatar/types.d.ts +1 -1
- package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_vapor_true_lang.mjs +29 -32
- package/dist/es/components/src/color-picker/color-picker.vue_vue_type_script_setup_true_vapor_true_lang.mjs +91 -94
- package/dist/es/components/src/config-provider/index.d.ts +2 -2
- package/dist/es/components/src/drawer/drawer.vue_vue_type_script_setup_true_vapor_true_lang.mjs +4 -4
- package/dist/es/components/src/dropdown/doption.vue_vue_type_script_setup_true_vapor_true_lang.mjs +20 -23
- package/dist/es/components/src/dropdown/dsubmenu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +27 -30
- package/dist/es/components/src/layout/index.d.ts +1 -0
- package/dist/es/components/src/layout/layout.vue_vue_type_script_setup_true_vapor_true_lang.mjs +11 -5
- package/dist/es/components/src/layout/types.d.ts +2 -0
- package/dist/es/components/src/message/types.d.ts +2 -2
- package/dist/es/components/src/scrollbar/index.d.ts +3 -0
- package/dist/es/components/src/scrollbar/scrollbar.vue_vue_type_script_setup_true_vapor_true_lang.mjs +35 -29
- package/dist/es/components/src/scrollbar/types.d.ts +7 -0
- package/dist/es/components/src/select/index.d.ts +6 -5
- package/dist/es/components/src/select/select.d.ts +5 -5
- package/dist/es/components/src/select/select.vue_vue_type_script_setup_true_vapor_true_lang.mjs +189 -125
- package/dist/es/components/src/select/types.d.ts +6 -4
- package/dist/es/components/src/space/index.d.ts +1 -0
- package/dist/es/components/src/space/space.vue_vue_type_script_setup_true_vapor_true_lang.mjs +3 -1
- package/dist/es/components/src/space/types.d.ts +2 -0
- package/dist/es/components/src/table/table.vue_vue_type_script_setup_true_vapor_true_lang.mjs +10 -12
- package/dist/es/components/src/table/types.d.ts +2 -2
- package/dist/es/core/components.mjs +49 -49
- package/dist/es/core/global.d.ts +1 -0
- package/dist/es/core/index.mjs +47 -47
- package/dist/es/hooks/index.d.ts +0 -1
- package/dist/es/hooks/index.mjs +0 -1
- package/dist/es/theme/components/button.scss +22 -3
- package/dist/es/theme/components/cascader.scss +3 -0
- package/dist/es/theme/components/collapse.scss +16 -17
- package/dist/es/theme/components/color-picker.scss +4 -1
- package/dist/es/theme/components/dropdown.scss +34 -24
- package/dist/es/theme/components/layout.scss +0 -1
- package/dist/es/theme/components/pagination.scss +5 -0
- package/dist/es/theme/components/segmented.scss +1 -1
- package/dist/es/theme/components/select.scss +92 -1
- package/dist/es/theme/components/space.scss +4 -0
- package/dist/es/theme/components/tabs.scss +3 -3
- package/dist/es/theme/components/wheel.scss +12 -9
- package/dist/es/theme/mixins/function.scss +9 -4
- package/dist/es/utils/src/theme/themeMap.mjs +4 -4
- package/dist/json/vetur-attributes.json +21 -2
- package/dist/json/vetur-tags.json +9 -4
- package/dist/json/web-types.json +47 -3
- package/package.json +1 -1
- package/dist/es/hooks/src/use-ripple.d.ts +0 -15
- package/dist/es/hooks/src/use-ripple.mjs +0 -86
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## [0.3.1](https://gitee.com/mach552/savor-ui/compare/v0.3.0...v0.3.1) (2026-06-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **config-provider:** 删除不兼容的非`vapor`组件 ([e4aaaaf](https://gitee.com/mach552/savor-ui/commits/e4aaaaf2eb1b2076923809fe3b284293721fd1a8))
|
|
11
|
+
|
|
12
|
+
# [0.3.0](https://gitee.com/mach552/savor-ui/compare/v0.2.0...v0.3.0) (2026-06-07)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **anchor:** 修复激活状态失效问题 ([b9033d6](https://gitee.com/mach552/savor-ui/commits/b9033d6f851785006999cde93465c9411a107a79))
|
|
18
|
+
* **anchor:** 修复路由报历史警告问题 ([195493b](https://gitee.com/mach552/savor-ui/commits/195493b8859b2c0e114a30bc9f987471f3ad911a))
|
|
19
|
+
* **collapse:** 修复禁用样式无效问题 ([0d45085](https://gitee.com/mach552/savor-ui/commits/0d450857cd03fca4b4d255e817eb2f03c71a85d7))
|
|
20
|
+
* **pagination:** 修复页码处于边界时翻页按钮的禁用状态失效问题 ([a184a2f](https://gitee.com/mach552/savor-ui/commits/a184a2f22d2dec82909a9eb7a5b1d1c7944c88b3))
|
|
21
|
+
* **table:** 修复列宽自适应失效问题 ([d334c8f](https://gitee.com/mach552/savor-ui/commits/d334c8f6d3c5623117783121516f459ed17f5ece))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* **config-provider:** 新增`config-provider-vapor`组件 ([72be61f](https://gitee.com/mach552/savor-ui/commits/72be61fab0a8713c93886d8610548a01e92e3ee7))
|
|
27
|
+
* **layout:** 新增`bgColor`背景颜色属性 ([3a11757](https://gitee.com/mach552/savor-ui/commits/3a11757f1eb472e84d00e6cf3ff7f775e2bff49d))
|
|
28
|
+
* **scrollbar:** 新增`backtop`返回顶部属性和插槽 ([37ce9aa](https://gitee.com/mach552/savor-ui/commits/37ce9aa92a9b6d756ce5085fda0fd2552191a9c6))
|
|
29
|
+
* **select:** 新增多选模式 ([325a62c](https://gitee.com/mach552/savor-ui/commits/325a62c3e0a54e9fdbba00fbf0177ecdfc00f6a5))
|
|
30
|
+
* **space:** 新增`wrap`换行属性 ([b046416](https://gitee.com/mach552/savor-ui/commits/b0464167d9db73ede45f1fa59e26b723107d1620))
|
|
31
|
+
|
|
5
32
|
# [0.2.0](https://gitee.com/mach552/savor-ui/compare/v0.1.0...v0.2.0) (2026-05-22)
|
|
6
33
|
|
|
7
34
|
|
|
@@ -7,11 +7,11 @@ import "./src/popover/index.mjs";
|
|
|
7
7
|
import "./src/tooltip/index.mjs";
|
|
8
8
|
import "./src/form/index.mjs";
|
|
9
9
|
import "./src/input/index.mjs";
|
|
10
|
+
import "./src/button/types.mjs";
|
|
11
|
+
import "./src/back-top/index.mjs";
|
|
10
12
|
import "./src/scrollbar/index.mjs";
|
|
11
13
|
import "./src/auto-complete/index.mjs";
|
|
12
14
|
import "./src/avatar/index.mjs";
|
|
13
|
-
import "./src/button/types.mjs";
|
|
14
|
-
import "./src/back-top/index.mjs";
|
|
15
15
|
import "./src/badge/index.mjs";
|
|
16
16
|
import "./src/button/index.mjs";
|
|
17
17
|
import "./src/card/index.mjs";
|
|
@@ -23,6 +23,7 @@ import "./src/collapse/types.mjs";
|
|
|
23
23
|
import "./src/collapse/index.mjs";
|
|
24
24
|
import "./src/empty/index.mjs";
|
|
25
25
|
import "./src/icon/index.mjs";
|
|
26
|
+
import "./src/tag/index.mjs";
|
|
26
27
|
import "./src/select/index.mjs";
|
|
27
28
|
import "./src/color-picker/index.mjs";
|
|
28
29
|
import "./src/date-picker/index.mjs";
|
|
@@ -65,7 +66,6 @@ import "./src/switch/index.mjs";
|
|
|
65
66
|
import "./src/table/index.mjs";
|
|
66
67
|
import "./src/tabs/types.mjs";
|
|
67
68
|
import "./src/tabs/index.mjs";
|
|
68
|
-
import "./src/tag/index.mjs";
|
|
69
69
|
import "./src/text/index.mjs";
|
|
70
70
|
import "./src/textarea/index.mjs";
|
|
71
71
|
import "./src/timeline/types.mjs";
|
package/dist/es/components/src/anchor/anchor.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -38,39 +38,45 @@ var x = _("<div><div><span></div><div>", !0), S = /* @__PURE__ */ o({
|
|
|
38
38
|
e && !E.value.includes(e) && E.value.push(e);
|
|
39
39
|
}, I = (e) => {
|
|
40
40
|
E.value = E.value.filter((t) => t !== e);
|
|
41
|
-
}, L = (e) => {
|
|
42
|
-
R(e), O.value && window.history.replaceState(
|
|
43
|
-
|
|
41
|
+
}, L = !1, R = null, z = (e) => {
|
|
42
|
+
L = !0, R && clearTimeout(R), H(e), O.value && window.history.replaceState({ ...window.history.state }, "", e), T.value = e, C("change", e), R = setTimeout(() => {
|
|
43
|
+
L = !1, G();
|
|
44
|
+
}, 3e3);
|
|
45
|
+
}, B = null, V = null, H = (e) => {
|
|
44
46
|
let t = e.replace(/^#/, ""), n = document.getElementById(t);
|
|
45
47
|
if (!n) return;
|
|
46
48
|
let r = M || document.documentElement, i = r === document.documentElement ? { top: 0 } : r.getBoundingClientRect(), a = n.getBoundingClientRect().top - i.top, o = (r === document.documentElement ? window.scrollY : r.scrollTop) + a - S.offsetTop, s = k.value ? "smooth" : "instant";
|
|
47
|
-
|
|
49
|
+
B = o, V && clearTimeout(V), r === document.documentElement ? window.scrollTo({
|
|
48
50
|
top: o,
|
|
49
51
|
behavior: s
|
|
50
52
|
}) : r.scrollTo({
|
|
51
53
|
top: o,
|
|
52
54
|
behavior: s
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
55
|
+
}), V = setTimeout(() => {
|
|
56
|
+
B = null;
|
|
57
|
+
}, 5e3);
|
|
58
|
+
}, U = null, W = () => {
|
|
59
|
+
if (B !== null) {
|
|
60
|
+
let e = M === document.documentElement ? window.scrollY : M.scrollTop;
|
|
61
|
+
if (Math.abs(e - B) <= 5) B = null, V &&= (clearTimeout(V), null);
|
|
62
|
+
else return;
|
|
63
|
+
}
|
|
64
|
+
L || (U && cancelAnimationFrame(U), U = requestAnimationFrame(() => {
|
|
65
|
+
U = null, G();
|
|
66
|
+
}));
|
|
67
|
+
}, G = () => {
|
|
68
|
+
let e = "";
|
|
69
|
+
for (let t = E.value.length - 1; t >= 0; t--) {
|
|
70
|
+
let n = E.value[t], r = n.replace(/^#/, ""), i = document.getElementById(r);
|
|
71
|
+
if (!i) continue;
|
|
72
|
+
let a = i.getBoundingClientRect();
|
|
73
|
+
if (a.top <= S.offsetTop + 5 && a.top > -(S.offsetTop + 5)) {
|
|
74
|
+
e = n;
|
|
69
75
|
break;
|
|
70
76
|
}
|
|
71
77
|
}
|
|
72
|
-
|
|
73
|
-
},
|
|
78
|
+
e && e !== T.value && (T.value = e, C("change", e));
|
|
79
|
+
}, K = () => {
|
|
74
80
|
c(() => {
|
|
75
81
|
let e = document.querySelector(`.${w.b()}`);
|
|
76
82
|
if (!e) return;
|
|
@@ -80,11 +86,16 @@ var x = _("<div><div><span></div><div>", !0), S = /* @__PURE__ */ o({
|
|
|
80
86
|
D.value = r.top - n.top + r.height / 2;
|
|
81
87
|
}
|
|
82
88
|
});
|
|
83
|
-
}
|
|
89
|
+
};
|
|
84
90
|
b(T, () => {
|
|
85
|
-
|
|
91
|
+
K();
|
|
86
92
|
}), b(E, () => {
|
|
87
|
-
|
|
93
|
+
let e = window.location.hash;
|
|
94
|
+
c(e ? () => {
|
|
95
|
+
T.value = e, H(e);
|
|
96
|
+
} : () => {
|
|
97
|
+
T.value = "", G();
|
|
98
|
+
});
|
|
88
99
|
}, { deep: !0 }), d(t, {
|
|
89
100
|
activeHash: T,
|
|
90
101
|
changeHash: O,
|
|
@@ -92,24 +103,24 @@ var x = _("<div><div><span></div><div>", !0), S = /* @__PURE__ */ o({
|
|
|
92
103
|
offsetTop: A,
|
|
93
104
|
registerLink: F,
|
|
94
105
|
unregisterLink: I,
|
|
95
|
-
handleLinkClick:
|
|
106
|
+
handleLinkClick: z,
|
|
96
107
|
scrollContainer: j
|
|
97
108
|
}), l(() => {
|
|
98
109
|
P();
|
|
99
110
|
let e = window.location.hash;
|
|
100
|
-
e
|
|
101
|
-
T.value = e,
|
|
102
|
-
}), j.value.addEventListener("scroll",
|
|
111
|
+
c(e ? () => {
|
|
112
|
+
T.value = e, H(e);
|
|
113
|
+
} : G), j.value.addEventListener("scroll", W);
|
|
103
114
|
}), u(() => {
|
|
104
|
-
j.value.removeEventListener("scroll",
|
|
115
|
+
j.value.removeEventListener("scroll", W), V && clearTimeout(V), U && cancelAnimationFrame(U), R && clearTimeout(R);
|
|
105
116
|
}), b(() => S.scrollContainer, () => {
|
|
106
|
-
j.value.removeEventListener("scroll",
|
|
117
|
+
j.value.removeEventListener("scroll", W), P(), j.value.addEventListener("scroll", W);
|
|
107
118
|
});
|
|
108
|
-
let
|
|
109
|
-
return n(
|
|
119
|
+
let q = x(), J = r(q), Y = r(J), X = s(J, 1);
|
|
120
|
+
return n(Y, () => T.value), p(() => {
|
|
110
121
|
let e = y(w);
|
|
111
|
-
m(
|
|
112
|
-
}), h(
|
|
122
|
+
m(q, [e.b(), { [e.m("line-less")]: o.lineLess }]), m(J, e.e("ink")), m(Y, [e.e("ink-ball")]), g(Y, N.value), m(X, e.e("list"));
|
|
123
|
+
}), h(X, null, 0), a("default", null), q;
|
|
113
124
|
}
|
|
114
125
|
});
|
|
115
126
|
//#endregion
|
package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
|
-
import { useRipple as t } from "../../../hooks/src/use-ripple.mjs";
|
|
3
2
|
import "../../../hooks/index.mjs";
|
|
4
|
-
import
|
|
3
|
+
import t from "../../../icons/src/loading.vue.mjs";
|
|
5
4
|
import "../../../icons/index.mjs";
|
|
6
|
-
import { buttonGroupContextKey as
|
|
7
|
-
import { computed as
|
|
5
|
+
import { buttonGroupContextKey as n } from "./types.mjs";
|
|
6
|
+
import { computed as r, createComponent as i, createDynamicComponent as a, createIf as o, createSlot as s, defineVaporComponent as c, inject as l, renderEffect as u, setAttr as d, setClass as f, setInsertionState as p, setProp as m, setText as h, template as g, toDisplayString as _, unref as v } from "vue";
|
|
8
7
|
//#region ../components/src/button/button.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
9
|
-
var
|
|
8
|
+
var y = g("<div>"), b = g(" "), x = g("<button>", !0), S = /* @__PURE__ */ c({
|
|
10
9
|
name: "SButton",
|
|
11
10
|
__name: "button",
|
|
12
11
|
props: {
|
|
@@ -24,36 +23,34 @@ var S = v("<div>"), C = v(" "), w = v("<button>", !0), T = /* @__PURE__ */ u({
|
|
|
24
23
|
secondary: { type: Boolean }
|
|
25
24
|
},
|
|
26
25
|
__multiRoot: !1,
|
|
27
|
-
setup(
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
let e = b(E), t = u.disabled, n = u.loading;
|
|
33
|
-
m(j, [
|
|
26
|
+
setup(c, { slots: g }) {
|
|
27
|
+
let S = c, C = e("button"), w = l(n, void 0), T = r(() => w?.size?.value || S.size), E = x();
|
|
28
|
+
return u(() => {
|
|
29
|
+
let e = v(C), t = c.disabled, n = c.loading;
|
|
30
|
+
f(E, [
|
|
34
31
|
e.b(),
|
|
35
|
-
e.m(
|
|
36
|
-
e.m(
|
|
37
|
-
e.is("circle",
|
|
38
|
-
e.is("block",
|
|
39
|
-
e.is("text",
|
|
40
|
-
e.is("secondary",
|
|
41
|
-
e.is("link",
|
|
32
|
+
e.m(c.type),
|
|
33
|
+
e.m(T.value),
|
|
34
|
+
e.is("circle", c.circle),
|
|
35
|
+
e.is("block", c.block),
|
|
36
|
+
e.is("text", c.text),
|
|
37
|
+
e.is("secondary", c.secondary),
|
|
38
|
+
e.is("link", c.link),
|
|
42
39
|
e.is("disabled", t),
|
|
43
40
|
e.is("loading", n),
|
|
44
|
-
e.is("only-icon", !
|
|
45
|
-
]),
|
|
46
|
-
}),
|
|
47
|
-
let e =
|
|
48
|
-
return
|
|
49
|
-
}, () =>
|
|
50
|
-
let e =
|
|
51
|
-
return
|
|
52
|
-
}, null, 1), 5, null, 0),
|
|
53
|
-
let e =
|
|
54
|
-
return
|
|
55
|
-
}),
|
|
41
|
+
e.is("only-icon", !g.default && !c.label)
|
|
42
|
+
]), m(E, "disabled", t || n), d(E, "html-type", c.htmlType);
|
|
43
|
+
}), p(E, null, 0), o(() => (g.icon || c.icon) && !c.loading, () => {
|
|
44
|
+
let e = y();
|
|
45
|
+
return u(() => f(e, [v(C).e("icon")])), p(e, null, 0), s("icon", null, () => a(() => c.icon)), e;
|
|
46
|
+
}, () => o(() => c.loading, () => {
|
|
47
|
+
let e = y();
|
|
48
|
+
return u(() => f(e, [v(C).e("icon")])), p(e, null, 0), i(v(t)), e;
|
|
49
|
+
}, null, 1), 5, null, 0), p(E, null, 1), s("default", null, () => {
|
|
50
|
+
let e = b();
|
|
51
|
+
return u(() => h(e, _(c.label))), e;
|
|
52
|
+
}), E;
|
|
56
53
|
}
|
|
57
54
|
});
|
|
58
55
|
//#endregion
|
|
59
|
-
export {
|
|
56
|
+
export { S as default };
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
|
-
import { useRipple as t } from "../../../hooks/src/use-ripple.mjs";
|
|
3
2
|
import "../../../hooks/index.mjs";
|
|
4
|
-
import { useFormItem as
|
|
5
|
-
import { SPopover as
|
|
6
|
-
import { SInput as
|
|
7
|
-
import { SSelect as
|
|
8
|
-
import { child as
|
|
3
|
+
import { useFormItem as t } from "../form/use-form-item.mjs";
|
|
4
|
+
import { SPopover as n } from "../popover/index.mjs";
|
|
5
|
+
import { SInput as r } from "../input/index.mjs";
|
|
6
|
+
import { SSelect as i } from "../select/index.mjs";
|
|
7
|
+
import { child as a, computed as o, createComponent as s, createFor as c, createIf as l, createInvoker as u, createTemplateRefSetter as d, defineVaporComponent as f, delegateEvents as p, mergeModels as m, next as h, onMounted as g, onUnmounted 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, toRefs as E, txt as ee, unref as D, useModel as te, useTemplateRef as ne, watch as O, withModifiers as re, withVaporCtx as ie } from "vue";
|
|
9
8
|
//#region ../components/src/color-picker/color-picker.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var
|
|
9
|
+
var k = w("<div> "), A = w("<div><div></div></div>"), ae = w("<div><div><div></div></div><div></div>"), oe = w("<div>"), se = w("<div><div>预设颜色</div><div>"), ce = w("<div><div><div><div></div><div></div></div><div><div><div><div><div></div></div><div></div></div></div><div><div></div></div></div><div></div>"), le = w("<div>", !0);
|
|
10
|
+
p("mousedown", "click");
|
|
11
|
+
var j = /* @__PURE__ */ f({
|
|
13
12
|
name: "SColorPicker",
|
|
14
13
|
__name: "color-picker",
|
|
15
|
-
props: /* @__PURE__ */
|
|
14
|
+
props: /* @__PURE__ */ m({
|
|
16
15
|
modelValue: {},
|
|
17
16
|
format: { default: "hex" },
|
|
18
17
|
popoverProps: {},
|
|
@@ -27,26 +26,24 @@ var A = /* @__PURE__ */ p({
|
|
|
27
26
|
modelValue: { default: "#3867D6" },
|
|
28
27
|
modelModifiers: {}
|
|
29
28
|
}),
|
|
30
|
-
emits: /* @__PURE__ */
|
|
29
|
+
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
31
30
|
__multiRoot: !1,
|
|
32
|
-
setup(
|
|
33
|
-
let
|
|
34
|
-
size:
|
|
35
|
-
error:
|
|
36
|
-
}),
|
|
37
|
-
t(M);
|
|
38
|
-
let N = O("popoverRef"), P = y(!1), F = (e) => {
|
|
31
|
+
setup(f, { emit: p }) {
|
|
32
|
+
let m = f, w = p, j = e("color-picker"), M = te(f, "modelValue"), { size: ue, error: de } = E(m), { mergedSize: fe, mergedError: pe } = t({
|
|
33
|
+
size: ue,
|
|
34
|
+
error: de
|
|
35
|
+
}), N = ne("popoverRef"), P = v(!1), F = (e) => {
|
|
39
36
|
e ? N.value?.show() : N.value?.hide(), P.value = e;
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
},
|
|
37
|
+
}, me = () => {
|
|
38
|
+
m.disabled || (P.value ? F(!1) : F(!0));
|
|
39
|
+
}, he = () => {
|
|
43
40
|
F(!1);
|
|
44
|
-
}, I =
|
|
41
|
+
}, I = v(m.format), L = v({
|
|
45
42
|
h: 220,
|
|
46
43
|
s: .77,
|
|
47
44
|
v: .84,
|
|
48
45
|
a: 1
|
|
49
|
-
}), R =
|
|
46
|
+
}), R = v(), z = v(), B = v(), V = v(!1), H = v(null), ge = o(() => m.presetColors && m.presetColors.length > 0 ? m.presetColors : [
|
|
50
47
|
"#3867D6",
|
|
51
48
|
"#20BF6B",
|
|
52
49
|
"#FA8231",
|
|
@@ -57,7 +54,7 @@ var A = /* @__PURE__ */ p({
|
|
|
57
54
|
"#F5319D",
|
|
58
55
|
"#D91AD9",
|
|
59
56
|
"#722ED1"
|
|
60
|
-
]),
|
|
57
|
+
]), _e = (e, t, n) => {
|
|
61
58
|
let r = 0, i = 0, a = 0, o = Math.floor(e / 60), s = e / 60 - o, c = n * (1 - t), l = n * (1 - s * t), u = n * (1 - (1 - s) * t);
|
|
62
59
|
switch (o % 6) {
|
|
63
60
|
case 0:
|
|
@@ -84,11 +81,11 @@ var A = /* @__PURE__ */ p({
|
|
|
84
81
|
g: Math.round(i * 255),
|
|
85
82
|
b: Math.round(a * 255)
|
|
86
83
|
};
|
|
87
|
-
},
|
|
84
|
+
}, ve = (e, t, n) => `#${[
|
|
88
85
|
e,
|
|
89
86
|
t,
|
|
90
87
|
n
|
|
91
|
-
].map((e) => e.toString(16).padStart(2, "0")).join("").toUpperCase()}`,
|
|
88
|
+
].map((e) => e.toString(16).padStart(2, "0")).join("").toUpperCase()}`, ye = (e) => (e = e.replace("#", ""), e.length === 3 && (e = e.split("").map((e) => e + e).join("")), e.length === 6 ? {
|
|
92
89
|
r: parseInt(e.slice(0, 2), 16) || 0,
|
|
93
90
|
g: parseInt(e.slice(2, 4), 16) || 0,
|
|
94
91
|
b: parseInt(e.slice(4, 6), 16) || 0
|
|
@@ -118,16 +115,16 @@ var A = /* @__PURE__ */ p({
|
|
|
118
115
|
s: o,
|
|
119
116
|
v: s
|
|
120
117
|
};
|
|
121
|
-
}, W =
|
|
118
|
+
}, W = o(() => _e(L.value.h, L.value.s, L.value.v)), G = o(() => {
|
|
122
119
|
let { r: e, g: t, b: n } = W.value;
|
|
123
120
|
return `rgba(${e},${t},${n},${L.value.a})`;
|
|
124
|
-
}),
|
|
121
|
+
}), be = o(() => {
|
|
125
122
|
let { r: e, g: t, b: n } = W.value;
|
|
126
|
-
return I.value === "hex" ?
|
|
123
|
+
return I.value === "hex" ? ve(e, t, n) : L.value.a === 1 ? `rgb(${e},${t},${n})` : `rgba(${e},${t},${n},${Math.round(L.value.a * 10) / 10})`;
|
|
127
124
|
}), K = (e) => {
|
|
128
125
|
try {
|
|
129
126
|
if (e.startsWith("#")) {
|
|
130
|
-
let t =
|
|
127
|
+
let t = ye(e), n = {
|
|
131
128
|
...U(t.r, t.g, t.b),
|
|
132
129
|
a: L.value.a
|
|
133
130
|
};
|
|
@@ -157,19 +154,19 @@ var A = /* @__PURE__ */ p({
|
|
|
157
154
|
if (!R.value) return;
|
|
158
155
|
let t = R.value.getBoundingClientRect(), n = q(e.clientX - t.left, 0, t.width), r = q(e.clientY - t.top, 0, t.height);
|
|
159
156
|
L.value.s = n / t.width, L.value.v = 1 - r / t.height;
|
|
160
|
-
},
|
|
157
|
+
}, xe = (e) => {
|
|
161
158
|
e.preventDefault(), V.value = !0, H.value = "panel", J(e);
|
|
162
|
-
},
|
|
159
|
+
}, Se = (e) => {
|
|
163
160
|
J(e);
|
|
164
|
-
},
|
|
161
|
+
}, Ce = (e) => {
|
|
165
162
|
e.preventDefault(), V.value = !0, H.value = "hue";
|
|
166
|
-
},
|
|
163
|
+
}, we = (e) => {
|
|
167
164
|
if (!z.value) return;
|
|
168
165
|
let t = z.value.getBoundingClientRect(), n = q(e.clientX - t.left, 0, t.width);
|
|
169
166
|
L.value.h = q(n / t.width * 360, 0, 360);
|
|
170
|
-
}, De = (e) => {
|
|
171
|
-
e.preventDefault(), V.value = !0, H.value = "alpha";
|
|
172
167
|
}, Y = (e) => {
|
|
168
|
+
e.preventDefault(), V.value = !0, H.value = "alpha";
|
|
169
|
+
}, Te = (e) => {
|
|
173
170
|
if (!B.value) return;
|
|
174
171
|
let t = B.value.getBoundingClientRect(), n = q(e.clientX - t.left, 0, t.width);
|
|
175
172
|
L.value.a = q(n / t.width, 0, 1);
|
|
@@ -186,57 +183,57 @@ var A = /* @__PURE__ */ p({
|
|
|
186
183
|
}
|
|
187
184
|
}, Z = () => {
|
|
188
185
|
V.value = !1, H.value = null;
|
|
189
|
-
},
|
|
186
|
+
}, Ee = (e) => {
|
|
190
187
|
K(e);
|
|
191
188
|
};
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}),
|
|
189
|
+
O(be, (e) => {
|
|
190
|
+
M.value = e, w("change", e);
|
|
191
|
+
}), O(M, (e) => {
|
|
195
192
|
K(e);
|
|
196
|
-
}, { immediate: !0 }),
|
|
193
|
+
}, { immediate: !0 }), g(() => {
|
|
197
194
|
document.addEventListener("mousemove", X), document.addEventListener("mouseup", Z);
|
|
198
|
-
}),
|
|
195
|
+
}), _(() => {
|
|
199
196
|
document.removeEventListener("mousemove", X), document.removeEventListener("mouseup", Z);
|
|
200
197
|
});
|
|
201
|
-
let Q =
|
|
202
|
-
return
|
|
203
|
-
let e = D(
|
|
204
|
-
|
|
198
|
+
let Q = d(), $ = le();
|
|
199
|
+
return y(() => {
|
|
200
|
+
let e = D(j);
|
|
201
|
+
b($, [
|
|
205
202
|
e.b(),
|
|
206
|
-
e.m(D(
|
|
207
|
-
e.is("error", D(
|
|
203
|
+
e.m(D(fe)),
|
|
204
|
+
e.is("error", D(pe))
|
|
208
205
|
]);
|
|
209
|
-
}),
|
|
206
|
+
}), x($, null, 0), Q(s(D(n), { $: [() => ({
|
|
210
207
|
offset: [0, 4],
|
|
211
208
|
placement: "bottom-start",
|
|
212
209
|
width: "sameWidth",
|
|
213
210
|
manual: !0,
|
|
214
|
-
...
|
|
215
|
-
}), { onClickOutside: () =>
|
|
211
|
+
...f.popoverProps
|
|
212
|
+
}), { onClickOutside: () => he }] }, {
|
|
216
213
|
content: ie(() => {
|
|
217
|
-
let e =
|
|
218
|
-
return n.$evtmousedown =
|
|
219
|
-
let
|
|
220
|
-
|
|
221
|
-
left: `${
|
|
222
|
-
top: `${(1 -
|
|
223
|
-
}),
|
|
224
|
-
left: `${
|
|
225
|
-
color:
|
|
214
|
+
let e = ce(), t = a(e), n = a(t), o = a(n), d = h(o, 1), p = h(n, 1), m = a(p), g = a(m), _ = a(g), v = a(_), C = h(_, 1), w = h(m, 1), T = a(w), E = h(p, 2);
|
|
215
|
+
return n.$evtmousedown = u(xe), n.$evtclick = u(Se), Q(n, R, null, "panelRef"), _.$evtclick = u(we), Q(_, z, null, "hueSliderRef"), C.$evtmousedown = u(Ce), y(() => {
|
|
216
|
+
let r = D(j), i = L.value, a = i.h;
|
|
217
|
+
b(e, [r.e("wrapper")]), b(t, [r.e("content")]), b(n, [r.e("panel")]), b(o, [r.e("panel-bg")]), S(o, { background: `linear-gradient(to right, #fff, hsl(${a}deg 100% 50%))` }), b(d, [r.e("panel-thumb")]), S(d, {
|
|
218
|
+
left: `${i.s * 100}%`,
|
|
219
|
+
top: `${(1 - i.v) * 100}%`
|
|
220
|
+
}), b(p, [r.e("control")]), b(m, [r.e("control-item")]), b(g, [r.e("control-wrapper")]), b(_, [r.e("control-track")]), b(v, [r.e("control-hue")]), b(C, [r.e("control-thumb")]), S(C, {
|
|
221
|
+
left: `${a / 3.6}%`,
|
|
222
|
+
color: M.value
|
|
226
223
|
});
|
|
227
|
-
}),
|
|
228
|
-
let e =
|
|
229
|
-
return t.$evtclick =
|
|
230
|
-
let i = D(
|
|
231
|
-
|
|
224
|
+
}), x(m, null, 1), l(() => !f.disabledAlpha, () => {
|
|
225
|
+
let e = ae(), t = a(e), n = a(t), r = h(t, 1);
|
|
226
|
+
return t.$evtclick = u(Te), Q(t, B, null, "alphaSliderRef"), r.$evtmousedown = u(Y), y(() => {
|
|
227
|
+
let i = D(j);
|
|
228
|
+
b(e, [i.e("control-wrapper")]), b(t, [i.e("control-track")]), b(n, [i.e("control-alpha")]), S(n, { color: G.value }), b(r, [i.e("control-thumb")]), S(r, {
|
|
232
229
|
left: `${L.value.a * 100}%`,
|
|
233
|
-
color:
|
|
230
|
+
color: M.value
|
|
234
231
|
});
|
|
235
232
|
}), e;
|
|
236
|
-
}, null, 1),
|
|
237
|
-
let e = D(
|
|
238
|
-
|
|
239
|
-
}),
|
|
233
|
+
}, null, 1), y(() => {
|
|
234
|
+
let e = D(j);
|
|
235
|
+
b(w, [e.e("control-preview")]), b(T, [e.e("control-preview-color")]), S(T, { background: G.value }), b(E, [e.e("input")]);
|
|
236
|
+
}), x(E, null, 0), s(D(i), {
|
|
240
237
|
modelValue: () => I.value,
|
|
241
238
|
"onUpdate:modelValue": () => (e) => I.value = e,
|
|
242
239
|
style: () => ({ width: "100px" }),
|
|
@@ -248,38 +245,38 @@ var A = /* @__PURE__ */ p({
|
|
|
248
245
|
label: "RGB",
|
|
249
246
|
value: "rgb"
|
|
250
247
|
}]
|
|
251
|
-
}),
|
|
248
|
+
}), x(E, null, 1), s(D(r), {
|
|
252
249
|
size: () => "mini",
|
|
253
250
|
style: () => ({ flex: "1" }),
|
|
254
|
-
modelValue: () =>
|
|
255
|
-
"onUpdate:modelValue": () => (e) =>
|
|
256
|
-
}),
|
|
257
|
-
let e =
|
|
258
|
-
return
|
|
259
|
-
let r = D(
|
|
260
|
-
|
|
261
|
-
}),
|
|
262
|
-
let t =
|
|
263
|
-
return t.$evtclick =
|
|
264
|
-
|
|
251
|
+
modelValue: () => M.value,
|
|
252
|
+
"onUpdate:modelValue": () => (e) => M.value = e
|
|
253
|
+
}), x(t, null, 3), l(() => f.showPreset, () => {
|
|
254
|
+
let e = se(), t = a(e), n = h(t, 1);
|
|
255
|
+
return y(() => {
|
|
256
|
+
let r = D(j);
|
|
257
|
+
b(e, [r.e("presets")]), b(t, [r.e("presets-title")]), b(n, [r.e("presets-list")]);
|
|
258
|
+
}), x(n, null, 0), c(() => ge.value, (e) => {
|
|
259
|
+
let t = oe();
|
|
260
|
+
return t.$evtclick = u(() => Ee(e.value)), y(() => {
|
|
261
|
+
b(t, [[D(j).e("presets-item")], "item"]), S(t, { background: e.value });
|
|
265
262
|
}), t;
|
|
266
263
|
}, (e) => e, 1), e;
|
|
267
|
-
}, null, 1), e.$evtmousedown =
|
|
264
|
+
}, null, 1), e.$evtmousedown = u(re(() => {}, ["prevent"])), e;
|
|
268
265
|
}),
|
|
269
266
|
default: () => {
|
|
270
|
-
let e =
|
|
271
|
-
return
|
|
272
|
-
let n = D(
|
|
273
|
-
|
|
274
|
-
}),
|
|
275
|
-
let e =
|
|
276
|
-
return
|
|
277
|
-
|
|
267
|
+
let e = A(), t = a(e);
|
|
268
|
+
return y(() => {
|
|
269
|
+
let n = D(j);
|
|
270
|
+
b(e, [n.e("trigger"), n.is("disabled", f.disabled)]), b(t, [n.e("preview")]), S(t, { backgroundColor: M.value });
|
|
271
|
+
}), x(e, null, 1), l(() => f.showText, () => {
|
|
272
|
+
let e = k(), t = ee(e);
|
|
273
|
+
return y(() => {
|
|
274
|
+
b(e, [D(j).e("value")]), C(t, T(M.value));
|
|
278
275
|
}), e;
|
|
279
|
-
}, null, 1),
|
|
276
|
+
}, null, 1), e;
|
|
280
277
|
}
|
|
281
|
-
}), N, null, "popoverRef"), $.$evtclick =
|
|
278
|
+
}), N, null, "popoverRef"), $.$evtclick = u(me), $;
|
|
282
279
|
}
|
|
283
280
|
});
|
|
284
281
|
//#endregion
|
|
285
|
-
export {
|
|
282
|
+
export { j as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigProviderSlots, ConfigProviderTheme } from './types';
|
|
1
|
+
import { ConfigProviderSlots, ConfigProviderTheme } from './types.js';
|
|
2
2
|
import { PublicProps, VNode, Plugin } from 'vue';
|
|
3
3
|
export declare const SConfigProvider: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
4
4
|
attrs: any;
|
|
@@ -18,4 +18,4 @@ export declare const SConfigProvider: ((__VLS_props: NonNullable<Awaited<typeof
|
|
|
18
18
|
}>) => VNode & {
|
|
19
19
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
20
20
|
}) & Plugin;
|
|
21
|
-
export * from './types';
|
|
21
|
+
export * from './types.js';
|
package/dist/es/components/src/drawer/drawer.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -6,8 +6,8 @@ import { useZIndex as r } from "../../../hooks/src/use-zIndex.mjs";
|
|
|
6
6
|
import "../../../hooks/index.mjs";
|
|
7
7
|
import i from "../../../icons/src/close.vue.mjs";
|
|
8
8
|
import "../../../icons/index.mjs";
|
|
9
|
-
import a from "../
|
|
10
|
-
import ee from "../
|
|
9
|
+
import a from "../button/button.vue.mjs";
|
|
10
|
+
import ee from "../scrollbar/scrollbar.vue.mjs";
|
|
11
11
|
import o from "../_comp/OpacityTransition.vue.mjs";
|
|
12
12
|
import s from "../_comp/SideTransition.vue.mjs";
|
|
13
13
|
import { VaporTeleport as te, 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 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 ae, txt as oe, unref as D, useModel as se, watch as O, withVaporCtx as k } from "vue";
|
|
@@ -176,12 +176,12 @@ var N = /* @__PURE__ */ g({
|
|
|
176
176
|
return S(() => {
|
|
177
177
|
C(e, [D(N).e("title")]), ie(t, ae(g.header));
|
|
178
178
|
}), e;
|
|
179
|
-
}), w(n, null, 1), f(() => g.closable, () => d(
|
|
179
|
+
}), w(n, null, 1), f(() => g.closable, () => d(a, {
|
|
180
180
|
circle: () => "",
|
|
181
181
|
text: () => "",
|
|
182
182
|
size: () => "small",
|
|
183
183
|
onClick: () => G
|
|
184
|
-
}, { icon: k(() => d(D(i))) }), null, 1), S(() => C(r, [D(N).e("body")])), w(r, null, 0), f(() => g.bodyScroll, () => d(
|
|
184
|
+
}, { icon: k(() => d(D(i))) }), null, 1), S(() => C(r, [D(N).e("body")])), w(r, null, 0), f(() => g.bodyScroll, () => d(ee, { $: [() => ({ ...g.scrollbarProps })] }, { default: k(() => {
|
|
185
185
|
let e = A();
|
|
186
186
|
return S(() => C(e, [D(N).e("content")])), w(e, null, 0), m("default", null), e;
|
|
187
187
|
}) }), () => {
|