savor-ui 0.6.1 → 0.7.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 (70) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/es/components/index.d.ts +3 -0
  3. package/dist/es/components/index.mjs +3 -0
  4. package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_vapor_true_lang.mjs +4 -2
  5. package/dist/es/components/src/button/index.d.ts +1 -0
  6. package/dist/es/components/src/button/types.d.ts +2 -0
  7. package/dist/es/components/src/descriptions/descriptions-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +3 -3
  8. package/dist/es/components/src/empty/empty.vue_vue_type_script_setup_true_vapor_true_lang.mjs +14 -12
  9. package/dist/es/components/src/highlight/highlight.d.ts +20 -0
  10. package/dist/es/components/src/highlight/highlight.vue.mjs +5 -0
  11. package/dist/es/components/src/highlight/highlight.vue_vue_type_script_setup_true_vapor_true_lang.mjs +45 -0
  12. package/dist/es/components/src/highlight/index.d.ts +22 -0
  13. package/dist/es/components/src/highlight/index.mjs +7 -0
  14. package/dist/es/components/src/highlight/types.d.ts +18 -0
  15. package/dist/es/components/src/image/image-group.d.ts +3 -1
  16. package/dist/es/components/src/image/image-group.vue_vue_type_script_setup_true_vapor_true_lang.mjs +27 -26
  17. package/dist/es/components/src/image/index.d.ts +6 -2
  18. package/dist/es/components/src/menu/menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +1 -1
  19. package/dist/es/components/src/menu/sub-menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +1 -1
  20. package/dist/es/components/src/modal/index.d.ts +0 -5
  21. package/dist/es/components/src/modal/modal.vue_vue_type_script_setup_true_vapor_true_lang.mjs +113 -133
  22. package/dist/es/components/src/modal/types.d.ts +0 -10
  23. package/dist/es/components/src/pagination/pagination.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -1
  24. package/dist/es/components/src/steps/index.d.ts +30 -0
  25. package/dist/es/components/src/steps/index.mjs +7 -0
  26. package/dist/es/components/src/steps/steps.d.ts +25 -0
  27. package/dist/es/components/src/steps/steps.vue.mjs +5 -0
  28. package/dist/es/components/src/steps/steps.vue_vue_type_script_setup_true_vapor_true_lang.mjs +113 -0
  29. package/dist/es/components/src/steps/types.d.ts +34 -0
  30. package/dist/es/components/src/tag/index.d.ts +3 -0
  31. package/dist/es/components/src/tag/tag.vue_vue_type_script_setup_true_vapor_true_lang.mjs +11 -2
  32. package/dist/es/components/src/tag/types.d.ts +6 -0
  33. package/dist/es/components/src/tree/tree.vue_vue_type_script_setup_true_vapor_true_lang.mjs +62 -59
  34. package/dist/es/components/src/virtual-list/index.d.ts +24 -0
  35. package/dist/es/components/src/virtual-list/index.mjs +7 -0
  36. package/dist/es/components/src/virtual-list/types.d.ts +27 -0
  37. package/dist/es/components/src/virtual-list/virtual-list.d.ts +24 -0
  38. package/dist/es/components/src/virtual-list/virtual-list.vue.mjs +5 -0
  39. package/dist/es/components/src/virtual-list/virtual-list.vue_vue_type_script_setup_true_vapor_true_lang.mjs +99 -0
  40. package/dist/es/core/components.mjs +49 -43
  41. package/dist/es/core/global.d.ts +4 -2
  42. package/dist/es/core/index.mjs +44 -41
  43. package/dist/es/hooks/index.d.ts +1 -0
  44. package/dist/es/hooks/index.mjs +1 -0
  45. package/dist/es/hooks/src/use-throttle.d.ts +8 -0
  46. package/dist/es/hooks/src/use-throttle.mjs +23 -0
  47. package/dist/es/icons/index.d.ts +3 -1
  48. package/dist/es/icons/index.mjs +2 -0
  49. package/dist/es/icons/src/check.d.ts +19 -0
  50. package/dist/es/icons/src/check.vue.mjs +11 -0
  51. package/dist/es/icons/src/empty.d.ts +19 -0
  52. package/dist/es/icons/src/empty.vue.mjs +11 -0
  53. package/dist/es/theme/components/anchor.scss +3 -4
  54. package/dist/es/theme/components/button.scss +28 -0
  55. package/dist/es/theme/components/card.scss +1 -1
  56. package/dist/es/theme/components/empty.scss +5 -3
  57. package/dist/es/theme/components/highlight.scss +13 -0
  58. package/dist/es/theme/components/index.scss +3 -0
  59. package/dist/es/theme/components/menu.scss +9 -0
  60. package/dist/es/theme/components/modal.scss +11 -12
  61. package/dist/es/theme/components/scrollbar.scss +4 -4
  62. package/dist/es/theme/components/steps.scss +237 -0
  63. package/dist/es/theme/components/tag.scss +17 -3
  64. package/dist/es/theme/components/timeline.scss +1 -1
  65. package/dist/es/theme/components/virtual-list.scss +59 -0
  66. package/dist/es/utils/src/theme/themeMap.mjs +3 -3
  67. package/dist/json/vetur-attributes.json +78 -20
  68. package/dist/json/vetur-tags.json +35 -7
  69. package/dist/json/web-types.json +196 -41
  70. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
 
4
4
 
5
+ # [0.7.0](https://gitee.com/mach552/savor-ui/compare/v0.6.1...v0.7.0) (2026-06-30)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **card:** 调整样式 ([45b7155](https://gitee.com/mach552/savor-ui/commits/45b71559882ce9afcb64df0a5add0f34378d2da2))
11
+ * **descriptions:** 修复content没有内容时高度与label不一致问题 ([708f974](https://gitee.com/mach552/savor-ui/commits/708f9745c295ca66421c4954692e02f22d9e3f86))
12
+ * **menu:** 调整样式 ([2817e6a](https://gitee.com/mach552/savor-ui/commits/2817e6a361b0aa9cd90a46d936300871b45bdced))
13
+ * **scrollbar:** 调整样式 ([054eb92](https://gitee.com/mach552/savor-ui/commits/054eb929aca527c2d7db95718ceed59d2baa5e19))
14
+ * **tree:** 修复高度无法异步更新的问题 ([5884a9a](https://gitee.com/mach552/savor-ui/commits/5884a9aac150429ce6913433d0ff588736f5d132))
15
+
16
+
17
+ ### Features
18
+
19
+ * **button:** 新增轮廓和次要按钮 ([5d48f25](https://gitee.com/mach552/savor-ui/commits/5d48f2594010079e9b5d67af9356580bcef085ee))
20
+ * **highlight:** 新增高亮文本组件 ([8a53e5e](https://gitee.com/mach552/savor-ui/commits/8a53e5eaf8a74a2fa5ce1d624e60a7c70a7d87c4))
21
+ * **steps:** 新增步骤条组件 ([790465f](https://gitee.com/mach552/savor-ui/commits/790465f686ed5dc8ff30c8574f888d11f74af51b))
22
+ * **tag:** 新增多种类型 ([a448e67](https://gitee.com/mach552/savor-ui/commits/a448e678c48abf159f2c41256a0cd7c702df727d))
23
+ * **virtual-list:** 新增虚拟列表组件 ([bdf0dda](https://gitee.com/mach552/savor-ui/commits/bdf0dda038f1e5052e1feb058279183d5aaac706))
24
+
5
25
  ## [0.6.1](https://gitee.com/mach552/savor-ui/compare/v0.6.0...v0.6.1) (2026-06-26)
6
26
 
7
27
 
@@ -25,6 +25,7 @@ export * from './src/expand-card';
25
25
  export * from './src/form';
26
26
  export * from './src/galleria';
27
27
  export * from './src/grid';
28
+ export * from './src/highlight';
28
29
  export * from './src/icon';
29
30
  export * from './src/image';
30
31
  export * from './src/input';
@@ -49,6 +50,7 @@ export * from './src/select';
49
50
  export * from './src/skeleton';
50
51
  export * from './src/space';
51
52
  export * from './src/statistic';
53
+ export * from './src/steps';
52
54
  export * from './src/switch';
53
55
  export * from './src/table';
54
56
  export * from './src/tabs';
@@ -60,6 +62,7 @@ export * from './src/tooltip';
60
62
  export * from './src/transition';
61
63
  export * from './src/tree';
62
64
  export * from './src/upload';
65
+ export * from './src/virtual-list';
63
66
  export * from './src/waterfall';
64
67
  export * from './src/watermark';
65
68
  export * from './src/wheel';
@@ -42,6 +42,7 @@ import "./src/expand-card/index.mjs";
42
42
  import "./src/galleria/index.mjs";
43
43
  import "./src/grid/types.mjs";
44
44
  import "./src/grid/index.mjs";
45
+ import "./src/highlight/index.mjs";
45
46
  import "./src/image/types.mjs";
46
47
  import "./src/image/index.mjs";
47
48
  import "./src/input-number/index.mjs";
@@ -67,6 +68,7 @@ import "./src/segmented/index.mjs";
67
68
  import "./src/skeleton/index.mjs";
68
69
  import "./src/space/index.mjs";
69
70
  import "./src/statistic/index.mjs";
71
+ import "./src/steps/index.mjs";
70
72
  import "./src/switch/index.mjs";
71
73
  import "./src/table/types.mjs";
72
74
  import "./src/table/index.mjs";
@@ -79,6 +81,7 @@ import "./src/timeline/index.mjs";
79
81
  import "./src/tree/types.mjs";
80
82
  import "./src/tree/index.mjs";
81
83
  import "./src/upload/index.mjs";
84
+ import "./src/virtual-list/index.mjs";
82
85
  import "./src/waterfall/index.mjs";
83
86
  import "./src/watermark/index.mjs";
84
87
  import "./src/wheel/index.mjs";
@@ -20,7 +20,8 @@ var y = g("<div>"), b = g(" "), x = g("<button>", 1), S = /*@__PURE__*/ c({
20
20
  block: { type: Boolean },
21
21
  text: { type: Boolean },
22
22
  link: { type: Boolean },
23
- secondary: { type: Boolean }
23
+ secondary: { type: Boolean },
24
+ outline: { type: Boolean }
24
25
  },
25
26
  setup(c, { slots: g }) {
26
27
  let S = c, C = e("button"), w = l(n, void 0), T = r(() => w?.size?.value || S.size), E = x();
@@ -37,7 +38,8 @@ var y = g("<div>"), b = g(" "), x = g("<button>", 1), S = /*@__PURE__*/ c({
37
38
  e.is("link", c.link),
38
39
  e.is("disabled", t),
39
40
  e.is("loading", n),
40
- e.is("only-icon", !g.default && !c.label)
41
+ e.is("only-icon", !g.default && !c.label),
42
+ e.is("outline", c.outline)
41
43
  ]), m(E, "disabled", t || n), d(E, "html-type", c.htmlType);
42
44
  }), p(E, null, 0), o(() => (g.icon || c.icon) && !c.loading, () => {
43
45
  let e = y();
@@ -18,6 +18,7 @@ export declare const SButton: ((__VLS_props: NonNullable<Awaited<typeof __VLS_se
18
18
  text?: boolean | undefined;
19
19
  link?: boolean | undefined;
20
20
  secondary?: boolean | undefined;
21
+ outline?: boolean | undefined;
21
22
  } & (typeof globalThis extends {
22
23
  __VLS_PROPS_FALLBACK: infer P;
23
24
  } ? P : {});
@@ -30,6 +30,8 @@ export interface ButtonProps {
30
30
  link?: boolean;
31
31
  /** 是否为次要按钮 */
32
32
  secondary?: boolean;
33
+ /** 是否为轮廓按钮 */
34
+ outline?: boolean;
33
35
  }
34
36
  export interface ButtonSlots {
35
37
  /** 默认 */
@@ -29,17 +29,17 @@ var y = h(" "), b = h("<div><div></div><div>", 1), x = /*@__PURE__*/ a({
29
29
  if (!S?.positionList) return {
30
30
  gridColumn: `span ${h.span}`,
31
31
  display: "flex",
32
- alignItems: "flex-start"
32
+ alignItems: "stretch"
33
33
  };
34
34
  let e = S.positionList.value[C];
35
35
  return e ? {
36
36
  gridColumn: `${e.start} / ${e.end}`,
37
37
  display: "flex",
38
- alignItems: "flex-start"
38
+ alignItems: "stretch"
39
39
  } : {
40
40
  gridColumn: `span ${h.span}`,
41
41
  display: "flex",
42
- alignItems: "flex-start"
42
+ alignItems: "stretch"
43
43
  };
44
44
  }), T = r(() => {
45
45
  let e = S?.labelAlign || h.labelAlign, t = S?.labelWidth, n = h.labelWidth || t, r = {
@@ -1,21 +1,23 @@
1
1
  import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
2
2
  import "../../../hooks/index.mjs";
3
- import { child as t, createSlot as n, defineVaporComponent as r, next as i, renderEffect as a, setClass as o, setInsertionState as s, setText as c, template as l, toDisplayString as u, unref as d } from "vue";
3
+ import t from "../../../icons/src/empty.vue.mjs";
4
+ import "../../../icons/index.mjs";
5
+ import { child as n, createComponent as r, createSlot as i, defineVaporComponent as a, next as o, renderEffect as s, setClass as c, setInsertionState as l, setText as u, template as d, toDisplayString as f, unref as p } from "vue";
4
6
  //#region ../components/src/empty/empty.vue?vue&type=script&setup=true&vapor=true&lang.ts
5
- var f = l("<span><svg class=icon height=128 p-id=9909 t=1769520360749 version=1.1 viewBox=\"0 0 1024 1024\"width=128 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink><path d=\"M193.8 136.7h636.4v539.5H193.8z\"fill=#F6FBFB p-id=9910></path><path d=\"M762.3 365.4H261.7c-14.3 0-25.8 11.6-25.8 25.8v222.9c0 14.3 11.6 25.8 25.8 25.8h500.7c14.3 0 25.8-11.6 25.8-25.8V391.2c0-14.3-11.6-25.8-25.9-25.8z\"fill=#C6D7DE p-id=9911></path><path d=\"M0 811.8a512 168 0 1 0 1024 0 512 168 0 1 0-1024 0Z\"fill=#F8FAFA p-id=9912></path><path d=\"M859.3 488.8H164.7c-14.3 0-25.8 11.6-25.8 25.8v323c0 14.3 11.6 25.8 25.8 25.8h694.5c14.3 0 25.8-11.6 25.8-25.8v-323c0.1-14.2-11.5-25.8-25.7-25.8z\"fill=#E8EDF3 p-id=9913></path><path d=\"M598.4 637.4H425.6c-7.1 0-12.9 5.8-12.9 12.9V702c0 7.1 5.8 12.9 12.9 12.9h172.8c7.1 0 12.9-5.8 12.9-12.9v-51.7c0-7.1-5.8-12.9-12.9-12.9z\"fill=#D8DFEA p-id=9914></path><path d=\"M860.9 74.2H163.1c-14.3 0-25.8 11.6-25.8 25.8v99.3c0 14.3 11.6 25.8 25.8 25.8h697.7c14.3 0 25.8-11.6 25.8-25.8V100c0.1-14.2-11.5-25.8-25.7-25.8z\"fill=#E8EDF3 p-id=9915></path><path d=\"M591.1 151.7m-25.8 0a25.8 25.8 0 1 0 51.6 0 25.8 25.8 0 1 0-51.6 0Z\"fill=#808182 p-id=9916></path><path d=\"M697.7 151.7m-25.8 0a25.8 25.8 0 1 0 51.6 0 25.8 25.8 0 1 0-51.6 0Z\"fill=#DD5041 p-id=9917></path><path d=\"M802.7 151.7m-25.8 0a25.8 25.8 0 1 0 51.6 0 25.8 25.8 0 1 0-51.6 0Z\"fill=#E3A64C p-id=9918>", 2), p = l(" "), m = l("<div><div></div><div>", 1), h = /*@__PURE__*/ r({
7
+ var m = d(" "), h = d("<div><div></div><div>", 1), g = /*@__PURE__*/ a({
6
8
  name: "SEmpty",
7
9
  __name: "empty",
8
10
  props: { description: {} },
9
- setup(r) {
10
- let l = e("empty"), h = m(), g = t(h), _ = i(g, 1);
11
- return a(() => {
12
- let e = d(l);
13
- o(h, [e.b()]), o(g, [e.e("image")]);
14
- }), s(g, null, 0), n("image", null, () => f()), a(() => o(_, [d(l).e("description")])), s(_, null, 0), n("description", null, () => {
15
- let e = p();
16
- return a(() => c(e, u(r.description || "暂无数据"))), e;
17
- }), h;
11
+ setup(a) {
12
+ let d = e("empty"), g = h(), _ = n(g), v = o(_, 1);
13
+ return s(() => {
14
+ let e = p(d);
15
+ c(g, [e.b()]), c(_, [e.e("image")]);
16
+ }), l(_, null, 0), i("image", null, () => r(p(t))), s(() => c(v, [p(d).e("description")])), l(v, null, 0), i("description", null, () => {
17
+ let e = m();
18
+ return s(() => u(e, f(a.description || "暂无数据"))), e;
19
+ }), g;
18
20
  }
19
21
  });
20
22
  //#endregion
21
- export { h as default };
23
+ export { g as default };
@@ -0,0 +1,20 @@
1
+ import { HighlightProps, HighlightSlots } from './types';
2
+ import { PublicProps, VNode } from 'vue';
3
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: PublicProps & __VLS_PrettifyLocal<HighlightProps> & (typeof globalThis extends {
5
+ __VLS_PROPS_FALLBACK: infer P;
6
+ } ? P : {});
7
+ expose: (exposed: {}) => void;
8
+ attrs: any;
9
+ slots: HighlightSlots;
10
+ emit: {};
11
+ }>) => VNode & {
12
+ __ctx?: Awaited<typeof __VLS_setup>;
13
+ };
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
17
+ [K in keyof T]: T[K];
18
+ } : {
19
+ [K in keyof T as K]: T[K];
20
+ }) & {};
@@ -0,0 +1,5 @@
1
+ import e from "./highlight.vue_vue_type_script_setup_true_vapor_true_lang.mjs";
2
+ //#region ../components/src/highlight/highlight.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,45 @@
1
+ import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
2
+ import "../../../hooks/index.mjs";
3
+ import { computed as t, createFor as n, createIf as r, createSlot as i, defineVaporComponent as a, renderEffect as o, setClass as s, setInsertionState as c, setText as l, template as u, toDisplayString as d, unref as f } from "vue";
4
+ //#region ../components/src/highlight/highlight.vue?vue&type=script&setup=true&vapor=true&lang.ts
5
+ var p = u(" "), m = u("<span>"), h = u("<div>", 1), g = /*@__PURE__*/ a({
6
+ name: "SHighlight",
7
+ __name: "highlight",
8
+ props: {
9
+ content: { default: "" },
10
+ keyWords: { default: () => [] },
11
+ ignoreCase: {
12
+ type: Boolean,
13
+ default: !1
14
+ }
15
+ },
16
+ setup(a) {
17
+ let u = a, g = e("highlight"), _ = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), v = t(() => {
18
+ let e = u.keyWords.map((e) => e.trim()).filter(Boolean);
19
+ if (!e.length) return null;
20
+ let t = e.sort((e, t) => t.length - e.length).map(_).join("|"), n = u.ignoreCase ? "ig" : "g";
21
+ return RegExp(`(${t})`, n);
22
+ }), y = t(() => {
23
+ let e = u.content, t = v.value;
24
+ return !t || !e ? [{
25
+ isKey: !1,
26
+ text: e
27
+ }] : e.split(t).map((e) => ({
28
+ text: e,
29
+ isKey: t.test(e)
30
+ }));
31
+ }), b = h();
32
+ return o(() => s(b, [f(g).b()])), c(b, null, 0), n(() => y.value, (e, t) => r(() => e.value.text, () => {
33
+ let t = m();
34
+ return o(() => s(t, [e.value.isKey && f(g).e("key-word")])), c(t, null, 0), r(() => e.value.isKey, () => i("light", { text: () => e.value.text }, () => {
35
+ let t = p();
36
+ return o(() => l(t, d(e.value.text))), t;
37
+ }), () => i("default", { text: () => e.value.text }, () => {
38
+ let t = p();
39
+ return o(() => l(t, d(e.value.text))), t;
40
+ }), 261), t;
41
+ }, null, 10), (e, t) => `${e.text}-${t}`, 17), b;
42
+ }
43
+ });
44
+ //#endregion
45
+ export { g as default };
@@ -0,0 +1,22 @@
1
+ import { HighlightSlots } from './types';
2
+ import { PublicProps, VNode, Plugin } from 'vue';
3
+ export declare const SHighlight: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
+ attrs: any;
5
+ slots: HighlightSlots;
6
+ emit: {};
7
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
8
+ props: PublicProps & {
9
+ content?: string | undefined;
10
+ keyWords?: string[] | undefined;
11
+ ignoreCase?: boolean | undefined;
12
+ } & (typeof globalThis extends {
13
+ __VLS_PROPS_FALLBACK: infer P;
14
+ } ? P : {});
15
+ expose: (exposed: {}) => void;
16
+ attrs: any;
17
+ slots: HighlightSlots;
18
+ emit: {};
19
+ }>) => VNode & {
20
+ __ctx?: Awaited<typeof __VLS_setup>;
21
+ }) & Plugin;
22
+ export * from './types';
@@ -0,0 +1,7 @@
1
+ import { withInstall as e } from "../../../utils/src/install.mjs";
2
+ import "../../../utils/index.mjs";
3
+ import t from "./highlight.vue.mjs";
4
+ //#region ../components/src/highlight/index.ts
5
+ var n = e(t);
6
+ //#endregion
7
+ export { n as SHighlight };
@@ -0,0 +1,18 @@
1
+ export interface HighlightProps {
2
+ /** 要高亮的内容 */
3
+ content?: string;
4
+ /** 要高亮的关键词 */
5
+ keyWords?: string[];
6
+ /** 是否忽略大小写 */
7
+ ignoreCase?: boolean;
8
+ }
9
+ export interface HighlightSlots {
10
+ /** 未高亮内容 */
11
+ default?: (props: {
12
+ text: string;
13
+ }) => any;
14
+ /** 高亮内容 */
15
+ light?: (props: {
16
+ text: string;
17
+ }) => any;
18
+ }
@@ -10,7 +10,9 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
10
10
  } ? P : {});
11
11
  expose: (exposed: {}) => void;
12
12
  attrs: any;
13
- slots: {};
13
+ slots: {
14
+ default?: (props: {}) => any;
15
+ };
14
16
  emit: (event: "update:modelValue", value: boolean) => void;
15
17
  }>) => VNode & {
16
18
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -4,15 +4,15 @@ import { useZIndex as n } from "../../../hooks/src/use-zIndex.mjs";
4
4
  import "../../../hooks/index.mjs";
5
5
  import r from "../../../icons/src/close.vue.mjs";
6
6
  import ee from "../../../icons/src/left.vue.mjs";
7
- import i from "../../../icons/src/refresh-left.vue.mjs";
8
- import a from "../../../icons/src/refresh-right.vue.mjs";
9
- import o from "../../../icons/src/refresh.vue.mjs";
10
- import s from "../../../icons/src/right.vue.mjs";
11
- import te from "../../../icons/src/zoom-in.vue.mjs";
12
- import ne from "../../../icons/src/zoom-out.vue.mjs";
7
+ import te from "../../../icons/src/refresh-left.vue.mjs";
8
+ import i from "../../../icons/src/refresh-right.vue.mjs";
9
+ import a from "../../../icons/src/refresh.vue.mjs";
10
+ import o from "../../../icons/src/right.vue.mjs";
11
+ import ne from "../../../icons/src/zoom-in.vue.mjs";
12
+ import re from "../../../icons/src/zoom-out.vue.mjs";
13
13
  import "../../../icons/index.mjs";
14
- import { imageGroupContextKey as c } from "./types.mjs";
15
- import { VaporTeleport as l, child as u, computed as d, createComponent as f, createIf as p, createInvoker as m, defineVaporComponent as h, delegateEvents as g, mergeModels as _, next as v, on as y, onMounted as b, onUnmounted as x, provide as S, ref as C, renderEffect as w, setClass as T, setInsertionState as E, setProp as re, setStyle as D, template as O, unref as k, useModel as ie, watch as A, withModifiers as j } from "vue";
14
+ import { imageGroupContextKey as s } from "./types.mjs";
15
+ import { VaporTeleport as c, child as l, computed as u, createComponent as d, createIf as f, createInvoker as p, createSlot as m, defineVaporComponent as h, delegateEvents as g, mergeModels as _, next as v, on as y, onMounted as b, onUnmounted as x, provide as S, ref as C, renderEffect as w, setClass as T, setInsertionState as E, setProp as ie, setStyle as D, template as O, unref as k, useModel as ae, watch as A, withModifiers as j } from "vue";
16
16
  //#region ../components/src/image/image-group.vue?vue&type=script&setup=true&vapor=true&lang.ts
17
17
  var M = O("<div><img alt>"), N = O("<div><div></div><div><div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div>");
18
18
  g("click", "mousedown", "mouseup", "mousemove");
@@ -27,8 +27,9 @@ var P = /*@__PURE__*/ h({
27
27
  modelModifiers: {}
28
28
  }),
29
29
  emits: ["update:modelValue"],
30
+ __multiRoot: !0,
30
31
  setup(h) {
31
- let g = h, _ = e("image"), { nextZIndex: O } = n(), { lockScroll: P, unlockScroll: F } = t(), I = C(0), L = ie(h, "modelValue"), R = C([]), z = C(0), B = d(() => R.value[z.value]), V = () => {
32
+ let g = h, _ = e("image"), { nextZIndex: O } = n(), { lockScroll: P, unlockScroll: F } = t(), I = C(0), L = ae(h, "modelValue"), R = C([]), z = C(0), B = u(() => R.value[z.value]), V = () => {
32
33
  L.value = !1, F();
33
34
  };
34
35
  A(L, (e) => {
@@ -44,19 +45,19 @@ var P = /*@__PURE__*/ h({
44
45
  U.value -= .2, U.value < .5 && (U.value = .5);
45
46
  }, X = () => {
46
47
  H.value = 0, U.value = 1, W.value = 0, G.value = 0;
47
- }, ae = () => {
48
+ }, oe = () => {
48
49
  V();
49
50
  }, Z = (e) => {
50
51
  L.value && (e.preventDefault(), e.deltaY > 0 ? Y() : J());
51
- }, Q = C(!1), oe = (e) => {
52
+ }, Q = C(!1), se = (e) => {
52
53
  e.preventDefault(), Q.value = !0;
53
- }, $ = (e) => {
54
+ }, ce = (e) => {
54
55
  e.preventDefault(), Q.value = !1;
55
- }, se = (e) => {
56
+ }, le = (e) => {
56
57
  e.preventDefault(), Q.value && (W.value += e.movementX, G.value += e.movementY);
57
- }, ce = () => {
58
+ }, $ = () => {
58
59
  z.value--, X(), z.value < 0 && (z.value = R.value.length - 1);
59
- }, le = () => {
60
+ }, ue = () => {
60
61
  z.value++, X(), z.value > R.value.length - 1 && (z.value = 0);
61
62
  };
62
63
  return b(() => {
@@ -65,7 +66,7 @@ var P = /*@__PURE__*/ h({
65
66
  document.removeEventListener("wheel", Z);
66
67
  }), A(() => g.srcList, (e) => {
67
68
  e && (R.value = e);
68
- }, { immediate: !0 }), S(c, {
69
+ }, { immediate: !0 }), S(s, {
69
70
  addImage: (e) => {
70
71
  R.value.push(e);
71
72
  },
@@ -76,22 +77,22 @@ var P = /*@__PURE__*/ h({
76
77
  let t = R.value.indexOf(e);
77
78
  t !== -1 && (z.value = t, X(), L.value = !0);
78
79
  }
79
- }), f(l, { to: "body" }, () => p(() => L.value, () => {
80
- let e = N(), t = u(e), n = v(t, 1), c = u(n, 1), l = u(c), d = v(l, 1), h = v(d, 2), g = v(h, 3), b = v(g, 4), x = v(b, 5), S = v(x, 6), C = v(S, 7);
81
- return t.$evtclick = m(V), w(() => {
80
+ }), [m(), d(c, { to: "body" }, () => f(() => L.value, () => {
81
+ let e = N(), t = l(e), n = v(t, 1), s = l(n, 1), c = l(s), u = v(c, 1), m = v(u, 2), h = v(m, 3), g = v(h, 4), b = v(g, 5), x = v(b, 6), S = v(x, 7);
82
+ return t.$evtclick = p(V), w(() => {
82
83
  let r = k(_);
83
84
  T(e, [r.e("preview")]), D(e, { zIndex: I.value }), T(t, [r.e("mask")]), T(n, [r.e("wrapper")]);
84
- }), E(n, 0, 0), p(() => B.value, () => {
85
- let e = M(), t = u(e);
86
- return e.$evtmousedown = m(oe), e.$evtmouseup = m($), e.$evtmousemove = m(se), w(() => {
85
+ }), E(n, 0, 0), f(() => B.value, () => {
86
+ let e = M(), t = l(e);
87
+ return e.$evtmousedown = p(se), e.$evtmouseup = p(ce), e.$evtmousemove = p(le), w(() => {
87
88
  let n = k(_);
88
- T(e, [n.e("content")]), D(e, { transform: `translate(${W.value}px, ${G.value}px) rotate(${H.value}deg) scale(${U.value})` }), re(t, "src", B.value), T(t, [n.e("content-img")]);
89
+ T(e, [n.e("content")]), D(e, { transform: `translate(${W.value}px, ${G.value}px) rotate(${H.value}deg) scale(${U.value})` }), ie(t, "src", B.value), T(t, [n.e("content-img")]);
89
90
  }), e;
90
91
  }), w(() => {
91
92
  let e = k(_);
92
- T(c, [e.e("toolbar")]), T(l, [e.e("toolbar-item")]);
93
- }), E(l, null, 0), f(k(i)), y(l, "click", j(K, ["stop"])), w(() => T(d, [k(_).e("toolbar-item")])), E(d, null, 0), f(k(a)), y(d, "click", j(q, ["stop"])), w(() => T(h, [k(_).e("toolbar-item")])), E(h, null, 0), f(k(te)), y(h, "click", j(J, ["stop"])), w(() => T(g, [k(_).e("toolbar-item")])), E(g, null, 0), f(k(ne)), y(g, "click", j(Y, ["stop"])), w(() => T(b, [k(_).e("toolbar-item")])), E(b, null, 0), f(k(o)), y(b, "click", j(X, ["stop"])), w(() => T(x, [k(_).e("toolbar-item")])), E(x, null, 0), f(k(ee)), y(x, "click", j(ce, ["stop"])), w(() => T(S, [k(_).e("toolbar-item")])), E(S, null, 0), f(k(s)), y(S, "click", j(le, ["stop"])), w(() => T(C, [k(_).e("toolbar-item")])), E(C, null, 0), f(k(r)), y(C, "click", j(ae, ["stop"])), e;
94
- }, null, 129), !0);
93
+ T(s, [e.e("toolbar")]), T(c, [e.e("toolbar-item")]);
94
+ }), E(c, null, 0), d(k(te)), y(c, "click", j(K, ["stop"])), w(() => T(u, [k(_).e("toolbar-item")])), E(u, null, 0), d(k(i)), y(u, "click", j(q, ["stop"])), w(() => T(m, [k(_).e("toolbar-item")])), E(m, null, 0), d(k(ne)), y(m, "click", j(J, ["stop"])), w(() => T(h, [k(_).e("toolbar-item")])), E(h, null, 0), d(k(re)), y(h, "click", j(Y, ["stop"])), w(() => T(g, [k(_).e("toolbar-item")])), E(g, null, 0), d(k(a)), y(g, "click", j(X, ["stop"])), w(() => T(b, [k(_).e("toolbar-item")])), E(b, null, 0), d(k(ee)), y(b, "click", j($, ["stop"])), w(() => T(x, [k(_).e("toolbar-item")])), E(x, null, 0), d(k(o)), y(x, "click", j(ue, ["stop"])), w(() => T(S, [k(_).e("toolbar-item")])), E(S, null, 0), d(k(r)), y(S, "click", j(oe, ["stop"])), e;
95
+ }, null, 129))];
95
96
  }
96
97
  });
97
98
  //#endregion
@@ -40,7 +40,9 @@ export declare const SImagePreview: ((__VLS_props: NonNullable<Awaited<typeof __
40
40
  }) & Plugin;
41
41
  export declare const SImageGroup: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
42
42
  attrs: any;
43
- slots: {};
43
+ slots: {
44
+ default?: (props: {}) => any;
45
+ };
44
46
  emit: (event: "update:modelValue", value: boolean) => void;
45
47
  }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
46
48
  props: PublicProps & {
@@ -52,7 +54,9 @@ export declare const SImageGroup: ((__VLS_props: NonNullable<Awaited<typeof __VL
52
54
  } ? P : {});
53
55
  expose: (exposed: {}) => void;
54
56
  attrs: any;
55
- slots: {};
57
+ slots: {
58
+ default?: (props: {}) => any;
59
+ };
56
60
  emit: (event: "update:modelValue", value: boolean) => void;
57
61
  }>) => VNode & {
58
62
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -58,7 +58,7 @@ var C = v("<div>"), w = v("<div>", 1), T = /*@__PURE__*/ l({
58
58
  return p(() => {
59
59
  let e = b(E);
60
60
  m(B, [e.b(), e.m(b(F))]), _(B, D.value);
61
- }), h(B, null, 0), s(() => b(F) === "vertical", () => o(b(r), { padding: "8px" }, () => {
61
+ }), h(B, null, 0), s(() => b(F) === "vertical", () => o(b(r), { padding: "4px" }, () => {
62
62
  let e = C();
63
63
  return p(() => m(e, [b(E).e("content")])), h(e, null, 0), c(), e;
64
64
  })), h(B, null, 1), s(() => b(F) === "horizontal", () => {
@@ -82,7 +82,7 @@ var N = /*@__PURE__*/ m({
82
82
  let e = u(D(i), {
83
83
  manual: "",
84
84
  placement: () => D(F)?.mode.value === "horizontal" ? "bottom-start" : "right-start",
85
- offset: [0, 4],
85
+ offset: [0, 8],
86
86
  onClickOutside: () => W
87
87
  }, {
88
88
  content: () => d(() => D(F)?.mode.value === "horizontal" && h.subContent, () => {
@@ -11,10 +11,6 @@ export declare const SModal: ((__VLS_props: NonNullable<Awaited<typeof __VLS_set
11
11
  modalValue?: boolean | undefined;
12
12
  width?: string | number | undefined;
13
13
  height?: string | number | undefined;
14
- minWidth?: number | undefined;
15
- minHeight?: number | undefined;
16
- maxWidth?: number | undefined;
17
- maxHeight?: number | undefined;
18
14
  title?: string | undefined;
19
15
  fullscreen?: boolean | undefined;
20
16
  fullable?: boolean | undefined;
@@ -32,7 +28,6 @@ export declare const SModal: ((__VLS_props: NonNullable<Awaited<typeof __VLS_set
32
28
  mask?: boolean | undefined;
33
29
  to?: (string | HTMLElement) | undefined;
34
30
  draggable?: boolean | undefined;
35
- resizable?: boolean | undefined;
36
31
  modalStyle?: Record<string, string> | undefined;
37
32
  maskStyle?: Record<string, string> | undefined;
38
33
  center?: boolean | undefined;