savor-ui 0.15.6 → 0.16.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.
Files changed (25) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/es/components/src/descriptions/descriptions-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +35 -33
  3. package/dist/es/components/src/descriptions/descriptions.vue_vue_type_script_setup_true_vapor_true_lang.mjs +1 -1
  4. package/dist/es/components/src/menu/index.d.ts +2 -0
  5. package/dist/es/components/src/menu/menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +6 -2
  6. package/dist/es/components/src/menu/types.d.ts +3 -0
  7. package/dist/es/components/src/popover/popover.vue_vue_type_script_setup_true_vapor_true_lang.mjs +113 -115
  8. package/dist/es/components/src/statistic/index.d.ts +1 -0
  9. package/dist/es/components/src/statistic/statistic.vue_vue_type_script_setup_true_vapor_true_lang.mjs +52 -36
  10. package/dist/es/components/src/statistic/types.d.ts +2 -0
  11. package/dist/es/components/src/table/index.d.ts +7 -4
  12. package/dist/es/components/src/table/table-body.vue_vue_type_script_setup_true_vapor_true_lang.mjs +24 -35
  13. package/dist/es/components/src/table/table-header.vue_vue_type_script_setup_true_vapor_true_lang.mjs +51 -46
  14. package/dist/es/components/src/table/table.d.ts +5 -3
  15. package/dist/es/components/src/table/table.vue_vue_type_script_setup_true_vapor_true_lang.mjs +100 -82
  16. package/dist/es/components/src/table/types.d.ts +12 -1
  17. package/dist/es/components/src/tree/index.d.ts +3 -3
  18. package/dist/es/components/src/tree/tree.d.ts +2 -2
  19. package/dist/es/core/index.d.ts +1 -0
  20. package/dist/es/core/index.mjs +3 -2
  21. package/dist/es/theme/components/radio.scss +7 -0
  22. package/dist/json/vetur-attributes.json +20 -0
  23. package/dist/json/vetur-tags.json +8 -2
  24. package/dist/json/web-types.json +49 -1
  25. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,28 @@
2
2
 
3
3
 
4
4
 
5
+ # [0.16.0](https://gitee.com/mach552/savor-ui/compare/v0.15.7...v0.16.0) (2026-08-06)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **descriptions:** 修复竖向布局时label宽度没有撑满的问题 ([d460cd0](https://gitee.com/mach552/savor-ui/commits/d460cd0a3df7c420a67e94a9deae7589a5bc7a1c))
11
+ * **radio:** 修复button的禁用样式无效问题 ([d647d8e](https://gitee.com/mach552/savor-ui/commits/d647d8e8e60b6cf41430b4ca0c6f44600cbef1d9))
12
+ * **statistic:** 修复动画无效的问题 ([3db3653](https://gitee.com/mach552/savor-ui/commits/3db3653c7ac933bcf4d554c5b39ab75ebbd10ea2))
13
+
14
+
15
+ ### Features
16
+
17
+ * **menu:** 新增滚动条属性 ([b6b3485](https://gitee.com/mach552/savor-ui/commits/b6b34857afb6aab2a0c7e4d897b55266ce8ec5d8))
18
+ * **table:** 新增隐藏头部属性 ([d1954d9](https://gitee.com/mach552/savor-ui/commits/d1954d978921f876a1230c43ff92d719645c1dcd))
19
+
20
+ ## [0.15.7](https://gitee.com/mach552/savor-ui/compare/v0.15.6...v0.15.7) (2026-08-05)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **descriptions:** 修复label宽度不一致问题 ([cb2ca97](https://gitee.com/mach552/savor-ui/commits/cb2ca9762533c4baee9fe4e17bf8f5071824a2d8))
26
+
5
27
  ## [0.15.6](https://gitee.com/mach552/savor-ui/compare/v0.15.5...v0.15.6) (2026-08-04)
6
28
 
7
29
 
@@ -1,9 +1,11 @@
1
- import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
1
+ import { getSize as e } from "../../../utils/src/tool.mjs";
2
+ import "../../../utils/index.mjs";
3
+ import { useNamespace as t } from "../../../hooks/src/use-namespace.mjs";
2
4
  import "../../../hooks/index.mjs";
3
- import { descriptionsContextKey as t } from "./types.mjs";
4
- import { child as n, computed as r, createSlot as i, defineVaporComponent as a, inject as o, next as s, onMounted as c, onUnmounted as l, renderEffect as u, setClass as d, setInsertionState as f, setStyle as p, setText as m, template as h, toDisplayString as g, unref as _, useId as v } from "vue";
5
+ import { descriptionsContextKey as n } from "./types.mjs";
6
+ import { child as r, computed as i, createSlot as a, defineVaporComponent as o, inject as s, next as c, onMounted as l, onUnmounted as u, renderEffect as d, setClass as f, setInsertionState as p, setStyle as m, setText as h, template as g, toDisplayString as _, unref as v, useId as y } from "vue";
5
7
  //#region ../components/src/descriptions/descriptions-item.vue?vue&type=script&setup=true&vapor=true&lang.ts
6
- var y = h(" "), b = h("<div><div></div><div>", 1), x = /*@__PURE__*/ a({
8
+ var b = g(" "), x = g("<div><div></div><div>", 1), S = /*@__PURE__*/ o({
7
9
  name: "SDescriptionsItem",
8
10
  __name: "descriptions-item",
9
11
  props: {
@@ -12,51 +14,51 @@ var y = h(" "), b = h("<div><div></div><div>", 1), x = /*@__PURE__*/ a({
12
14
  labelWidth: {},
13
15
  labelAlign: {}
14
16
  },
15
- setup(a) {
16
- let h = a, x = e("descriptions"), S = o(t, void 0), C = "desc-item-" + v();
17
- c(() => {
18
- S?.addItem?.({
19
- uid: C,
20
- label: h.label,
21
- span: h.span,
22
- labelWidth: h.labelWidth,
23
- labelAlign: h.labelAlign
17
+ setup(o) {
18
+ let g = o, S = t("descriptions"), C = s(n, void 0), w = "desc-item-" + y();
19
+ l(() => {
20
+ C?.addItem?.({
21
+ uid: w,
22
+ label: g.label,
23
+ span: g.span,
24
+ labelWidth: g.labelWidth,
25
+ labelAlign: g.labelAlign
24
26
  });
25
- }), l(() => {
26
- S?.removeItem?.(C);
27
+ }), u(() => {
28
+ C?.removeItem?.(w);
27
29
  });
28
- let w = r(() => {
29
- if (!S?.positionList) return {
30
- gridColumn: `span ${h.span}`,
30
+ let T = i(() => {
31
+ if (!C?.positionList) return {
32
+ gridColumn: `span ${g.span}`,
31
33
  display: "flex",
32
34
  alignItems: "stretch"
33
35
  };
34
- let e = S.positionList.value[C];
36
+ let e = C.positionList.value[w];
35
37
  return e ? {
36
38
  gridColumn: `${e.start} / ${e.end}`,
37
39
  display: "flex",
38
40
  alignItems: "stretch"
39
41
  } : {
40
- gridColumn: `span ${h.span}`,
42
+ gridColumn: `span ${g.span}`,
41
43
  display: "flex",
42
44
  alignItems: "stretch"
43
45
  };
44
- }), T = r(() => {
45
- let e = S?.labelAlign || h.labelAlign, t = S?.labelWidth, n = h.labelWidth || t, r = {
46
- textAlign: e ?? "left",
46
+ }), E = i(() => {
47
+ let t = C?.labelAlign || g.labelAlign, n = C?.direction === "vertical" ? "100%" : g.labelWidth || C?.labelWidth, r = {
48
+ textAlign: t ?? "left",
47
49
  whiteSpace: "nowrap",
48
50
  flexShrink: "0"
49
51
  };
50
- return n && (r.width = typeof n == "number" ? `${n}px` : n), r;
51
- }), E = b(), D = n(E), O = s(D, 1);
52
- return u(() => {
53
- let e = _(x);
54
- d(E, [e.e("item")]), p(E, w.value), d(D, e.e("label")), p(D, T.value);
55
- }), f(D, null, 0), i("label", null, () => {
56
- let e = y();
57
- return u(() => m(e, g(a.label))), e;
58
- }), u(() => d(O, _(x).e("content"))), f(O, null, 0), i(), E;
52
+ return n != null && (r.width = e(n)), r;
53
+ }), D = x(), O = r(D), k = c(O, 1);
54
+ return d(() => {
55
+ let e = v(S);
56
+ f(D, [e.e("item")]), m(D, T.value), f(O, e.e("label")), m(O, E.value);
57
+ }), p(O, null, 0), a("label", null, () => {
58
+ let e = b();
59
+ return d(() => h(e, _(o.label))), e;
60
+ }), d(() => f(k, v(S).e("content"))), p(k, null, 0), a(), D;
59
61
  }
60
62
  });
61
63
  //#endregion
62
- export { x as default };
64
+ export { S as default };
@@ -16,7 +16,7 @@ var _ = m(" "), v = m("<div>"), y = m("<div><div>", 1), b = /*@__PURE__*/ o({
16
16
  labelAlign: { default: "left" },
17
17
  title: {},
18
18
  size: { default: "default" },
19
- labelWidth: {},
19
+ labelWidth: { default: 100 },
20
20
  tableLayout: {}
21
21
  },
22
22
  setup(o, { slots: m }) {
@@ -1,5 +1,6 @@
1
1
  import { MenuGroupSlots, MenuItemSlots, MenuSlots, SubMenuSlots } from './types';
2
2
  import { PublicProps, VNode, Plugin } from 'vue';
3
+ import { ScrollbarProps } from '../scrollbar';
3
4
  export declare const SMenuGroup: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
5
  attrs: any;
5
6
  slots: MenuGroupSlots;
@@ -53,6 +54,7 @@ export declare const SMenu: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setu
53
54
  openKeys?: (string[] & (string | number)[]) | undefined;
54
55
  selectedKey?: string | undefined;
55
56
  accordion?: boolean | undefined;
57
+ scrollbarProps?: ScrollbarProps | undefined;
56
58
  activeKey?: string | number | undefined;
57
59
  onItemClick?: ((name: string | number, item: any) => any) | undefined;
58
60
  onOpenChange?: ((keys: string[]) => any) | undefined;
@@ -16,7 +16,8 @@ var S = _("<div>"), C = _("<div>", 1), w = /*@__PURE__*/ c({
16
16
  collapsedWidth: { default: 48 },
17
17
  openKeys: {},
18
18
  selectedKey: {},
19
- accordion: { type: Boolean }
19
+ accordion: { type: Boolean },
20
+ scrollbarProps: {}
20
21
  }, {
21
22
  activeKey: {},
22
23
  activeKeyModifiers: {},
@@ -55,7 +56,10 @@ var S = _("<div>"), C = _("<div>", 1), w = /*@__PURE__*/ c({
55
56
  let R = C();
56
57
  return f(() => {
57
58
  p(R, [y(T).b()]), g(R, E.value);
58
- }), m(R, null, 0), o(y(r), { padding: "4px" }, () => {
59
+ }), m(R, null, 0), o(y(r), { $: [() => ({
60
+ padding: "4px",
61
+ ...c.scrollbarProps
62
+ })] }, () => {
59
63
  let e = S();
60
64
  return f(() => p(e, [y(T).e("content")])), m(e, null, 0), s(), e;
61
65
  }), h(R, L, null, "menuRef"), R;
@@ -1,4 +1,5 @@
1
1
  import { InjectionKey, Ref } from 'vue';
2
+ import { ScrollbarProps } from '../scrollbar';
2
3
  export interface MenuProps {
3
4
  /** 是否折叠 */
4
5
  collapsed?: boolean;
@@ -12,6 +13,8 @@ export interface MenuProps {
12
13
  selectedKey?: string;
13
14
  /** 是否开启手风琴模式 */
14
15
  accordion?: boolean;
16
+ /** 滚动条属性 */
17
+ scrollbarProps?: ScrollbarProps;
15
18
  }
16
19
  export interface MenuSlots {
17
20
  /** 默认 */
@@ -4,10 +4,10 @@ import { useNamespace as t } from "../../../hooks/src/use-namespace.mjs";
4
4
  import { useOutsideClick as n } from "../../../hooks/src/use-outside-click.mjs";
5
5
  import { useZIndex as r } from "../../../hooks/src/use-zIndex.mjs";
6
6
  import "../../../hooks/index.mjs";
7
- import { VaporTeleport as i, VaporTransition as a, applyVShow as o, child as s, computed as c, createComponent as l, createDynamicComponent as ee, createIf as u, createSlot as te, createTemplateRefSetter as ne, defineVaporComponent as d, nextTick as re, onMounted as ie, onUnmounted as ae, ref as f, renderEffect as p, setClass as m, setDynamicEvents as h, setInsertionState as g, setStyle as _, setText as oe, template as v, toDisplayString as se, unref as y, useSlots as ce, useTemplateRef as b, watch as x, watchEffect as le } from "vue";
8
- import { arrow as ue, autoUpdate as de, computePosition as fe, flip as pe, offset as me, shift as he } from "@floating-ui/dom";
7
+ import { VaporTeleport as i, VaporTransition as a, applyVShow as o, child as s, computed as c, createComponent as l, createDynamicComponent as ee, createIf as u, createSlot as te, createTemplateRefSetter as ne, defineVaporComponent as d, nextTick as f, onMounted as re, onUnmounted as ie, ref as p, renderEffect as m, setClass as h, setDynamicEvents as g, setInsertionState as _, setStyle as v, setText as ae, template as y, toDisplayString as oe, unref as b, useSlots as se, useTemplateRef as x, watch as S, watchEffect as ce } from "vue";
8
+ import { arrow as le, autoUpdate as ue, computePosition as de, flip as fe, offset as pe, shift as me } from "@floating-ui/dom";
9
9
  //#region ../components/src/popover/popover.vue?vue&type=script&setup=true&vapor=true&lang.ts
10
- var ge = v(" "), _e = v("<div data-popover-arrow>"), ve = v("<div>"), ye = v("<div><div>"), S = /*@__PURE__*/ d({
10
+ var he = y(" "), ge = y("<div data-popover-arrow>"), _e = y("<div>"), ve = y("<div><div>"), C = /*@__PURE__*/ d({
11
11
  name: "SPopover",
12
12
  __name: "popover",
13
13
  props: {
@@ -38,59 +38,59 @@ var ge = v(" "), _e = v("<div data-popover-arrow>"), ve = v("<div>"), ye = v("<d
38
38
  "after-leave"
39
39
  ],
40
40
  __multiRoot: !0,
41
- setup(d, { expose: v, emit: S }) {
42
- let C = d, w = S, T = t("popover"), be = ce(), E = f(!1), D = f(!1), { nextZIndex: xe } = r(), O = f(), k = b("containerNode"), A = b("wrapperNode"), j = b("contentNode"), M = f(null), Se = () => {
43
- let e = be.default?.();
44
- return M.value = e, e;
45
- }, N = f(null), P = f({}), F = f({}), I = f({}), L = f(null), R = () => {
46
- N.value && Object.entries(F.value).forEach(([e, t]) => {
47
- N.value.removeEventListener(e, t);
41
+ setup(d, { expose: y, emit: C }) {
42
+ let w = d, T = C, E = t("popover"), ye = se(), D = p(!1), O = p(!1), { nextZIndex: be } = r(), k = p(), A = x("containerNode"), j = x("wrapperNode"), M = x("contentNode"), N = p(null), xe = () => {
43
+ let e = ye.default?.();
44
+ return N.value = e, e;
45
+ }, P = p(null), F = p({}), I = p({}), L = p({}), R = p(null), z = () => {
46
+ P.value && Object.entries(I.value).forEach(([e, t]) => {
47
+ P.value.removeEventListener(e, t);
48
48
  });
49
- }, z = (e) => e == null ? [] : Array.isArray(e) ? e : [e], B = (e) => {
49
+ }, B = (e) => e == null ? [] : Array.isArray(e) ? e : [e], V = (e) => {
50
50
  if (!e) return null;
51
51
  if (e instanceof Node) return e;
52
52
  if (e.block instanceof Node) return e.block;
53
53
  if (e.el instanceof Node) return e.el;
54
54
  if (e.branches) {
55
- let t = typeof e.activeBranch == "number" ? e.activeBranch : 0, n = B(e.branches[t] || e.branches[0]);
55
+ let t = typeof e.activeBranch == "number" ? e.activeBranch : 0, n = V(e.branches[t] || e.branches[0]);
56
56
  if (n) return n;
57
57
  }
58
- for (let t of z(e.children)) {
59
- let e = B(t);
58
+ for (let t of B(e.children)) {
59
+ let e = V(t);
60
60
  if (e) return e;
61
61
  }
62
- for (let t of z(e.nodes)) {
62
+ for (let t of B(e.nodes)) {
63
63
  if (t instanceof Node) return t;
64
- let e = B(t);
64
+ let e = V(t);
65
65
  if (e) return e;
66
66
  }
67
67
  return null;
68
68
  };
69
- x(M, (e) => {
70
- if (!e || N.value) return;
69
+ S(N, (e) => {
70
+ if (!e || P.value) return;
71
71
  let t = null;
72
- t = e instanceof HTMLElement ? e : B(e), t && t !== N.value && (R(), N.value = t);
73
- }, { flush: "post" }), ie(() => {
74
- if (N.value) return;
75
- let e = M.value;
72
+ t = e instanceof HTMLElement ? e : V(e), t && t !== P.value && (z(), P.value = t);
73
+ }, { flush: "post" }), re(() => {
74
+ if (P.value) return;
75
+ let e = N.value;
76
76
  if (!e) return;
77
- let t = e instanceof HTMLElement ? e : B(e);
78
- t && t !== N.value && (R(), N.value = t);
79
- }), x(N, (e) => {
80
- e && re().then(() => {
81
- Object.entries(F.value).forEach(([t, n]) => {
77
+ let t = e instanceof HTMLElement ? e : V(e);
78
+ t && t !== P.value && (z(), P.value = t);
79
+ }), S(P, (e) => {
80
+ e && f().then(() => {
81
+ Object.entries(I.value).forEach(([t, n]) => {
82
82
  e.addEventListener(t, n);
83
83
  });
84
84
  });
85
85
  }, { flush: "post" });
86
- let Ce = () => {
87
- if (!j.value || !N.value) return;
88
- j.value.style.width = "";
86
+ let Se = () => {
87
+ if (!M.value || !P.value) return;
88
+ M.value.style.width = "";
89
89
  let e = "";
90
- typeof C.width == "number" ? (e = `${C.width}px`, j.value.style.width = e) : C.width === "sameWidth" ? (e = `${N.value.getBoundingClientRect().width}px`, j.value.style.width = e) : C.width === "auto" && (e = "", j.value.style.width = e);
91
- }, we = c(() => C.offset ? C.offset : C.trigger === "contextmenu" && C.alignPoint ? [0, 0] : C.showArrow ? [0, 8] : [0, 0]), V = () => {
92
- if (C.trigger === "contextmenu" && C.alignPoint && L.value) {
93
- let e = L.value;
90
+ typeof w.width == "number" ? (e = `${w.width}px`, M.value.style.width = e) : w.width === "sameWidth" ? (e = `${P.value.getBoundingClientRect().width}px`, M.value.style.width = e) : w.width === "auto" && (e = "", M.value.style.width = e);
91
+ }, Ce = c(() => w.offset ? w.offset : w.trigger === "contextmenu" && w.alignPoint ? [0, 0] : w.showArrow ? [0, 8] : [0, 0]), H = () => {
92
+ if (w.trigger === "contextmenu" && w.alignPoint && R.value) {
93
+ let e = R.value;
94
94
  return { getBoundingClientRect() {
95
95
  return {
96
96
  top: e.y,
@@ -105,135 +105,133 @@ var ge = v(" "), _e = v("<div data-popover-arrow>"), ve = v("<div>"), ye = v("<d
105
105
  };
106
106
  } };
107
107
  }
108
- return N.value;
109
- }, H = null, U = () => {
110
- H &&= (H(), null);
111
- }, W = async () => {
112
- if (!A.value || !N.value) return;
113
- let e = V(), t = j.value?.querySelector("[data-popover-arrow]"), [n, r] = we.value, i = [
114
- me({
108
+ return P.value;
109
+ }, U = null, W = () => {
110
+ U &&= (U(), null);
111
+ }, G = async () => {
112
+ if (!j.value || !P.value) return;
113
+ let e = H(), t = M.value?.querySelector("[data-popover-arrow]"), [n, r] = Ce.value, i = [
114
+ pe({
115
115
  mainAxis: r,
116
116
  crossAxis: n
117
117
  }),
118
- pe(),
119
- he()
118
+ fe(),
119
+ me()
120
120
  ];
121
- t && i.push(ue({
121
+ t && i.push(le({
122
122
  element: t,
123
123
  padding: 8
124
124
  }));
125
- let { x: a, y: o, placement: s, middlewareData: c } = await fe(e, A.value, {
126
- placement: C.placement,
125
+ let { x: a, y: o, placement: s, middlewareData: c } = await de(e, j.value, {
126
+ placement: w.placement,
127
127
  strategy: "fixed",
128
128
  middleware: i
129
129
  });
130
- if (A.value && (Object.assign(A.value.style, {
130
+ if (j.value && (Object.assign(j.value.style, {
131
131
  position: "fixed",
132
132
  left: `${a}px`,
133
133
  top: `${o}px`
134
- }), A.value.setAttribute("data-popover-placement", s), t && c.arrow)) {
134
+ }), j.value.setAttribute("data-popover-placement", s), t && c.arrow)) {
135
135
  let { x: e, y: n } = c.arrow;
136
136
  Object.assign(t.style, {
137
137
  left: e == null ? "" : `${e}px`,
138
138
  top: n == null ? "" : `${n}px`
139
139
  });
140
140
  }
141
- }, G = c(() => C.manual ? {
141
+ }, K = c(() => w.manual ? {
142
142
  openDelay: 0,
143
143
  closeDelay: 0
144
144
  } : {
145
- openDelay: typeof C.delay == "number" ? C.delay : C.delay[0],
146
- closeDelay: typeof C.delay == "number" ? 50 : C.delay[1]
147
- }), K = null, Te = () => {
148
- C.disabled || (K &&= (clearTimeout(K), null), D.value = !0, re(() => {
149
- E.value = !0, w("change", !0);
145
+ openDelay: typeof w.delay == "number" ? w.delay : w.delay[0],
146
+ closeDelay: typeof w.delay == "number" ? 50 : w.delay[1]
147
+ }), we = () => {
148
+ w.disabled || (O.value = !0, f(() => {
149
+ D.value = !0, T("change", !0);
150
150
  }));
151
- }, Ee = () => {
152
- E.value = !1, L.value = null, w("change", !1), K && clearTimeout(K), K = setTimeout(() => {
153
- C.destroyOnClose && (D.value = !1), K = null;
154
- }, 300);
155
- }, q = f(null), J = f(null), De = () => {
156
- q.value?.cancel(), J.value?.cancel(), q.value = e(Te, G.value.openDelay), J.value = e(Ee, G.value.closeDelay);
151
+ }, Te = () => {
152
+ D.value = !1, R.value = null, T("change", !1);
153
+ }, q = p(null), J = p(null), Y = () => {
154
+ q.value?.cancel(), J.value?.cancel(), q.value = e(we, K.value.openDelay), J.value = e(Te, K.value.closeDelay);
157
155
  };
158
- De(), x(G, De);
159
- let Y = () => {
156
+ Y(), S(K, Y);
157
+ let X = () => {
160
158
  J.value?.cancel(), q.value?.();
161
- }, X = () => {
159
+ }, Z = () => {
162
160
  q.value?.cancel(), J.value?.();
163
161
  };
164
- n(k, (e) => {
165
- N.value && e.target && typeof N.value.contains == "function" && N.value.contains(e.target) || (E.value && w("click-outside", e), !C.manual && (C.trigger === "hover" || C.trigger === "contextmenu" || C.trigger === "click") && X());
162
+ n(A, (e) => {
163
+ P.value && e.target && typeof P.value.contains == "function" && P.value.contains(e.target) || (D.value && T("click-outside", e), !w.manual && (w.trigger === "hover" || w.trigger === "contextmenu" || w.trigger === "click") && Z());
166
164
  });
167
- let Z = () => {
168
- F.value = {}, P.value = {}, I.value = {}, Q();
165
+ let Ee = () => {
166
+ I.value = {}, F.value = {}, L.value = {}, Q();
169
167
  }, Q = () => {
170
- C.manual || (C.trigger === "hover" && (F.value.mouseenter = Y, F.value.mouseleave = X, P.value.mouseenter = Y, P.value.mouseleave = X), C.trigger === "click" && (F.value.click = () => {
171
- let e = E.value ? J.value : q.value;
172
- (E.value ? q.value : J.value)?.cancel(), e?.();
173
- }), C.trigger === "contextmenu" && (F.value.click = () => {
174
- X();
175
- }, F.value.contextmenu = (e) => {
168
+ w.manual || (w.trigger === "hover" && (I.value.mouseenter = X, I.value.mouseleave = Z, F.value.mouseenter = X, F.value.mouseleave = Z), w.trigger === "click" && (I.value.click = () => {
169
+ let e = D.value ? J.value : q.value;
170
+ (D.value ? q.value : J.value)?.cancel(), e?.();
171
+ }), w.trigger === "contextmenu" && (I.value.click = () => {
172
+ Z();
173
+ }, I.value.contextmenu = (e) => {
176
174
  e.preventDefault();
177
175
  let t = e;
178
- L.value = {
176
+ R.value = {
179
177
  x: t.clientX,
180
178
  y: t.clientY
181
- }, E.value ? W() : Y();
179
+ }, D.value ? G() : X();
182
180
  }));
183
181
  };
184
- le(() => {
185
- C.manual || Q();
182
+ ce(() => {
183
+ w.manual || Q();
186
184
  });
187
- let Oe = () => {
188
- E.value || (U(), w("after-leave"));
185
+ let De = () => {
186
+ D.value || (T("after-leave"), w.destroyOnClose && (O.value = !1), W());
189
187
  };
190
- x(E, (e) => {
191
- e && (!A.value || !N.value || (O.value = xe(), Ce(), U(), H = de(V(), A.value, W)));
192
- }, { flush: "post" }), x([
193
- () => C.placement,
194
- () => C.offset,
195
- () => C.showArrow
188
+ S(D, (e) => {
189
+ e && (!j.value || !P.value || (k.value = be(), Se(), W(), U = ue(H(), j.value, G)));
190
+ }, { flush: "post" }), S([
191
+ () => w.placement,
192
+ () => w.offset,
193
+ () => w.showArrow
196
194
  ], () => {
197
- E.value && W();
198
- }), x(() => C.manual, (e) => {
199
- e ? Z() : Q();
200
- }), x(() => C.trigger, (e, t) => {
201
- e !== t && (q.value?.cancel(), E.value = !1, w("change", !1), Z());
202
- }), ae(() => {
203
- K &&= (clearTimeout(K), null), U(), R();
204
- }), v({
205
- show: Y,
206
- hide: X
195
+ D.value && G();
196
+ }), S(() => w.manual, (e) => {
197
+ e ? Ee() : Q();
198
+ }), S(() => w.trigger, (e, t) => {
199
+ e !== t && (q.value?.cancel(), D.value = !1, T("change", !1), Ee());
200
+ }), ie(() => {
201
+ W(), z();
202
+ }), y({
203
+ show: X,
204
+ hide: Z
207
205
  });
208
206
  let $ = ne();
209
- return [ee(() => Se()), l(i, {
207
+ return [ee(() => xe()), l(i, {
210
208
  disabled: () => !d.teleportBody,
211
209
  to: () => d.teleport
212
- }, () => u(() => D.value, () => {
213
- let e = ye(), t = s(e);
214
- return p(() => {
215
- let n = y(T);
216
- h(e, P.value), m(e, [n.b()]), m(t, [n.e("wrapper")]), _(t, { zIndex: O.value });
217
- }), g(t, null, 0), l(a, {
210
+ }, () => u(() => O.value, () => {
211
+ let e = ve(), t = s(e);
212
+ return m(() => {
213
+ let n = b(E);
214
+ g(e, F.value), h(e, [n.b()]), h(t, [n.e("wrapper")]), v(t, { zIndex: k.value });
215
+ }), _(t, null, 0), l(a, {
218
216
  name: "popover-fade",
219
- onAfterLeave: () => Oe,
217
+ onAfterLeave: () => De,
220
218
  persisted: ""
221
219
  }, () => {
222
- let e = ve();
223
- return p(() => {
224
- h(e, I.value), m(e, [y(T).e("content")]);
225
- }), g(e, null, 0), te("content", null, () => {
220
+ let e = _e();
221
+ return m(() => {
222
+ g(e, L.value), h(e, [b(E).e("content")]);
223
+ }), _(e, null, 0), te("content", null, () => {
224
+ let e = he();
225
+ return m(() => ae(e, oe(d.content))), e;
226
+ }), _(e, null, 1), u(() => d.showArrow, () => {
226
227
  let e = ge();
227
- return p(() => oe(e, se(d.content))), e;
228
- }), g(e, null, 1), u(() => d.showArrow, () => {
229
- let e = _e();
230
- return p(() => {
231
- m(e, [y(T).e("arrow")]), _(e, d.arrowStyle);
228
+ return m(() => {
229
+ h(e, [b(E).e("arrow")]), v(e, d.arrowStyle);
232
230
  }), e;
233
- }), o(e, () => E.value), $(e, j, null, "contentNode"), e;
234
- }), $(t, A, null, "wrapperNode"), $(e, k, null, "containerNode"), e;
231
+ }), o(e, () => D.value), $(e, M, null, "contentNode"), e;
232
+ }), $(t, j, null, "wrapperNode"), $(e, A, null, "containerNode"), e;
235
233
  }, null, 129))];
236
234
  }
237
235
  });
238
236
  //#endregion
239
- export { S as default };
237
+ export { C as default };
@@ -12,6 +12,7 @@ export declare const SStatistic: ((__VLS_props: NonNullable<Awaited<typeof __VLS
12
12
  precision?: number | undefined;
13
13
  showGroupSeparator?: boolean | undefined;
14
14
  animation?: boolean | undefined;
15
+ duration?: number | undefined;
15
16
  countdown?: boolean | undefined;
16
17
  format?: string | undefined;
17
18
  start?: boolean | undefined;