@vacano/ui 1.4.2 → 1.4.4

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
@@ -9,6 +9,41 @@ import { ReactNode } from 'react';
9
9
  import { ReactPortal } from 'react';
10
10
  import { Ref } from 'react';
11
11
 
12
+ export declare const Autocomplete: ({ className, classnames, disabled, fullWidth, label, ref, size, variant, value, onChange, onSearch, debounceMs, minChars, noResultsMessage, ...rest }: AutocompleteProps) => JSX.Element;
13
+
14
+ export declare type AutocompleteClassNames = {
15
+ input?: string;
16
+ label?: string;
17
+ dropdown?: string;
18
+ item?: string;
19
+ };
20
+
21
+ export declare type AutocompleteProps = VacanoComponentProps<HTMLInputElement, AutocompleteClassNames> & Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'size' | 'onChange' | 'value'> & {
22
+ value?: AutocompleteValue;
23
+ onChange?: (value: AutocompleteValue) => void;
24
+ onSearch: (query: string) => Promise<AutocompleteSuggestion[]>;
25
+ debounceMs?: number;
26
+ minChars?: number;
27
+ fullWidth?: boolean;
28
+ label?: string;
29
+ size?: VacanoComponentSize;
30
+ variant?: AutocompleteVariant;
31
+ noResultsMessage?: string;
32
+ };
33
+
34
+ export declare type AutocompleteSuggestion = {
35
+ id: string;
36
+ value: string;
37
+ image_url: string | null;
38
+ };
39
+
40
+ export declare type AutocompleteValue = {
41
+ value: string;
42
+ image_url: string | null;
43
+ };
44
+
45
+ export declare type AutocompleteVariant = 'normal' | 'error';
46
+
12
47
  export declare const Button: ({ children, className, classnames, disabled, fullWidth, icon, loading, onClick, ref, keyBindings, size, type, variant, ...rest }: ButtonProps) => JSX.Element;
13
48
 
14
49
  export declare type ButtonClassNames = {
@@ -519,6 +554,19 @@ export declare type RadioProps = VacanoComponentProps<HTMLInputElement, RadioCla
519
554
 
520
555
  export declare type RadioVariant = 'normal' | 'error';
521
556
 
557
+ export declare type SaveProgressContextValue = {
558
+ isVisible: boolean;
559
+ show: (message?: string) => void;
560
+ hide: () => void;
561
+ };
562
+
563
+ export declare const SaveProgressProvider: ({ children, defaultMessage, }: SaveProgressProviderProps) => JSX.Element;
564
+
565
+ export declare type SaveProgressProviderProps = {
566
+ children: React.ReactNode;
567
+ defaultMessage?: string;
568
+ };
569
+
522
570
  export declare const Select: ({ className, classnames, disabled, fullWidth, label, onChange, options, placeholder, portalRenderNode, ref, size, value, variant, ...rest }: SelectProps) => JSX.Element;
523
571
 
524
572
  export declare type SelectClassNames = {
@@ -735,6 +783,8 @@ export declare type UseImageCropperReturn = {
735
783
  open: () => void;
736
784
  };
737
785
 
786
+ export declare const useSaveProgress: () => SaveProgressContextValue;
787
+
738
788
  export declare const useToast: () => ToastContextValue;
739
789
 
740
790
  declare type VacanoComponentClassNames<T> = T;