@developer-overheid-nl/don-register-components 1.2.0 → 1.3.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/CHANGELOG.md +130 -85
- package/LICENSE.md +291 -291
- package/README.md +20 -20
- package/package.json +5 -7
- package/src/alert/Alert.tsx +19 -19
- package/src/alert/styles.module.css +3 -3
- package/src/alignBox/AlignBox.tsx +114 -114
- package/src/alignBox/styles.module.css +110 -110
- package/src/amountLabel/AmountLabel.tsx +16 -16
- package/src/amountLabel/styles.module.css +11 -11
- package/src/analytics/PiwikPro.tsx +94 -94
- package/src/analytics/index.ts +1 -1
- package/src/article/Article.tsx +10 -10
- package/src/badgeList/BadgeList.tsx +34 -26
- package/src/badgeList/styles.module.css +37 -24
- 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 +56 -54
- package/src/cardsList/styles.module.css +19 -19
- package/src/client.ts +7 -7
- 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 +53 -53
- package/src/dataBadgeLink/styles.module.css +89 -69
- package/src/dataSummary/DataSummary.tsx +22 -22
- package/src/dataSummary/DataSummaryItem.tsx +21 -21
- package/src/dataSummary/styles.module.css +75 -75
- package/src/facetFilters/FacetFilters.tsx +419 -313
- package/src/facetFilters/styles.module.css +3 -3
- package/src/fieldset/FieldSet.tsx +3 -3
- package/src/filters/Filters.tsx +116 -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/formFieldCheckboxGroup/FormFieldCheckboxGroup.tsx +16 -16
- package/src/formFieldCheckboxGroup/styles.module.css +5 -5
- package/src/formFieldCheckboxOption/FormFieldCheckboxOption.tsx +26 -26
- package/src/formFieldCheckboxOption/styles.module.css +22 -22
- package/src/formFieldLabel/FormFieldLabel.tsx +23 -23
- package/src/formFieldRadioGroup/FormFieldRadioGroup.tsx +13 -13
- package/src/formFieldRadioGroup/styles.module.css +5 -5
- package/src/formFieldRadioOption/FormFieldRadioOption.tsx +75 -75
- package/src/formFieldRadioOption/styles.module.css +49 -49
- package/src/formFieldSwitch/FormFieldSwitch.tsx +79 -79
- package/src/formFieldSwitch/styles.module.css +32 -32
- 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 +15 -15
- package/src/headingGroup/HeadingGroup.tsx +48 -48
- package/src/headingGroup/styles.module.css +3 -3
- package/src/i18n.ts +25 -25
- package/src/iconBadge/IconBadge.tsx +35 -35
- package/src/iconBadge/getAppearance.ts +53 -53
- 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 +107 -106
- package/src/infoButton/InfoButton.tsx +45 -45
- package/src/infoButton/styles.module.css +43 -43
- package/src/link/Link.tsx +10 -10
- package/src/markdown/Markdown.tsx +42 -42
- package/src/overlay/Overlay.tsx +18 -18
- package/src/overlay/styles.module.css +15 -15
- package/src/pagination/Pagination.tsx +267 -144
- package/src/pagination/styles.module.css +28 -13
- package/src/paragraph/Paragraph.tsx +24 -24
- package/src/paragraph/styles.module.css +6 -6
- package/src/pillBadge/PillBadge.examples.tsx +107 -107
- package/src/pillBadge/PillBadge.tsx +51 -51
- package/src/pillBadge/styles.module.css +214 -214
- package/src/readOnlyTextInput/ReadOnlyTextInput.tsx +24 -24
- package/src/readOnlyTextInput/styles.module.css +19 -19
- package/src/scoreBadge/ScoreBadge.tsx +133 -133
- package/src/search/Search.tsx +82 -66
- package/src/search/styles.module.css +39 -39
- package/src/siteLogo/SiteLogo.tsx +24 -24
- package/src/switch/Switch.tsx +86 -86
- package/src/switch/styles.module.css +7 -7
- package/src/toolTip/ToolTip.tsx +55 -55
- package/src/toolTip/styles.module.css +49 -48
- package/src/topNavigation/TopNavigation.tsx +67 -67
- package/src/topNavigation/styles.module.css +54 -54
- package/tsconfig.json +121 -121
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
.cardsList {
|
|
2
|
-
--rhc-card-as-link-inline-size: 100%;
|
|
3
|
-
--rhc-card-as-link-active-text-decoration: none;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
row-gap: var(--rhc-space-200);
|
|
7
|
-
padding-inline-start: 0;
|
|
8
|
-
list-style-type: none;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:global(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/* TODO: specifity */
|
|
16
|
-
:global(.nl-heading) {
|
|
17
|
-
text-decoration: underline;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
.cardsList {
|
|
2
|
+
--rhc-card-as-link-inline-size: 100%;
|
|
3
|
+
--rhc-card-as-link-active-text-decoration: none;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
row-gap: var(--rhc-space-200);
|
|
7
|
+
padding-inline-start: 0;
|
|
8
|
+
list-style-type: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:global(
|
|
12
|
+
.rhc-card-as-link:hover
|
|
13
|
+
.rhc-card-as-link__heading.rhc-card-as-link__heading
|
|
14
|
+
) {
|
|
15
|
+
/* TODO: specifity */
|
|
16
|
+
:global(.nl-heading) {
|
|
17
|
+
text-decoration: underline;
|
|
18
|
+
}
|
|
19
|
+
}
|
package/src/client.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// Barrel export for client-side components
|
|
2
|
-
export { default as CopyButton } from "./copyButton/CopyButton";
|
|
3
|
-
export {
|
|
4
|
-
default as FacetFilters,
|
|
5
|
-
type FacetFiltersProps,
|
|
6
|
-
type FilterData,
|
|
7
|
-
} from "./facetFilters/FacetFilters";
|
|
1
|
+
// Barrel export for client-side components
|
|
2
|
+
export { default as CopyButton } from "./copyButton/CopyButton";
|
|
3
|
+
export {
|
|
4
|
+
default as FacetFilters,
|
|
5
|
+
type FacetFiltersProps,
|
|
6
|
+
type FilterData,
|
|
7
|
+
} from "./facetFilters/FacetFilters";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import styles from "./styles.module.css";
|
|
2
|
-
|
|
3
|
-
export default function Container(props: React.HTMLProps<HTMLDivElement>) {
|
|
4
|
-
const { children, className, ...restProps } = props || {};
|
|
5
|
-
return (
|
|
6
|
-
<div className={`${styles.container} ${className || ""}`} {...restProps}>
|
|
7
|
-
{children}
|
|
8
|
-
</div>
|
|
9
|
-
);
|
|
10
|
-
}
|
|
1
|
+
import styles from "./styles.module.css";
|
|
2
|
+
|
|
3
|
+
export default function Container(props: React.HTMLProps<HTMLDivElement>) {
|
|
4
|
+
const { children, className, ...restProps } = props || {};
|
|
5
|
+
return (
|
|
6
|
+
<div className={`${styles.container} ${className || ""}`} {...restProps}>
|
|
7
|
+
{children}
|
|
8
|
+
</div>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
inline-size: var(--rhc-nav-bar-container-inline-size);
|
|
6
|
-
|
|
7
|
-
> * {
|
|
8
|
-
flex: 1;
|
|
9
|
-
max-inline-size: var(--rhc-nav-bar-max-inline-size);
|
|
10
|
-
padding-inline-start: var(--rhc-nav-bar-link-padding-inline-start);
|
|
11
|
-
padding-inline-end: var(--rhc-nav-bar-link-padding-inline-end);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@media (--xs-and-below-viewport) {
|
|
16
|
-
.container {
|
|
17
|
-
> * {
|
|
18
|
-
padding-inline-start: calc(
|
|
19
|
-
var(--rhc-nav-bar-link-padding-inline-start) *
|
|
20
|
-
0.5
|
|
21
|
-
);
|
|
22
|
-
padding-inline-end: calc(
|
|
23
|
-
var(--rhc-nav-bar-link-padding-inline-end) *
|
|
24
|
-
0.5
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
inline-size: var(--rhc-nav-bar-container-inline-size);
|
|
6
|
+
|
|
7
|
+
> * {
|
|
8
|
+
flex: 1;
|
|
9
|
+
max-inline-size: var(--rhc-nav-bar-max-inline-size);
|
|
10
|
+
padding-inline-start: var(--rhc-nav-bar-link-padding-inline-start);
|
|
11
|
+
padding-inline-end: var(--rhc-nav-bar-link-padding-inline-end);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@media (--xs-and-below-viewport) {
|
|
16
|
+
.container {
|
|
17
|
+
> * {
|
|
18
|
+
padding-inline-start: calc(
|
|
19
|
+
var(--rhc-nav-bar-link-padding-inline-start) *
|
|
20
|
+
0.5
|
|
21
|
+
);
|
|
22
|
+
padding-inline-end: calc(
|
|
23
|
+
var(--rhc-nav-bar-link-padding-inline-end) *
|
|
24
|
+
0.5
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { SecondaryActionButton } from "@rijkshuisstijl-community/components-react";
|
|
4
|
-
import clsx from "clsx";
|
|
5
|
-
import Icon from "../iconsSprite/Icon";
|
|
6
|
-
import styles from "./styles.module.css";
|
|
7
|
-
|
|
8
|
-
interface CopyButtonProps
|
|
9
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
10
|
-
text?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const CopyButton = ({ text, className, ...restProps }: CopyButtonProps) => {
|
|
14
|
-
const handleCopy = async () => {
|
|
15
|
-
if ("clipboard" in navigator) {
|
|
16
|
-
await navigator.clipboard.writeText(
|
|
17
|
-
text || "Sorry, no text to copy was set...",
|
|
18
|
-
);
|
|
19
|
-
} else {
|
|
20
|
-
console.warn("Clipboard API not supported");
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
text && (
|
|
26
|
-
<SecondaryActionButton
|
|
27
|
-
className={clsx([className, styles.button])}
|
|
28
|
-
onClick={handleCopy}
|
|
29
|
-
title="Kopieer naar klembord"
|
|
30
|
-
aria-label="Kopieer naar klembord"
|
|
31
|
-
{...restProps}
|
|
32
|
-
>
|
|
33
|
-
<Icon className={styles.icon} name="kopieer-inline" />
|
|
34
|
-
</SecondaryActionButton>
|
|
35
|
-
)
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export default CopyButton;
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { SecondaryActionButton } from "@rijkshuisstijl-community/components-react";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import Icon from "../iconsSprite/Icon";
|
|
6
|
+
import styles from "./styles.module.css";
|
|
7
|
+
|
|
8
|
+
interface CopyButtonProps
|
|
9
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
10
|
+
text?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const CopyButton = ({ text, className, ...restProps }: CopyButtonProps) => {
|
|
14
|
+
const handleCopy = async () => {
|
|
15
|
+
if ("clipboard" in navigator) {
|
|
16
|
+
await navigator.clipboard.writeText(
|
|
17
|
+
text || "Sorry, no text to copy was set...",
|
|
18
|
+
);
|
|
19
|
+
} else {
|
|
20
|
+
console.warn("Clipboard API not supported");
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
text && (
|
|
26
|
+
<SecondaryActionButton
|
|
27
|
+
className={clsx([className, styles.button])}
|
|
28
|
+
onClick={handleCopy}
|
|
29
|
+
title="Kopieer naar klembord"
|
|
30
|
+
aria-label="Kopieer naar klembord"
|
|
31
|
+
{...restProps}
|
|
32
|
+
>
|
|
33
|
+
<Icon className={styles.icon} name="kopieer-inline" />
|
|
34
|
+
</SecondaryActionButton>
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default CopyButton;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
.button {
|
|
2
|
-
--utrecht-button-padding-block-end: 0.125rem;
|
|
3
|
-
--utrecht-button-padding-block-start: 0.125rem;
|
|
4
|
-
--utrecht-button-padding-inline-end: 0.125rem;
|
|
5
|
-
--utrecht-button-padding-inline-start: 0.125rem;
|
|
6
|
-
--utrecht-button-min-block-size: 36px;
|
|
7
|
-
--utrecht-button-min-inline-size: 36px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.icon {
|
|
11
|
-
width: 1.5rem;
|
|
12
|
-
height: 1.5rem;
|
|
13
|
-
}
|
|
1
|
+
.button {
|
|
2
|
+
--utrecht-button-padding-block-end: 0.125rem;
|
|
3
|
+
--utrecht-button-padding-block-start: 0.125rem;
|
|
4
|
+
--utrecht-button-padding-inline-end: 0.125rem;
|
|
5
|
+
--utrecht-button-padding-inline-start: 0.125rem;
|
|
6
|
+
--utrecht-button-min-block-size: 36px;
|
|
7
|
+
--utrecht-button-min-inline-size: 36px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.icon {
|
|
11
|
+
width: 1.5rem;
|
|
12
|
+
height: 1.5rem;
|
|
13
|
+
}
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DataBadgeButton,
|
|
3
|
-
type DataBadgeButtonProps,
|
|
4
|
-
} from "@rijkshuisstijl-community/components-react";
|
|
5
|
-
import clsx from "clsx";
|
|
6
|
-
import styles from "./styles.module.css";
|
|
7
|
-
|
|
8
|
-
export interface DataBadgeLinkProps
|
|
9
|
-
extends Omit<DataBadgeButtonProps, "aria-pressed" | "pressed"> {
|
|
10
|
-
href: string;
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
target?: React.HTMLAttributeAnchorTarget;
|
|
13
|
-
rel?: string;
|
|
14
|
-
className?: string;
|
|
15
|
-
role?: string;
|
|
16
|
-
appearance?: "primary" | "outlined" | "subtle";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const DataBadgeLink = (props: DataBadgeLinkProps) => {
|
|
20
|
-
const {
|
|
21
|
-
href,
|
|
22
|
-
target,
|
|
23
|
-
rel,
|
|
24
|
-
children,
|
|
25
|
-
className,
|
|
26
|
-
role,
|
|
27
|
-
tabIndex = undefined,
|
|
28
|
-
appearance = "primary",
|
|
29
|
-
...restProps
|
|
30
|
-
} = props;
|
|
31
|
-
return (
|
|
32
|
-
<DataBadgeButton
|
|
33
|
-
className={clsx(className, styles.donDataBadge, styles[appearance])}
|
|
34
|
-
/* biome-ignore lint/a11y/useValidAriaValues: {null} is needed to remove it */
|
|
35
|
-
aria-pressed={undefined}
|
|
36
|
-
role={role}
|
|
37
|
-
/* RHC DataBadgeButton had a tabindex=0 on the span, and a focus ring, but no interaction */
|
|
38
|
-
tabIndex={tabIndex}
|
|
39
|
-
{...restProps}
|
|
40
|
-
>
|
|
41
|
-
<a
|
|
42
|
-
className={clsx(styles.badgeLink)}
|
|
43
|
-
href={href}
|
|
44
|
-
target={target}
|
|
45
|
-
rel={rel}
|
|
46
|
-
>
|
|
47
|
-
{children}
|
|
48
|
-
</a>
|
|
49
|
-
</DataBadgeButton>
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export default DataBadgeLink;
|
|
1
|
+
import {
|
|
2
|
+
DataBadgeButton,
|
|
3
|
+
type DataBadgeButtonProps,
|
|
4
|
+
} from "@rijkshuisstijl-community/components-react";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
import styles from "./styles.module.css";
|
|
7
|
+
|
|
8
|
+
export interface DataBadgeLinkProps
|
|
9
|
+
extends Omit<DataBadgeButtonProps, "aria-pressed" | "pressed"> {
|
|
10
|
+
href: string;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
target?: React.HTMLAttributeAnchorTarget;
|
|
13
|
+
rel?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
role?: string;
|
|
16
|
+
appearance?: "primary" | "outlined" | "subtle" | "link";
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const DataBadgeLink = (props: DataBadgeLinkProps) => {
|
|
20
|
+
const {
|
|
21
|
+
href,
|
|
22
|
+
target,
|
|
23
|
+
rel,
|
|
24
|
+
children,
|
|
25
|
+
className,
|
|
26
|
+
role,
|
|
27
|
+
tabIndex = undefined,
|
|
28
|
+
appearance = "primary",
|
|
29
|
+
...restProps
|
|
30
|
+
} = props;
|
|
31
|
+
return (
|
|
32
|
+
<DataBadgeButton
|
|
33
|
+
className={clsx(className, styles.donDataBadge, styles[appearance])}
|
|
34
|
+
/* biome-ignore lint/a11y/useValidAriaValues: {null} is needed to remove it */
|
|
35
|
+
aria-pressed={undefined}
|
|
36
|
+
role={role}
|
|
37
|
+
/* RHC DataBadgeButton had a tabindex=0 on the span, and a focus ring, but no interaction */
|
|
38
|
+
tabIndex={tabIndex}
|
|
39
|
+
{...restProps}
|
|
40
|
+
>
|
|
41
|
+
<a
|
|
42
|
+
className={clsx(styles.badgeLink)}
|
|
43
|
+
href={href}
|
|
44
|
+
target={target}
|
|
45
|
+
rel={rel}
|
|
46
|
+
>
|
|
47
|
+
{children}
|
|
48
|
+
</a>
|
|
49
|
+
</DataBadgeButton>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default DataBadgeLink;
|
|
@@ -1,69 +1,89 @@
|
|
|
1
|
-
.donDataBadge.donDataBadge {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
&:
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
.donDataBadge.donDataBadge {
|
|
2
|
+
.badgeLink {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
padding-block: 0.25rem;
|
|
5
|
+
color: inherit;
|
|
6
|
+
text-decoration: inherit;
|
|
7
|
+
|
|
8
|
+
&:focus-visible {
|
|
9
|
+
outline: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* fix for non-clickable icons bug */
|
|
13
|
+
&::before {
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 0;
|
|
16
|
+
left: 0;
|
|
17
|
+
display: block;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
content: '';
|
|
21
|
+
border-radius: var(
|
|
22
|
+
--utrecht-data-badge-border-radius,
|
|
23
|
+
var(--utrecht-badge-border-radius, 0.5ch)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&.primary {
|
|
29
|
+
--_utrecht-data-badge-color: oklch(
|
|
30
|
+
from var(--utrecht-data-badge-color) calc(l - 0.1) c h
|
|
31
|
+
);
|
|
32
|
+
color: var(--_utrecht-data-badge-color);
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
color: var(--utrecht-data-badge-color);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.outlined {
|
|
40
|
+
--_utrecht-data-badge-background-color: var(--rhc-color-canvas);
|
|
41
|
+
background-color: var(--_utrecht-data-badge-background-color);
|
|
42
|
+
border: 2px solid var(--utrecht-data-badge-color);
|
|
43
|
+
|
|
44
|
+
&:hover {
|
|
45
|
+
background-color: var(--utrecht-data-badge-background-color);
|
|
46
|
+
border-color: var(--utrecht-data-badge-background-color);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.subtle {
|
|
51
|
+
--_utrecht-data-badge-color: var(--nl-link-color);
|
|
52
|
+
--_utrecht-data-badge-background-color: var(--rhc-color-cool-grey-200);
|
|
53
|
+
--utrecht-data-badge-font-weight: normal;
|
|
54
|
+
color: var(--_utrecht-data-badge-color);
|
|
55
|
+
background-color: var(--_utrecht-data-badge-background-color);
|
|
56
|
+
|
|
57
|
+
&:hover {
|
|
58
|
+
color: var(--rhc-color-cool-grey-50);
|
|
59
|
+
background-color: var(--rhc-color-cool-grey-500);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.link {
|
|
64
|
+
--_utrecht-data-badge-color: var(--nl-link-color);
|
|
65
|
+
--_utrecht-data-badge-background-color: var(--rhc-color-wit);
|
|
66
|
+
--utrecht-data-badge-font-weight: normal;
|
|
67
|
+
color: var(--_utrecht-data-badge-color);
|
|
68
|
+
background-color: var(--_utrecht-data-badge-background-color);
|
|
69
|
+
|
|
70
|
+
.badgeLink {
|
|
71
|
+
text-decoration: underline;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:hover {
|
|
75
|
+
background-color: var(--rhc-color-cool-grey-100);
|
|
76
|
+
|
|
77
|
+
.badgeLink {
|
|
78
|
+
text-decoration: none;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:focus-within {
|
|
84
|
+
outline-width: var(--utrecht-focus-outline-width, revert);
|
|
85
|
+
outline-style: var(--utrecht-focus-outline-style, revert);
|
|
86
|
+
outline-color: var(--utrecht-focus-outline-color, revert);
|
|
87
|
+
outline-offset: var(--utrecht-focus-outline-offset, revert);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DataSummary as RHCDataSummary,
|
|
3
|
-
type DataSummaryProps as RHCDataSummaryProps,
|
|
4
|
-
} from "@rijkshuisstijl-community/components-react";
|
|
5
|
-
import clsx from "clsx";
|
|
6
|
-
import styles from "./styles.module.css";
|
|
7
|
-
|
|
8
|
-
export interface DataSummaryProps extends RHCDataSummaryProps {
|
|
9
|
-
contained?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const DataSummary = (props: DataSummaryProps) => {
|
|
13
|
-
const { className, contained = false, ...restProps } = props;
|
|
14
|
-
return (
|
|
15
|
-
<RHCDataSummary
|
|
16
|
-
className={clsx(className, { [styles.isContained]: contained })}
|
|
17
|
-
{...restProps}
|
|
18
|
-
/>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default DataSummary;
|
|
1
|
+
import {
|
|
2
|
+
DataSummary as RHCDataSummary,
|
|
3
|
+
type DataSummaryProps as RHCDataSummaryProps,
|
|
4
|
+
} from "@rijkshuisstijl-community/components-react";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
import styles from "./styles.module.css";
|
|
7
|
+
|
|
8
|
+
export interface DataSummaryProps extends RHCDataSummaryProps {
|
|
9
|
+
contained?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const DataSummary = (props: DataSummaryProps) => {
|
|
13
|
+
const { className, contained = false, ...restProps } = props;
|
|
14
|
+
return (
|
|
15
|
+
<RHCDataSummary
|
|
16
|
+
className={clsx(className, { [styles.isContained]: contained })}
|
|
17
|
+
{...restProps}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default DataSummary;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DataSummaryItem as RHCDataSummaryItem,
|
|
3
|
-
type DataSummaryItemProps as RHCDataSummaryItemProps,
|
|
4
|
-
} from "@rijkshuisstijl-community/components-react";
|
|
5
|
-
|
|
6
|
-
export interface DataSummaryItemProps
|
|
7
|
-
extends Partial<RHCDataSummaryItemProps> {}
|
|
8
|
-
|
|
9
|
-
const DataSummaryItem = (props: DataSummaryItemProps) => {
|
|
10
|
-
const { className, itemKey = "", itemValue = "-", ...restProps } = props;
|
|
11
|
-
return (
|
|
12
|
-
<RHCDataSummaryItem
|
|
13
|
-
itemKey={itemKey}
|
|
14
|
-
itemValue={itemValue}
|
|
15
|
-
className={className}
|
|
16
|
-
{...restProps}
|
|
17
|
-
/>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export default DataSummaryItem;
|
|
1
|
+
import {
|
|
2
|
+
DataSummaryItem as RHCDataSummaryItem,
|
|
3
|
+
type DataSummaryItemProps as RHCDataSummaryItemProps,
|
|
4
|
+
} from "@rijkshuisstijl-community/components-react";
|
|
5
|
+
|
|
6
|
+
export interface DataSummaryItemProps
|
|
7
|
+
extends Partial<RHCDataSummaryItemProps> {}
|
|
8
|
+
|
|
9
|
+
const DataSummaryItem = (props: DataSummaryItemProps) => {
|
|
10
|
+
const { className, itemKey = "", itemValue = "-", ...restProps } = props;
|
|
11
|
+
return (
|
|
12
|
+
<RHCDataSummaryItem
|
|
13
|
+
itemKey={itemKey}
|
|
14
|
+
itemValue={itemValue}
|
|
15
|
+
className={className}
|
|
16
|
+
{...restProps}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default DataSummaryItem;
|