@algodomain/smart-forms 0.1.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.
@@ -0,0 +1,111 @@
1
+ import React__default from 'react';
2
+
3
+ interface SmartInputProps {
4
+ field: string;
5
+ label?: string;
6
+ type?: 'text' | 'email' | 'password' | 'tel' | 'number' | 'textarea';
7
+ placeholder?: string;
8
+ validation?: any;
9
+ className?: string;
10
+ required?: boolean;
11
+ defaultValue?: any;
12
+ info?: string;
13
+ subLabel?: string;
14
+ }
15
+ declare const SmartInput: React__default.FC<SmartInputProps>;
16
+
17
+ interface SmartCheckboxProps {
18
+ field: string;
19
+ label?: string;
20
+ className?: string;
21
+ validation?: any;
22
+ required?: boolean;
23
+ defaultValue?: boolean;
24
+ info?: string;
25
+ subLabel?: string;
26
+ }
27
+ declare const SmartCheckbox: React__default.FC<SmartCheckboxProps>;
28
+
29
+ interface SmartRadioGroupOption {
30
+ value: string;
31
+ label: string;
32
+ }
33
+ interface SmartRadioGroupProps {
34
+ field: string;
35
+ label?: string;
36
+ options: SmartRadioGroupOption[];
37
+ name?: string;
38
+ alignment?: 'vertical' | 'horizontal';
39
+ className?: string;
40
+ validation?: any;
41
+ required?: boolean;
42
+ defaultValue?: string;
43
+ info?: string;
44
+ subLabel?: string;
45
+ }
46
+ declare const SmartRadioGroup: React__default.FC<SmartRadioGroupProps>;
47
+
48
+ interface SmartSelectOption {
49
+ value: string;
50
+ label: string;
51
+ }
52
+ interface SmartSelectProps {
53
+ field: string;
54
+ label?: string;
55
+ options: SmartSelectOption[];
56
+ className?: string;
57
+ placeholder?: string;
58
+ validation?: any;
59
+ required?: boolean;
60
+ defaultValue?: string;
61
+ info?: string;
62
+ subLabel?: string;
63
+ }
64
+ declare const SmartSelect: React__default.FC<SmartSelectProps>;
65
+
66
+ interface SmartDatePickerProps {
67
+ field: string;
68
+ label?: string;
69
+ className?: string;
70
+ placeholder?: string;
71
+ validation?: any;
72
+ required?: boolean;
73
+ allowPast?: boolean;
74
+ allowFuture?: boolean;
75
+ /**
76
+ * When true, value will be stored/returned as ISO string (yyyy-MM-dd).
77
+ * Otherwise the underlying form value will be a Date instance.
78
+ */
79
+ valueAsString?: boolean;
80
+ /** Optional minimum selectable date */
81
+ minDate?: Date;
82
+ /** Optional maximum selectable date */
83
+ maxDate?: Date;
84
+ /** Default value for the date picker (can be Date or string depending on valueAsString) */
85
+ defaultValue?: Date | string;
86
+ info?: string;
87
+ subLabel?: string;
88
+ }
89
+ declare const SmartDatePicker: React__default.FC<SmartDatePickerProps>;
90
+
91
+ interface SmartTagsProps {
92
+ field: string;
93
+ label?: string;
94
+ className?: string;
95
+ placeholder?: string;
96
+ validation?: any;
97
+ required?: boolean;
98
+ maxTags?: number;
99
+ defaultValue?: string[];
100
+ maxLength?: number;
101
+ minLength?: number;
102
+ allowDuplicates?: boolean;
103
+ disabled?: boolean;
104
+ onTagAdd?: (tagText: string) => void;
105
+ onTagRemove?: (tagText: string) => void;
106
+ info?: string;
107
+ subLabel?: string;
108
+ }
109
+ declare const SmartTags: React__default.FC<SmartTagsProps>;
110
+
111
+ export { SmartInput as S, SmartCheckbox as a, SmartRadioGroup as b, SmartSelect as c, SmartDatePicker as d, SmartTags as e, type SmartInputProps as f, type SmartTagsProps as g };