savor-ui 0.0.6 → 0.0.8

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,10 @@
2
2
 
3
3
 
4
4
 
5
+ ## [0.0.8](https://gitee.com/mach552/savor-ui/compare/v0.0.7...v0.0.8) (2026-05-11)
6
+
7
+ ## [0.0.7](https://gitee.com/mach552/savor-ui/compare/v0.0.6...v0.0.7) (2026-05-11)
8
+
5
9
  ## [0.0.6](https://gitee.com/mach552/savor-ui/compare/v0.0.5...v0.0.6) (2026-05-11)
6
10
 
7
11
  ## [0.0.5](https://gitee.com/mach552/savor-ui/compare/v0.0.4...v0.0.5) (2026-05-10)
package/README.md CHANGED
@@ -4,3 +4,5 @@
4
4
  - Written in TypeScript
5
5
 
6
6
  ## 快速开始
7
+
8
+ # 安装
@@ -4,9 +4,9 @@ import "../../../hooks/index.mjs";
4
4
  import n from "../../../icons/src/loading.vue.mjs";
5
5
  import "../../../icons/index.mjs";
6
6
  import { buttonGroupContextKey as r } from "./types.mjs";
7
- import { computed as i, createCommentVNode as a, createElementBlock as o, createTextVNode as s, createVNode as c, defineComponent as l, inject as u, normalizeClass as d, openBlock as f, renderSlot as p, toDisplayString as m, unref as h, useTemplateRef as g } from "vue";
7
+ import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, inject as d, normalizeClass as f, openBlock as p, renderSlot as m, resolveDynamicComponent as h, toDisplayString as g, unref as _, useTemplateRef as v } from "vue";
8
8
  //#region ../components/src/button/button.vue?vue&type=script&setup=true&vapor=true&lang.ts
9
- var _ = ["disabled", "html-type"], v = /* @__PURE__ */ l({
9
+ var y = ["disabled", "html-type"], b = /* @__PURE__ */ u({
10
10
  name: "SButton",
11
11
  __name: "button",
12
12
  props: {
@@ -23,36 +23,36 @@ var _ = ["disabled", "html-type"], v = /* @__PURE__ */ l({
23
23
  link: { type: Boolean },
24
24
  secondary: { type: Boolean }
25
25
  },
26
- setup(l) {
27
- let v = l, y = e("button"), b = g("btnRef");
28
- t(b);
29
- let x = u(r, void 0), S = i(() => x?.size?.value || v.size);
30
- return (e, t) => (f(), o("button", {
31
- class: d([
32
- h(y).b(),
33
- h(y).m(l.type),
34
- h(y).m(S.value),
35
- h(y).is("circle", l.circle),
36
- h(y).is("block", l.block),
37
- h(y).is("text", l.text),
38
- h(y).is("secondary", l.secondary),
39
- h(y).is("link", l.link),
40
- h(y).is("disabled", l.disabled),
41
- h(y).is("loading", l.loading),
42
- h(y).is("only-icon", !e.$slots.default && !l.label)
26
+ setup(u) {
27
+ let b = u, x = e("button"), S = v("btnRef");
28
+ t(S);
29
+ let C = d(r, void 0), w = i(() => C?.size?.value || b.size);
30
+ return (e, t) => (p(), s("button", {
31
+ class: f([
32
+ _(x).b(),
33
+ _(x).m(u.type),
34
+ _(x).m(w.value),
35
+ _(x).is("circle", u.circle),
36
+ _(x).is("block", u.block),
37
+ _(x).is("text", u.text),
38
+ _(x).is("secondary", u.secondary),
39
+ _(x).is("link", u.link),
40
+ _(x).is("disabled", u.disabled),
41
+ _(x).is("loading", u.loading),
42
+ _(x).is("only-icon", !e.$slots.default && !u.label)
43
43
  ]),
44
- disabled: l.disabled || l.loading,
45
- "html-type": l.htmlType,
44
+ disabled: u.disabled || u.loading,
45
+ "html-type": u.htmlType,
46
46
  ref_key: "btnRef",
47
- ref: b
48
- }, [e.$slots.icon && !l.loading ? (f(), o("div", {
47
+ ref: S
48
+ }, [(e.$slots.icon || u.icon) && !u.loading ? (p(), s("div", {
49
49
  key: 0,
50
- class: d([h(y).e("icon")])
51
- }, [p(e.$slots, "icon")], 2)) : l.loading ? (f(), o("div", {
50
+ class: f([_(x).e("icon")])
51
+ }, [m(e.$slots, "icon", {}, () => [(p(), a(h(u.icon)))])], 2)) : u.loading ? (p(), s("div", {
52
52
  key: 1,
53
- class: d([h(y).e("icon")])
54
- }, [c(h(n))], 2)) : a("", !0), p(e.$slots, "default", {}, () => [s(m(l.label), 1)])], 10, _));
53
+ class: f([_(x).e("icon")])
54
+ }, [l(_(n))], 2)) : o("", !0), m(e.$slots, "default", {}, () => [c(g(u.label), 1)])], 10, y));
55
55
  }
56
56
  });
57
57
  //#endregion
58
- export { v as default };
58
+ export { b as default };
@@ -1,5 +1,5 @@
1
1
  import { ButtonSlots, ButtonGroupProps, ButtonGroupSlots } from './types';
2
- import { PublicProps, VNode, Plugin, CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
2
+ import { PublicProps, Component, VNode, Plugin, CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
3
3
  export declare const SButton: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
4
  attrs: any;
5
5
  slots: ButtonSlots;
@@ -12,7 +12,7 @@ export declare const SButton: ((__VLS_props: NonNullable<Awaited<typeof __VLS_se
12
12
  label?: string | undefined;
13
13
  disabled?: boolean | undefined;
14
14
  loading?: boolean | undefined;
15
- icon?: string | undefined;
15
+ icon?: Component | undefined;
16
16
  circle?: boolean | undefined;
17
17
  block?: boolean | undefined;
18
18
  text?: boolean | undefined;
@@ -1,4 +1,4 @@
1
- import { InjectionKey, Ref } from 'vue';
1
+ import { Component, InjectionKey, Ref } from 'vue';
2
2
  export interface ButtonProps {
3
3
  /** 按钮类型
4
4
  * @default default
@@ -19,7 +19,7 @@ export interface ButtonProps {
19
19
  /** 是否加载中 */
20
20
  loading?: boolean;
21
21
  /** 按钮图标 */
22
- icon?: string;
22
+ icon?: Component;
23
23
  /** 是否为圆形按钮 */
24
24
  circle?: boolean;
25
25
  /** 是否为块级按钮 */
@@ -11,14 +11,14 @@ var d = /* @__PURE__ */ a({
11
11
  vertical: { type: Boolean },
12
12
  margin: { default: 8 },
13
13
  position: { default: "center" },
14
- style: { default: "solid" },
14
+ boderStyle: {},
15
15
  label: {}
16
16
  },
17
17
  setup(a) {
18
18
  let d = a, f = t("divider"), p = n(() => ({
19
19
  margin: d.vertical ? `0 ${e(d.margin)}` : `${e(d.margin)} 0`,
20
- borderLeftStyle: d.vertical ? d.style : "none",
21
- borderTopStyle: d.vertical ? "none" : d.style
20
+ borderLeftStyle: d.vertical ? d.boderStyle : "none",
21
+ borderTopStyle: d.vertical ? "none" : d.boderStyle
22
22
  }));
23
23
  return (e, t) => (c(), i("div", {
24
24
  class: o([
@@ -8,7 +8,7 @@ export declare const SDivider: ((__VLS_props: NonNullable<Awaited<typeof __VLS_s
8
8
  vertical?: boolean | undefined;
9
9
  margin?: string | number | undefined;
10
10
  position?: "left" | "center" | "right" | undefined;
11
- style?: "solid" | "dashed" | "dotted" | "double" | undefined;
11
+ boderStyle?: "solid" | "dashed" | "dotted" | "double" | undefined;
12
12
  label?: string | undefined;
13
13
  } & (typeof globalThis extends {
14
14
  __VLS_PROPS_FALLBACK: infer P;
@@ -12,7 +12,7 @@ export interface DividerProps {
12
12
  /** 分隔线样式
13
13
  * @default solid
14
14
  */
15
- style?: "solid" | "dashed" | "dotted" | "double";
15
+ boderStyle?: "solid" | "dashed" | "dotted" | "double";
16
16
  /** 分隔线标签 */
17
17
  label?: string;
18
18
  }
@@ -1,3 +1,4 @@
1
+ import type {} from "./global";
1
2
  import { Plugin } from 'vue';
2
3
  declare const installer: Plugin;
3
4
  export * from '../components/index.ts';
@@ -18,7 +18,11 @@
18
18
  display: flex;
19
19
  align-items: center;
20
20
  justify-content: center;
21
- color: getCssVar("color", "text-1");
21
+ color: inherit;
22
+ svg {
23
+ height: 1em;
24
+ width: 1em;
25
+ }
22
26
  }
23
27
  @include when(circle) {
24
28
  border-radius: getCssVar("radius", "circle");
@@ -6,6 +6,7 @@
6
6
  flex-direction: column;
7
7
  width: 100%;
8
8
  box-sizing: border-box;
9
+ background-color: getCssVar("color", "bg-1");
9
10
 
10
11
  @include when(horizontal) {
11
12
  flex-direction: row;
@@ -143,8 +143,7 @@
143
143
  "type": "boolean"
144
144
  },
145
145
  "s-button/icon": {
146
- "description": "按钮图标",
147
- "type": "string"
146
+ "description": "按钮图标"
148
147
  },
149
148
  "s-button/circle": {
150
149
  "description": "是否为圆形按钮",
@@ -546,7 +545,7 @@
546
545
  "s-divider/position": {
547
546
  "description": "分隔线位置"
548
547
  },
549
- "s-divider/style": {
548
+ "s-divider/boderStyle": {
550
549
  "description": "分隔线样式"
551
550
  },
552
551
  "s-divider/label": {
@@ -235,7 +235,7 @@
235
235
  "vertical",
236
236
  "margin",
237
237
  "position",
238
- "style",
238
+ "boderStyle",
239
239
  "label"
240
240
  ]
241
241
  },
@@ -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.0.5",
5
+ "version": "0.0.6",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
@@ -380,7 +380,7 @@
380
380
  "name": "icon",
381
381
  "description": "按钮图标",
382
382
  "value": {
383
- "type": "string",
383
+ "type": "Component",
384
384
  "kind": "expression"
385
385
  }
386
386
  },
@@ -1431,7 +1431,7 @@
1431
1431
  }
1432
1432
  },
1433
1433
  {
1434
- "name": "style",
1434
+ "name": "boderStyle",
1435
1435
  "description": "分隔线样式",
1436
1436
  "value": {
1437
1437
  "type": "solid | dashed | dotted | double",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "savor-ui",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "A Vue3 Components Library",
5
5
  "keywords": [
6
6
  "component library",
@@ -1,8 +0,0 @@
1
- /// <reference types="vite/client" />
2
-
3
- declare module '*' {
4
- import type { DefineComponent } from "vue";
5
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
- const component: DefineComponent<object, object, any>;
7
- export default component;
8
- }