@conduction/components 2.0.20 → 2.0.21
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/README.md +1 -0
- package/lib/components/formFields/index.d.ts +2 -2
- package/lib/components/formFields/index.js +2 -2
- package/lib/components/formFields/input.d.ts +1 -0
- package/lib/components/formFields/input.js +1 -0
- package/package.json +1 -1
- package/src/components/formFields/index.tsx +2 -1
- package/src/components/formFields/input.tsx +16 -0
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { InputText, InputPassword, InputEmail, InputDate, InputNumber, InputFile } from "./input";
|
|
1
|
+
import { InputText, InputPassword, InputEmail, InputDate, InputDateTime, InputNumber, InputFile } from "./input";
|
|
2
2
|
import { Textarea } from "./textarea";
|
|
3
3
|
import { InputCheckbox } from "./checkbox";
|
|
4
4
|
import { InputRadio } from "./radio";
|
|
5
5
|
import { SelectSingle, SelectMultiple } from "./select/select";
|
|
6
6
|
import { CreateKeyValue } from "./createKeyValue/CreateKeyValue";
|
|
7
|
-
export { InputRadio, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputCheckbox, InputFile, Textarea, SelectSingle, SelectMultiple, CreateKeyValue, };
|
|
7
|
+
export { InputRadio, InputText, InputPassword, InputEmail, InputDate, InputDateTime, InputNumber, InputCheckbox, InputFile, Textarea, SelectSingle, SelectMultiple, CreateKeyValue, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { InputText, InputPassword, InputEmail, InputDate, InputNumber, InputFile } from "./input";
|
|
1
|
+
import { InputText, InputPassword, InputEmail, InputDate, InputDateTime, InputNumber, InputFile } from "./input";
|
|
2
2
|
import { Textarea } from "./textarea";
|
|
3
3
|
import { InputCheckbox } from "./checkbox";
|
|
4
4
|
import { InputRadio } from "./radio";
|
|
5
5
|
import { SelectSingle, SelectMultiple } from "./select/select";
|
|
6
6
|
import { CreateKeyValue } from "./createKeyValue/CreateKeyValue";
|
|
7
|
-
export { InputRadio, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputCheckbox, InputFile, Textarea, SelectSingle, SelectMultiple, CreateKeyValue, };
|
|
7
|
+
export { InputRadio, InputText, InputPassword, InputEmail, InputDate, InputDateTime, InputNumber, InputCheckbox, InputFile, Textarea, SelectSingle, SelectMultiple, CreateKeyValue, };
|
|
@@ -11,6 +11,7 @@ export declare const InputPassword: React.FC<IInputProps & IReactHookFormProps>;
|
|
|
11
11
|
export declare const InputText: React.FC<IInputProps & IReactHookFormProps>;
|
|
12
12
|
export declare const InputEmail: React.FC<IInputProps & IReactHookFormProps>;
|
|
13
13
|
export declare const InputDate: React.FC<IInputProps & IReactHookFormProps>;
|
|
14
|
+
export declare const InputDateTime: React.FC<IInputProps & IReactHookFormProps>;
|
|
14
15
|
export declare const InputNumber: React.FC<IInputProps & IReactHookFormProps>;
|
|
15
16
|
export declare const InputFloat: React.FC<IInputProps & IReactHookFormProps>;
|
|
16
17
|
interface IInputFileProps {
|
|
@@ -9,6 +9,7 @@ export const InputPassword = ({ disabled, name, validation, register, placeholde
|
|
|
9
9
|
export const InputText = ({ disabled, name, defaultValue, validation, register, icon, placeholder, errors, }) => (_jsx(TextField, { type: "text", ...{ defaultValue, disabled, placeholder, icon }, ...register(name, { ...validation }), invalid: errors[name] }));
|
|
10
10
|
export const InputEmail = ({ disabled, name, defaultValue, validation, register, icon, placeholder, errors, }) => (_jsx(TextField, { type: "email", ...{ defaultValue, disabled, placeholder, icon }, ...register(name, { ...validation }), invalid: errors[name] }));
|
|
11
11
|
export const InputDate = ({ disabled, name, defaultValue, validation, register, errors, }) => (_jsx(TextField, { type: "date", ...{ defaultValue, disabled }, ...register(name, { ...validation }), invalid: errors[name] }));
|
|
12
|
+
export const InputDateTime = ({ disabled, name, defaultValue, validation, register, errors, }) => (_jsx(TextField, { type: "datetime-local", ...{ defaultValue, disabled }, ...register(name, { ...validation }), invalid: errors[name] }));
|
|
12
13
|
export const InputNumber = ({ disabled, name, defaultValue, validation, register, icon, placeholder, errors, }) => (_jsx(TextField, { type: "number", ...{ defaultValue, disabled, placeholder, icon }, ...register(name, { ...validation }), invalid: errors[name] }));
|
|
13
14
|
export const InputFloat = ({ disabled, name, defaultValue, validation, register, icon, placeholder, errors, }) => (_jsx(TextField, { type: "number", step: ".01", ...{ disabled, placeholder, icon, defaultValue }, ...register(name, { ...validation }), invalid: errors[name] }));
|
|
14
15
|
export const InputFile = ({ disabled, name, accept, defaultValue, validation, register, }) => (_jsx("input", { className: "denhaag-textfield__input", type: "file", ...{ defaultValue, disabled, accept }, ...register(name, { ...validation }) }));
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputText, InputPassword, InputEmail, InputDate, InputNumber, InputFile } from "./input";
|
|
1
|
+
import { InputText, InputPassword, InputEmail, InputDate, InputDateTime, InputNumber, InputFile } from "./input";
|
|
2
2
|
import { Textarea } from "./textarea";
|
|
3
3
|
import { InputCheckbox } from "./checkbox";
|
|
4
4
|
import { InputRadio } from "./radio";
|
|
@@ -11,6 +11,7 @@ export {
|
|
|
11
11
|
InputPassword,
|
|
12
12
|
InputEmail,
|
|
13
13
|
InputDate,
|
|
14
|
+
InputDateTime,
|
|
14
15
|
InputNumber,
|
|
15
16
|
InputCheckbox,
|
|
16
17
|
InputFile,
|
|
@@ -84,6 +84,22 @@ export const InputDate: React.FC<IInputProps & IReactHookFormProps> = ({
|
|
|
84
84
|
/>
|
|
85
85
|
);
|
|
86
86
|
|
|
87
|
+
export const InputDateTime: React.FC<IInputProps & IReactHookFormProps> = ({
|
|
88
|
+
disabled,
|
|
89
|
+
name,
|
|
90
|
+
defaultValue,
|
|
91
|
+
validation,
|
|
92
|
+
register,
|
|
93
|
+
errors,
|
|
94
|
+
}) => (
|
|
95
|
+
<TextField
|
|
96
|
+
type="datetime-local"
|
|
97
|
+
{...{ defaultValue, disabled }}
|
|
98
|
+
{...register(name, { ...validation })}
|
|
99
|
+
invalid={errors[name]}
|
|
100
|
+
/>
|
|
101
|
+
);
|
|
102
|
+
|
|
87
103
|
export const InputNumber: React.FC<IInputProps & IReactHookFormProps> = ({
|
|
88
104
|
disabled,
|
|
89
105
|
name,
|