@algodomain/smart-forms 0.1.3 → 0.1.4
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/{SmartTags-DPqw9PG1.d.cts → SmartTags-DEpmTDF5.d.cts} +30 -17
- package/dist/{SmartTags-DPqw9PG1.d.ts → SmartTags-DEpmTDF5.d.ts} +30 -17
- package/dist/{chunk-CT6GW6PK.js → chunk-BNQNL7GF.js} +625 -145
- package/dist/chunk-BNQNL7GF.js.map +1 -0
- package/dist/{chunk-3L7TKJIB.js → chunk-RHECLW3K.js} +68 -4
- package/dist/chunk-RHECLW3K.js.map +1 -0
- package/dist/{chunk-TJ6EFR2O.cjs → chunk-VGP3HY5Y.cjs} +729 -239
- package/dist/chunk-VGP3HY5Y.cjs.map +1 -0
- package/dist/{chunk-MBC5TYXA.cjs → chunk-WIBCOQPP.cjs} +68 -4
- package/dist/chunk-WIBCOQPP.cjs.map +1 -0
- package/dist/fields.cjs +162 -479
- package/dist/fields.cjs.map +1 -1
- package/dist/fields.d.cts +3 -23
- package/dist/fields.d.ts +3 -23
- package/dist/fields.js +9 -329
- package/dist/fields.js.map +1 -1
- package/dist/index.cjs +34 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/opinionated.cjs +18 -18
- package/dist/opinionated.js +2 -2
- package/package.json +4 -2
- package/dist/chunk-3L7TKJIB.js.map +0 -1
- package/dist/chunk-CT6GW6PK.js.map +0 -1
- package/dist/chunk-MBC5TYXA.cjs.map +0 -1
- package/dist/chunk-TJ6EFR2O.cjs.map +0 -1
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
|
|
3
4
|
interface SmartInputProps {
|
|
4
5
|
field: string;
|
|
5
6
|
label?: string;
|
|
6
|
-
type?: 'text' | 'email' | 'password' | 'tel' | 'number' | 'textarea';
|
|
7
|
+
type?: 'text' | 'email' | 'password' | 'tel' | 'number' | 'textarea' | 'date';
|
|
7
8
|
placeholder?: string;
|
|
8
9
|
validation?: any;
|
|
9
10
|
className?: string;
|
|
10
11
|
required?: boolean;
|
|
11
12
|
defaultValue?: any;
|
|
13
|
+
syncValue?: any;
|
|
12
14
|
info?: string;
|
|
13
15
|
subLabel?: string;
|
|
14
16
|
disabled?: boolean | ((formData: any) => boolean);
|
|
15
17
|
hidden?: boolean | ((formData: any) => boolean);
|
|
18
|
+
icon?: React__default.ReactNode;
|
|
19
|
+
iconPosition?: 'left' | 'right';
|
|
16
20
|
}
|
|
17
21
|
declare const SmartInput: React__default.FC<SmartInputProps>;
|
|
18
22
|
|
|
@@ -71,32 +75,41 @@ interface SmartSelectProps {
|
|
|
71
75
|
}
|
|
72
76
|
declare const SmartSelect: React__default.FC<SmartSelectProps>;
|
|
73
77
|
|
|
74
|
-
interface
|
|
78
|
+
interface SmartComboboxOption {
|
|
79
|
+
value: string;
|
|
80
|
+
label: string;
|
|
81
|
+
}
|
|
82
|
+
interface SmartComboboxProps {
|
|
75
83
|
field: string;
|
|
76
84
|
label?: string;
|
|
85
|
+
options: SmartComboboxOption[];
|
|
77
86
|
className?: string;
|
|
78
87
|
placeholder?: string;
|
|
88
|
+
allowCustom?: boolean;
|
|
79
89
|
validation?: any;
|
|
80
90
|
required?: boolean;
|
|
81
|
-
|
|
82
|
-
allowFuture?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* When true, value will be stored/returned as ISO string (yyyy-MM-dd).
|
|
85
|
-
* Otherwise the underlying form value will be a Date instance.
|
|
86
|
-
*/
|
|
87
|
-
valueAsString?: boolean;
|
|
88
|
-
/** Optional minimum selectable date */
|
|
89
|
-
minDate?: Date;
|
|
90
|
-
/** Optional maximum selectable date */
|
|
91
|
-
maxDate?: Date;
|
|
92
|
-
/** Default value for the date picker (can be Date or string depending on valueAsString) */
|
|
93
|
-
defaultValue?: Date | string;
|
|
91
|
+
defaultValue?: string;
|
|
94
92
|
info?: string;
|
|
95
93
|
subLabel?: string;
|
|
96
94
|
disabled?: boolean | ((formData: any) => boolean);
|
|
97
95
|
hidden?: boolean | ((formData: any) => boolean);
|
|
98
96
|
}
|
|
99
|
-
declare const
|
|
97
|
+
declare const SmartCombobox: React__default.FC<SmartComboboxProps>;
|
|
98
|
+
|
|
99
|
+
type SmartDatePickerProps = {
|
|
100
|
+
field: string;
|
|
101
|
+
label?: string;
|
|
102
|
+
placeholder?: string;
|
|
103
|
+
validation?: any;
|
|
104
|
+
className?: string;
|
|
105
|
+
required?: boolean;
|
|
106
|
+
defaultValue?: any;
|
|
107
|
+
info?: string;
|
|
108
|
+
subLabel?: string;
|
|
109
|
+
disabled?: boolean | ((formData: any) => boolean);
|
|
110
|
+
hidden?: boolean | ((formData: any) => boolean);
|
|
111
|
+
};
|
|
112
|
+
declare const SmartDatePicker: ({ field, label, className, ...props }: SmartDatePickerProps) => react_jsx_runtime.JSX.Element;
|
|
100
113
|
|
|
101
114
|
interface SmartTagsProps {
|
|
102
115
|
field: string;
|
|
@@ -119,4 +132,4 @@ interface SmartTagsProps {
|
|
|
119
132
|
}
|
|
120
133
|
declare const SmartTags: React__default.FC<SmartTagsProps>;
|
|
121
134
|
|
|
122
|
-
export { SmartInput as S, SmartCheckbox as a, SmartRadioGroup as b, SmartSelect as c,
|
|
135
|
+
export { SmartInput as S, SmartCheckbox as a, SmartRadioGroup as b, SmartSelect as c, SmartCombobox as d, SmartDatePicker as e, SmartTags as f, type SmartInputProps as g, type SmartTagsProps as h, type SmartDatePickerProps as i, type SmartComboboxProps as j, type SmartComboboxOption as k };
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
|
|
3
4
|
interface SmartInputProps {
|
|
4
5
|
field: string;
|
|
5
6
|
label?: string;
|
|
6
|
-
type?: 'text' | 'email' | 'password' | 'tel' | 'number' | 'textarea';
|
|
7
|
+
type?: 'text' | 'email' | 'password' | 'tel' | 'number' | 'textarea' | 'date';
|
|
7
8
|
placeholder?: string;
|
|
8
9
|
validation?: any;
|
|
9
10
|
className?: string;
|
|
10
11
|
required?: boolean;
|
|
11
12
|
defaultValue?: any;
|
|
13
|
+
syncValue?: any;
|
|
12
14
|
info?: string;
|
|
13
15
|
subLabel?: string;
|
|
14
16
|
disabled?: boolean | ((formData: any) => boolean);
|
|
15
17
|
hidden?: boolean | ((formData: any) => boolean);
|
|
18
|
+
icon?: React__default.ReactNode;
|
|
19
|
+
iconPosition?: 'left' | 'right';
|
|
16
20
|
}
|
|
17
21
|
declare const SmartInput: React__default.FC<SmartInputProps>;
|
|
18
22
|
|
|
@@ -71,32 +75,41 @@ interface SmartSelectProps {
|
|
|
71
75
|
}
|
|
72
76
|
declare const SmartSelect: React__default.FC<SmartSelectProps>;
|
|
73
77
|
|
|
74
|
-
interface
|
|
78
|
+
interface SmartComboboxOption {
|
|
79
|
+
value: string;
|
|
80
|
+
label: string;
|
|
81
|
+
}
|
|
82
|
+
interface SmartComboboxProps {
|
|
75
83
|
field: string;
|
|
76
84
|
label?: string;
|
|
85
|
+
options: SmartComboboxOption[];
|
|
77
86
|
className?: string;
|
|
78
87
|
placeholder?: string;
|
|
88
|
+
allowCustom?: boolean;
|
|
79
89
|
validation?: any;
|
|
80
90
|
required?: boolean;
|
|
81
|
-
|
|
82
|
-
allowFuture?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* When true, value will be stored/returned as ISO string (yyyy-MM-dd).
|
|
85
|
-
* Otherwise the underlying form value will be a Date instance.
|
|
86
|
-
*/
|
|
87
|
-
valueAsString?: boolean;
|
|
88
|
-
/** Optional minimum selectable date */
|
|
89
|
-
minDate?: Date;
|
|
90
|
-
/** Optional maximum selectable date */
|
|
91
|
-
maxDate?: Date;
|
|
92
|
-
/** Default value for the date picker (can be Date or string depending on valueAsString) */
|
|
93
|
-
defaultValue?: Date | string;
|
|
91
|
+
defaultValue?: string;
|
|
94
92
|
info?: string;
|
|
95
93
|
subLabel?: string;
|
|
96
94
|
disabled?: boolean | ((formData: any) => boolean);
|
|
97
95
|
hidden?: boolean | ((formData: any) => boolean);
|
|
98
96
|
}
|
|
99
|
-
declare const
|
|
97
|
+
declare const SmartCombobox: React__default.FC<SmartComboboxProps>;
|
|
98
|
+
|
|
99
|
+
type SmartDatePickerProps = {
|
|
100
|
+
field: string;
|
|
101
|
+
label?: string;
|
|
102
|
+
placeholder?: string;
|
|
103
|
+
validation?: any;
|
|
104
|
+
className?: string;
|
|
105
|
+
required?: boolean;
|
|
106
|
+
defaultValue?: any;
|
|
107
|
+
info?: string;
|
|
108
|
+
subLabel?: string;
|
|
109
|
+
disabled?: boolean | ((formData: any) => boolean);
|
|
110
|
+
hidden?: boolean | ((formData: any) => boolean);
|
|
111
|
+
};
|
|
112
|
+
declare const SmartDatePicker: ({ field, label, className, ...props }: SmartDatePickerProps) => react_jsx_runtime.JSX.Element;
|
|
100
113
|
|
|
101
114
|
interface SmartTagsProps {
|
|
102
115
|
field: string;
|
|
@@ -119,4 +132,4 @@ interface SmartTagsProps {
|
|
|
119
132
|
}
|
|
120
133
|
declare const SmartTags: React__default.FC<SmartTagsProps>;
|
|
121
134
|
|
|
122
|
-
export { SmartInput as S, SmartCheckbox as a, SmartRadioGroup as b, SmartSelect as c,
|
|
135
|
+
export { SmartInput as S, SmartCheckbox as a, SmartRadioGroup as b, SmartSelect as c, SmartCombobox as d, SmartDatePicker as e, SmartTags as f, type SmartInputProps as g, type SmartTagsProps as h, type SmartDatePickerProps as i, type SmartComboboxProps as j, type SmartComboboxOption as k };
|