@conduction/components 1.0.14 → 1.0.17
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/lib/components/formFields/index.d.ts +2 -1
- package/lib/components/formFields/index.js +2 -1
- package/lib/components/formFields/input.d.ts +5 -0
- package/lib/components/formFields/input.js +1 -0
- package/lib/components/formFields/radio.d.ts +9 -0
- package/lib/components/formFields/radio.js +3 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -2
- package/package.json +1 -1
- package/src/components/formFields/index.tsx +2 -0
- package/src/components/formFields/input.tsx +20 -0
- package/src/components/formFields/radio.tsx +21 -0
- package/src/index.ts +2 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InputText, InputPassword, InputEmail, InputDate, InputNumber } from "./input";
|
|
2
2
|
import { Textarea } from "./textarea";
|
|
3
3
|
import { InputCheckbox } from "./checkbox";
|
|
4
|
+
import { InputRadio } from "./radio";
|
|
4
5
|
import { SelectSingle, SelectMultiple } from "./select/select";
|
|
5
|
-
export { InputText, InputPassword, InputEmail, InputDate, InputNumber, InputCheckbox, Textarea, SelectSingle, SelectMultiple, };
|
|
6
|
+
export { InputRadio, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputCheckbox, Textarea, SelectSingle, SelectMultiple, };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InputText, InputPassword, InputEmail, InputDate, InputNumber } from "./input";
|
|
2
2
|
import { Textarea } from "./textarea";
|
|
3
3
|
import { InputCheckbox } from "./checkbox";
|
|
4
|
+
import { InputRadio } from "./radio";
|
|
4
5
|
import { SelectSingle, SelectMultiple } from "./select/select";
|
|
5
|
-
export { InputText, InputPassword, InputEmail, InputDate, InputNumber, InputCheckbox, Textarea, SelectSingle, SelectMultiple, };
|
|
6
|
+
export { InputRadio, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputCheckbox, Textarea, SelectSingle, SelectMultiple, };
|
|
@@ -10,3 +10,8 @@ export declare const InputText: React.FC<IInputProps & IReactHookFormProps>;
|
|
|
10
10
|
export declare const InputEmail: React.FC<IInputProps & IReactHookFormProps>;
|
|
11
11
|
export declare const InputDate: React.FC<IInputProps & IReactHookFormProps>;
|
|
12
12
|
export declare const InputNumber: React.FC<IInputProps & IReactHookFormProps>;
|
|
13
|
+
interface IInputFileProps {
|
|
14
|
+
accept?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const InputFile: React.FC<IInputFileProps & IInputProps & IReactHookFormProps>;
|
|
17
|
+
export {};
|
|
@@ -10,3 +10,4 @@ export const InputText = ({ disabled, name, defaultValue, validation, register,
|
|
|
10
10
|
export const InputEmail = ({ disabled, name, defaultValue, validation, register, errors, }) => (_jsx(TextField, { type: "email", ...{ defaultValue, disabled }, ...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
12
|
export const InputNumber = ({ disabled, name, defaultValue, validation, register, errors, }) => (_jsx(TextField, { type: "number", ...{ defaultValue, disabled }, ...register(name, { ...validation }), invalid: errors[name] }));
|
|
13
|
+
export const InputFile = ({ disabled, name, accept, defaultValue, validation, register, }) => (_jsx("input", { className: "denhaag-textfield__input", type: "file", ...{ defaultValue, disabled, accept }, ...register(name, { ...validation }) }));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { FormControlLabel } from "@gemeente-denhaag/components-react";
|
|
3
|
+
export const InputRadio = ({ name, validation, register, label, value, }) => (_jsx(FormControlLabel, { input: _jsx("input", { type: "radio", ...{ value }, ...register(name, { ...validation }) }), ...{ label } }));
|
package/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard
|
|
|
3
3
|
import { Container } from "./components/container/Container";
|
|
4
4
|
import { Breadcrumbs } from "./components/denhaag-wrappers/breadcrumbs/Breadcrumbs";
|
|
5
5
|
import { EditableTableRow } from "./components/editableTableRow/EditableTableRow";
|
|
6
|
-
import { InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, SelectMultiple, SelectSingle } from "./components/formFields";
|
|
6
|
+
import { InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, InputRadio, SelectMultiple, SelectSingle } from "./components/formFields";
|
|
7
7
|
import { ImageDivider } from "./components/imageDivider/ImageDivider";
|
|
8
8
|
import { AuthenticatedLogo, UnauthenticatedLogo } from "./components/logo/Logo";
|
|
9
9
|
import { MetaIcon } from "./components/metaIcon/MetaIcon";
|
|
@@ -19,4 +19,4 @@ declare const NotificationPopUp: {
|
|
|
19
19
|
};
|
|
20
20
|
NotificationPopUp: import("react").FC<import("./components/notificationPopUp/NotificationPopUp").NotificationPopUpProps>;
|
|
21
21
|
};
|
|
22
|
-
export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, };
|
|
22
|
+
export { InputRadio, DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, };
|
package/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard
|
|
|
2
2
|
import { Container } from "./components/container/Container";
|
|
3
3
|
import { Breadcrumbs } from "./components/denhaag-wrappers/breadcrumbs/Breadcrumbs";
|
|
4
4
|
import { EditableTableRow } from "./components/editableTableRow/EditableTableRow";
|
|
5
|
-
import { InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, SelectMultiple, SelectSingle, } from "./components/formFields";
|
|
5
|
+
import { InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, InputRadio, SelectMultiple, SelectSingle, } from "./components/formFields";
|
|
6
6
|
import { ImageDivider } from "./components/imageDivider/ImageDivider";
|
|
7
7
|
import { AuthenticatedLogo, UnauthenticatedLogo } from "./components/logo/Logo";
|
|
8
8
|
import { MetaIcon } from "./components/metaIcon/MetaIcon";
|
|
@@ -12,4 +12,4 @@ import { PrimaryTopNav, SecondaryTopNav } from "./components/topNav/TopNav";
|
|
|
12
12
|
import { Tag } from "./components/tag/Tag";
|
|
13
13
|
import { NotificationPopUpController, NotificationPopUp as _NotificationPopUp, } from "./components/notificationPopUp/NotificationPopUp";
|
|
14
14
|
const NotificationPopUp = { controller: NotificationPopUpController, NotificationPopUp: _NotificationPopUp };
|
|
15
|
-
export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, };
|
|
15
|
+
export { InputRadio, DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, };
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { InputText, InputPassword, InputEmail, InputDate, InputNumber } from "./input";
|
|
2
2
|
import { Textarea } from "./textarea";
|
|
3
3
|
import { InputCheckbox } from "./checkbox";
|
|
4
|
+
import { InputRadio } from "./radio";
|
|
4
5
|
import { SelectSingle, SelectMultiple } from "./select/select";
|
|
5
6
|
|
|
6
7
|
export {
|
|
8
|
+
InputRadio,
|
|
7
9
|
InputText,
|
|
8
10
|
InputPassword,
|
|
9
11
|
InputEmail,
|
|
@@ -92,3 +92,23 @@ export const InputNumber: React.FC<IInputProps & IReactHookFormProps> = ({
|
|
|
92
92
|
invalid={errors[name]}
|
|
93
93
|
/>
|
|
94
94
|
);
|
|
95
|
+
|
|
96
|
+
interface IInputFileProps {
|
|
97
|
+
accept?: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export const InputFile: React.FC<IInputFileProps & IInputProps & IReactHookFormProps> = ({
|
|
101
|
+
disabled,
|
|
102
|
+
name,
|
|
103
|
+
accept,
|
|
104
|
+
defaultValue,
|
|
105
|
+
validation,
|
|
106
|
+
register,
|
|
107
|
+
}) => (
|
|
108
|
+
<input
|
|
109
|
+
className="denhaag-textfield__input"
|
|
110
|
+
type="file"
|
|
111
|
+
{...{ defaultValue, disabled, accept }}
|
|
112
|
+
{...register(name, { ...validation })}
|
|
113
|
+
/>
|
|
114
|
+
);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FormControlLabel } from "@gemeente-denhaag/components-react";
|
|
2
|
+
import { IReactHookFormProps } from "./types";
|
|
3
|
+
|
|
4
|
+
interface IRadioProps {
|
|
5
|
+
label: string;
|
|
6
|
+
name: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const InputRadio: React.FC<IRadioProps & IReactHookFormProps> = ({
|
|
11
|
+
name,
|
|
12
|
+
validation,
|
|
13
|
+
register,
|
|
14
|
+
label,
|
|
15
|
+
value,
|
|
16
|
+
}) => (
|
|
17
|
+
<FormControlLabel
|
|
18
|
+
input={<input type="radio" {...{ value }} {...register(name, { ...validation })} />}
|
|
19
|
+
{...{ label }}
|
|
20
|
+
/>
|
|
21
|
+
);
|
package/src/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
InputNumber,
|
|
17
17
|
Textarea,
|
|
18
18
|
InputCheckbox,
|
|
19
|
+
InputRadio,
|
|
19
20
|
SelectMultiple,
|
|
20
21
|
SelectSingle,
|
|
21
22
|
} from "./components/formFields";
|
|
@@ -35,6 +36,7 @@ import {
|
|
|
35
36
|
const NotificationPopUp = { controller: NotificationPopUpController, NotificationPopUp: _NotificationPopUp };
|
|
36
37
|
|
|
37
38
|
export {
|
|
39
|
+
InputRadio,
|
|
38
40
|
DownloadCard,
|
|
39
41
|
HorizontalImageCard,
|
|
40
42
|
ImageAndDetailsCard,
|