savor-ui 0.23.0 → 0.23.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 CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
 
4
4
 
5
+ ## [0.23.1](https://gitee.com/mach552/savor-ui/compare/v0.23.0...v0.23.1) (2026-08-19)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **form:** 恢复必填星号为图标 ([f0bda18](https://gitee.com/mach552/savor-ui/commits/f0bda1848a5f6e52cfc2747dcc36b16b04dd00ac))
11
+ * **icon-select:** 修复搜索框无法输入的问题 ([69de908](https://gitee.com/mach552/savor-ui/commits/69de908dd8d165a27abeec04134b0ab76a738fb5))
12
+ * **message:** 修复图标失效问题 ([567bb51](https://gitee.com/mach552/savor-ui/commits/567bb51daadb3c6302d0592bab5b867a0c170a1e))
13
+
5
14
  # [0.23.0](https://gitee.com/mach552/savor-ui/compare/v0.22.0...v0.23.0) (2026-08-18)
6
15
 
7
16
 
@@ -2,13 +2,14 @@ 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 { QuestionLine as n } from "../../../icons/src/svg/system/index.mjs";
6
- import { formContextKey as r, formItemContextKey as i, formItemStatusContextKey as a } from "./types.mjs";
7
- import { STooltip as o } from "../tooltip/index.mjs";
8
- import { child as s, computed as c, createComponent as l, createIf as u, createSlot as d, defineVaporComponent as f, inject as p, onMounted as m, onUnmounted as h, provide as g, ref as ee, renderEffect as _, setClass as v, setInsertionState as y, setStyle as b, setText as x, template as S, toDisplayString as C, txt as w, unref as T } from "vue";
9
- import E from "async-validator";
5
+ import { AsteriskLine as n } from "../../../icons/src/svg/editor/index.mjs";
6
+ import { QuestionLine as r } from "../../../icons/src/svg/system/index.mjs";
7
+ import { formContextKey as i, formItemContextKey as a, formItemStatusContextKey as o } from "./types.mjs";
8
+ import { STooltip as s } from "../tooltip/index.mjs";
9
+ 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";
10
+ import O from "async-validator";
10
11
  //#region ../components/src/form/form-item.vue?vue&type=script&setup=true&vapor=true&lang.ts
11
- var D = S("<span>*"), O = S(" "), k = S("<span>"), A = S("<div><label>"), j = S("<div> "), M = S("<div><div><div></div>", 1), N = /*@__PURE__*/ f({
12
+ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("<div><div><div></div>", 1), P = /*@__PURE__*/ p({
12
13
  name: "SFormItem",
13
14
  __name: "form-item",
14
15
  props: {
@@ -25,25 +26,25 @@ var D = S("<span>*"), O = S(" "), k = S("<span>"), A = S("<div><label>"), j = S(
25
26
  },
26
27
  requiredAlign: {}
27
28
  },
28
- setup(f, { expose: S }) {
29
- let N = f, P = t("form-item"), F = p(r), I = c(() => N.labelPosition ? N.labelPosition : F?.labelPosition?.value ? F?.labelPosition?.value : "left"), L = c(() => F?.labelPosition?.value === "top" ? "" : N.labelWidth || F?.labelWidth?.value), R = c(() => N.labelAlign ? N.labelAlign : F?.labelAlign?.value ? F?.labelAlign?.value : F?.labelPosition?.value === "top" ? "left" : "right"), z = null, B = c(() => {
30
- let e = F?.model?.value;
31
- return e && N.field && e[N.field] !== void 0 ? e[N.field] : null;
32
- }), V = c(() => {
33
- let e = F?.rules?.value;
34
- return e && N.field && e[N.field] ? e[N.field] : N.rules && N.rules.length > 0 ? N.rules : [];
35
- }), H = ee({
29
+ setup(p, { expose: w }) {
30
+ let P = p, F = t("form-item"), I = m(i), L = l(() => P.labelPosition ? P.labelPosition : I?.labelPosition?.value ? I?.labelPosition?.value : "left"), ee = 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(() => {
31
+ let e = I?.model?.value;
32
+ return e && P.field && e[P.field] !== void 0 ? e[P.field] : null;
33
+ }), V = l(() => {
34
+ let e = I?.rules?.value;
35
+ return e && P.field && e[P.field] ? e[P.field] : P.rules && P.rules.length > 0 ? P.rules : [];
36
+ }), H = v({
36
37
  state: "init",
37
38
  errorMsg: "",
38
39
  loading: !1
39
- }), U = (e) => V.value ? V.value.filter((t) => !t.trigger || !e ? !0 : t.trigger && t.trigger === e) : [], W = c(() => V.value.some((e) => e.required) && (N.showRequired || F?.showRequired?.value)), G = c(() => N.requiredAlign ? N.requiredAlign : F?.requiredAlign?.value ? F?.requiredAlign?.value : "left"), K = async (e) => {
40
- let t = N.field, n = U(e);
40
+ }), U = (e) => V.value ? V.value.filter((t) => !t.trigger || !e ? !0 : t.trigger && t.trigger === e) : [], W = l(() => V.value.some((e) => e.required) && (P.showRequired || I?.showRequired?.value)), G = l(() => P.requiredAlign ? P.requiredAlign : I?.requiredAlign?.value ? I?.requiredAlign?.value : "left"), K = async (e) => {
41
+ let t = P.field, n = U(e);
41
42
  if (n.length === 0) return !0;
42
43
  if (t) {
43
44
  let e = B.value, r = Array.isArray(e) ? "array" : e != null && typeof e != "string" ? typeof e : void 0, i = r ? n.map((e) => e.type ? e : {
44
45
  ...e,
45
46
  type: r
46
- }) : n, a = new E({ [t]: i });
47
+ }) : n, a = new O({ [t]: i });
47
48
  return H.value.loading = !0, a.validate({ [t]: e }).then(() => {
48
49
  H.value.state = "success", H.value.errorMsg = "";
49
50
  }).catch((e) => {
@@ -57,72 +58,72 @@ var D = S("<span>*"), O = S(" "), k = S("<span>"), A = S("<div><label>"), j = S(
57
58
  H.value.state = "init", H.value.errorMsg = "", H.value.loading = !1;
58
59
  }, J = () => {
59
60
  q();
60
- let e = F?.model?.value;
61
- e && N.field && (e[N.field] = z);
62
- }, Y = c(() => H.value.state === "error"), X = {
61
+ let e = I?.model?.value;
62
+ e && P.field && (e[P.field] = z);
63
+ }, Y = l(() => H.value.state === "error"), X = {
63
64
  validate: K,
64
- field: N.field,
65
+ field: P.field,
65
66
  resetField: J,
66
67
  clearValidate: q
67
68
  };
68
- g(i, X), g(a, {
69
- size: F?.size,
69
+ _(a, X), _(o, {
70
+ size: I?.size,
70
71
  error: Y
71
- }), m(() => {
72
- N.field && (F?.addField(X), z = F?.model?.value?.[N.field]);
73
72
  }), h(() => {
74
- N.field && F?.removeField(X);
75
- }), S({
73
+ P.field && (I?.addField(X), z = I?.model?.value?.[P.field]);
74
+ }), g(() => {
75
+ P.field && I?.removeField(X);
76
+ }), w({
76
77
  validate: K,
77
78
  resetField: J,
78
79
  clearValidate: q,
79
80
  validateStatus: H
80
81
  });
81
- let Z = M(), Q = s(Z, 1), $ = s(Q);
82
- return _(() => {
83
- let e = T(P), t = H.value, n = t.state;
84
- v(Z, [
82
+ let Z = N(), Q = c(Z, 1), $ = c(Q);
83
+ return y(() => {
84
+ let e = D(F), t = H.value, n = t.state;
85
+ b(Z, [
85
86
  e.b(),
86
87
  e.is("error", n === "error"),
87
88
  e.is("success", n === "success"),
88
89
  e.is("loading", t.loading),
89
- e.is("top", I.value === "top"),
90
- e.m(T(F)?.size?.value)
90
+ e.is("top", L.value === "top"),
91
+ e.m(D(I)?.size?.value)
91
92
  ]);
92
- }), y(Z, 0, 0), u(() => W.value || f.label || f.tooltip, () => {
93
- let t = A(), r = s(t);
94
- return _(() => {
95
- let n = T(P);
96
- v(t, [n.e("label-wrapper")]), v(r, [n.e("label"), n.m("align-" + R.value)]), b(r, { width: T(e)(L.value) });
97
- }), y(r, null, 0), u(() => G.value === "left", () => [u(() => W.value, () => {
98
- let e = D();
99
- return _(() => v(e, [T(P).e("required")])), e;
100
- }), d("label", { label: () => f.label }, () => {
101
- let e = O();
102
- return _(() => x(e, C(f.label))), e;
103
- })], () => u(() => G.value === "right", () => [d("label", { label: () => f.label }, () => {
104
- let e = O();
105
- return _(() => x(e, C(f.label))), e;
106
- }), u(() => W.value, () => {
107
- let e = D();
108
- return _(() => v(e, [T(P).e("required")])), e;
109
- })], null, 2), 518), y(r, null, 1), u(() => f.tooltip, () => l(T(o), {
110
- content: () => f.tooltip,
93
+ }), x(Z, 0, 0), d(() => W.value || p.label || p.tooltip, () => {
94
+ let t = j(), i = c(t);
95
+ return y(() => {
96
+ let n = D(F);
97
+ b(t, [n.e("label-wrapper")]), b(i, [n.e("label"), n.m("align-" + R.value)]), S(i, { width: D(e)(ee.value) });
98
+ }), x(i, null, 0), d(() => G.value === "left", () => [d(() => W.value, () => {
99
+ let e = k();
100
+ return y(() => b(e, [D(F).e("required")])), x(e, null, 0), u(D(n)), e;
101
+ }), f("label", { label: () => p.label }, () => {
102
+ let e = A();
103
+ return y(() => C(e, T(p.label))), e;
104
+ })], () => d(() => G.value === "right", () => [f("label", { label: () => p.label }, () => {
105
+ let e = A();
106
+ return y(() => C(e, T(p.label))), e;
107
+ }), d(() => W.value, () => {
108
+ let e = k();
109
+ return y(() => b(e, [D(F).e("required")])), x(e, null, 0), u(D(n)), e;
110
+ })], null, 2), 518), x(i, null, 1), d(() => p.tooltip, () => u(D(s), {
111
+ content: () => p.tooltip,
111
112
  mini: ""
112
113
  }, () => {
113
114
  let e = k();
114
- return _(() => v(e, [T(P).e("tooltip")])), y(e, null, 0), l(T(n)), e;
115
+ return y(() => b(e, [D(F).e("tooltip")])), x(e, null, 0), u(D(r)), e;
115
116
  })), t;
116
- }), _(() => {
117
- let e = T(P);
118
- v(Q, [e.e("content-wrapper")]), v($, [e.e("content")]);
119
- }), y($, null, 0), d("default", { validate: () => K }), y(Q, null, 1), u(() => H.value.state === "error", () => {
120
- let e = j(), t = w(e);
121
- return _(() => {
122
- v(e, [T(P).e("error-msg")]), x(t, C(H.value.errorMsg));
117
+ }), y(() => {
118
+ let e = D(F);
119
+ b(Q, [e.e("content-wrapper")]), b($, [e.e("content")]);
120
+ }), x($, null, 0), f("default", { validate: () => K }), x(Q, null, 1), d(() => H.value.state === "error", () => {
121
+ let e = M(), t = E(e);
122
+ return y(() => {
123
+ b(e, [D(F).e("error-msg")]), C(t, T(H.value.errorMsg));
123
124
  }), e;
124
125
  }), Z;
125
126
  }
126
127
  });
127
128
  //#endregion
128
- export { N as default };
129
+ export { P as default };
@@ -9,13 +9,13 @@ import "../config-provider/index.mjs";
9
9
  import { SPopover as te } from "../popover/index.mjs";
10
10
  import "../form/index.mjs";
11
11
  import { SInput as ne } from "../input/index.mjs";
12
- import { SScrollbar as re } from "../scrollbar/index.mjs";
13
- import { STabPane as ie, STabs as a } from "../tabs/index.mjs";
14
- import { child as o, computed as s, createComponent as c, createDynamicComponent as l, createFor as u, createIf as d, createInvoker as ae, defineVaporComponent as f, delegateEvents as p, inject as m, markRaw as oe, mergeModels as h, next as g, on as _, reactive as se, ref as v, renderEffect as y, setClass as b, setInsertionState as x, setProp as S, setStaticTemplateRef as ce, setText as C, setValue as le, template as w, toDisplayString as T, toRefs as E, txt as D, unref as O, useModel as ue, useTemplateRef as k, watch as A, withModifiers as j, withVaporModifiers as de } from "vue";
12
+ import { SScrollbar as a } from "../scrollbar/index.mjs";
13
+ import { STabPane as re, STabs as ie } from "../tabs/index.mjs";
14
+ import { child as o, computed as s, createComponent as c, createDynamicComponent as l, createFor as u, createIf as d, createInvoker as ae, defineVaporComponent as f, delegateEvents as p, inject as m, markRaw as oe, mergeModels as h, next as g, on as _, reactive as se, ref as v, renderEffect as y, setClass as b, setInsertionState as x, setProp as S, setStaticTemplateRef as C, setText as w, setValue as ce, template as T, toDisplayString as E, toRefs as le, txt as D, unref as O, useModel as ue, useTemplateRef as k, watch as A, withModifiers as j } from "vue";
15
15
  //#region ../components/src/icon-select/icon-select.vue?vue&type=script&setup=true&vapor=true&lang.ts
16
- var M = w("<div>"), fe = w("<div><div></div><div><input readonly></div></div>"), pe = w("<span> </span>"), me = w("<span> "), he = w("<div><div></div><div>"), N = w("<div>", 1);
17
- p("mousedown", "click");
18
- var P = /*@__PURE__*/ f({
16
+ var M = T("<div>"), de = T("<div><div></div><div><input readonly></div></div>"), fe = T("<span> </span>"), pe = T("<span> "), me = T("<div><div></div><div>"), he = T("<div>", 1);
17
+ p("click");
18
+ var N = /*@__PURE__*/ f({
19
19
  name: "SIconSelect",
20
20
  __name: "icon-select",
21
21
  props: /*@__PURE__*/ h({
@@ -38,122 +38,122 @@ var P = /*@__PURE__*/ f({
38
38
  }),
39
39
  emits: /*@__PURE__*/ h(["change"], ["update:modelValue"]),
40
40
  setup(f, { emit: p }) {
41
- let h = f, w = p, P = ue(f, "modelValue"), F = e("icon-select"), { size: I, error: L } = E(h), { mergedSize: R, mergedError: ge } = i({
42
- size: I,
43
- error: L
44
- }), _e = m(ee, void 0), z = s(() => _e?.inputFilled?.value || h.filled), ve = (e) => e.replace(/(Fill|Line)$/, "").replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase(), B = Object.entries(n).map(([e, t]) => ({
41
+ let h = f, T = p, N = ue(f, "modelValue"), P = e("icon-select"), { size: F, error: I } = le(h), { mergedSize: L, mergedError: ge } = i({
42
+ size: F,
43
+ error: I
44
+ }), _e = m(ee, void 0), R = s(() => _e?.inputFilled?.value || h.filled), ve = (e) => e.replace(/(Fill|Line)$/, "").replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase(), z = Object.entries(n).map(([e, t]) => ({
45
45
  name: e,
46
46
  icons: t.map((e) => ({
47
47
  name: e,
48
48
  displayName: ve(e)
49
49
  }))
50
- })), V = null, H = null, ye = () => (H ??= import("../icon/icon-loaders.mjs").then((e) => {
51
- V = e.nameToLoaderMap;
52
- }), H), U = se(/* @__PURE__ */ new Map()), W = (e) => {
50
+ })), B = null, V = null, ye = () => (V ??= import("../icon/icon-loaders.mjs").then((e) => {
51
+ B = e.nameToLoaderMap;
52
+ }), V), H = se(/* @__PURE__ */ new Map()), U = (e) => {
53
53
  e.length !== 0 && ye().then(() => {
54
- for (let { name: t } of e) U.has(t) || !V.has(t) || V.get(t)().then((e) => {
55
- U.set(t, oe(e.default));
54
+ for (let { name: t } of e) H.has(t) || !B.has(t) || B.get(t)().then((e) => {
55
+ H.set(t, oe(e.default));
56
56
  });
57
57
  });
58
- }, G = v(""), K = v(B[0].name), be = s(() => B), q = s(() => {
59
- let e = G.value.trim().toLowerCase(), t = e ? B.flatMap((e) => e.icons) : B.find((e) => e.name === K.value)?.icons ?? [];
58
+ }, W = v(""), G = v(z[0].name), be = s(() => z), K = s(() => {
59
+ let e = W.value.trim().toLowerCase(), t = e ? z.flatMap((e) => e.icons) : z.find((e) => e.name === G.value)?.icons ?? [];
60
60
  return e ? t.filter((t) => t.name.toLowerCase().includes(e) || t.displayName.includes(e)) : t;
61
- }), J = k("popoverRef"), Y = k("gridRef"), X = v(!1), xe = () => {
62
- h.disabled || (X.value ? Z() : Se());
61
+ }), q = k("popoverRef"), J = k("gridRef"), Y = v(!1), xe = () => {
62
+ h.disabled || (Y.value ? X() : Se());
63
63
  }, Se = () => {
64
- J.value?.show(), X.value = !0;
65
- }, Z = () => {
66
- J.value?.hide(), X.value = !1;
64
+ q.value?.show(), Y.value = !0;
65
+ }, X = () => {
66
+ q.value?.hide(), Y.value = !1;
67
67
  }, Ce = (e) => {
68
- P.value = e, w("change", e), Z();
68
+ N.value = e, T("change", e), X();
69
69
  }, we = () => {
70
- P.value = "", w("change", "");
70
+ N.value = "", T("change", "");
71
71
  };
72
- A(P, (e) => {
73
- e && W([{
72
+ A(N, (e) => {
73
+ e && U([{
74
74
  name: e,
75
75
  displayName: ""
76
76
  }]);
77
77
  }, { immediate: !0 });
78
- let Q = () => {
79
- W(q.value), Y.value && (Y.value.scrollTop = 0);
80
- }, Te = () => {
81
- Q();
78
+ let Z = () => {
79
+ U(K.value), J.value && (J.value.scrollTop = 0);
80
+ }, Q = () => {
81
+ Z();
82
82
  };
83
- A(K, Q), A(X, (e) => {
84
- e && Q();
83
+ A(G, Z), A(Y, (e) => {
84
+ e && Z();
85
85
  });
86
- let Ee = m(r, null), De = (e) => {
87
- Ee?.validate(e).catch(() => {});
88
- }, $ = N();
86
+ let Te = m(r, null), Ee = (e) => {
87
+ Te?.validate(e).catch(() => {});
88
+ }, $ = he();
89
89
  return y(() => {
90
- let e = O(F);
91
- b($, [e.b(), e.m(O(R))]);
92
- }), x($, null, 0), ce(c(O(te), { $: [() => ({
90
+ let e = O(P);
91
+ b($, [e.b(), e.m(O(L))]);
92
+ }), x($, null, 0), C(c(O(te), { $: [() => ({
93
93
  placement: "bottom-start",
94
94
  offset: [0, 4],
95
95
  ...f.popoverProps,
96
96
  manual: !0
97
- }), { onClickOutside: () => Z }] }, {
97
+ }), { onClickOutside: () => X }] }, {
98
98
  content: () => {
99
- let e = he(), t = o(e), n = g(t, 1);
99
+ let e = me(), t = o(e), n = g(t, 1);
100
100
  return y(() => {
101
- let n = O(F);
101
+ let n = O(P);
102
102
  b(e, [n.e("panel")]), b(t, [n.e("panel-header")]);
103
103
  }), x(t, null, 0), c(O(ne), {
104
- modelValue: () => G.value,
105
- "onUpdate:modelValue": () => (e) => G.value = e,
104
+ modelValue: () => W.value,
105
+ "onUpdate:modelValue": () => (e) => W.value = e,
106
106
  style: "width: 100%",
107
107
  placeholder: "搜索图标名称",
108
108
  clearable: "",
109
109
  filled: "",
110
- onChange: () => Te
111
- }), y(() => b(n, [O(F).e("panel-body")])), x(n, null, 0), c(O(a), {
112
- modelValue: () => K.value,
113
- "onUpdate:modelValue": () => (e) => K.value = e
114
- }, () => u(() => be.value, (e) => c(O(ie), {
110
+ onChange: () => Q
111
+ }), y(() => b(n, [O(P).e("panel-body")])), x(n, null, 0), c(O(ie), {
112
+ modelValue: () => G.value,
113
+ "onUpdate:modelValue": () => (e) => G.value = e
114
+ }, () => u(() => be.value, (e) => c(O(re), {
115
115
  name: () => e.value.name,
116
116
  label: () => e.value.name
117
117
  }, {
118
118
  label: () => {
119
- let t = pe(), n = me(), r = D(t), i = D(n);
119
+ let t = fe(), n = pe(), r = D(t), i = D(n);
120
120
  return y(() => {
121
121
  let t = e.value;
122
- C(r, T(t.name)), b(n, [O(F).e("category-count")]), C(i, T(t.icons.length));
122
+ w(r, E(t.name)), b(n, [O(P).e("category-count")]), w(i, E(t.icons.length));
123
123
  }), [t, n];
124
124
  },
125
- default: () => c(O(re), { padding: "12px 0 0 0" }, () => {
125
+ default: () => c(O(a), { padding: "12px 0 0 0" }, () => {
126
126
  let e = M();
127
- return y(() => b(e, [O(F).e("panel-list")])), x(e, null, 0), u(() => q.value, (e) => {
127
+ return y(() => b(e, [O(P).e("panel-list")])), x(e, null, 0), u(() => K.value, (e) => {
128
128
  let t = M();
129
129
  return y(() => {
130
- let n = O(F);
131
- b(t, [n.e("panel-item"), n.is("selected", e.value.name === P.value)]);
132
- }), x(t, null, 0), d(() => U.get(e.value.name), () => l(() => U.get(e.value.name), { class: () => [O(F).e("panel-icon")] })), _(t, "click", j(() => Ce(e.value.name), ["stop"])), S(t, "title", e.value.name), t;
130
+ let n = O(P);
131
+ b(t, [n.e("panel-item"), n.is("selected", e.value.name === N.value)]);
132
+ }), x(t, null, 0), d(() => H.get(e.value.name), () => l(() => H.get(e.value.name), { class: () => [O(P).e("panel-icon")] })), _(t, "click", j(() => Ce(e.value.name), ["stop"])), S(t, "title", e.value.name), t;
133
133
  }, (e) => e.name, 9), e;
134
134
  })
135
- }), (e) => e.name, 34)), e.$evtmousedown = de(() => {}, ["prevent"]), e;
135
+ }), (e) => e.name, 34)), e;
136
136
  },
137
137
  default: () => {
138
- let e = fe(), n = o(e), r = g(n, 1), i = o(r);
138
+ let e = de(), n = o(e), r = g(n, 1), i = o(r);
139
139
  return y(() => {
140
- let t = O(F);
140
+ let t = O(P);
141
141
  b(e, [
142
142
  t.e("wrapper"),
143
143
  t.is("disabled", f.disabled),
144
144
  t.is("error", O(ge)),
145
- t.is("filled", z.value)
145
+ t.is("filled", R.value)
146
146
  ]), b(n, [t.e("icon")]);
147
- }), x(n, null, 0), d(() => P.value && U.get(P.value), () => l(() => U.get(P.value || ""))), _(i, "blur", () => De("blur")), y(() => {
148
- let e = O(F);
149
- b(r, [e.e("label")]), b(i, [e.e("inner")]), le(i, P.value), S(i, "disabled", f.disabled), S(i, "placeholder", f.placeholder), S(i, "filled", z.value);
150
- }), x(r, null, 1), d(() => f.clearable && !f.disabled && P.value, () => {
147
+ }), x(n, null, 0), d(() => N.value && H.get(N.value), () => l(() => H.get(N.value || ""))), _(i, "blur", () => Ee("blur")), y(() => {
148
+ let e = O(P);
149
+ b(r, [e.e("label")]), b(i, [e.e("inner")]), ce(i, N.value), S(i, "disabled", f.disabled), S(i, "placeholder", f.placeholder), S(i, "filled", R.value);
150
+ }), x(r, null, 1), d(() => f.clearable && !f.disabled && N.value, () => {
151
151
  let e = M();
152
- return y(() => b(e, [O(F).e("clear")])), x(e, null, 0), c(O(t)), _(e, "click", j(we, ["stop"])), e;
152
+ return y(() => b(e, [O(P).e("clear")])), x(e, null, 0), c(O(t)), _(e, "click", j(we, ["stop"])), e;
153
153
  }), e.$evtclick = ae(xe), e;
154
154
  }
155
- }), J, null, "popoverRef"), $;
155
+ }), q, null, "popoverRef"), $;
156
156
  }
157
157
  });
158
158
  //#endregion
159
- export { P as default };
159
+ export { N as default };
@@ -1,11 +1,11 @@
1
1
  import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
2
2
  import "../../../hooks/index.mjs";
3
- import { CheckCircleLine as t, CloseCircleLine as n, InformationLine as r, WarningLine as i } from "../../../icons/src/svg/system/index.mjs";
4
- import { child as a, createComponent as o, createComponentWithFallback as s, createIf as c, createInvoker as l, defineVaporComponent as u, delegateEvents as d, on as f, onMounted as p, onUnmounted as m, ref as h, renderEffect as g, resolveComponent as _, setClass as v, setInsertionState as y, setText as b, template as x, toDisplayString as S, txt as C, unref as w, watch as T } from "vue";
3
+ import { CheckCircleLine as t, CloseCircleLine as n, CloseLine as r, InformationLine as i, WarningLine as a } from "../../../icons/src/svg/system/index.mjs";
4
+ import { child as o, createComponent as s, createIf as c, createInvoker as l, defineVaporComponent as u, delegateEvents as d, on as f, onMounted as p, onUnmounted as m, ref as h, renderEffect as g, setClass as _, setInsertionState as v, setText as y, template as b, toDisplayString as x, txt as S, unref as C, watch as w } from "vue";
5
5
  //#region ../components/src/message/message.vue?vue&type=script&setup=true&vapor=true&lang.ts
6
- var E = x("<div>"), D = x("<div><span> "), O = x("<div><div> </div>", 1);
6
+ var T = b("<div>"), E = b("<div><span> "), D = b("<div><div> </div>", 1);
7
7
  d("click");
8
- var k = /*@__PURE__*/ u({
8
+ var O = /*@__PURE__*/ u({
9
9
  __name: "message",
10
10
  props: {
11
11
  destroy: {},
@@ -29,47 +29,47 @@ var k = /*@__PURE__*/ u({
29
29
  },
30
30
  emits: ["close"],
31
31
  setup(u, { emit: d }) {
32
- let x = u, k = e("message"), A = d, j = h(null), M = h(!1), N = () => {
33
- A("close", x.id);
32
+ let b = u, O = e("message"), k = d, A = h(null), j = h(!1), M = () => {
33
+ k("close", b.id);
34
+ }, N = () => {
35
+ A.value &&= (clearTimeout(A.value), null);
34
36
  }, P = () => {
35
- j.value &&= (clearTimeout(j.value), null);
37
+ N(), b.duration !== 0 && !j.value && (A.value = window.setTimeout(() => {
38
+ k("close", b.id);
39
+ }, b.duration));
36
40
  }, F = () => {
37
- P(), x.duration !== 0 && !M.value && (j.value = window.setTimeout(() => {
38
- A("close", x.id);
39
- }, x.duration));
41
+ b.hover && (j.value = !0, N());
40
42
  }, I = () => {
41
- x.hover && (M.value = !0, P());
42
- }, L = () => {
43
- x.hover && (M.value = !1, F());
43
+ b.hover && (j.value = !1, P());
44
44
  };
45
45
  p(() => {
46
- F();
47
- }), m(() => {
48
46
  P();
49
- }), T(() => x.count, (e, t) => {
50
- e > (t || 0) && F();
47
+ }), m(() => {
48
+ N();
49
+ }), w(() => b.count, (e, t) => {
50
+ e > (t || 0) && P();
51
51
  });
52
- let R = _("Close"), z = O(), B = a(z, 1);
52
+ let L = D(), R = o(L, 1);
53
53
  g(() => {
54
- let e = w(k);
55
- v(z, [e.b(), e.m(u.type)]);
56
- }), y(z, 0, 0), c(() => u.showIcon, () => {
57
- let e = E();
58
- return g(() => v(e, [w(k).e("icon")])), y(e, null, 0), c(() => u.type === "warning", () => o(w(i)), () => c(() => u.type === "primary", () => o(w(r)), () => c(() => u.type === "info", () => o(w(r)), () => c(() => u.type === "success", () => o(w(t)), () => c(() => u.type === "danger", () => o(w(n))), 1029), 773), 517), 261), e;
54
+ let e = C(O);
55
+ _(L, [e.b(), e.m(u.type)]);
56
+ }), v(L, 0, 0), c(() => u.showIcon, () => {
57
+ let e = T();
58
+ return g(() => _(e, [C(O).e("icon")])), v(e, null, 0), c(() => u.type === "warning", () => s(C(a)), () => c(() => u.type === "primary", () => s(C(i)), () => c(() => u.type === "info", () => s(C(i)), () => c(() => u.type === "success", () => s(C(t)), () => c(() => u.type === "danger", () => s(C(n))), 1029), 773), 517), 261), e;
59
59
  });
60
- let V = C(B);
60
+ let z = S(R);
61
61
  return g(() => {
62
- v(B, [w(k).e("content")]), b(V, S(u.message));
63
- }), y(z, null, 2), c(() => u.showClose, () => {
64
- let e = E();
65
- return g(() => v(e, [w(k).e("close")])), y(e, null, 0), s(R), e.$evtclick = l(N), e;
66
- }), y(z, null, 3), c(() => u.grouping && u.count, () => {
67
- let e = D(), t = C(a(e));
62
+ _(R, [C(O).e("content")]), y(z, x(u.message));
63
+ }), v(L, null, 2), c(() => u.showClose, () => {
64
+ let e = T();
65
+ return g(() => _(e, [C(O).e("close")])), v(e, null, 0), s(C(r)), e.$evtclick = l(M), e;
66
+ }), v(L, null, 3), c(() => u.grouping && u.count, () => {
67
+ let e = E(), t = S(o(e));
68
68
  return g(() => {
69
- v(e, [w(k).e("grouping")]), b(t, S(u.count));
69
+ _(e, [C(O).e("grouping")]), y(t, x(u.count));
70
70
  }), e;
71
- }), f(z, "mouseenter", I), f(z, "mouseleave", L), z;
71
+ }), f(L, "mouseenter", F), f(L, "mouseleave", I), L;
72
72
  }
73
73
  });
74
74
  //#endregion
75
- export { k as default };
75
+ export { O as default };
@@ -51,7 +51,10 @@
51
51
  display: flex;
52
52
  align-items: center;
53
53
  font-size: getCssVar("font-size", "mini");
54
- line-height: 1;
54
+ svg {
55
+ display: inline-block;
56
+ transform: scale(0.6);
57
+ }
55
58
  }
56
59
  @include e(tooltip) {
57
60
  font-size: getCssVar("font-size", "medium");
@@ -95,6 +95,7 @@
95
95
  display: flex;
96
96
  align-items: center;
97
97
  justify-content: center;
98
+ flex-shrink: 0;
98
99
  border-right: 1px solid getCssVar("color", "fill-3");
99
100
  svg {
100
101
  height: 18px;
@@ -103,6 +104,7 @@
103
104
  }
104
105
 
105
106
  @include e(label) {
107
+ flex: 1;
106
108
  height: 100%;
107
109
  padding: 0 12px;
108
110
  display: flex;
@@ -135,6 +137,7 @@
135
137
  display: flex;
136
138
  align-items: center;
137
139
  justify-content: center;
140
+ flex-shrink: 0;
138
141
  cursor: pointer;
139
142
  &:hover {
140
143
  background-color: getCssVar("color", "fill-3");
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
4
  "name": "savor-ui",
5
- "version": "0.22.0",
5
+ "version": "0.23.0",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "savor-ui",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "A Vue3 Components Library",
5
5
  "keywords": [
6
6
  "component library",