@versaur/react 1.0.17 → 1.0.18

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/forms.d.ts CHANGED
@@ -220,6 +220,7 @@ export declare const ComboboxInput: ForwardRefExoticComponent<ComboboxInputRootP
220
220
  Drawer: ForwardRefExoticComponent<ComboboxInputListboxProps & RefAttributes<HTMLUListElement>>;
221
221
  Option: ForwardRefExoticComponent<ComboboxInputOptionProps & RefAttributes<HTMLLIElement>>;
222
222
  SelectionChips: ForwardRefExoticComponent<ComboboxInputSelectionChipsProps & RefAttributes<HTMLDivElement>>;
223
+ ListboxSearch: ForwardRefExoticComponent<ComboboxInputListboxSearchProps & RefAttributes<HTMLInputElement>>;
223
224
  };
224
225
 
225
226
  /**
@@ -244,12 +245,34 @@ export declare interface ComboboxInputButtonProps extends Omit<ButtonHTMLAttribu
244
245
  * Props for ComboboxInput.Listbox subcomponent
245
246
  */
246
247
  export declare interface ComboboxInputListboxProps extends Omit<HTMLAttributes<HTMLUListElement>, "role"> {
248
+ /**
249
+ * Search input element (required, typically ComboboxInput.ListboxSearch)
250
+ */
251
+ search: ReactNode;
247
252
  /**
248
253
  * List items (Option elements)
249
254
  */
250
255
  children?: ReactNode;
251
256
  }
252
257
 
258
+ /**
259
+ * Props for ComboboxInput.ListboxSearch subcomponent
260
+ */
261
+ declare interface ComboboxInputListboxSearchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
262
+ /**
263
+ * Search input name attribute
264
+ */
265
+ name: string;
266
+ /**
267
+ * Current search value
268
+ */
269
+ value: string;
270
+ /**
271
+ * Change handler for search value
272
+ */
273
+ onChange: React.ChangeEventHandler<HTMLInputElement>;
274
+ }
275
+
253
276
  /**
254
277
  * Props for ComboboxInput.Option subcomponent
255
278
  */
@@ -269,17 +292,40 @@ export declare interface ComboboxInputOptionProps extends Omit<HTMLAttributes<HT
269
292
  }
270
293
 
271
294
  /**
272
- * Root props for ComboboxInput
295
+ * Root props for ComboboxInput - discriminated union for single and multi-select
273
296
  */
274
- export declare interface ComboboxInputRootProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
297
+ export declare type ComboboxInputRootProps = (ComboboxInputRootPropsBase & {
298
+ /**
299
+ * Multi-select mode
300
+ */
301
+ multiple: true;
275
302
  /**
276
- * Selected values (array)
303
+ * Selected values (array) for multi-select
277
304
  */
278
305
  value: string[];
279
306
  /**
280
- * Change handler for selected values
307
+ * Change handler for multi-select
281
308
  */
282
309
  onChange: (value: string[]) => void;
310
+ }) | (ComboboxInputRootPropsBase & {
311
+ /**
312
+ * Single-select mode (default)
313
+ */
314
+ multiple?: false;
315
+ /**
316
+ * Selected value (string or null) for single-select
317
+ */
318
+ value: string | null;
319
+ /**
320
+ * Change handler for single-select
321
+ */
322
+ onChange: (value: string | null) => void;
323
+ });
324
+
325
+ /**
326
+ * Root props base (shared between single and multi-select)
327
+ */
328
+ declare type ComboboxInputRootPropsBase = Omit<HTMLAttributes<HTMLDivElement>, "onChange"> & {
283
329
  /**
284
330
  * Display variant
285
331
  * @default "popup"
@@ -322,7 +368,7 @@ export declare interface ComboboxInputRootProps extends Omit<HTMLAttributes<HTML
322
368
  * Right icon element (typically filled by the component's chevron)
323
369
  */
324
370
  iconRight?: ReactNode;
325
- }
371
+ };
326
372
 
327
373
  /**
328
374
  * Props for ComboboxInput.SelectionChips subcomponent