@conduction/components 2.2.1 → 2.2.2
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 +7 -0
- package/lib/components/Pagination/Pagination.js +2 -2
- package/lib/components/Pagination/Pagination.module.css +2 -2
- package/lib/components/formFields/createKeyValue/CreateKeyValue.js +2 -3
- package/lib/components/notificationPopUp/NotificationPopUp.js +2 -3
- package/lib/components/notificationPopUp/NotificationPopUp.module.css +5 -0
- package/package.json +1 -7
- package/src/components/Pagination/Pagination.module.css +2 -2
- package/src/components/Pagination/Pagination.tsx +3 -1
- package/src/components/formFields/createKeyValue/CreateKeyValue.tsx +5 -6
- package/src/components/notificationPopUp/NotificationPopUp.module.css +5 -0
- package/src/components/notificationPopUp/NotificationPopUp.tsx +3 -4
- package/src/components/card/downloadCard/DownloadCard.js +0 -10
- package/src/components/card/horizontalImageCard/HorizontalImageCard.js +0 -9
- package/src/components/card/imageAndDetailsCard/ImageAndDetailsCard.js +0 -9
- package/src/components/card/index.js +0 -5
- package/src/components/container/Container.js +0 -3
- package/src/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.js +0 -84
- package/src/components/formFields/index.js +0 -4
- package/src/components/formFields/input.js +0 -12
- package/src/components/formFields/textarea.js +0 -3
- package/src/components/formFields/types.js +0 -1
- package/src/components/imageDivider/ImageDivider.js +0 -6
- package/src/components/logo/Logo.js +0 -10
- package/src/components/metaIcon/MetaIcon.js +0 -3
- package/src/components/privateRoute/PrivateRoute.js +0 -15
package/README.md
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
- **Version 2.2 (breaking changes from 2.1.x)**
|
|
6
6
|
|
|
7
|
+
- 2.2.2:
|
|
8
|
+
- Removed Den Haag Textfield dependencies.
|
|
9
|
+
- Removed Den Haag SideNav dependencies.
|
|
10
|
+
- Removed Den Haag Textarea dependencies.
|
|
11
|
+
- Removed Den Haag Process Steps dependencies.
|
|
12
|
+
- Removed Den Haag Form Field dependencies.
|
|
13
|
+
- Removed Den Haag Button dependencies.
|
|
7
14
|
- 2.2.1: Removed Den Haag icon dependencies and redundant RichContentCard.
|
|
8
15
|
- 2.2.0:
|
|
9
16
|
- Removed Den Haag designTokensComponent.
|
|
@@ -2,11 +2,11 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as styles from "./Pagination.module.css";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import ReactPaginate from "react-paginate";
|
|
5
|
-
import Button from "@
|
|
5
|
+
import { Button } from "@utrecht/component-library-react";
|
|
6
6
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
7
7
|
import { faChevronRight, faChevronLeft } from "@fortawesome/free-solid-svg-icons";
|
|
8
8
|
export const Pagination = ({ totalPages, currentPage, setCurrentPage, layoutClassName }) => {
|
|
9
9
|
if (totalPages < 1)
|
|
10
10
|
return _jsx(_Fragment, {}); // no pages available
|
|
11
|
-
return (_jsx(ReactPaginate, { className: clsx(styles.container, layoutClassName && layoutClassName), disabledClassName: styles.disabled, activeClassName: styles.currentPage, onPageChange: (e) => setCurrentPage(e.selected + 1), forcePage: currentPage - 1, pageRangeDisplayed: 3, pageCount: totalPages, disableInitialCallback: true, marginPagesDisplayed: 2, breakLabel: "...", nextLabel: _jsx(Button, { className: styles.button, children: _jsx(FontAwesomeIcon, { icon: faChevronRight }) }), previousLabel: _jsx(Button, { className: styles.button, children: _jsx(FontAwesomeIcon, { icon: faChevronLeft }) }) }));
|
|
11
|
+
return (_jsx(ReactPaginate, { className: clsx(styles.container, layoutClassName && layoutClassName), disabledClassName: styles.disabled, activeClassName: styles.currentPage, onPageChange: (e) => setCurrentPage(e.selected + 1), forcePage: currentPage - 1, pageRangeDisplayed: 3, pageCount: totalPages, disableInitialCallback: true, marginPagesDisplayed: 2, breakLabel: "...", nextClassName: styles.next, previousClassName: styles.previous, nextLabel: _jsx(Button, { className: styles.button, children: _jsx(FontAwesomeIcon, { icon: faChevronRight }) }), previousLabel: _jsx(Button, { className: styles.button, children: _jsx(FontAwesomeIcon, { icon: faChevronLeft }) }) }));
|
|
12
12
|
};
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
user-select: none;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.container > li > a {
|
|
62
|
+
.container > li:not(.previous):not(.next) > a {
|
|
63
63
|
color: var(--conduction-pagination-item-color);
|
|
64
64
|
background-color: var(--conduction-pagination-item-background-color);
|
|
65
65
|
border-radius: var(--conduction-pagination-item-border-radius);
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
cursor: pointer;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
.container > li:hover:not(.disabled):not(.currentPage) > a {
|
|
102
|
+
.container > li:hover:not(.disabled):not(.currentPage):not(.next):not(.previous) > a {
|
|
103
103
|
color: var(--conduction-pagination-page-hover-color);
|
|
104
104
|
background-color: var(--conduction-pagination-page-hover-background-color);
|
|
105
105
|
text-decoration: var(--conduction-pagination-page-hover-text-decoration);
|
|
@@ -2,8 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import * as styles from "./CreateKeyValue.module.css";
|
|
4
4
|
import { Controller } from "react-hook-form";
|
|
5
|
-
import { Button } from "@
|
|
6
|
-
import { Table, TableBody, TableCell, TableHeaderCell, TableHeader, TableRow, } from "@utrecht/component-library-react/dist/css-module";
|
|
5
|
+
import { Table, TableBody, TableCell, TableHeaderCell, TableHeader, TableRow, Textbox, Button, } from "@utrecht/component-library-react/dist/css-module";
|
|
7
6
|
import { ToolTip } from "../../toolTip/ToolTip";
|
|
8
7
|
import clsx from "clsx";
|
|
9
8
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
@@ -38,5 +37,5 @@ const KeyValueComponent = ({ defaultValue, handleChange, disabled, copyValue, })
|
|
|
38
37
|
React.useEffect(() => {
|
|
39
38
|
handleChange(keyValues);
|
|
40
39
|
}, [keyValues]);
|
|
41
|
-
return (_jsxs("div", { className: styles.keyValue, children: [keyValues && (_jsxs(Table, { className: styles.table, children: [_jsx(TableHeader, { className: styles.tableHeader, children: _jsxs(TableRow, { children: [_jsx(TableHeaderCell, { children: "Key" }), _jsx(TableHeaderCell, { children: "Value" }), _jsx(TableHeaderCell, {})] }) }), _jsx(TableBody, { children: keyValues.map((keyValue, idx) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: keyValue.key }), _jsx(TableCell, { children: keyValue.value }), _jsx(TableCell, { children: _jsxs("div", { className: styles.buttonsContainer, children: [copyValue && (_jsx(ToolTip, { tooltip: "Copy value", children: _jsx(Button, { ...{ disabled }, onClick: () => handleCopyToClipboard(keyValue.value, idx),
|
|
40
|
+
return (_jsxs("div", { className: styles.keyValue, children: [keyValues && (_jsxs(Table, { className: styles.table, children: [_jsx(TableHeader, { className: styles.tableHeader, children: _jsxs(TableRow, { children: [_jsx(TableHeaderCell, { children: "Key" }), _jsx(TableHeaderCell, { children: "Value" }), _jsx(TableHeaderCell, {})] }) }), _jsx(TableBody, { children: keyValues.map((keyValue, idx) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: keyValue.key }), _jsx(TableCell, { children: keyValue.value }), _jsx(TableCell, { children: _jsxs("div", { className: styles.buttonsContainer, children: [copyValue && (_jsx(ToolTip, { tooltip: "Copy value", children: _jsx(Button, { ...{ disabled }, onClick: () => handleCopyToClipboard(keyValue.value, idx), appearance: currentCopyIdx === idx ? "secondary-action-button" : "primary-action-button", children: _jsx(FontAwesomeIcon, { icon: faCopy }) }) })), _jsx(ToolTip, { tooltip: "Delete value", children: _jsx(Button, { ...{ disabled }, onClick: () => setKeyValues(keyValues.filter((_keyValue) => _keyValue !== keyValue)), className: clsx(styles.deleteButton), children: _jsx(FontAwesomeIcon, { icon: faTrash }) }) })] }) })] }, `${keyValue.key}${keyValue.value}${idx}`))) })] })), _jsxs("div", { className: styles.form, children: [_jsx(Textbox, { type: "text", placeholder: "Key", value: currentKey, ref: currentKeyRef, onChange: (e) => setCurrentKey(e.target.value), ...{ disabled } }), _jsx(Textbox, { type: "text", placeholder: "Value", value: currentValue, ref: currentValueRef, onChange: (e) => setCurrentValue(e.target.value), ...{ disabled } }), _jsx(Button, { onClick: handleCreate, disabled: !currentKey || !currentValue || disabled, children: "Add" })] })] }));
|
|
42
41
|
};
|
|
@@ -2,9 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import * as styles from "./NotificationPopUp.module.css";
|
|
4
4
|
import ReactDOM from "react-dom";
|
|
5
|
-
import { Button } from "@gemeente-denhaag/button";
|
|
6
5
|
import clsx from "clsx";
|
|
7
|
-
import { Heading3, Link, Paragraph } from "@utrecht/component-library-react";
|
|
6
|
+
import { Heading3, Link, Paragraph, Button } from "@utrecht/component-library-react";
|
|
8
7
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
9
8
|
import { faArrowRight, faClose } from "@fortawesome/free-solid-svg-icons";
|
|
10
9
|
export const NotificationPopUp = ({ title, description, isVisible, hide, primaryButton, secondaryButton, layoutClassName, }) => {
|
|
@@ -18,7 +17,7 @@ export const NotificationPopUp = ({ title, description, isVisible, hide, primary
|
|
|
18
17
|
setAnimationVisible(true);
|
|
19
18
|
}, animationDuration);
|
|
20
19
|
};
|
|
21
|
-
const modal = (_jsxs("div", { style: { animationDuration: `${animationDuration}ms` }, className: clsx(styles.modal, animationVisible && styles.visible, layoutClassName), children: [_jsx(Heading3, { children: title }), _jsx(Paragraph, { children: description }), _jsxs("div", { className: styles.buttons, children: [secondaryButton && (_jsx("div", { onClick: () => handleClick(secondaryButton.handleClick), className: secondaryButton.layoutClassName, children: _jsxs(Link, { className: styles.link, children: [secondaryButton.icon ?? _jsx(FontAwesomeIcon, { icon: faClose }), secondaryButton.label] }) })),
|
|
20
|
+
const modal = (_jsxs("div", { style: { animationDuration: `${animationDuration}ms` }, className: clsx(styles.modal, animationVisible && styles.visible, layoutClassName), children: [_jsx(Heading3, { children: title }), _jsx(Paragraph, { children: description }), _jsxs("div", { className: styles.buttons, children: [secondaryButton && (_jsx("div", { onClick: () => handleClick(secondaryButton.handleClick), className: secondaryButton.layoutClassName, children: _jsxs(Link, { className: styles.link, children: [secondaryButton.icon ?? _jsx(FontAwesomeIcon, { icon: faClose }), secondaryButton.label] }) })), _jsxs(Button, { onClick: () => handleClick(primaryButton.handleClick), className: clsx(styles.button, primaryButton.layoutClassName), children: [primaryButton.icon ?? _jsx(FontAwesomeIcon, { icon: faArrowRight }), primaryButton.label] })] })] }));
|
|
22
21
|
return isVisible ? ReactDOM.createPortal(modal, document.body) : null;
|
|
23
22
|
};
|
|
24
23
|
export const NotificationPopUpController = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduction/components",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -23,12 +23,6 @@
|
|
|
23
23
|
"@fortawesome/fontawesome-svg-core": "^6.2.0",
|
|
24
24
|
"@fortawesome/free-solid-svg-icons": "^6.2.0",
|
|
25
25
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
26
|
-
"@gemeente-denhaag/button": "0.2.3-alpha.205",
|
|
27
|
-
"@gemeente-denhaag/form-field": "0.1.1-alpha.98",
|
|
28
|
-
"@gemeente-denhaag/process-steps": "0.1.0-alpha.51",
|
|
29
|
-
"@gemeente-denhaag/sidenav": "0.1.0-alpha.40",
|
|
30
|
-
"@gemeente-denhaag/textarea": "0.1.1-alpha.95",
|
|
31
|
-
"@gemeente-denhaag/textfield": "0.2.3-alpha.205",
|
|
32
26
|
"@utrecht/component-library-react": "^1.0.0-alpha.319",
|
|
33
27
|
"clsx": "^1.1.1",
|
|
34
28
|
"gatsby": "^4.11.1",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
user-select: none;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.container > li > a {
|
|
62
|
+
.container > li:not(.previous):not(.next) > a {
|
|
63
63
|
color: var(--conduction-pagination-item-color);
|
|
64
64
|
background-color: var(--conduction-pagination-item-background-color);
|
|
65
65
|
border-radius: var(--conduction-pagination-item-border-radius);
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
cursor: pointer;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
.container > li:hover:not(.disabled):not(.currentPage) > a {
|
|
102
|
+
.container > li:hover:not(.disabled):not(.currentPage):not(.next):not(.previous) > a {
|
|
103
103
|
color: var(--conduction-pagination-page-hover-color);
|
|
104
104
|
background-color: var(--conduction-pagination-page-hover-background-color);
|
|
105
105
|
text-decoration: var(--conduction-pagination-page-hover-text-decoration);
|
|
@@ -3,7 +3,7 @@ import * as styles from "./Pagination.module.css";
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
|
|
5
5
|
import ReactPaginate from "react-paginate";
|
|
6
|
-
import Button from "@
|
|
6
|
+
import { Button } from "@utrecht/component-library-react";
|
|
7
7
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
8
8
|
import { faChevronRight, faChevronLeft } from "@fortawesome/free-solid-svg-icons";
|
|
9
9
|
|
|
@@ -29,6 +29,8 @@ export const Pagination: React.FC<PaginationProps> = ({ totalPages, currentPage,
|
|
|
29
29
|
disableInitialCallback
|
|
30
30
|
marginPagesDisplayed={2}
|
|
31
31
|
breakLabel="..."
|
|
32
|
+
nextClassName={styles.next}
|
|
33
|
+
previousClassName={styles.previous}
|
|
32
34
|
nextLabel={
|
|
33
35
|
<Button className={styles.button}>
|
|
34
36
|
<FontAwesomeIcon icon={faChevronRight} />
|
|
@@ -2,7 +2,6 @@ import * as React from "react";
|
|
|
2
2
|
import * as styles from "./CreateKeyValue.module.css";
|
|
3
3
|
import { Control, Controller, FieldValues } from "react-hook-form";
|
|
4
4
|
import { IReactHookFormProps } from "../types";
|
|
5
|
-
import { Button } from "@gemeente-denhaag/button";
|
|
6
5
|
import {
|
|
7
6
|
Table,
|
|
8
7
|
TableBody,
|
|
@@ -10,6 +9,8 @@ import {
|
|
|
10
9
|
TableHeaderCell,
|
|
11
10
|
TableHeader,
|
|
12
11
|
TableRow,
|
|
12
|
+
Textbox,
|
|
13
|
+
Button,
|
|
13
14
|
} from "@utrecht/component-library-react/dist/css-module";
|
|
14
15
|
import { ToolTip } from "../../toolTip/ToolTip";
|
|
15
16
|
import clsx from "clsx";
|
|
@@ -136,7 +137,7 @@ const KeyValueComponent = ({
|
|
|
136
137
|
<Button
|
|
137
138
|
{...{ disabled }}
|
|
138
139
|
onClick={() => handleCopyToClipboard(keyValue.value, idx)}
|
|
139
|
-
|
|
140
|
+
appearance={currentCopyIdx === idx ? "secondary-action-button" : "primary-action-button"}
|
|
140
141
|
>
|
|
141
142
|
<FontAwesomeIcon icon={faCopy} />
|
|
142
143
|
</Button>
|
|
@@ -160,22 +161,20 @@ const KeyValueComponent = ({
|
|
|
160
161
|
)}
|
|
161
162
|
|
|
162
163
|
<div className={styles.form}>
|
|
163
|
-
<
|
|
164
|
+
<Textbox
|
|
164
165
|
type="text"
|
|
165
166
|
placeholder="Key"
|
|
166
167
|
value={currentKey}
|
|
167
168
|
ref={currentKeyRef}
|
|
168
|
-
className="denhaag-textfield__input"
|
|
169
169
|
onChange={(e) => setCurrentKey(e.target.value)}
|
|
170
170
|
{...{ disabled }}
|
|
171
171
|
/>
|
|
172
172
|
|
|
173
|
-
<
|
|
173
|
+
<Textbox
|
|
174
174
|
type="text"
|
|
175
175
|
placeholder="Value"
|
|
176
176
|
value={currentValue}
|
|
177
177
|
ref={currentValueRef}
|
|
178
|
-
className="denhaag-textfield__input"
|
|
179
178
|
onChange={(e) => setCurrentValue(e.target.value)}
|
|
180
179
|
{...{ disabled }}
|
|
181
180
|
/>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as styles from "./NotificationPopUp.module.css";
|
|
3
3
|
import ReactDOM from "react-dom";
|
|
4
|
-
import { Button } from "@gemeente-denhaag/button";
|
|
5
4
|
import clsx from "clsx";
|
|
6
|
-
import { Heading3, Link, Paragraph } from "@utrecht/component-library-react";
|
|
5
|
+
import { Heading3, Link, Paragraph, Button } from "@utrecht/component-library-react";
|
|
7
6
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
8
7
|
import { faArrowRight, faClose } from "@fortawesome/free-solid-svg-icons";
|
|
9
8
|
|
|
@@ -69,10 +68,10 @@ export const NotificationPopUp = ({
|
|
|
69
68
|
)}
|
|
70
69
|
|
|
71
70
|
<Button
|
|
72
|
-
icon={primaryButton.icon ?? <FontAwesomeIcon icon={faArrowRight} />}
|
|
73
71
|
onClick={() => handleClick(primaryButton.handleClick)}
|
|
74
|
-
className={primaryButton.layoutClassName}
|
|
72
|
+
className={clsx(styles.button, primaryButton.layoutClassName)}
|
|
75
73
|
>
|
|
74
|
+
{primaryButton.icon ?? <FontAwesomeIcon icon={faArrowRight} />}
|
|
76
75
|
{primaryButton.label}
|
|
77
76
|
</Button>
|
|
78
77
|
</div>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as styles from "./DownloadCard.module.css";
|
|
3
|
-
import { DownloadIcon } from "@gemeente-denhaag/icons";
|
|
4
|
-
import { Link } from "@gemeente-denhaag/link";
|
|
5
|
-
import clsx from "clsx";
|
|
6
|
-
import { useTranslation } from "react-i18next";
|
|
7
|
-
export const DownloadCard = ({ icon, label, sizeKb, layoutClassName }) => {
|
|
8
|
-
const { t } = useTranslation();
|
|
9
|
-
return (_jsxs("div", { className: clsx(styles.container, [layoutClassName && layoutClassName]), children: [_jsxs("div", { className: styles.content, children: [_jsx("div", { className: styles.icon, children: icon }), _jsxs("div", { children: [label, " (", sizeKb, "kb)"] })] }), _jsx(Link, { icon: _jsx(DownloadIcon, {}), iconAlign: "start", children: t("Download") })] }));
|
|
10
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as styles from "./HorizontalImageCard.module.css";
|
|
3
|
-
import clsx from "clsx";
|
|
4
|
-
import { Link } from "@gemeente-denhaag/link";
|
|
5
|
-
import { navigate } from "gatsby";
|
|
6
|
-
import { ExternalLinkIcon, ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
7
|
-
export const HorizontalImageCard = ({ title, layoutClassName, external, link, iconOrImage, }) => {
|
|
8
|
-
return (_jsxs("div", { className: clsx(styles.container, [layoutClassName && layoutClassName]), onClick: () => navigate(link.href), children: [_jsx("div", { className: styles.imageOrIconContainer, children: iconOrImage }), _jsxs("div", { className: styles.link, children: [_jsx("div", { className: styles.title, children: title }), _jsx(Link, { icon: external ? _jsx(ExternalLinkIcon, {}) : _jsx(ArrowRightIcon, {}), iconAlign: "start", children: link.label })] })] }));
|
|
9
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as styles from "./ImageAndDetailsCard.module.css";
|
|
3
|
-
import clsx from "clsx";
|
|
4
|
-
import { Link } from "@gemeente-denhaag/link";
|
|
5
|
-
import { navigate } from "gatsby";
|
|
6
|
-
import { ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
7
|
-
export const ImageAndDetailsCard = ({ image, title, subHeader, introduction, link, layoutClassName, }) => {
|
|
8
|
-
return (_jsxs("div", { className: clsx(styles.container, [layoutClassName && layoutClassName]), onClick: () => navigate(link.href), children: [_jsx("div", { className: styles.image, children: image }), _jsxs("div", { className: styles.content, children: [_jsxs("div", { children: [_jsx("div", { className: styles.title, children: title }), _jsx("span", { className: styles.subHeader, children: subHeader })] }), _jsx("div", { className: styles.introduction, children: introduction }), _jsx("div", { className: styles.link, children: _jsx(Link, { icon: _jsx(ArrowRightIcon, {}), iconAlign: "start", children: link.label }) })] })] }));
|
|
9
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DownloadCard } from "./downloadCard/DownloadCard";
|
|
2
|
-
import { HorizontalImageCard } from "./HorizontalImageCard/HorizontalImageCard";
|
|
3
|
-
import { ImageAndDetailsCard } from "./imageAndDetailsCard/ImageAndDetailsCard";
|
|
4
|
-
import { RichContentCard } from "./RichContentCard/RichContentCard";
|
|
5
|
-
export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard };
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* This is a wrapper element based on https://nl-design-system.github.io/denhaag/?path=/docs/css-navigation-breadcrumb--default-story
|
|
4
|
-
*
|
|
5
|
-
* IMPORTANT: DO NOT MAKE CHANGES TO THIS FILE, AS ALL CHANGES WILL BE LOST UPON PACKAGE IMPLEMENTATION
|
|
6
|
-
*
|
|
7
|
-
* Note: we do not use css modules here due to this component being a wrapper
|
|
8
|
-
*/
|
|
9
|
-
import { Link } from "gatsby";
|
|
10
|
-
import "./Breadcrumbs.css";
|
|
11
|
-
export const Breadcrumbs = ({ crumbs }) => {
|
|
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
|
-
});
|
|
27
|
-
};
|
|
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,4 +0,0 @@
|
|
|
1
|
-
import { InputText, InputPassword, InputEmail, InputDate, InputNumber } from "./input";
|
|
2
|
-
import { Textarea } from "./textarea";
|
|
3
|
-
import { InputCheckbox } from "./checkbox";
|
|
4
|
-
export { InputText, InputPassword, InputEmail, InputDate, InputNumber, InputCheckbox, Textarea };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { TextField } from "@gemeente-denhaag/textfield";
|
|
4
|
-
import { ShowIcon, HideIcon } from "@gemeente-denhaag/icons";
|
|
5
|
-
export const InputPassword = ({ disabled, name, validation, register, errors, }) => {
|
|
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, {}) }) }));
|
|
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] }));
|
|
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] }));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import clsx from "clsx";
|
|
3
|
-
import * as styles from "./imageDivider.module.css";
|
|
4
|
-
export const ImageDivider = ({ image, layoutClassName }) => {
|
|
5
|
-
return _jsx("img", { src: image, className: clsx(styles.divider, layoutClassName) });
|
|
6
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import clsx from "clsx";
|
|
3
|
-
import { Link } from "gatsby";
|
|
4
|
-
import * as styles from "./Logo.module.css";
|
|
5
|
-
export const AuthenticatedLogo = ({ layoutClassName, href }) => {
|
|
6
|
-
return (_jsx(Link, { className: styles.logoContainer, to: href ?? "#", children: _jsx("div", { className: clsx(styles.authenticatedLogo, styles.logo, layoutClassName) }) }));
|
|
7
|
-
};
|
|
8
|
-
export const UnauthenticatedLogo = ({ layoutClassName, href }) => {
|
|
9
|
-
return (_jsx(Link, { className: styles.logoContainer, to: href ?? "#", children: _jsx("div", { className: clsx(styles.unauthenticatedLogo, styles.logo, layoutClassName) }) }));
|
|
10
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as styles from "./MetaIcon.module.css";
|
|
3
|
-
export const MetaIcon = ({ icon, label, value }) => (_jsxs("div", { className: styles.container, children: [_jsx("span", { className: styles.icon, children: icon }), _jsx("span", { children: label }), _jsx("span", { className: styles.value, children: value })] }));
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { navigate } from "gatsby";
|
|
4
|
-
export const PrivateRoute = ({ children, isLoggedIn }) => {
|
|
5
|
-
const [authenticated, setAuthenticated] = React.useState(false);
|
|
6
|
-
React.useEffect(() => {
|
|
7
|
-
if (!isLoggedIn && window.location.pathname !== "/login") {
|
|
8
|
-
navigate("/login");
|
|
9
|
-
}
|
|
10
|
-
isLoggedIn && setAuthenticated(true);
|
|
11
|
-
}, [isLoggedIn]);
|
|
12
|
-
if (!authenticated)
|
|
13
|
-
return _jsx(_Fragment, {});
|
|
14
|
-
return _jsx(_Fragment, { children: children });
|
|
15
|
-
};
|