@conduction/components 2.1.23 → 2.1.26
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 +3 -0
- package/lib/components/card/detailsCard/DetailsCard.js +1 -1
- package/lib/components/card/downloadCard/DownloadCard.js +1 -1
- package/lib/components/card/horizontalImageCard/HorizontalImageCard.js +1 -1
- package/lib/components/card/imageAndDetailsCard/ImageAndDetailsCard.js +1 -1
- package/lib/components/card/richContentCard/RichContentCard.js +2 -1
- package/lib/components/editableTableRow/EditableTableRow.js +1 -1
- package/lib/components/formFields/createKeyValue/CreateKeyValue.js +1 -1
- package/lib/components/formFields/input.js +1 -1
- package/lib/components/formFields/radio.js +1 -1
- package/lib/components/formFields/select/select.d.ts +4 -3
- package/lib/components/formFields/select/select.js +6 -6
- package/lib/components/notificationPopUp/NotificationPopUp.js +4 -1
- package/lib/components/topNav/primaryTopNav/PrimaryTopNav.js +1 -1
- package/lib/components/topNav/primaryTopNav/PrimaryTopNav.module.css +157 -145
- package/lib/components/topNav/secondaryTopNav/SecondaryTopNav.js +1 -1
- package/package.json +15 -14
- package/src/components/card/detailsCard/DetailsCard.tsx +1 -1
- package/src/components/card/downloadCard/DownloadCard.js +10 -10
- package/src/components/card/downloadCard/DownloadCard.tsx +1 -1
- package/src/components/card/horizontalImageCard/HorizontalImageCard.js +9 -9
- package/src/components/card/horizontalImageCard/HorizontalImageCard.tsx +1 -1
- package/src/components/card/imageAndDetailsCard/ImageAndDetailsCard.js +9 -9
- package/src/components/card/imageAndDetailsCard/ImageAndDetailsCard.tsx +1 -1
- package/src/components/card/richContentCard/RichContentCard.js +18 -17
- package/src/components/card/richContentCard/RichContentCard.tsx +2 -1
- package/src/components/editableTableRow/EditableTableRow.js +34 -34
- package/src/components/editableTableRow/EditableTableRow.tsx +1 -1
- package/src/components/formFields/createKeyValue/CreateKeyValue.tsx +2 -1
- package/src/components/formFields/input.js +12 -12
- package/src/components/formFields/input.tsx +1 -1
- package/src/components/formFields/radio.tsx +1 -1
- package/src/components/formFields/select/select.tsx +8 -0
- package/src/components/notificationPopUp/NotificationPopUp.tsx +4 -1
- package/src/components/topNav/primaryTopNav/PrimaryTopNav.module.css +157 -145
- package/src/components/topNav/primaryTopNav/PrimaryTopNav.tsx +1 -1
- package/src/components/topNav/secondaryTopNav/SecondaryTopNav.tsx +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
- **Version 2.1 (breaking changes from 2.0.x)**
|
|
6
6
|
|
|
7
|
+
- 2.1.26: Avoid dependency on `@gemeente-denhaag/components-react`, only depend on components we actually use.
|
|
8
|
+
- 2.1.25: Added id prop to select component
|
|
9
|
+
- 2.1.24: Add new design tokens for topnav dropdown
|
|
7
10
|
- 2.1.23: Added optional error messages to CreateKeyValue and unused classname removed warning.
|
|
8
11
|
- 2.1.22: Added optional error messages to textarea, select and input fields.
|
|
9
12
|
- 2.1.21: Added optional copy button and refactored delete button in CreateKeyValue.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as styles from "./DetailsCard.module.css";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { Link } from "@gemeente-denhaag/
|
|
4
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
5
5
|
import { navigate } from "gatsby";
|
|
6
6
|
import { ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
7
7
|
import { Tag } from "../../tag/Tag";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as styles from "./DownloadCard.module.css";
|
|
3
3
|
import { DownloadIcon } from "@gemeente-denhaag/icons";
|
|
4
|
-
import { Link } from "@gemeente-denhaag/
|
|
4
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
export const DownloadCard = ({ icon, label, sizeKb, layoutClassName, downloadLabel, handleClick, }) => {
|
|
7
7
|
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("div", { onClick: handleClick, children: _jsx(Link, { icon: _jsx(DownloadIcon, {}), iconAlign: "start", children: downloadLabel }) })] }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as styles from "./HorizontalImageCard.module.css";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { Link } from "@gemeente-denhaag/
|
|
4
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
5
5
|
import { navigate } from "gatsby";
|
|
6
6
|
import { ExternalLinkIcon, ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
7
7
|
export const HorizontalImageCard = ({ title, layoutClassName, external, link, iconOrImage, }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as styles from "./ImageAndDetailsCard.module.css";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { Link } from "@gemeente-denhaag/
|
|
4
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
5
5
|
import { navigate } from "gatsby";
|
|
6
6
|
import { ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
7
7
|
export const ImageAndDetailsCard = ({ image, title, subHeader, introduction, link, layoutClassName, }) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Divider
|
|
2
|
+
import { Divider } from "@gemeente-denhaag/divider";
|
|
3
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
3
4
|
import { navigate } from "gatsby";
|
|
4
5
|
import * as styles from "./RichContentCard.module.css";
|
|
5
6
|
import { ExternalLinkIcon, ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { TableCell, TableHeader, TableRow } from "@gemeente-denhaag/table";
|
|
3
3
|
import * as styles from "./EditableTableRow.module.css";
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
import { Link } from "@gemeente-denhaag/
|
|
5
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
6
6
|
import { CheckedIcon, CloseIcon, EditIcon } from "@gemeente-denhaag/icons";
|
|
7
7
|
import { useForm } from "react-hook-form";
|
|
8
8
|
import { InputEmail, InputText } from "../formFields";
|
|
@@ -2,7 +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 "@gemeente-denhaag/
|
|
5
|
+
import { Button } from "@gemeente-denhaag/button";
|
|
6
6
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@gemeente-denhaag/table";
|
|
7
7
|
import { ToolTip } from "../../toolTip/ToolTip";
|
|
8
8
|
import clsx from "clsx";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { TextField } from "@gemeente-denhaag/
|
|
3
|
+
import { TextField } from "@gemeente-denhaag/textfield";
|
|
4
4
|
import { faEyeSlash, faEye } from "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
6
6
|
import { ErrorMessage } from "./errorMessage/ErrorMessage";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FormControlLabel } from "@gemeente-denhaag/
|
|
2
|
+
import { FormControlLabel } from "@gemeente-denhaag/formcontrollabel";
|
|
3
3
|
export const InputRadio = ({ name, validation, register, label, value, }) => (_jsx(FormControlLabel, { input: _jsx("input", { type: "radio", ...{ value }, ...register(name, { ...validation }) }), ...{ label } }));
|
|
@@ -8,12 +8,13 @@ interface ISelectProps {
|
|
|
8
8
|
value: string;
|
|
9
9
|
}[];
|
|
10
10
|
name: string;
|
|
11
|
+
id?: string;
|
|
11
12
|
defaultValue?: any;
|
|
12
13
|
disabled?: boolean;
|
|
13
14
|
isClearable?: boolean;
|
|
14
15
|
hideErrorMessage?: boolean;
|
|
15
16
|
}
|
|
16
|
-
export declare const SelectMultiple: ({ name, options, errors, control, validation, defaultValue, disabled, hideErrorMessage, }: ISelectProps & IReactHookFormProps) => JSX.Element;
|
|
17
|
-
export declare const SelectCreate: ({ name, options, errors, control, validation, defaultValue, disabled, hideErrorMessage, }: ISelectProps & IReactHookFormProps) => JSX.Element;
|
|
18
|
-
export declare const SelectSingle: ({ name, options, errors, control, validation, isClearable, defaultValue, disabled, hideErrorMessage, }: ISelectProps & IReactHookFormProps) => JSX.Element;
|
|
17
|
+
export declare const SelectMultiple: ({ id, name, options, errors, control, validation, defaultValue, disabled, hideErrorMessage, }: ISelectProps & IReactHookFormProps) => JSX.Element;
|
|
18
|
+
export declare const SelectCreate: ({ id, name, options, errors, control, validation, defaultValue, disabled, hideErrorMessage, }: ISelectProps & IReactHookFormProps) => JSX.Element;
|
|
19
|
+
export declare const SelectSingle: ({ id, name, options, errors, control, validation, isClearable, defaultValue, disabled, hideErrorMessage, }: ISelectProps & IReactHookFormProps) => JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -5,18 +5,18 @@ import ReactSelect from "react-select";
|
|
|
5
5
|
import CreatableSelect from "react-select/creatable";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import { ErrorMessage } from "../errorMessage/ErrorMessage";
|
|
8
|
-
export const SelectMultiple = ({ name, options, errors, control, validation, defaultValue, disabled, hideErrorMessage, }) => {
|
|
8
|
+
export const SelectMultiple = ({ id, name, options, errors, control, validation, defaultValue, disabled, hideErrorMessage, }) => {
|
|
9
9
|
return (_jsx(Controller, { ...{ control, name, defaultValue }, rules: validation, render: ({ field: { onChange, value } }) => {
|
|
10
|
-
return (_jsxs(_Fragment, { children: [_jsx(ReactSelect, { value: value ?? "", className: clsx(styles.select, errors[name] && styles.error), isMulti: true, isDisabled: disabled, ...{ options, onChange, errors }, menuPortalTarget: document.body, styles: { menuPortal: (base) => ({ ...base, zIndex: 100 }) }, placeholder: disabled ? "Disabled..." : "Select one or more options..." }), errors[name] && !hideErrorMessage && _jsx(ErrorMessage, { message: errors[name].message })] }));
|
|
10
|
+
return (_jsxs(_Fragment, { children: [_jsx(ReactSelect, { inputId: id, value: value ?? "", className: clsx(styles.select, errors[name] && styles.error), isMulti: true, isDisabled: disabled, ...{ options, onChange, errors }, menuPortalTarget: document.body, styles: { menuPortal: (base) => ({ ...base, zIndex: 100 }) }, placeholder: disabled ? "Disabled..." : "Select one or more options..." }), errors[name] && !hideErrorMessage && _jsx(ErrorMessage, { message: errors[name].message })] }));
|
|
11
11
|
} }));
|
|
12
12
|
};
|
|
13
|
-
export const SelectCreate = ({ name, options, errors, control, validation, defaultValue, disabled, hideErrorMessage, }) => {
|
|
13
|
+
export const SelectCreate = ({ id, name, options, errors, control, validation, defaultValue, disabled, hideErrorMessage, }) => {
|
|
14
14
|
return (_jsx(Controller, { ...{ control, name, defaultValue }, rules: validation, render: ({ field: { onChange, value } }) => {
|
|
15
|
-
return (_jsxs(_Fragment, { children: [_jsx(CreatableSelect, { value: value ?? "", placeholder: disabled ? "Disabled..." : "Select or create one or multiple options...", className: clsx(styles.select, errors[name] && styles.error), isMulti: true, isDisabled: disabled, ...{ options, onChange, errors }, menuPortalTarget: document.body, styles: { menuPortal: (base) => ({ ...base, zIndex: 100 }) } }), errors[name] && !hideErrorMessage && _jsx(ErrorMessage, { message: errors[name].message })] }));
|
|
15
|
+
return (_jsxs(_Fragment, { children: [_jsx(CreatableSelect, { inputId: id, value: value ?? "", placeholder: disabled ? "Disabled..." : "Select or create one or multiple options...", className: clsx(styles.select, errors[name] && styles.error), isMulti: true, isDisabled: disabled, ...{ options, onChange, errors }, menuPortalTarget: document.body, styles: { menuPortal: (base) => ({ ...base, zIndex: 100 }) } }), errors[name] && !hideErrorMessage && _jsx(ErrorMessage, { message: errors[name].message })] }));
|
|
16
16
|
} }));
|
|
17
17
|
};
|
|
18
|
-
export const SelectSingle = ({ name, options, errors, control, validation, isClearable, defaultValue, disabled, hideErrorMessage, }) => {
|
|
18
|
+
export const SelectSingle = ({ id, name, options, errors, control, validation, isClearable, defaultValue, disabled, hideErrorMessage, }) => {
|
|
19
19
|
return (_jsx(Controller, { ...{ control, name, defaultValue }, rules: validation, render: ({ field: { onChange, value } }) => {
|
|
20
|
-
return (_jsxs(_Fragment, { children: [_jsx(ReactSelect, { value: value ?? "", className: clsx(styles.select, errors[name] && styles.error), isDisabled: disabled, ...{ options, onChange, errors, isClearable }, menuPortalTarget: document.body, styles: { menuPortal: (base) => ({ ...base, zIndex: 100 }) }, placeholder: disabled ? "Disabled..." : "Select an option..." }), errors[name] && !hideErrorMessage && _jsx(ErrorMessage, { message: errors[name].message })] }));
|
|
20
|
+
return (_jsxs(_Fragment, { children: [_jsx(ReactSelect, { inputId: id, value: value ?? "", className: clsx(styles.select, errors[name] && styles.error), isDisabled: disabled, ...{ options, onChange, errors, isClearable }, menuPortalTarget: document.body, styles: { menuPortal: (base) => ({ ...base, zIndex: 100 }) }, placeholder: disabled ? "Disabled..." : "Select an option..." }), errors[name] && !hideErrorMessage && _jsx(ErrorMessage, { message: errors[name].message })] }));
|
|
21
21
|
} }));
|
|
22
22
|
};
|
|
@@ -2,7 +2,10 @@ 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
|
|
5
|
+
import { Button } from "@gemeente-denhaag/button";
|
|
6
|
+
import { Heading3, Paragraph } from "@gemeente-denhaag/typography";
|
|
7
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
8
|
+
import { StylesProvider } from "@gemeente-denhaag/stylesprovider";
|
|
6
9
|
import clsx from "clsx";
|
|
7
10
|
import { CloseIcon, ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
8
11
|
export const NotificationPopUp = ({ title, description, isVisible, hide, primaryButton, secondaryButton, layoutClassName, }) => {
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import * as styles from "./PrimaryTopNav.module.css";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
-
import { Link } from "@gemeente-denhaag/
|
|
5
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
6
6
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
7
7
|
import { faBars } from "@fortawesome/free-solid-svg-icons";
|
|
8
8
|
export const PrimaryTopNav = ({ items, mobileLogo, layoutClassName }) => {
|
|
@@ -1,145 +1,157 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--conduction-primary-top-nav-item-padding: var(--skeleton-size-md);
|
|
3
|
-
--conduction-primary-top-nav-color: var(--skeleton-color-white);
|
|
4
|
-
--conduction-primary-top-nav-background-color: var(--skeleton-color-secondary-3);
|
|
5
|
-
--conduction-primary-top-nav-background-color-hover: rgba(255, 255, 255, 0.2);
|
|
6
|
-
--conduction-primary-top-nav-dropdown-border-radius: var(--skeleton-border-radius-md);
|
|
7
|
-
--conduction-primary-top-nav-background-color-active: rgba(255, 255, 255, 0.2);
|
|
8
|
-
--conduction-primary-top-nav-box-shadow-active: inset 0 -4px black;
|
|
9
|
-
--conduction-primary-top-nav-toggle-icon-size: 24px;
|
|
10
|
-
--conduction-primary-top-nav-mobile-logo-padding: 18px;
|
|
11
|
-
--conduction-primary-top-nav-item-icon-margin: var(--skeleton-size-2x);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.container {
|
|
15
|
-
width: 100%;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.menuToggleContainer {
|
|
19
|
-
width: 100%;
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
justify-content: space-between;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.menuToggleContainer > .menuToggle {
|
|
26
|
-
all: unset;
|
|
27
|
-
font-size: var(--conduction-primary-top-nav-toggle-icon-size);
|
|
28
|
-
padding: var(--conduction-primary-top-nav-mobile-logo-padding);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.menuToggleContainer > .menuToggle:hover {
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.primary {
|
|
36
|
-
display: none;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.primary.isOpen {
|
|
40
|
-
display: block;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.menuToggleContainer {
|
|
44
|
-
width: 100%;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.primary {
|
|
48
|
-
font-weight: 500;
|
|
49
|
-
width: 100%;
|
|
50
|
-
background-color: var(--conduction-primary-top-nav-background-color);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.primary:hover {
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.ul {
|
|
58
|
-
margin: unset;
|
|
59
|
-
padding-inline-start: unset;
|
|
60
|
-
align-items: center;
|
|
61
|
-
max-height: 80vh;
|
|
62
|
-
overflow-y: scroll;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.li {
|
|
66
|
-
list-style-type: none;
|
|
67
|
-
display: block;
|
|
68
|
-
position: relative;
|
|
69
|
-
padding-inline-start: var(--conduction-primary-top-nav-item-padding);
|
|
70
|
-
padding-inline-end: var(--conduction-primary-top-nav-item-padding);
|
|
71
|
-
padding-block-start: var(--conduction-primary-top-nav-item-padding);
|
|
72
|
-
padding-block-end: var(--conduction-primary-top-nav-item-padding);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.li:hover {
|
|
76
|
-
background-color: var(--conduction-primary-top-nav-background-color-hover);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.current {
|
|
80
|
-
background-color: var(--conduction-primary-top-nav-background-color-active);
|
|
81
|
-
box-shadow: var(--conduction-primary-top-nav-box-shadow-active);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.primary .link {
|
|
85
|
-
display: block;
|
|
86
|
-
text-decoration: none;
|
|
87
|
-
color: var(--conduction-primary-top-nav-color);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.primary .li:hover .
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-primary-top-nav-item-padding: var(--skeleton-size-md);
|
|
3
|
+
--conduction-primary-top-nav-color: var(--skeleton-color-white);
|
|
4
|
+
--conduction-primary-top-nav-background-color: var(--skeleton-color-secondary-3);
|
|
5
|
+
--conduction-primary-top-nav-background-color-hover: rgba(255, 255, 255, 0.2);
|
|
6
|
+
--conduction-primary-top-nav-dropdown-border-radius: var(--skeleton-border-radius-md);
|
|
7
|
+
--conduction-primary-top-nav-background-color-active: rgba(255, 255, 255, 0.2);
|
|
8
|
+
--conduction-primary-top-nav-box-shadow-active: inset 0 -4px black;
|
|
9
|
+
--conduction-primary-top-nav-toggle-icon-size: 24px;
|
|
10
|
+
--conduction-primary-top-nav-mobile-logo-padding: 18px;
|
|
11
|
+
--conduction-primary-top-nav-item-icon-margin: var(--skeleton-size-2x);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.container {
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.menuToggleContainer {
|
|
19
|
+
width: 100%;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.menuToggleContainer > .menuToggle {
|
|
26
|
+
all: unset;
|
|
27
|
+
font-size: var(--conduction-primary-top-nav-toggle-icon-size);
|
|
28
|
+
padding: var(--conduction-primary-top-nav-mobile-logo-padding);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.menuToggleContainer > .menuToggle:hover {
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.primary {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.primary.isOpen {
|
|
40
|
+
display: block;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.menuToggleContainer {
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.primary {
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
width: 100%;
|
|
50
|
+
background-color: var(--conduction-primary-top-nav-background-color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.primary:hover {
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ul {
|
|
58
|
+
margin: unset;
|
|
59
|
+
padding-inline-start: unset;
|
|
60
|
+
align-items: center;
|
|
61
|
+
max-height: 80vh;
|
|
62
|
+
overflow-y: scroll;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.li {
|
|
66
|
+
list-style-type: none;
|
|
67
|
+
display: block;
|
|
68
|
+
position: relative;
|
|
69
|
+
padding-inline-start: var(--conduction-primary-top-nav-item-padding);
|
|
70
|
+
padding-inline-end: var(--conduction-primary-top-nav-item-padding);
|
|
71
|
+
padding-block-start: var(--conduction-primary-top-nav-item-padding);
|
|
72
|
+
padding-block-end: var(--conduction-primary-top-nav-item-padding);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.li:hover {
|
|
76
|
+
background-color: var(--conduction-primary-top-nav-background-color-hover);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.current {
|
|
80
|
+
background-color: var(--conduction-primary-top-nav-background-color-active);
|
|
81
|
+
box-shadow: var(--conduction-primary-top-nav-box-shadow-active);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.primary .link {
|
|
85
|
+
display: block;
|
|
86
|
+
text-decoration: none;
|
|
87
|
+
color: var(--conduction-primary-top-nav-color);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.primary .li:hover .link {
|
|
91
|
+
color: var(--conduction-primary-top-nav-color-hover);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.primary .li:hover .dropdown {
|
|
95
|
+
display: block;
|
|
96
|
+
z-index: 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.dropdown {
|
|
100
|
+
left: 0;
|
|
101
|
+
top: 100%;
|
|
102
|
+
padding: 0;
|
|
103
|
+
width: 100%;
|
|
104
|
+
display: block;
|
|
105
|
+
list-style-type: none;
|
|
106
|
+
background-color: var(--conduction-primary-top-nav-dropdown-background-color);
|
|
107
|
+
border-bottom-right-radius: var(--conduction-primary-top-nav-dropdown-border-radius);
|
|
108
|
+
border-bottom-left-radius: var(--conduction-primary-top-nav-dropdown-border-radius);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.primary .dropdown .li .link {
|
|
112
|
+
color: var(--conduction-primary-top-nav-dropdown-color);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.dropdown .li:hover {
|
|
116
|
+
background: var(--conduction-primary-top-nav-dropdown-background-color-hover);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.dropdown > li {
|
|
120
|
+
padding-inline-start: var(--web-app-size-md);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.label {
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
max-width: 37ch;
|
|
126
|
+
text-overflow: ellipsis;
|
|
127
|
+
white-space: nowrap;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.label > :not(:last-child) {
|
|
131
|
+
margin-inline-end: var(--conduction-primary-top-nav-item-icon-margin);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@media only screen and (min-width: 992px) {
|
|
135
|
+
.container {
|
|
136
|
+
width: fit-content;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.primary {
|
|
140
|
+
display: block;
|
|
141
|
+
width: fit-content;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.ul {
|
|
145
|
+
display: flex;
|
|
146
|
+
overflow-y: unset;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.dropdown {
|
|
150
|
+
position: absolute;
|
|
151
|
+
display: none;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.menuToggleContainer {
|
|
155
|
+
display: none;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as styles from "./SecondaryTopNav.module.css";
|
|
3
|
-
import { Link } from "@gemeente-denhaag/
|
|
3
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
export const SecondaryTopNav = ({ items, layoutClassName }) => {
|
|
6
6
|
return (_jsx("div", { className: clsx(styles.secondary, layoutClassName && layoutClassName), children: _jsx("nav", { children: _jsx("ul", { className: styles.ul, children: items.map(({ label, icon, current, handleClick }, idx) => (_jsx("li", { className: clsx(styles.li, current && styles.current), onClick: handleClick, children: _jsx(Link, { className: clsx(styles.link, styles.label), icon: icon, iconAlign: "start", children: label }) }, idx))) }) }) }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduction/components",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.26",
|
|
4
4
|
"description": "React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,12 +12,7 @@
|
|
|
12
12
|
"type": "git",
|
|
13
13
|
"url": "git+https://github.com/ConductionNL/conduction-components.git"
|
|
14
14
|
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"React",
|
|
17
|
-
"Gatsby",
|
|
18
|
-
"Conduction",
|
|
19
|
-
"Components"
|
|
20
|
-
],
|
|
15
|
+
"keywords": ["React", "Gatsby", "Conduction", "Components"],
|
|
21
16
|
"author": "Conduction B.V.",
|
|
22
17
|
"license": "ISC",
|
|
23
18
|
"bugs": {
|
|
@@ -28,13 +23,19 @@
|
|
|
28
23
|
"@fortawesome/fontawesome-svg-core": "^6.2.0",
|
|
29
24
|
"@fortawesome/free-solid-svg-icons": "^6.2.0",
|
|
30
25
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
31
|
-
"@gemeente-denhaag/
|
|
32
|
-
"@gemeente-denhaag/
|
|
33
|
-
"@gemeente-denhaag/
|
|
34
|
-
"@gemeente-denhaag/
|
|
35
|
-
"@gemeente-denhaag/
|
|
36
|
-
"@gemeente-denhaag/
|
|
37
|
-
"@gemeente-denhaag/
|
|
26
|
+
"@gemeente-denhaag/button": "0.2.3-alpha.205",
|
|
27
|
+
"@gemeente-denhaag/link": "0.2.3-alpha.205",
|
|
28
|
+
"@gemeente-denhaag/divider": "0.2.3-alpha.205",
|
|
29
|
+
"@gemeente-denhaag/textfield": "0.2.3-alpha.205",
|
|
30
|
+
"@gemeente-denhaag/typography": "0.2.3-alpha.205",
|
|
31
|
+
"@gemeente-denhaag/stylesprovider": "0.1.1-alpha.222",
|
|
32
|
+
"@gemeente-denhaag/design-tokens-components": "0.2.3-alpha.222",
|
|
33
|
+
"@gemeente-denhaag/form-field": "0.1.1-alpha.98",
|
|
34
|
+
"@gemeente-denhaag/formcontrollabel": "0.2.3-alpha.222",
|
|
35
|
+
"@gemeente-denhaag/process-steps": "0.1.0-alpha.51",
|
|
36
|
+
"@gemeente-denhaag/sidenav": "0.1.0-alpha.40",
|
|
37
|
+
"@gemeente-denhaag/table": "0.1.1-alpha.123",
|
|
38
|
+
"@gemeente-denhaag/textarea": "0.1.1-alpha.95",
|
|
38
39
|
"clsx": "^1.1.1",
|
|
39
40
|
"gatsby": "^4.11.1",
|
|
40
41
|
"react": "^17.0.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as styles from "./DetailsCard.module.css";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { Link } from "@gemeente-denhaag/
|
|
4
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
5
5
|
import { navigate } from "gatsby";
|
|
6
6
|
import { ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
7
7
|
import { Tag } from "../../tag/Tag";
|
|
@@ -1,10 +1,10 @@
|
|
|
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/
|
|
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
|
+
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,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as styles from "./DownloadCard.module.css";
|
|
3
3
|
import { DownloadIcon } from "@gemeente-denhaag/icons";
|
|
4
|
-
import { Link } from "@gemeente-denhaag/
|
|
4
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
|
|
7
7
|
interface DownloadCardProps {
|
|
@@ -1,9 +1,9 @@
|
|
|
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/
|
|
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
|
+
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,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as styles from "./HorizontalImageCard.module.css";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { Link } from "@gemeente-denhaag/
|
|
4
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
5
5
|
import { navigate } from "gatsby";
|
|
6
6
|
import { ExternalLinkIcon, ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
7
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
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/
|
|
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
|
+
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,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as styles from "./ImageAndDetailsCard.module.css";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { Link } from "@gemeente-denhaag/
|
|
4
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
5
5
|
import { navigate } from "gatsby";
|
|
6
6
|
import { ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
7
7
|
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Divider
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Divider } from "@gemeente-denhaag/divider";
|
|
3
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
4
|
+
import { navigate } from "gatsby";
|
|
5
|
+
import * as styles from "./RichContentCard.module.css";
|
|
6
|
+
import { ExternalLinkIcon, ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
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) => (_jsx(Tag, { ...{ tag } }))) }), contentLinks && (_jsxs("div", { className: styles.contentLinks, children: [_jsx(Divider, {}), contentLinks.map(({ title, subTitle, href }) => (_jsx(ContentLink, { ...{ title, subTitle, href } })))] }))] }));
|
|
9
|
+
};
|
|
10
|
+
const LabelWithIcon = ({ label, icon }) => {
|
|
11
|
+
return (_jsxs("div", { className: styles.labelWithIcon, children: [_jsx("span", { className: styles.labelWithIcon_icon, children: icon }), _jsx("span", { className: styles.labelWithIcon_label, children: label })] }));
|
|
12
|
+
};
|
|
13
|
+
const Tag = ({ tag }) => {
|
|
14
|
+
return _jsx("span", { className: styles.tag, children: tag });
|
|
15
|
+
};
|
|
16
|
+
const ContentLink = ({ title, subTitle, href }) => {
|
|
17
|
+
return (_jsxs(Link, { className: styles.contentLink, children: [_jsxs("div", { className: styles.contentLink_content, children: [_jsx("span", { className: styles.contentLink_title, children: title }), _jsx("span", { className: styles.contentLink_subTitle, children: subTitle })] }), _jsx("div", { children: _jsx(ArrowRightIcon, {}) })] }));
|
|
18
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Divider
|
|
1
|
+
import { Divider } from "@gemeente-denhaag/divider";
|
|
2
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
2
3
|
import { navigate } from "gatsby";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import * as styles from "./RichContentCard.module.css";
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { TableCell, TableHeader, TableRow } from "@gemeente-denhaag/table";
|
|
3
|
-
import * as styles from "./EditableTableRow.module.css";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import { useTranslation } from "react-i18next";
|
|
6
|
-
import { Link } from "@gemeente-denhaag/
|
|
7
|
-
import { CheckedIcon, CloseIcon, EditIcon } from "@gemeente-denhaag/icons";
|
|
8
|
-
import { useForm } from "react-hook-form";
|
|
9
|
-
import { InputEmail, InputText } from "../formFields";
|
|
10
|
-
export const EditableTableRow = ({ thead, value, inputType, handleSave, }) => {
|
|
11
|
-
const [editing, setEditing] = React.useState(false);
|
|
12
|
-
return (_jsxs(TableRow, { children: [_jsx(TableHeader, { className: styles.th, children: thead }), editing && _jsx(EditingTableRow, { ...{ value, inputType, handleSave, setEditing } }), !editing && _jsx(RegularTableRow, { ...{ value, setEditing } })] }));
|
|
13
|
-
};
|
|
14
|
-
const RegularTableRow = ({ value, setEditing }) => {
|
|
15
|
-
const { t } = useTranslation();
|
|
16
|
-
return (_jsxs(_Fragment, { children: [_jsx(TableCell, { children: value }), _jsx(TableCell, { children: _jsx("div", { className: styles.editButton, onClick: () => setEditing(true), children: _jsx(Link, { icon: _jsx(EditIcon, {}), iconAlign: "start", children: t("Edit") }) }) })] }));
|
|
17
|
-
};
|
|
18
|
-
const EditingTableRow = ({ value, setEditing, handleSave, inputType, }) => {
|
|
19
|
-
const { t } = useTranslation();
|
|
20
|
-
const { register, handleSubmit, formState: { errors }, } = useForm();
|
|
21
|
-
const onSubmit = (data) => {
|
|
22
|
-
handleSave(data.value);
|
|
23
|
-
setEditing(false);
|
|
24
|
-
};
|
|
25
|
-
return (_jsxs(_Fragment, { children: [_jsx(TableCell, { children: _jsxs("form", { onSubmit: handleSubmit(onSubmit), children: [_jsx(FormField, { ...{ inputType, value, register, errors } }), _jsxs("div", { className: styles.editButtonsContainer, children: [_jsx("button", { type: "submit", className: styles.submit, children: _jsx(Link, { icon: _jsx(CheckedIcon, {}), iconAlign: "start", children: t("Save") }) }), _jsx("div", { onClick: () => setEditing(false), children: _jsx(Link, { icon: _jsx(CloseIcon, {}), iconAlign: "start", className: styles.cancel, children: t("Cancel") }) })] })] }) }), _jsx(TableCell, {})] }));
|
|
26
|
-
};
|
|
27
|
-
const FormField = ({ inputType, value, register, errors }) => {
|
|
28
|
-
switch (inputType) {
|
|
29
|
-
case "email":
|
|
30
|
-
return _jsx(InputEmail, { defaultValue: value, ...{ register, errors }, name: "value", validation: { required: true } });
|
|
31
|
-
case "text":
|
|
32
|
-
return _jsx(InputText, { defaultValue: value, ...{ register, errors }, name: "value", validation: { required: true } });
|
|
33
|
-
}
|
|
34
|
-
};
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { TableCell, TableHeader, TableRow } from "@gemeente-denhaag/table";
|
|
3
|
+
import * as styles from "./EditableTableRow.module.css";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { useTranslation } from "react-i18next";
|
|
6
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
7
|
+
import { CheckedIcon, CloseIcon, EditIcon } from "@gemeente-denhaag/icons";
|
|
8
|
+
import { useForm } from "react-hook-form";
|
|
9
|
+
import { InputEmail, InputText } from "../formFields";
|
|
10
|
+
export const EditableTableRow = ({ thead, value, inputType, handleSave, }) => {
|
|
11
|
+
const [editing, setEditing] = React.useState(false);
|
|
12
|
+
return (_jsxs(TableRow, { children: [_jsx(TableHeader, { className: styles.th, children: thead }), editing && _jsx(EditingTableRow, { ...{ value, inputType, handleSave, setEditing } }), !editing && _jsx(RegularTableRow, { ...{ value, setEditing } })] }));
|
|
13
|
+
};
|
|
14
|
+
const RegularTableRow = ({ value, setEditing }) => {
|
|
15
|
+
const { t } = useTranslation();
|
|
16
|
+
return (_jsxs(_Fragment, { children: [_jsx(TableCell, { children: value }), _jsx(TableCell, { children: _jsx("div", { className: styles.editButton, onClick: () => setEditing(true), children: _jsx(Link, { icon: _jsx(EditIcon, {}), iconAlign: "start", children: t("Edit") }) }) })] }));
|
|
17
|
+
};
|
|
18
|
+
const EditingTableRow = ({ value, setEditing, handleSave, inputType, }) => {
|
|
19
|
+
const { t } = useTranslation();
|
|
20
|
+
const { register, handleSubmit, formState: { errors }, } = useForm();
|
|
21
|
+
const onSubmit = (data) => {
|
|
22
|
+
handleSave(data.value);
|
|
23
|
+
setEditing(false);
|
|
24
|
+
};
|
|
25
|
+
return (_jsxs(_Fragment, { children: [_jsx(TableCell, { children: _jsxs("form", { onSubmit: handleSubmit(onSubmit), children: [_jsx(FormField, { ...{ inputType, value, register, errors } }), _jsxs("div", { className: styles.editButtonsContainer, children: [_jsx("button", { type: "submit", className: styles.submit, children: _jsx(Link, { icon: _jsx(CheckedIcon, {}), iconAlign: "start", children: t("Save") }) }), _jsx("div", { onClick: () => setEditing(false), children: _jsx(Link, { icon: _jsx(CloseIcon, {}), iconAlign: "start", className: styles.cancel, children: t("Cancel") }) })] })] }) }), _jsx(TableCell, {})] }));
|
|
26
|
+
};
|
|
27
|
+
const FormField = ({ inputType, value, register, errors }) => {
|
|
28
|
+
switch (inputType) {
|
|
29
|
+
case "email":
|
|
30
|
+
return _jsx(InputEmail, { defaultValue: value, ...{ register, errors }, name: "value", validation: { required: true } });
|
|
31
|
+
case "text":
|
|
32
|
+
return _jsx(InputText, { defaultValue: value, ...{ register, errors }, name: "value", validation: { required: true } });
|
|
33
|
+
}
|
|
34
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TableCell, TableHeader, TableRow } from "@gemeente-denhaag/table";
|
|
2
2
|
import * as styles from "./EditableTableRow.module.css";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { Link } from "@gemeente-denhaag/
|
|
4
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
5
5
|
import { CheckedIcon, CloseIcon, EditIcon } from "@gemeente-denhaag/icons";
|
|
6
6
|
import { FieldValues, useForm, UseFormRegister } from "react-hook-form";
|
|
7
7
|
import { InputEmail, InputText } from "../formFields";
|
|
@@ -2,7 +2,8 @@ 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 {
|
|
5
|
+
import { IInputProps } from "../input";
|
|
6
|
+
import { Button } from "@gemeente-denhaag/button";
|
|
6
7
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@gemeente-denhaag/table";
|
|
7
8
|
import { ToolTip } from "../../toolTip/ToolTip";
|
|
8
9
|
import clsx from "clsx";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { TextField } from "@gemeente-denhaag/
|
|
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
|
+
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,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { TextField } from "@gemeente-denhaag/
|
|
2
|
+
import { TextField } from "@gemeente-denhaag/textfield";
|
|
3
3
|
import { IReactHookFormProps } from "./types";
|
|
4
4
|
import { faEyeSlash, faEye } from "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import * as styles from "./select.module.css";
|
|
2
3
|
import { Control, Controller, FieldValues } from "react-hook-form";
|
|
3
4
|
import ReactSelect from "react-select";
|
|
@@ -10,6 +11,7 @@ interface ISelectProps {
|
|
|
10
11
|
control: Control<FieldValues, any>;
|
|
11
12
|
options: { label: string; value: string }[];
|
|
12
13
|
name: string;
|
|
14
|
+
id?: string;
|
|
13
15
|
defaultValue?: any;
|
|
14
16
|
disabled?: boolean;
|
|
15
17
|
isClearable?: boolean;
|
|
@@ -17,6 +19,7 @@ interface ISelectProps {
|
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export const SelectMultiple = ({
|
|
22
|
+
id,
|
|
20
23
|
name,
|
|
21
24
|
options,
|
|
22
25
|
errors,
|
|
@@ -34,6 +37,7 @@ export const SelectMultiple = ({
|
|
|
34
37
|
return (
|
|
35
38
|
<>
|
|
36
39
|
<ReactSelect
|
|
40
|
+
inputId={id}
|
|
37
41
|
value={value ?? ""}
|
|
38
42
|
className={clsx(styles.select, errors[name] && styles.error)}
|
|
39
43
|
isMulti
|
|
@@ -52,6 +56,7 @@ export const SelectMultiple = ({
|
|
|
52
56
|
};
|
|
53
57
|
|
|
54
58
|
export const SelectCreate = ({
|
|
59
|
+
id,
|
|
55
60
|
name,
|
|
56
61
|
options,
|
|
57
62
|
errors,
|
|
@@ -69,6 +74,7 @@ export const SelectCreate = ({
|
|
|
69
74
|
return (
|
|
70
75
|
<>
|
|
71
76
|
<CreatableSelect
|
|
77
|
+
inputId={id}
|
|
72
78
|
value={value ?? ""}
|
|
73
79
|
placeholder={disabled ? "Disabled..." : "Select or create one or multiple options..."}
|
|
74
80
|
className={clsx(styles.select, errors[name] && styles.error)}
|
|
@@ -87,6 +93,7 @@ export const SelectCreate = ({
|
|
|
87
93
|
};
|
|
88
94
|
|
|
89
95
|
export const SelectSingle = ({
|
|
96
|
+
id,
|
|
90
97
|
name,
|
|
91
98
|
options,
|
|
92
99
|
errors,
|
|
@@ -105,6 +112,7 @@ export const SelectSingle = ({
|
|
|
105
112
|
return (
|
|
106
113
|
<>
|
|
107
114
|
<ReactSelect
|
|
115
|
+
inputId={id}
|
|
108
116
|
value={value ?? ""}
|
|
109
117
|
className={clsx(styles.select, errors[name] && styles.error)}
|
|
110
118
|
isDisabled={disabled}
|
|
@@ -1,7 +1,10 @@
|
|
|
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
|
|
4
|
+
import { Button } from "@gemeente-denhaag/button";
|
|
5
|
+
import { Heading3, Paragraph } from "@gemeente-denhaag/typography";
|
|
6
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
7
|
+
import { StylesProvider } from "@gemeente-denhaag/stylesprovider";
|
|
5
8
|
import clsx from "clsx";
|
|
6
9
|
import { CloseIcon, ArrowRightIcon } from "@gemeente-denhaag/icons";
|
|
7
10
|
|
|
@@ -1,145 +1,157 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--conduction-primary-top-nav-item-padding: var(--skeleton-size-md);
|
|
3
|
-
--conduction-primary-top-nav-color: var(--skeleton-color-white);
|
|
4
|
-
--conduction-primary-top-nav-background-color: var(--skeleton-color-secondary-3);
|
|
5
|
-
--conduction-primary-top-nav-background-color-hover: rgba(255, 255, 255, 0.2);
|
|
6
|
-
--conduction-primary-top-nav-dropdown-border-radius: var(--skeleton-border-radius-md);
|
|
7
|
-
--conduction-primary-top-nav-background-color-active: rgba(255, 255, 255, 0.2);
|
|
8
|
-
--conduction-primary-top-nav-box-shadow-active: inset 0 -4px black;
|
|
9
|
-
--conduction-primary-top-nav-toggle-icon-size: 24px;
|
|
10
|
-
--conduction-primary-top-nav-mobile-logo-padding: 18px;
|
|
11
|
-
--conduction-primary-top-nav-item-icon-margin: var(--skeleton-size-2x);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.container {
|
|
15
|
-
width: 100%;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.menuToggleContainer {
|
|
19
|
-
width: 100%;
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
justify-content: space-between;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.menuToggleContainer > .menuToggle {
|
|
26
|
-
all: unset;
|
|
27
|
-
font-size: var(--conduction-primary-top-nav-toggle-icon-size);
|
|
28
|
-
padding: var(--conduction-primary-top-nav-mobile-logo-padding);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.menuToggleContainer > .menuToggle:hover {
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.primary {
|
|
36
|
-
display: none;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.primary.isOpen {
|
|
40
|
-
display: block;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.menuToggleContainer {
|
|
44
|
-
width: 100%;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.primary {
|
|
48
|
-
font-weight: 500;
|
|
49
|
-
width: 100%;
|
|
50
|
-
background-color: var(--conduction-primary-top-nav-background-color);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.primary:hover {
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.ul {
|
|
58
|
-
margin: unset;
|
|
59
|
-
padding-inline-start: unset;
|
|
60
|
-
align-items: center;
|
|
61
|
-
max-height: 80vh;
|
|
62
|
-
overflow-y: scroll;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.li {
|
|
66
|
-
list-style-type: none;
|
|
67
|
-
display: block;
|
|
68
|
-
position: relative;
|
|
69
|
-
padding-inline-start: var(--conduction-primary-top-nav-item-padding);
|
|
70
|
-
padding-inline-end: var(--conduction-primary-top-nav-item-padding);
|
|
71
|
-
padding-block-start: var(--conduction-primary-top-nav-item-padding);
|
|
72
|
-
padding-block-end: var(--conduction-primary-top-nav-item-padding);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.li:hover {
|
|
76
|
-
background-color: var(--conduction-primary-top-nav-background-color-hover);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.current {
|
|
80
|
-
background-color: var(--conduction-primary-top-nav-background-color-active);
|
|
81
|
-
box-shadow: var(--conduction-primary-top-nav-box-shadow-active);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.primary .link {
|
|
85
|
-
display: block;
|
|
86
|
-
text-decoration: none;
|
|
87
|
-
color: var(--conduction-primary-top-nav-color);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.primary .li:hover .
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-primary-top-nav-item-padding: var(--skeleton-size-md);
|
|
3
|
+
--conduction-primary-top-nav-color: var(--skeleton-color-white);
|
|
4
|
+
--conduction-primary-top-nav-background-color: var(--skeleton-color-secondary-3);
|
|
5
|
+
--conduction-primary-top-nav-background-color-hover: rgba(255, 255, 255, 0.2);
|
|
6
|
+
--conduction-primary-top-nav-dropdown-border-radius: var(--skeleton-border-radius-md);
|
|
7
|
+
--conduction-primary-top-nav-background-color-active: rgba(255, 255, 255, 0.2);
|
|
8
|
+
--conduction-primary-top-nav-box-shadow-active: inset 0 -4px black;
|
|
9
|
+
--conduction-primary-top-nav-toggle-icon-size: 24px;
|
|
10
|
+
--conduction-primary-top-nav-mobile-logo-padding: 18px;
|
|
11
|
+
--conduction-primary-top-nav-item-icon-margin: var(--skeleton-size-2x);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.container {
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.menuToggleContainer {
|
|
19
|
+
width: 100%;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.menuToggleContainer > .menuToggle {
|
|
26
|
+
all: unset;
|
|
27
|
+
font-size: var(--conduction-primary-top-nav-toggle-icon-size);
|
|
28
|
+
padding: var(--conduction-primary-top-nav-mobile-logo-padding);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.menuToggleContainer > .menuToggle:hover {
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.primary {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.primary.isOpen {
|
|
40
|
+
display: block;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.menuToggleContainer {
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.primary {
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
width: 100%;
|
|
50
|
+
background-color: var(--conduction-primary-top-nav-background-color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.primary:hover {
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ul {
|
|
58
|
+
margin: unset;
|
|
59
|
+
padding-inline-start: unset;
|
|
60
|
+
align-items: center;
|
|
61
|
+
max-height: 80vh;
|
|
62
|
+
overflow-y: scroll;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.li {
|
|
66
|
+
list-style-type: none;
|
|
67
|
+
display: block;
|
|
68
|
+
position: relative;
|
|
69
|
+
padding-inline-start: var(--conduction-primary-top-nav-item-padding);
|
|
70
|
+
padding-inline-end: var(--conduction-primary-top-nav-item-padding);
|
|
71
|
+
padding-block-start: var(--conduction-primary-top-nav-item-padding);
|
|
72
|
+
padding-block-end: var(--conduction-primary-top-nav-item-padding);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.li:hover {
|
|
76
|
+
background-color: var(--conduction-primary-top-nav-background-color-hover);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.current {
|
|
80
|
+
background-color: var(--conduction-primary-top-nav-background-color-active);
|
|
81
|
+
box-shadow: var(--conduction-primary-top-nav-box-shadow-active);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.primary .link {
|
|
85
|
+
display: block;
|
|
86
|
+
text-decoration: none;
|
|
87
|
+
color: var(--conduction-primary-top-nav-color);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.primary .li:hover .link {
|
|
91
|
+
color: var(--conduction-primary-top-nav-color-hover);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.primary .li:hover .dropdown {
|
|
95
|
+
display: block;
|
|
96
|
+
z-index: 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.dropdown {
|
|
100
|
+
left: 0;
|
|
101
|
+
top: 100%;
|
|
102
|
+
padding: 0;
|
|
103
|
+
width: 100%;
|
|
104
|
+
display: block;
|
|
105
|
+
list-style-type: none;
|
|
106
|
+
background-color: var(--conduction-primary-top-nav-dropdown-background-color);
|
|
107
|
+
border-bottom-right-radius: var(--conduction-primary-top-nav-dropdown-border-radius);
|
|
108
|
+
border-bottom-left-radius: var(--conduction-primary-top-nav-dropdown-border-radius);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.primary .dropdown .li .link {
|
|
112
|
+
color: var(--conduction-primary-top-nav-dropdown-color);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.dropdown .li:hover {
|
|
116
|
+
background: var(--conduction-primary-top-nav-dropdown-background-color-hover);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.dropdown > li {
|
|
120
|
+
padding-inline-start: var(--web-app-size-md);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.label {
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
max-width: 37ch;
|
|
126
|
+
text-overflow: ellipsis;
|
|
127
|
+
white-space: nowrap;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.label > :not(:last-child) {
|
|
131
|
+
margin-inline-end: var(--conduction-primary-top-nav-item-icon-margin);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@media only screen and (min-width: 992px) {
|
|
135
|
+
.container {
|
|
136
|
+
width: fit-content;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.primary {
|
|
140
|
+
display: block;
|
|
141
|
+
width: fit-content;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.ul {
|
|
145
|
+
display: flex;
|
|
146
|
+
overflow-y: unset;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.dropdown {
|
|
150
|
+
position: absolute;
|
|
151
|
+
display: none;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.menuToggleContainer {
|
|
155
|
+
display: none;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as styles from "./PrimaryTopNav.module.css";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { Link } from "@gemeente-denhaag/
|
|
4
|
+
import { Link } from "@gemeente-denhaag/link";
|
|
5
5
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
6
6
|
import { faBars } from "@fortawesome/free-solid-svg-icons";
|
|
7
7
|
|