@clarlabs/ui 0.1.20 → 0.1.29

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
@@ -1166,6 +1166,48 @@ export declare interface RichSelectProps {
1166
1166
  className?: string;
1167
1167
  }
1168
1168
 
1169
+ export declare function Search({ onSearch, results, totalCount, pageSize, placeholder, loading, debounceMs, className }: SearchProps): default_2.JSX.Element;
1170
+
1171
+ export declare interface SearchProps {
1172
+ /** Callback when user searches or changes page. Hook to any data source (API, local filter, etc.) */
1173
+ onSearch: (params: {
1174
+ query: string;
1175
+ page: number;
1176
+ pageSize: number;
1177
+ }) => void | Promise<void>;
1178
+ /** Search results from your data source */
1179
+ results: SearchResult[];
1180
+ /** Total number of results (for pagination) */
1181
+ totalCount: number;
1182
+ /** Number of results per page */
1183
+ pageSize?: number;
1184
+ /** Search input placeholder */
1185
+ placeholder?: string;
1186
+ /** Loading state (e.g. when fetching from API) */
1187
+ loading?: boolean;
1188
+ /** Debounce delay in ms before firing onSearch (0 = no debounce) */
1189
+ debounceMs?: number;
1190
+ /** Custom class name */
1191
+ className?: string;
1192
+ }
1193
+
1194
+ export declare interface SearchResult {
1195
+ /** Unique identifier */
1196
+ id: string;
1197
+ /** Result title */
1198
+ title: string;
1199
+ /** Result body/description */
1200
+ body: string;
1201
+ /** Optional tags to display next to title */
1202
+ tags?: string[];
1203
+ /** Click handler for custom behavior */
1204
+ onClick?: () => void;
1205
+ /** External link URL (use with newTab to open in new window) */
1206
+ href?: string;
1207
+ /** When href is set, open link in new tab (target="_blank") */
1208
+ newTab?: boolean;
1209
+ }
1210
+
1169
1211
  export declare const Select: default_2.ForwardRefExoticComponent<SelectProps & default_2.RefAttributes<HTMLSelectElement>>;
1170
1212
 
1171
1213
  export declare interface SelectOption {
@@ -1189,7 +1231,7 @@ export declare type SelectSize = 'sm' | 'md' | 'lg';
1189
1231
 
1190
1232
  export declare type SelectVariant = 'default' | 'error' | 'success';
1191
1233
 
1192
- export declare function SidePanel({ isOpen, onClose, title, children, footer, position, size, closeOnOverlayClick, showCloseButton, className }: SidePanelProps): default_2.JSX.Element | null;
1234
+ export declare function SidePanel({ isOpen, onClose, title, children, footer, position, size, closeOnOverlayClick, showCloseButton, className }: SidePanelProps): default_2.ReactPortal | null;
1193
1235
 
1194
1236
  export declare type SidePanelPosition = 'left' | 'right';
1195
1237