@conduction/components 1.0.15 → 1.0.18
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/card/detailsCard/DetailsCard.d.ts +1 -1
- package/lib/components/card/index.d.ts +2 -1
- package/lib/components/card/index.js +2 -1
- package/lib/components/card/infoCard/InfoCard.d.ts +7 -0
- package/lib/components/card/infoCard/InfoCard.js +5 -0
- package/lib/components/card/infoCard/InfoCard.module.css +37 -0
- package/lib/components/formFields/index.d.ts +2 -1
- package/lib/components/formFields/index.js +2 -1
- package/lib/components/formFields/radio.d.ts +9 -0
- package/lib/components/formFields/radio.js +3 -0
- package/lib/index.d.ts +3 -3
- package/lib/index.js +3 -3
- package/package.json +1 -1
- package/src/components/card/detailsCard/DetailsCard.tsx +1 -1
- package/src/components/card/index.tsx +2 -1
- package/src/components/card/infoCard/InfoCard.module.css +37 -0
- package/src/components/card/infoCard/InfoCard.tsx +17 -0
- package/src/components/formFields/index.tsx +2 -0
- package/src/components/formFields/radio.tsx +21 -0
- package/src/index.ts +4 -0
|
@@ -3,4 +3,5 @@ import { HorizontalImageCard } from "./horizontalImageCard/HorizontalImageCard";
|
|
|
3
3
|
import { ImageAndDetailsCard } from "./imageAndDetailsCard/ImageAndDetailsCard";
|
|
4
4
|
import { RichContentCard } from "./richContentCard/RichContentCard";
|
|
5
5
|
import { DetailsCard } from "./detailsCard/DetailsCard";
|
|
6
|
-
|
|
6
|
+
import { InfoCard } from "./infoCard/InfoCard";
|
|
7
|
+
export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, InfoCard };
|
|
@@ -3,4 +3,5 @@ import { HorizontalImageCard } from "./horizontalImageCard/HorizontalImageCard";
|
|
|
3
3
|
import { ImageAndDetailsCard } from "./imageAndDetailsCard/ImageAndDetailsCard";
|
|
4
4
|
import { RichContentCard } from "./richContentCard/RichContentCard";
|
|
5
5
|
import { DetailsCard } from "./detailsCard/DetailsCard";
|
|
6
|
-
|
|
6
|
+
import { InfoCard } from "./infoCard/InfoCard";
|
|
7
|
+
export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, InfoCard };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as styles from "./InfoCard.module.css";
|
|
3
|
+
export const InfoCard = ({ title, content }) => {
|
|
4
|
+
return (_jsxs("div", { className: styles.container, children: [_jsx("span", { className: styles.title, children: title }), _jsx("div", { className: styles.content, children: content })] }));
|
|
5
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-info-card-background-color: #f2f2f2;
|
|
3
|
+
--conduction-info-card-border-radius: 3px;
|
|
4
|
+
--conduction-info-card-title-weight: bold;
|
|
5
|
+
--conduction-info-card-title-font-size: 24px;
|
|
6
|
+
--conduction-info-card-title-color: #000000;
|
|
7
|
+
--conduction-info-card-content-color: #000000;
|
|
8
|
+
--conduction-info-card-padding: 16px;
|
|
9
|
+
--conduction-info-card-content-margin: 8px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.container {
|
|
13
|
+
background-color: var(--conduction-info-card-background-color);
|
|
14
|
+
border-radius: var(--conduction-info-card-border-radius);
|
|
15
|
+
padding-inline-start: var(--conduction-info-card-padding);
|
|
16
|
+
padding-inline-end: var(--conduction-info-card-padding);
|
|
17
|
+
padding-block-start: var(--conduction-info-card-padding);
|
|
18
|
+
padding-block-end: var(--conduction-info-card-padding);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.container > * {
|
|
22
|
+
display: block;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.container > *:not(:last-child) {
|
|
26
|
+
margin-block-end: var(--conduction-info-card-content-margin);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.container > .title {
|
|
30
|
+
font-weight: var(--conduction-info-card-title-weight);
|
|
31
|
+
font-size: var(--conduction-info-card-title-font-size);
|
|
32
|
+
color: var(--conduction-info-card-title-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.content {
|
|
36
|
+
color: var(--conduction-info-card-content-color);
|
|
37
|
+
}
|
|
@@ -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, };
|
|
@@ -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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard } from "./components/card";
|
|
2
|
+
import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, InfoCard } from "./components/card";
|
|
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, InfoCard, 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
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, } from "./components/card";
|
|
1
|
+
import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, InfoCard, } from "./components/card";
|
|
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, InfoCard, 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
|
@@ -3,5 +3,6 @@ import { HorizontalImageCard } from "./horizontalImageCard/HorizontalImageCard";
|
|
|
3
3
|
import { ImageAndDetailsCard } from "./imageAndDetailsCard/ImageAndDetailsCard";
|
|
4
4
|
import { RichContentCard } from "./richContentCard/RichContentCard";
|
|
5
5
|
import { DetailsCard } from "./detailsCard/DetailsCard";
|
|
6
|
+
import { InfoCard } from "./infoCard/InfoCard";
|
|
6
7
|
|
|
7
|
-
export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard };
|
|
8
|
+
export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, InfoCard };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-info-card-background-color: #f2f2f2;
|
|
3
|
+
--conduction-info-card-border-radius: 3px;
|
|
4
|
+
--conduction-info-card-title-weight: bold;
|
|
5
|
+
--conduction-info-card-title-font-size: 24px;
|
|
6
|
+
--conduction-info-card-title-color: #000000;
|
|
7
|
+
--conduction-info-card-content-color: #000000;
|
|
8
|
+
--conduction-info-card-padding: 16px;
|
|
9
|
+
--conduction-info-card-content-margin: 8px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.container {
|
|
13
|
+
background-color: var(--conduction-info-card-background-color);
|
|
14
|
+
border-radius: var(--conduction-info-card-border-radius);
|
|
15
|
+
padding-inline-start: var(--conduction-info-card-padding);
|
|
16
|
+
padding-inline-end: var(--conduction-info-card-padding);
|
|
17
|
+
padding-block-start: var(--conduction-info-card-padding);
|
|
18
|
+
padding-block-end: var(--conduction-info-card-padding);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.container > * {
|
|
22
|
+
display: block;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.container > *:not(:last-child) {
|
|
26
|
+
margin-block-end: var(--conduction-info-card-content-margin);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.container > .title {
|
|
30
|
+
font-weight: var(--conduction-info-card-title-weight);
|
|
31
|
+
font-size: var(--conduction-info-card-title-font-size);
|
|
32
|
+
color: var(--conduction-info-card-title-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.content {
|
|
36
|
+
color: var(--conduction-info-card-content-color);
|
|
37
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as styles from "./InfoCard.module.css";
|
|
3
|
+
|
|
4
|
+
interface InfoCardProps {
|
|
5
|
+
title: string;
|
|
6
|
+
content: JSX.Element | string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const InfoCard: React.FC<InfoCardProps> = ({ title, content }) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className={styles.container}>
|
|
12
|
+
<span className={styles.title}>{title}</span>
|
|
13
|
+
|
|
14
|
+
<div className={styles.content}>{content}</div>
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
@@ -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,
|
|
@@ -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
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
ImageAndDetailsCard,
|
|
5
5
|
RichContentCard,
|
|
6
6
|
DetailsCard,
|
|
7
|
+
InfoCard,
|
|
7
8
|
} from "./components/card";
|
|
8
9
|
import { Container } from "./components/container/Container";
|
|
9
10
|
import { Breadcrumbs } from "./components/denhaag-wrappers/breadcrumbs/Breadcrumbs";
|
|
@@ -16,6 +17,7 @@ import {
|
|
|
16
17
|
InputNumber,
|
|
17
18
|
Textarea,
|
|
18
19
|
InputCheckbox,
|
|
20
|
+
InputRadio,
|
|
19
21
|
SelectMultiple,
|
|
20
22
|
SelectSingle,
|
|
21
23
|
} from "./components/formFields";
|
|
@@ -35,11 +37,13 @@ import {
|
|
|
35
37
|
const NotificationPopUp = { controller: NotificationPopUpController, NotificationPopUp: _NotificationPopUp };
|
|
36
38
|
|
|
37
39
|
export {
|
|
40
|
+
InputRadio,
|
|
38
41
|
DownloadCard,
|
|
39
42
|
HorizontalImageCard,
|
|
40
43
|
ImageAndDetailsCard,
|
|
41
44
|
RichContentCard,
|
|
42
45
|
DetailsCard,
|
|
46
|
+
InfoCard,
|
|
43
47
|
Container,
|
|
44
48
|
Breadcrumbs,
|
|
45
49
|
EditableTableRow,
|