@algorithm-shift/design-system 1.2.32 → 1.2.33

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/index.d.mts CHANGED
@@ -23,10 +23,7 @@ type InputProperties = {
23
23
  name?: string;
24
24
  value?: string;
25
25
  placeholder?: string;
26
- regexPattern?: string;
27
26
  errorMessage?: string;
28
- noOfCharacters?: number;
29
- isRequired?: boolean;
30
27
  isEditable?: boolean;
31
28
  isDisabled?: boolean;
32
29
  isReadonly?: boolean;
@@ -35,11 +32,15 @@ type InputProperties = {
35
32
  text?: string;
36
33
  hasFormContainer?: boolean;
37
34
  validateOnMount?: boolean;
38
- onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement> | string) => void;
35
+ defaultValue?: string | boolean;
36
+ onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
37
+ };
38
+
39
+ type InputSourceProperties = {
39
40
  data?: Record<string, any>[];
40
41
  dataKey?: string;
41
42
  dataLabel?: string;
42
- };
43
+ }
43
44
 
44
45
  interface TextInputProps extends ElementProps, InputProperties { }
45
46
  interface EmailInputProps extends ElementProps, InputProperties { }
@@ -49,14 +50,37 @@ interface TextAreaProps extends ElementProps, InputProperties { }
49
50
  interface UrlInputProps extends ElementProps, InputProperties { }
50
51
  interface SearchInputProps extends ElementProps, InputProperties { }
51
52
  interface FileInputProps extends ElementProps, InputProperties { }
52
- interface CheckboxInputProps extends ElementProps, Pick<InputProperties, 'text'> { }
53
- interface RadioInputProps extends ElementProps, Pick<InputProperties, 'text'> { }
54
- interface MultiCheckboxInputProps extends ElementProps, Pick<InputProperties, 'text'> { }
55
- interface RichTextInputProps extends ElementProps, InputProperties { }
56
- interface SelectDropdownInputProps extends ElementProps, InputProperties { }
57
- interface SwitchToggleInputProps extends ElementProps, Pick<InputProperties, 'text'> { }
53
+ interface CheckboxInputProps extends ElementProps, InputProperties {
54
+ value?: boolean;
55
+ onChange?: (value: boolean) => void;
56
+ }
57
+ interface RadioInputProps extends ElementProps, InputSourceProperties, InputProperties {
58
+ value?: string;
59
+ onChange?: (value: string) => void;
60
+ }
61
+ interface MultiCheckboxInputProps extends ElementProps, InputSourceProperties, InputProperties {
62
+ value?: Record<string, boolean>;
63
+ onChange?: (value: Record<string, boolean>) => void;
64
+ }
65
+ interface RichTextInputProps extends ElementProps, InputProperties {
66
+ value?: string;
67
+ onChange?: (value: string) => void;
68
+ }
69
+ interface SelectDropdownInputProps extends ElementProps, InputProperties, InputSourceProperties {
70
+ value?: string;
71
+ onChange?: (value: string) => void;
72
+ }
73
+ interface SwitchToggleInputProps extends ElementProps, InputProperties {
74
+ value?: boolean;
75
+ onChange?: (value: boolean) => void;
76
+ }
58
77
  interface PhoneInputProps extends ElementProps, InputProperties { }
59
- interface DateRangeInputProps extends ElementProps { }
78
+ interface DateRangeInputProps extends ElementProps {
79
+ value?: { from?: Date; to?: Date } | undefined;
80
+ onChange?: (value: { from?: Date; to?: Date } | undefined) => void;
81
+ errorMessage?: string;
82
+ validateOnMount?: boolean;
83
+ }
60
84
  interface DatePickerInputProps extends ElementProps, InputProperties {
61
85
  minimumDate?: string;
62
86
  customMinimumDate?: string;
@@ -192,9 +216,9 @@ declare const UrlInput: ({ className, style, ...props }: UrlInputProps) => react
192
216
 
193
217
  declare const CheckboxInput: ({ className, style, ...props }: CheckboxInputProps) => react_jsx_runtime.JSX.Element;
194
218
 
195
- declare const RadioInput: ({ className, style, ...props }: RadioInputProps) => react_jsx_runtime.JSX.Element;
219
+ declare const RadioInput: ({ className, style, defaultValue, onChange, data, dataKey, dataLabel, ...props }: RadioInputProps) => react_jsx_runtime.JSX.Element;
196
220
 
197
- declare const MultiCheckbox: ({ className, style, ...props }: MultiCheckboxInputProps) => react_jsx_runtime.JSX.Element;
221
+ declare const MultiCheckbox: ({ className, style, data, dataKey, dataLabel, value: propValue, onChange, isEditable, isDisabled, }: MultiCheckboxInputProps) => react_jsx_runtime.JSX.Element;
198
222
 
199
223
  declare function RichText({ className, style, ...props }: RichTextInputProps): react_jsx_runtime.JSX.Element;
200
224
 
@@ -210,7 +234,7 @@ declare const FileInput: ({ className, style, ...props }: FileInputProps) => rea
210
234
 
211
235
  declare function DatePicker({ className, style, ...props }: DatePickerInputProps): react_jsx_runtime.JSX.Element;
212
236
 
213
- declare const DateRange: ({ className, style }: DateRangeInputProps) => react_jsx_runtime.JSX.Element;
237
+ declare const DateRange: ({ className, style, ...props }: DateRangeInputProps) => react_jsx_runtime.JSX.Element;
214
238
 
215
239
  declare const Table: ({ columns, data, rowActions, className, style, pagination, itemsPerPage, onPageChange, loading }: TableProps) => react_jsx_runtime.JSX.Element;
216
240
 
package/dist/index.d.ts CHANGED
@@ -23,10 +23,7 @@ type InputProperties = {
23
23
  name?: string;
24
24
  value?: string;
25
25
  placeholder?: string;
26
- regexPattern?: string;
27
26
  errorMessage?: string;
28
- noOfCharacters?: number;
29
- isRequired?: boolean;
30
27
  isEditable?: boolean;
31
28
  isDisabled?: boolean;
32
29
  isReadonly?: boolean;
@@ -35,11 +32,15 @@ type InputProperties = {
35
32
  text?: string;
36
33
  hasFormContainer?: boolean;
37
34
  validateOnMount?: boolean;
38
- onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement> | string) => void;
35
+ defaultValue?: string | boolean;
36
+ onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
37
+ };
38
+
39
+ type InputSourceProperties = {
39
40
  data?: Record<string, any>[];
40
41
  dataKey?: string;
41
42
  dataLabel?: string;
42
- };
43
+ }
43
44
 
44
45
  interface TextInputProps extends ElementProps, InputProperties { }
45
46
  interface EmailInputProps extends ElementProps, InputProperties { }
@@ -49,14 +50,37 @@ interface TextAreaProps extends ElementProps, InputProperties { }
49
50
  interface UrlInputProps extends ElementProps, InputProperties { }
50
51
  interface SearchInputProps extends ElementProps, InputProperties { }
51
52
  interface FileInputProps extends ElementProps, InputProperties { }
52
- interface CheckboxInputProps extends ElementProps, Pick<InputProperties, 'text'> { }
53
- interface RadioInputProps extends ElementProps, Pick<InputProperties, 'text'> { }
54
- interface MultiCheckboxInputProps extends ElementProps, Pick<InputProperties, 'text'> { }
55
- interface RichTextInputProps extends ElementProps, InputProperties { }
56
- interface SelectDropdownInputProps extends ElementProps, InputProperties { }
57
- interface SwitchToggleInputProps extends ElementProps, Pick<InputProperties, 'text'> { }
53
+ interface CheckboxInputProps extends ElementProps, InputProperties {
54
+ value?: boolean;
55
+ onChange?: (value: boolean) => void;
56
+ }
57
+ interface RadioInputProps extends ElementProps, InputSourceProperties, InputProperties {
58
+ value?: string;
59
+ onChange?: (value: string) => void;
60
+ }
61
+ interface MultiCheckboxInputProps extends ElementProps, InputSourceProperties, InputProperties {
62
+ value?: Record<string, boolean>;
63
+ onChange?: (value: Record<string, boolean>) => void;
64
+ }
65
+ interface RichTextInputProps extends ElementProps, InputProperties {
66
+ value?: string;
67
+ onChange?: (value: string) => void;
68
+ }
69
+ interface SelectDropdownInputProps extends ElementProps, InputProperties, InputSourceProperties {
70
+ value?: string;
71
+ onChange?: (value: string) => void;
72
+ }
73
+ interface SwitchToggleInputProps extends ElementProps, InputProperties {
74
+ value?: boolean;
75
+ onChange?: (value: boolean) => void;
76
+ }
58
77
  interface PhoneInputProps extends ElementProps, InputProperties { }
59
- interface DateRangeInputProps extends ElementProps { }
78
+ interface DateRangeInputProps extends ElementProps {
79
+ value?: { from?: Date; to?: Date } | undefined;
80
+ onChange?: (value: { from?: Date; to?: Date } | undefined) => void;
81
+ errorMessage?: string;
82
+ validateOnMount?: boolean;
83
+ }
60
84
  interface DatePickerInputProps extends ElementProps, InputProperties {
61
85
  minimumDate?: string;
62
86
  customMinimumDate?: string;
@@ -192,9 +216,9 @@ declare const UrlInput: ({ className, style, ...props }: UrlInputProps) => react
192
216
 
193
217
  declare const CheckboxInput: ({ className, style, ...props }: CheckboxInputProps) => react_jsx_runtime.JSX.Element;
194
218
 
195
- declare const RadioInput: ({ className, style, ...props }: RadioInputProps) => react_jsx_runtime.JSX.Element;
219
+ declare const RadioInput: ({ className, style, defaultValue, onChange, data, dataKey, dataLabel, ...props }: RadioInputProps) => react_jsx_runtime.JSX.Element;
196
220
 
197
- declare const MultiCheckbox: ({ className, style, ...props }: MultiCheckboxInputProps) => react_jsx_runtime.JSX.Element;
221
+ declare const MultiCheckbox: ({ className, style, data, dataKey, dataLabel, value: propValue, onChange, isEditable, isDisabled, }: MultiCheckboxInputProps) => react_jsx_runtime.JSX.Element;
198
222
 
199
223
  declare function RichText({ className, style, ...props }: RichTextInputProps): react_jsx_runtime.JSX.Element;
200
224
 
@@ -210,7 +234,7 @@ declare const FileInput: ({ className, style, ...props }: FileInputProps) => rea
210
234
 
211
235
  declare function DatePicker({ className, style, ...props }: DatePickerInputProps): react_jsx_runtime.JSX.Element;
212
236
 
213
- declare const DateRange: ({ className, style }: DateRangeInputProps) => react_jsx_runtime.JSX.Element;
237
+ declare const DateRange: ({ className, style, ...props }: DateRangeInputProps) => react_jsx_runtime.JSX.Element;
214
238
 
215
239
  declare const Table: ({ columns, data, rowActions, className, style, pagination, itemsPerPage, onPageChange, loading }: TableProps) => react_jsx_runtime.JSX.Element;
216
240