@conduction/components 1.0.9 → 1.0.12
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/notificationPopUp/NotificationPopUp.d.ts +22 -0
- package/lib/components/notificationPopUp/NotificationPopUp.js +31 -0
- package/lib/components/notificationPopUp/NotificationPopUp.module.css +56 -0
- package/lib/components/topNav/TopNav.d.ts +9 -9
- package/lib/components/topNav/TopNav.js +6 -6
- package/lib/components/topNav/TopNav.module.css +60 -11
- package/lib/index.d.ts +10 -1
- package/lib/index.js +3 -1
- package/package.json +1 -1
- package/src/components/notificationPopUp/NotificationPopUp.module.css +56 -0
- package/src/components/notificationPopUp/NotificationPopUp.tsx +82 -0
- package/src/components/topNav/TopNav.module.css +60 -11
- package/src/components/topNav/TopNav.tsx +33 -34
- package/src/index.ts +8 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface NotificationPopUpProps {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string | JSX.Element;
|
|
5
|
+
isVisible: boolean;
|
|
6
|
+
hide: () => void;
|
|
7
|
+
primaryButton: {
|
|
8
|
+
label: string;
|
|
9
|
+
handleClick: () => any;
|
|
10
|
+
};
|
|
11
|
+
secondaryButton?: {
|
|
12
|
+
label: string;
|
|
13
|
+
handleClick: () => any;
|
|
14
|
+
};
|
|
15
|
+
layoutClassName?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const NotificationPopUp: React.FC<NotificationPopUpProps>;
|
|
18
|
+
export declare const NotificationPopUpController: () => {
|
|
19
|
+
isVisible: boolean;
|
|
20
|
+
show: () => void;
|
|
21
|
+
hide: () => void;
|
|
22
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as styles from "./NotificationPopUp.module.css";
|
|
4
|
+
import ReactDOM from "react-dom";
|
|
5
|
+
import { Button, Heading3, Link, Paragraph, StylesProvider } from "@gemeente-denhaag/components-react";
|
|
6
|
+
import clsx from "clsx";
|
|
7
|
+
import { CloseIcon, ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
8
|
+
export const NotificationPopUp = ({ title, description, isVisible, hide, primaryButton, secondaryButton, layoutClassName, }) => {
|
|
9
|
+
const [animationVisible, setAnimationVisible] = React.useState(true);
|
|
10
|
+
const animationDuration = parseInt(styles.animationDuration, 10);
|
|
11
|
+
const handleClick = (clickFunction) => {
|
|
12
|
+
setAnimationVisible(!setAnimationVisible);
|
|
13
|
+
clickFunction && clickFunction();
|
|
14
|
+
setTimeout(() => {
|
|
15
|
+
hide();
|
|
16
|
+
setAnimationVisible(true);
|
|
17
|
+
}, animationDuration);
|
|
18
|
+
};
|
|
19
|
+
const modal = (_jsx(StylesProvider, { children: _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), children: _jsx(Link, { icon: _jsx(CloseIcon, {}), iconAlign: "start", children: secondaryButton.label }) })), _jsx(Button, { icon: _jsx(ArrowRightIcon, {}), onClick: () => handleClick(primaryButton.handleClick), children: primaryButton.label })] })] }) }));
|
|
20
|
+
return isVisible ? ReactDOM.createPortal(modal, document.body) : null;
|
|
21
|
+
};
|
|
22
|
+
export const NotificationPopUpController = () => {
|
|
23
|
+
const [isVisible, setIsVisible] = React.useState(false);
|
|
24
|
+
const show = () => setIsVisible(true);
|
|
25
|
+
const hide = () => setIsVisible(false);
|
|
26
|
+
return {
|
|
27
|
+
isVisible,
|
|
28
|
+
show,
|
|
29
|
+
hide,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
:export {
|
|
2
|
+
animationDuration: 200ms;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.modal {
|
|
6
|
+
animation-fill-mode: both;
|
|
7
|
+
background: var(--denhaag-color-warmgrey-1);
|
|
8
|
+
padding-inline-start: var(--nlportal-space-inline-lg);
|
|
9
|
+
padding-inline-end: var(--nlportal-space-inline-lg);
|
|
10
|
+
padding-block-start: var(--nlportal-space-block-lg);
|
|
11
|
+
padding-block-end: var(--nlportal-space-block-lg);
|
|
12
|
+
box-shadow: var(--conduction-notification-box-shadow);
|
|
13
|
+
border-radius: var(--nlportal-document-border-radius);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.modal > *:not(:last-child) {
|
|
17
|
+
margin-block-end: var(--nlportal-space-block-md);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.buttons {
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: flex-end;
|
|
23
|
+
align-items: center;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.buttons > *:not(:last-child) {
|
|
27
|
+
margin-inline-end: var(--nlportal-space-inline-md);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.visible {
|
|
31
|
+
animation-name: fadeInBottom;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@keyframes fadeInBottom {
|
|
35
|
+
from {
|
|
36
|
+
opacity: 0;
|
|
37
|
+
transform: translateY(100%);
|
|
38
|
+
}
|
|
39
|
+
to {
|
|
40
|
+
opacity: 1;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.modal:not(.visible) {
|
|
45
|
+
animation-name: fadeOutBottom;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@keyframes fadeOutBottom {
|
|
49
|
+
from {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
to {
|
|
53
|
+
opacity: 0;
|
|
54
|
+
transform: translateY(100%);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
interface TopNavProps {
|
|
3
|
+
items: {
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: JSX.Element;
|
|
6
|
+
handleClick: () => any;
|
|
7
|
+
}[];
|
|
8
|
+
layoutClassName?: string;
|
|
6
9
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
export declare const PrimaryTopNav: React.FC<TopNavItemsProps>;
|
|
11
|
-
export declare const SecondaryTopNav: React.FC<TopNavItemsProps>;
|
|
10
|
+
export declare const PrimaryTopNav: React.FC<TopNavProps>;
|
|
11
|
+
export declare const SecondaryTopNav: React.FC<TopNavProps>;
|
|
12
12
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as styles from "./TopNav.module.css";
|
|
3
2
|
import { Link } from "@gemeente-denhaag/components-react";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import * as styles from "./TopNav.module.css";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
export const PrimaryTopNav = ({ items, layoutClassName }) => {
|
|
6
|
+
return (_jsx("div", { className: clsx(styles.primary, layoutClassName && layoutClassName), children: _jsx("nav", { className: styles.primary, children: _jsx("ul", { className: styles.ul, children: items.map(({ label, icon, handleClick }, idx) => (_jsx("li", { className: styles.li, onClick: handleClick, children: _jsx(Link, { className: styles.link, icon: icon, iconAlign: "start", children: label }) }, idx))) }) }) }));
|
|
7
7
|
};
|
|
8
|
-
export const SecondaryTopNav = ({ items }) => {
|
|
9
|
-
return (_jsx("nav", { children: _jsx("ul", { className: styles.ul, children: items.map(({ label,
|
|
8
|
+
export const SecondaryTopNav = ({ items, layoutClassName }) => {
|
|
9
|
+
return (_jsx("div", { className: clsx(styles.secondary, layoutClassName && layoutClassName), children: _jsx("nav", { children: _jsx("ul", { className: styles.ul, children: items.map(({ label, icon, handleClick }, idx) => (_jsx("li", { className: styles.li, onClick: handleClick, children: _jsx(Link, { className: styles.link, icon: icon, iconAlign: "start", children: label }) }, idx))) }) }) }));
|
|
10
10
|
};
|
|
@@ -1,22 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-top-nav-space-inline-lg: 1.25rem;
|
|
3
|
+
|
|
4
|
+
--conduction-top-nav-color-primary: #ffffff;
|
|
5
|
+
--conduction-top-nav-background-color-primary: #0b71a1;
|
|
6
|
+
--conduction-top-nav-background-color-primary-hover: rgba(255, 255, 255, 0.2);
|
|
7
|
+
|
|
8
|
+
--conduction-top-nav-font-size-secondary: 16px;
|
|
9
|
+
--conduction-top-nav-color-secondary: #ffffff;
|
|
10
|
+
--conduction-top-nav-background-color-secondary: #084f70;
|
|
11
|
+
--conduction-top-nav-background-color-secondary-hover: rgba(0, 0, 0, 0.2);
|
|
3
12
|
}
|
|
4
13
|
|
|
5
|
-
|
|
6
|
-
|
|
14
|
+
/*
|
|
15
|
+
* Global
|
|
16
|
+
*/
|
|
17
|
+
.primary:hover,
|
|
18
|
+
.secondary:hover {
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ul {
|
|
23
|
+
margin: unset;
|
|
24
|
+
display: flex;
|
|
25
|
+
padding-inline-start: unset;
|
|
26
|
+
align-items: center;
|
|
7
27
|
}
|
|
8
28
|
|
|
9
29
|
.li {
|
|
10
30
|
list-style-type: none;
|
|
11
|
-
|
|
12
|
-
padding-
|
|
31
|
+
display: block;
|
|
32
|
+
padding-inline-start: var(--conduction-top-nav-space-inline-lg);
|
|
33
|
+
padding-inline-end: var(--conduction-top-nav-space-inline-lg);
|
|
34
|
+
padding-block-start: var(--conduction-top-nav-space-inline-lg);
|
|
35
|
+
padding-block-end: var(--conduction-top-nav-space-inline-lg);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
* Primary Top Navigation
|
|
40
|
+
*/
|
|
41
|
+
.primary {
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
width: fit-content;
|
|
44
|
+
background-color: var(--conduction-top-nav-background-color-primary);
|
|
13
45
|
}
|
|
14
46
|
|
|
15
|
-
.
|
|
16
|
-
|
|
17
|
-
color: var(--conduction-navbar-color);
|
|
47
|
+
.primary .link {
|
|
48
|
+
color: var(--conduction-top-nav-color-primary);
|
|
18
49
|
}
|
|
19
50
|
|
|
20
|
-
.primary {
|
|
21
|
-
|
|
51
|
+
.primary .li:hover {
|
|
52
|
+
background-color: var(--conduction-top-nav-background-color-primary-hover);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* Secondary Top Navigation
|
|
57
|
+
*/
|
|
58
|
+
.secondary {
|
|
59
|
+
font-weight: 100;
|
|
60
|
+
width: fit-content;
|
|
61
|
+
font-size: var(--conduction-top-nav-font-size-secondary);
|
|
62
|
+
background-color: var(--conduction-top-nav-background-color-secondary);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.secondary .link {
|
|
66
|
+
color: var(--conduction-top-nav-color-secondary);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.secondary .li:hover {
|
|
70
|
+
background-color: var(--conduction-top-nav-background-color-secondary-hover);
|
|
22
71
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard } from "./components/card";
|
|
2
3
|
import { Container } from "./components/container/Container";
|
|
3
4
|
import { Breadcrumbs } from "./components/denhaag-wrappers/breadcrumbs/Breadcrumbs";
|
|
@@ -10,4 +11,12 @@ import { PrivateRoute } from "./components/privateRoute/PrivateRoute";
|
|
|
10
11
|
import { StatusSteps } from "./components/statusSteps/StatusSteps";
|
|
11
12
|
import { PrimaryTopNav, SecondaryTopNav } from "./components/topNav/TopNav";
|
|
12
13
|
import { Tag } from "./components/tag/Tag";
|
|
13
|
-
|
|
14
|
+
declare const NotificationPopUp: {
|
|
15
|
+
controller: () => {
|
|
16
|
+
isVisible: boolean;
|
|
17
|
+
show: () => void;
|
|
18
|
+
hide: () => void;
|
|
19
|
+
};
|
|
20
|
+
NotificationPopUp: import("react").FC<import("./components/notificationPopUp/NotificationPopUp").NotificationPopUpProps>;
|
|
21
|
+
};
|
|
22
|
+
export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, };
|
package/lib/index.js
CHANGED
|
@@ -10,4 +10,6 @@ import { PrivateRoute } from "./components/privateRoute/PrivateRoute";
|
|
|
10
10
|
import { StatusSteps } from "./components/statusSteps/StatusSteps";
|
|
11
11
|
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
|
+
const NotificationPopUp = { controller: NotificationPopUpController, NotificationPopUp: _NotificationPopUp };
|
|
15
|
+
export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, };
|
package/package.json
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
:export {
|
|
2
|
+
animationDuration: 200ms;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.modal {
|
|
6
|
+
animation-fill-mode: both;
|
|
7
|
+
background: var(--denhaag-color-warmgrey-1);
|
|
8
|
+
padding-inline-start: var(--nlportal-space-inline-lg);
|
|
9
|
+
padding-inline-end: var(--nlportal-space-inline-lg);
|
|
10
|
+
padding-block-start: var(--nlportal-space-block-lg);
|
|
11
|
+
padding-block-end: var(--nlportal-space-block-lg);
|
|
12
|
+
box-shadow: var(--conduction-notification-box-shadow);
|
|
13
|
+
border-radius: var(--nlportal-document-border-radius);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.modal > *:not(:last-child) {
|
|
17
|
+
margin-block-end: var(--nlportal-space-block-md);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.buttons {
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: flex-end;
|
|
23
|
+
align-items: center;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.buttons > *:not(:last-child) {
|
|
27
|
+
margin-inline-end: var(--nlportal-space-inline-md);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.visible {
|
|
31
|
+
animation-name: fadeInBottom;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@keyframes fadeInBottom {
|
|
35
|
+
from {
|
|
36
|
+
opacity: 0;
|
|
37
|
+
transform: translateY(100%);
|
|
38
|
+
}
|
|
39
|
+
to {
|
|
40
|
+
opacity: 1;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.modal:not(.visible) {
|
|
45
|
+
animation-name: fadeOutBottom;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@keyframes fadeOutBottom {
|
|
49
|
+
from {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
to {
|
|
53
|
+
opacity: 0;
|
|
54
|
+
transform: translateY(100%);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as styles from "./NotificationPopUp.module.css";
|
|
3
|
+
import ReactDOM from "react-dom";
|
|
4
|
+
import { Button, Heading3, Link, Paragraph, StylesProvider } from "@gemeente-denhaag/components-react";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
import { CloseIcon, ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
7
|
+
|
|
8
|
+
export interface NotificationPopUpProps {
|
|
9
|
+
title: string;
|
|
10
|
+
description: string | JSX.Element;
|
|
11
|
+
isVisible: boolean;
|
|
12
|
+
hide: () => void;
|
|
13
|
+
primaryButton: {
|
|
14
|
+
label: string;
|
|
15
|
+
handleClick: () => any;
|
|
16
|
+
};
|
|
17
|
+
secondaryButton?: {
|
|
18
|
+
label: string;
|
|
19
|
+
handleClick: () => any;
|
|
20
|
+
};
|
|
21
|
+
layoutClassName?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const NotificationPopUp: React.FC<NotificationPopUpProps> = ({
|
|
25
|
+
title,
|
|
26
|
+
description,
|
|
27
|
+
isVisible,
|
|
28
|
+
hide,
|
|
29
|
+
primaryButton,
|
|
30
|
+
secondaryButton,
|
|
31
|
+
layoutClassName,
|
|
32
|
+
}) => {
|
|
33
|
+
const [animationVisible, setAnimationVisible] = React.useState<boolean>(true);
|
|
34
|
+
|
|
35
|
+
const animationDuration = parseInt(styles.animationDuration, 10);
|
|
36
|
+
|
|
37
|
+
const handleClick = (clickFunction?: () => any) => {
|
|
38
|
+
setAnimationVisible(!setAnimationVisible);
|
|
39
|
+
clickFunction && clickFunction();
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
hide();
|
|
42
|
+
setAnimationVisible(true);
|
|
43
|
+
}, animationDuration);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const modal = (
|
|
47
|
+
<StylesProvider>
|
|
48
|
+
<div
|
|
49
|
+
style={{ animationDuration: `${animationDuration}ms` }}
|
|
50
|
+
className={clsx(styles.modal, animationVisible && styles.visible, layoutClassName)}
|
|
51
|
+
>
|
|
52
|
+
<Heading3>{title}</Heading3>
|
|
53
|
+
<Paragraph>{description}</Paragraph>
|
|
54
|
+
<div className={styles.buttons}>
|
|
55
|
+
{secondaryButton && (
|
|
56
|
+
<div onClick={() => handleClick(secondaryButton.handleClick)}>
|
|
57
|
+
<Link icon={<CloseIcon />} iconAlign="start">
|
|
58
|
+
{secondaryButton.label}
|
|
59
|
+
</Link>
|
|
60
|
+
</div>
|
|
61
|
+
)}
|
|
62
|
+
<Button icon={<ArrowRightIcon />} onClick={() => handleClick(primaryButton.handleClick)}>
|
|
63
|
+
{primaryButton.label}
|
|
64
|
+
</Button>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</StylesProvider>
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
return isVisible ? ReactDOM.createPortal(modal, document.body) : null;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const NotificationPopUpController = () => {
|
|
74
|
+
const [isVisible, setIsVisible] = React.useState<boolean>(false);
|
|
75
|
+
const show = () => setIsVisible(true);
|
|
76
|
+
const hide = () => setIsVisible(false);
|
|
77
|
+
return {
|
|
78
|
+
isVisible,
|
|
79
|
+
show,
|
|
80
|
+
hide,
|
|
81
|
+
};
|
|
82
|
+
};
|
|
@@ -1,22 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-top-nav-space-inline-lg: 1.25rem;
|
|
3
|
+
|
|
4
|
+
--conduction-top-nav-color-primary: #ffffff;
|
|
5
|
+
--conduction-top-nav-background-color-primary: #0b71a1;
|
|
6
|
+
--conduction-top-nav-background-color-primary-hover: rgba(255, 255, 255, 0.2);
|
|
7
|
+
|
|
8
|
+
--conduction-top-nav-font-size-secondary: 16px;
|
|
9
|
+
--conduction-top-nav-color-secondary: #ffffff;
|
|
10
|
+
--conduction-top-nav-background-color-secondary: #084f70;
|
|
11
|
+
--conduction-top-nav-background-color-secondary-hover: rgba(0, 0, 0, 0.2);
|
|
3
12
|
}
|
|
4
13
|
|
|
5
|
-
|
|
6
|
-
|
|
14
|
+
/*
|
|
15
|
+
* Global
|
|
16
|
+
*/
|
|
17
|
+
.primary:hover,
|
|
18
|
+
.secondary:hover {
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ul {
|
|
23
|
+
margin: unset;
|
|
24
|
+
display: flex;
|
|
25
|
+
padding-inline-start: unset;
|
|
26
|
+
align-items: center;
|
|
7
27
|
}
|
|
8
28
|
|
|
9
29
|
.li {
|
|
10
30
|
list-style-type: none;
|
|
11
|
-
|
|
12
|
-
padding-
|
|
31
|
+
display: block;
|
|
32
|
+
padding-inline-start: var(--conduction-top-nav-space-inline-lg);
|
|
33
|
+
padding-inline-end: var(--conduction-top-nav-space-inline-lg);
|
|
34
|
+
padding-block-start: var(--conduction-top-nav-space-inline-lg);
|
|
35
|
+
padding-block-end: var(--conduction-top-nav-space-inline-lg);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
* Primary Top Navigation
|
|
40
|
+
*/
|
|
41
|
+
.primary {
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
width: fit-content;
|
|
44
|
+
background-color: var(--conduction-top-nav-background-color-primary);
|
|
13
45
|
}
|
|
14
46
|
|
|
15
|
-
.
|
|
16
|
-
|
|
17
|
-
color: var(--conduction-navbar-color);
|
|
47
|
+
.primary .link {
|
|
48
|
+
color: var(--conduction-top-nav-color-primary);
|
|
18
49
|
}
|
|
19
50
|
|
|
20
|
-
.primary {
|
|
21
|
-
|
|
51
|
+
.primary .li:hover {
|
|
52
|
+
background-color: var(--conduction-top-nav-background-color-primary-hover);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* Secondary Top Navigation
|
|
57
|
+
*/
|
|
58
|
+
.secondary {
|
|
59
|
+
font-weight: 100;
|
|
60
|
+
width: fit-content;
|
|
61
|
+
font-size: var(--conduction-top-nav-font-size-secondary);
|
|
62
|
+
background-color: var(--conduction-top-nav-background-color-secondary);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.secondary .link {
|
|
66
|
+
color: var(--conduction-top-nav-color-secondary);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.secondary .li:hover {
|
|
70
|
+
background-color: var(--conduction-top-nav-background-color-secondary-hover);
|
|
22
71
|
}
|
|
@@ -1,46 +1,45 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as styles from "./TopNav.module.css";
|
|
3
2
|
import { Link } from "@gemeente-denhaag/components-react";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
export interface ITopNavItem {
|
|
7
|
-
label: string;
|
|
8
|
-
href: string;
|
|
9
|
-
icon?: JSX.Element;
|
|
10
|
-
}
|
|
3
|
+
import * as styles from "./TopNav.module.css";
|
|
4
|
+
import clsx from "clsx";
|
|
11
5
|
|
|
12
|
-
interface
|
|
13
|
-
items:
|
|
6
|
+
interface TopNavProps {
|
|
7
|
+
items: { label: string; icon?: JSX.Element; handleClick: () => any }[];
|
|
8
|
+
layoutClassName?: string;
|
|
14
9
|
}
|
|
15
10
|
|
|
16
|
-
export const PrimaryTopNav: React.FC<
|
|
11
|
+
export const PrimaryTopNav: React.FC<TopNavProps> = ({ items, layoutClassName }) => {
|
|
17
12
|
return (
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
{
|
|
21
|
-
|
|
22
|
-
<
|
|
23
|
-
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
<div className={clsx(styles.primary, layoutClassName && layoutClassName)}>
|
|
14
|
+
<nav className={styles.primary}>
|
|
15
|
+
<ul className={styles.ul}>
|
|
16
|
+
{items.map(({ label, icon, handleClick }, idx) => (
|
|
17
|
+
<li className={styles.li} key={idx} onClick={handleClick}>
|
|
18
|
+
<Link className={styles.link} icon={icon} iconAlign="start">
|
|
19
|
+
{label}
|
|
20
|
+
</Link>
|
|
21
|
+
</li>
|
|
22
|
+
))}
|
|
23
|
+
</ul>
|
|
24
|
+
</nav>
|
|
25
|
+
</div>
|
|
29
26
|
);
|
|
30
27
|
};
|
|
31
28
|
|
|
32
|
-
export const SecondaryTopNav: React.FC<
|
|
29
|
+
export const SecondaryTopNav: React.FC<TopNavProps> = ({ items, layoutClassName }) => {
|
|
33
30
|
return (
|
|
34
|
-
<
|
|
35
|
-
<
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
<
|
|
39
|
-
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
<div className={clsx(styles.secondary, layoutClassName && layoutClassName)}>
|
|
32
|
+
<nav>
|
|
33
|
+
<ul className={styles.ul}>
|
|
34
|
+
{items.map(({ label, icon, handleClick }, idx) => (
|
|
35
|
+
<li className={styles.li} key={idx} onClick={handleClick}>
|
|
36
|
+
<Link className={styles.link} icon={icon} iconAlign="start">
|
|
37
|
+
{label}
|
|
38
|
+
</Link>
|
|
39
|
+
</li>
|
|
40
|
+
))}
|
|
41
|
+
</ul>
|
|
42
|
+
</nav>
|
|
43
|
+
</div>
|
|
45
44
|
);
|
|
46
45
|
};
|
package/src/index.ts
CHANGED
|
@@ -25,6 +25,13 @@ import { StatusSteps } from "./components/statusSteps/StatusSteps";
|
|
|
25
25
|
import { PrimaryTopNav, SecondaryTopNav } from "./components/topNav/TopNav";
|
|
26
26
|
import { Tag } from "./components/tag/Tag";
|
|
27
27
|
|
|
28
|
+
import {
|
|
29
|
+
NotificationPopUpController,
|
|
30
|
+
NotificationPopUp as _NotificationPopUp,
|
|
31
|
+
} from "./components/notificationPopUp/NotificationPopUp";
|
|
32
|
+
|
|
33
|
+
const NotificationPopUp = { controller: NotificationPopUpController, NotificationPopUp: _NotificationPopUp };
|
|
34
|
+
|
|
28
35
|
export {
|
|
29
36
|
DownloadCard,
|
|
30
37
|
HorizontalImageCard,
|
|
@@ -50,4 +57,5 @@ export {
|
|
|
50
57
|
PrimaryTopNav,
|
|
51
58
|
SecondaryTopNav,
|
|
52
59
|
Tag,
|
|
60
|
+
NotificationPopUp,
|
|
53
61
|
};
|