savor-ui 0.0.6 → 0.0.7
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 +2 -0
- package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_vapor_true_lang.mjs +28 -28
- package/dist/es/components/src/button/index.d.ts +2 -2
- package/dist/es/components/src/button/types.d.ts +2 -2
- package/dist/es/components/src/divider/divider.vue_vue_type_script_setup_true_vapor_true_lang.mjs +3 -3
- package/dist/es/components/src/divider/index.d.ts +1 -1
- package/dist/es/components/src/divider/types.d.ts +1 -1
- package/dist/es/core/index.d.ts +1 -0
- package/dist/es/theme/components/button.scss +5 -1
- package/dist/es/theme/components/layout.scss +1 -0
- package/dist/json/vetur-attributes.json +2 -3
- package/dist/json/vetur-tags.json +1 -1
- package/dist/json/web-types.json +3 -3
- package/package.json +1 -1
- package/dist/es/core/env.d.ts +0 -8
package/CHANGELOG.md
CHANGED
package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -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,
|
|
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
|
|
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(
|
|
27
|
-
let
|
|
28
|
-
t(
|
|
29
|
-
let
|
|
30
|
-
return (e, t) => (
|
|
31
|
-
class:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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:
|
|
45
|
-
"html-type":
|
|
44
|
+
disabled: u.disabled || u.loading,
|
|
45
|
+
"html-type": u.htmlType,
|
|
46
46
|
ref_key: "btnRef",
|
|
47
|
-
ref:
|
|
48
|
-
}, [e.$slots.icon && !
|
|
47
|
+
ref: S
|
|
48
|
+
}, [(e.$slots.icon || u.icon) && !u.loading ? (p(), s("div", {
|
|
49
49
|
key: 0,
|
|
50
|
-
class:
|
|
51
|
-
}, [
|
|
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:
|
|
54
|
-
}, [
|
|
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 {
|
|
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?:
|
|
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?:
|
|
22
|
+
icon?: Component;
|
|
23
23
|
/** 是否为圆形按钮 */
|
|
24
24
|
circle?: boolean;
|
|
25
25
|
/** 是否为块级按钮 */
|
package/dist/es/components/src/divider/divider.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -11,14 +11,14 @@ var d = /* @__PURE__ */ a({
|
|
|
11
11
|
vertical: { type: Boolean },
|
|
12
12
|
margin: { default: 8 },
|
|
13
13
|
position: { default: "center" },
|
|
14
|
-
|
|
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.
|
|
21
|
-
borderTopStyle: d.vertical ? "none" : d.
|
|
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
|
-
|
|
11
|
+
boderStyle?: "solid" | "dashed" | "dotted" | "double" | undefined;
|
|
12
12
|
label?: string | undefined;
|
|
13
13
|
} & (typeof globalThis extends {
|
|
14
14
|
__VLS_PROPS_FALLBACK: infer P;
|
package/dist/es/core/index.d.ts
CHANGED
|
@@ -18,7 +18,11 @@
|
|
|
18
18
|
display: flex;
|
|
19
19
|
align-items: center;
|
|
20
20
|
justify-content: center;
|
|
21
|
-
color:
|
|
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");
|
|
@@ -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/
|
|
548
|
+
"s-divider/boderStyle": {
|
|
550
549
|
"description": "分隔线样式"
|
|
551
550
|
},
|
|
552
551
|
"s-divider/label": {
|
package/dist/json/web-types.json
CHANGED
|
@@ -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
|
+
"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": "
|
|
383
|
+
"type": "Component",
|
|
384
384
|
"kind": "expression"
|
|
385
385
|
}
|
|
386
386
|
},
|
|
@@ -1431,7 +1431,7 @@
|
|
|
1431
1431
|
}
|
|
1432
1432
|
},
|
|
1433
1433
|
{
|
|
1434
|
-
"name": "
|
|
1434
|
+
"name": "boderStyle",
|
|
1435
1435
|
"description": "分隔线样式",
|
|
1436
1436
|
"value": {
|
|
1437
1437
|
"type": "solid | dashed | dotted | double",
|
package/package.json
CHANGED
package/dist/es/core/env.d.ts
DELETED