savor-ui 0.0.4 → 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.
Files changed (54) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/es/components/index.mjs +1 -1
  3. package/dist/es/components/src/button/button.d.ts +17 -17
  4. package/dist/es/components/src/button/button.vue.mjs +1 -1
  5. package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_vapor_true_lang.mjs +58 -0
  6. package/dist/es/components/src/button/index.d.ts +29 -38
  7. package/dist/es/components/src/button/types.d.ts +29 -29
  8. package/dist/es/components/src/checkbox/checkbox-group.d.ts +5 -5
  9. package/dist/es/components/src/checkbox/checkbox-group.vue_vue_type_script_setup_true_lang.mjs +2 -1
  10. package/dist/es/components/src/checkbox/checkbox.vue_vue_type_script_setup_true_lang.mjs +8 -8
  11. package/dist/es/components/src/checkbox/index.d.ts +13 -13
  12. package/dist/es/components/src/checkbox/types.d.ts +7 -6
  13. package/dist/es/components/src/collapse/collapse-item.vue_vue_type_script_setup_true_lang.mjs +13 -14
  14. package/dist/es/components/src/collapse/types.d.ts +3 -3
  15. package/dist/es/components/src/divider/divider.d.ts +18 -14
  16. package/dist/es/components/src/divider/divider.vue.mjs +1 -1
  17. package/dist/es/components/src/divider/divider.vue_vue_type_script_setup_true_vapor_true_lang.mjs +37 -0
  18. package/dist/es/components/src/divider/index.d.ts +21 -28
  19. package/dist/es/components/src/divider/types.d.ts +11 -13
  20. package/dist/es/components/src/icon/icon.d.ts +17 -11
  21. package/dist/es/components/src/icon/icon.vue.mjs +1 -1
  22. 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
  23. package/dist/es/components/src/icon/index.d.ts +19 -22
  24. package/dist/es/components/src/icon/types.d.ts +3 -5
  25. package/dist/es/components/src/select/select.vue_vue_type_script_setup_true_lang.mjs +48 -48
  26. package/dist/es/components/src/space/space.vue_vue_type_script_setup_true_lang.mjs +15 -18
  27. package/dist/es/components/src/switch/switch.vue_vue_type_script_setup_true_lang.mjs +1 -1
  28. package/dist/es/components/src/tabs/tab-pane.vue_vue_type_script_setup_true_lang.mjs +2 -2
  29. package/dist/es/components/src/tabs/tab.vue_vue_type_script_setup_true_lang.mjs +2 -2
  30. package/dist/es/components/src/tag/index.d.ts +2 -4
  31. package/dist/es/components/src/tag/tag.d.ts +2 -5
  32. package/dist/es/components/src/tag/tag.vue_vue_type_script_setup_true_lang.mjs +7 -7
  33. package/dist/es/components/src/tag/types.d.ts +4 -0
  34. package/dist/es/components/src/tree/node.vue_vue_type_script_setup_true_lang.mjs +4 -4
  35. package/dist/es/core/components.mjs +65 -63
  36. package/dist/es/core/index.mjs +14 -14
  37. package/dist/es/theme/components/auto-complete.scss +22 -40
  38. package/dist/es/theme/components/button.scss +1 -1
  39. package/dist/es/theme/components/color-picker.scss +39 -75
  40. package/dist/es/theme/components/date-picker.scss +3 -3
  41. package/dist/es/theme/components/datetime-picker.scss +3 -3
  42. package/dist/es/theme/components/form.scss +14 -14
  43. package/dist/es/theme/components/input-number.scss +3 -3
  44. package/dist/es/theme/components/input-tag.scss +3 -3
  45. package/dist/es/theme/components/input.scss +3 -3
  46. package/dist/es/theme/components/segmented.scss +10 -13
  47. package/dist/es/theme/components/switch.scss +1 -1
  48. package/dist/es/theme/components/textarea.scss +40 -40
  49. package/dist/json/vetur-attributes.json +42 -36
  50. package/dist/json/vetur-tags.json +12 -11
  51. package/dist/json/web-types.json +75 -64
  52. package/package.json +1 -1
  53. package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_lang.mjs +0 -70
  54. package/dist/es/components/src/divider/divider.vue_vue_type_script_setup_true_lang.mjs +0 -35
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
 
4
4
 
5
+ ## [0.0.6](https://gitee.com/mach552/savor-ui/compare/v0.0.5...v0.0.6) (2026-05-11)
6
+
7
+ ## [0.0.5](https://gitee.com/mach552/savor-ui/compare/v0.0.4...v0.0.5) (2026-05-10)
8
+
5
9
  ## [0.0.4](https://gitee.com/mach552/savor-ui/compare/v0.0.2...v0.0.4) (2026-05-10)
6
10
 
7
11
  ## [0.0.3](https://gitee.com/mach552/savor-ui/compare/v0.0.2...v0.0.3) (2026-05-10)
@@ -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 { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
- type __VLS_Slots = ButtonSlots;
4
- declare const __VLS_base: DefineComponent<ButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
5
- click: (e: MouseEvent) => any;
6
- }, string, PublicProps, Readonly<ButtonProps> & Readonly<{
7
- onClick?: ((e: MouseEvent) => any) | undefined;
8
- }>, {
9
- size: "mini" | "small" | "medium" | "large";
10
- type: "default" | "primary" | "success" | "warning" | "danger" | "info";
11
- htmlType: "button" | "submit";
12
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
13
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
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 __VLS_WithSlots<T, S> = T & {
17
- new (): {
18
- $slots: S;
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
+ }) & {};
@@ -1,4 +1,4 @@
1
- import e from "./button.vue_vue_type_script_setup_true_lang.mjs";
1
+ import e from "./button.vue_vue_type_script_setup_true_vapor_true_lang.mjs";
2
2
  //#region ../components/src/button/button.vue
3
3
  var t = e;
4
4
  //#endregion
@@ -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 { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
2
- import { ButtonProps, ButtonSlots, ButtonGroupProps, ButtonGroupSlots } from './types';
3
- export declare const SButton: {
4
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ButtonProps> & Readonly<{
5
- onClick?: ((e: MouseEvent) => any) | undefined;
6
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
7
- click: (e: MouseEvent) => any;
8
- }, PublicProps, {
9
- size: "mini" | "small" | "medium" | "large";
10
- type: "default" | "primary" | "success" | "warning" | "danger" | "info";
11
- htmlType: "button" | "submit";
12
- }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
13
- P: {};
14
- B: {};
15
- D: {};
16
- C: {};
17
- M: {};
18
- Defaults: {};
19
- }, Readonly< ButtonProps> & Readonly<{
20
- onClick?: ((e: MouseEvent) => any) | undefined;
21
- }>, {}, {}, {}, {}, {
22
- size: "mini" | "small" | "medium" | "large";
23
- type: "default" | "primary" | "success" | "warning" | "danger" | "info";
24
- htmlType: "button" | "submit";
25
- }>;
26
- __isFragment?: never;
27
- __isTeleport?: never;
28
- __isSuspense?: never;
29
- } & ComponentOptionsBase<Readonly< ButtonProps> & Readonly<{
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 { Component, InjectionKey, Ref, VNode } from 'vue';
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
- secondary?: boolean;
15
- /** 是否为文本按钮 */
16
- text?: boolean;
17
- /** 是否为圆形按钮 */
18
- circle?: boolean;
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
- /** 按钮的 HTML 类型
26
- * @default button
27
- */
28
- htmlType?: "button" | "submit";
29
- /** 图标节点 */
30
- icon?: VNode | Component;
27
+ /** 是否为文本按钮 */
28
+ text?: boolean;
29
+ /** 是否为链接按钮 */
30
+ link?: boolean;
31
+ /** 是否为次要按钮 */
32
+ secondary?: boolean;
31
33
  }
32
34
  export interface ButtonSlots {
33
- /** 默认插槽 */
34
- default?: () => any;
35
- /** 按钮图标 */
36
- icon?: () => any;
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<"mini" | "small" | "medium" | "large">;
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 | boolean>;
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 | boolean)[]) => any;
11
- "update:modelValue": (value: (string | number | boolean)[]) => any;
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 | boolean)[]) => any) | undefined;
14
- "onUpdate:modelValue"?: ((value: (string | number | boolean)[]) => any) | undefined;
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;
@@ -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: { type: [
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, t.checked ? (y.value = g.value ?? t.checked, x?.addValue(g.value ?? t.checked)) : (y.value = g.value ? void 0 : t.checked, x?.removeValue(g.value ?? t.checked)), _("change", t.checked);
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 | boolean>;
49
+ modelValue?: Array<string | number>;
50
50
  }> & Readonly<{
51
- onChange?: ((value: (string | number | boolean)[]) => any) | undefined;
52
- "onUpdate:modelValue"?: ((value: (string | number | boolean)[]) => any) | undefined;
51
+ onChange?: ((value: (string | number)[]) => any) | undefined;
52
+ "onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
53
53
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
54
- change: (value: (string | number | boolean)[]) => any;
55
- "update:modelValue": (value: (string | number | boolean)[]) => any;
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 | boolean>;
64
+ modelValue?: Array<string | number>;
65
65
  }> & Readonly<{
66
- onChange?: ((value: (string | number | boolean)[]) => any) | undefined;
67
- "onUpdate:modelValue"?: ((value: (string | number | boolean)[]) => any) | undefined;
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 | boolean>;
73
+ modelValue?: Array<string | number>;
74
74
  }> & Readonly<{
75
- onChange?: ((value: (string | number | boolean)[]) => any) | undefined;
76
- "onUpdate:modelValue"?: ((value: (string | number | boolean)[]) => any) | undefined;
75
+ onChange?: ((value: (string | number)[]) => any) | undefined;
76
+ "onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
77
77
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
78
- change: (value: (string | number | boolean)[]) => any;
79
- "update:modelValue": (value: (string | number | boolean)[]) => any;
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?: boolean | string | number;
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: (props: {
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 | boolean>];
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 | boolean | undefined) => void;
41
- removeValue: (value: string | number | boolean | undefined) => void;
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>;
@@ -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 = ["id"], x = /* @__PURE__ */ l({
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 x = l, S = e("collapse-item"), C = u(r), w = i(() => !!C?.modelValue?.value?.includes(x.name)), T = () => {
19
- x.disabled || C?.handleItemClick?.(x.name);
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(S).b(), g(S).is("disabled", l.disabled)]) }, [o("div", {
22
- id: `item-header-${l.name}`,
23
- class: d([g(S).e("header"), g(S).is("active", w.value)]),
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(S).e("header-arrow")),
28
- style: f({ transform: w.value ? "rotate(90deg)" : "" })
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(S).e("header-title")) }, [m(e.$slots, "title", {}, () => [s(h(l.title), 1)])], 2),
31
- o("span", { class: d(g(S).e("extra")) }, [m(e.$slots, "extra")], 2)
32
- ], 10, b), c(n, null, {
33
- default: v(() => [y(o("div", { class: d(g(S).e("content")) }, [m(e.$slots, "default")], 2), [[_, w.value]])]),
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 { x as default };
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, DividerSlots } from './types';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
- type __VLS_Slots = DividerSlots;
4
- declare const __VLS_base: DefineComponent<DividerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<DividerProps> & Readonly<{}>, {
5
- type: "solid" | "dashed" | "dotted" | "double";
6
- margin: number;
7
- align: "left" | "right" | "center";
8
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
9
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
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 __VLS_WithSlots<T, S> = T & {
13
- new (): {
14
- $slots: S;
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
+ }) & {};
@@ -1,4 +1,4 @@
1
- import e from "./divider.vue_vue_type_script_setup_true_lang.mjs";
1
+ import e from "./divider.vue_vue_type_script_setup_true_vapor_true_lang.mjs";
2
2
  //#region ../components/src/divider/divider.vue
3
3
  var t = e;
4
4
  //#endregion
@@ -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 };