savor-ui 0.0.5 → 0.0.6
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/index.mjs +1 -1
- package/dist/es/components/src/button/button.d.ts +17 -17
- package/dist/es/components/src/button/button.vue.mjs +1 -1
- package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_vapor_true_lang.mjs +58 -0
- package/dist/es/components/src/button/index.d.ts +29 -38
- package/dist/es/components/src/button/types.d.ts +29 -29
- package/dist/es/components/src/checkbox/checkbox-group.d.ts +5 -5
- package/dist/es/components/src/checkbox/checkbox-group.vue_vue_type_script_setup_true_lang.mjs +2 -1
- package/dist/es/components/src/checkbox/checkbox.vue_vue_type_script_setup_true_lang.mjs +8 -8
- package/dist/es/components/src/checkbox/index.d.ts +13 -13
- package/dist/es/components/src/checkbox/types.d.ts +7 -6
- package/dist/es/components/src/collapse/collapse-item.vue_vue_type_script_setup_true_lang.mjs +13 -14
- package/dist/es/components/src/collapse/types.d.ts +3 -3
- package/dist/es/components/src/divider/divider.d.ts +18 -14
- package/dist/es/components/src/divider/divider.vue.mjs +1 -1
- package/dist/es/components/src/divider/divider.vue_vue_type_script_setup_true_vapor_true_lang.mjs +37 -0
- package/dist/es/components/src/divider/index.d.ts +21 -28
- package/dist/es/components/src/divider/types.d.ts +11 -13
- package/dist/es/components/src/icon/icon.d.ts +17 -11
- package/dist/es/components/src/icon/icon.vue.mjs +1 -1
- package/dist/es/components/src/icon/{icon.vue_vue_type_script_setup_true_lang.mjs → icon.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +3 -3
- package/dist/es/components/src/icon/index.d.ts +19 -22
- package/dist/es/components/src/icon/types.d.ts +3 -5
- package/dist/es/components/src/select/select.vue_vue_type_script_setup_true_lang.mjs +48 -48
- package/dist/es/components/src/space/space.vue_vue_type_script_setup_true_lang.mjs +15 -18
- package/dist/es/components/src/switch/switch.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/dist/es/components/src/tabs/tab-pane.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/dist/es/components/src/tabs/tab.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/dist/es/components/src/tag/index.d.ts +2 -4
- package/dist/es/components/src/tag/tag.d.ts +2 -5
- package/dist/es/components/src/tag/tag.vue_vue_type_script_setup_true_lang.mjs +7 -7
- package/dist/es/components/src/tag/types.d.ts +4 -0
- package/dist/es/components/src/tree/node.vue_vue_type_script_setup_true_lang.mjs +4 -4
- package/dist/es/core/components.mjs +65 -63
- package/dist/es/core/index.mjs +14 -14
- package/dist/es/theme/components/auto-complete.scss +22 -40
- package/dist/es/theme/components/button.scss +1 -1
- package/dist/es/theme/components/color-picker.scss +39 -75
- package/dist/es/theme/components/date-picker.scss +3 -3
- package/dist/es/theme/components/datetime-picker.scss +3 -3
- package/dist/es/theme/components/form.scss +14 -14
- package/dist/es/theme/components/input-number.scss +3 -3
- package/dist/es/theme/components/input-tag.scss +3 -3
- package/dist/es/theme/components/input.scss +3 -3
- package/dist/es/theme/components/segmented.scss +10 -13
- package/dist/es/theme/components/switch.scss +1 -1
- package/dist/es/theme/components/textarea.scss +40 -40
- package/dist/json/vetur-attributes.json +42 -36
- package/dist/json/vetur-tags.json +12 -11
- package/dist/json/web-types.json +75 -64
- package/package.json +1 -1
- package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_lang.mjs +0 -70
- package/dist/es/components/src/divider/divider.vue_vue_type_script_setup_true_lang.mjs +0 -35
package/CHANGELOG.md
CHANGED
|
@@ -10,7 +10,6 @@ import "./src/input/index.mjs";
|
|
|
10
10
|
import "./src/scrollbar/index.mjs";
|
|
11
11
|
import "./src/auto-complete/index.mjs";
|
|
12
12
|
import "./src/avatar/index.mjs";
|
|
13
|
-
import "./src/icon/index.mjs";
|
|
14
13
|
import "./src/button/types.mjs";
|
|
15
14
|
import "./src/back-top/index.mjs";
|
|
16
15
|
import "./src/badge/index.mjs";
|
|
@@ -23,6 +22,7 @@ import "./src/checkbox/index.mjs";
|
|
|
23
22
|
import "./src/collapse/types.mjs";
|
|
24
23
|
import "./src/collapse/index.mjs";
|
|
25
24
|
import "./src/empty/index.mjs";
|
|
25
|
+
import "./src/icon/index.mjs";
|
|
26
26
|
import "./src/select/index.mjs";
|
|
27
27
|
import "./src/color-picker/index.mjs";
|
|
28
28
|
import "./src/date-picker/index.mjs";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { ButtonProps, ButtonSlots } from './types';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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<ButtonProps> & (typeof globalThis extends {
|
|
5
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
6
|
+
} ? P : {});
|
|
7
|
+
expose: (exposed: {}) => void;
|
|
8
|
+
attrs: any;
|
|
9
|
+
slots: ButtonSlots;
|
|
10
|
+
emit: {};
|
|
11
|
+
}>) => VNode & {
|
|
12
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
13
|
+
};
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
15
15
|
export default _default;
|
|
16
|
-
type
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
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
|
+
}) & {};
|
package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_vapor_true_lang.mjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
|
+
import { useRipple as t } from "../../../hooks/src/use-ripple.mjs";
|
|
3
|
+
import "../../../hooks/index.mjs";
|
|
4
|
+
import n from "../../../icons/src/loading.vue.mjs";
|
|
5
|
+
import "../../../icons/index.mjs";
|
|
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";
|
|
8
|
+
//#region ../components/src/button/button.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
9
|
+
var _ = ["disabled", "html-type"], v = /* @__PURE__ */ l({
|
|
10
|
+
name: "SButton",
|
|
11
|
+
__name: "button",
|
|
12
|
+
props: {
|
|
13
|
+
type: { default: "default" },
|
|
14
|
+
size: { default: "medium" },
|
|
15
|
+
htmlType: { default: "button" },
|
|
16
|
+
label: {},
|
|
17
|
+
disabled: { type: Boolean },
|
|
18
|
+
loading: { type: Boolean },
|
|
19
|
+
icon: {},
|
|
20
|
+
circle: { type: Boolean },
|
|
21
|
+
block: { type: Boolean },
|
|
22
|
+
text: { type: Boolean },
|
|
23
|
+
link: { type: Boolean },
|
|
24
|
+
secondary: { type: Boolean }
|
|
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)
|
|
43
|
+
]),
|
|
44
|
+
disabled: l.disabled || l.loading,
|
|
45
|
+
"html-type": l.htmlType,
|
|
46
|
+
ref_key: "btnRef",
|
|
47
|
+
ref: b
|
|
48
|
+
}, [e.$slots.icon && !l.loading ? (f(), o("div", {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: d([h(y).e("icon")])
|
|
51
|
+
}, [p(e.$slots, "icon")], 2)) : l.loading ? (f(), o("div", {
|
|
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, _));
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
//#endregion
|
|
58
|
+
export { v as default };
|
|
@@ -1,41 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export declare const SButton: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
htmlType
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
onClick?: ((e: MouseEvent) => any) | undefined;
|
|
31
|
-
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
32
|
-
click: (e: MouseEvent) => any;
|
|
33
|
-
}, string, {
|
|
34
|
-
size: "mini" | "small" | "medium" | "large";
|
|
35
|
-
type: "default" | "primary" | "success" | "warning" | "danger" | "info";
|
|
36
|
-
htmlType: "button" | "submit";
|
|
37
|
-
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
38
|
-
$slots: ButtonSlots;
|
|
1
|
+
import { ButtonSlots, ButtonGroupProps, ButtonGroupSlots } from './types';
|
|
2
|
+
import { PublicProps, VNode, Plugin, CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
|
|
3
|
+
export declare const SButton: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
4
|
+
attrs: any;
|
|
5
|
+
slots: ButtonSlots;
|
|
6
|
+
emit: {};
|
|
7
|
+
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
|
+
props: PublicProps & {
|
|
9
|
+
type?: "default" | "primary" | "success" | "warning" | "danger" | "info" | undefined;
|
|
10
|
+
size?: "mini" | "small" | "medium" | "large" | undefined;
|
|
11
|
+
htmlType?: "button" | "submit" | "reset" | undefined;
|
|
12
|
+
label?: string | undefined;
|
|
13
|
+
disabled?: boolean | undefined;
|
|
14
|
+
loading?: boolean | undefined;
|
|
15
|
+
icon?: string | undefined;
|
|
16
|
+
circle?: boolean | undefined;
|
|
17
|
+
block?: boolean | undefined;
|
|
18
|
+
text?: boolean | undefined;
|
|
19
|
+
link?: boolean | undefined;
|
|
20
|
+
secondary?: boolean | undefined;
|
|
21
|
+
} & (typeof globalThis extends {
|
|
22
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
23
|
+
} ? P : {});
|
|
24
|
+
expose: (exposed: {}) => void;
|
|
25
|
+
attrs: any;
|
|
26
|
+
slots: ButtonSlots;
|
|
27
|
+
emit: {};
|
|
28
|
+
}>) => VNode & {
|
|
29
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
39
30
|
}) & Plugin;
|
|
40
31
|
export declare const SButtonGroup: {
|
|
41
32
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ButtonGroupProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InjectionKey, Ref } from 'vue';
|
|
2
2
|
export interface ButtonProps {
|
|
3
|
-
/** 按钮文字 */
|
|
4
|
-
label?: string;
|
|
5
3
|
/** 按钮类型
|
|
6
4
|
* @default default
|
|
7
5
|
*/
|
|
8
6
|
type?: "default" | "primary" | "success" | "warning" | "danger" | "info";
|
|
9
|
-
/**
|
|
7
|
+
/** 按钮大小
|
|
10
8
|
* @default medium
|
|
11
9
|
*/
|
|
12
10
|
size?: "mini" | "small" | "medium" | "large";
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
/**
|
|
11
|
+
/** 按钮HTML类型
|
|
12
|
+
* @default button
|
|
13
|
+
*/
|
|
14
|
+
htmlType?: "button" | "submit" | "reset";
|
|
15
|
+
/** 按钮标签 */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** 是否禁用按钮 */
|
|
20
18
|
disabled?: boolean;
|
|
21
|
-
/**
|
|
19
|
+
/** 是否加载中 */
|
|
22
20
|
loading?: boolean;
|
|
21
|
+
/** 按钮图标 */
|
|
22
|
+
icon?: string;
|
|
23
|
+
/** 是否为圆形按钮 */
|
|
24
|
+
circle?: boolean;
|
|
23
25
|
/** 是否为块级按钮 */
|
|
24
26
|
block?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
|
|
27
|
+
/** 是否为文本按钮 */
|
|
28
|
+
text?: boolean;
|
|
29
|
+
/** 是否为链接按钮 */
|
|
30
|
+
link?: boolean;
|
|
31
|
+
/** 是否为次要按钮 */
|
|
32
|
+
secondary?: boolean;
|
|
31
33
|
}
|
|
32
34
|
export interface ButtonSlots {
|
|
33
|
-
/**
|
|
34
|
-
default
|
|
35
|
-
/**
|
|
36
|
-
icon
|
|
37
|
-
}
|
|
38
|
-
export interface ButtonEmits {
|
|
39
|
-
/** 点击按钮时触发 */
|
|
40
|
-
click: [e: MouseEvent];
|
|
35
|
+
/** 默认 */
|
|
36
|
+
default: () => any;
|
|
37
|
+
/** 图标 */
|
|
38
|
+
icon: () => any;
|
|
41
39
|
}
|
|
42
40
|
export interface ButtonGroupProps {
|
|
43
|
-
/**
|
|
41
|
+
/** 按钮组大小
|
|
42
|
+
* @default medium
|
|
43
|
+
*/
|
|
44
44
|
size?: "mini" | "small" | "medium" | "large";
|
|
45
45
|
}
|
|
46
46
|
export interface ButtonGroupSlots {
|
|
47
|
-
/**
|
|
47
|
+
/** 默认 */
|
|
48
48
|
default?: () => any;
|
|
49
49
|
}
|
|
50
50
|
export interface ButtonGroupContext {
|
|
51
|
-
size?: Ref<"
|
|
51
|
+
size?: Ref<ButtonGroupProps["size"]>;
|
|
52
52
|
}
|
|
53
53
|
export declare const buttonGroupContextKey: InjectionKey<ButtonGroupContext>;
|
|
@@ -3,15 +3,15 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
|
|
|
3
3
|
type __VLS_Slots = CheckboxGroupSlots;
|
|
4
4
|
type __VLS_Props = CheckboxGroupProps;
|
|
5
5
|
type __VLS_ModelProps = {
|
|
6
|
-
modelValue?: Array<string | number
|
|
6
|
+
modelValue?: Array<string | number>;
|
|
7
7
|
};
|
|
8
8
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
9
|
declare const __VLS_base: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
10
|
-
change: (value: (string | number
|
|
11
|
-
"update:modelValue": (value: (string | number
|
|
10
|
+
change: (value: (string | number)[]) => any;
|
|
11
|
+
"update:modelValue": (value: (string | number)[]) => any;
|
|
12
12
|
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
-
onChange?: ((value: (string | number
|
|
14
|
-
"onUpdate:modelValue"?: ((value: (string | number
|
|
13
|
+
onChange?: ((value: (string | number)[]) => any) | undefined;
|
|
14
|
+
"onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
|
|
15
15
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
17
|
declare const _default: typeof __VLS_export;
|
package/dist/es/components/src/checkbox/checkbox-group.vue_vue_type_script_setup_true_lang.mjs
CHANGED
|
@@ -25,7 +25,8 @@ var f = /* @__PURE__ */ i({
|
|
|
25
25
|
let t = h.value.indexOf(e);
|
|
26
26
|
t !== -1 && (h.value = h.value.toSpliced(t, 1), p("change", h.value));
|
|
27
27
|
},
|
|
28
|
-
isMaxed: n(() => f.max !== void 0 && h.value.length >= f.max)
|
|
28
|
+
isMaxed: n(() => f.max !== void 0 && h.value.length >= f.max),
|
|
29
|
+
modelValue: h
|
|
29
30
|
}), (e, t) => (s(), r("div", { class: o([u(m).b(), u(m).is("vertical", i.vertical)]) }, [l(e.$slots, "default")], 2));
|
|
30
31
|
}
|
|
31
32
|
});
|
|
@@ -11,11 +11,7 @@ var h = [
|
|
|
11
11
|
name: "SCheckbox",
|
|
12
12
|
__name: "checkbox",
|
|
13
13
|
props: /* @__PURE__ */ l({
|
|
14
|
-
value: {
|
|
15
|
-
Boolean,
|
|
16
|
-
String,
|
|
17
|
-
Number
|
|
18
|
-
] },
|
|
14
|
+
value: {},
|
|
19
15
|
disabled: { type: Boolean },
|
|
20
16
|
indeterminate: { type: Boolean },
|
|
21
17
|
indeterminateValue: { type: Boolean }
|
|
@@ -37,10 +33,14 @@ var h = [
|
|
|
37
33
|
}),
|
|
38
34
|
emits: /* @__PURE__ */ l(["change"], ["update:modelValue", "update:indeterminate"]),
|
|
39
35
|
setup(s, { emit: l }) {
|
|
40
|
-
let g = s, _ = l, v = e("checkbox"), y = m(s, "modelValue"), b = m(s, "indeterminate"), x = c(t, void 0), S = r(() => b.value ? !1 : g.value === void 0 ? !!y.value : y.value === g.value), C = (e) => {
|
|
36
|
+
let g = s, _ = l, v = e("checkbox"), y = m(s, "modelValue"), b = m(s, "indeterminate"), x = c(t, void 0), S = r(() => b.value ? !1 : x && g.value !== void 0 ? x.modelValue.value.includes(g.value) : g.value === void 0 ? !!y.value : y.value === g.value), C = (e) => {
|
|
41
37
|
if (w.value) return;
|
|
42
|
-
let t = e.target;
|
|
43
|
-
b.value &&= !1,
|
|
38
|
+
let t = e.target.checked;
|
|
39
|
+
if (b.value &&= !1, x && g.value !== void 0) {
|
|
40
|
+
t ? x.addValue(g.value) : x.removeValue(g.value), _("change", t);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
g.value === void 0 ? y.value = t : y.value = t ? g.value : void 0, _("change", t);
|
|
44
44
|
}, w = r(() => y.value === void 0 ? g.disabled || x?.isMaxed.value : !1);
|
|
45
45
|
return (e, t) => (d(), a("label", { class: u([
|
|
46
46
|
p(v).b(),
|
|
@@ -46,13 +46,13 @@ export declare const SCheckbox: {
|
|
|
46
46
|
}) & Plugin;
|
|
47
47
|
export declare const SCheckboxGroup: {
|
|
48
48
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< CheckboxGroupProps & {
|
|
49
|
-
modelValue?: Array<string | number
|
|
49
|
+
modelValue?: Array<string | number>;
|
|
50
50
|
}> & Readonly<{
|
|
51
|
-
onChange?: ((value: (string | number
|
|
52
|
-
"onUpdate:modelValue"?: ((value: (string | number
|
|
51
|
+
onChange?: ((value: (string | number)[]) => any) | undefined;
|
|
52
|
+
"onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
|
|
53
53
|
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
54
|
-
change: (value: (string | number
|
|
55
|
-
"update:modelValue": (value: (string | number
|
|
54
|
+
change: (value: (string | number)[]) => any;
|
|
55
|
+
"update:modelValue": (value: (string | number)[]) => any;
|
|
56
56
|
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
57
57
|
P: {};
|
|
58
58
|
B: {};
|
|
@@ -61,22 +61,22 @@ export declare const SCheckboxGroup: {
|
|
|
61
61
|
M: {};
|
|
62
62
|
Defaults: {};
|
|
63
63
|
}, Readonly< CheckboxGroupProps & {
|
|
64
|
-
modelValue?: Array<string | number
|
|
64
|
+
modelValue?: Array<string | number>;
|
|
65
65
|
}> & Readonly<{
|
|
66
|
-
onChange?: ((value: (string | number
|
|
67
|
-
"onUpdate:modelValue"?: ((value: (string | number
|
|
66
|
+
onChange?: ((value: (string | number)[]) => any) | undefined;
|
|
67
|
+
"onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
|
|
68
68
|
}>, {}, {}, {}, {}, {}>;
|
|
69
69
|
__isFragment?: never;
|
|
70
70
|
__isTeleport?: never;
|
|
71
71
|
__isSuspense?: never;
|
|
72
72
|
} & ComponentOptionsBase<Readonly< CheckboxGroupProps & {
|
|
73
|
-
modelValue?: Array<string | number
|
|
73
|
+
modelValue?: Array<string | number>;
|
|
74
74
|
}> & Readonly<{
|
|
75
|
-
onChange?: ((value: (string | number
|
|
76
|
-
"onUpdate:modelValue"?: ((value: (string | number
|
|
75
|
+
onChange?: ((value: (string | number)[]) => any) | undefined;
|
|
76
|
+
"onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
|
|
77
77
|
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
78
|
-
change: (value: (string | number
|
|
79
|
-
"update:modelValue": (value: (string | number
|
|
78
|
+
change: (value: (string | number)[]) => any;
|
|
79
|
+
"update:modelValue": (value: (string | number)[]) => any;
|
|
80
80
|
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
81
81
|
$slots: CheckboxGroupSlots;
|
|
82
82
|
}) & Plugin;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ComputedRef, InjectionKey } from 'vue';
|
|
1
|
+
import { ComputedRef, InjectionKey, Ref } from 'vue';
|
|
2
2
|
export interface CheckboxProps {
|
|
3
3
|
/** 复选框值 */
|
|
4
|
-
value?:
|
|
4
|
+
value?: string | number;
|
|
5
5
|
/** 是否禁用 */
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
/** 是否为半选状态 */
|
|
@@ -17,7 +17,7 @@ export interface CheckboxSlots {
|
|
|
17
17
|
/** 默认插槽 */
|
|
18
18
|
default: () => any;
|
|
19
19
|
/** 自定义复选框内容 */
|
|
20
|
-
check
|
|
20
|
+
check?: (props: {
|
|
21
21
|
checked: boolean;
|
|
22
22
|
indeterminate: boolean;
|
|
23
23
|
}) => any;
|
|
@@ -30,15 +30,16 @@ export interface CheckboxGroupProps {
|
|
|
30
30
|
}
|
|
31
31
|
export interface CheckboxGroupEmits {
|
|
32
32
|
/** 选中状态变化时触发 */
|
|
33
|
-
change: [value: Array<string | number
|
|
33
|
+
change: [value: Array<string | number>];
|
|
34
34
|
}
|
|
35
35
|
export interface CheckboxGroupSlots {
|
|
36
36
|
/** 默认插槽 */
|
|
37
37
|
default?: () => any;
|
|
38
38
|
}
|
|
39
39
|
export interface CheckboxGroupContext {
|
|
40
|
-
addValue: (value: string | number |
|
|
41
|
-
removeValue: (value: string | number |
|
|
40
|
+
addValue: (value: string | number | undefined) => void;
|
|
41
|
+
removeValue: (value: string | number | undefined) => void;
|
|
42
42
|
isMaxed: ComputedRef<boolean>;
|
|
43
|
+
modelValue: Ref<Array<string | number>>;
|
|
43
44
|
}
|
|
44
45
|
export declare const checkboxGroupContextKey: InjectionKey<CheckboxGroupContext>;
|
package/dist/es/components/src/collapse/collapse-item.vue_vue_type_script_setup_true_lang.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import n from "../_comp/HeightTransition.vue.mjs";
|
|
|
6
6
|
import { collapseContextKey as r } from "./types.mjs";
|
|
7
7
|
import { computed as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, inject as u, normalizeClass as d, normalizeStyle as f, openBlock as p, renderSlot as m, toDisplayString as h, unref as g, vShow as _, withCtx as v, withDirectives as y } from "vue";
|
|
8
8
|
//#region ../components/src/collapse/collapse-item.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var b =
|
|
9
|
+
var b = /* @__PURE__ */ l({
|
|
10
10
|
name: "SCollapseItem",
|
|
11
11
|
__name: "collapse-item",
|
|
12
12
|
props: {
|
|
@@ -15,25 +15,24 @@ var b = ["id"], x = /* @__PURE__ */ l({
|
|
|
15
15
|
disabled: { type: Boolean }
|
|
16
16
|
},
|
|
17
17
|
setup(l) {
|
|
18
|
-
let
|
|
19
|
-
|
|
18
|
+
let b = l, x = e("collapse"), S = u(r), C = i(() => !!S?.modelValue?.value?.includes(b.name)), w = () => {
|
|
19
|
+
b.disabled || S?.handleItemClick?.(b.name);
|
|
20
20
|
};
|
|
21
|
-
return (e, r) => (p(), a("div", { class: d([g(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
onClick: T
|
|
21
|
+
return (e, r) => (p(), a("div", { class: d([g(x).e("item"), g(x).is("disabled", l.disabled)]) }, [o("div", {
|
|
22
|
+
class: d([g(x).e("header"), g(x).is("active", C.value)]),
|
|
23
|
+
onClick: w
|
|
25
24
|
}, [
|
|
26
25
|
o("span", {
|
|
27
|
-
class: d(g(
|
|
28
|
-
style: f({ transform:
|
|
26
|
+
class: d(g(x).e("header-arrow")),
|
|
27
|
+
style: f({ transform: C.value ? "rotate(90deg)" : "" })
|
|
29
28
|
}, [c(g(t))], 6),
|
|
30
|
-
o("span", { class: d(g(
|
|
31
|
-
o("span", { class: d(g(
|
|
32
|
-
],
|
|
33
|
-
default: v(() => [y(o("div", { class: d(g(
|
|
29
|
+
o("span", { class: d(g(x).e("header-title")) }, [m(e.$slots, "title", {}, () => [s(h(l.title), 1)])], 2),
|
|
30
|
+
o("span", { class: d(g(x).e("extra")) }, [m(e.$slots, "extra")], 2)
|
|
31
|
+
], 2), c(n, null, {
|
|
32
|
+
default: v(() => [y(o("div", { class: d(g(x).e("content")) }, [m(e.$slots, "default")], 2), [[_, C.value]])]),
|
|
34
33
|
_: 3
|
|
35
34
|
})], 2));
|
|
36
35
|
}
|
|
37
36
|
});
|
|
38
37
|
//#endregion
|
|
39
|
-
export {
|
|
38
|
+
export { b as default };
|
|
@@ -21,11 +21,11 @@ export interface CollapseItemProps {
|
|
|
21
21
|
disabled?: boolean;
|
|
22
22
|
}
|
|
23
23
|
export interface CollapseItemSlots {
|
|
24
|
-
/**
|
|
24
|
+
/** 默认 */
|
|
25
25
|
default?: () => any;
|
|
26
|
-
/**
|
|
26
|
+
/** 标题 */
|
|
27
27
|
title?: () => any;
|
|
28
|
-
/**
|
|
28
|
+
/** 额外内容 */
|
|
29
29
|
extra?: () => any;
|
|
30
30
|
}
|
|
31
31
|
export interface CollapseContext {
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { DividerProps
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { DividerProps } 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<DividerProps> & (typeof globalThis extends {
|
|
5
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
6
|
+
} ? P : {});
|
|
7
|
+
expose: (exposed: {}) => void;
|
|
8
|
+
attrs: any;
|
|
9
|
+
slots: {};
|
|
10
|
+
emit: {};
|
|
11
|
+
}>) => VNode & {
|
|
12
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
13
|
+
};
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
12
|
-
type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
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
|
+
}) & {};
|
package/dist/es/components/src/divider/divider.vue_vue_type_script_setup_true_vapor_true_lang.mjs
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
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";
|
|
4
|
+
import "../../../hooks/index.mjs";
|
|
5
|
+
import { computed as n, createCommentVNode as r, createElementBlock as i, defineComponent as a, normalizeClass as o, normalizeStyle as s, openBlock as c, toDisplayString as l, unref as u } from "vue";
|
|
6
|
+
//#region ../components/src/divider/divider.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
7
|
+
var d = /* @__PURE__ */ a({
|
|
8
|
+
name: "SDivider",
|
|
9
|
+
__name: "divider",
|
|
10
|
+
props: {
|
|
11
|
+
vertical: { type: Boolean },
|
|
12
|
+
margin: { default: 8 },
|
|
13
|
+
position: { default: "center" },
|
|
14
|
+
style: { default: "solid" },
|
|
15
|
+
label: {}
|
|
16
|
+
},
|
|
17
|
+
setup(a) {
|
|
18
|
+
let d = a, f = t("divider"), p = n(() => ({
|
|
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
|
|
22
|
+
}));
|
|
23
|
+
return (e, t) => (c(), i("div", {
|
|
24
|
+
class: o([
|
|
25
|
+
u(f).b(),
|
|
26
|
+
u(f).is("vertical", a.vertical),
|
|
27
|
+
u(f).m(a.position)
|
|
28
|
+
]),
|
|
29
|
+
style: s(p.value)
|
|
30
|
+
}, [a.label ? (c(), i("div", {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: o([u(f).e("label")])
|
|
33
|
+
}, l(a.label), 3)) : r("", !0)], 6));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
export { d as default };
|