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,4 +1,5 @@
1
1
  import { TargetContainer } from '../_shared/type';
2
+ import { VNode } from 'vue';
2
3
  export interface AffixProps {
3
4
  offsetTop?: number;
4
5
  offsetBottom?: number;
@@ -9,8 +10,8 @@ export interface AffixEmits {
9
10
  (e: 'change', fixed: boolean): void;
10
11
  }
11
12
  export interface AffixSlots {
12
- default(): void;
13
+ default?: () => VNode[];
13
14
  }
14
15
  export interface AffixExpose {
15
- 'updatePosition'(): void;
16
+ updatePosition(): void;
16
17
  }
@@ -1,3 +1,4 @@
1
+ import { VNode } from 'vue';
1
2
  export interface AlertProps {
2
3
  type?: AlertType;
3
4
  showIcon?: boolean;
@@ -11,10 +12,10 @@ export interface AlertEmits {
11
12
  (e: 'after-close'): void;
12
13
  }
13
14
  export interface AlertSlots {
14
- default(): void;
15
- icon(): void;
16
- title(): void;
17
- action(): void;
18
- ['close-element'](): void;
15
+ default?: () => VNode[];
16
+ icon?: () => VNode[];
17
+ title?: () => VNode[];
18
+ action?: () => VNode[];
19
+ 'close-element'?: () => VNode[];
19
20
  }
20
21
  export type AlertType = 'warning' | 'success' | 'info' | 'error' | 'normal';
@@ -1,4 +1,5 @@
1
1
  import { TargetContainer } from '../_shared/type';
2
+ import { VNode } from 'vue';
2
3
  export interface AnchorProps {
3
4
  boundary?: AnchorBoundary;
4
5
  lineLess?: boolean;
@@ -7,14 +8,14 @@ export interface AnchorProps {
7
8
  smooth?: boolean;
8
9
  }
9
10
  export interface AnchorSlots {
10
- default(): void;
11
+ default?: () => VNode[];
11
12
  }
12
13
  export interface AnchorLinkProps {
13
14
  title?: string;
14
15
  href?: string;
15
16
  }
16
17
  export interface AnchorLinkSlots {
17
- default(): void;
18
- sublist(): void;
18
+ default?: () => VNode[];
19
+ sublist?: () => VNode[];
19
20
  }
20
21
  export type AnchorBoundary = 'start' | 'end' | 'center' | 'nearest' | number;
@@ -160,7 +160,70 @@ declare const AutoComplete: {
160
160
  $attrs: {
161
161
  [x: string]: unknown;
162
162
  };
163
- $refs: any;
163
+ $refs: {
164
+ [x: string]: unknown;
165
+ } & {
166
+ triggerRef: unknown;
167
+ popupRef: ({
168
+ $: import('vue').ComponentInternalInstance;
169
+ $data: {};
170
+ $props: {
171
+ readonly preventFocus?: boolean | undefined;
172
+ readonly tag?: string | undefined;
173
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
174
+ $attrs: {
175
+ [x: string]: unknown;
176
+ };
177
+ $refs: {
178
+ [x: string]: unknown;
179
+ };
180
+ $slots: Readonly<{
181
+ [name: string]: import('vue').Slot<any> | undefined;
182
+ }>;
183
+ $root: import('vue').ComponentPublicInstance | null;
184
+ $parent: import('vue').ComponentPublicInstance | null;
185
+ $host: Element | null;
186
+ $emit: (event: string, ...args: any[]) => void;
187
+ $el: any;
188
+ $options: import('vue').ComponentOptionsBase<Readonly<{
189
+ preventFocus?: boolean;
190
+ tag?: string;
191
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
192
+ preventFocus: boolean;
193
+ tag: string;
194
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
195
+ beforeCreate?: (() => void) | (() => void)[];
196
+ created?: (() => void) | (() => void)[];
197
+ beforeMount?: (() => void) | (() => void)[];
198
+ mounted?: (() => void) | (() => void)[];
199
+ beforeUpdate?: (() => void) | (() => void)[];
200
+ updated?: (() => void) | (() => void)[];
201
+ activated?: (() => void) | (() => void)[];
202
+ deactivated?: (() => void) | (() => void)[];
203
+ beforeDestroy?: (() => void) | (() => void)[];
204
+ beforeUnmount?: (() => void) | (() => void)[];
205
+ destroyed?: (() => void) | (() => void)[];
206
+ unmounted?: (() => void) | (() => void)[];
207
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
208
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
209
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
210
+ };
211
+ $forceUpdate: () => void;
212
+ $nextTick: typeof import('vue').nextTick;
213
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
214
+ } & Readonly<{
215
+ preventFocus: boolean;
216
+ tag: string;
217
+ }> & Omit<Readonly<{
218
+ preventFocus?: boolean;
219
+ tag?: string;
220
+ }> & Readonly<{}>, "preventFocus" | "tag"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
221
+ $slots: {
222
+ default?(_: {}): any;
223
+ };
224
+ }) | null;
225
+ arrowRef: HTMLDivElement;
226
+ };
164
227
  $slots: Readonly<{
165
228
  [name: string]: import('vue').Slot<any> | undefined;
166
229
  }>;
@@ -281,7 +344,7 @@ declare const AutoComplete: {
281
344
  show(): void;
282
345
  updatePosition(x: number, y: number): void;
283
346
  }> & {} & import('vue').ComponentCustomProperties & {} & {
284
- $slots: any;
347
+ $slots: Readonly<import('..').TriggerSlots> & import('..').TriggerSlots;
285
348
  }) | null;
286
349
  inputRef: ({
287
350
  $: import('vue').ComponentInternalInstance;
@@ -118,7 +118,70 @@ declare function __VLS_template(): {
118
118
  $attrs: {
119
119
  [x: string]: unknown;
120
120
  };
121
- $refs: any;
121
+ $refs: {
122
+ [x: string]: unknown;
123
+ } & {
124
+ triggerRef: unknown;
125
+ popupRef: ({
126
+ $: import('vue').ComponentInternalInstance;
127
+ $data: {};
128
+ $props: {
129
+ readonly preventFocus?: boolean | undefined;
130
+ readonly tag?: string | undefined;
131
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
132
+ $attrs: {
133
+ [x: string]: unknown;
134
+ };
135
+ $refs: {
136
+ [x: string]: unknown;
137
+ };
138
+ $slots: Readonly<{
139
+ [name: string]: import('vue').Slot<any> | undefined;
140
+ }>;
141
+ $root: import('vue').ComponentPublicInstance | null;
142
+ $parent: import('vue').ComponentPublicInstance | null;
143
+ $host: Element | null;
144
+ $emit: (event: string, ...args: any[]) => void;
145
+ $el: any;
146
+ $options: import('vue').ComponentOptionsBase<Readonly<{
147
+ preventFocus?: boolean;
148
+ tag?: string;
149
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
150
+ preventFocus: boolean;
151
+ tag: string;
152
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
153
+ beforeCreate?: (() => void) | (() => void)[];
154
+ created?: (() => void) | (() => void)[];
155
+ beforeMount?: (() => void) | (() => void)[];
156
+ mounted?: (() => void) | (() => void)[];
157
+ beforeUpdate?: (() => void) | (() => void)[];
158
+ updated?: (() => void) | (() => void)[];
159
+ activated?: (() => void) | (() => void)[];
160
+ deactivated?: (() => void) | (() => void)[];
161
+ beforeDestroy?: (() => void) | (() => void)[];
162
+ beforeUnmount?: (() => void) | (() => void)[];
163
+ destroyed?: (() => void) | (() => void)[];
164
+ unmounted?: (() => void) | (() => void)[];
165
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
166
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
167
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
168
+ };
169
+ $forceUpdate: () => void;
170
+ $nextTick: typeof nextTick;
171
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
172
+ } & Readonly<{
173
+ preventFocus: boolean;
174
+ tag: string;
175
+ }> & Omit<Readonly<{
176
+ preventFocus?: boolean;
177
+ tag?: string;
178
+ }> & Readonly<{}>, "preventFocus" | "tag"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
179
+ $slots: {
180
+ default?(_: {}): any;
181
+ };
182
+ }) | null;
183
+ arrowRef: HTMLDivElement;
184
+ };
122
185
  $slots: Readonly<{
123
186
  [name: string]: import('vue').Slot<any> | undefined;
124
187
  }>;
@@ -239,7 +302,7 @@ declare function __VLS_template(): {
239
302
  show(): void;
240
303
  updatePosition(x: number, y: number): void;
241
304
  }> & {} & import('vue').ComponentCustomProperties & {} & {
242
- $slots: any;
305
+ $slots: Readonly<import('..').TriggerSlots> & import('..').TriggerSlots;
243
306
  }) | null;
244
307
  inputRef: ({
245
308
  $: import('vue').ComponentInternalInstance;
@@ -768,7 +831,70 @@ declare const __VLS_component: import('vue').DefineComponent<AutoCompleteProps,
768
831
  $attrs: {
769
832
  [x: string]: unknown;
770
833
  };
771
- $refs: any;
834
+ $refs: {
835
+ [x: string]: unknown;
836
+ } & {
837
+ triggerRef: unknown;
838
+ popupRef: ({
839
+ $: import('vue').ComponentInternalInstance;
840
+ $data: {};
841
+ $props: {
842
+ readonly preventFocus?: boolean | undefined;
843
+ readonly tag?: string | undefined;
844
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
845
+ $attrs: {
846
+ [x: string]: unknown;
847
+ };
848
+ $refs: {
849
+ [x: string]: unknown;
850
+ };
851
+ $slots: Readonly<{
852
+ [name: string]: import('vue').Slot<any> | undefined;
853
+ }>;
854
+ $root: import('vue').ComponentPublicInstance | null;
855
+ $parent: import('vue').ComponentPublicInstance | null;
856
+ $host: Element | null;
857
+ $emit: (event: string, ...args: any[]) => void;
858
+ $el: any;
859
+ $options: import('vue').ComponentOptionsBase<Readonly<{
860
+ preventFocus?: boolean;
861
+ tag?: string;
862
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
863
+ preventFocus: boolean;
864
+ tag: string;
865
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
866
+ beforeCreate?: (() => void) | (() => void)[];
867
+ created?: (() => void) | (() => void)[];
868
+ beforeMount?: (() => void) | (() => void)[];
869
+ mounted?: (() => void) | (() => void)[];
870
+ beforeUpdate?: (() => void) | (() => void)[];
871
+ updated?: (() => void) | (() => void)[];
872
+ activated?: (() => void) | (() => void)[];
873
+ deactivated?: (() => void) | (() => void)[];
874
+ beforeDestroy?: (() => void) | (() => void)[];
875
+ beforeUnmount?: (() => void) | (() => void)[];
876
+ destroyed?: (() => void) | (() => void)[];
877
+ unmounted?: (() => void) | (() => void)[];
878
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
879
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
880
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
881
+ };
882
+ $forceUpdate: () => void;
883
+ $nextTick: typeof nextTick;
884
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
885
+ } & Readonly<{
886
+ preventFocus: boolean;
887
+ tag: string;
888
+ }> & Omit<Readonly<{
889
+ preventFocus?: boolean;
890
+ tag?: string;
891
+ }> & Readonly<{}>, "preventFocus" | "tag"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
892
+ $slots: {
893
+ default?(_: {}): any;
894
+ };
895
+ }) | null;
896
+ arrowRef: HTMLDivElement;
897
+ };
772
898
  $slots: Readonly<{
773
899
  [name: string]: import('vue').Slot<any> | undefined;
774
900
  }>;
@@ -889,7 +1015,7 @@ declare const __VLS_component: import('vue').DefineComponent<AutoCompleteProps,
889
1015
  show(): void;
890
1016
  updatePosition(x: number, y: number): void;
891
1017
  }> & {} & import('vue').ComponentCustomProperties & {} & {
892
- $slots: any;
1018
+ $slots: Readonly<import('..').TriggerSlots> & import('..').TriggerSlots;
893
1019
  }) | null;
894
1020
  inputRef: ({
895
1021
  $: import('vue').ComponentInternalInstance;
@@ -1,6 +1,7 @@
1
1
  import { SelectOptions, SelectOptionData, VirtualListProps } from '../Select';
2
2
  import { PopupContainer, ObjectData } from '../_shared/type';
3
3
  import { TriggerProps } from '../Trigger';
4
+ import { VNode } from 'vue';
4
5
  export type AutoCompleteProps = {
5
6
  modelValue?: string;
6
7
  defaultValue?: string;
@@ -30,11 +31,11 @@ export interface AutoCompleteEmits {
30
31
  (e: 'keydown', ev: KeyboardEvent): void;
31
32
  }
32
33
  export interface AutoCompleteSlots {
33
- option(scope: {
34
+ option?: (scope: {
34
35
  data: ObjectData;
35
- }): void;
36
- footer(): void;
37
- trigger(): void;
36
+ }) => VNode[];
37
+ footer?: () => VNode[];
38
+ trigger?: () => VNode[];
38
39
  }
39
40
  export interface AutoCompleteExpose {
40
41
  focus(): void;
@@ -1 +1 @@
1
- "use strict";const e=require("./AvatarGroup.vue2.js");;/* empty css */const r=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-a468c247"]]);module.exports=r;
1
+ "use strict";const e=require("./AvatarGroup.vue2.js");;/* empty css */const r=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-9eceed96"]]);module.exports=r;
@@ -1 +1 @@
1
- "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const t=require("../_shared/utils/fn.js");require("../_shared/utils/time.js");const l=require("../_shared/utils/vue-utils.js");require("../Empty/index.js");/* empty css */const o=require("./hooks/useContext.js"),r=require("./index.js"),n=require("../Popover/index.js"),s={class:"yc-avatar-group"},a=e.defineComponent({name:"AvatarGroup",__name:"AvatarGroup",props:{shape:{default:"round"},size:{default:40},autoFixFontSize:{type:Boolean,default:!0},maxCount:{default:0},zIndexAscend:{type:Boolean,default:!1},maxStyle:{default:()=>({})},maxPopoverTriggerProps:{default:()=>({})}},setup(a){const u=a,{maxCount:i}=e.toRefs(u);o().provide(u);const d=e.useSlots(),c=e.computed(()=>{var e;const t=l.findComponentsFromVnodes((null==(e=d.default)?void 0:e.call(d))||[],r.default.name);return{visible:i.value>0?t.slice(0,i.value):t,hide:t.slice(i.value)}});return(l,o)=>(e.openBlock(),e.createElementBlock("div",s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.visible,(o,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{key:r,style:e.normalizeStyle({zIndex:l.zIndexAscend?r+1:c.value.visible.length-r,marginLeft:r?e.unref(t.valueToPx)(-l.size/4):""})},null,8,["style"]))),128)),e.unref(i)>0&&c.value.hide.length?(e.openBlock(),e.createBlock(e.unref(n),{key:0,"trigger-props":l.maxPopoverTriggerProps},{content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.hide,(o,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{key:r,style:e.normalizeStyle({border:"2px solid #fff",zIndex:l.zIndexAscend?r+1:c.value.hide.length-r,marginLeft:r?e.unref(t.valueToPx)(-l.size/4):""})},null,8,["style"]))),128))]),default:e.withCtx(()=>[e.createVNode(e.unref(r.default),{style:e.normalizeStyle({zIndex:l.zIndexAscend?c.value.visible.length:0,marginLeft:e.unref(t.valueToPx)(-l.size/4),...l.maxStyle})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`+${c.value.hide.length}`),1)]),_:1},8,["style"])]),_:1},8,["trigger-props"])):e.createCommentVNode("",!0)]))}});module.exports=a;
1
+ "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const t=require("../_shared/utils/fn.js");require("../_shared/utils/time.js");const l=require("../_shared/utils/vue-utils.js");require("../Empty/index.js");/* empty css */const o=require("./hooks/useContext.js"),r=require("./index.js"),n=require("../Popover/index.js"),s={class:"yc-avatar-group"},a=e.defineComponent({name:"AvatarGroup",__name:"AvatarGroup",props:{shape:{default:"round"},size:{default:40},autoFixFontSize:{type:Boolean,default:!0},maxCount:{default:0},zIndexAscend:{type:Boolean,default:!1},maxStyle:{default:()=>({})},maxPopoverTriggerProps:{default:()=>({})}},setup(a){const u=e.useSlots(),i=a,{maxCount:d}=e.toRefs(i);o().provide(i);const c=e.computed(()=>{var e;const t=l.findComponentsFromVnodes((null==(e=u.default)?void 0:e.call(u))||[],r.default.name);return{visible:d.value>0?t.slice(0,d.value):t,hide:t.slice(d.value)}});return(l,o)=>(e.openBlock(),e.createElementBlock("div",s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.visible,(o,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{key:r,style:e.normalizeStyle({zIndex:l.zIndexAscend?r+1:c.value.visible.length-r,marginLeft:r?e.unref(t.valueToPx)(-l.size/4):""})},null,8,["style"]))),128)),e.unref(d)>0&&c.value.hide.length?(e.openBlock(),e.createBlock(e.unref(n),{key:0,"trigger-props":l.maxPopoverTriggerProps},{content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.hide,(o,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{key:r,style:e.normalizeStyle({border:"2px solid #fff",zIndex:l.zIndexAscend?r+1:c.value.hide.length-r,marginLeft:r?e.unref(t.valueToPx)(-l.size/4):""})},null,8,["style"]))),128))]),default:e.withCtx(()=>[e.createVNode(e.unref(r.default),{style:e.normalizeStyle({zIndex:l.zIndexAscend?c.value.visible.length:0,marginLeft:e.unref(t.valueToPx)(-l.size/4),...l.maxStyle})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`+${c.value.hide.length}`),1)]),_:1},8,["style"])]),_:1},8,["trigger-props"])):e.createCommentVNode("",!0)]))}});module.exports=a;
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from 'vue';
1
+ import { CSSProperties, VNode } from 'vue';
2
2
  import { TriggerProps } from '../Trigger';
3
3
  export interface AvatarProps {
4
4
  shape?: AvatarShape;
@@ -15,8 +15,8 @@ export interface AvatarEmits {
15
15
  (e: 'load', ev: Event): void;
16
16
  }
17
17
  export interface AvatarSlots {
18
- default(): void;
19
- ['trigger-icon'](): void;
18
+ default?: () => VNode[];
19
+ 'trigger-icon'?: () => VNode[];
20
20
  }
21
21
  export interface AvatarGroupProps {
22
22
  shape?: AvatarShape;
@@ -28,7 +28,7 @@ export interface AvatarGroupProps {
28
28
  maxPopoverTriggerProps?: TriggerProps;
29
29
  }
30
30
  export interface AvatarGroupSlots {
31
- default(): void;
31
+ default?: () => VNode[];
32
32
  }
33
33
  export type AvatarShape = 'square' | 'round';
34
34
  export type AvatarTriggerType = 'mask' | 'button';
@@ -1,4 +1,5 @@
1
1
  import { TargetContainer } from '../_shared/type';
2
+ import { VNode } from 'vue';
2
3
  export interface BackTopProps {
3
4
  visibleHeight?: number;
4
5
  targetContainer?: TargetContainer;
@@ -6,5 +7,5 @@ export interface BackTopProps {
6
7
  duration?: number;
7
8
  }
8
9
  export interface BackTopSlots {
9
- default(): void;
10
+ default?: () => VNode[];
10
11
  }
@@ -1 +1 @@
1
- "use strict";const e=;/* empty css */;/* empty css */const r=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-7f171981"]]);module.exports=r;
1
+ "use strict";const e=;/* empty css */;/* empty css */const r=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-d3df3cf9"]]);module.exports=r;
@@ -1 +1 @@
1
- "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const t=require("../_shared/utils/fn.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const a=require("../_shared/constants/index.js"),l={key:0,class:"yc-badge-stauts-wrapper"},o={key:0,class:"yc-badge-status-text"},u=e.defineComponent({name:"Badge",__name:"index",props:{text:{default:""},dot:{type:Boolean,default:!1},dotStyle:{default:()=>({})},maxCount:{default:99},offset:{default:()=>[0,0]},color:{default:void 0},status:{default:void 0},count:{default:void 0}},setup(u){const s=u,{text:n,dot:r,count:d,maxCount:c,offset:i,dotStyle:v,status:m,color:y}=e.toRefs(s),f=e.useSlots(),g=e.computed(()=>({margin:`${t.valueToPx(i.value[1])} ${t.valueToPx(-i.value[0])} 0 0`,...v.value})),p=e.computed(()=>f.content?"yc-badge-custom-dot":y.value||m.value?"yc-badge-status":n.value?"yc-badge-text":r.value?"yc-badge-dot":"yc-badge-number"),b=e.computed(()=>y.value||m.value||n.value||r.value?n.value:d.value>=c.value?`${c.value}+`:d.value);return(t,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-badge",{"yc-badge-no-children":!t.$slots.default}])},[e.renderSlot(t.$slots,"default",{},void 0,!0),"yc-badge-status"==p.value?(e.openBlock(),e.createElementBlock("div",l,[e.createElementVNode("div",{class:e.normalizeClass(["yc-badge-stauts-dot",{[`yc-badge-color-${e.unref(y)}`]:e.unref(y),[`yc-badge-status-${e.unref(m)}`]:e.unref(m)}]),style:e.normalizeStyle({backgroundColor:e.unref(a.TAG_PRESET_COLORS).includes(e.unref(y))?"":e.unref(y),...e.unref(v)})},null,6),b.value?(e.openBlock(),e.createElementBlock("div",o,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)])):"yc-badge-number"!=p.value||e.unref(d)>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([p.value]),style:e.normalizeStyle(g.value)},[e.renderSlot(t.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(b.value),1)],!0)],6)):e.createCommentVNode("",!0)],2))}});module.exports=u;
1
+ "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const t=require("../_shared/utils/fn.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const a=require("../_shared/constants/index.js"),l={key:0,class:"yc-badge-stauts-wrapper"},o={key:0,class:"yc-badge-status-text"},u=e.defineComponent({name:"Badge",__name:"index",props:{text:{default:""},dot:{type:Boolean,default:!1},dotStyle:{default:()=>({})},maxCount:{default:99},offset:{default:()=>[0,0]},color:{default:void 0},status:{default:void 0},count:{default:void 0}},setup(u){const s=e.useSlots(),n=u,{text:r,dot:d,count:c,maxCount:i,offset:v,dotStyle:m,status:y,color:f}=e.toRefs(n),g=e.computed(()=>({margin:`${t.valueToPx(v.value[1])} ${t.valueToPx(-v.value[0])} 0 0`,...m.value})),p=e.computed(()=>s.content?"yc-badge-custom-dot":f.value||y.value?"yc-badge-status":r.value?"yc-badge-text":d.value?"yc-badge-dot":"yc-badge-number"),b=e.computed(()=>f.value||y.value||r.value||d.value?r.value:c.value>=i.value?`${i.value}+`:c.value);return(t,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-badge",{"yc-badge-no-children":!t.$slots.default}])},[e.renderSlot(t.$slots,"default",{},void 0,!0),"yc-badge-status"==p.value?(e.openBlock(),e.createElementBlock("div",l,[e.createElementVNode("div",{class:e.normalizeClass(["yc-badge-stauts-dot",{[`yc-badge-color-${e.unref(f)}`]:e.unref(f),[`yc-badge-status-${e.unref(y)}`]:e.unref(y)}]),style:e.normalizeStyle({backgroundColor:e.unref(a.TAG_PRESET_COLORS).includes(e.unref(f))?"":e.unref(f),...e.unref(m)})},null,6),b.value?(e.openBlock(),e.createElementBlock("div",o,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)])):"yc-badge-number"!=p.value||e.unref(c)>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([p.value]),style:e.normalizeStyle(g.value)},[e.renderSlot(t.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(b.value),1)],!0)],6)):e.createCommentVNode("",!0)],2))}});module.exports=u;
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from 'vue';
1
+ import { CSSProperties, VNode } from 'vue';
2
2
  export interface BadgeProps {
3
3
  text?: string;
4
4
  dot?: boolean;
@@ -10,7 +10,7 @@ export interface BadgeProps {
10
10
  count?: number;
11
11
  }
12
12
  export interface BadgeSlots {
13
- default(): void;
14
- content(): void;
13
+ default?: () => VNode[];
14
+ content?: () => VNode[];
15
15
  }
16
16
  export type BadgeStatus = 'normal' | 'processing' | 'success' | 'warning' | 'danger';
@@ -1,4 +1,5 @@
1
1
  import { DropdownProps } from '../Dropdown';
2
+ import { VNode } from 'vue';
2
3
  export interface BreadcrumbProps {
3
4
  maxCount?: number;
4
5
  routes?: BreadcrumbRoute[];
@@ -6,14 +7,14 @@ export interface BreadcrumbProps {
6
7
  customUrl?: CustomUrl;
7
8
  }
8
9
  export interface BreadcrumbSlots {
9
- default(): void;
10
- ['item-render'](scope: {
10
+ default?: () => VNode[];
11
+ 'item-render': (scope: {
11
12
  route: BreadcrumbRoute;
12
13
  routes: BreadcrumbRoute[];
13
14
  paths: string[];
14
- }): void;
15
- ['more-icon'](): void;
16
- separator(): void;
15
+ }) => VNode[];
16
+ 'more-icon'?: () => VNode[];
17
+ separator?: () => VNode[];
17
18
  }
18
19
  export interface BreadcrumbItemProps {
19
20
  separator?: BreadcrumbSeparator;
@@ -23,9 +24,9 @@ export interface BreadcrumbItemProps {
23
24
  showSeparator?: boolean;
24
25
  }
25
26
  export interface BreadcrumbItemSlots {
26
- default(): void;
27
- droplist(): void;
28
- separator(): void;
27
+ default?: () => VNode[];
28
+ droplist?: () => VNode[];
29
+ separator?: () => VNode[];
29
30
  }
30
31
  export interface BreadcrumbRoute {
31
32
  label?: string;
@@ -1 +1 @@
1
- "use strict";const e=require("./Button.vue2.js");;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-70cfe83d"]]);module.exports=t;
1
+ "use strict";const e=require("./Button.vue2.js");;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-2327bc3e"]]);module.exports=t;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),o=require("./hooks/useContext.js"),t=require("../Spin/index.js"),n=["href"],l={key:0,class:"yc-button-icon"},u=["type","disabled"],s={key:0,class:"yc-button-icon"},c=e.defineComponent({name:"Button",__name:"Button",props:{type:{default:void 0},shape:{default:void 0},status:{default:void 0},size:{default:void 0},long:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},htmlType:{default:"button"},href:{default:""}},emits:["mousedown","mouseup","click","dblclick","contextmenu"],setup(c,{emit:a}){const i=c,d=a,{loading:r,disabled:p,type:k,status:m,shape:y,long:f}=e.toRefs(i),{size:b,disabled:v,type:B,status:h,shape:$}=o().inject(i),g=e.useSlots(),x=e.computed(()=>["yc-button",`yc-button-size-${b.value}`,`yc-button-${B.value}`,`yc-button-status-${h.value}`,`yc-button-shape-${$.value}`,{"yc-button-long":f.value,"yc-button-loading":r.value,"yc-button-disabled":v.value,"yc-button-only-icon":!g.default}]),C=(e,o)=>{v.value||r.value||d(e,o)};return(o,c)=>o.href?(e.openBlock(),e.createElementBlock("a",e.mergeProps({key:0,href:o.href,class:x.value},o.$attrs,{onMousedown:c[0]||(c[0]=e=>C("mousedown",e)),onMouseup:c[1]||(c[1]=e=>C("mouseup",e)),onClick:c[2]||(c[2]=e=>C("click",e)),onDblclick:c[3]||(c[3]=e=>C("dblclick",e)),onContextmenu:c[4]||(c[4]=e=>C("contextmenu",e))}),[o.$slots.icon||e.unref(r)?(e.openBlock(),e.createElementBlock("span",l,[e.unref(r)?(e.openBlock(),e.createBlock(e.unref(t),{key:0,"is-size-inherit":""})):e.renderSlot(o.$slots,"icon",{key:1},void 0,!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0)],16,n)):(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:1,type:o.htmlType,disabled:e.unref(v),class:x.value},o.$attrs,{onMousedown:c[5]||(c[5]=e=>C("mousedown",e)),onMouseup:c[6]||(c[6]=e=>C("mouseup",e)),onClick:c[7]||(c[7]=e=>C("click",e)),onDblclick:c[8]||(c[8]=e=>C("dblclick",e)),onContextmenu:c[9]||(c[9]=e=>C("contextmenu",e))}),[o.$slots.icon||e.unref(r)?(e.openBlock(),e.createElementBlock("span",s,[e.unref(r)?(e.openBlock(),e.createBlock(e.unref(t),{key:0,"is-size-inherit":""})):e.renderSlot(o.$slots,"icon",{key:1},void 0,!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0)],16,u))}});module.exports=c;
1
+ "use strict";const e=require("vue"),o=require("./hooks/useContext.js"),t=require("../Spin/index.js"),n=["href"],l={key:0,class:"yc-button-icon"},u=["type","disabled"],s={key:0,class:"yc-button-icon"},c=e.defineComponent({name:"Button",__name:"Button",props:{type:{default:void 0},shape:{default:void 0},status:{default:void 0},size:{default:void 0},long:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},htmlType:{default:"button"},href:{default:""}},emits:["mousedown","mouseup","click","dblclick","contextmenu"],setup(c,{emit:a}){const i=e.useSlots(),d=c,r=a,{loading:p,disabled:k,type:m,status:y,shape:f,long:b}=e.toRefs(d),{size:v,disabled:B,type:h,status:$,shape:g}=o().inject(d),x=e.computed(()=>["yc-button",`yc-button-size-${v.value}`,`yc-button-${h.value}`,`yc-button-status-${$.value}`,`yc-button-shape-${g.value}`,{"yc-button-long":b.value,"yc-button-loading":p.value,"yc-button-disabled":B.value,"yc-button-only-icon":!i.default}]),C=(e,o)=>{B.value||p.value||r(e,o)};return(o,c)=>o.href?(e.openBlock(),e.createElementBlock("a",e.mergeProps({key:0,href:o.href,class:x.value},o.$attrs,{onMousedown:c[0]||(c[0]=e=>C("mousedown",e)),onMouseup:c[1]||(c[1]=e=>C("mouseup",e)),onClick:c[2]||(c[2]=e=>C("click",e)),onDblclick:c[3]||(c[3]=e=>C("dblclick",e)),onContextmenu:c[4]||(c[4]=e=>C("contextmenu",e))}),[o.$slots.icon||e.unref(p)?(e.openBlock(),e.createElementBlock("span",l,[e.unref(p)?(e.openBlock(),e.createBlock(e.unref(t),{key:0,"is-size-inherit":""})):e.renderSlot(o.$slots,"icon",{key:1},void 0,!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0)],16,n)):(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:1,type:o.htmlType,disabled:e.unref(B),class:x.value},o.$attrs,{onMousedown:c[5]||(c[5]=e=>C("mousedown",e)),onMouseup:c[6]||(c[6]=e=>C("mouseup",e)),onClick:c[7]||(c[7]=e=>C("click",e)),onDblclick:c[8]||(c[8]=e=>C("dblclick",e)),onContextmenu:c[9]||(c[9]=e=>C("contextmenu",e))}),[o.$slots.icon||e.unref(p)?(e.openBlock(),e.createElementBlock("span",s,[e.unref(p)?(e.openBlock(),e.createBlock(e.unref(t),{key:0,"is-size-inherit":""})):e.renderSlot(o.$slots,"icon",{key:1},void 0,!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0)],16,u))}});module.exports=c;
@@ -1,4 +1,5 @@
1
1
  import { Size } from '../_shared/type';
2
+ import { VNode } from 'vue';
2
3
  export interface ButtonProps {
3
4
  type?: ButtonType;
4
5
  shape?: ButtonShape;
@@ -18,8 +19,8 @@ export interface ButtonEmits {
18
19
  (e: 'contextmenu', event: MouseEvent): void;
19
20
  }
20
21
  export interface ButtonSlots {
21
- default(): void;
22
- icon(): void;
22
+ default?: () => VNode[];
23
+ icon?: () => VNode[];
23
24
  }
24
25
  export interface ButtonGroupProps {
25
26
  type?: ButtonType;
@@ -29,7 +30,7 @@ export interface ButtonGroupProps {
29
30
  disabled?: boolean;
30
31
  }
31
32
  export interface ButtonGroupSlots {
32
- default(): void;
33
+ default?: () => VNode[];
33
34
  }
34
35
  export type ButtonStatus = 'normal' | 'warning' | 'success' | 'danger';
35
36
  export type ButtonShape = 'square' | 'circle' | 'round';
@@ -1,3 +1,4 @@
1
+ import { VNode } from 'vue';
1
2
  export interface CalendarProps {
2
3
  modelValue?: Date;
3
4
  defaultValue?: Date;
@@ -12,14 +13,14 @@ export interface CalendarEmits {
12
13
  (e: 'panel-change', value: Date): void;
13
14
  }
14
15
  export interface CalendarSlots {
15
- header(scope: {
16
+ header: (scope: {
16
17
  year: number;
17
18
  month: number;
18
- }): void;
19
- default(scope: {
19
+ }) => VNode[];
20
+ default: (scope: {
20
21
  year: number;
21
22
  month: number;
22
23
  day: number;
23
- }): void;
24
+ }) => VNode[];
24
25
  }
25
26
  export type CalendarMode = 'month' | 'year';
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from 'vue';
1
+ import { CSSProperties, VNode } from 'vue';
2
2
  export interface CardProps {
3
3
  bordered?: boolean;
4
4
  loading?: boolean;
@@ -10,25 +10,25 @@ export interface CardProps {
10
10
  extra?: string;
11
11
  }
12
12
  export interface CardSlots {
13
- actions(): void;
14
- cover(): void;
15
- extra(): void;
16
- title(): void;
17
- default(): void;
13
+ actions?: () => VNode[];
14
+ cover?: () => VNode[];
15
+ extra?: () => VNode[];
16
+ title?: () => VNode[];
17
+ default?: () => VNode[];
18
18
  }
19
19
  export interface CardMetaProps {
20
20
  title?: string;
21
21
  description?: string;
22
22
  }
23
23
  export interface CardMetaSlots {
24
- description(): void;
25
- title(): void;
26
- avatar(): void;
24
+ description?: () => VNode[];
25
+ title?: () => VNode[];
26
+ avatar?: () => VNode[];
27
27
  }
28
28
  export interface CardGridProps {
29
29
  hoverable?: boolean;
30
30
  }
31
31
  export interface CardGridSlots {
32
- default(): void;
32
+ default?: () => VNode[];
33
33
  }
34
34
  export type CardSize = 'medium' | 'small';
@@ -1,4 +1,5 @@
1
1
  import { ClassName, Direction } from '../_shared/type';
2
+ import { VNode } from 'vue';
2
3
  export interface CarouselProps {
3
4
  current?: number;
4
5
  defaultCurrent?: number;
@@ -19,10 +20,10 @@ export interface CarouselEmits {
19
20
  (e: 'change', index: number, preIndex: number, isManual: boolean): void;
20
21
  }
21
22
  export interface CarouselSlots {
22
- default(): void;
23
+ default?: () => VNode[];
23
24
  }
24
25
  export interface CarouselItemSlots {
25
- default(): void;
26
+ default?: () => VNode[];
26
27
  }
27
28
  export type CarouselAnimationName = 'slide' | 'fade';
28
29
  export type CarouselShowArrow = 'always' | 'hover' | 'never';
@@ -1,4 +1,4 @@
1
- import { RenderFunction } from 'vue';
1
+ import { RenderFunction, VNode } from 'vue';
2
2
  import { PopupContainer, Size } from '../_shared/type';
3
3
  import { TagProps } from '../Tag';
4
4
  import { TriggerProps } from '../Trigger';
@@ -47,17 +47,17 @@ export interface CascaderEmits {
47
47
  (e: 'blur', ev: FocusEvent): void;
48
48
  }
49
49
  export interface CascaderSlots {
50
- label(scope: {
50
+ label?: (scope: {
51
51
  data: CascaderOption;
52
- }): void;
53
- prefix(): void;
54
- ['arrow-icon'](): void;
55
- ['loading-icon'](): void;
56
- ['search-icon'](): void;
57
- empty(): void;
58
- option(scope: {
52
+ }) => VNode[];
53
+ prefix?: () => VNode[];
54
+ 'arrow-icon'?: () => VNode[];
55
+ 'loading-icon'?: () => VNode[];
56
+ 'search-icon'?: () => VNode[];
57
+ empty?: () => VNode[];
58
+ option?: (scope: {
59
59
  data: CascaderOption;
60
- }): void;
60
+ }) => VNode[];
61
61
  }
62
62
  export type CascaderValue = CascaderOptionValue | CascaderOptionValue[] | CascaderOptionValue[][];
63
63
  export type CascaderOptionValue = string | number | Record<string, any>;