@developer-overheid-nl/don-register-components 1.0.0 → 1.0.1
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/LICENSE.md +291 -291
- package/README.md +20 -20
- package/package.json +1 -1
- package/src/alert/Alert.tsx +19 -19
- package/src/alert/styles.module.css +3 -3
- package/src/alignBox/AlignBox.tsx +110 -110
- package/src/alignBox/styles.module.css +106 -106
- package/src/article/Article.tsx +10 -10
- package/src/block/Block.tsx +35 -35
- package/src/block/styles.module.css +29 -29
- package/src/button/Button.tsx +3 -3
- package/src/cardAsLink/CardAsLink.tsx +21 -21
- package/src/cardAsLink/styles.module.css +23 -23
- package/src/cardsList/CardsList.tsx +54 -54
- package/src/cardsList/styles.module.css +19 -19
- package/src/client.ts +2 -2
- package/src/container/Container.tsx +10 -10
- package/src/container/styles.module.css +28 -28
- package/src/copyButton/CopyButton.tsx +39 -39
- package/src/copyButton/styles.module.css +13 -13
- package/src/dataBadgeLink/DataBadgeLink.tsx +50 -50
- package/src/dataBadgeLink/styles.module.css +43 -43
- package/src/dataSummary/DataSummary.tsx +22 -22
- package/src/dataSummary/DataSummaryItem.tsx +21 -21
- package/src/dataSummary/styles.module.css +70 -70
- package/src/fieldset/FieldSet.tsx +3 -3
- package/src/filters/Filters.tsx +115 -115
- package/src/filters/styles.module.css +26 -26
- package/src/footer/Footer.tsx +76 -76
- package/src/footer/styles.module.css +103 -103
- package/src/formFieldLabel/FormFieldLabel.tsx +23 -23
- package/src/formFieldTextInput/FormFieldTextInput.tsx +3 -3
- package/src/header/Header.tsx +137 -137
- package/src/header/styles.module.css +71 -71
- package/src/heading/Heading.tsx +10 -10
- package/src/headingGroup/HeadingGroup.tsx +48 -48
- package/src/headingGroup/styles.module.css +3 -3
- package/src/i18n.ts +24 -24
- package/src/iconBadge/IconBadge.tsx +32 -32
- package/src/iconBadge/getAppearance.ts +47 -47
- package/src/iconBadge/styles.module.css +19 -19
- package/src/iconsSprite/Icon.tsx +17 -17
- package/src/iconsSprite/IconsSprite.tsx +5 -5
- package/src/index.ts +80 -80
- package/src/link/Link.tsx +10 -10
- package/src/markdown/Markdown.tsx +42 -42
- package/src/pagination/Pagination.tsx +144 -144
- package/src/pagination/styles.module.css +13 -13
- package/src/paragraph/Paragraph.tsx +10 -10
- package/src/pillBadge/PillBadge.examples.tsx +107 -107
- package/src/pillBadge/PillBadge.tsx +51 -51
- package/src/pillBadge/styles.module.css +194 -194
- package/src/readOnlyTextInput/ReadOnlyTextInput.tsx +24 -24
- package/src/readOnlyTextInput/styles.module.css +19 -19
- package/src/scoreBadge/ScoreBadge.tsx +132 -132
- package/src/search/Search.tsx +66 -66
- package/src/search/styles.module.css +39 -39
- package/src/siteLogo/SiteLogo.tsx +24 -24
- package/src/topNavigation/TopNavigation.tsx +67 -64
- package/src/topNavigation/styles.module.css +54 -54
- package/tsconfig.json +121 -121
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
:global(.rhc-data-summary) {
|
|
2
|
-
--rhc-data-summary-item-key-padding-inline-start: 0;
|
|
3
|
-
--rhc-data-summary-item-key-padding-inline-end: 0;
|
|
4
|
-
--rhc-data-summary-item-key-padding-block-start: 0;
|
|
5
|
-
--rhc-data-summary-item-key-padding-block-end: 0;
|
|
6
|
-
--rhc-data-summary-item-value-padding-inline-start: 0;
|
|
7
|
-
--rhc-data-summary-item-value-padding-inline-end: 0;
|
|
8
|
-
--rhc-data-summary-item-value-padding-block-start: 0;
|
|
9
|
-
--rhc-data-summary-item-value-padding-block-end: 0;
|
|
10
|
-
--rhc-data-summary-item-action-padding-inline-start: 0;
|
|
11
|
-
--rhc-data-summary-item-action-padding-inline-end: 0;
|
|
12
|
-
--rhc-data-summary-item-action-padding-block-start: 0;
|
|
13
|
-
--rhc-data-summary-item-action-padding-block-end: 0;
|
|
14
|
-
--rhc-data-summary-item-key-row-padding-inline-start: 0;
|
|
15
|
-
--rhc-data-summary-item-key-row-padding-inline-end: 0;
|
|
16
|
-
--rhc-data-summary-item-key-row-padding-block-start: 0;
|
|
17
|
-
--rhc-data-summary-item-key-row-padding-block-end: 0.75rem;
|
|
18
|
-
--rhc-data-summary-item-value-row-padding-inline-start: 0;
|
|
19
|
-
--rhc-data-summary-item-value-row-padding-inline-end: 0;
|
|
20
|
-
--rhc-data-summary-item-value-row-padding-block-start: 0;
|
|
21
|
-
--rhc-data-summary-item-value-row-padding-block-end: 0.75rem;
|
|
22
|
-
--rhc-data-summary-item-action-row-padding-inline-start: 0;
|
|
23
|
-
--rhc-data-summary-item-action-row-padding-inline-end: 0;
|
|
24
|
-
--rhc-data-summary-item-action-row-padding-block-start: 0;
|
|
25
|
-
--rhc-data-summary-item-action-row-padding-block-end: 0.75rem;
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
row-gap: 0.75rem;
|
|
29
|
-
margin-block-start: 0;
|
|
30
|
-
margin-block-end: 1rem;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
:global(.rhc-data-summary__item) {
|
|
34
|
-
row-gap: 0.75rem;
|
|
35
|
-
column-gap: 1rem;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:global(.rhc-data-summary--column) {
|
|
39
|
-
:global(.rhc-data-summary__item) {
|
|
40
|
-
padding-block-end: var(--rhc-data-summary-item-key-row-padding-block-end);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
:global(.rhc-data-summary--row) {
|
|
45
|
-
:global(.rhc-data-summary__item) {
|
|
46
|
-
justify-content: space-between;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
:global(.rhc-data-summary__item-value:last-child) {
|
|
50
|
-
text-align: end;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
:global(.rhc-data-summary__item-key):empty,
|
|
55
|
-
:global(.rhc-data-summary__item-value):empty {
|
|
56
|
-
display: none;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
:global(.rhc-data-summary__item-value) {
|
|
60
|
-
hyphens: auto;
|
|
61
|
-
word-break: break-word;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.isContained {
|
|
65
|
-
margin-block-end: 0;
|
|
66
|
-
:global(.rhc-data-summary__item:last-child) {
|
|
67
|
-
--rhc-data-summary-item-border-block-end-style: none;
|
|
68
|
-
--rhc-data-summary-item-key-row-padding-block-end: 0;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
:global(.rhc-data-summary) {
|
|
2
|
+
--rhc-data-summary-item-key-padding-inline-start: 0;
|
|
3
|
+
--rhc-data-summary-item-key-padding-inline-end: 0;
|
|
4
|
+
--rhc-data-summary-item-key-padding-block-start: 0;
|
|
5
|
+
--rhc-data-summary-item-key-padding-block-end: 0;
|
|
6
|
+
--rhc-data-summary-item-value-padding-inline-start: 0;
|
|
7
|
+
--rhc-data-summary-item-value-padding-inline-end: 0;
|
|
8
|
+
--rhc-data-summary-item-value-padding-block-start: 0;
|
|
9
|
+
--rhc-data-summary-item-value-padding-block-end: 0;
|
|
10
|
+
--rhc-data-summary-item-action-padding-inline-start: 0;
|
|
11
|
+
--rhc-data-summary-item-action-padding-inline-end: 0;
|
|
12
|
+
--rhc-data-summary-item-action-padding-block-start: 0;
|
|
13
|
+
--rhc-data-summary-item-action-padding-block-end: 0;
|
|
14
|
+
--rhc-data-summary-item-key-row-padding-inline-start: 0;
|
|
15
|
+
--rhc-data-summary-item-key-row-padding-inline-end: 0;
|
|
16
|
+
--rhc-data-summary-item-key-row-padding-block-start: 0;
|
|
17
|
+
--rhc-data-summary-item-key-row-padding-block-end: 0.75rem;
|
|
18
|
+
--rhc-data-summary-item-value-row-padding-inline-start: 0;
|
|
19
|
+
--rhc-data-summary-item-value-row-padding-inline-end: 0;
|
|
20
|
+
--rhc-data-summary-item-value-row-padding-block-start: 0;
|
|
21
|
+
--rhc-data-summary-item-value-row-padding-block-end: 0.75rem;
|
|
22
|
+
--rhc-data-summary-item-action-row-padding-inline-start: 0;
|
|
23
|
+
--rhc-data-summary-item-action-row-padding-inline-end: 0;
|
|
24
|
+
--rhc-data-summary-item-action-row-padding-block-start: 0;
|
|
25
|
+
--rhc-data-summary-item-action-row-padding-block-end: 0.75rem;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
row-gap: 0.75rem;
|
|
29
|
+
margin-block-start: 0;
|
|
30
|
+
margin-block-end: 1rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:global(.rhc-data-summary__item) {
|
|
34
|
+
row-gap: 0.75rem;
|
|
35
|
+
column-gap: 1rem;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:global(.rhc-data-summary--column) {
|
|
39
|
+
:global(.rhc-data-summary__item) {
|
|
40
|
+
padding-block-end: var(--rhc-data-summary-item-key-row-padding-block-end);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:global(.rhc-data-summary--row) {
|
|
45
|
+
:global(.rhc-data-summary__item) {
|
|
46
|
+
justify-content: space-between;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:global(.rhc-data-summary__item-value:last-child) {
|
|
50
|
+
text-align: end;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:global(.rhc-data-summary__item-key):empty,
|
|
55
|
+
:global(.rhc-data-summary__item-value):empty {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:global(.rhc-data-summary__item-value) {
|
|
60
|
+
hyphens: auto;
|
|
61
|
+
word-break: break-word;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.isContained {
|
|
65
|
+
margin-block-end: 0;
|
|
66
|
+
:global(.rhc-data-summary__item:last-child) {
|
|
67
|
+
--rhc-data-summary-item-border-block-end-style: none;
|
|
68
|
+
--rhc-data-summary-item-key-row-padding-block-end: 0;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Fieldset } from "@rijkshuisstijl-community/components-react";
|
|
2
|
-
|
|
3
|
-
export default Fieldset;
|
|
1
|
+
import { Fieldset } from "@rijkshuisstijl-community/components-react";
|
|
2
|
+
|
|
3
|
+
export default Fieldset;
|
package/src/filters/Filters.tsx
CHANGED
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
// 'use client';
|
|
2
|
-
/* biome-ignore-all lint: TODO: filters needs a refactor anyway */
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
Heading,
|
|
6
|
-
LinkList,
|
|
7
|
-
LinkListLink,
|
|
8
|
-
} from "@rijkshuisstijl-community/components-react";
|
|
9
|
-
import clsx from "clsx";
|
|
10
|
-
import type { HTMLProps, PropsWithChildren } from "react";
|
|
11
|
-
import { I18nextProvider, useTranslation } from "react-i18next";
|
|
12
|
-
import Alert from "../alert/Alert";
|
|
13
|
-
import DataBadgeLink from "../dataBadgeLink/DataBadgeLink";
|
|
14
|
-
import i18n from "../i18n";
|
|
15
|
-
import Icon from "../iconsSprite/Icon";
|
|
16
|
-
import styles from "./styles.module.css";
|
|
17
|
-
|
|
18
|
-
export interface FiltersProps extends HTMLProps<HTMLDivElement> {
|
|
19
|
-
routing?: Record<string, any>;
|
|
20
|
-
data: any;
|
|
21
|
-
headers: any;
|
|
22
|
-
error: any;
|
|
23
|
-
status?: number;
|
|
24
|
-
statusText?: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const ListLinkIcon = ({ isActive }: { isActive: boolean }) => {
|
|
28
|
-
return (
|
|
29
|
-
<Icon
|
|
30
|
-
className={clsx([styles.icon, isActive && styles.active])}
|
|
31
|
-
name={isActive ? "active" : "delta-naar-rechts-inline"}
|
|
32
|
-
/>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// TODO: make more generic for other filter types
|
|
37
|
-
|
|
38
|
-
const Filters = (props: PropsWithChildren<FiltersProps>) => {
|
|
39
|
-
const { t } = useTranslation();
|
|
40
|
-
const { data, error, status, statusText, className, routing } = props;
|
|
41
|
-
const organisations = data && !data.message ? data : [];
|
|
42
|
-
const currentOrganisation =
|
|
43
|
-
organisations &&
|
|
44
|
-
organisations.find((org: any) => org?.uri === routing?.query?.organisation);
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<div className={clsx([styles.filters, className])}>
|
|
48
|
-
{currentOrganisation && (
|
|
49
|
-
<div
|
|
50
|
-
className={clsx("utrecht-badge-list", styles.currentFilter)}
|
|
51
|
-
role="list"
|
|
52
|
-
>
|
|
53
|
-
<Heading level={2} appearanceLevel={3}>
|
|
54
|
-
{t("components.current-filter")}
|
|
55
|
-
</Heading>
|
|
56
|
-
<DataBadgeLink
|
|
57
|
-
role="listitem"
|
|
58
|
-
aria-pressed={null}
|
|
59
|
-
helperText={t("components.remove-filter")}
|
|
60
|
-
icon={<Icon name="kruis-inline" />}
|
|
61
|
-
href={new URL(`../`, routing?.url).toString()}
|
|
62
|
-
>
|
|
63
|
-
{styles.badgeLink}
|
|
64
|
-
{currentOrganisation?.label}
|
|
65
|
-
</DataBadgeLink>
|
|
66
|
-
</div>
|
|
67
|
-
)}
|
|
68
|
-
<Heading level={2} appearanceLevel={3}>
|
|
69
|
-
{t("components.filter-by", { type: "organisatie" })}
|
|
70
|
-
</Heading>
|
|
71
|
-
<LinkList>
|
|
72
|
-
{organisations &&
|
|
73
|
-
organisations.map((organisation: any) => (
|
|
74
|
-
<LinkListLink
|
|
75
|
-
className={clsx([
|
|
76
|
-
organisation.uri === routing?.query?.organisation &&
|
|
77
|
-
styles.active,
|
|
78
|
-
])}
|
|
79
|
-
key={organisation.uri}
|
|
80
|
-
href={new URL(
|
|
81
|
-
`../?organisation=${organisation.uri}`,
|
|
82
|
-
routing?.url,
|
|
83
|
-
).toString()}
|
|
84
|
-
icon={
|
|
85
|
-
<ListLinkIcon
|
|
86
|
-
isActive={organisation.uri === routing?.query?.organisation}
|
|
87
|
-
/>
|
|
88
|
-
}
|
|
89
|
-
>
|
|
90
|
-
{organisation.label}
|
|
91
|
-
</LinkListLink>
|
|
92
|
-
))}
|
|
93
|
-
</LinkList>
|
|
94
|
-
|
|
95
|
-
{error && (
|
|
96
|
-
<Alert type="error">
|
|
97
|
-
{(error as unknown as any).message ||
|
|
98
|
-
(error as unknown as any).error_msg ||
|
|
99
|
-
`${status}: ${statusText}` ||
|
|
100
|
-
t("components.fuzz-error")}
|
|
101
|
-
</Alert>
|
|
102
|
-
)}
|
|
103
|
-
</div>
|
|
104
|
-
);
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
const TranslatedFilters = (props: PropsWithChildren<FiltersProps>) => {
|
|
108
|
-
return (
|
|
109
|
-
<I18nextProvider i18n={i18n}>
|
|
110
|
-
<Filters {...props} />
|
|
111
|
-
</I18nextProvider>
|
|
112
|
-
);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
export default TranslatedFilters;
|
|
1
|
+
// 'use client';
|
|
2
|
+
/* biome-ignore-all lint: TODO: filters needs a refactor anyway */
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
Heading,
|
|
6
|
+
LinkList,
|
|
7
|
+
LinkListLink,
|
|
8
|
+
} from "@rijkshuisstijl-community/components-react";
|
|
9
|
+
import clsx from "clsx";
|
|
10
|
+
import type { HTMLProps, PropsWithChildren } from "react";
|
|
11
|
+
import { I18nextProvider, useTranslation } from "react-i18next";
|
|
12
|
+
import Alert from "../alert/Alert";
|
|
13
|
+
import DataBadgeLink from "../dataBadgeLink/DataBadgeLink";
|
|
14
|
+
import i18n from "../i18n";
|
|
15
|
+
import Icon from "../iconsSprite/Icon";
|
|
16
|
+
import styles from "./styles.module.css";
|
|
17
|
+
|
|
18
|
+
export interface FiltersProps extends HTMLProps<HTMLDivElement> {
|
|
19
|
+
routing?: Record<string, any>;
|
|
20
|
+
data: any;
|
|
21
|
+
headers: any;
|
|
22
|
+
error: any;
|
|
23
|
+
status?: number;
|
|
24
|
+
statusText?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const ListLinkIcon = ({ isActive }: { isActive: boolean }) => {
|
|
28
|
+
return (
|
|
29
|
+
<Icon
|
|
30
|
+
className={clsx([styles.icon, isActive && styles.active])}
|
|
31
|
+
name={isActive ? "active" : "delta-naar-rechts-inline"}
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// TODO: make more generic for other filter types
|
|
37
|
+
|
|
38
|
+
const Filters = (props: PropsWithChildren<FiltersProps>) => {
|
|
39
|
+
const { t } = useTranslation();
|
|
40
|
+
const { data, error, status, statusText, className, routing } = props;
|
|
41
|
+
const organisations = data && !data.message ? data : [];
|
|
42
|
+
const currentOrganisation =
|
|
43
|
+
organisations &&
|
|
44
|
+
organisations.find((org: any) => org?.uri === routing?.query?.organisation);
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<div className={clsx([styles.filters, className])}>
|
|
48
|
+
{currentOrganisation && (
|
|
49
|
+
<div
|
|
50
|
+
className={clsx("utrecht-badge-list", styles.currentFilter)}
|
|
51
|
+
role="list"
|
|
52
|
+
>
|
|
53
|
+
<Heading level={2} appearanceLevel={3}>
|
|
54
|
+
{t("components.current-filter")}
|
|
55
|
+
</Heading>
|
|
56
|
+
<DataBadgeLink
|
|
57
|
+
role="listitem"
|
|
58
|
+
aria-pressed={null}
|
|
59
|
+
helperText={t("components.remove-filter")}
|
|
60
|
+
icon={<Icon name="kruis-inline" />}
|
|
61
|
+
href={new URL(`../`, routing?.url).toString()}
|
|
62
|
+
>
|
|
63
|
+
{styles.badgeLink}
|
|
64
|
+
{currentOrganisation?.label}
|
|
65
|
+
</DataBadgeLink>
|
|
66
|
+
</div>
|
|
67
|
+
)}
|
|
68
|
+
<Heading level={2} appearanceLevel={3}>
|
|
69
|
+
{t("components.filter-by", { type: "organisatie" })}
|
|
70
|
+
</Heading>
|
|
71
|
+
<LinkList>
|
|
72
|
+
{organisations &&
|
|
73
|
+
organisations.map((organisation: any) => (
|
|
74
|
+
<LinkListLink
|
|
75
|
+
className={clsx([
|
|
76
|
+
organisation.uri === routing?.query?.organisation &&
|
|
77
|
+
styles.active,
|
|
78
|
+
])}
|
|
79
|
+
key={organisation.uri}
|
|
80
|
+
href={new URL(
|
|
81
|
+
`../?organisation=${organisation.uri}`,
|
|
82
|
+
routing?.url,
|
|
83
|
+
).toString()}
|
|
84
|
+
icon={
|
|
85
|
+
<ListLinkIcon
|
|
86
|
+
isActive={organisation.uri === routing?.query?.organisation}
|
|
87
|
+
/>
|
|
88
|
+
}
|
|
89
|
+
>
|
|
90
|
+
{organisation.label}
|
|
91
|
+
</LinkListLink>
|
|
92
|
+
))}
|
|
93
|
+
</LinkList>
|
|
94
|
+
|
|
95
|
+
{error && (
|
|
96
|
+
<Alert type="error">
|
|
97
|
+
{(error as unknown as any).message ||
|
|
98
|
+
(error as unknown as any).error_msg ||
|
|
99
|
+
`${status}: ${statusText}` ||
|
|
100
|
+
t("components.fuzz-error")}
|
|
101
|
+
</Alert>
|
|
102
|
+
)}
|
|
103
|
+
</div>
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const TranslatedFilters = (props: PropsWithChildren<FiltersProps>) => {
|
|
108
|
+
return (
|
|
109
|
+
<I18nextProvider i18n={i18n}>
|
|
110
|
+
<Filters {...props} />
|
|
111
|
+
</I18nextProvider>
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export default TranslatedFilters;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
.filters {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
row-gap: var(--rhc-space-200);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.currentFilter {
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.active {
|
|
12
|
-
font-weight: bold;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.icon {
|
|
16
|
-
flex-shrink: 0;
|
|
17
|
-
transition: transform 0.2s ease-in-out;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:global(.utrecht-link-list__link:hover) .icon:not(.active) {
|
|
21
|
-
transform: translateX(0.125rem);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.icon.active {
|
|
25
|
-
transform: scale(1.5);
|
|
26
|
-
}
|
|
1
|
+
.filters {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
row-gap: var(--rhc-space-200);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.currentFilter {
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.active {
|
|
12
|
+
font-weight: bold;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.icon {
|
|
16
|
+
flex-shrink: 0;
|
|
17
|
+
transition: transform 0.2s ease-in-out;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:global(.utrecht-link-list__link:hover) .icon:not(.active) {
|
|
21
|
+
transform: translateX(0.125rem);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.icon.active {
|
|
25
|
+
transform: scale(1.5);
|
|
26
|
+
}
|
package/src/footer/Footer.tsx
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import {
|
|
2
|
-
LinkList,
|
|
3
|
-
LinkListLink,
|
|
4
|
-
Footer as RHCFooter,
|
|
5
|
-
} from "@rijkshuisstijl-community/components-react";
|
|
6
|
-
import clsx from "clsx";
|
|
7
|
-
import { type PropsWithChildren, useId } from "react";
|
|
8
|
-
import Heading from "../heading/Heading";
|
|
9
|
-
import Markdown from "../markdown/Markdown";
|
|
10
|
-
import {
|
|
11
|
-
type NavBarItem,
|
|
12
|
-
processNavBarItems,
|
|
13
|
-
} from "../topNavigation/TopNavigation";
|
|
14
|
-
import styles from "./styles.module.css";
|
|
15
|
-
|
|
16
|
-
export interface ColumnProps {
|
|
17
|
-
title: string;
|
|
18
|
-
items?: NavBarItem[];
|
|
19
|
-
text?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface FooterProps extends React.HTMLAttributes<HTMLElement> {
|
|
23
|
-
className?: string;
|
|
24
|
-
columns?: ColumnProps[];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// TODO: refactor icons together with TopNavigation
|
|
28
|
-
const FooterColumns = (props: ColumnProps) => {
|
|
29
|
-
const id = useId();
|
|
30
|
-
const { title, items, text } = props;
|
|
31
|
-
const processedItems = items && processNavBarItems(items);
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<nav className={styles.column} aria-describedby={id}>
|
|
35
|
-
<Heading level={2} appearanceLevel={5} id={id}>
|
|
36
|
-
{title}
|
|
37
|
-
</Heading>
|
|
38
|
-
{text && <Markdown>{text}</Markdown>}
|
|
39
|
-
{processedItems && (
|
|
40
|
-
<LinkList>
|
|
41
|
-
{processedItems.map((item, index) => (
|
|
42
|
-
<LinkListLink
|
|
43
|
-
key={item.id || index}
|
|
44
|
-
href={item.href}
|
|
45
|
-
icon={item.icon}
|
|
46
|
-
>
|
|
47
|
-
{item.label}
|
|
48
|
-
</LinkListLink>
|
|
49
|
-
))}
|
|
50
|
-
</LinkList>
|
|
51
|
-
)}
|
|
52
|
-
</nav>
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const Footer = (props: PropsWithChildren<FooterProps>) => {
|
|
57
|
-
const { className, columns, ...restProps } = props;
|
|
58
|
-
const columnsClass = `numColumns${Math.min(Number(columns?.length), 4)}`;
|
|
59
|
-
|
|
60
|
-
return (
|
|
61
|
-
<RHCFooter
|
|
62
|
-
className={clsx(className, styles.footer, styles[columnsClass])}
|
|
63
|
-
background="primary-outlined"
|
|
64
|
-
preFooter
|
|
65
|
-
{...restProps}
|
|
66
|
-
>
|
|
67
|
-
{columns &&
|
|
68
|
-
columns.length > 0 &&
|
|
69
|
-
columns.map((column, index) => (
|
|
70
|
-
<FooterColumns key={column.title || index} {...column} />
|
|
71
|
-
))}
|
|
72
|
-
</RHCFooter>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export default Footer;
|
|
1
|
+
import {
|
|
2
|
+
LinkList,
|
|
3
|
+
LinkListLink,
|
|
4
|
+
Footer as RHCFooter,
|
|
5
|
+
} from "@rijkshuisstijl-community/components-react";
|
|
6
|
+
import clsx from "clsx";
|
|
7
|
+
import { type PropsWithChildren, useId } from "react";
|
|
8
|
+
import Heading from "../heading/Heading";
|
|
9
|
+
import Markdown from "../markdown/Markdown";
|
|
10
|
+
import {
|
|
11
|
+
type NavBarItem,
|
|
12
|
+
processNavBarItems,
|
|
13
|
+
} from "../topNavigation/TopNavigation";
|
|
14
|
+
import styles from "./styles.module.css";
|
|
15
|
+
|
|
16
|
+
export interface ColumnProps {
|
|
17
|
+
title: string;
|
|
18
|
+
items?: NavBarItem[];
|
|
19
|
+
text?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface FooterProps extends React.HTMLAttributes<HTMLElement> {
|
|
23
|
+
className?: string;
|
|
24
|
+
columns?: ColumnProps[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// TODO: refactor icons together with TopNavigation
|
|
28
|
+
const FooterColumns = (props: ColumnProps) => {
|
|
29
|
+
const id = useId();
|
|
30
|
+
const { title, items, text } = props;
|
|
31
|
+
const processedItems = items && processNavBarItems(items);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<nav className={styles.column} aria-describedby={id}>
|
|
35
|
+
<Heading level={2} appearanceLevel={5} id={id}>
|
|
36
|
+
{title}
|
|
37
|
+
</Heading>
|
|
38
|
+
{text && <Markdown>{text}</Markdown>}
|
|
39
|
+
{processedItems && (
|
|
40
|
+
<LinkList>
|
|
41
|
+
{processedItems.map((item, index) => (
|
|
42
|
+
<LinkListLink
|
|
43
|
+
key={item.id || index}
|
|
44
|
+
href={item.href}
|
|
45
|
+
icon={item.icon}
|
|
46
|
+
>
|
|
47
|
+
{item.label}
|
|
48
|
+
</LinkListLink>
|
|
49
|
+
))}
|
|
50
|
+
</LinkList>
|
|
51
|
+
)}
|
|
52
|
+
</nav>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const Footer = (props: PropsWithChildren<FooterProps>) => {
|
|
57
|
+
const { className, columns, ...restProps } = props;
|
|
58
|
+
const columnsClass = `numColumns${Math.min(Number(columns?.length), 4)}`;
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<RHCFooter
|
|
62
|
+
className={clsx(className, styles.footer, styles[columnsClass])}
|
|
63
|
+
background="primary-outlined"
|
|
64
|
+
preFooter
|
|
65
|
+
{...restProps}
|
|
66
|
+
>
|
|
67
|
+
{columns &&
|
|
68
|
+
columns.length > 0 &&
|
|
69
|
+
columns.map((column, index) => (
|
|
70
|
+
<FooterColumns key={column.title || index} {...column} />
|
|
71
|
+
))}
|
|
72
|
+
</RHCFooter>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export default Footer;
|