@algorithm-shift/design-system 1.2.32 → 1.2.34
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.css +30 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +39 -15
- package/dist/index.d.ts +39 -15
- package/dist/index.js +222 -84
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +234 -96
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
-
|
|
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,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
interface
|
|
57
|
-
|
|
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,
|
|
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
|
-
|
|
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,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
interface
|
|
57
|
-
|
|
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,
|
|
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
|
|