@conduction/components 1.0.19 → 1.0.22
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/richContentCard/RichContentCard.js +1 -1
- package/lib/components/formFields/input.d.ts +2 -0
- package/lib/components/formFields/input.js +5 -5
- package/lib/components/quoteWrapper/QuoteWrapper.d.ts +7 -0
- package/lib/components/quoteWrapper/QuoteWrapper.js +5 -0
- package/lib/components/quoteWrapper/QuoteWrapper.module.css +12 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/package.json +1 -1
- package/src/components/card/richContentCard/RichContentCard.tsx +4 -4
- package/src/components/formFields/input.tsx +14 -5
- package/src/components/quoteWrapper/QuoteWrapper.module.css +12 -0
- package/src/components/quoteWrapper/QuoteWrapper.tsx +15 -0
- package/src/index.ts +2 -2
|
@@ -5,7 +5,7 @@ import * as styles from "./RichContentCard.module.css";
|
|
|
5
5
|
import { ExternalLinkIcon, ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
6
6
|
import { Tag } from "../../tag/Tag";
|
|
7
7
|
export const RichContentCard = ({ link, labelsWithIcon, tags, contentLinks, linkIsExternal, }) => {
|
|
8
|
-
return (_jsxs("div", { className: styles.container, children: [_jsx("div", { className: styles.link, onClick: () => navigate(link.href), children: _jsx(Link, { icon: linkIsExternal ? _jsx(ExternalLinkIcon, {}) : _jsx(ArrowRightIcon, {}), iconAlign: "start", children: link.label }) }), _jsx("div", { className: styles.labelsWithIcon, children: labelsWithIcon.map(({ label, icon }) => (_jsx(LabelWithIcon, { ...{ label, icon } }))) }), _jsx("div", { className: styles.tags, children: tags.map((tag, idx) => (_jsx(Tag, { ...{ tag } }, idx))) }), contentLinks && (_jsxs("div", { className: styles.contentLinks, children: [_jsx(Divider, {}), contentLinks.map(({ title, subTitle, href }) => (_jsx(ContentLink, { ...{ title, subTitle, href } })))] }))] }));
|
|
8
|
+
return (_jsxs("div", { className: styles.container, children: [_jsx("div", { className: styles.link, onClick: () => navigate(link.href), children: _jsx(Link, { icon: linkIsExternal ? _jsx(ExternalLinkIcon, {}) : _jsx(ArrowRightIcon, {}), iconAlign: "start", children: link.label }) }), _jsx("div", { className: styles.labelsWithIcon, children: labelsWithIcon.map(({ label, icon }, idx) => (_jsx(LabelWithIcon, { ...{ label, icon } }, idx))) }), _jsx("div", { className: styles.tags, children: tags.map((tag, idx) => (_jsx(Tag, { ...{ tag } }, idx))) }), contentLinks && (_jsxs("div", { className: styles.contentLinks, children: [_jsx(Divider, {}), contentLinks.map(({ title, subTitle, href }, idx) => (_jsx(ContentLink, { ...{ title, subTitle, href } }, idx)))] }))] }));
|
|
9
9
|
};
|
|
10
10
|
const LabelWithIcon = ({ label, icon }) => {
|
|
11
11
|
return (_jsxs("div", { className: styles.labelWithIcon, children: [_jsx("span", { className: styles.labelWithIcon_icon, children: icon }), _jsx("span", { className: styles.labelWithIcon_label, children: label })] }));
|
|
@@ -4,6 +4,8 @@ export interface IInputProps {
|
|
|
4
4
|
name: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
defaultValue?: string;
|
|
7
|
+
icon?: JSX.Element;
|
|
8
|
+
placeholder?: string;
|
|
7
9
|
}
|
|
8
10
|
export declare const InputPassword: React.FC<IInputProps & IReactHookFormProps>;
|
|
9
11
|
export declare const InputText: React.FC<IInputProps & IReactHookFormProps>;
|
|
@@ -2,12 +2,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { TextField } from "@gemeente-denhaag/components-react";
|
|
4
4
|
import { ShowIcon, HideIcon } from "@gemeente-denhaag/icons";
|
|
5
|
-
export const InputPassword = ({ disabled, name, validation, register, errors, }) => {
|
|
5
|
+
export const InputPassword = ({ disabled, name, validation, register, placeholder, errors, }) => {
|
|
6
6
|
const [showPassword, setShowPassword] = React.useState(false);
|
|
7
|
-
return (_jsx(TextField, { type: showPassword ? "text" : "password", ...{ disabled }, ...register(name, { ...validation }), invalid: errors[name], icon: _jsx("span", { onClick: () => setShowPassword(!showPassword), children: showPassword ? _jsx(HideIcon, {}) : _jsx(ShowIcon, {}) }) }));
|
|
7
|
+
return (_jsx(TextField, { type: showPassword ? "text" : "password", ...{ disabled, placeholder }, ...register(name, { ...validation }), invalid: errors[name], icon: _jsx("span", { onClick: () => setShowPassword(!showPassword), children: showPassword ? _jsx(HideIcon, {}) : _jsx(ShowIcon, {}) }) }));
|
|
8
8
|
};
|
|
9
|
-
export const InputText = ({ disabled, name, defaultValue, validation, register, errors, }) => (_jsx(TextField, { type: "text", ...{ defaultValue, disabled }, ...register(name, { ...validation }), invalid: errors[name] }));
|
|
10
|
-
export const InputEmail = ({ disabled, name, defaultValue, validation, register, errors, }) => (_jsx(TextField, { type: "email", ...{ defaultValue, disabled }, ...register(name, { ...validation }), invalid: errors[name] }));
|
|
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
|
+
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 InputNumber = ({ disabled, name, defaultValue, validation, register, errors, }) => (_jsx(TextField, { type: "number", ...{ defaultValue, disabled }, ...register(name, { ...validation }), invalid: errors[name] }));
|
|
12
|
+
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
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,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as styles from "./QuoteWrapper.module.css";
|
|
3
|
+
export const QuoteWrapper = ({ children, borderColor, borderWidth }) => {
|
|
4
|
+
return (_jsx("div", { style: { borderLeftColor: borderColor, borderLeftWidth: borderWidth }, className: styles.container, children: children }));
|
|
5
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-quote-border-width: 12px;
|
|
3
|
+
--conduction-quote-border-color: #f5f5f5;
|
|
4
|
+
--conduction-quote-padding-inline: 24px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.container {
|
|
8
|
+
border-left-width: var(--conduction-quote-border-width);
|
|
9
|
+
border-left-style: solid;
|
|
10
|
+
border-left-color: var(--conduction-quote-border-color);
|
|
11
|
+
padding-inline-start: var(--conduction-quote-padding-inline);
|
|
12
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -19,4 +19,5 @@ declare const NotificationPopUp: {
|
|
|
19
19
|
};
|
|
20
20
|
NotificationPopUp: import("react").FC<import("./components/notificationPopUp/NotificationPopUp").NotificationPopUpProps>;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
import { QuoteWrapper } from "./components/quoteWrapper/QuoteWrapper";
|
|
23
|
+
export { InputRadio, DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, InfoCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputFile, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, QuoteWrapper, };
|
package/lib/index.js
CHANGED
|
@@ -12,4 +12,5 @@ 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
|
-
|
|
15
|
+
import { QuoteWrapper } from "./components/quoteWrapper/QuoteWrapper";
|
|
16
|
+
export { InputRadio, DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, InfoCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputFile, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, QuoteWrapper, };
|
package/package.json
CHANGED
|
@@ -39,8 +39,8 @@ export const RichContentCard: React.FC<RichContentCardProps> = ({
|
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
41
|
<div className={styles.labelsWithIcon}>
|
|
42
|
-
{labelsWithIcon.map(({ label, icon }) => (
|
|
43
|
-
<LabelWithIcon {...{ label, icon }} />
|
|
42
|
+
{labelsWithIcon.map(({ label, icon }, idx) => (
|
|
43
|
+
<LabelWithIcon key={idx} {...{ label, icon }} />
|
|
44
44
|
))}
|
|
45
45
|
</div>
|
|
46
46
|
|
|
@@ -53,8 +53,8 @@ export const RichContentCard: React.FC<RichContentCardProps> = ({
|
|
|
53
53
|
{contentLinks && (
|
|
54
54
|
<div className={styles.contentLinks}>
|
|
55
55
|
<Divider />
|
|
56
|
-
{contentLinks.map(({ title, subTitle, href }) => (
|
|
57
|
-
<ContentLink {...{ title, subTitle, href }} />
|
|
56
|
+
{contentLinks.map(({ title, subTitle, href }, idx) => (
|
|
57
|
+
<ContentLink key={idx} {...{ title, subTitle, href }} />
|
|
58
58
|
))}
|
|
59
59
|
</div>
|
|
60
60
|
)}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { TextField } from "@gemeente-denhaag/components-react";
|
|
3
|
-
import { ShowIcon, HideIcon } from "@gemeente-denhaag/icons";
|
|
3
|
+
import { ShowIcon, HideIcon, EmailIcon } from "@gemeente-denhaag/icons";
|
|
4
4
|
import { IReactHookFormProps } from "./types";
|
|
5
5
|
|
|
6
6
|
export interface IInputProps {
|
|
7
7
|
name: string;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
defaultValue?: string;
|
|
10
|
+
icon?: JSX.Element;
|
|
11
|
+
placeholder?: string;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export const InputPassword: React.FC<IInputProps & IReactHookFormProps> = ({
|
|
@@ -14,6 +16,7 @@ export const InputPassword: React.FC<IInputProps & IReactHookFormProps> = ({
|
|
|
14
16
|
name,
|
|
15
17
|
validation,
|
|
16
18
|
register,
|
|
19
|
+
placeholder,
|
|
17
20
|
errors,
|
|
18
21
|
}) => {
|
|
19
22
|
const [showPassword, setShowPassword] = React.useState<boolean>(false);
|
|
@@ -21,7 +24,7 @@ export const InputPassword: React.FC<IInputProps & IReactHookFormProps> = ({
|
|
|
21
24
|
return (
|
|
22
25
|
<TextField
|
|
23
26
|
type={showPassword ? "text" : "password"}
|
|
24
|
-
{...{ disabled }}
|
|
27
|
+
{...{ disabled, placeholder }}
|
|
25
28
|
{...register(name, { ...validation })}
|
|
26
29
|
invalid={errors[name]}
|
|
27
30
|
icon={<span onClick={() => setShowPassword(!showPassword)}>{showPassword ? <HideIcon /> : <ShowIcon />}</span>}
|
|
@@ -35,11 +38,13 @@ export const InputText: React.FC<IInputProps & IReactHookFormProps> = ({
|
|
|
35
38
|
defaultValue,
|
|
36
39
|
validation,
|
|
37
40
|
register,
|
|
41
|
+
icon,
|
|
42
|
+
placeholder,
|
|
38
43
|
errors,
|
|
39
44
|
}) => (
|
|
40
45
|
<TextField
|
|
41
46
|
type="text"
|
|
42
|
-
{...{ defaultValue, disabled }}
|
|
47
|
+
{...{ defaultValue, disabled, placeholder, icon }}
|
|
43
48
|
{...register(name, { ...validation })}
|
|
44
49
|
invalid={errors[name]}
|
|
45
50
|
/>
|
|
@@ -51,11 +56,13 @@ export const InputEmail: React.FC<IInputProps & IReactHookFormProps> = ({
|
|
|
51
56
|
defaultValue,
|
|
52
57
|
validation,
|
|
53
58
|
register,
|
|
59
|
+
icon,
|
|
60
|
+
placeholder,
|
|
54
61
|
errors,
|
|
55
62
|
}) => (
|
|
56
63
|
<TextField
|
|
57
64
|
type="email"
|
|
58
|
-
{...{ defaultValue, disabled }}
|
|
65
|
+
{...{ defaultValue, disabled, placeholder, icon }}
|
|
59
66
|
{...register(name, { ...validation })}
|
|
60
67
|
invalid={errors[name]}
|
|
61
68
|
/>
|
|
@@ -83,11 +90,13 @@ export const InputNumber: React.FC<IInputProps & IReactHookFormProps> = ({
|
|
|
83
90
|
defaultValue,
|
|
84
91
|
validation,
|
|
85
92
|
register,
|
|
93
|
+
icon,
|
|
94
|
+
placeholder,
|
|
86
95
|
errors,
|
|
87
96
|
}) => (
|
|
88
97
|
<TextField
|
|
89
98
|
type="number"
|
|
90
|
-
{...{ defaultValue, disabled }}
|
|
99
|
+
{...{ defaultValue, disabled, placeholder, icon }}
|
|
91
100
|
{...register(name, { ...validation })}
|
|
92
101
|
invalid={errors[name]}
|
|
93
102
|
/>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-quote-border-width: 12px;
|
|
3
|
+
--conduction-quote-border-color: #f5f5f5;
|
|
4
|
+
--conduction-quote-padding-inline: 24px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.container {
|
|
8
|
+
border-left-width: var(--conduction-quote-border-width);
|
|
9
|
+
border-left-style: solid;
|
|
10
|
+
border-left-color: var(--conduction-quote-border-color);
|
|
11
|
+
padding-inline-start: var(--conduction-quote-padding-inline);
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as styles from "./QuoteWrapper.module.css";
|
|
3
|
+
|
|
4
|
+
interface QuoteWrapperProps {
|
|
5
|
+
borderColor?: string;
|
|
6
|
+
borderWidth?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const QuoteWrapper: React.FC<QuoteWrapperProps> = ({ children, borderColor, borderWidth }) => {
|
|
10
|
+
return (
|
|
11
|
+
<div style={{ borderLeftColor: borderColor, borderLeftWidth: borderWidth }} className={styles.container}>
|
|
12
|
+
{children}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -29,13 +29,12 @@ import { PrivateRoute } from "./components/privateRoute/PrivateRoute";
|
|
|
29
29
|
import { StatusSteps } from "./components/statusSteps/StatusSteps";
|
|
30
30
|
import { PrimaryTopNav, SecondaryTopNav } from "./components/topNav/TopNav";
|
|
31
31
|
import { Tag } from "./components/tag/Tag";
|
|
32
|
-
|
|
33
32
|
import {
|
|
34
33
|
NotificationPopUpController,
|
|
35
34
|
NotificationPopUp as _NotificationPopUp,
|
|
36
35
|
} from "./components/notificationPopUp/NotificationPopUp";
|
|
37
|
-
|
|
38
36
|
const NotificationPopUp = { controller: NotificationPopUpController, NotificationPopUp: _NotificationPopUp };
|
|
37
|
+
import { QuoteWrapper } from "./components/quoteWrapper/QuoteWrapper";
|
|
39
38
|
|
|
40
39
|
export {
|
|
41
40
|
InputRadio,
|
|
@@ -68,4 +67,5 @@ export {
|
|
|
68
67
|
SecondaryTopNav,
|
|
69
68
|
Tag,
|
|
70
69
|
NotificationPopUp,
|
|
70
|
+
QuoteWrapper,
|
|
71
71
|
};
|