@versaur/react 1.0.17 → 1.0.19

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.
Files changed (3) hide show
  1. package/dist/forms.d.ts +67 -10
  2. package/dist/forms.js +544 -584
  3. package/package.json +2 -2
package/dist/forms.d.ts CHANGED
@@ -2,6 +2,7 @@ import { ButtonHTMLAttributes } from 'react';
2
2
  import { ForwardRefExoticComponent } from 'react';
3
3
  import { HTMLAttributes } from 'react';
4
4
  import { InputHTMLAttributes } from 'react';
5
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
5
6
  import { LabelHTMLAttributes } from 'react';
6
7
  import { OptgroupHTMLAttributes } from 'react';
7
8
  import { OptionHTMLAttributes } from 'react';
@@ -216,10 +217,13 @@ declare interface ChipInputSingleProps extends ChipInputBaseProps {
216
217
 
217
218
  export declare const ComboboxInput: ForwardRefExoticComponent<ComboboxInputRootProps & RefAttributes<HTMLDivElement>> & {
218
219
  Button: ForwardRefExoticComponent<ComboboxInputButtonProps & RefAttributes<HTMLButtonElement>>;
219
- Listbox: ForwardRefExoticComponent<ComboboxInputListboxProps & RefAttributes<HTMLUListElement>>;
220
- Drawer: ForwardRefExoticComponent<ComboboxInputListboxProps & RefAttributes<HTMLUListElement>>;
221
220
  Option: ForwardRefExoticComponent<ComboboxInputOptionProps & RefAttributes<HTMLLIElement>>;
222
221
  SelectionChips: ForwardRefExoticComponent<ComboboxInputSelectionChipsProps & RefAttributes<HTMLDivElement>>;
222
+ Search: ForwardRefExoticComponent<ComboboxInputSearchProps & RefAttributes<HTMLInputElement>>;
223
+ Container: {
224
+ ({ search, children, variant }: ComboboxInputContainerProps): JSX_2.Element;
225
+ displayName: string;
226
+ };
223
227
  };
224
228
 
225
229
  /**
@@ -241,13 +245,25 @@ export declare interface ComboboxInputButtonProps extends Omit<ButtonHTMLAttribu
241
245
  }
242
246
 
243
247
  /**
244
- * Props for ComboboxInput.Listbox subcomponent
248
+ * Props for ComboboxInput.Container subcomponent
245
249
  */
246
- export declare interface ComboboxInputListboxProps extends Omit<HTMLAttributes<HTMLUListElement>, "role"> {
250
+ export declare interface ComboboxInputContainerProps {
247
251
  /**
248
- * List items (Option elements)
252
+ * Search input element (optional)
249
253
  */
250
- children?: ReactNode;
254
+ search?: ReactNode;
255
+ /**
256
+ * Display variant - controls how container is rendered
257
+ * "list": popup with optional search
258
+ * "drawer": drawer variant with optional search
259
+ * "none": plain container without wrapper styling
260
+ * @default "list"
261
+ */
262
+ variant?: "list" | "drawer" | "none";
263
+ /**
264
+ * Arbitrary content to render in the container
265
+ */
266
+ children?: React.ReactNode;
251
267
  }
252
268
 
253
269
  /**
@@ -269,17 +285,40 @@ export declare interface ComboboxInputOptionProps extends Omit<HTMLAttributes<HT
269
285
  }
270
286
 
271
287
  /**
272
- * Root props for ComboboxInput
288
+ * Root props for ComboboxInput - discriminated union for single and multi-select
273
289
  */
274
- export declare interface ComboboxInputRootProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
290
+ export declare type ComboboxInputRootProps = (ComboboxInputRootPropsBase & {
291
+ /**
292
+ * Multi-select mode
293
+ */
294
+ multiple: true;
275
295
  /**
276
- * Selected values (array)
296
+ * Selected values (array) for multi-select
277
297
  */
278
298
  value: string[];
279
299
  /**
280
- * Change handler for selected values
300
+ * Change handler for multi-select
281
301
  */
282
302
  onChange: (value: string[]) => void;
303
+ }) | (ComboboxInputRootPropsBase & {
304
+ /**
305
+ * Single-select mode (default)
306
+ */
307
+ multiple?: false;
308
+ /**
309
+ * Selected value (string or null) for single-select
310
+ */
311
+ value: string | null;
312
+ /**
313
+ * Change handler for single-select
314
+ */
315
+ onChange: (value: string | null) => void;
316
+ });
317
+
318
+ /**
319
+ * Root props base (shared between single and multi-select)
320
+ */
321
+ declare type ComboboxInputRootPropsBase = Omit<HTMLAttributes<HTMLDivElement>, "onChange"> & {
283
322
  /**
284
323
  * Display variant
285
324
  * @default "popup"
@@ -322,6 +361,24 @@ export declare interface ComboboxInputRootProps extends Omit<HTMLAttributes<HTML
322
361
  * Right icon element (typically filled by the component's chevron)
323
362
  */
324
363
  iconRight?: ReactNode;
364
+ };
365
+
366
+ /**
367
+ * Props for ComboboxInput.Search subcomponent
368
+ */
369
+ export declare interface ComboboxInputSearchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
370
+ /**
371
+ * Search input name attribute
372
+ */
373
+ name: string;
374
+ /**
375
+ * Current search value
376
+ */
377
+ value: string;
378
+ /**
379
+ * Change handler for search value
380
+ */
381
+ onChange: React.ChangeEventHandler<HTMLInputElement>;
325
382
  }
326
383
 
327
384
  /**