@datavac/ui-kit 1.6.0 → 1.6.1

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.
@@ -0,0 +1,2 @@
1
+ import type { SearchBarProps } from './SearchBar.types';
2
+ export declare function SearchBar({ results, onSearch, onSelect, onSubmit, isLoading, placeholder, defaultValue, className, forceClose, }: SearchBarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import type { SearchResultGroup, SearchResultItem } from '../SearchDropdown';
2
+ export interface SearchBarProps {
3
+ results?: SearchResultGroup[];
4
+ onSearch?: (query: string) => void;
5
+ onSelect?: (item: SearchResultItem, group: SearchResultGroup) => void;
6
+ onSubmit?: (query: string) => void;
7
+ isLoading?: boolean;
8
+ placeholder?: string;
9
+ defaultValue?: string;
10
+ className?: string;
11
+ forceClose?: boolean;
12
+ }
@@ -0,0 +1,2 @@
1
+ export { SearchBar } from './SearchBar';
2
+ export type { SearchBarProps } from './SearchBar.types';
@@ -0,0 +1,2 @@
1
+ import type { SearchDropdownProps } from './SearchDropdown.types';
2
+ export declare function SearchDropdown({ trigger, open, onOpenChange, query, results, onSelect, onClose, isLoading, emptyStateText, listboxId, }: SearchDropdownProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface SearchResultItem {
3
+ id: string;
4
+ label: string;
5
+ category?: string;
6
+ }
7
+ export interface SearchResultGroup {
8
+ category: string;
9
+ items: SearchResultItem[];
10
+ }
11
+ export interface SearchDropdownProps {
12
+ trigger: ReactNode;
13
+ open: boolean;
14
+ onOpenChange: (open: boolean) => void;
15
+ query: string;
16
+ results: SearchResultGroup[];
17
+ onSelect: (item: SearchResultItem, group: SearchResultGroup) => void;
18
+ onClose: () => void;
19
+ isLoading?: boolean;
20
+ emptyStateText?: string;
21
+ listboxId?: string;
22
+ }
@@ -0,0 +1,2 @@
1
+ export { SearchDropdown } from './SearchDropdown';
2
+ export type { SearchDropdownProps, SearchResultGroup, SearchResultItem, } from './SearchDropdown.types';