zenput 1.0.0

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 (148) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +271 -0
  3. package/dist/cjs/index.js +1126 -0
  4. package/dist/cjs/index.js.map +1 -0
  5. package/dist/cjs/types/components/AutoComplete/AutoComplete.d.ts +3 -0
  6. package/dist/cjs/types/components/AutoComplete/AutoComplete.types.d.ts +27 -0
  7. package/dist/cjs/types/components/AutoComplete/index.d.ts +2 -0
  8. package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +3 -0
  9. package/dist/cjs/types/components/Checkbox/Checkbox.types.d.ts +6 -0
  10. package/dist/cjs/types/components/Checkbox/index.d.ts +2 -0
  11. package/dist/cjs/types/components/CheckboxGroup/CheckboxGroup.d.ts +3 -0
  12. package/dist/cjs/types/components/CheckboxGroup/CheckboxGroup.types.d.ts +20 -0
  13. package/dist/cjs/types/components/CheckboxGroup/index.d.ts +2 -0
  14. package/dist/cjs/types/components/ColorInput/ColorInput.d.ts +3 -0
  15. package/dist/cjs/types/components/ColorInput/ColorInput.types.d.ts +6 -0
  16. package/dist/cjs/types/components/ColorInput/index.d.ts +2 -0
  17. package/dist/cjs/types/components/DataTable/DataTable.d.ts +5 -0
  18. package/dist/cjs/types/components/DataTable/DataTable.types.d.ts +31 -0
  19. package/dist/cjs/types/components/DataTable/index.d.ts +2 -0
  20. package/dist/cjs/types/components/DateInput/DateInput.d.ts +3 -0
  21. package/dist/cjs/types/components/DateInput/DateInput.types.d.ts +8 -0
  22. package/dist/cjs/types/components/DateInput/index.d.ts +2 -0
  23. package/dist/cjs/types/components/FileInput/FileInput.d.ts +3 -0
  24. package/dist/cjs/types/components/FileInput/FileInput.types.d.ts +10 -0
  25. package/dist/cjs/types/components/FileInput/index.d.ts +2 -0
  26. package/dist/cjs/types/components/NumberInput/NumberInput.d.ts +3 -0
  27. package/dist/cjs/types/components/NumberInput/NumberInput.types.d.ts +18 -0
  28. package/dist/cjs/types/components/NumberInput/index.d.ts +2 -0
  29. package/dist/cjs/types/components/OTPInput/OTPInput.d.ts +3 -0
  30. package/dist/cjs/types/components/OTPInput/OTPInput.types.d.ts +20 -0
  31. package/dist/cjs/types/components/OTPInput/index.d.ts +2 -0
  32. package/dist/cjs/types/components/PasswordInput/PasswordInput.d.ts +3 -0
  33. package/dist/cjs/types/components/PasswordInput/PasswordInput.types.d.ts +10 -0
  34. package/dist/cjs/types/components/PasswordInput/index.d.ts +2 -0
  35. package/dist/cjs/types/components/PhoneInput/PhoneInput.d.ts +3 -0
  36. package/dist/cjs/types/components/PhoneInput/PhoneInput.types.d.ts +20 -0
  37. package/dist/cjs/types/components/PhoneInput/index.d.ts +2 -0
  38. package/dist/cjs/types/components/RadioGroup/RadioGroup.d.ts +3 -0
  39. package/dist/cjs/types/components/RadioGroup/RadioGroup.types.d.ts +22 -0
  40. package/dist/cjs/types/components/RadioGroup/index.d.ts +2 -0
  41. package/dist/cjs/types/components/RangeInput/RangeInput.d.ts +3 -0
  42. package/dist/cjs/types/components/RangeInput/RangeInput.types.d.ts +14 -0
  43. package/dist/cjs/types/components/RangeInput/index.d.ts +2 -0
  44. package/dist/cjs/types/components/SearchInput/SearchInput.d.ts +3 -0
  45. package/dist/cjs/types/components/SearchInput/SearchInput.types.d.ts +10 -0
  46. package/dist/cjs/types/components/SearchInput/index.d.ts +2 -0
  47. package/dist/cjs/types/components/SelectInput/SelectInput.d.ts +3 -0
  48. package/dist/cjs/types/components/SelectInput/SelectInput.types.d.ts +13 -0
  49. package/dist/cjs/types/components/SelectInput/index.d.ts +2 -0
  50. package/dist/cjs/types/components/TextArea/TextArea.d.ts +3 -0
  51. package/dist/cjs/types/components/TextArea/TextArea.types.d.ts +8 -0
  52. package/dist/cjs/types/components/TextArea/index.d.ts +2 -0
  53. package/dist/cjs/types/components/TextInput/TextInput.d.ts +3 -0
  54. package/dist/cjs/types/components/TextInput/TextInput.types.d.ts +4 -0
  55. package/dist/cjs/types/components/TextInput/index.d.ts +2 -0
  56. package/dist/cjs/types/components/TimeInput/TimeInput.d.ts +3 -0
  57. package/dist/cjs/types/components/TimeInput/TimeInput.types.d.ts +8 -0
  58. package/dist/cjs/types/components/TimeInput/index.d.ts +2 -0
  59. package/dist/cjs/types/components/Toggle/Toggle.d.ts +3 -0
  60. package/dist/cjs/types/components/Toggle/Toggle.types.d.ts +6 -0
  61. package/dist/cjs/types/components/Toggle/index.d.ts +2 -0
  62. package/dist/cjs/types/components/index.d.ts +19 -0
  63. package/dist/cjs/types/context/ThemeProvider.d.ts +27 -0
  64. package/dist/cjs/types/context/index.d.ts +1 -0
  65. package/dist/cjs/types/hooks/index.d.ts +2 -0
  66. package/dist/cjs/types/hooks/useControllable.d.ts +7 -0
  67. package/dist/cjs/types/hooks/useFormField.d.ts +25 -0
  68. package/dist/cjs/types/index.d.ts +4 -0
  69. package/dist/cjs/types/types/common.d.ts +52 -0
  70. package/dist/cjs/types/types/index.d.ts +1 -0
  71. package/dist/cjs/types/utils/classNames.d.ts +3 -0
  72. package/dist/cjs/types/utils/constants.d.ts +9 -0
  73. package/dist/cjs/types/utils/index.d.ts +3 -0
  74. package/dist/cjs/types/utils/validation.d.ts +23 -0
  75. package/dist/esm/index.js +1102 -0
  76. package/dist/esm/index.js.map +1 -0
  77. package/dist/esm/types/components/AutoComplete/AutoComplete.d.ts +3 -0
  78. package/dist/esm/types/components/AutoComplete/AutoComplete.types.d.ts +27 -0
  79. package/dist/esm/types/components/AutoComplete/index.d.ts +2 -0
  80. package/dist/esm/types/components/Checkbox/Checkbox.d.ts +3 -0
  81. package/dist/esm/types/components/Checkbox/Checkbox.types.d.ts +6 -0
  82. package/dist/esm/types/components/Checkbox/index.d.ts +2 -0
  83. package/dist/esm/types/components/CheckboxGroup/CheckboxGroup.d.ts +3 -0
  84. package/dist/esm/types/components/CheckboxGroup/CheckboxGroup.types.d.ts +20 -0
  85. package/dist/esm/types/components/CheckboxGroup/index.d.ts +2 -0
  86. package/dist/esm/types/components/ColorInput/ColorInput.d.ts +3 -0
  87. package/dist/esm/types/components/ColorInput/ColorInput.types.d.ts +6 -0
  88. package/dist/esm/types/components/ColorInput/index.d.ts +2 -0
  89. package/dist/esm/types/components/DataTable/DataTable.d.ts +5 -0
  90. package/dist/esm/types/components/DataTable/DataTable.types.d.ts +31 -0
  91. package/dist/esm/types/components/DataTable/index.d.ts +2 -0
  92. package/dist/esm/types/components/DateInput/DateInput.d.ts +3 -0
  93. package/dist/esm/types/components/DateInput/DateInput.types.d.ts +8 -0
  94. package/dist/esm/types/components/DateInput/index.d.ts +2 -0
  95. package/dist/esm/types/components/FileInput/FileInput.d.ts +3 -0
  96. package/dist/esm/types/components/FileInput/FileInput.types.d.ts +10 -0
  97. package/dist/esm/types/components/FileInput/index.d.ts +2 -0
  98. package/dist/esm/types/components/NumberInput/NumberInput.d.ts +3 -0
  99. package/dist/esm/types/components/NumberInput/NumberInput.types.d.ts +18 -0
  100. package/dist/esm/types/components/NumberInput/index.d.ts +2 -0
  101. package/dist/esm/types/components/OTPInput/OTPInput.d.ts +3 -0
  102. package/dist/esm/types/components/OTPInput/OTPInput.types.d.ts +20 -0
  103. package/dist/esm/types/components/OTPInput/index.d.ts +2 -0
  104. package/dist/esm/types/components/PasswordInput/PasswordInput.d.ts +3 -0
  105. package/dist/esm/types/components/PasswordInput/PasswordInput.types.d.ts +10 -0
  106. package/dist/esm/types/components/PasswordInput/index.d.ts +2 -0
  107. package/dist/esm/types/components/PhoneInput/PhoneInput.d.ts +3 -0
  108. package/dist/esm/types/components/PhoneInput/PhoneInput.types.d.ts +20 -0
  109. package/dist/esm/types/components/PhoneInput/index.d.ts +2 -0
  110. package/dist/esm/types/components/RadioGroup/RadioGroup.d.ts +3 -0
  111. package/dist/esm/types/components/RadioGroup/RadioGroup.types.d.ts +22 -0
  112. package/dist/esm/types/components/RadioGroup/index.d.ts +2 -0
  113. package/dist/esm/types/components/RangeInput/RangeInput.d.ts +3 -0
  114. package/dist/esm/types/components/RangeInput/RangeInput.types.d.ts +14 -0
  115. package/dist/esm/types/components/RangeInput/index.d.ts +2 -0
  116. package/dist/esm/types/components/SearchInput/SearchInput.d.ts +3 -0
  117. package/dist/esm/types/components/SearchInput/SearchInput.types.d.ts +10 -0
  118. package/dist/esm/types/components/SearchInput/index.d.ts +2 -0
  119. package/dist/esm/types/components/SelectInput/SelectInput.d.ts +3 -0
  120. package/dist/esm/types/components/SelectInput/SelectInput.types.d.ts +13 -0
  121. package/dist/esm/types/components/SelectInput/index.d.ts +2 -0
  122. package/dist/esm/types/components/TextArea/TextArea.d.ts +3 -0
  123. package/dist/esm/types/components/TextArea/TextArea.types.d.ts +8 -0
  124. package/dist/esm/types/components/TextArea/index.d.ts +2 -0
  125. package/dist/esm/types/components/TextInput/TextInput.d.ts +3 -0
  126. package/dist/esm/types/components/TextInput/TextInput.types.d.ts +4 -0
  127. package/dist/esm/types/components/TextInput/index.d.ts +2 -0
  128. package/dist/esm/types/components/TimeInput/TimeInput.d.ts +3 -0
  129. package/dist/esm/types/components/TimeInput/TimeInput.types.d.ts +8 -0
  130. package/dist/esm/types/components/TimeInput/index.d.ts +2 -0
  131. package/dist/esm/types/components/Toggle/Toggle.d.ts +3 -0
  132. package/dist/esm/types/components/Toggle/Toggle.types.d.ts +6 -0
  133. package/dist/esm/types/components/Toggle/index.d.ts +2 -0
  134. package/dist/esm/types/components/index.d.ts +19 -0
  135. package/dist/esm/types/context/ThemeProvider.d.ts +27 -0
  136. package/dist/esm/types/context/index.d.ts +1 -0
  137. package/dist/esm/types/hooks/index.d.ts +2 -0
  138. package/dist/esm/types/hooks/useControllable.d.ts +7 -0
  139. package/dist/esm/types/hooks/useFormField.d.ts +25 -0
  140. package/dist/esm/types/index.d.ts +4 -0
  141. package/dist/esm/types/types/common.d.ts +52 -0
  142. package/dist/esm/types/types/index.d.ts +1 -0
  143. package/dist/esm/types/utils/classNames.d.ts +3 -0
  144. package/dist/esm/types/utils/constants.d.ts +9 -0
  145. package/dist/esm/types/utils/index.d.ts +3 -0
  146. package/dist/esm/types/utils/validation.d.ts +23 -0
  147. package/dist/index.d.ts +401 -0
  148. package/package.json +69 -0
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { BaseInputProps } from '../../types';
3
+ export interface FileInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>, BaseInputProps {
4
+ /** Button label text */
5
+ buttonLabel?: string;
6
+ /** Show selected file names */
7
+ showFileNames?: boolean;
8
+ /** Allow drag-and-drop */
9
+ dropzone?: boolean;
10
+ }
@@ -0,0 +1,2 @@
1
+ export * from './FileInput';
2
+ export * from './FileInput.types';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { NumberInputProps } from './NumberInput.types';
3
+ export declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { BaseInputProps } from '../../types';
3
+ export interface NumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'onChange'>, BaseInputProps {
4
+ /** Current value */
5
+ value?: number;
6
+ /** Default value */
7
+ defaultValue?: number;
8
+ /** Minimum value */
9
+ min?: number;
10
+ /** Maximum value */
11
+ max?: number;
12
+ /** Step increment */
13
+ step?: number;
14
+ /** Hide the increment/decrement buttons */
15
+ hideControls?: boolean;
16
+ /** Called when the value changes */
17
+ onChange?: (value: number | undefined) => void;
18
+ }
@@ -0,0 +1,2 @@
1
+ export * from './NumberInput';
2
+ export * from './NumberInput.types';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { OTPInputProps } from './OTPInput.types';
3
+ export declare const OTPInput: React.ForwardRefExoticComponent<OTPInputProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,20 @@
1
+ import { BaseInputProps } from '../../types';
2
+ export type OTPInputType = 'numeric' | 'alphanumeric';
3
+ export interface OTPInputProps extends Pick<BaseInputProps, 'size' | 'validationState' | 'label' | 'helperText' | 'errorMessage' | 'required' | 'disabled' | 'wrapperClassName' | 'wrapperStyle' | 'labelClassName' | 'labelStyle' | 'helperTextClassName' | 'helperTextStyle'> {
4
+ /** Number of OTP digits */
5
+ length?: number;
6
+ /** Current value */
7
+ value?: string;
8
+ /** Default value */
9
+ defaultValue?: string;
10
+ /** Called when the OTP value changes */
11
+ onChange?: (value: string) => void;
12
+ /** Called when all digits are filled */
13
+ onComplete?: (value: string) => void;
14
+ /** Input type restriction */
15
+ inputType?: OTPInputType;
16
+ /** Mask the input like a password */
17
+ mask?: boolean;
18
+ /** id prefix */
19
+ id?: string;
20
+ }
@@ -0,0 +1,2 @@
1
+ export * from './OTPInput';
2
+ export * from './OTPInput.types';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { PasswordInputProps } from './PasswordInput.types';
3
+ export declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { BaseInputProps } from '../../types';
3
+ export interface PasswordInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>, BaseInputProps {
4
+ /** Show a password strength indicator */
5
+ showStrengthIndicator?: boolean;
6
+ /** Custom toggle visibility icon when password is visible */
7
+ showIcon?: React.ReactNode;
8
+ /** Custom toggle visibility icon when password is hidden */
9
+ hideIcon?: React.ReactNode;
10
+ }
@@ -0,0 +1,2 @@
1
+ export * from './PasswordInput';
2
+ export * from './PasswordInput.types';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { PhoneInputProps } from './PhoneInput.types';
3
+ export declare const PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { BaseInputProps } from '../../types';
3
+ export interface CountryCode {
4
+ code: string;
5
+ dialCode: string;
6
+ flag: string;
7
+ name: string;
8
+ }
9
+ export interface PhoneInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'onChange'>, BaseInputProps {
10
+ /** Selected dial code (e.g. "+1") */
11
+ dialCode?: string;
12
+ /** Default dial code */
13
+ defaultDialCode?: string;
14
+ /** List of country codes to show */
15
+ countries?: CountryCode[];
16
+ /** Called when the full phone value changes */
17
+ onChange?: (phoneNumber: string, dialCode: string) => void;
18
+ /** Current phone number value (without dial code) */
19
+ phoneValue?: string;
20
+ }
@@ -0,0 +1,2 @@
1
+ export * from './PhoneInput';
2
+ export * from './PhoneInput.types';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { RadioGroupProps } from './RadioGroup.types';
3
+ export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,22 @@
1
+ import { BaseInputProps } from '../../types';
2
+ export interface RadioOption {
3
+ value: string;
4
+ label: string;
5
+ disabled?: boolean;
6
+ }
7
+ export interface RadioGroupProps extends Pick<BaseInputProps, 'size' | 'validationState' | 'label' | 'helperText' | 'errorMessage' | 'required' | 'disabled' | 'wrapperClassName' | 'wrapperStyle' | 'labelClassName' | 'labelStyle' | 'helperTextClassName' | 'helperTextStyle'> {
8
+ /** Name attribute for radio inputs */
9
+ name: string;
10
+ /** List of radio options */
11
+ options: RadioOption[];
12
+ /** Currently selected value (controlled) */
13
+ value?: string;
14
+ /** Default selected value (uncontrolled) */
15
+ defaultValue?: string;
16
+ /** Called when selection changes */
17
+ onChange?: (value: string) => void;
18
+ /** Layout direction */
19
+ direction?: 'horizontal' | 'vertical';
20
+ /** id for the group */
21
+ id?: string;
22
+ }
@@ -0,0 +1,2 @@
1
+ export * from './RadioGroup';
2
+ export * from './RadioGroup.types';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { RangeInputProps } from './RangeInput.types';
3
+ export declare const RangeInput: React.ForwardRefExoticComponent<RangeInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { BaseInputProps } from '../../types';
3
+ export interface RangeInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>, BaseInputProps {
4
+ /** Minimum value */
5
+ min?: number;
6
+ /** Maximum value */
7
+ max?: number;
8
+ /** Step increment */
9
+ step?: number;
10
+ /** Show the current numeric value */
11
+ showValue?: boolean;
12
+ /** Format the displayed value */
13
+ formatValue?: (value: number) => string;
14
+ }
@@ -0,0 +1,2 @@
1
+ export * from './RangeInput';
2
+ export * from './RangeInput.types';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SearchInputProps } from './SearchInput.types';
3
+ export declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { BaseInputProps } from '../../types';
3
+ export interface SearchInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>, BaseInputProps {
4
+ /** Called when the user submits the search (Enter key or search button click) */
5
+ onSearch?: (value: string) => void;
6
+ /** Show a clear button when there is a value */
7
+ showClearButton?: boolean;
8
+ /** Whether to show a search icon */
9
+ showSearchIcon?: boolean;
10
+ }
@@ -0,0 +1,2 @@
1
+ export * from './SearchInput';
2
+ export * from './SearchInput.types';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SelectInputProps } from './SelectInput.types';
3
+ export declare const SelectInput: React.ForwardRefExoticComponent<SelectInputProps & React.RefAttributes<HTMLSelectElement>>;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { BaseInputProps } from '../../types';
3
+ export interface SelectOption {
4
+ value: string;
5
+ label: string;
6
+ disabled?: boolean;
7
+ }
8
+ export interface SelectInputProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'>, BaseInputProps {
9
+ /** List of options */
10
+ options: SelectOption[];
11
+ /** Placeholder text shown as first disabled option */
12
+ placeholder?: string;
13
+ }
@@ -0,0 +1,2 @@
1
+ export * from './SelectInput';
2
+ export * from './SelectInput.types';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { TextAreaProps } from './TextArea.types';
3
+ export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { BaseInputProps } from '../../types';
3
+ export interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>, BaseInputProps {
4
+ /** Auto resize to fit content */
5
+ autoResize?: boolean;
6
+ /** Show character count */
7
+ showCharCount?: boolean;
8
+ }
@@ -0,0 +1,2 @@
1
+ export * from './TextArea';
2
+ export * from './TextArea.types';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { TextInputProps } from './TextInput.types';
3
+ export declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { BaseInputProps } from '../../types';
3
+ export interface TextInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, BaseInputProps {
4
+ }
@@ -0,0 +1,2 @@
1
+ export * from './TextInput';
2
+ export * from './TextInput.types';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { TimeInputProps } from './TimeInput.types';
3
+ export declare const TimeInput: React.ForwardRefExoticComponent<TimeInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { BaseInputProps } from '../../types';
3
+ export interface TimeInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>, BaseInputProps {
4
+ /** Minimum time (HH:mm) */
5
+ min?: string;
6
+ /** Maximum time (HH:mm) */
7
+ max?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ export * from './TimeInput';
2
+ export * from './TimeInput.types';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { ToggleProps } from './Toggle.types';
3
+ export declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { BaseInputProps } from '../../types';
3
+ export interface ToggleProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>, Pick<BaseInputProps, 'size' | 'validationState' | 'label' | 'helperText' | 'errorMessage' | 'required' | 'disabled' | 'wrapperClassName' | 'wrapperStyle' | 'labelClassName' | 'labelStyle' | 'inputClassName' | 'inputStyle' | 'helperTextClassName' | 'helperTextStyle'> {
4
+ /** Label position relative to the toggle */
5
+ labelPosition?: 'left' | 'right';
6
+ }
@@ -0,0 +1,2 @@
1
+ export * from './Toggle';
2
+ export * from './Toggle.types';
@@ -0,0 +1,19 @@
1
+ export * from './TextInput';
2
+ export * from './TextArea';
3
+ export * from './NumberInput';
4
+ export * from './PasswordInput';
5
+ export * from './SelectInput';
6
+ export * from './Checkbox';
7
+ export * from './CheckboxGroup';
8
+ export * from './RadioGroup';
9
+ export * from './Toggle';
10
+ export * from './DateInput';
11
+ export * from './TimeInput';
12
+ export * from './FileInput';
13
+ export * from './RangeInput';
14
+ export * from './ColorInput';
15
+ export * from './SearchInput';
16
+ export * from './PhoneInput';
17
+ export * from './OTPInput';
18
+ export * from './AutoComplete';
19
+ export * from './DataTable';
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ export interface Theme {
3
+ primaryColor?: string;
4
+ errorColor?: string;
5
+ successColor?: string;
6
+ warningColor?: string;
7
+ borderRadius?: string;
8
+ fontFamily?: string;
9
+ fontSize?: string;
10
+ borderColor?: string;
11
+ bgColor?: string;
12
+ textColor?: string;
13
+ placeholderColor?: string;
14
+ focusRingColor?: string;
15
+ disabledBg?: string;
16
+ disabledText?: string;
17
+ }
18
+ interface ThemeContextValue {
19
+ theme: Theme;
20
+ }
21
+ interface ThemeProviderProps {
22
+ theme: Theme;
23
+ children: React.ReactNode;
24
+ }
25
+ export declare function ThemeProvider({ theme, children }: ThemeProviderProps): JSX.Element;
26
+ export declare function useTheme(): ThemeContextValue;
27
+ export {};
@@ -0,0 +1 @@
1
+ export * from './ThemeProvider';
@@ -0,0 +1,2 @@
1
+ export * from './useFormField';
2
+ export * from './useControllable';
@@ -0,0 +1,7 @@
1
+ type UseControllableOptions<T> = {
2
+ value?: T;
3
+ defaultValue?: T;
4
+ onChange?: (value: T) => void;
5
+ };
6
+ export declare function useControllable<T>({ value, defaultValue, onChange, }: UseControllableOptions<T>): [T | undefined, (newValue: T) => void];
7
+ export {};
@@ -0,0 +1,25 @@
1
+ import { ValidationState } from '../types';
2
+ interface UseFormFieldOptions {
3
+ id?: string;
4
+ label?: string;
5
+ helperText?: string;
6
+ errorMessage?: string;
7
+ validationState?: ValidationState;
8
+ required?: boolean;
9
+ disabled?: boolean;
10
+ }
11
+ interface UseFormFieldResult {
12
+ inputId: string;
13
+ helperId: string;
14
+ labelProps: {
15
+ htmlFor: string;
16
+ };
17
+ inputAriaProps: {
18
+ 'aria-describedby'?: string;
19
+ 'aria-invalid'?: boolean;
20
+ 'aria-required'?: boolean;
21
+ 'aria-disabled'?: boolean;
22
+ };
23
+ }
24
+ export declare function useFormField({ id, helperText, errorMessage, validationState, required, disabled, }: UseFormFieldOptions): UseFormFieldResult;
25
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './components';
2
+ export * from './types';
3
+ export * from './hooks';
4
+ export * from './context';
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ export type InputSize = 'sm' | 'md' | 'lg';
3
+ export type InputVariant = 'outlined' | 'filled' | 'underlined';
4
+ export type ValidationState = 'default' | 'error' | 'success' | 'warning';
5
+ export interface BaseInputProps {
6
+ /** Visual size of the input */
7
+ size?: InputSize;
8
+ /** Visual variant/style */
9
+ variant?: InputVariant;
10
+ /** Validation state */
11
+ validationState?: ValidationState;
12
+ /** Label text */
13
+ label?: string;
14
+ /** Helper text displayed below the input */
15
+ helperText?: string;
16
+ /** Error message (shown when validationState is 'error') */
17
+ errorMessage?: string;
18
+ /** Success message */
19
+ successMessage?: string;
20
+ /** Warning message */
21
+ warningMessage?: string;
22
+ /** Whether the field is required */
23
+ required?: boolean;
24
+ /** Whether the field is disabled */
25
+ disabled?: boolean;
26
+ /** Whether the field is read-only */
27
+ readOnly?: boolean;
28
+ /** Prefix icon/element */
29
+ prefixIcon?: React.ReactNode;
30
+ /** Suffix icon/element */
31
+ suffixIcon?: React.ReactNode;
32
+ /** Whether to show the label as floating */
33
+ floatingLabel?: boolean;
34
+ /** Full width mode */
35
+ fullWidth?: boolean;
36
+ /** Custom className for the wrapper element */
37
+ wrapperClassName?: string;
38
+ /** Custom style for the wrapper element */
39
+ wrapperStyle?: React.CSSProperties;
40
+ /** Custom className for the label element */
41
+ labelClassName?: string;
42
+ /** Custom style for the label element */
43
+ labelStyle?: React.CSSProperties;
44
+ /** Custom className for the input element */
45
+ inputClassName?: string;
46
+ /** Custom style for the input element */
47
+ inputStyle?: React.CSSProperties;
48
+ /** Custom className for the helper text element */
49
+ helperTextClassName?: string;
50
+ /** Custom style for the helper text element */
51
+ helperTextStyle?: React.CSSProperties;
52
+ }
@@ -0,0 +1 @@
1
+ export * from './common';
@@ -0,0 +1,3 @@
1
+ type ClassValue = string | undefined | null | false | Record<string, boolean>;
2
+ export declare function classNames(...args: ClassValue[]): string;
3
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Common constants used across the library
3
+ */
4
+ /** Delay before closing dropdown after blur to allow click events to fire (in milliseconds) */
5
+ export declare const DROPDOWN_BLUR_DELAY_MS = 150;
6
+ /** Default color for ColorInput component */
7
+ export declare const DEFAULT_COLOR = "#3b82f6";
8
+ /** Minimum password length for strength indicator */
9
+ export declare const MIN_PASSWORD_LENGTH = 8;
@@ -0,0 +1,3 @@
1
+ export * from './classNames';
2
+ export * from './validation';
3
+ export * from './constants';
@@ -0,0 +1,23 @@
1
+ import type { ValidationState } from '../types/common';
2
+ /**
3
+ * Gets the appropriate message based on validation state
4
+ * @param validationState - Current validation state
5
+ * @param errorMessage - Message to show in error state
6
+ * @param successMessage - Message to show in success state
7
+ * @param warningMessage - Message to show in warning state
8
+ * @param helperText - Default helper text
9
+ * @returns The active message to display
10
+ */
11
+ export declare function getValidationMessage(validationState?: ValidationState, errorMessage?: string, successMessage?: string, warningMessage?: string, helperText?: string): string | undefined;
12
+ /**
13
+ * Gets the CSS class name for validation message styling
14
+ * @param validationState - Current validation state
15
+ * @param styles - CSS modules styles object containing message class names
16
+ * @returns The appropriate CSS class name
17
+ */
18
+ export declare function getValidationMessageClass(validationState: ValidationState | undefined, styles: {
19
+ errorText?: string;
20
+ successText?: string;
21
+ warningText?: string;
22
+ helperText?: string;
23
+ }): string | undefined;