@algorithm-shift/design-system 1.2.31 → 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.css +30 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +41 -14
- package/dist/index.d.ts +41 -14
- package/dist/index.js +468 -558
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +465 -555
- 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,9 +32,16 @@ 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;
|
|
39
37
|
};
|
|
40
38
|
|
|
39
|
+
type InputSourceProperties = {
|
|
40
|
+
data?: Record<string, any>[];
|
|
41
|
+
dataKey?: string;
|
|
42
|
+
dataLabel?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
41
45
|
interface TextInputProps extends ElementProps, InputProperties { }
|
|
42
46
|
interface EmailInputProps extends ElementProps, InputProperties { }
|
|
43
47
|
interface PasswordInputProps extends ElementProps, InputProperties { }
|
|
@@ -46,14 +50,37 @@ interface TextAreaProps extends ElementProps, InputProperties { }
|
|
|
46
50
|
interface UrlInputProps extends ElementProps, InputProperties { }
|
|
47
51
|
interface SearchInputProps extends ElementProps, InputProperties { }
|
|
48
52
|
interface FileInputProps extends ElementProps, InputProperties { }
|
|
49
|
-
interface CheckboxInputProps extends ElementProps,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
interface
|
|
54
|
-
|
|
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
|
+
}
|
|
55
77
|
interface PhoneInputProps extends ElementProps, InputProperties { }
|
|
56
|
-
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
|
+
}
|
|
57
84
|
interface DatePickerInputProps extends ElementProps, InputProperties {
|
|
58
85
|
minimumDate?: string;
|
|
59
86
|
customMinimumDate?: string;
|
|
@@ -189,9 +216,9 @@ declare const UrlInput: ({ className, style, ...props }: UrlInputProps) => react
|
|
|
189
216
|
|
|
190
217
|
declare const CheckboxInput: ({ className, style, ...props }: CheckboxInputProps) => react_jsx_runtime.JSX.Element;
|
|
191
218
|
|
|
192
|
-
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;
|
|
193
220
|
|
|
194
|
-
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;
|
|
195
222
|
|
|
196
223
|
declare function RichText({ className, style, ...props }: RichTextInputProps): react_jsx_runtime.JSX.Element;
|
|
197
224
|
|
|
@@ -207,7 +234,7 @@ declare const FileInput: ({ className, style, ...props }: FileInputProps) => rea
|
|
|
207
234
|
|
|
208
235
|
declare function DatePicker({ className, style, ...props }: DatePickerInputProps): react_jsx_runtime.JSX.Element;
|
|
209
236
|
|
|
210
|
-
declare const DateRange: ({ className, style }: DateRangeInputProps) => react_jsx_runtime.JSX.Element;
|
|
237
|
+
declare const DateRange: ({ className, style, ...props }: DateRangeInputProps) => react_jsx_runtime.JSX.Element;
|
|
211
238
|
|
|
212
239
|
declare const Table: ({ columns, data, rowActions, className, style, pagination, itemsPerPage, onPageChange, loading }: TableProps) => react_jsx_runtime.JSX.Element;
|
|
213
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,9 +32,16 @@ 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;
|
|
39
37
|
};
|
|
40
38
|
|
|
39
|
+
type InputSourceProperties = {
|
|
40
|
+
data?: Record<string, any>[];
|
|
41
|
+
dataKey?: string;
|
|
42
|
+
dataLabel?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
41
45
|
interface TextInputProps extends ElementProps, InputProperties { }
|
|
42
46
|
interface EmailInputProps extends ElementProps, InputProperties { }
|
|
43
47
|
interface PasswordInputProps extends ElementProps, InputProperties { }
|
|
@@ -46,14 +50,37 @@ interface TextAreaProps extends ElementProps, InputProperties { }
|
|
|
46
50
|
interface UrlInputProps extends ElementProps, InputProperties { }
|
|
47
51
|
interface SearchInputProps extends ElementProps, InputProperties { }
|
|
48
52
|
interface FileInputProps extends ElementProps, InputProperties { }
|
|
49
|
-
interface CheckboxInputProps extends ElementProps,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
interface
|
|
54
|
-
|
|
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
|
+
}
|
|
55
77
|
interface PhoneInputProps extends ElementProps, InputProperties { }
|
|
56
|
-
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
|
+
}
|
|
57
84
|
interface DatePickerInputProps extends ElementProps, InputProperties {
|
|
58
85
|
minimumDate?: string;
|
|
59
86
|
customMinimumDate?: string;
|
|
@@ -189,9 +216,9 @@ declare const UrlInput: ({ className, style, ...props }: UrlInputProps) => react
|
|
|
189
216
|
|
|
190
217
|
declare const CheckboxInput: ({ className, style, ...props }: CheckboxInputProps) => react_jsx_runtime.JSX.Element;
|
|
191
218
|
|
|
192
|
-
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;
|
|
193
220
|
|
|
194
|
-
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;
|
|
195
222
|
|
|
196
223
|
declare function RichText({ className, style, ...props }: RichTextInputProps): react_jsx_runtime.JSX.Element;
|
|
197
224
|
|
|
@@ -207,7 +234,7 @@ declare const FileInput: ({ className, style, ...props }: FileInputProps) => rea
|
|
|
207
234
|
|
|
208
235
|
declare function DatePicker({ className, style, ...props }: DatePickerInputProps): react_jsx_runtime.JSX.Element;
|
|
209
236
|
|
|
210
|
-
declare const DateRange: ({ className, style }: DateRangeInputProps) => react_jsx_runtime.JSX.Element;
|
|
237
|
+
declare const DateRange: ({ className, style, ...props }: DateRangeInputProps) => react_jsx_runtime.JSX.Element;
|
|
211
238
|
|
|
212
239
|
declare const Table: ({ columns, data, rowActions, className, style, pagination, itemsPerPage, onPageChange, loading }: TableProps) => react_jsx_runtime.JSX.Element;
|
|
213
240
|
|