yc-design-vue 1.1.9 → 1.2.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.
@@ -28,6 +28,7 @@ declare const __VLS_component: import('vue').DefineComponent<ButtonProps, {}, {}
28
28
  status: import('./type').ButtonStatus;
29
29
  long: boolean;
30
30
  htmlType: import('./type').ButtonHtmlType;
31
+ autofocus: boolean;
31
32
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
32
33
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
33
34
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./Button.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
4
- const _Button = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2327bc3e"]]);
4
+ const _Button = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1536384b"]]);
5
5
  export {
6
6
  _Button as default
7
7
  };
@@ -1,12 +1,12 @@
1
1
  import { defineComponent, useSlots, toRefs, computed, createElementBlock, openBlock, mergeProps, createCommentVNode, renderSlot, unref, createBlock } from "vue";
2
2
  import useContext from "./hooks/useContext.js";
3
3
  import Spin from "../Spin/index.js";
4
- const _hoisted_1 = ["href"];
4
+ const _hoisted_1 = ["href", "autofocus"];
5
5
  const _hoisted_2 = {
6
6
  key: 0,
7
7
  class: "yc-button-icon"
8
8
  };
9
- const _hoisted_3 = ["type", "disabled"];
9
+ const _hoisted_3 = ["type", "disabled", "autofocus"];
10
10
  const _hoisted_4 = {
11
11
  key: 0,
12
12
  class: "yc-button-icon"
@@ -25,6 +25,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  loading: { type: Boolean, default: false },
26
26
  disabled: { type: Boolean, default: void 0 },
27
27
  htmlType: { default: "button" },
28
+ autofocus: { type: Boolean, default: false },
28
29
  href: { default: "" }
29
30
  },
30
31
  emits: ["mousedown", "mouseup", "click", "dblclick", "contextmenu"],
@@ -64,7 +65,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
65
  return _ctx.href ? (openBlock(), createElementBlock("a", mergeProps({
65
66
  key: 0,
66
67
  href: _ctx.href,
67
- class: className.value
68
+ class: className.value,
69
+ autofocus: _ctx.autofocus
68
70
  }, _ctx.$attrs, {
69
71
  onMousedown: _cache[0] || (_cache[0] = ($event) => handleEvent("mousedown", $event)),
70
72
  onMouseup: _cache[1] || (_cache[1] = ($event) => handleEvent("mouseup", $event)),
@@ -83,7 +85,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
83
85
  key: 1,
84
86
  type: _ctx.htmlType,
85
87
  disabled: unref(disabled),
86
- class: className.value
88
+ class: className.value,
89
+ autofocus: _ctx.autofocus
87
90
  }, _ctx.$attrs, {
88
91
  onMousedown: _cache[5] || (_cache[5] = ($event) => handleEvent("mousedown", $event)),
89
92
  onMouseup: _cache[6] || (_cache[6] = ($event) => handleEvent("mouseup", $event)),
@@ -27,6 +27,7 @@ declare const Button: {
27
27
  status: import('./type').ButtonStatus;
28
28
  long: boolean;
29
29
  htmlType: import('./type').ButtonHtmlType;
30
+ autofocus: boolean;
30
31
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
31
32
  P: {};
32
33
  B: {};
@@ -50,6 +51,7 @@ declare const Button: {
50
51
  status: import('./type').ButtonStatus;
51
52
  long: boolean;
52
53
  htmlType: import('./type').ButtonHtmlType;
54
+ autofocus: boolean;
53
55
  }>;
54
56
  __isFragment?: never;
55
57
  __isTeleport?: never;
@@ -76,6 +78,7 @@ declare const Button: {
76
78
  status: import('./type').ButtonStatus;
77
79
  long: boolean;
78
80
  htmlType: import('./type').ButtonHtmlType;
81
+ autofocus: boolean;
79
82
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
80
83
  $slots: Readonly<import('./type').ButtonSlots> & import('./type').ButtonSlots;
81
84
  }) & {
@@ -9,6 +9,7 @@ export interface ButtonProps {
9
9
  loading?: boolean;
10
10
  disabled?: boolean;
11
11
  htmlType?: ButtonHtmlType;
12
+ autofocus?: boolean;
12
13
  href?: string;
13
14
  }
14
15
  export interface ButtonEmits {
@@ -7,7 +7,7 @@ declare const Divider: {
7
7
  size: number;
8
8
  type: import('./type').DividerType;
9
9
  direction: import('..').Direction;
10
- margin: number;
10
+ margin: number | string;
11
11
  orientation: import('./type').Orientation;
12
12
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
13
13
  P: {};
@@ -20,7 +20,7 @@ declare const Divider: {
20
20
  size: number;
21
21
  type: import('./type').DividerType;
22
22
  direction: import('..').Direction;
23
- margin: number;
23
+ margin: number | string;
24
24
  orientation: import('./type').Orientation;
25
25
  }>;
26
26
  __isFragment?: never;
@@ -30,7 +30,7 @@ declare const Divider: {
30
30
  size: number;
31
31
  type: import('./type').DividerType;
32
32
  direction: import('..').Direction;
33
- margin: number;
33
+ margin: number | string;
34
34
  orientation: import('./type').Orientation;
35
35
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
36
36
  $slots: Readonly<import('./type').DividerSlots> & import('./type').DividerSlots;
@@ -10,7 +10,7 @@ declare const __VLS_component: import('vue').DefineComponent<DividerProps, {}, {
10
10
  size: number;
11
11
  type: import('./type').DividerType;
12
12
  direction: import('..').Direction;
13
- margin: number;
13
+ margin: number | string;
14
14
  orientation: import('./type').Orientation;
15
15
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
16
16
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./index.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
4
- const _Divider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a009a00c"]]);
4
+ const _Divider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5d3da063"]]);
5
5
  export {
6
6
  _Divider as default
7
7
  };
@@ -5,7 +5,7 @@ export interface DividerProps {
5
5
  orientation?: Orientation;
6
6
  type?: DividerType;
7
7
  size?: number;
8
- margin?: number;
8
+ margin?: number | string;
9
9
  }
10
10
  export interface DividerSlots {
11
11
  default?: () => VNode[];
@@ -4,7 +4,7 @@ export type SpaceInstance = InstanceType<typeof _Space>;
4
4
  export * from './type';
5
5
  declare const Space: {
6
6
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').SpaceProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
7
- size: import('..').Size | number;
7
+ size: import('./type').SpaceSize | [import('./type').SpaceSize, import('./type').SpaceSize];
8
8
  fill: boolean;
9
9
  wrap: boolean;
10
10
  direction: import('..').Direction;
@@ -17,7 +17,7 @@ declare const Space: {
17
17
  M: {};
18
18
  Defaults: {};
19
19
  }, Readonly<import('./type').SpaceProps> & Readonly<{}>, {}, {}, {}, {}, {
20
- size: import('..').Size | number;
20
+ size: import('./type').SpaceSize | [import('./type').SpaceSize, import('./type').SpaceSize];
21
21
  fill: boolean;
22
22
  wrap: boolean;
23
23
  direction: import('..').Direction;
@@ -27,7 +27,7 @@ declare const Space: {
27
27
  __isTeleport?: never;
28
28
  __isSuspense?: never;
29
29
  } & import('vue').ComponentOptionsBase<Readonly<import('./type').SpaceProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
30
- size: import('..').Size | number;
30
+ size: import('./type').SpaceSize | [import('./type').SpaceSize, import('./type').SpaceSize];
31
31
  fill: boolean;
32
32
  wrap: boolean;
33
33
  direction: import('..').Direction;
@@ -7,7 +7,7 @@ declare function __VLS_template(): {
7
7
  };
8
8
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
9
9
  declare const __VLS_component: import('vue').DefineComponent<SpaceProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SpaceProps> & Readonly<{}>, {
10
- size: import('..').Size | number;
10
+ size: import('./type').SpaceSize | [import('./type').SpaceSize, import('./type').SpaceSize];
11
11
  fill: boolean;
12
12
  wrap: boolean;
13
13
  direction: import('..').Direction;
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./index.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
4
- const _Space = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7a9a36b0"]]);
4
+ const _Space = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4f9e1543"]]);
5
5
  export {
6
6
  _Space as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, useSlots, toRefs, computed, Fragment, Comment, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, renderSlot, createCommentVNode, renderList, createElementVNode, createBlock, resolveDynamicComponent } from "vue";
2
2
  import "../node_modules/tinycolor2/esm/tinycolor.js";
3
3
  import { valueToPx } from "../_shared/utils/dom.js";
4
- import { isNumber, isUndefined } from "../_shared/utils/is.js";
4
+ import { isNumber, isArray, isUndefined } from "../_shared/utils/is.js";
5
5
  import "../_shared/utils/time.js";
6
6
  import { getSlotFunction } from "../_shared/utils/vue-utils.js";
7
7
  import "../Empty/index.js";
@@ -34,7 +34,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
34
  medium: 16,
35
35
  large: 24
36
36
  };
37
- return valueToPx(isNumber(size.value) ? size.value : map[size.value]);
37
+ if (isNumber(size.value)) {
38
+ return valueToPx(size.value);
39
+ } else if (isArray(size.value)) {
40
+ return size.value.map((v) => valueToPx(v)).join(" ");
41
+ } else {
42
+ return valueToPx(map[size.value]);
43
+ }
38
44
  });
39
45
  const align = computed(() => {
40
46
  if (!isUndefined(_align.value)) {
@@ -5,10 +5,11 @@ export interface SpaceProps {
5
5
  direction?: Direction;
6
6
  wrap?: boolean;
7
7
  fill?: boolean;
8
- size?: Size | number;
8
+ size?: SpaceSize | [SpaceSize, SpaceSize];
9
9
  }
10
10
  export interface SpaceSlots {
11
11
  default?: () => VNode[];
12
12
  split?: () => VNode[];
13
13
  }
14
14
  export type SpaceAlign = 'start' | 'end' | 'center' | 'baseline';
15
+ export type SpaceSize = Size | number;