@sabrenski/spire-ui-vue 0.3.21 → 0.3.23

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.
@@ -1,6 +1,9 @@
1
- import { nextTick, Component } from 'vue';
1
+ import { nextTick } from 'vue';
2
2
  import { AutocompleteProps, AutocompleteOptionData } from './types';
3
+ declare function open(): void;
4
+ declare function close(): void;
3
5
  declare function focus(): void;
6
+ declare function toggle(): void;
4
7
  declare function __VLS_template(): {
5
8
  attrs: Partial<{}>;
6
9
  slots: {
@@ -16,8 +19,14 @@ declare function __VLS_template(): {
16
19
  }): any;
17
20
  default?(_: {}): any;
18
21
  default?(_: {}): any;
19
- empty?(_: {}): any;
20
- empty?(_: {}): any;
22
+ empty?(_: {
23
+ searchQuery: string;
24
+ isLoading: false;
25
+ }): any;
26
+ empty?(_: {
27
+ searchQuery: string;
28
+ isLoading: false;
29
+ }): any;
21
30
  };
22
31
  refs: {
23
32
  inputRef: HTMLInputElement;
@@ -129,8 +138,8 @@ declare function __VLS_template(): {
129
138
  readonly invalid?: boolean | undefined;
130
139
  readonly clearable?: boolean | undefined;
131
140
  readonly loading?: boolean | undefined;
132
- readonly icon?: Component | undefined;
133
- readonly iconEnd?: Component | undefined;
141
+ readonly icon?: import('vue').Component | undefined;
142
+ readonly iconEnd?: import('vue').Component | undefined;
134
143
  readonly onClear?: (() => any) | undefined;
135
144
  readonly "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
136
145
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
@@ -212,6 +221,10 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
212
221
  declare const __VLS_component: import('vue').DefineComponent<AutocompleteProps, {
213
222
  focus: typeof focus;
214
223
  inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
224
+ open: typeof open;
225
+ close: typeof close;
226
+ toggle: typeof toggle;
227
+ isOpen: import('vue').Ref<boolean, boolean>;
215
228
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
216
229
  search: (query: string) => any;
217
230
  "update:modelValue": (value: string | string[] | undefined) => any;
@@ -228,7 +241,6 @@ declare const __VLS_component: import('vue').DefineComponent<AutocompleteProps,
228
241
  placement: import('../..').Placement;
229
242
  invalid: boolean;
230
243
  loading: boolean;
231
- placeholder: string;
232
244
  readonly: boolean;
233
245
  clearable: boolean;
234
246
  minQueryLength: number;
@@ -236,8 +248,6 @@ declare const __VLS_component: import('vue').DefineComponent<AutocompleteProps,
236
248
  allowCustomValue: boolean;
237
249
  chips: boolean;
238
250
  maxChips: number;
239
- emptyMessage: string;
240
- loadingMessage: string;
241
251
  strategy: "absolute" | "fixed";
242
252
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
243
253
  inputRef: HTMLInputElement;
@@ -349,8 +359,8 @@ declare const __VLS_component: import('vue').DefineComponent<AutocompleteProps,
349
359
  readonly invalid?: boolean | undefined;
350
360
  readonly clearable?: boolean | undefined;
351
361
  readonly loading?: boolean | undefined;
352
- readonly icon?: Component | undefined;
353
- readonly iconEnd?: Component | undefined;
362
+ readonly icon?: import('vue').Component | undefined;
363
+ readonly iconEnd?: import('vue').Component | undefined;
354
364
  readonly onClear?: (() => any) | undefined;
355
365
  readonly "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
356
366
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
@@ -1,13 +1,14 @@
1
- import { InjectionKey, Ref, Component } from 'vue';
1
+ import { InjectionKey, Ref } from 'vue';
2
2
  import { Placement } from '../../composables';
3
- export type AutocompleteSize = 'sm' | 'md' | 'lg';
3
+ export type AutocompleteSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
4
  export type AutocompleteVariant = 'outline' | 'filled' | 'underline';
5
5
  export interface AutocompleteOptionData {
6
6
  value: string;
7
7
  label: string;
8
8
  disabled?: boolean;
9
9
  description?: string;
10
- icon?: Component;
10
+ /** Icon name to display (e.g., 'UserIcon', 'SettingsIcon') */
11
+ icon?: string;
11
12
  }
12
13
  export interface AutocompleteProps {
13
14
  /** Bound value - string for single, string[] for multiple */
@@ -62,7 +63,8 @@ export interface AutocompleteOptionProps {
62
63
  label?: string;
63
64
  disabled?: boolean;
64
65
  description?: string;
65
- icon?: Component;
66
+ /** Icon name to display (e.g., 'UserIcon', 'SettingsIcon') */
67
+ icon?: string;
66
68
  }
67
69
  export interface AutocompleteContext {
68
70
  multiple: Ref<boolean>;
@@ -70,12 +72,12 @@ export interface AutocompleteContext {
70
72
  activeValue: Ref<string | null>;
71
73
  isOpen: Ref<boolean>;
72
74
  size: Ref<AutocompleteSize>;
73
- registerOption: (value: string, label: string, disabled: boolean, icon?: Component, id?: string) => void;
75
+ registerOption: (value: string, label: string, disabled: boolean, icon?: string, id?: string) => void;
74
76
  unregisterOption: (value: string) => void;
75
77
  selectOption: (value: string) => void;
76
78
  setActiveOption: (value: string | null) => void;
77
79
  getOptionLabel: (value: string) => string;
78
- getOptionIcon: (value: string) => Component | undefined;
80
+ getOptionIcon: (value: string) => string | undefined;
79
81
  getOptionId: (value: string) => string | undefined;
80
82
  }
81
83
  export declare const AUTOCOMPLETE_INJECTION_KEY: InjectionKey<AutocompleteContext>;
@@ -38,6 +38,8 @@ export interface SpireLabels {
38
38
  loading: string;
39
39
  clearSelection: string;
40
40
  search: string;
41
+ createItem: (query: string) => string;
42
+ moreItems: (count: number) => string;
41
43
  };
42
44
  /** Modal component labels */
43
45
  modal: {