@dimasbaguspm/versaur 0.0.48 → 0.0.49

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 (76) hide show
  1. package/dist/assets/styles.css +14 -6
  2. package/dist/js/forms/index.js +12 -14
  3. package/dist/js/image-rectangle-K9jmTTED.js +2607 -0
  4. package/dist/js/index.js +66 -68
  5. package/dist/js/layouts/index.js +8 -9
  6. package/dist/js/navigation/index.js +1 -1
  7. package/dist/js/overlays/index.js +2 -2
  8. package/dist/js/primitive/index.js +21 -20
  9. package/dist/js/tabs-I4n6MLAv.js +210 -0
  10. package/dist/js/time-picker-input-jJBtyikv.js +1562 -0
  11. package/dist/js/{tooltip-D6fUigp2.js → tooltip-nZW9TUz3.js} +293 -297
  12. package/dist/js/{top-bar-Dx0JVXms.js → top-bar-BMw3gFYA.js} +292 -247
  13. package/dist/types/forms/checkbox-input/checkbox-input.d.ts +1 -1
  14. package/dist/types/forms/checkbox-input/types.d.ts +11 -14
  15. package/dist/types/forms/chip-multiple-input/chip-multiple-input.atoms.d.ts +2 -2
  16. package/dist/types/forms/chip-multiple-input/chip-multiple-input.d.ts +1 -1
  17. package/dist/types/forms/chip-multiple-input/types.d.ts +15 -14
  18. package/dist/types/forms/chip-single-input/chip-single-input.atoms.d.ts +1 -1
  19. package/dist/types/forms/chip-single-input/chip-single-input.d.ts +1 -1
  20. package/dist/types/forms/chip-single-input/types.d.ts +15 -14
  21. package/dist/types/forms/date-single-picker-input/types.d.ts +10 -0
  22. package/dist/types/forms/index.d.ts +0 -2
  23. package/dist/types/forms/pin-field/pin-field.d.ts +2 -2
  24. package/dist/types/forms/pin-field/types.d.ts +16 -28
  25. package/dist/types/forms/select-input/index.d.ts +1 -1
  26. package/dist/types/forms/select-input/select-input.atoms.d.ts +16 -0
  27. package/dist/types/forms/select-input/select-input.d.ts +4 -7
  28. package/dist/types/forms/select-input/types.d.ts +32 -9
  29. package/dist/types/forms/selectable-multiple-input/selectable-multiple-input.d.ts +1 -1
  30. package/dist/types/forms/selectable-multiple-input/types.d.ts +20 -3
  31. package/dist/types/forms/selectable-single-input/selectable-single-input.d.ts +1 -1
  32. package/dist/types/forms/selectable-single-input/types.d.ts +20 -3
  33. package/dist/types/forms/switch-input/switch-input.atoms.d.ts +7 -8
  34. package/dist/types/forms/switch-input/switch-input.d.ts +5 -1
  35. package/dist/types/forms/switch-input/types.d.ts +10 -33
  36. package/dist/types/forms/text-input/text-input.d.ts +2 -2
  37. package/dist/types/forms/text-input/types.d.ts +0 -7
  38. package/dist/types/forms/textarea-input/textarea-input.d.ts +3 -3
  39. package/dist/types/forms/textarea-input/types.d.ts +33 -18
  40. package/dist/types/layouts/index.d.ts +1 -2
  41. package/dist/types/layouts/page-content/index.d.ts +1 -1
  42. package/dist/types/layouts/page-content/page-content.d.ts +5 -11
  43. package/dist/types/layouts/page-content/types.d.ts +29 -9
  44. package/dist/types/layouts/page-header/types.d.ts +13 -0
  45. package/dist/types/navigation/tabs/tabs.atoms.d.ts +3 -2
  46. package/dist/types/navigation/tabs/types.d.ts +5 -13
  47. package/dist/types/navigation/tabs/use-tab-indicator.d.ts +8 -8
  48. package/dist/types/overlays/drawer/drawer.atoms.d.ts +18 -8
  49. package/dist/types/overlays/drawer/drawer.d.ts +5 -5
  50. package/dist/types/overlays/drawer/types.d.ts +11 -15
  51. package/dist/types/primitive/button/button.d.ts +5 -0
  52. package/dist/types/primitive/button/types.d.ts +24 -11
  53. package/dist/types/primitive/button-anchor/button-anchor.d.ts +9 -0
  54. package/dist/types/primitive/button-anchor/index.d.ts +2 -0
  55. package/dist/types/primitive/button-anchor/types.d.ts +35 -0
  56. package/dist/types/primitive/button-icon/button-icon.d.ts +6 -0
  57. package/dist/types/primitive/button-icon/types.d.ts +21 -10
  58. package/dist/types/primitive/filter-chip/types.d.ts +0 -10
  59. package/dist/types/primitive/index.d.ts +1 -0
  60. package/dist/types/templates/pin-verifier-drawer/types.d.ts +0 -5
  61. package/dist/utils/enforce-subpath-import.js +1 -3
  62. package/package.json +1 -1
  63. package/dist/js/image-rectangle-B4nXH4Q5.js +0 -2581
  64. package/dist/js/tabs-BAzThVka.js +0 -291
  65. package/dist/js/time-picker-input-JBEgDV2V.js +0 -2049
  66. package/dist/types/forms/segment-multiple-input/index.d.ts +0 -2
  67. package/dist/types/forms/segment-multiple-input/segment-multiple-input.atoms.d.ts +0 -12
  68. package/dist/types/forms/segment-multiple-input/segment-multiple-input.d.ts +0 -7
  69. package/dist/types/forms/segment-multiple-input/types.d.ts +0 -55
  70. package/dist/types/forms/segment-single-input/index.d.ts +0 -2
  71. package/dist/types/forms/segment-single-input/segment-single-input.atoms.d.ts +0 -11
  72. package/dist/types/forms/segment-single-input/segment-single-input.d.ts +0 -7
  73. package/dist/types/forms/segment-single-input/types.d.ts +0 -55
  74. package/dist/types/layouts/page-layout/index.d.ts +0 -2
  75. package/dist/types/layouts/page-layout/page-layout.d.ts +0 -8
  76. package/dist/types/layouts/page-layout/types.d.ts +0 -20
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { CheckboxInputProps } from './types';
3
- export declare const CheckboxInput: React.ForwardRefExoticComponent<CheckboxInputProps & React.RefAttributes<HTMLDivElement>> & {
3
+ export declare const CheckboxInput: React.ForwardRefExoticComponent<CheckboxInputProps & React.RefAttributes<HTMLFieldSetElement>> & {
4
4
  Option: React.ForwardRefExoticComponent<import('./types').CheckboxOptionProps & React.RefAttributes<HTMLInputElement>>;
5
5
  };
@@ -1,21 +1,10 @@
1
- import { InputHTMLAttributes, ReactNode } from 'react';
1
+ import { FieldsetHTMLAttributes, InputHTMLAttributes, ReactNode } from 'react';
2
2
  /**
3
3
  * Props for the CheckboxInput component
4
4
  */
5
- export interface CheckboxInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
5
+ export interface CheckboxInputProps extends Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'children'> {
6
6
  /**
7
- * Visual style variant supporting Versaur color system
8
- * Core variants: primary (coral), secondary (sage), tertiary (mist), ghost (slate), neutral (light gray)
9
- * Semantic variants: success, info, warning, danger
10
- * Each variant supports outline form for flexible design expression
11
- */
12
- variant?: 'primary' | 'primary-outline' | 'secondary' | 'secondary-outline' | 'tertiary' | 'tertiary-outline' | 'ghost' | 'ghost-outline' | 'neutral' | 'neutral-outline' | 'success' | 'success-outline' | 'info' | 'info-outline' | 'warning' | 'warning-outline' | 'danger' | 'danger-outline';
13
- /**
14
- * Size variant for the checkbox
15
- */
16
- size?: 'sm' | 'md' | 'lg';
17
- /**
18
- * Label text to display above the checkbox group
7
+ * Label text to display above the checkbox group (rendered as legend)
19
8
  */
20
9
  label?: ReactNode;
21
10
  /**
@@ -30,6 +19,14 @@ export interface CheckboxInputProps extends Omit<InputHTMLAttributes<HTMLInputEl
30
19
  * Direction of checkbox layout
31
20
  */
32
21
  direction?: 'horizontal' | 'vertical';
22
+ /**
23
+ * Whether the checkbox group is required
24
+ */
25
+ required?: boolean;
26
+ /**
27
+ * Children (CheckboxInput.Option components)
28
+ */
29
+ children: ReactNode;
33
30
  }
34
31
  /**
35
32
  * Props for the CheckboxInput.Option component
@@ -5,6 +5,6 @@ import { ChipMultipleInputOptionProps } from './types';
5
5
  *
6
6
  * Individual chip option for ChipMultipleInput
7
7
  * Uses checkbox input pattern for multiple selection
8
- * Supports leading icon and animated tick/check
8
+ * Supports text truncation with maxWidth and icon-only mode
9
9
  */
10
- export declare const ChipMultipleOption: React.ForwardRefExoticComponent<ChipMultipleInputOptionProps & React.RefAttributes<HTMLInputElement>>;
10
+ export declare const ChipMultipleInputOption: React.ForwardRefExoticComponent<ChipMultipleInputOptionProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,4 +1,4 @@
1
1
  import { ChipMultipleInputProps } from './types';
2
- export declare const ChipMultipleInput: import('react').ForwardRefExoticComponent<ChipMultipleInputProps & import('react').RefAttributes<HTMLDivElement>> & {
2
+ export declare const ChipMultipleInput: import('react').ForwardRefExoticComponent<ChipMultipleInputProps & import('react').RefAttributes<HTMLFieldSetElement>> & {
3
3
  Option: import('react').ForwardRefExoticComponent<import('./types').ChipMultipleInputOptionProps & import('react').RefAttributes<HTMLInputElement>>;
4
4
  };
@@ -1,27 +1,20 @@
1
- import { InputHTMLAttributes, ReactNode } from 'react';
1
+ import { FieldsetHTMLAttributes, InputHTMLAttributes, ReactNode } from 'react';
2
2
  /**
3
3
  * Props for the ChipMultipleInput component
4
4
  */
5
- export interface ChipMultipleInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'onChange' | 'value'> {
5
+ export interface ChipMultipleInputProps extends Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'onChange'> {
6
6
  /**
7
- * The shape of the chip: 'circle' (default) or 'rounded'
8
- */
9
- shape?: 'circle' | 'rounded';
10
- /**
11
- * The size of the chip: 'sm' (default), 'md', or 'lg'
7
+ * The size of the chip: 'sm', 'md' (default), or 'lg'
12
8
  */
13
9
  size?: 'sm' | 'md' | 'lg';
14
10
  /**
15
- * Visual style variant supporting Versaur color system
16
- * Core variants: primary (coral), secondary (sage), tertiary (mist), ghost (slate), neutral (light gray)
17
- * Semantic variants: success, info, warning, danger
18
- * Each variant supports outline form for flexible design expression
11
+ * Label text to display above the chip group (rendered as legend)
19
12
  */
20
- variant?: 'primary' | 'secondary' | 'tertiary' | 'ghost';
13
+ label?: ReactNode;
21
14
  /**
22
- * Label text to display above the chip group
15
+ * Whether the field is required (displays asterisk in legend)
23
16
  */
24
- label?: ReactNode;
17
+ required?: boolean;
25
18
  /**
26
19
  * Helper text to display below the chip group
27
20
  */
@@ -43,6 +36,14 @@ export interface ChipMultipleInputProps extends Omit<InputHTMLAttributes<HTMLInp
43
36
  * Callback when value changes
44
37
  */
45
38
  onChange?: (value: string[]) => void;
39
+ /**
40
+ * Whether the chip group is read-only
41
+ */
42
+ readOnly?: boolean;
43
+ /**
44
+ * Maximum width for individual chips (enables text truncation)
45
+ */
46
+ maxWidth?: string;
46
47
  }
47
48
  /**
48
49
  * Props for the ChipMultipleInput.Option component
@@ -5,6 +5,6 @@ import { ChipSingleInputOptionProps } from './types';
5
5
  *
6
6
  * Individual chip option for ChipSingleInput
7
7
  * Uses radio input pattern for single selection
8
- * Supports leading icon and animated tick/check
8
+ * Supports text truncation with maxWidth and icon-only mode
9
9
  */
10
10
  export declare const ChipSingleInputOption: React.ForwardRefExoticComponent<ChipSingleInputOptionProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,4 +1,4 @@
1
1
  import { ChipSingleInputProps } from './types';
2
- export declare const ChipSingleInput: import('react').ForwardRefExoticComponent<ChipSingleInputProps & import('react').RefAttributes<HTMLDivElement>> & {
2
+ export declare const ChipSingleInput: import('react').ForwardRefExoticComponent<ChipSingleInputProps & import('react').RefAttributes<HTMLFieldSetElement>> & {
3
3
  Option: import('react').ForwardRefExoticComponent<import('./types').ChipSingleInputOptionProps & import('react').RefAttributes<HTMLInputElement>>;
4
4
  };
@@ -1,27 +1,20 @@
1
- import { InputHTMLAttributes, ReactNode } from 'react';
1
+ import { FieldsetHTMLAttributes, InputHTMLAttributes, ReactNode } from 'react';
2
2
  /**
3
3
  * Props for the ChipSingleInput component
4
4
  */
5
- export interface ChipSingleInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'onChange' | 'value'> {
5
+ export interface ChipSingleInputProps extends Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'onChange'> {
6
6
  /**
7
- * The shape of the chip: 'circle' (default) or 'rounded'
8
- */
9
- shape?: 'circle' | 'rounded';
10
- /**
11
- * The size of the chip: 'sm' (default), 'md', or 'lg'
7
+ * The size of the chip: 'sm', 'md' (default), or 'lg'
12
8
  */
13
9
  size?: 'sm' | 'md' | 'lg';
14
10
  /**
15
- * Visual style variant supporting Versaur color system
16
- * Core variants: primary (coral), secondary (sage), tertiary (mist), ghost (slate), neutral (light gray)
17
- * Semantic variants: success, info, warning, danger
18
- * Each variant supports outline form for flexible design expression
11
+ * Label text to display above the chip group (rendered as legend)
19
12
  */
20
- variant?: 'primary' | 'secondary' | 'tertiary' | 'ghost';
13
+ label?: ReactNode;
21
14
  /**
22
- * Label text to display above the chip group
15
+ * Whether the field is required (displays asterisk in legend)
23
16
  */
24
- label?: ReactNode;
17
+ required?: boolean;
25
18
  /**
26
19
  * Helper text to display below the chip group
27
20
  */
@@ -43,6 +36,14 @@ export interface ChipSingleInputProps extends Omit<InputHTMLAttributes<HTMLInput
43
36
  * Callback when value changes
44
37
  */
45
38
  onChange?: (value: string) => void;
39
+ /**
40
+ * Whether the chip group is read-only
41
+ */
42
+ readOnly?: boolean;
43
+ /**
44
+ * Maximum width for individual chips (enables text truncation)
45
+ */
46
+ maxWidth?: string;
46
47
  }
47
48
  /**
48
49
  * Props for the ChipSingleInput.Option component
@@ -18,4 +18,14 @@ export interface DateSinglePickerInputProps extends Omit<TextInputProps, 'type'
18
18
  * @returns formatted string for display
19
19
  */
20
20
  formatter?: (value: string) => string;
21
+ /**
22
+ * Minimum date allowed (ISO date string: YYYY-MM-DD)
23
+ * Uses native HTML validation
24
+ */
25
+ min?: string;
26
+ /**
27
+ * Maximum date allowed (ISO date string: YYYY-MM-DD)
28
+ * Uses native HTML validation
29
+ */
30
+ max?: string;
21
31
  }
@@ -7,8 +7,6 @@ export * from './pin-field';
7
7
  export * from './price-input';
8
8
  export * from './radio-input';
9
9
  export * from './search-input';
10
- export * from './segment-single-input';
11
- export * from './segment-multiple-input';
12
10
  export * from './select-input';
13
11
  export * from './selectable-single-input';
14
12
  export * from './selectable-multiple-input';
@@ -3,7 +3,7 @@ import { PinFieldProps } from './types';
3
3
  /**
4
4
  * PinField component for Versaur UI
5
5
  *
6
- * Provides a 6-digit PIN input field with automatic focus management
7
- * Ensures only numeric input and follows accessibility best practices
6
+ * A fully controlled PIN input field with configurable digit length
7
+ * Ensures only numeric input with automatic focus management
8
8
  */
9
9
  export declare const PinField: React.ForwardRefExoticComponent<PinFieldProps & React.RefAttributes<HTMLDivElement>>;
@@ -3,13 +3,6 @@ import { ReactNode } from 'react';
3
3
  * Props for the PinField component
4
4
  */
5
5
  export interface PinFieldProps {
6
- /**
7
- * Visual style variant supporting Versaur color system
8
- * Core variants: primary (coral), secondary (sage), tertiary (mist), ghost (slate), neutral (light gray)
9
- * Semantic variants: success, info, warning, danger
10
- * Each variant supports outline form for flexible design expression
11
- */
12
- variant?: 'primary' | 'primary-outline' | 'secondary' | 'secondary-outline' | 'tertiary' | 'tertiary-outline' | 'ghost' | 'ghost-outline' | 'neutral' | 'neutral-outline' | 'success' | 'success-outline' | 'info' | 'info-outline' | 'warning' | 'warning-outline' | 'danger' | 'danger-outline';
13
6
  /**
14
7
  * Label text to display above the pin field
15
8
  */
@@ -27,45 +20,41 @@ export interface PinFieldProps {
27
20
  */
28
21
  disabled?: boolean;
29
22
  /**
30
- * Current value of the pin field (6 digits)
23
+ * Current value of the pin field (controlled)
31
24
  */
32
- value?: string;
33
- /**
34
- * Default value for uncontrolled usage
35
- */
36
- defaultValue?: string;
25
+ value: string;
37
26
  /**
38
27
  * Callback fired when the pin value changes
39
28
  */
40
- onChange?: (value: string) => void;
29
+ onChange: (value: string) => void;
41
30
  /**
42
- * Callback fired when the pin field is completed (all 6 digits entered)
31
+ * Callback fired when the pin field is completed (all digits entered)
43
32
  */
44
33
  onComplete?: (value: string) => void;
45
34
  /**
46
- * Whether to automatically submit when complete
35
+ * Number of digits for the PIN (default: 6)
47
36
  */
48
- autoSubmit?: boolean;
37
+ digits?: number;
49
38
  /**
50
- * Custom className for styling
39
+ * Whether the pin field is required
51
40
  */
52
- className?: string;
41
+ required?: boolean;
53
42
  /**
54
- * ID for the pin field group
43
+ * Whether to show the pin values as dots for security
55
44
  */
56
- id?: string;
45
+ secure?: boolean;
57
46
  /**
58
- * Name attribute for form submission
47
+ * Additional CSS classes
59
48
  */
60
- name?: string;
49
+ className?: string;
61
50
  /**
62
- * Whether the pin field is required
51
+ * ID attribute for the field
63
52
  */
64
- required?: boolean;
53
+ id?: string;
65
54
  /**
66
- * Whether to show the pin values as dots/asterisks for security
55
+ * Name attribute for form submission
67
56
  */
68
- secure?: boolean;
57
+ name?: string;
69
58
  }
70
59
  /**
71
60
  * Props for individual pin input
@@ -78,7 +67,6 @@ export interface PinInputProps {
78
67
  onPaste: (e: React.ClipboardEvent<HTMLInputElement>) => void;
79
68
  disabled?: boolean;
80
69
  error?: boolean;
81
- variant: PinFieldProps['variant'];
82
70
  secure?: boolean;
83
71
  inputRef: (el: HTMLInputElement | null) => void;
84
72
  index: number;
@@ -1,2 +1,2 @@
1
1
  export { SelectInput } from './select-input';
2
- export type { SelectInputProps } from './types';
2
+ export type { SelectInputProps, SelectOptionProps, SelectOptionGroupProps, } from './types';
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { SelectOptionProps, SelectOptionGroupProps } from './types';
3
+ /**
4
+ * SelectOption component - an atom for SelectInput
5
+ *
6
+ * Wraps native HTML option element with proper typing
7
+ * Part of the SelectInput compound pattern
8
+ */
9
+ export declare const SelectOption: React.ForwardRefExoticComponent<SelectOptionProps & React.RefAttributes<HTMLOptionElement>>;
10
+ /**
11
+ * SelectOptionGroup component - an atom for SelectInput
12
+ *
13
+ * Wraps native HTML optgroup element with proper typing
14
+ * Part of the SelectInput compound pattern
15
+ */
16
+ export declare const SelectOptionGroup: React.ForwardRefExoticComponent<SelectOptionGroupProps & React.RefAttributes<HTMLOptGroupElement>>;
@@ -1,9 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { SelectInputProps } from './types';
3
- /**
4
- * SelectInput component for Versaur UI
5
- *
6
- * Provides a styled select dropdown with semantic color, variant, error, and disabled support
7
- * Follows browser standards and accessibility best practices
8
- */
9
- export declare const SelectInput: React.ForwardRefExoticComponent<SelectInputProps & React.RefAttributes<HTMLSelectElement>>;
3
+ export declare const SelectInput: React.ForwardRefExoticComponent<SelectInputProps & React.RefAttributes<HTMLSelectElement>> & {
4
+ Option: React.ForwardRefExoticComponent<import('./types').SelectOptionProps & React.RefAttributes<HTMLOptionElement>>;
5
+ OptionGroup: React.ForwardRefExoticComponent<import('./types').SelectOptionGroupProps & React.RefAttributes<HTMLOptGroupElement>>;
6
+ };
@@ -1,19 +1,12 @@
1
- import { SelectHTMLAttributes, ReactNode } from 'react';
1
+ import { SelectHTMLAttributes, OptionHTMLAttributes, ReactNode } from 'react';
2
2
  /**
3
3
  * Props for the SelectInput component
4
4
  */
5
5
  export interface SelectInputProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
6
- /**
7
- * Visual style variant supporting Versaur color system
8
- * Core variants: primary (coral), secondary (sage), tertiary (mist), ghost (slate), neutral (light gray)
9
- * Semantic variants: success, info, warning, danger
10
- * Each variant supports outline form for flexible design expression
11
- */
12
- variant?: 'primary' | 'primary-outline' | 'secondary' | 'secondary-outline' | 'tertiary' | 'tertiary-outline' | 'ghost' | 'ghost-outline' | 'neutral' | 'neutral-outline' | 'success' | 'success-outline' | 'info' | 'info-outline' | 'warning' | 'warning-outline' | 'danger' | 'danger-outline';
13
6
  /**
14
7
  * Label text to display above the select
15
8
  */
16
- label: ReactNode;
9
+ label?: ReactNode;
17
10
  /**
18
11
  * Helper text to display below the select
19
12
  */
@@ -26,4 +19,34 @@ export interface SelectInputProps extends Omit<SelectHTMLAttributes<HTMLSelectEl
26
19
  * Placeholder text for when no option is selected
27
20
  */
28
21
  placeholder?: string;
22
+ /**
23
+ * Whether the select is read-only
24
+ */
25
+ readOnly?: boolean;
26
+ }
27
+ /**
28
+ * Props for the SelectOption component
29
+ */
30
+ export interface SelectOptionProps extends OptionHTMLAttributes<HTMLOptionElement> {
31
+ /**
32
+ * Option value (required)
33
+ */
34
+ value: string;
35
+ /**
36
+ * Option label/content (required)
37
+ */
38
+ children: ReactNode;
39
+ }
40
+ /**
41
+ * Props for the SelectOptionGroup component
42
+ */
43
+ export interface SelectOptionGroupProps extends React.OptgroupHTMLAttributes<HTMLOptGroupElement> {
44
+ /**
45
+ * Group label (required)
46
+ */
47
+ label: string;
48
+ /**
49
+ * Options within the group (required)
50
+ */
51
+ children: ReactNode;
29
52
  }
@@ -1,6 +1,6 @@
1
1
  import { SelectableMultipleInputProps } from './types';
2
2
  /**
3
- * SelectableMultipleInput is a checkbox input with a custom label and checked icon
3
+ * SelectableMultipleInput is a checkbox input with custom content and optional checkbox indicator
4
4
  * @see https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/
5
5
  */
6
6
  export declare const SelectableMultipleInput: import('react').ForwardRefExoticComponent<SelectableMultipleInputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,18 +1,35 @@
1
1
  import { ReactNode, InputHTMLAttributes } from 'react';
2
+ /**
3
+ * Checkbox placement position
4
+ */
5
+ type CheckboxPlacement = 'top' | 'center' | 'bottom';
2
6
  /**
3
7
  * Props for SelectableMultipleInput
4
8
  */
5
- export interface SelectableMultipleInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
9
+ export interface SelectableMultipleInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'children'> {
6
10
  /**
7
11
  * The value of the checkbox input
8
12
  */
9
13
  value: string;
10
14
  /**
11
- * The label to display next to the checkbox input (can be any ReactNode)
15
+ * The content to display next to the checkbox input
16
+ * Can be a ReactNode or a function that receives the checked state
12
17
  */
13
- label: ReactNode;
18
+ children: ReactNode | ((checked: boolean) => ReactNode);
14
19
  /**
15
20
  * Whether the input is checked (controlled)
16
21
  */
17
22
  checked: boolean;
23
+ /**
24
+ * The placement of the checkbox relative to the content
25
+ * @default 'center'
26
+ */
27
+ checkboxPlacement?: CheckboxPlacement;
28
+ /**
29
+ * Whether to hide the checkbox
30
+ * When true, only the content is displayed and the checked state is managed externally
31
+ * @default false
32
+ */
33
+ hideCheckbox?: boolean;
18
34
  }
35
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { SelectableSingleInputProps } from './types';
2
2
  /**
3
- * SelectableSingleInput is a radio input with a custom label and checked icon
3
+ * SelectableSingleInput is a radio input with custom content and optional checkbox indicator
4
4
  * @see https://www.w3.org/WAI/ARIA/apg/patterns/radio/
5
5
  */
6
6
  export declare const SelectableSingleInput: import('react').ForwardRefExoticComponent<SelectableSingleInputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,18 +1,35 @@
1
1
  import { ReactNode, InputHTMLAttributes } from 'react';
2
+ /**
3
+ * Checkbox placement position
4
+ */
5
+ type CheckboxPlacement = 'top' | 'center' | 'bottom';
2
6
  /**
3
7
  * Props for SelectableSingleInput
4
8
  */
5
- export interface SelectableSingleInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
9
+ export interface SelectableSingleInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'children'> {
6
10
  /**
7
11
  * The value of the radio input
8
12
  */
9
13
  value: string;
10
14
  /**
11
- * The label to display next to the radio input (can be any ReactNode)
15
+ * The content to display next to the radio input
16
+ * Can be a ReactNode or a function that receives the checked state
12
17
  */
13
- label: ReactNode;
18
+ children: ReactNode | ((checked: boolean) => ReactNode);
14
19
  /**
15
20
  * Whether the input is checked (controlled)
16
21
  */
17
22
  checked: boolean;
23
+ /**
24
+ * The placement of the checkbox relative to the content
25
+ * @default 'center'
26
+ */
27
+ checkboxPlacement?: CheckboxPlacement;
28
+ /**
29
+ * Whether to hide the checkbox
30
+ * When true, only the content is displayed and the checked state is managed externally
31
+ * @default false
32
+ */
33
+ hideCheckbox?: boolean;
18
34
  }
35
+ export {};
@@ -1,28 +1,27 @@
1
1
  import { default as React } from 'react';
2
- import { SwitchInputProps } from './types';
3
2
  /**
4
3
  * Track for SwitchInput
5
- * Renders the background track with color, size, and disabled state
4
+ * Renders the background track with disabled and checked state
6
5
  */
7
- export declare const SwitchTrack: React.FC<Pick<SwitchInputProps, 'color' | 'size' | 'disabled'> & {
8
- className?: string;
6
+ export declare const SwitchTrack: React.FC<{
7
+ disabled?: boolean;
9
8
  checked?: boolean;
9
+ className?: string;
10
10
  }>;
11
11
  /**
12
12
  * Thumb for SwitchInput
13
- * Renders the thumb with size and checked state
13
+ * Renders the thumb with checked state
14
14
  */
15
15
  export declare const SwitchThumb: React.FC<{
16
- size?: 'sm' | 'md' | 'lg';
17
16
  checked?: boolean;
18
17
  }>;
19
18
  /**
20
19
  * Label for SwitchInput
21
- * Renders the label with placement and disabled state
20
+ * Renders the label inline with required asterisk support
22
21
  */
23
22
  export declare const SwitchLabel: React.FC<{
24
23
  label?: string;
25
24
  htmlFor?: string;
26
- placement?: 'top' | 'inline';
27
25
  disabled?: boolean;
26
+ required?: boolean;
28
27
  }>;
@@ -1,6 +1,10 @@
1
1
  import { default as React } from 'react';
2
2
  import { SwitchInputProps } from './types';
3
3
  /**
4
- * SwitchInput component for toggling boolean state
4
+ * SwitchInput component for Versaur UI
5
+ *
6
+ * A controlled switch input component for boolean toggles that aligns with native HTML input element
7
+ * Follows browser standards and accessibility best practices with proper ARIA attributes
8
+ * Always uses inline label placement for consistent layout
5
9
  */
6
10
  export declare const SwitchInput: React.ForwardRefExoticComponent<SwitchInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,49 +1,26 @@
1
+ import { InputHTMLAttributes } from 'react';
1
2
  /**
2
3
  * Props for SwitchInput component
3
4
  */
4
- export interface SwitchInputProps {
5
+ export interface SwitchInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'value' | 'onChange' | 'size'> {
5
6
  /**
6
- * Controlled checked state
7
+ * Controlled value state (checked or unchecked)
7
8
  */
8
- checked?: boolean;
9
+ value?: boolean;
9
10
  /**
10
- * Uncontrolled default checked state
11
+ * Callback when value changes
11
12
  */
12
- defaultChecked?: boolean;
13
+ onChange?: (value: boolean) => void;
13
14
  /**
14
- * Callback when checked state changes
15
- */
16
- onCheckedChange?: (checked: boolean) => void;
17
- /**
18
- * Color variant (primary, secondary, etc.)
19
- */
20
- color?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'neutral' | 'success' | 'info' | 'warning' | 'danger';
21
- /**
22
- * Size variant
23
- */
24
- size?: 'sm' | 'md' | 'lg';
25
- /**
26
- * Label text
15
+ * Label text displayed inline with the switch
27
16
  */
28
17
  label?: string;
29
18
  /**
30
- * Label placement: top (default) or inline
31
- */
32
- labelPlacement?: 'top' | 'inline';
33
- /**
34
- * Disabled state
35
- */
36
- disabled?: boolean;
37
- /**
38
- * Additional className for root
39
- */
40
- className?: string;
41
- /**
42
- * id for input (for accessibility)
19
+ * Whether the field is required
43
20
  */
44
- id?: string;
21
+ required?: boolean;
45
22
  /**
46
- * aria-label for accessibility
23
+ * aria-label for accessibility when no label is provided
47
24
  */
48
25
  ariaLabel?: string;
49
26
  }
@@ -3,7 +3,7 @@ import { TextInputProps } from './types';
3
3
  /**
4
4
  * TextInput component for Versaur UI
5
5
  *
6
- * Provides a styled input field with semantic color, variant, error, and disabled support
7
- * Follows browser standards and accessibility best practices
6
+ * A simple, accessible text input that aligns with native HTML input element
7
+ * Follows browser standards and accessibility best practices with proper ARIA attributes
8
8
  */
9
9
  export declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -3,13 +3,6 @@ import { InputHTMLAttributes, ReactNode } from 'react';
3
3
  * Props for the TextInput component
4
4
  */
5
5
  export interface TextInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
6
- /**
7
- * Visual style variant supporting Versaur color system
8
- * Core variants: primary (coral), secondary (sage), tertiary (mist), ghost (slate), neutral (light gray)
9
- * Semantic variants: success, info, warning, danger
10
- * Each variant supports outline form for flexible design expression
11
- */
12
- variant?: 'primary' | 'primary-outline' | 'secondary' | 'secondary-outline' | 'tertiary' | 'tertiary-outline' | 'ghost' | 'ghost-outline' | 'neutral' | 'neutral-outline' | 'success' | 'success-outline' | 'info' | 'info-outline' | 'warning' | 'warning-outline' | 'danger' | 'danger-outline';
13
6
  /**
14
7
  * Label text to display above the input
15
8
  */