yc-design-vue 1.0.1 → 1.0.3

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 (255) hide show
  1. package/es/Affix/type.d.ts +3 -2
  2. package/es/Alert/type.d.ts +6 -5
  3. package/es/Anchor/type.d.ts +4 -3
  4. package/es/AutoComplete/index.d.ts +65 -2
  5. package/es/AutoComplete/index.vue.d.ts +130 -4
  6. package/es/AutoComplete/type.d.ts +5 -4
  7. package/es/Avatar/AvatarGroup.vue.js +1 -1
  8. package/es/Avatar/AvatarGroup.vue2.js +2 -2
  9. package/es/Avatar/type.d.ts +4 -4
  10. package/es/BackTop/type.d.ts +2 -1
  11. package/es/Badge/index.vue.js +1 -1
  12. package/es/Badge/index.vue2.js +2 -2
  13. package/es/Badge/type.d.ts +3 -3
  14. package/es/Breadcrumb/type.d.ts +9 -8
  15. package/es/Button/Button.vue.js +1 -1
  16. package/es/Button/Button.vue2.js +2 -2
  17. package/es/Button/type.d.ts +4 -3
  18. package/es/Calendar/type.d.ts +5 -4
  19. package/es/Card/type.d.ts +10 -10
  20. package/es/Carousel/type.d.ts +3 -2
  21. package/es/Cascader/type.d.ts +10 -10
  22. package/es/Checkbox/hooks/useContext.d.ts +2 -5
  23. package/es/Checkbox/type.d.ts +9 -8
  24. package/es/Collapse/type.d.ts +9 -8
  25. package/es/Comment/type.d.ts +7 -6
  26. package/es/ConfigProvider/index.vue.js +2 -2
  27. package/es/ConfigProvider/type.d.ts +5 -4
  28. package/es/Descriptions/type.d.ts +9 -9
  29. package/es/Divider/type.d.ts +2 -1
  30. package/es/Drawer/Drawer.vue.js +1 -1
  31. package/es/Drawer/Drawer.vue2.js +6 -7
  32. package/es/Drawer/type.d.ts +5 -5
  33. package/es/Dropdown/Dsubmenu.vue.d.ts +130 -4
  34. package/es/Dropdown/Dsubmenu.vue.js +1 -1
  35. package/es/Dropdown/Dsubmenu.vue2.js +2 -2
  36. package/es/Dropdown/index.d.ts +65 -2
  37. package/es/Dropdown/type.d.ts +15 -14
  38. package/es/Empty/type.d.ts +2 -1
  39. package/es/Grid/type.d.ts +6 -5
  40. package/es/Icon/type.d.ts +2 -1
  41. package/es/Image/type.d.ts +11 -10
  42. package/es/Input/hooks/useCursor.d.ts +2 -1
  43. package/es/Input/hooks/useCursor.js +2 -2
  44. package/es/Input/type.d.ts +6 -5
  45. package/es/InputNumber/type.d.ts +8 -8
  46. package/es/InputTag/type.d.ts +5 -4
  47. package/es/Layout/Layout.vue.js +1 -1
  48. package/es/Layout/Layout.vue2.js +2 -2
  49. package/es/Layout/type.d.ts +8 -7
  50. package/es/Link/type.d.ts +3 -2
  51. package/es/List/List.vue.js +1 -1
  52. package/es/List/List.vue2.js +1 -1
  53. package/es/List/type.d.ts +15 -14
  54. package/es/Mention/index.d.ts +65 -2
  55. package/es/Mention/index.vue.d.ts +130 -4
  56. package/es/Mention/type.d.ts +3 -2
  57. package/es/Menu/type.d.ts +11 -10
  58. package/es/Message/type.d.ts +1 -1
  59. package/es/Modal/Modal.vue.js +1 -1
  60. package/es/Modal/Modal.vue2.js +4 -6
  61. package/es/Modal/hooks/useModalClose.d.ts +2 -1
  62. package/es/Modal/hooks/useModalClose.js +1 -6
  63. package/es/Modal/type.d.ts +5 -5
  64. package/es/Notification/type.d.ts +1 -1
  65. package/es/OverflowList/index.vue.js +1 -1
  66. package/es/OverflowList/index.vue2.js +4 -4
  67. package/es/OverflowList/type.d.ts +3 -2
  68. package/es/PageHeader/type.d.ts +7 -6
  69. package/es/Pagination/type.d.ts +8 -8
  70. package/es/Popconfirm/index.d.ts +65 -2
  71. package/es/Popconfirm/index.vue.d.ts +130 -4
  72. package/es/Popconfirm/type.d.ts +4 -4
  73. package/es/Popover/type.d.ts +4 -4
  74. package/es/Radio/hooks/useContext.d.ts +3 -6
  75. package/es/Radio/type.d.ts +9 -8
  76. package/es/Rate/type.d.ts +3 -2
  77. package/es/ResizeBox/type.d.ts +6 -5
  78. package/es/Result/type.d.ts +6 -5
  79. package/es/Scrollbar/Scrollbar.vue.js +1 -1
  80. package/es/Scrollbar/type.d.ts +2 -2
  81. package/es/Select/Select.vue.d.ts +130 -4
  82. package/es/Select/SelectView.vue.js +1 -1
  83. package/es/Select/SelectView.vue2.js +1 -1
  84. package/es/Select/index.d.ts +65 -2
  85. package/es/Select/type.d.ts +19 -18
  86. package/es/Skeleton/type.d.ts +3 -2
  87. package/es/Space/index.vue.js +1 -1
  88. package/es/Space/index.vue2.js +2 -2
  89. package/es/Space/type.d.ts +3 -2
  90. package/es/Spin/index.vue.js +1 -1
  91. package/es/Spin/index.vue2.js +1 -1
  92. package/es/Spin/type.d.ts +4 -3
  93. package/es/Split/type.d.ts +5 -4
  94. package/es/Statistic/type.d.ts +7 -7
  95. package/es/Steps/type.d.ts +8 -7
  96. package/es/Switch/index.vue.js +1 -1
  97. package/es/Switch/index.vue2.js +3 -3
  98. package/es/Switch/type.d.ts +5 -4
  99. package/es/Tabs/Tabs.vue.js +1 -1
  100. package/es/Tabs/Tabs.vue2.js +2 -2
  101. package/es/Tabs/type.d.ts +5 -4
  102. package/es/Tag/type.d.ts +4 -3
  103. package/es/TimePicker/type.d.ts +4 -3
  104. package/es/Timeline/type.d.ts +6 -5
  105. package/es/Tooltip/type.d.ts +3 -3
  106. package/es/Transfer/type.d.ts +13 -12
  107. package/es/Trigger/hooks/useContext.js +1 -1
  108. package/es/Trigger/hooks/useTriggerPosition.d.ts +2 -2
  109. package/es/Trigger/hooks/useTriggerPosition.js +12 -22
  110. package/es/Trigger/hooks/useTriggerVisible.js +1 -2
  111. package/es/Trigger/index.d.ts +63 -2
  112. package/es/Trigger/index.vue.d.ts +130 -3
  113. package/es/Trigger/index.vue.js +1 -1
  114. package/es/Trigger/index.vue2.js +2 -2
  115. package/es/Trigger/type.d.ts +3 -3
  116. package/es/Typography/type.d.ts +8 -7
  117. package/es/Watermark/type.d.ts +2 -1
  118. package/es/_shared/type/index.d.ts +1 -6
  119. package/es/_shared/utils/dom.d.ts +5 -5
  120. package/es/_shared/utils/dom.js +8 -9
  121. package/es/_shared/utils/fn.d.ts +3 -3
  122. package/es/_shared/utils/fn.js +6 -6
  123. package/es/_shared/utils/global-config.d.ts +4 -2
  124. package/es/_shared/utils/vue-utils.d.ts +1 -2
  125. package/es/_shared/utils/vue-utils.js +2 -7
  126. package/es/index.d.ts +66 -3
  127. package/es/style.css +1 -1
  128. package/lib/Affix/type.d.ts +3 -2
  129. package/lib/Alert/type.d.ts +6 -5
  130. package/lib/Anchor/type.d.ts +4 -3
  131. package/lib/AutoComplete/index.d.ts +65 -2
  132. package/lib/AutoComplete/index.vue.d.ts +130 -4
  133. package/lib/AutoComplete/type.d.ts +5 -4
  134. package/lib/Avatar/AvatarGroup.vue.js +1 -1
  135. package/lib/Avatar/AvatarGroup.vue2.js +1 -1
  136. package/lib/Avatar/type.d.ts +4 -4
  137. package/lib/BackTop/type.d.ts +2 -1
  138. package/lib/Badge/index.vue.js +1 -1
  139. package/lib/Badge/index.vue2.js +1 -1
  140. package/lib/Badge/type.d.ts +3 -3
  141. package/lib/Breadcrumb/type.d.ts +9 -8
  142. package/lib/Button/Button.vue.js +1 -1
  143. package/lib/Button/Button.vue2.js +1 -1
  144. package/lib/Button/type.d.ts +4 -3
  145. package/lib/Calendar/type.d.ts +5 -4
  146. package/lib/Card/type.d.ts +10 -10
  147. package/lib/Carousel/type.d.ts +3 -2
  148. package/lib/Cascader/type.d.ts +10 -10
  149. package/lib/Checkbox/hooks/useContext.d.ts +2 -5
  150. package/lib/Checkbox/type.d.ts +9 -8
  151. package/lib/Collapse/type.d.ts +9 -8
  152. package/lib/Comment/type.d.ts +7 -6
  153. package/lib/ConfigProvider/index.vue.js +1 -1
  154. package/lib/ConfigProvider/type.d.ts +5 -4
  155. package/lib/Descriptions/type.d.ts +9 -9
  156. package/lib/Divider/type.d.ts +2 -1
  157. package/lib/Drawer/Drawer.vue.js +1 -1
  158. package/lib/Drawer/Drawer.vue2.js +1 -1
  159. package/lib/Drawer/type.d.ts +5 -5
  160. package/lib/Dropdown/Dsubmenu.vue.d.ts +130 -4
  161. package/lib/Dropdown/Dsubmenu.vue.js +1 -1
  162. package/lib/Dropdown/Dsubmenu.vue2.js +1 -1
  163. package/lib/Dropdown/index.d.ts +65 -2
  164. package/lib/Dropdown/type.d.ts +15 -14
  165. package/lib/Empty/type.d.ts +2 -1
  166. package/lib/Grid/type.d.ts +6 -5
  167. package/lib/Icon/type.d.ts +2 -1
  168. package/lib/Image/type.d.ts +11 -10
  169. package/lib/Input/hooks/useCursor.d.ts +2 -1
  170. package/lib/Input/hooks/useCursor.js +1 -1
  171. package/lib/Input/type.d.ts +6 -5
  172. package/lib/InputNumber/type.d.ts +8 -8
  173. package/lib/InputTag/type.d.ts +5 -4
  174. package/lib/Layout/Layout.vue.js +1 -1
  175. package/lib/Layout/Layout.vue2.js +1 -1
  176. package/lib/Layout/type.d.ts +8 -7
  177. package/lib/Link/type.d.ts +3 -2
  178. package/lib/List/List.vue.js +1 -1
  179. package/lib/List/List.vue2.js +1 -1
  180. package/lib/List/type.d.ts +15 -14
  181. package/lib/Mention/index.d.ts +65 -2
  182. package/lib/Mention/index.vue.d.ts +130 -4
  183. package/lib/Mention/type.d.ts +3 -2
  184. package/lib/Menu/type.d.ts +11 -10
  185. package/lib/Message/type.d.ts +1 -1
  186. package/lib/Modal/Modal.vue.js +1 -1
  187. package/lib/Modal/Modal.vue2.js +1 -1
  188. package/lib/Modal/hooks/useModalClose.d.ts +2 -1
  189. package/lib/Modal/hooks/useModalClose.js +1 -1
  190. package/lib/Modal/type.d.ts +5 -5
  191. package/lib/Notification/type.d.ts +1 -1
  192. package/lib/OverflowList/index.vue.js +1 -1
  193. package/lib/OverflowList/index.vue2.js +1 -1
  194. package/lib/OverflowList/type.d.ts +3 -2
  195. package/lib/PageHeader/type.d.ts +7 -6
  196. package/lib/Pagination/type.d.ts +8 -8
  197. package/lib/Popconfirm/index.d.ts +65 -2
  198. package/lib/Popconfirm/index.vue.d.ts +130 -4
  199. package/lib/Popconfirm/type.d.ts +4 -4
  200. package/lib/Popover/type.d.ts +4 -4
  201. package/lib/Radio/hooks/useContext.d.ts +3 -6
  202. package/lib/Radio/type.d.ts +9 -8
  203. package/lib/Rate/type.d.ts +3 -2
  204. package/lib/ResizeBox/type.d.ts +6 -5
  205. package/lib/Result/type.d.ts +6 -5
  206. package/lib/Scrollbar/Scrollbar.vue.js +1 -1
  207. package/lib/Scrollbar/type.d.ts +2 -2
  208. package/lib/Select/Select.vue.d.ts +130 -4
  209. package/lib/Select/SelectView.vue.js +1 -1
  210. package/lib/Select/SelectView.vue2.js +1 -1
  211. package/lib/Select/index.d.ts +65 -2
  212. package/lib/Select/type.d.ts +19 -18
  213. package/lib/Skeleton/type.d.ts +3 -2
  214. package/lib/Space/index.vue.js +1 -1
  215. package/lib/Space/index.vue2.js +1 -1
  216. package/lib/Space/type.d.ts +3 -2
  217. package/lib/Spin/index.vue.js +1 -1
  218. package/lib/Spin/index.vue2.js +1 -1
  219. package/lib/Spin/type.d.ts +4 -3
  220. package/lib/Split/type.d.ts +5 -4
  221. package/lib/Statistic/type.d.ts +7 -7
  222. package/lib/Steps/type.d.ts +8 -7
  223. package/lib/Switch/index.vue.js +1 -1
  224. package/lib/Switch/index.vue2.js +1 -1
  225. package/lib/Switch/type.d.ts +5 -4
  226. package/lib/Tabs/Tabs.vue.js +1 -1
  227. package/lib/Tabs/Tabs.vue2.js +1 -1
  228. package/lib/Tabs/type.d.ts +5 -4
  229. package/lib/Tag/type.d.ts +4 -3
  230. package/lib/TimePicker/type.d.ts +4 -3
  231. package/lib/Timeline/type.d.ts +6 -5
  232. package/lib/Tooltip/type.d.ts +3 -3
  233. package/lib/Transfer/type.d.ts +13 -12
  234. package/lib/Trigger/hooks/useContext.js +1 -1
  235. package/lib/Trigger/hooks/useTriggerPosition.d.ts +2 -2
  236. package/lib/Trigger/hooks/useTriggerPosition.js +1 -1
  237. package/lib/Trigger/hooks/useTriggerVisible.js +1 -1
  238. package/lib/Trigger/index.d.ts +63 -2
  239. package/lib/Trigger/index.vue.d.ts +130 -3
  240. package/lib/Trigger/index.vue.js +1 -1
  241. package/lib/Trigger/index.vue2.js +1 -1
  242. package/lib/Trigger/type.d.ts +3 -3
  243. package/lib/Typography/type.d.ts +8 -7
  244. package/lib/Watermark/type.d.ts +2 -1
  245. package/lib/_shared/type/index.d.ts +1 -6
  246. package/lib/_shared/utils/dom.d.ts +5 -5
  247. package/lib/_shared/utils/dom.js +1 -1
  248. package/lib/_shared/utils/fn.d.ts +3 -3
  249. package/lib/_shared/utils/fn.js +1 -1
  250. package/lib/_shared/utils/global-config.d.ts +4 -2
  251. package/lib/_shared/utils/vue-utils.d.ts +1 -2
  252. package/lib/_shared/utils/vue-utils.js +1 -1
  253. package/lib/index.d.ts +66 -3
  254. package/lib/style.css +1 -1
  255. package/package.json +2 -2
@@ -1,6 +1,7 @@
1
1
  import { ObjectData, RenderContent, Size, PopupContainer } from '../_shared/type';
2
2
  import { TriggerInstance, TriggerProps } from '../Trigger';
3
3
  import { TagProps } from '../Tag';
4
+ import { VNode } from 'vue';
4
5
  export interface SelectProps {
5
6
  multiple?: boolean;
6
7
  modelValue?: SelectValue;
@@ -56,21 +57,21 @@ export interface SelectEmits {
56
57
  (e: 'select', value: SelectValue): void;
57
58
  }
58
59
  export interface SelectSlots {
59
- default(): void;
60
- trigger(): void;
61
- prefix(): void;
62
- ['search-icon'](): void;
63
- ['loading-icon'](): void;
64
- ['arrow-icon'](): void;
65
- footer(): void;
66
- header(): void;
67
- label(scope: {
60
+ default?: () => VNode[];
61
+ trigger?: () => VNode[];
62
+ prefix?: () => VNode[];
63
+ 'search-icon'?: () => VNode[];
64
+ 'loading-icon'?: () => VNode[];
65
+ 'arrow-icon'?: () => VNode[];
66
+ footer?: () => VNode[];
67
+ header?: () => VNode[];
68
+ label?: (scope: {
68
69
  data: ObjectData;
69
- }): void;
70
- option(scope: {
70
+ }) => VNode[];
71
+ option?: (scope: {
71
72
  data: ObjectData;
72
- }): void;
73
- empty(): void;
73
+ }) => VNode[];
74
+ empty?: () => VNode[];
74
75
  }
75
76
  export interface SelectExpose {
76
77
  focus(): void;
@@ -86,16 +87,16 @@ export interface OptionProps {
86
87
  isFallbackOption?: boolean;
87
88
  }
88
89
  export interface OptionSlots {
89
- default(): void;
90
- icon(): void;
91
- suffix(): void;
90
+ default?: () => VNode[];
91
+ icon?: () => VNode[];
92
+ suffix?: () => VNode[];
92
93
  }
93
94
  export interface OptgroupProps {
94
95
  label?: string;
95
96
  }
96
97
  export interface OptgroupSlots {
97
- default(): void;
98
- label(): void;
98
+ default?: () => VNode[];
99
+ label?: () => VNode[];
99
100
  }
100
101
  export type SelectValue = (string | number | boolean | ObjectData) | (string | number | boolean | ObjectData)[];
101
102
  export type SelectOptionData = {
@@ -1,10 +1,11 @@
1
+ import { VNode } from 'vue';
1
2
  export interface SkeletonProps {
2
3
  animation?: boolean;
3
4
  loading?: boolean;
4
5
  }
5
6
  export interface SkeletonSlots {
6
- default(): void;
7
- content(): void;
7
+ default?: () => VNode[];
8
+ content?: () => VNode[];
8
9
  }
9
10
  export interface SkeletonLineProps {
10
11
  rows?: number;
@@ -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-7f500669"]]);
4
+ const _Space = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7a9a36b0"]]);
5
5
  export {
6
6
  _Space as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, toRefs, useSlots, computed, Fragment, Comment, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, renderSlot, createCommentVNode, renderList, createElementVNode, createBlock, resolveDynamicComponent } from "vue";
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 "../_shared/utils/dom.js";
4
4
  import { valueToPx } from "../_shared/utils/fn.js";
@@ -25,9 +25,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  size: { default: "small" }
26
26
  },
27
27
  setup(__props) {
28
+ const slots = useSlots();
28
29
  const props = __props;
29
30
  const { size, direction, align: _align } = toRefs(props);
30
- const slots = useSlots();
31
31
  const gap = computed(() => {
32
32
  const map = {
33
33
  mini: 4,
@@ -1,4 +1,5 @@
1
1
  import { Direction, Size } from '../_shared/type';
2
+ import { VNode } from 'vue';
2
3
  export interface SpaceProps {
3
4
  align?: SpaceAlign;
4
5
  direction?: Direction;
@@ -7,7 +8,7 @@ export interface SpaceProps {
7
8
  size?: Size | number;
8
9
  }
9
10
  export interface SpaceSlots {
10
- default(): void;
11
- split(): void;
11
+ default?: () => VNode[];
12
+ split?: () => VNode[];
12
13
  }
13
14
  export type SpaceAlign = 'start' | 'end' | 'center' | 'baseline';
@@ -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 _Spin = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9ab77259"]]);
4
+ const _Spin = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4d07b531"]]);
5
5
  export {
6
6
  _Spin as default
7
7
  };
@@ -47,7 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47
47
  }
48
48
  ]),
49
49
  style: normalizeStyle({
50
- fontSize: !_ctx.isSizeInherit ? unref(valueToPx)(_ctx.size) : ""
50
+ fontSize: !_ctx.isSizeInherit ? unref(valueToPx)(_ctx.size) : "inherit"
51
51
  })
52
52
  }, [
53
53
  renderSlot(_ctx.$slots, "icon", {}, () => [
package/es/Spin/type.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { VNode } from 'vue';
1
2
  export interface SpinProps {
2
3
  size?: number;
3
4
  loading?: boolean;
@@ -7,7 +8,7 @@ export interface SpinProps {
7
8
  isSizeInherit?: boolean;
8
9
  }
9
10
  export interface SpinSlots {
10
- default(): void;
11
- icon(): void;
12
- tip(): void;
11
+ default?: () => VNode[];
12
+ icon?: () => VNode[];
13
+ tip?: () => VNode[];
13
14
  }
@@ -1,4 +1,5 @@
1
1
  import { Direction } from '../_shared/type';
2
+ import { VNode } from 'vue';
2
3
  export interface SplitProps {
3
4
  component?: string;
4
5
  direction?: Direction;
@@ -15,8 +16,8 @@ export interface SplitEmits {
15
16
  (e: 'moving-end'): void;
16
17
  }
17
18
  export interface SplitSlots {
18
- ['resize-trigger-icon'](): void;
19
- ['resize-trigger'](): void;
20
- first(): void;
21
- second(): void;
19
+ 'resize-trigger-icon'?: () => VNode[];
20
+ 'resize-trigger'?: () => VNode[];
21
+ first?: () => VNode[];
22
+ second?: () => VNode[];
22
23
  }
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from 'vue';
1
+ import { CSSProperties, VNode } from 'vue';
2
2
  export interface StatisticProps {
3
3
  title?: string;
4
4
  value?: StatisticValue;
@@ -20,11 +20,11 @@ export interface StatisticEmits {
20
20
  (e: 'finish'): void;
21
21
  }
22
22
  export interface StatisticSlots {
23
- title(): void;
24
- prefix(): void;
25
- suffix(): void;
26
- extra(): void;
27
- value(): void;
23
+ title?: () => VNode[];
24
+ prefix?: () => VNode[];
25
+ suffix?: () => VNode[];
26
+ extra?: () => VNode[];
27
+ value?: () => VNode[];
28
28
  }
29
29
  export interface CountdownProps {
30
30
  title?: string;
@@ -39,6 +39,6 @@ export interface CountDownEmits {
39
39
  (e: 'finish'): void;
40
40
  }
41
41
  export interface CountdownSlots {
42
- title(): void;
42
+ title?: () => VNode[];
43
43
  }
44
44
  export type StatisticValue = number | Date;
@@ -1,4 +1,5 @@
1
1
  import { Direction } from '../_shared/type';
2
+ import { VNode } from 'vue';
2
3
  export interface StepsProps {
3
4
  type?: StepType;
4
5
  direction?: Direction;
@@ -15,7 +16,7 @@ export interface StepsEmits {
15
16
  (e: 'update:current', step: number): void;
16
17
  }
17
18
  export interface StepsSlots {
18
- default(): void;
19
+ default?: () => VNode[];
19
20
  }
20
21
  export interface StepProps {
21
22
  title?: string;
@@ -24,16 +25,16 @@ export interface StepProps {
24
25
  disabled?: boolean;
25
26
  }
26
27
  export interface StepSlots {
27
- node(scope: {
28
+ node?: (scope: {
28
29
  step: number;
29
30
  status: StepStatus;
30
- }): void;
31
- icon(scope: {
31
+ }) => VNode[];
32
+ icon?: (scope: {
32
33
  step: number;
33
34
  status: StepStatus;
34
- }): void;
35
- description(): void;
36
- default(): void;
35
+ }) => VNode[];
36
+ description?: () => VNode[];
37
+ default?: () => VNode[];
37
38
  }
38
39
  export type StepStatus = 'wait' | 'process' | 'finish' | 'error';
39
40
  export type StepType = 'default' | 'arrow' | 'dot' | 'navigation';
@@ -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 _Switch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cc705f5d"]]);
4
+ const _Switch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-be8dccd4"]]);
5
5
  export {
6
6
  _Switch as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, useCssVars, computed, toRefs, useSlots, ref, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createCommentVNode, createBlock, renderSlot, createTextVNode, toDisplayString } from "vue";
1
+ import { defineComponent, useCssVars, computed, useSlots, toRefs, ref, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createCommentVNode, createBlock, renderSlot, createTextVNode, toDisplayString } from "vue";
2
2
  import "../node_modules/tinycolor2/esm/tinycolor.js";
3
3
  import "../_shared/utils/dom.js";
4
4
  import { isBoolean } from "../_shared/utils/is.js";
@@ -42,8 +42,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
42
  emits: ["update:modelValue", "change", "focus", "blur"],
43
43
  setup(__props, { emit: __emit }) {
44
44
  useCssVars((_ctx) => ({
45
- "455e587d": background.value
45
+ "e55eb67a": background.value
46
46
  }));
47
+ const slots = useSlots();
47
48
  const props = __props;
48
49
  const emits = __emit;
49
50
  const {
@@ -60,7 +61,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
61
  loading: _loading
61
62
  } = toRefs(props);
62
63
  const { beforeChange } = props;
63
- const slots = useSlots();
64
64
  const { size } = getGlobalConfig(props);
65
65
  const computedValue = useControlValue(
66
66
  modelValue,
@@ -1,3 +1,4 @@
1
+ import { VNode } from 'vue';
1
2
  export interface SwitchProps {
2
3
  modelValue?: SwitchValue;
3
4
  defaultChecked?: SwitchValue;
@@ -20,10 +21,10 @@ export interface SwitchEmits {
20
21
  (e: 'blur', ev: FocusEvent): void;
21
22
  }
22
23
  export interface SwitchSlots {
23
- ['checked-icon'](): void;
24
- ['unchecked-icon'](): void;
25
- ['checked'](): void;
26
- ['unchecked'](): void;
24
+ 'checked-icon'?: () => VNode[];
25
+ 'unchecked-icon'?: () => VNode[];
26
+ checked?: () => VNode[];
27
+ unchecked?: () => VNode[];
27
28
  }
28
29
  export type SwitchValue = string | number | boolean;
29
30
  export type SwitchType = 'circle' | 'round' | 'line';
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./Tabs.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
4
- const _Tabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d58d8b52"]]);
4
+ const _Tabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d4474e51"]]);
5
5
  export {
6
6
  _Tabs as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, useSlots, computed, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createCommentVNode, createBlock, withCtx, createVNode, normalizeStyle, Fragment, renderList, renderSlot, resolveDynamicComponent, nextTick } from "vue";
1
+ import { defineComponent, useSlots, ref, computed, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createCommentVNode, createBlock, withCtx, createVNode, normalizeStyle, Fragment, renderList, renderSlot, resolveDynamicComponent, nextTick } from "vue";
2
2
  import "../node_modules/tinycolor2/esm/tinycolor.js";
3
3
  import "../_shared/utils/dom.js";
4
4
  import { valueToPx } from "../_shared/utils/fn.js";
@@ -44,11 +44,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
44
  },
45
45
  emits: ["update:activeKey", "change", "tab-click", "add", "delete"],
46
46
  setup(__props, { emit: __emit }) {
47
+ const slots = useSlots();
47
48
  const props = __props;
48
49
  const emits = __emit;
49
50
  const listRef = ref();
50
51
  const { computedActiveKey, size, direction, autoSwitch, position } = useContext().provide(props, emits, listRef);
51
- const slots = useSlots();
52
52
  const tabPanes = computed(
53
53
  () => {
54
54
  var _a;
package/es/Tabs/type.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Direction, Size } from '../_shared/type';
2
+ import { VNode } from 'vue';
2
3
  export interface TabsProps {
3
4
  activeKey?: TabKey;
4
5
  defaultActiveKey?: TabKey;
@@ -24,8 +25,8 @@ export interface TabsEmits {
24
25
  (e: 'delete', value: TabKey): void;
25
26
  }
26
27
  export interface TabsSlots {
27
- extra(): void;
28
- default(): void;
28
+ extra?: () => VNode[];
29
+ default?: () => VNode[];
29
30
  }
30
31
  export interface TabPaneProps {
31
32
  title?: string;
@@ -35,8 +36,8 @@ export interface TabPaneProps {
35
36
  destoryOnHide?: boolean;
36
37
  }
37
38
  export interface TabPaneSlots {
38
- default(): void;
39
- title(): void;
39
+ default?: () => VNode[];
40
+ title?: () => VNode[];
40
41
  }
41
42
  export type TabKey = string | number;
42
43
  export type TabType = 'line' | 'card' | 'card-gutter' | 'text' | 'rounded' | 'capsule';
package/es/Tag/type.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { VNode } from 'vue';
1
2
  export interface TagProps {
2
3
  color?: string;
3
4
  size?: TagSize;
@@ -18,8 +19,8 @@ export interface TagEmits {
18
19
  (e: 'check', value: boolean, ev: MouseEvent): void;
19
20
  }
20
21
  export interface TagSlots {
21
- default(): void;
22
- icon(): void;
23
- ['close-icon'](): void;
22
+ default?: () => VNode[];
23
+ icon?: () => VNode[];
24
+ 'close-icon'?: () => VNode[];
24
25
  }
25
26
  export type TagSize = 'small' | 'medium' | 'large';
@@ -1,5 +1,6 @@
1
1
  import { PopupContainer, Size } from '../_shared/type';
2
2
  import { TriggerProps } from '../Trigger';
3
+ import { VNode } from 'vue';
3
4
  export interface TimePickerProps {
4
5
  type?: TimePickerType;
5
6
  modelValue?: TimePickerValue;
@@ -37,9 +38,9 @@ export interface TimePickerEmits {
37
38
  (e: 'popup-visible-change', value: boolean): void;
38
39
  }
39
40
  export interface TimePickerSlots {
40
- prefix(): void;
41
- ['suffix-icon'](): void;
42
- extra(): void;
41
+ prefix?: () => VNode[];
42
+ 'suffix-icon'?: () => VNode[];
43
+ extra?: () => VNode[];
43
44
  }
44
45
  export type TimeUnit = 'hour' | 'minute' | 'second';
45
46
  export type TimePickerValue = string | number | Date | (string | number | Date)[];
@@ -1,4 +1,5 @@
1
1
  import { Direction } from '../_shared/type';
2
+ import { VNode } from 'vue';
2
3
  export interface TimelineProps {
3
4
  reverse?: boolean;
4
5
  direction?: Direction;
@@ -7,8 +8,8 @@ export interface TimelineProps {
7
8
  labelPosition?: TimelineLabelPosition;
8
9
  }
9
10
  export interface TimelineSlots {
10
- dot(): void;
11
- default(): void;
11
+ dot?: () => VNode[];
12
+ default?: () => VNode[];
12
13
  }
13
14
  export interface TimelineItemProps {
14
15
  dotColor?: string;
@@ -20,9 +21,9 @@ export interface TimelineItemProps {
20
21
  isGhost?: boolean;
21
22
  }
22
23
  export interface TimelineItemSlots {
23
- dot(): void;
24
- label(): void;
25
- default(): void;
24
+ dot?: () => VNode[];
25
+ label?: () => VNode[];
26
+ default?: () => VNode[];
26
27
  }
27
28
  export type TimelineMode = 'left' | 'right' | 'top' | 'bottom' | 'alternate';
28
29
  export type TimelineLabelPosition = 'relative' | 'same';
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from 'vue';
1
+ import { CSSProperties, VNode } from 'vue';
2
2
  import { ClassName, PopupContainer } from '../_shared/type';
3
3
  import { TriggerPostion, TriggerProps } from '../Trigger/type';
4
4
  export interface TooltipProps {
@@ -20,8 +20,8 @@ export interface TooltipEmits {
20
20
  (e: 'popup-visible-change', value: boolean): void;
21
21
  }
22
22
  export interface TooltipSlots {
23
- default(): void;
24
- content(): void;
23
+ default?: () => VNode[];
24
+ content?: () => VNode[];
25
25
  }
26
26
  export interface TooltipExpose {
27
27
  hide(): void;
@@ -1,4 +1,5 @@
1
1
  import { InputProps } from '../Input';
2
+ import { VNode } from 'vue';
2
3
  export interface TransferProps {
3
4
  data?: TransferItem[];
4
5
  modelValue?: string[];
@@ -22,24 +23,24 @@ export interface TransferEmits {
22
23
  (e: 'search', value: string, type: 'target' | 'source'): void;
23
24
  }
24
25
  export interface TransferSlots {
25
- source(scope: DefaultSlots): void;
26
- target(scope: DefaultSlots): void;
27
- ['source-title'](scope: TitleSlots): void;
28
- ['target-title'](scope: TitleSlots): void;
29
- ['to-source-icon'](): void;
30
- ['to-target-icon'](): void;
31
- item(scope: {
26
+ source?: (scope: DefaultSlots) => VNode[];
27
+ target?: (scope: DefaultSlots) => VNode[];
28
+ 'source-title'?: (scope: TitleSlots) => VNode[];
29
+ 'target-title'?: (scope: TitleSlots) => VNode[];
30
+ 'to-source-icon'?: () => VNode[];
31
+ 'to-target-icon'?: () => VNode[];
32
+ item?: (scope: {
32
33
  value: string;
33
34
  label: string;
34
- }): void;
35
+ }) => VNode[];
35
36
  }
36
37
  export interface TransferPanelSlots {
37
- default(scope: DefaultSlots): void;
38
- ['title'](scope: TitleSlots): void;
39
- item(scope: {
38
+ default: (scope: DefaultSlots) => VNode[];
39
+ title: (scope: TitleSlots) => VNode[];
40
+ item: (scope: {
40
41
  value: string;
41
42
  label: string;
42
- }): void;
43
+ }) => VNode[];
43
44
  }
44
45
  export interface TransferItem {
45
46
  label?: string;
@@ -1,10 +1,10 @@
1
1
  import { inject, ref, provide, watch } from "vue";
2
2
  import { nanoid } from "../../node_modules/nanoid/index.browser.js";
3
+ import { unrefElement } from "../../node_modules/@vueuse/core/index.js";
3
4
  import "../../node_modules/tinycolor2/esm/tinycolor.js";
4
5
  import "../../_shared/utils/dom.js";
5
6
  import { sleep } from "../../_shared/utils/fn.js";
6
7
  import "../../_shared/utils/time.js";
7
- import { unrefElement } from "../../_shared/utils/vue-utils.js";
8
8
  import "../../Empty/index.js";
9
9
  /* empty css */
10
10
  const TRIGGER_CONTEXT_KEY = "trigger-context";
@@ -19,8 +19,8 @@ declare const _default: (params: {
19
19
  popupHeight: import('vue').ShallowRef<number, number>;
20
20
  triggerWidth: import('vue').ShallowRef<number, number>;
21
21
  triggerHeight: import('vue').ShallowRef<number, number>;
22
- arrowWidth: Ref<number, number>;
23
- arrowHeight: Ref<number, number>;
22
+ arrowWidth: import('vue').ShallowRef<number, number>;
23
+ arrowHeight: import('vue').ShallowRef<number, number>;
24
24
  popupStyle: import('vue').ComputedRef<{
25
25
  top: string;
26
26
  left: string;
@@ -1,10 +1,9 @@
1
1
  import { toRefs, ref, computed, watch } from "vue";
2
- import { useElementSize, useElementBounding } from "../../node_modules/@vueuse/core/index.js";
2
+ import { useElementSize, useElementBounding, unrefElement } from "../../node_modules/@vueuse/core/index.js";
3
3
  import "../../node_modules/tinycolor2/esm/tinycolor.js";
4
4
  import "../../_shared/utils/dom.js";
5
5
  import { valueToPx, sleep } from "../../_shared/utils/fn.js";
6
6
  import "../../_shared/utils/time.js";
7
- import { unrefElement } from "../../_shared/utils/vue-utils.js";
8
7
  import { getGlobalConfig } from "../../_shared/utils/global-config.js";
9
8
  const useTriggerPosition = (params) => {
10
9
  const {
@@ -39,7 +38,13 @@ const useTriggerPosition = (params) => {
39
38
  box: "border-box"
40
39
  }
41
40
  );
42
- const { arrowWidth, arrowHeight } = getArrowSize();
41
+ const { width: arrowWidth, height: arrowHeight } = useElementSize(
42
+ arrowRef,
43
+ void 0,
44
+ {
45
+ box: "border-box"
46
+ }
47
+ );
43
48
  const {
44
49
  left,
45
50
  top,
@@ -132,7 +137,7 @@ const useTriggerPosition = (params) => {
132
137
  })
133
138
  };
134
139
  });
135
- function calcPopupOffset() {
140
+ const calcPopupOffset = () => {
136
141
  const [translateX, translateY] = popupTranslate.value;
137
142
  let offsetX = translateX;
138
143
  let offsetY = translateY;
@@ -146,7 +151,7 @@ const useTriggerPosition = (params) => {
146
151
  offsetX = popupOffset.value;
147
152
  }
148
153
  return [offsetX, offsetY];
149
- }
154
+ };
150
155
  const calcPopupPosition = (params2) => {
151
156
  let offsetTop = 0;
152
157
  let offsetLeft = 0;
@@ -221,21 +226,6 @@ const useTriggerPosition = (params) => {
221
226
  }
222
227
  return [newLeft, newTop];
223
228
  };
224
- function getArrowSize() {
225
- if (!showArrow.value) {
226
- return {
227
- arrowWidth: ref(0),
228
- arrowHeight: ref(0)
229
- };
230
- }
231
- const { width, height } = useElementSize(arrowRef, void 0, {
232
- box: "border-box"
233
- });
234
- return {
235
- arrowWidth: width,
236
- arrowHeight: height
237
- };
238
- }
239
229
  const calcArrowPosition = (params2) => {
240
230
  const {
241
231
  position: position2,
@@ -282,7 +272,7 @@ const useTriggerPosition = (params) => {
282
272
  }
283
273
  return inset;
284
274
  };
285
- function calcPositionRef(params2) {
275
+ const calcPositionRef = (params2) => {
286
276
  const {
287
277
  offsetLeft,
288
278
  offsetTop,
@@ -314,7 +304,7 @@ const useTriggerPosition = (params) => {
314
304
  return Math.abs(finalLeft - offsetLeft) < epsilon && Math.abs(finalTop - offsetTop) < epsilon;
315
305
  });
316
306
  return (target == null ? void 0 : target[2]) ?? position.value;
317
- }
307
+ };
318
308
  watch(
319
309
  () => computedVisible.value,
320
310
  async (val) => {
@@ -1,10 +1,9 @@
1
1
  import { toRefs, ref, computed, watch, nextTick } from "vue";
2
- import { onClickOutside, useEventListener } from "../../node_modules/@vueuse/core/index.js";
2
+ import { unrefElement, onClickOutside, useEventListener } from "../../node_modules/@vueuse/core/index.js";
3
3
  import useContext from "./useContext.js";
4
4
  import "../../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import { findFirstScrollableParent } from "../../_shared/utils/dom.js";
6
6
  import "../../_shared/utils/time.js";
7
- import { unrefElement } from "../../_shared/utils/vue-utils.js";
8
7
  import { getGlobalConfig } from "../../_shared/utils/global-config.js";
9
8
  import useControlValue from "../../_shared/utils/control.js";
10
9
  const useTriggerVisible = (params) => {