yc-design-vue 2.1.9 → 2.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.
Files changed (130) hide show
  1. package/dist/index.umd.js +1 -1
  2. package/dist/style.css +1 -1
  3. package/es/Avatar/Avatar.vue.d.ts +1 -1
  4. package/es/Avatar/index.d.ts +3 -3
  5. package/es/Badge/index.d.ts +3 -3
  6. package/es/Badge/index.vue.d.ts +1 -1
  7. package/es/Button/Button.vue.d.ts +2 -2
  8. package/es/Button/ButtonGroup.vue.d.ts +1 -1
  9. package/es/Button/index.d.ts +9 -9
  10. package/es/Card/Card.vue.d.ts +1 -1
  11. package/es/Card/index.d.ts +3 -3
  12. package/es/Cascader/Cascader.vue.d.ts +12 -44
  13. package/es/Cascader/index.d.ts +6 -22
  14. package/es/Dropdown/DropdownButton.vue.d.ts +1 -1
  15. package/es/Dropdown/index.d.ts +3 -3
  16. package/es/Image/ImagePreviewToolbar.vue.js +6 -6
  17. package/es/Input/Input.vue.d.ts +2 -8
  18. package/es/Input/Input.vue.js +24 -46
  19. package/es/Input/InputPassword.vue.d.ts +309 -0
  20. package/es/Input/InputPassword.vue.js +122 -0
  21. package/es/Input/InputPassword.vue2.js +4 -0
  22. package/es/Input/InputSearch.vue.d.ts +310 -0
  23. package/es/Input/InputSearch.vue.js +133 -0
  24. package/es/Input/InputSearch.vue2.js +4 -0
  25. package/es/Input/hooks/useLimitedInput.d.ts +2 -0
  26. package/es/Input/hooks/useLimitedInput.js +2 -0
  27. package/es/Input/index.css +1 -1
  28. package/es/Input/index.d.ts +420 -23
  29. package/es/Input/index.js +11 -3
  30. package/es/Input/type.d.ts +24 -6
  31. package/es/InputNumber/InputNumber.vue.d.ts +12 -44
  32. package/es/InputNumber/index.d.ts +6 -22
  33. package/es/Link/index.d.ts +3 -3
  34. package/es/Link/index.vue.d.ts +1 -1
  35. package/es/Statistic/Statistic.vue.d.ts +1 -1
  36. package/es/Statistic/index.d.ts +3 -3
  37. package/es/Steps/Step.vue.d.ts +1 -1
  38. package/es/Steps/Steps.vue.d.ts +1 -1
  39. package/es/Steps/index.d.ts +6 -6
  40. package/es/Transfer/TransferPanel.vue.js +1 -1
  41. package/es/Typography/TypographyBase.vue.d.ts +12 -44
  42. package/es/Upload/UploadPictureCard.vue2.js +1 -1
  43. package/es/_shared/icons/IconEyeClose.vue.js +32 -1
  44. package/es/_shared/icons/IconEyeClose.vue2.js +1 -32
  45. package/es/_shared/icons/IconEyeOpen.vue.js +29 -1
  46. package/es/_shared/icons/IconEyeOpen.vue2.js +1 -29
  47. package/es/_shared/icons/IconFullScreen.vue.js +1 -28
  48. package/es/_shared/icons/IconFullScreen.vue2.js +28 -1
  49. package/es/_shared/icons/IconOriginSize.vue.js +1 -34
  50. package/es/_shared/icons/IconOriginSize.vue2.js +34 -1
  51. package/es/_shared/icons/IconRotateLeft.vue.js +1 -28
  52. package/es/_shared/icons/IconRotateLeft.vue2.js +28 -1
  53. package/es/_shared/icons/IconRotateRight.vue.js +1 -28
  54. package/es/_shared/icons/IconRotateRight.vue2.js +28 -1
  55. package/es/_shared/icons/IconSearch.vue.js +28 -1
  56. package/es/_shared/icons/IconSearch.vue2.js +1 -28
  57. package/es/_shared/icons/IconZoomIn.vue.js +1 -28
  58. package/es/_shared/icons/IconZoomIn.vue2.js +28 -1
  59. package/es/_shared/icons/IconZoomOut.vue.js +1 -28
  60. package/es/_shared/icons/IconZoomOut.vue2.js +28 -1
  61. package/es/index.d.ts +9 -9
  62. package/es/index.js +4 -0
  63. package/es/style.css +1 -1
  64. package/lib/Avatar/Avatar.vue.d.ts +1 -1
  65. package/lib/Avatar/index.d.ts +3 -3
  66. package/lib/Badge/index.d.ts +3 -3
  67. package/lib/Badge/index.vue.d.ts +1 -1
  68. package/lib/Button/Button.vue.d.ts +2 -2
  69. package/lib/Button/ButtonGroup.vue.d.ts +1 -1
  70. package/lib/Button/index.d.ts +9 -9
  71. package/lib/Card/Card.vue.d.ts +1 -1
  72. package/lib/Card/index.d.ts +3 -3
  73. package/lib/Cascader/Cascader.vue.d.ts +12 -44
  74. package/lib/Cascader/index.d.ts +6 -22
  75. package/lib/Dropdown/DropdownButton.vue.d.ts +1 -1
  76. package/lib/Dropdown/index.d.ts +3 -3
  77. package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
  78. package/lib/Input/Input.vue.d.ts +2 -8
  79. package/lib/Input/Input.vue.js +1 -1
  80. package/lib/Input/InputPassword.vue.d.ts +309 -0
  81. package/lib/Input/InputPassword.vue.js +1 -0
  82. package/lib/Input/{InputSuffix.vue3.js → InputPassword.vue2.js} +1 -1
  83. package/lib/Input/InputSearch.vue.d.ts +310 -0
  84. package/lib/Input/InputSearch.vue.js +1 -0
  85. package/lib/Input/InputSearch.vue2.js +1 -0
  86. package/lib/Input/hooks/useLimitedInput.d.ts +2 -0
  87. package/lib/Input/hooks/useLimitedInput.js +1 -1
  88. package/lib/Input/index.css +1 -1
  89. package/lib/Input/index.d.ts +420 -23
  90. package/lib/Input/index.js +1 -1
  91. package/lib/Input/type.d.ts +24 -6
  92. package/lib/InputNumber/InputNumber.vue.d.ts +12 -44
  93. package/lib/InputNumber/index.d.ts +6 -22
  94. package/lib/Link/index.d.ts +3 -3
  95. package/lib/Link/index.vue.d.ts +1 -1
  96. package/lib/Statistic/Statistic.vue.d.ts +1 -1
  97. package/lib/Statistic/index.d.ts +3 -3
  98. package/lib/Steps/Step.vue.d.ts +1 -1
  99. package/lib/Steps/Steps.vue.d.ts +1 -1
  100. package/lib/Steps/index.d.ts +6 -6
  101. package/lib/Transfer/TransferPanel.vue.js +1 -1
  102. package/lib/Typography/TypographyBase.vue.d.ts +12 -44
  103. package/lib/Upload/UploadPictureCard.vue2.js +1 -1
  104. package/lib/_shared/icons/IconEyeClose.vue.js +1 -1
  105. package/lib/_shared/icons/IconEyeClose.vue2.js +1 -1
  106. package/lib/_shared/icons/IconEyeOpen.vue.js +1 -1
  107. package/lib/_shared/icons/IconEyeOpen.vue2.js +1 -1
  108. package/lib/_shared/icons/IconFullScreen.vue.js +1 -1
  109. package/lib/_shared/icons/IconFullScreen.vue2.js +1 -1
  110. package/lib/_shared/icons/IconOriginSize.vue.js +1 -1
  111. package/lib/_shared/icons/IconOriginSize.vue2.js +1 -1
  112. package/lib/_shared/icons/IconRotateLeft.vue.js +1 -1
  113. package/lib/_shared/icons/IconRotateLeft.vue2.js +1 -1
  114. package/lib/_shared/icons/IconRotateRight.vue.js +1 -1
  115. package/lib/_shared/icons/IconRotateRight.vue2.js +1 -1
  116. package/lib/_shared/icons/IconSearch.vue.js +1 -1
  117. package/lib/_shared/icons/IconSearch.vue2.js +1 -1
  118. package/lib/_shared/icons/IconZoomIn.vue.js +1 -1
  119. package/lib/_shared/icons/IconZoomIn.vue2.js +1 -1
  120. package/lib/_shared/icons/IconZoomOut.vue.js +1 -1
  121. package/lib/_shared/icons/IconZoomOut.vue2.js +1 -1
  122. package/lib/index.d.ts +9 -9
  123. package/lib/index.js +1 -1
  124. package/lib/style.css +1 -1
  125. package/package.json +1 -1
  126. package/es/Input/InputSuffix.vue.d.ts +0 -31
  127. package/es/Input/InputSuffix.vue.js +0 -58
  128. package/es/Input/InputSuffix.vue3.js +0 -5
  129. package/lib/Input/InputSuffix.vue.d.ts +0 -31
  130. package/lib/Input/InputSuffix.vue.js +0 -1
@@ -1,7 +1,12 @@
1
1
  import { App } from 'vue';
2
2
  import { default as _Input } from './Input.vue';
3
+ import { default as _InputSearch } from './InputSearch.vue';
4
+ import { default as _InputPassword } from './InputPassword.vue';
3
5
  import { default as _InputGroup } from './InputGroup.vue';
4
6
  export type InputInstance = InstanceType<typeof _Input>;
7
+ export type InputPasswordInstance = InstanceType<typeof _InputPassword>;
8
+ export type InputSearchInstance = InstanceType<typeof _InputSearch>;
9
+ export type InputGroupInstance = InstanceType<typeof _InputGroup>;
5
10
  export * from './type';
6
11
  declare const Input: {
7
12
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').InputProps> & Readonly<{
@@ -12,13 +17,13 @@ declare const Input: {
12
17
  onInput?: ((value: string, ev: Event) => any) | undefined;
13
18
  onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
14
19
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
15
- "onUpdate:visibility"?: ((value: boolean) => any) | undefined;
16
- "onVisibility-change"?: ((value: boolean) => any) | undefined;
17
20
  onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
18
21
  }>, {
19
22
  focus(): void;
20
23
  blur(): void;
21
24
  getInputRef(): HTMLInputElement;
25
+ setCursor?: () => void;
26
+ recordCursor?: () => void;
22
27
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
23
28
  change: (value: string, ev: Event) => any;
24
29
  focus: (ev: FocusEvent) => any;
@@ -27,8 +32,6 @@ declare const Input: {
27
32
  input: (value: string, ev: Event) => any;
28
33
  keydown: (ev: KeyboardEvent) => any;
29
34
  "update:modelValue": (value: string) => any;
30
- "update:visibility": (value: boolean) => any;
31
- "visibility-change": (value: boolean) => any;
32
35
  pressEnter: (ev: KeyboardEvent) => any;
33
36
  }, import('vue').PublicProps, {
34
37
  error: boolean;
@@ -44,10 +47,6 @@ declare const Input: {
44
47
  wordLength: import('./type').WordLength;
45
48
  wordSlice: import('./type').WordSlice;
46
49
  inputAttrs: import('..').RecordType;
47
- isPassword: boolean;
48
- visibility: boolean;
49
- defaultVisibility: boolean;
50
- invisibleButton: boolean;
51
50
  showInput: boolean;
52
51
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
53
52
  inputRef: HTMLInputElement;
@@ -66,13 +65,13 @@ declare const Input: {
66
65
  onInput?: ((value: string, ev: Event) => any) | undefined;
67
66
  onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
68
67
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
69
- "onUpdate:visibility"?: ((value: boolean) => any) | undefined;
70
- "onVisibility-change"?: ((value: boolean) => any) | undefined;
71
68
  onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
72
69
  }>, {
73
70
  focus(): void;
74
71
  blur(): void;
75
72
  getInputRef(): HTMLInputElement;
73
+ setCursor?: () => void;
74
+ recordCursor?: () => void;
76
75
  }, {}, {}, {}, {
77
76
  error: boolean;
78
77
  size: import('..').Size;
@@ -87,10 +86,6 @@ declare const Input: {
87
86
  wordLength: import('./type').WordLength;
88
87
  wordSlice: import('./type').WordSlice;
89
88
  inputAttrs: import('..').RecordType;
90
- isPassword: boolean;
91
- visibility: boolean;
92
- defaultVisibility: boolean;
93
- invisibleButton: boolean;
94
89
  showInput: boolean;
95
90
  }>;
96
91
  __isFragment?: never;
@@ -104,13 +99,13 @@ declare const Input: {
104
99
  onInput?: ((value: string, ev: Event) => any) | undefined;
105
100
  onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
106
101
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
107
- "onUpdate:visibility"?: ((value: boolean) => any) | undefined;
108
- "onVisibility-change"?: ((value: boolean) => any) | undefined;
109
102
  onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
110
103
  }>, {
111
104
  focus(): void;
112
105
  blur(): void;
113
106
  getInputRef(): HTMLInputElement;
107
+ setCursor?: () => void;
108
+ recordCursor?: () => void;
114
109
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
115
110
  change: (value: string, ev: Event) => any;
116
111
  focus: (ev: FocusEvent) => any;
@@ -119,8 +114,6 @@ declare const Input: {
119
114
  input: (value: string, ev: Event) => any;
120
115
  keydown: (ev: KeyboardEvent) => any;
121
116
  "update:modelValue": (value: string) => any;
122
- "update:visibility": (value: boolean) => any;
123
- "visibility-change": (value: boolean) => any;
124
117
  pressEnter: (ev: KeyboardEvent) => any;
125
118
  }, string, {
126
119
  error: boolean;
@@ -136,10 +129,6 @@ declare const Input: {
136
129
  wordLength: import('./type').WordLength;
137
130
  wordSlice: import('./type').WordSlice;
138
131
  inputAttrs: import('..').RecordType;
139
- isPassword: boolean;
140
- visibility: boolean;
141
- defaultVisibility: boolean;
142
- invisibleButton: boolean;
143
132
  showInput: boolean;
144
133
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
145
134
  $slots: any;
@@ -161,13 +150,421 @@ declare const Input: {
161
150
  default?(_: {}): any;
162
151
  };
163
152
  });
153
+ password: {
154
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').InputPasswordProps> & Readonly<{
155
+ "onUpdate:visibility"?: ((value: boolean) => any) | undefined;
156
+ "onVisibility-change"?: ((value: boolean) => any) | undefined;
157
+ }>, {
158
+ focus(): void;
159
+ blur(): void;
160
+ getInputRef(): HTMLInputElement;
161
+ setCursor?: () => void;
162
+ recordCursor?: () => void;
163
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
164
+ "update:visibility": (value: boolean) => any;
165
+ "visibility-change": (value: boolean) => any;
166
+ }, import('vue').PublicProps, {
167
+ visibility: boolean;
168
+ defaultVisibility: boolean;
169
+ invisibleButton: boolean;
170
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
171
+ inputRef: ({
172
+ $: import('vue').ComponentInternalInstance;
173
+ $data: {};
174
+ $props: {
175
+ readonly modelValue?: string | undefined;
176
+ readonly defaultValue?: string | undefined;
177
+ readonly size?: import('..').Size | undefined;
178
+ readonly allowClear?: boolean | undefined;
179
+ readonly disabled?: boolean | undefined;
180
+ readonly readonly?: boolean | undefined;
181
+ readonly error?: boolean | undefined;
182
+ readonly placeholder?: string | undefined;
183
+ readonly maxLength?: import('./type').MaxLength | undefined;
184
+ readonly wordLength?: import('./type').WordLength | undefined;
185
+ readonly wordSlice?: import('./type').WordSlice | undefined;
186
+ readonly showWordLimit?: boolean | undefined;
187
+ readonly inputAttrs?: import('..').RecordType | undefined;
188
+ readonly showInput?: boolean | undefined;
189
+ readonly onChange?: ((value: string, ev: Event) => any) | undefined;
190
+ readonly onFocus?: ((ev: FocusEvent) => any) | undefined;
191
+ readonly onClear?: ((ev: MouseEvent) => any) | undefined;
192
+ readonly onBlur?: ((ev: FocusEvent) => any) | undefined;
193
+ readonly onInput?: ((value: string, ev: Event) => any) | undefined;
194
+ readonly onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
195
+ readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
196
+ readonly onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
197
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
198
+ $attrs: {
199
+ [x: string]: unknown;
200
+ };
201
+ $refs: {
202
+ [x: string]: unknown;
203
+ } & {
204
+ inputRef: HTMLInputElement;
205
+ };
206
+ $slots: Readonly<{
207
+ [name: string]: import('vue').Slot<any> | undefined;
208
+ }>;
209
+ $root: import('vue').ComponentPublicInstance | null;
210
+ $parent: import('vue').ComponentPublicInstance | null;
211
+ $host: Element | null;
212
+ $emit: ((event: "change", value: string, ev: Event) => void) & ((event: "focus", ev: FocusEvent) => void) & ((event: "clear", ev: MouseEvent) => void) & ((event: "blur", ev: FocusEvent) => void) & ((event: "input", value: string, ev: Event) => void) & ((event: "keydown", ev: KeyboardEvent) => void) & ((event: "update:modelValue", value: string) => void) & ((event: "pressEnter", ev: KeyboardEvent) => void);
213
+ $el: HTMLDivElement;
214
+ $options: import('vue').ComponentOptionsBase<Readonly<import('./type').InputProps> & Readonly<{
215
+ onChange?: ((value: string, ev: Event) => any) | undefined;
216
+ onFocus?: ((ev: FocusEvent) => any) | undefined;
217
+ onClear?: ((ev: MouseEvent) => any) | undefined;
218
+ onBlur?: ((ev: FocusEvent) => any) | undefined;
219
+ onInput?: ((value: string, ev: Event) => any) | undefined;
220
+ onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
221
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
222
+ onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
223
+ }>, {
224
+ focus(): void;
225
+ blur(): void;
226
+ getInputRef(): HTMLInputElement;
227
+ setCursor?: () => void;
228
+ recordCursor?: () => void;
229
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
230
+ change: (value: string, ev: Event) => any;
231
+ focus: (ev: FocusEvent) => any;
232
+ clear: (ev: MouseEvent) => any;
233
+ blur: (ev: FocusEvent) => any;
234
+ input: (value: string, ev: Event) => any;
235
+ keydown: (ev: KeyboardEvent) => any;
236
+ "update:modelValue": (value: string) => any;
237
+ pressEnter: (ev: KeyboardEvent) => any;
238
+ }, string, {
239
+ error: boolean;
240
+ size: import('..').Size;
241
+ disabled: boolean;
242
+ placeholder: string;
243
+ modelValue: string;
244
+ defaultValue: string;
245
+ maxLength: import('./type').MaxLength;
246
+ showWordLimit: boolean;
247
+ allowClear: boolean;
248
+ readonly: boolean;
249
+ wordLength: import('./type').WordLength;
250
+ wordSlice: import('./type').WordSlice;
251
+ inputAttrs: import('..').RecordType;
252
+ showInput: boolean;
253
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
254
+ beforeCreate?: (() => void) | (() => void)[];
255
+ created?: (() => void) | (() => void)[];
256
+ beforeMount?: (() => void) | (() => void)[];
257
+ mounted?: (() => void) | (() => void)[];
258
+ beforeUpdate?: (() => void) | (() => void)[];
259
+ updated?: (() => void) | (() => void)[];
260
+ activated?: (() => void) | (() => void)[];
261
+ deactivated?: (() => void) | (() => void)[];
262
+ beforeDestroy?: (() => void) | (() => void)[];
263
+ beforeUnmount?: (() => void) | (() => void)[];
264
+ destroyed?: (() => void) | (() => void)[];
265
+ unmounted?: (() => void) | (() => void)[];
266
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
267
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
268
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
269
+ };
270
+ $forceUpdate: () => void;
271
+ $nextTick: typeof import('vue').nextTick;
272
+ $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;
273
+ } & Readonly<{
274
+ error: boolean;
275
+ size: import('..').Size;
276
+ disabled: boolean;
277
+ placeholder: string;
278
+ modelValue: string;
279
+ defaultValue: string;
280
+ maxLength: import('./type').MaxLength;
281
+ showWordLimit: boolean;
282
+ allowClear: boolean;
283
+ readonly: boolean;
284
+ wordLength: import('./type').WordLength;
285
+ wordSlice: import('./type').WordSlice;
286
+ inputAttrs: import('..').RecordType;
287
+ showInput: boolean;
288
+ }> & Omit<Readonly<import('./type').InputProps> & Readonly<{
289
+ onChange?: ((value: string, ev: Event) => any) | undefined;
290
+ onFocus?: ((ev: FocusEvent) => any) | undefined;
291
+ onClear?: ((ev: MouseEvent) => any) | undefined;
292
+ onBlur?: ((ev: FocusEvent) => any) | undefined;
293
+ onInput?: ((value: string, ev: Event) => any) | undefined;
294
+ onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
295
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
296
+ onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
297
+ }>, "focus" | "blur" | "setCursor" | "recordCursor" | "getInputRef" | ("error" | "size" | "disabled" | "placeholder" | "modelValue" | "defaultValue" | "maxLength" | "showWordLimit" | "allowClear" | "readonly" | "wordLength" | "wordSlice" | "inputAttrs" | "showInput")> & import('vue').ShallowUnwrapRef<{
298
+ focus(): void;
299
+ blur(): void;
300
+ getInputRef(): HTMLInputElement;
301
+ setCursor?: () => void;
302
+ recordCursor?: () => void;
303
+ }> & {} & import('@vue/runtime-core').ComponentCustomProperties & {} & {
304
+ $slots: any;
305
+ }) | null;
306
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
307
+ P: {};
308
+ B: {};
309
+ D: {};
310
+ C: {};
311
+ M: {};
312
+ Defaults: {};
313
+ }, Readonly<import('./type').InputPasswordProps> & Readonly<{
314
+ "onUpdate:visibility"?: ((value: boolean) => any) | undefined;
315
+ "onVisibility-change"?: ((value: boolean) => any) | undefined;
316
+ }>, {
317
+ focus(): void;
318
+ blur(): void;
319
+ getInputRef(): HTMLInputElement;
320
+ setCursor?: () => void;
321
+ recordCursor?: () => void;
322
+ }, {}, {}, {}, {
323
+ visibility: boolean;
324
+ defaultVisibility: boolean;
325
+ invisibleButton: boolean;
326
+ }>;
327
+ __isFragment?: never;
328
+ __isTeleport?: never;
329
+ __isSuspense?: never;
330
+ } & import('vue').ComponentOptionsBase<Readonly<import('./type').InputPasswordProps> & Readonly<{
331
+ "onUpdate:visibility"?: ((value: boolean) => any) | undefined;
332
+ "onVisibility-change"?: ((value: boolean) => any) | undefined;
333
+ }>, {
334
+ focus(): void;
335
+ blur(): void;
336
+ getInputRef(): HTMLInputElement;
337
+ setCursor?: () => void;
338
+ recordCursor?: () => void;
339
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
340
+ "update:visibility": (value: boolean) => any;
341
+ "visibility-change": (value: boolean) => any;
342
+ }, string, {
343
+ visibility: boolean;
344
+ defaultVisibility: boolean;
345
+ invisibleButton: boolean;
346
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
347
+ $slots: {
348
+ prepend?(_: {}): any;
349
+ append?(_: {}): any;
350
+ prefix?(_: {}): any;
351
+ suffix?(_: {}): any;
352
+ };
353
+ });
354
+ search: {
355
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').InputSearchProps> & Readonly<{
356
+ onSearch?: ((value: string, ev: MouseEvent) => any) | undefined;
357
+ }>, {
358
+ focus(): void;
359
+ blur(): void;
360
+ getInputRef(): HTMLInputElement;
361
+ setCursor?: () => void;
362
+ recordCursor?: () => void;
363
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
364
+ search: (value: string, ev: MouseEvent) => any;
365
+ }, import('vue').PublicProps, {
366
+ size: import('..').Size;
367
+ disabled: boolean;
368
+ loading: boolean;
369
+ searchButton: boolean;
370
+ buttonText: string;
371
+ buttonProps: import('..').ButtonGroupProps;
372
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
373
+ inputRef: ({
374
+ $: import('vue').ComponentInternalInstance;
375
+ $data: {};
376
+ $props: {
377
+ readonly modelValue?: string | undefined;
378
+ readonly defaultValue?: string | undefined;
379
+ readonly size?: import('..').Size | undefined;
380
+ readonly allowClear?: boolean | undefined;
381
+ readonly disabled?: boolean | undefined;
382
+ readonly readonly?: boolean | undefined;
383
+ readonly error?: boolean | undefined;
384
+ readonly placeholder?: string | undefined;
385
+ readonly maxLength?: import('./type').MaxLength | undefined;
386
+ readonly wordLength?: import('./type').WordLength | undefined;
387
+ readonly wordSlice?: import('./type').WordSlice | undefined;
388
+ readonly showWordLimit?: boolean | undefined;
389
+ readonly inputAttrs?: import('..').RecordType | undefined;
390
+ readonly showInput?: boolean | undefined;
391
+ readonly onChange?: ((value: string, ev: Event) => any) | undefined;
392
+ readonly onFocus?: ((ev: FocusEvent) => any) | undefined;
393
+ readonly onClear?: ((ev: MouseEvent) => any) | undefined;
394
+ readonly onBlur?: ((ev: FocusEvent) => any) | undefined;
395
+ readonly onInput?: ((value: string, ev: Event) => any) | undefined;
396
+ readonly onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
397
+ readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
398
+ readonly onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
399
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
400
+ $attrs: {
401
+ [x: string]: unknown;
402
+ };
403
+ $refs: {
404
+ [x: string]: unknown;
405
+ } & {
406
+ inputRef: HTMLInputElement;
407
+ };
408
+ $slots: Readonly<{
409
+ [name: string]: import('vue').Slot<any> | undefined;
410
+ }>;
411
+ $root: import('vue').ComponentPublicInstance | null;
412
+ $parent: import('vue').ComponentPublicInstance | null;
413
+ $host: Element | null;
414
+ $emit: ((event: "change", value: string, ev: Event) => void) & ((event: "focus", ev: FocusEvent) => void) & ((event: "clear", ev: MouseEvent) => void) & ((event: "blur", ev: FocusEvent) => void) & ((event: "input", value: string, ev: Event) => void) & ((event: "keydown", ev: KeyboardEvent) => void) & ((event: "update:modelValue", value: string) => void) & ((event: "pressEnter", ev: KeyboardEvent) => void);
415
+ $el: HTMLDivElement;
416
+ $options: import('vue').ComponentOptionsBase<Readonly<import('./type').InputProps> & Readonly<{
417
+ onChange?: ((value: string, ev: Event) => any) | undefined;
418
+ onFocus?: ((ev: FocusEvent) => any) | undefined;
419
+ onClear?: ((ev: MouseEvent) => any) | undefined;
420
+ onBlur?: ((ev: FocusEvent) => any) | undefined;
421
+ onInput?: ((value: string, ev: Event) => any) | undefined;
422
+ onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
423
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
424
+ onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
425
+ }>, {
426
+ focus(): void;
427
+ blur(): void;
428
+ getInputRef(): HTMLInputElement;
429
+ setCursor?: () => void;
430
+ recordCursor?: () => void;
431
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
432
+ change: (value: string, ev: Event) => any;
433
+ focus: (ev: FocusEvent) => any;
434
+ clear: (ev: MouseEvent) => any;
435
+ blur: (ev: FocusEvent) => any;
436
+ input: (value: string, ev: Event) => any;
437
+ keydown: (ev: KeyboardEvent) => any;
438
+ "update:modelValue": (value: string) => any;
439
+ pressEnter: (ev: KeyboardEvent) => any;
440
+ }, string, {
441
+ error: boolean;
442
+ size: import('..').Size;
443
+ disabled: boolean;
444
+ placeholder: string;
445
+ modelValue: string;
446
+ defaultValue: string;
447
+ maxLength: import('./type').MaxLength;
448
+ showWordLimit: boolean;
449
+ allowClear: boolean;
450
+ readonly: boolean;
451
+ wordLength: import('./type').WordLength;
452
+ wordSlice: import('./type').WordSlice;
453
+ inputAttrs: import('..').RecordType;
454
+ showInput: boolean;
455
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
456
+ beforeCreate?: (() => void) | (() => void)[];
457
+ created?: (() => void) | (() => void)[];
458
+ beforeMount?: (() => void) | (() => void)[];
459
+ mounted?: (() => void) | (() => void)[];
460
+ beforeUpdate?: (() => void) | (() => void)[];
461
+ updated?: (() => void) | (() => void)[];
462
+ activated?: (() => void) | (() => void)[];
463
+ deactivated?: (() => void) | (() => void)[];
464
+ beforeDestroy?: (() => void) | (() => void)[];
465
+ beforeUnmount?: (() => void) | (() => void)[];
466
+ destroyed?: (() => void) | (() => void)[];
467
+ unmounted?: (() => void) | (() => void)[];
468
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
469
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
470
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
471
+ };
472
+ $forceUpdate: () => void;
473
+ $nextTick: typeof import('vue').nextTick;
474
+ $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;
475
+ } & Readonly<{
476
+ error: boolean;
477
+ size: import('..').Size;
478
+ disabled: boolean;
479
+ placeholder: string;
480
+ modelValue: string;
481
+ defaultValue: string;
482
+ maxLength: import('./type').MaxLength;
483
+ showWordLimit: boolean;
484
+ allowClear: boolean;
485
+ readonly: boolean;
486
+ wordLength: import('./type').WordLength;
487
+ wordSlice: import('./type').WordSlice;
488
+ inputAttrs: import('..').RecordType;
489
+ showInput: boolean;
490
+ }> & Omit<Readonly<import('./type').InputProps> & Readonly<{
491
+ onChange?: ((value: string, ev: Event) => any) | undefined;
492
+ onFocus?: ((ev: FocusEvent) => any) | undefined;
493
+ onClear?: ((ev: MouseEvent) => any) | undefined;
494
+ onBlur?: ((ev: FocusEvent) => any) | undefined;
495
+ onInput?: ((value: string, ev: Event) => any) | undefined;
496
+ onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
497
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
498
+ onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
499
+ }>, "focus" | "blur" | "setCursor" | "recordCursor" | "getInputRef" | ("error" | "size" | "disabled" | "placeholder" | "modelValue" | "defaultValue" | "maxLength" | "showWordLimit" | "allowClear" | "readonly" | "wordLength" | "wordSlice" | "inputAttrs" | "showInput")> & import('vue').ShallowUnwrapRef<{
500
+ focus(): void;
501
+ blur(): void;
502
+ getInputRef(): HTMLInputElement;
503
+ setCursor?: () => void;
504
+ recordCursor?: () => void;
505
+ }> & {} & import('@vue/runtime-core').ComponentCustomProperties & {} & {
506
+ $slots: any;
507
+ }) | null;
508
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
509
+ P: {};
510
+ B: {};
511
+ D: {};
512
+ C: {};
513
+ M: {};
514
+ Defaults: {};
515
+ }, Readonly<import('./type').InputSearchProps> & Readonly<{
516
+ onSearch?: ((value: string, ev: MouseEvent) => any) | undefined;
517
+ }>, {
518
+ focus(): void;
519
+ blur(): void;
520
+ getInputRef(): HTMLInputElement;
521
+ setCursor?: () => void;
522
+ recordCursor?: () => void;
523
+ }, {}, {}, {}, {
524
+ size: import('..').Size;
525
+ disabled: boolean;
526
+ loading: boolean;
527
+ searchButton: boolean;
528
+ buttonText: string;
529
+ buttonProps: import('..').ButtonGroupProps;
530
+ }>;
531
+ __isFragment?: never;
532
+ __isTeleport?: never;
533
+ __isSuspense?: never;
534
+ } & import('vue').ComponentOptionsBase<Readonly<import('./type').InputSearchProps> & Readonly<{
535
+ onSearch?: ((value: string, ev: MouseEvent) => any) | undefined;
536
+ }>, {
537
+ focus(): void;
538
+ blur(): void;
539
+ getInputRef(): HTMLInputElement;
540
+ setCursor?: () => void;
541
+ recordCursor?: () => void;
542
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
543
+ search: (value: string, ev: MouseEvent) => any;
544
+ }, string, {
545
+ size: import('..').Size;
546
+ disabled: boolean;
547
+ loading: boolean;
548
+ searchButton: boolean;
549
+ buttonText: string;
550
+ buttonProps: import('..').ButtonGroupProps;
551
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
552
+ $slots: {
553
+ prepend?(_: {}): any;
554
+ append?(_: {}): any;
555
+ prefix?(_: {}): any;
556
+ suffix?(_: {}): any;
557
+ };
558
+ });
164
559
  install: (app: App) => void;
165
560
  };
166
- export { _InputGroup as InputGroup };
561
+ export { _InputGroup as InputGroup, _InputPassword as InputPassword, _InputSearch as InputSearch, };
167
562
  declare module 'vue' {
168
563
  interface GlobalComponents {
169
564
  YcInput: typeof Input;
170
565
  YcInputGroup: typeof _InputGroup;
566
+ YcInputPassword: typeof _InputPassword;
567
+ YcInputSearch: typeof _InputSearch;
171
568
  }
172
569
  }
173
570
  export default Input;
package/es/Input/index.js CHANGED
@@ -1,15 +1,23 @@
1
1
  import _sfc_main from "./Input.vue.js";
2
2
  /* empty css */
3
- import _sfc_main$1 from "./InputGroup.vue.js";
3
+ import _sfc_main$1 from "./InputSearch.vue.js";
4
+ import _sfc_main$2 from "./InputPassword.vue.js";
5
+ import _sfc_main$3 from "./InputGroup.vue.js";
4
6
  /* empty css */
5
7
  const Input = Object.assign(_sfc_main, {
6
- group: _sfc_main$1,
8
+ group: _sfc_main$3,
9
+ password: _sfc_main$2,
10
+ search: _sfc_main$1,
7
11
  install: (app) => {
8
12
  app.component("Yc" + _sfc_main.name, _sfc_main);
9
13
  app.component("Yc" + _sfc_main$1.name, _sfc_main$1);
14
+ app.component("Yc" + _sfc_main$2.name, _sfc_main$2);
15
+ app.component("Yc" + _sfc_main$3.name, _sfc_main$3);
10
16
  }
11
17
  });
12
18
  export {
13
- _sfc_main$1 as InputGroup,
19
+ _sfc_main$3 as InputGroup,
20
+ _sfc_main$2 as InputPassword,
21
+ _sfc_main$1 as InputSearch,
14
22
  Input as default
15
23
  };
@@ -1,5 +1,6 @@
1
1
  import { VNode } from 'vue';
2
2
  import { Size, RecordType } from '../_shared/type';
3
+ import { ButtonGroupProps } from '../Button';
3
4
  export interface InputProps {
4
5
  modelValue?: string;
5
6
  defaultValue?: string;
@@ -14,18 +15,12 @@ export interface InputProps {
14
15
  wordSlice?: WordSlice;
15
16
  showWordLimit?: boolean;
16
17
  inputAttrs?: RecordType;
17
- isPassword?: boolean;
18
- visibility?: boolean;
19
- defaultVisibility?: boolean;
20
- invisibleButton?: boolean;
21
18
  showInput?: boolean;
22
19
  }
23
20
  export interface InputEmits {
24
21
  (e: 'update:modelValue', value: string): void;
25
- (e: 'update:visibility', value: boolean): void;
26
22
  (e: 'input', value: string, ev: Event): void;
27
23
  (e: 'change', value: string, ev: Event): void;
28
- (e: 'visibility-change', value: boolean): void;
29
24
  (e: 'pressEnter', ev: KeyboardEvent): void;
30
25
  (e: 'keydown', ev: KeyboardEvent): void;
31
26
  (e: 'clear', ev: MouseEvent): void;
@@ -38,11 +33,34 @@ export interface InputSlots {
38
33
  prepend?: () => VNode[];
39
34
  append?: () => VNode[];
40
35
  label?: () => VNode[];
36
+ extra?: () => VNode[];
41
37
  }
42
38
  export interface InputExpose {
43
39
  focus(): void;
44
40
  blur(): void;
45
41
  getInputRef(): HTMLInputElement;
42
+ setCursor?: () => void;
43
+ recordCursor?: () => void;
44
+ }
45
+ export interface InputPasswordProps {
46
+ visibility?: boolean;
47
+ defaultVisibility?: boolean;
48
+ invisibleButton?: boolean;
49
+ }
50
+ export interface InputPasswordEmits {
51
+ (e: 'update:visibility', value: boolean): void;
52
+ (e: 'visibility-change', value: boolean): void;
53
+ }
54
+ export interface InputSearchProps {
55
+ searchButton?: boolean;
56
+ loading?: boolean;
57
+ disabled?: boolean;
58
+ size?: Size;
59
+ buttonText?: string;
60
+ buttonProps?: ButtonGroupProps;
61
+ }
62
+ export interface InputSearchEmits {
63
+ (e: 'search', value: string, ev: MouseEvent): void;
46
64
  }
47
65
  export type WordSlice = (value: string, maxLength: number) => string;
48
66
  export type WordLength = (value: string) => number;