@datavac/ui-kit 1.6.0-scroll-to-top-button.2 → 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.
- package/dist/components/SearchBar/SearchBar.d.ts +2 -0
- package/dist/components/SearchBar/SearchBar.types.d.ts +12 -0
- package/dist/components/SearchBar/index.d.ts +2 -0
- package/dist/components/SearchDropdown/SearchDropdown.d.ts +2 -0
- package/dist/components/SearchDropdown/SearchDropdown.types.d.ts +22 -0
- package/dist/components/SearchDropdown/index.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +4209 -3763
- package/package.json +56 -55
|
@@ -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,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
|
+
}
|