@conduction/components 2.1.11 → 2.1.13
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 +2 -0
- package/lib/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.js +1 -1
- package/lib/components/formFields/input.js +3 -2
- package/lib/components/toolTip/ToolTip.js +1 -1
- package/lib/components/toolTip/ToolTip.module.css +9 -0
- package/package.json +1 -1
- package/src/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.js +72 -8
- package/src/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.tsx +1 -1
- package/src/components/formFields/input.tsx +7 -2
- package/src/components/toolTip/ToolTip.module.css +9 -0
- package/src/components/toolTip/ToolTip.tsx +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
- **Version 2.1 (breaking changes from 2.0.x)**
|
|
6
6
|
|
|
7
|
+
- 2.1.13: Refactor components to remove svg errors (e.g. shape-rendering => shapeRendering)
|
|
8
|
+
- 2.1.12: Added ToolTip max-width and break-word
|
|
7
9
|
- 2.1.11: Added CreateKeyValue component disabled state on delete buttons
|
|
8
10
|
- 2.1.10: PrimaryTopNav overflow scroll removed from desktop
|
|
9
11
|
- 2.1.8 & 2.1.9: PrimaryTopNav will always show subItems on mobile
|
|
@@ -16,5 +16,5 @@ export const Breadcrumbs = ({ crumbs }) => {
|
|
|
16
16
|
return _jsx(LastCrumbItem, { ...crumb, ...{ idx } }, idx);
|
|
17
17
|
}) }) }));
|
|
18
18
|
};
|
|
19
|
-
const CrumbItem = ({ pathname, crumbLabel, idx }) => (_jsx("li", { className: "denhaag-breadcrumb__item", itemProp: "itemListElement", itemScope: true, itemType: "https://schema.org/ListItem", children: _jsxs(Link, { className: "denhaag-breadcrumb__link", to: pathname, itemProp: "item", children: [_jsx("span", { className: "denhaag-breadcrumb__text", itemProp: "name", children: crumbLabel }), _jsx("svg", { "aria-hidden": "true", className: "denhaag-icon", fill: "none", focusable: "false", height: "1em",
|
|
19
|
+
const CrumbItem = ({ pathname, crumbLabel, idx }) => (_jsx("li", { className: "denhaag-breadcrumb__item", itemProp: "itemListElement", itemScope: true, itemType: "https://schema.org/ListItem", children: _jsxs(Link, { className: "denhaag-breadcrumb__link", to: pathname, itemProp: "item", children: [_jsx("span", { className: "denhaag-breadcrumb__text", itemProp: "name", children: crumbLabel }), _jsx("svg", { "aria-hidden": "true", className: "denhaag-icon", fill: "none", focusable: "false", height: "1em", shapeRendering: "auto", viewBox: "0 0 24 24", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M9.293 18.707a1 1 0 010-1.414L14.586 12 9.293 6.707a1 1 0 011.414-1.414l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414 0z", fill: "currentColor" }) }), _jsx("meta", { content: idx.toString(), itemProp: "position" })] }) }));
|
|
20
20
|
const LastCrumbItem = ({ pathname, crumbLabel, idx }) => (_jsx("li", { "aria-current": "page", className: "denhaag-breadcrumb__item", itemProp: "itemListElement", itemScope: true, itemType: "https://schema.org/ListItem", children: _jsxs(Link, { "aria-current": "page", className: "denhaag-breadcrumb__link denhaag-breadcrumb__link--current", to: pathname, itemProp: "item", children: [_jsx("span", { className: "denhaag-breadcrumb__text", itemProp: "name", children: crumbLabel }), _jsx("meta", { content: idx.toString(), itemProp: "position" })] }) }));
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
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
|
-
import {
|
|
4
|
+
import { faEyeSlash, faEye } from "@fortawesome/free-solid-svg-icons";
|
|
5
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
5
6
|
export const InputPassword = ({ disabled, name, validation, register, placeholder, errors, }) => {
|
|
6
7
|
const [showPassword, setShowPassword] = React.useState(false);
|
|
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(
|
|
8
|
+
return (_jsx(TextField, { type: showPassword ? "text" : "password", ...{ disabled, placeholder }, ...register(name, { ...validation }), invalid: errors[name], icon: _jsx("span", { onClick: () => setShowPassword(!showPassword), children: showPassword ? _jsx(FontAwesomeIcon, { icon: faEye }) : _jsx(FontAwesomeIcon, { icon: faEyeSlash }) }) }));
|
|
8
9
|
};
|
|
9
10
|
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
11
|
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] }));
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import ReactTooltip from "react-tooltip";
|
|
3
3
|
import * as styles from "./ToolTip.module.css";
|
|
4
4
|
export const ToolTip = ({ children, layoutClassName, tooltip }) => {
|
|
5
|
-
return (_jsxs("div", { className: styles.wrapper, children: [_jsx("div", { "data-tip": tooltip, className: layoutClassName && layoutClassName, children: children }), _jsx(ReactTooltip, { place: "top", type: "dark", effect: "solid" })] }));
|
|
5
|
+
return (_jsxs("div", { className: styles.wrapper, children: [_jsx("div", { "data-tip": tooltip, className: layoutClassName && layoutClassName, children: children }), _jsx(ReactTooltip, { place: "top", type: "dark", effect: "solid", className: styles.tooltip })] }));
|
|
6
6
|
};
|
|
7
7
|
export { ReactTooltip };
|
package/package.json
CHANGED
|
@@ -9,12 +9,76 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
import { Link } from "gatsby";
|
|
10
10
|
import "./Breadcrumbs.css";
|
|
11
11
|
export const Breadcrumbs = ({ crumbs }) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
return _jsx("nav", {
|
|
13
|
+
"aria-label": "Breadcrumb",
|
|
14
|
+
className: "denhaag-breadcrumb",
|
|
15
|
+
children: _jsx("ol", {
|
|
16
|
+
className: "denhaag-breadcrumb__list",
|
|
17
|
+
itemScope: true,
|
|
18
|
+
itemType: "https://schema.org/BreadcrumbList",
|
|
19
|
+
children: crumbs.map((crumb, idx) => {
|
|
20
|
+
if (crumbs.length !== idx + 1) {
|
|
21
|
+
return _jsx(CrumbItem, { ...crumb, ...{ idx } }, idx);
|
|
22
|
+
}
|
|
23
|
+
return _jsx(LastCrumbItem, { ...crumb, ...{ idx } }, idx);
|
|
24
|
+
}),
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
18
27
|
};
|
|
19
|
-
const CrumbItem = ({ pathname, crumbLabel, idx }) =>
|
|
20
|
-
|
|
28
|
+
const CrumbItem = ({ pathname, crumbLabel, idx }) =>
|
|
29
|
+
_jsx("li", {
|
|
30
|
+
className: "denhaag-breadcrumb__item",
|
|
31
|
+
itemProp: "itemListElement",
|
|
32
|
+
itemScope: true,
|
|
33
|
+
itemType: "https://schema.org/ListItem",
|
|
34
|
+
children: _jsxs(Link, {
|
|
35
|
+
className: "denhaag-breadcrumb__link",
|
|
36
|
+
to: pathname,
|
|
37
|
+
itemProp: "item",
|
|
38
|
+
children: [
|
|
39
|
+
_jsx("span", {
|
|
40
|
+
className: "denhaag-breadcrumb__text",
|
|
41
|
+
itemProp: "name",
|
|
42
|
+
children: crumbLabel,
|
|
43
|
+
}),
|
|
44
|
+
_jsx("svg", {
|
|
45
|
+
"aria-hidden": "true",
|
|
46
|
+
className: "denhaag-icon",
|
|
47
|
+
fill: "none",
|
|
48
|
+
focusable: "false",
|
|
49
|
+
height: "1em",
|
|
50
|
+
shapeRendering: "auto",
|
|
51
|
+
viewBox: "0 0 24 24",
|
|
52
|
+
width: "1em",
|
|
53
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
54
|
+
children: _jsx("path", {
|
|
55
|
+
d: "M9.293 18.707a1 1 0 010-1.414L14.586 12 9.293 6.707a1 1 0 011.414-1.414l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414 0z",
|
|
56
|
+
fill: "currentColor",
|
|
57
|
+
}),
|
|
58
|
+
}),
|
|
59
|
+
_jsx("meta", { content: idx.toString(), itemProp: "position" }),
|
|
60
|
+
],
|
|
61
|
+
}),
|
|
62
|
+
});
|
|
63
|
+
const LastCrumbItem = ({ pathname, crumbLabel, idx }) =>
|
|
64
|
+
_jsx("li", {
|
|
65
|
+
"aria-current": "page",
|
|
66
|
+
className: "denhaag-breadcrumb__item",
|
|
67
|
+
itemProp: "itemListElement",
|
|
68
|
+
itemScope: true,
|
|
69
|
+
itemType: "https://schema.org/ListItem",
|
|
70
|
+
children: _jsxs(Link, {
|
|
71
|
+
"aria-current": "page",
|
|
72
|
+
className: "denhaag-breadcrumb__link denhaag-breadcrumb__link--current",
|
|
73
|
+
to: pathname,
|
|
74
|
+
itemProp: "item",
|
|
75
|
+
children: [
|
|
76
|
+
_jsx("span", {
|
|
77
|
+
className: "denhaag-breadcrumb__text",
|
|
78
|
+
itemProp: "name",
|
|
79
|
+
children: crumbLabel,
|
|
80
|
+
}),
|
|
81
|
+
_jsx("meta", { content: idx.toString(), itemProp: "position" }),
|
|
82
|
+
],
|
|
83
|
+
}),
|
|
84
|
+
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { TextField } from "@gemeente-denhaag/components-react";
|
|
3
|
-
import { ShowIcon, HideIcon } from "@gemeente-denhaag/icons";
|
|
4
3
|
import { IReactHookFormProps } from "./types";
|
|
4
|
+
import { faEyeSlash, faEye } from "@fortawesome/free-solid-svg-icons";
|
|
5
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
5
6
|
|
|
6
7
|
export interface IInputProps {
|
|
7
8
|
name: string;
|
|
@@ -27,7 +28,11 @@ export const InputPassword: React.FC<IInputProps & IReactHookFormProps> = ({
|
|
|
27
28
|
{...{ disabled, placeholder }}
|
|
28
29
|
{...register(name, { ...validation })}
|
|
29
30
|
invalid={errors[name]}
|
|
30
|
-
icon={
|
|
31
|
+
icon={
|
|
32
|
+
<span onClick={() => setShowPassword(!showPassword)}>
|
|
33
|
+
{showPassword ? <FontAwesomeIcon icon={faEye} /> : <FontAwesomeIcon icon={faEyeSlash} />}
|
|
34
|
+
</span>
|
|
35
|
+
}
|
|
31
36
|
/>
|
|
32
37
|
);
|
|
33
38
|
};
|
|
@@ -16,7 +16,7 @@ export const ToolTip: React.FC<ToolTipProps> = ({ children, layoutClassName, too
|
|
|
16
16
|
{children}
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
<ReactTooltip place={"top"} type={"dark"} effect={"solid"} />
|
|
19
|
+
<ReactTooltip place={"top"} type={"dark"} effect={"solid"} className={styles.tooltip} />
|
|
20
20
|
</div>
|
|
21
21
|
);
|
|
22
22
|
};
|