@foundrykit/components 1.0.9 → 1.0.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @foundrykit/components
2
2
 
3
+ ## 1.0.12
4
+
5
+ ### Patch Changes
6
+
7
+ - updating issues with the advanced search bar component
8
+
9
+ ## 1.0.11
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+ - @foundrykit/hooks@1.0.7
15
+
16
+ ## 1.0.10
17
+
18
+ ### Patch Changes
19
+
20
+ - adding the advanced search bar
21
+ - Updated dependencies
22
+ - @foundrykit/hooks@1.0.6
23
+ - @foundrykit/types@1.0.8
24
+ - @foundrykit/primitives@1.0.10
25
+
3
26
  ## 1.0.9
4
27
 
5
28
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -3,6 +3,11 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { DayPicker } from 'react-day-picker';
4
4
  import { Button, Dialog } from '@foundrykit/primitives';
5
5
  import { Command as Command$1 } from 'cmdk';
6
+ import * as class_variance_authority_types from 'class-variance-authority/types';
7
+ import { VariantProps } from 'class-variance-authority';
8
+ import { EmptyStateBehavior } from '@foundrykit/hooks';
9
+ import { SearchResult, SearchSection as SearchSection$1 } from '@foundrykit/types';
10
+ export { SearchResult, SearchSection as SearchSectionType } from '@foundrykit/types';
6
11
  export { cn } from '@foundrykit/utils';
7
12
 
8
13
  interface SearchBarProps extends React.InputHTMLAttributes<HTMLInputElement> {
@@ -53,4 +58,59 @@ declare function CommandSeparator({ className, ...props }: React.ComponentProps<
53
58
  declare function CommandItem({ className, ...props }: React.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
54
59
  declare function CommandShortcut({ className, ...props }: React.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
55
60
 
56
- export { Calendar, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DatePicker, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, SearchBar };
61
+ interface AdvancedSearchProviderProps {
62
+ children: React.ReactNode;
63
+ onSearch?: (query: string) => Promise<SearchResult[]> | SearchResult[];
64
+ onResultSelect?: (result: SearchResult) => void;
65
+ debounceMs?: number;
66
+ minQueryLength?: number;
67
+ emptyStateBehavior?: EmptyStateBehavior;
68
+ initialResults?: SearchResult[];
69
+ }
70
+ declare function AdvancedSearchProvider({ children, onSearch, onResultSelect, debounceMs, minQueryLength, emptyStateBehavior, initialResults, }: AdvancedSearchProviderProps): react_jsx_runtime.JSX.Element;
71
+ declare const searchInputWrapperVariants: (props?: ({
72
+ size?: "sm" | "lg" | "md" | "xl" | null | undefined;
73
+ variant?: "default" | "ghost" | "filled" | null | undefined;
74
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
75
+ declare const searchResultsVariants: (props?: ({
76
+ size?: "sm" | "lg" | "md" | "xl" | "2xl" | "full" | null | undefined;
77
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
78
+ interface SearchInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof searchInputWrapperVariants> {
79
+ placeholder?: string;
80
+ showSearchIcon?: boolean;
81
+ showClearButton?: boolean;
82
+ onClear?: () => void;
83
+ asChild?: boolean;
84
+ }
85
+ declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
86
+ interface SearchTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
87
+ asChild?: boolean;
88
+ }
89
+ declare const SearchTrigger: React.ForwardRefExoticComponent<SearchTriggerProps & React.RefAttributes<HTMLButtonElement>>;
90
+ interface SearchResultsProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof searchResultsVariants> {
91
+ sections?: SearchSection$1[];
92
+ showEmptyState?: boolean;
93
+ emptyStateMessage?: string;
94
+ showLoadingState?: boolean;
95
+ loadingMessage?: string;
96
+ }
97
+ declare const SearchResults: React.ForwardRefExoticComponent<SearchResultsProps & React.RefAttributes<HTMLDivElement>>;
98
+ interface AdvancedSearchBarProps extends React.HTMLAttributes<HTMLDivElement> {
99
+ open?: boolean;
100
+ onOpenChange?: (open: boolean) => void;
101
+ }
102
+ declare const AdvancedSearchBar: React.ForwardRefExoticComponent<AdvancedSearchBarProps & React.RefAttributes<HTMLDivElement>>;
103
+ interface SearchSectionProps extends React.HTMLAttributes<HTMLDivElement> {
104
+ title?: string;
105
+ maxResults?: number;
106
+ showMore?: boolean;
107
+ onShowMore?: () => void;
108
+ }
109
+ declare const SearchSection: React.ForwardRefExoticComponent<SearchSectionProps & React.RefAttributes<HTMLDivElement>>;
110
+ interface SearchItemProps extends React.HTMLAttributes<HTMLDivElement> {
111
+ result?: SearchResult;
112
+ onClick?: () => void;
113
+ }
114
+ declare const SearchItem: React.ForwardRefExoticComponent<SearchItemProps & React.RefAttributes<HTMLDivElement>>;
115
+
116
+ export { AdvancedSearchBar, AdvancedSearchProvider, Calendar, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DatePicker, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, SearchBar, SearchInput, SearchItem, SearchResults, SearchSection, SearchTrigger };