voiptime-components 1.4.0 → 1.4.2

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.
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import { App } from 'vue';
2
2
  import { Component } from 'vue';
3
3
  import { ComponentOptionsMixin } from 'vue';
4
4
  import { ComponentProvideOptions } from 'vue';
5
+ import { ComputedRef } from 'vue';
5
6
  import { CreateComponentPublicInstanceWithMixins } from 'vue';
6
7
  import { DefineComponent } from 'vue';
7
8
  import { GlobalComponents } from 'vue';
@@ -191,12 +192,10 @@ declare const __VLS_component_7: DefineComponent<VtSelectProps, {
191
192
  isValid: boolean;
192
193
  errors: string[];
193
194
  };
194
- registerOption(option: VtSelectOption): void;
195
+ registerOption(option: VtSelectOption, slotContent?: any): void;
195
196
  unregisterOption(value: string | number): void;
196
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
197
- blur: (event: FocusEvent) => any;
197
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
198
198
  change: (value: string | number | (string | number)[]) => any;
199
- focus: (event: FocusEvent) => any;
200
199
  filter: (query: string) => any;
201
200
  "update:modelValue": (value: string | number | (string | number)[]) => any;
202
201
  clear: () => any;
@@ -208,9 +207,7 @@ declare const __VLS_component_7: DefineComponent<VtSelectProps, {
208
207
  "remove-tag": (value: string | number) => any;
209
208
  scrolled: () => any;
210
209
  }, string, PublicProps, Readonly<VtSelectProps> & Readonly<{
211
- onBlur?: ((event: FocusEvent) => any) | undefined;
212
210
  onChange?: ((value: string | number | (string | number)[]) => any) | undefined;
213
- onFocus?: ((event: FocusEvent) => any) | undefined;
214
211
  onFilter?: ((query: string) => any) | undefined;
215
212
  "onUpdate:modelValue"?: ((value: string | number | (string | number)[]) => any) | undefined;
216
213
  onClear?: (() => any) | undefined;
@@ -224,21 +221,21 @@ declare const __VLS_component_7: DefineComponent<VtSelectProps, {
224
221
  }>, {
225
222
  disabled: boolean;
226
223
  loading: boolean;
227
- size: VtSelectSize;
224
+ size: "small" | "medium" | "large";
228
225
  placeholder: string;
229
- maxHeight: number | string;
230
- placement: "bottom" | "bottom-start" | "bottom-end" | "top" | "top-start" | "top-end";
226
+ maxHeight: number;
227
+ placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end";
231
228
  status: VtSelectStatus;
232
229
  clearable: boolean;
233
230
  validateOnInput: boolean;
234
231
  validateOnBlur: boolean;
232
+ filterable: boolean;
235
233
  multiple: boolean;
236
234
  collapsedTags: boolean;
237
- filterable: boolean;
238
- infiniteScroll: boolean;
235
+ loadingText: string;
239
236
  noDataText: string;
240
237
  noMatchText: string;
241
- loadingText: string;
238
+ infiniteScroll: boolean;
242
239
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
243
240
  selectRef: HTMLDivElement;
244
241
  triggerRef: HTMLDivElement;
@@ -337,7 +334,7 @@ declare const __VLS_component_7: DefineComponent<VtSelectProps, {
337
334
  sentinelRef: HTMLDivElement;
338
335
  }, HTMLDivElement>;
339
336
 
340
- declare const __VLS_component_8: DefineComponent<VtOptionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
337
+ declare const __VLS_component_8: DefineComponent<VtOptionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
341
338
  click: (option: VtSelectOption) => any;
342
339
  }, string, PublicProps, Readonly<VtOptionProps> & Readonly<{
343
340
  onClick?: ((option: VtSelectOption) => any) | undefined;
@@ -1221,22 +1218,21 @@ export declare interface VtInputValidationResult {
1221
1218
  }
1222
1219
 
1223
1220
  export declare interface VtOptionEmits {
1224
- click: [option: VtSelectOption];
1221
+ (e: 'click', option: VtSelectOption): void;
1225
1222
  }
1226
1223
 
1227
1224
  export declare interface VtOptionProps {
1228
1225
  label: string;
1229
1226
  value: string | number;
1230
1227
  disabled?: boolean;
1231
- icon?: string;
1232
1228
  group?: string;
1233
1229
  }
1234
1230
 
1235
1231
  export declare interface VtSelectContext {
1236
- selectValue: string | number | Array<string | number>;
1232
+ selectValue: ComputedRef<string | number | (string | number)[]>;
1237
1233
  multiple: boolean;
1238
1234
  filterable: boolean;
1239
- filterQuery: string;
1235
+ filterQuery: ComputedRef<string>;
1240
1236
  handleOptionClick: (option: VtSelectOption) => void;
1241
1237
  isOptionSelected: (value: string | number) => boolean;
1242
1238
  isOptionVisible: (option: VtSelectOption) => boolean;
@@ -1244,22 +1240,20 @@ export declare interface VtSelectContext {
1244
1240
  unregisterOption: (value: string | number) => void;
1245
1241
  }
1246
1242
 
1247
- export declare const VtSelectContextKey: unique symbol;
1243
+ export declare const VtSelectContextKey: InjectionKey<VtSelectContext>;
1248
1244
 
1249
1245
  export declare interface VtSelectEmits {
1250
- 'update:modelValue': [value: string | number | Array<string | number>];
1251
- change: [value: string | number | Array<string | number>];
1252
- focus: [event: FocusEvent];
1253
- blur: [event: FocusEvent];
1254
- clear: [];
1255
- 'visible-change': [visible: boolean];
1256
- 'remove-tag': [value: string | number];
1257
- filter: [query: string];
1258
- validation: [result: {
1246
+ (e: 'update:modelValue', value: string | number | (string | number)[]): void;
1247
+ (e: 'change', value: string | number | (string | number)[]): void;
1248
+ (e: 'clear'): void;
1249
+ (e: 'visible-change', visible: boolean): void;
1250
+ (e: 'remove-tag', value: string | number): void;
1251
+ (e: 'filter', query: string): void;
1252
+ (e: 'scrolled'): void;
1253
+ (e: 'validation', result: {
1259
1254
  isValid: boolean;
1260
1255
  errors: string[];
1261
- }];
1262
- scrolled: [];
1256
+ }): void;
1263
1257
  }
1264
1258
 
1265
1259
  export declare interface VtSelectMethods {
@@ -1273,7 +1267,7 @@ export declare interface VtSelectMethods {
1273
1267
  isValid: boolean;
1274
1268
  errors: string[];
1275
1269
  };
1276
- registerOption(option: VtSelectOption): void;
1270
+ registerOption(option: VtSelectOption, slotContent?: any): void;
1277
1271
  unregisterOption(value: string | number): void;
1278
1272
  }
1279
1273
 
@@ -1281,41 +1275,37 @@ export declare interface VtSelectOption {
1281
1275
  label: string;
1282
1276
  value: string | number;
1283
1277
  disabled?: boolean;
1278
+ group?: string;
1284
1279
  }
1285
1280
 
1286
1281
  export declare interface VtSelectProps {
1287
- modelValue?: string | number | Array<string | number>;
1288
- multiple?: boolean;
1289
- collapsedTags?: boolean;
1290
- size?: VtSelectSize;
1291
- status?: VtSelectStatus;
1282
+ modelValue?: string | number | (string | number)[];
1283
+ options?: VtSelectOption[];
1284
+ placeholder?: string;
1292
1285
  disabled?: boolean;
1293
1286
  clearable?: boolean;
1294
1287
  filterable?: boolean;
1288
+ multiple?: boolean;
1289
+ collapsedTags?: boolean;
1290
+ size?: 'small' | 'medium' | 'large';
1291
+ status?: VtSelectStatus;
1295
1292
  loading?: boolean;
1296
- infiniteScroll?: boolean;
1297
- label?: string;
1298
- placeholder?: string;
1299
- helperText?: string;
1300
- errorMessage?: string;
1293
+ loadingText?: string;
1301
1294
  noDataText?: string;
1302
1295
  noMatchText?: string;
1303
- loadingText?: string;
1304
- id?: string;
1305
- name?: string;
1306
- tabindex?: number;
1307
- maxHeight?: number | string;
1308
- placement?: 'bottom' | 'bottom-start' | 'bottom-end' | 'top' | 'top-start' | 'top-end';
1296
+ maxHeight?: number;
1297
+ placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';
1309
1298
  filterMethod?: (query: string, option: VtSelectOption) => boolean;
1310
- required?: boolean;
1311
1299
  validateOnInput?: boolean;
1312
1300
  validateOnBlur?: boolean;
1301
+ required?: boolean;
1313
1302
  requiredMessage?: string;
1303
+ infiniteScroll?: boolean;
1304
+ label?: string;
1305
+ id?: string;
1314
1306
  }
1315
1307
 
1316
- export declare type VtSelectSize = 'small' | 'medium' | 'large';
1317
-
1318
- export declare type VtSelectStatus = 'default' | 'success' | 'error' | 'warning';
1308
+ export declare type VtSelectStatus = 'default' | 'success' | 'warning' | 'error';
1319
1309
 
1320
1310
  declare const VUIPlugin: {
1321
1311
  install(app: App, options?: VUIPluginOptions): void;