@versaur/react 1.0.15 → 1.0.17

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/blocks.js CHANGED
@@ -4,7 +4,7 @@ import { ChevronDownIcon as q, XIcon as J } from "@versaur/icons";
4
4
  import { createContext as F, forwardRef as n, useRef as G, useState as M, useEffect as E, useContext as H, useLayoutEffect as Tt, useId as K } from "react";
5
5
  import { u as f, I as Q, B as W } from "./helpers-D23F5WBX.js";
6
6
  import { c } from "./cx-B9vmfsc1.js";
7
- import { e as U, d as R, c as St, H as Bt, T as At } from "./tooltip-Cn7Ml9vw.js";
7
+ import { e as U, d as R, c as St, H as Bt, T as At } from "./tooltip-60d7mYVa.js";
8
8
  import { checkboxStyles as k } from "@versaur/core/forms";
9
9
  import { a as Y } from "./drawer-BjNHPqBr.js";
10
10
  import { D as va } from "./drawer-BjNHPqBr.js";
package/dist/forms.d.ts CHANGED
@@ -7,6 +7,7 @@ import { OptgroupHTMLAttributes } from 'react';
7
7
  import { OptionHTMLAttributes } from 'react';
8
8
  import { ReactNode } from 'react';
9
9
  import { RefAttributes } from 'react';
10
+ import { SelectableInput as SelectableInput_2 } from '@versaur/core/forms';
10
11
  import { SelectHTMLAttributes } from 'react';
11
12
  import { TextareaHTMLAttributes } from 'react';
12
13
 
@@ -338,6 +339,85 @@ export declare interface ComboboxInputSelectionChipsProps extends HTMLAttributes
338
339
  */
339
340
  export declare type ComboboxInputVariant = "popup" | "drawer";
340
341
 
342
+ /**
343
+ * CurrencyInput component
344
+ * Combined currency selector and amount input in a single bordered field
345
+ */
346
+ export declare const CurrencyInput: ForwardRefExoticComponent<CurrencyInputProps & RefAttributes<HTMLInputElement>>;
347
+
348
+ export declare interface CurrencyInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "name" | "value" | "onChange"> {
349
+ /**
350
+ * Label text displayed above input
351
+ */
352
+ label?: string;
353
+ /**
354
+ * Helper text displayed below input
355
+ */
356
+ helper?: string;
357
+ /**
358
+ * Error message displayed below input (replaces helper)
359
+ */
360
+ error?: string;
361
+ /**
362
+ * Whether the input is required
363
+ */
364
+ required?: boolean;
365
+ /**
366
+ * Whether the input is disabled
367
+ */
368
+ disabled?: boolean;
369
+ /**
370
+ * Whether the input is read-only
371
+ */
372
+ readOnly?: boolean;
373
+ /**
374
+ * Amount field
375
+ */
376
+ name?: string;
377
+ /**
378
+ * The amount value
379
+ */
380
+ amountValue?: string | number;
381
+ /**
382
+ * Callback when amount changes
383
+ */
384
+ onAmountChange?: (value: string) => void;
385
+ /**
386
+ * Currency field
387
+ */
388
+ currencyValue?: string;
389
+ /**
390
+ * Callback when currency changes
391
+ */
392
+ onCurrencyChange?: (code: string) => void;
393
+ /**
394
+ * List of available currency codes; defaults to all supported currencies via Intl.supportedValuesOf
395
+ */
396
+ currencies?: string[];
397
+ /**
398
+ * Name attribute for the currency select; defaults to `${name}-currency`
399
+ */
400
+ currencyName?: string;
401
+ }
402
+
403
+ export declare interface CurrencyOption {
404
+ code: string;
405
+ label: string;
406
+ }
407
+
408
+ /**
409
+ * EmailInput component
410
+ * A pre-configured TextInput with MailIcon and email type/inputMode
411
+ */
412
+ export declare const EmailInput: ForwardRefExoticComponent<EmailInputProps & RefAttributes<HTMLInputElement>>;
413
+
414
+ export declare interface EmailInputProps extends Omit<TextInputProps, "type" | "inputMode"> {
415
+ /**
416
+ * Override the default mail icon
417
+ */
418
+ leftIcon?: TextInputProps["leftIcon"];
419
+ }
420
+
341
421
  /**
342
422
  * ErrorText component for form field error messages
343
423
  * Internal primitive - not exported from main package
@@ -384,6 +464,19 @@ declare interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
384
464
  disabled?: boolean;
385
465
  }
386
466
 
467
+ /**
468
+ * PasswordInput component
469
+ * A pre-configured TextInput with LockIcon and password type
470
+ */
471
+ export declare const PasswordInput: ForwardRefExoticComponent<PasswordInputProps & RefAttributes<HTMLInputElement>>;
472
+
473
+ export declare interface PasswordInputProps extends Omit<TextInputProps, "type"> {
474
+ /**
475
+ * Override the default lock icon
476
+ */
477
+ leftIcon?: TextInputProps["leftIcon"];
478
+ }
479
+
387
480
  /**
388
481
  * Radio - Native radio input with custom styling
389
482
  *
@@ -470,8 +563,107 @@ export declare interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputEl
470
563
  children?: ReactNode;
471
564
  }
472
565
 
566
+ /**
567
+ * SearchInput component
568
+ * A pre-configured TextInput with SearchIcon and search inputMode
569
+ */
570
+ export declare const SearchInput: ForwardRefExoticComponent<SearchInputProps & RefAttributes<HTMLInputElement>>;
571
+
572
+ export declare interface SearchInputProps extends Omit<TextInputProps, "type" | "inputMode"> {
573
+ /**
574
+ * Override the default search icon
575
+ */
576
+ leftIcon?: TextInputProps["leftIcon"];
577
+ }
578
+
473
579
  export declare const Select: SelectComponent;
474
580
 
581
+ /**
582
+ * SelectableInput compound component with Option subcomponent
583
+ */
584
+ export declare const SelectableInput: ForwardRefExoticComponent<SelectableInputRootProps & RefAttributes<HTMLDivElement>> & {
585
+ Option: ForwardRefExoticComponent<SelectableInputOptionProps & RefAttributes<HTMLLabelElement>>;
586
+ };
587
+
588
+ /**
589
+ * Base props shared by both single and multiple SelectableInput
590
+ */
591
+ declare interface SelectableInputBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
592
+ /**
593
+ * Name attribute for the input group
594
+ */
595
+ name?: string;
596
+ /**
597
+ * Disabled state for all options
598
+ */
599
+ disabled?: boolean;
600
+ /**
601
+ * Checkbox placement within each option
602
+ * @default "top"
603
+ */
604
+ placement?: SelectableInput_2.Placement;
605
+ }
606
+
607
+ /**
608
+ * Props for multiple-selection mode (multiple={true})
609
+ */
610
+ declare interface SelectableInputMultipleProps extends SelectableInputBaseProps {
611
+ /**
612
+ * Enable multiple selection
613
+ */
614
+ multiple: true;
615
+ /**
616
+ * Array of selected option values
617
+ */
618
+ value: string[];
619
+ /**
620
+ * Change handler for array value
621
+ */
622
+ onChange: (value: string[]) => void;
623
+ }
624
+
625
+ /**
626
+ * Props for SelectableInput.Option subcomponent
627
+ */
628
+ export declare interface SelectableInputOptionProps extends Omit<LabelHTMLAttributes<HTMLLabelElement>, "onChange"> {
629
+ /**
630
+ * Option value
631
+ */
632
+ value: string;
633
+ /**
634
+ * Option content (children) - accepts any ReactNode (text, Card, etc.)
635
+ */
636
+ children?: ReactNode;
637
+ /**
638
+ * Disabled state for this specific option
639
+ */
640
+ disabled?: boolean;
641
+ }
642
+
643
+ /**
644
+ * Discriminated union type for SelectableInput root props
645
+ * Use multiple={false} (or omit it) for single selection, multiple={true} for multiple
646
+ */
647
+ export declare type SelectableInputRootProps = SelectableInputSingleProps | SelectableInputMultipleProps;
648
+
649
+ /**
650
+ * Props for single-selection mode (multiple={false} or omitted)
651
+ */
652
+ declare interface SelectableInputSingleProps extends SelectableInputBaseProps {
653
+ /**
654
+ * Disable multiple selection (default)
655
+ */
656
+ multiple?: false;
657
+ /**
658
+ * Selected option value
659
+ */
660
+ value: string | undefined;
661
+ /**
662
+ * Change handler for single value
663
+ */
664
+ onChange: (value: string) => void;
665
+ }
666
+
475
667
  declare interface SelectComponent extends ForwardRefExoticComponent<SelectProps & RefAttributes<HTMLSelectElement>> {
476
668
  Option: typeof SelectOption;
477
669
  OptionGroup: typeof SelectOptionGroup;