@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.
Files changed (89) hide show
  1. package/CHANGELOG.md +130 -85
  2. package/LICENSE.md +291 -291
  3. package/README.md +20 -20
  4. package/package.json +5 -7
  5. package/src/alert/Alert.tsx +19 -19
  6. package/src/alert/styles.module.css +3 -3
  7. package/src/alignBox/AlignBox.tsx +114 -114
  8. package/src/alignBox/styles.module.css +110 -110
  9. package/src/amountLabel/AmountLabel.tsx +16 -16
  10. package/src/amountLabel/styles.module.css +11 -11
  11. package/src/analytics/PiwikPro.tsx +94 -94
  12. package/src/analytics/index.ts +1 -1
  13. package/src/article/Article.tsx +10 -10
  14. package/src/badgeList/BadgeList.tsx +34 -26
  15. package/src/badgeList/styles.module.css +37 -24
  16. package/src/block/Block.tsx +35 -35
  17. package/src/block/styles.module.css +29 -29
  18. package/src/button/Button.tsx +3 -3
  19. package/src/cardAsLink/CardAsLink.tsx +21 -21
  20. package/src/cardAsLink/styles.module.css +23 -23
  21. package/src/cardsList/CardsList.tsx +56 -54
  22. package/src/cardsList/styles.module.css +19 -19
  23. package/src/client.ts +7 -7
  24. package/src/container/Container.tsx +10 -10
  25. package/src/container/styles.module.css +28 -28
  26. package/src/copyButton/CopyButton.tsx +39 -39
  27. package/src/copyButton/styles.module.css +13 -13
  28. package/src/dataBadgeLink/DataBadgeLink.tsx +53 -53
  29. package/src/dataBadgeLink/styles.module.css +89 -69
  30. package/src/dataSummary/DataSummary.tsx +22 -22
  31. package/src/dataSummary/DataSummaryItem.tsx +21 -21
  32. package/src/dataSummary/styles.module.css +75 -75
  33. package/src/facetFilters/FacetFilters.tsx +419 -313
  34. package/src/facetFilters/styles.module.css +3 -3
  35. package/src/fieldset/FieldSet.tsx +3 -3
  36. package/src/filters/Filters.tsx +116 -115
  37. package/src/filters/styles.module.css +26 -26
  38. package/src/footer/Footer.tsx +76 -76
  39. package/src/footer/styles.module.css +103 -103
  40. package/src/formFieldCheckboxGroup/FormFieldCheckboxGroup.tsx +16 -16
  41. package/src/formFieldCheckboxGroup/styles.module.css +5 -5
  42. package/src/formFieldCheckboxOption/FormFieldCheckboxOption.tsx +26 -26
  43. package/src/formFieldCheckboxOption/styles.module.css +22 -22
  44. package/src/formFieldLabel/FormFieldLabel.tsx +23 -23
  45. package/src/formFieldRadioGroup/FormFieldRadioGroup.tsx +13 -13
  46. package/src/formFieldRadioGroup/styles.module.css +5 -5
  47. package/src/formFieldRadioOption/FormFieldRadioOption.tsx +75 -75
  48. package/src/formFieldRadioOption/styles.module.css +49 -49
  49. package/src/formFieldSwitch/FormFieldSwitch.tsx +79 -79
  50. package/src/formFieldSwitch/styles.module.css +32 -32
  51. package/src/formFieldTextInput/FormFieldTextInput.tsx +3 -3
  52. package/src/header/Header.tsx +137 -137
  53. package/src/header/styles.module.css +71 -71
  54. package/src/heading/Heading.tsx +15 -15
  55. package/src/headingGroup/HeadingGroup.tsx +48 -48
  56. package/src/headingGroup/styles.module.css +3 -3
  57. package/src/i18n.ts +25 -25
  58. package/src/iconBadge/IconBadge.tsx +35 -35
  59. package/src/iconBadge/getAppearance.ts +53 -53
  60. package/src/iconBadge/styles.module.css +19 -19
  61. package/src/iconsSprite/Icon.tsx +17 -17
  62. package/src/iconsSprite/IconsSprite.tsx +5 -5
  63. package/src/index.ts +107 -106
  64. package/src/infoButton/InfoButton.tsx +45 -45
  65. package/src/infoButton/styles.module.css +43 -43
  66. package/src/link/Link.tsx +10 -10
  67. package/src/markdown/Markdown.tsx +42 -42
  68. package/src/overlay/Overlay.tsx +18 -18
  69. package/src/overlay/styles.module.css +15 -15
  70. package/src/pagination/Pagination.tsx +267 -144
  71. package/src/pagination/styles.module.css +28 -13
  72. package/src/paragraph/Paragraph.tsx +24 -24
  73. package/src/paragraph/styles.module.css +6 -6
  74. package/src/pillBadge/PillBadge.examples.tsx +107 -107
  75. package/src/pillBadge/PillBadge.tsx +51 -51
  76. package/src/pillBadge/styles.module.css +214 -214
  77. package/src/readOnlyTextInput/ReadOnlyTextInput.tsx +24 -24
  78. package/src/readOnlyTextInput/styles.module.css +19 -19
  79. package/src/scoreBadge/ScoreBadge.tsx +133 -133
  80. package/src/search/Search.tsx +82 -66
  81. package/src/search/styles.module.css +39 -39
  82. package/src/siteLogo/SiteLogo.tsx +24 -24
  83. package/src/switch/Switch.tsx +86 -86
  84. package/src/switch/styles.module.css +7 -7
  85. package/src/toolTip/ToolTip.tsx +55 -55
  86. package/src/toolTip/styles.module.css +49 -48
  87. package/src/topNavigation/TopNavigation.tsx +67 -67
  88. package/src/topNavigation/styles.module.css +54 -54
  89. package/tsconfig.json +121 -121
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "license": "EUPL-1.2",
6
6
  "private": false,
7
7
  "type": "module",
8
- "version": "1.2.0",
8
+ "version": "1.3.1",
9
9
  "keywords": [],
10
10
  "publishConfig": {
11
11
  "access": "public"
@@ -29,19 +29,17 @@
29
29
  "@rijkshuisstijl-community/design-tokens": "11.0.0",
30
30
  "@types/parse-link-header": "^2.0.3",
31
31
  "clsx": "2.1.1",
32
- "i18next": "25.8.4",
32
+ "i18next": "26.3.1",
33
33
  "parse-link-header": "^2.0.0",
34
- "react-i18next": "16.5.4",
34
+ "react-i18next": "17.0.8",
35
35
  "react-markdown": "10.1.0",
36
36
  "remark-behead": "^3.1.0",
37
- "@developer-overheid-nl/don-register-locales": "1.1.0"
37
+ "@developer-overheid-nl/don-register-locales": "1.2.1"
38
38
  },
39
39
  "devDependencies": {
40
- "@vitejs/plugin-react": "^5.1.2",
41
40
  "rimraf": "^6.1.2",
42
41
  "typescript": "5.9.3",
43
- "vite": "7.1.7",
44
- "vite-plugin-dts": "^4.5.4"
42
+ "vite": "7.1.7"
45
43
  },
46
44
  "peerDependencies": {
47
45
  "@types/react": ">=19.2 <19.3",
@@ -1,19 +1,19 @@
1
- import {
2
- Alert as RHCAlert,
3
- type AlertProps as RHCAlertProps,
4
- } from "@rijkshuisstijl-community/components-react";
5
- import clsx from "clsx";
6
- import type { PropsWithChildren } from "react";
7
- import styles from "./styles.module.css";
8
-
9
- export interface AlertProps extends RHCAlertProps {
10
- className?: string;
11
- }
12
-
13
- const Alert = (props: PropsWithChildren<AlertProps>) => {
14
- const { className } = props;
15
-
16
- return <RHCAlert className={clsx(className, styles.alert)} {...props} />;
17
- };
18
-
19
- export default Alert;
1
+ import {
2
+ Alert as RHCAlert,
3
+ type AlertProps as RHCAlertProps,
4
+ } from "@rijkshuisstijl-community/components-react";
5
+ import clsx from "clsx";
6
+ import type { PropsWithChildren } from "react";
7
+ import styles from "./styles.module.css";
8
+
9
+ export interface AlertProps extends RHCAlertProps {
10
+ className?: string;
11
+ }
12
+
13
+ const Alert = (props: PropsWithChildren<AlertProps>) => {
14
+ const { className } = props;
15
+
16
+ return <RHCAlert className={clsx(className, styles.alert)} {...props} />;
17
+ };
18
+
19
+ export default Alert;
@@ -1,3 +1,3 @@
1
- .alert {
2
- --utrecht-space-around: 1;
3
- }
1
+ .alert {
2
+ --utrecht-space-around: 1;
3
+ }
@@ -1,114 +1,114 @@
1
- import clsx from "clsx";
2
- import type React from "react";
3
- import type { ReactNode } from "react";
4
- import styles from "./styles.module.css";
5
-
6
- type Align =
7
- | "left"
8
- | "center"
9
- | "right"
10
- | "top"
11
- | "bottom"
12
- | "middle"
13
- | "top-left"
14
- | "top-right"
15
- | "bottom-left"
16
- | "bottom-right"
17
- | "stretch"
18
- | "space-between"
19
- | "space-around"
20
- | "space-evenly";
21
-
22
- type Gap = "none" | "small" | "medium" | "large";
23
-
24
- export interface AlignBoxProps extends React.HTMLAttributes<HTMLDivElement> {
25
- align?: Align;
26
- gap?: Gap;
27
- direction?: "row" | "column";
28
- wrap?: boolean;
29
- display?: "block" | "inline";
30
- children: ReactNode;
31
- }
32
-
33
- const getAlignmentClass = (align: Align): string => {
34
- switch (align) {
35
- case "left":
36
- return styles.left;
37
- case "center":
38
- return styles.center;
39
- case "right":
40
- return styles.right;
41
- case "top":
42
- return styles.top;
43
- case "bottom":
44
- return styles.bottom;
45
- case "middle":
46
- return styles.middle;
47
- case "top-left":
48
- return styles.topLeft;
49
- case "top-right":
50
- return styles.topRight;
51
- case "bottom-left":
52
- return styles.bottomLeft;
53
- case "bottom-right":
54
- return styles.bottomRight;
55
- case "stretch":
56
- return styles.stretch;
57
- case "space-between":
58
- return styles.spaceBetween;
59
- case "space-around":
60
- return styles.spaceAround;
61
- case "space-evenly":
62
- return styles.spaceEvenly;
63
- default:
64
- return styles.center;
65
- }
66
- };
67
-
68
- const getGapClass = (gap: Gap): string => {
69
- switch (gap) {
70
- case "none":
71
- return styles.gapNone;
72
- case "small":
73
- return styles.gapSmall;
74
- case "medium":
75
- return styles.gapMedium;
76
- case "large":
77
- return styles.gapLarge;
78
- default:
79
- return styles.gapMedium;
80
- }
81
- };
82
-
83
- const AlignBox: React.FC<AlignBoxProps> = ({
84
- align = "center",
85
- gap = "none",
86
- direction = "row",
87
- wrap = false,
88
- display = "block",
89
- className,
90
- children,
91
- ...restProps
92
- }) => {
93
- const alignmentClass = getAlignmentClass(align);
94
- const gapClass = getGapClass(gap);
95
-
96
- return (
97
- <div
98
- className={clsx(
99
- styles.alignBox,
100
- styles[direction],
101
- wrap && styles.wrap,
102
- styles[display],
103
- alignmentClass,
104
- gapClass,
105
- className ?? "",
106
- )}
107
- {...restProps}
108
- >
109
- {children}
110
- </div>
111
- );
112
- };
113
-
114
- export default AlignBox;
1
+ import clsx from "clsx";
2
+ import type React from "react";
3
+ import type { ReactNode } from "react";
4
+ import styles from "./styles.module.css";
5
+
6
+ type Align =
7
+ | "left"
8
+ | "center"
9
+ | "right"
10
+ | "top"
11
+ | "bottom"
12
+ | "middle"
13
+ | "top-left"
14
+ | "top-right"
15
+ | "bottom-left"
16
+ | "bottom-right"
17
+ | "stretch"
18
+ | "space-between"
19
+ | "space-around"
20
+ | "space-evenly";
21
+
22
+ type Gap = "none" | "small" | "medium" | "large";
23
+
24
+ export interface AlignBoxProps extends React.HTMLAttributes<HTMLDivElement> {
25
+ align?: Align;
26
+ gap?: Gap;
27
+ direction?: "row" | "column";
28
+ wrap?: boolean;
29
+ display?: "block" | "inline";
30
+ children: ReactNode;
31
+ }
32
+
33
+ const getAlignmentClass = (align: Align): string => {
34
+ switch (align) {
35
+ case "left":
36
+ return styles.left;
37
+ case "center":
38
+ return styles.center;
39
+ case "right":
40
+ return styles.right;
41
+ case "top":
42
+ return styles.top;
43
+ case "bottom":
44
+ return styles.bottom;
45
+ case "middle":
46
+ return styles.middle;
47
+ case "top-left":
48
+ return styles.topLeft;
49
+ case "top-right":
50
+ return styles.topRight;
51
+ case "bottom-left":
52
+ return styles.bottomLeft;
53
+ case "bottom-right":
54
+ return styles.bottomRight;
55
+ case "stretch":
56
+ return styles.stretch;
57
+ case "space-between":
58
+ return styles.spaceBetween;
59
+ case "space-around":
60
+ return styles.spaceAround;
61
+ case "space-evenly":
62
+ return styles.spaceEvenly;
63
+ default:
64
+ return styles.center;
65
+ }
66
+ };
67
+
68
+ const getGapClass = (gap: Gap): string => {
69
+ switch (gap) {
70
+ case "none":
71
+ return styles.gapNone;
72
+ case "small":
73
+ return styles.gapSmall;
74
+ case "medium":
75
+ return styles.gapMedium;
76
+ case "large":
77
+ return styles.gapLarge;
78
+ default:
79
+ return styles.gapMedium;
80
+ }
81
+ };
82
+
83
+ const AlignBox: React.FC<AlignBoxProps> = ({
84
+ align = "center",
85
+ gap = "none",
86
+ direction = "row",
87
+ wrap = false,
88
+ display = "block",
89
+ className,
90
+ children,
91
+ ...restProps
92
+ }) => {
93
+ const alignmentClass = getAlignmentClass(align);
94
+ const gapClass = getGapClass(gap);
95
+
96
+ return (
97
+ <div
98
+ className={clsx(
99
+ styles.alignBox,
100
+ styles[direction],
101
+ wrap && styles.wrap,
102
+ styles[display],
103
+ alignmentClass,
104
+ gapClass,
105
+ className ?? "",
106
+ )}
107
+ {...restProps}
108
+ >
109
+ {children}
110
+ </div>
111
+ );
112
+ };
113
+
114
+ export default AlignBox;
@@ -1,110 +1,110 @@
1
- .alignBox {
2
- display: flex;
3
- inline-size: 100%;
4
-
5
- :global(.no-shrink) {
6
- flex-shrink: 0;
7
- }
8
- }
9
-
10
- .inline {
11
- inline-size: max-content;
12
- }
13
-
14
- .block {
15
- inline-size: 100%;
16
- }
17
-
18
- .row {
19
- flex-direction: row;
20
- }
21
-
22
- .column {
23
- flex-direction: column;
24
- }
25
-
26
- .wrap {
27
- flex-wrap: wrap;
28
- }
29
-
30
- .left {
31
- align-items: center;
32
- justify-content: flex-start;
33
- }
34
-
35
- .center,
36
- .middle {
37
- align-items: center;
38
- justify-content: center;
39
- }
40
-
41
- .right {
42
- align-items: center;
43
- justify-content: flex-end;
44
- }
45
-
46
- .top {
47
- align-items: flex-start;
48
- justify-content: center;
49
- }
50
-
51
- .bottom {
52
- align-items: flex-end;
53
- justify-content: center;
54
- }
55
-
56
- .topLeft {
57
- align-items: flex-start;
58
- justify-content: flex-start;
59
- }
60
-
61
- .topRight {
62
- align-items: flex-start;
63
- justify-content: flex-end;
64
- }
65
-
66
- .bottomLeft {
67
- align-items: flex-end;
68
- justify-content: flex-start;
69
- }
70
-
71
- .bottomRight {
72
- align-items: flex-end;
73
- justify-content: flex-end;
74
- }
75
-
76
- .stretch {
77
- align-items: stretch;
78
- justify-content: stretch;
79
- }
80
-
81
- .spaceBetween {
82
- align-items: center;
83
- justify-content: space-between;
84
- }
85
-
86
- .spaceAround {
87
- align-items: center;
88
- justify-content: space-around;
89
- }
90
-
91
- .spaceEvenly {
92
- align-items: center;
93
- justify-content: space-evenly;
94
- }
95
-
96
- .gapNone {
97
- gap: 0;
98
- }
99
-
100
- .gapSmall {
101
- gap: 0.5rem;
102
- }
103
-
104
- .gapMedium {
105
- gap: 1rem;
106
- }
107
-
108
- .gapLarge {
109
- gap: 2rem;
110
- }
1
+ .alignBox {
2
+ display: flex;
3
+ inline-size: 100%;
4
+
5
+ :global(.no-shrink) {
6
+ flex-shrink: 0;
7
+ }
8
+ }
9
+
10
+ .inline {
11
+ inline-size: max-content;
12
+ }
13
+
14
+ .block {
15
+ inline-size: 100%;
16
+ }
17
+
18
+ .row {
19
+ flex-direction: row;
20
+ }
21
+
22
+ .column {
23
+ flex-direction: column;
24
+ }
25
+
26
+ .wrap {
27
+ flex-wrap: wrap;
28
+ }
29
+
30
+ .left {
31
+ align-items: center;
32
+ justify-content: flex-start;
33
+ }
34
+
35
+ .center,
36
+ .middle {
37
+ align-items: center;
38
+ justify-content: center;
39
+ }
40
+
41
+ .right {
42
+ align-items: center;
43
+ justify-content: flex-end;
44
+ }
45
+
46
+ .top {
47
+ align-items: flex-start;
48
+ justify-content: center;
49
+ }
50
+
51
+ .bottom {
52
+ align-items: flex-end;
53
+ justify-content: center;
54
+ }
55
+
56
+ .topLeft {
57
+ align-items: flex-start;
58
+ justify-content: flex-start;
59
+ }
60
+
61
+ .topRight {
62
+ align-items: flex-start;
63
+ justify-content: flex-end;
64
+ }
65
+
66
+ .bottomLeft {
67
+ align-items: flex-end;
68
+ justify-content: flex-start;
69
+ }
70
+
71
+ .bottomRight {
72
+ align-items: flex-end;
73
+ justify-content: flex-end;
74
+ }
75
+
76
+ .stretch {
77
+ align-items: stretch;
78
+ justify-content: stretch;
79
+ }
80
+
81
+ .spaceBetween {
82
+ align-items: center;
83
+ justify-content: space-between;
84
+ }
85
+
86
+ .spaceAround {
87
+ align-items: center;
88
+ justify-content: space-around;
89
+ }
90
+
91
+ .spaceEvenly {
92
+ align-items: center;
93
+ justify-content: space-evenly;
94
+ }
95
+
96
+ .gapNone {
97
+ gap: 0;
98
+ }
99
+
100
+ .gapSmall {
101
+ gap: 0.5rem;
102
+ }
103
+
104
+ .gapMedium {
105
+ gap: 1rem;
106
+ }
107
+
108
+ .gapLarge {
109
+ gap: 2rem;
110
+ }
@@ -1,16 +1,16 @@
1
- import type { ReactNode } from "react";
2
- import styles from "./styles.module.css";
3
-
4
- export interface AmountLabelProps {
5
- label: ReactNode;
6
- amount?: string | number;
7
- }
8
-
9
- const AmountLabel = ({ label, amount }: AmountLabelProps) => (
10
- <div className={styles.amountLabel}>
11
- <span className={styles.labelText}>{label}</span>&nbsp;
12
- {amount ? <span className={styles.amountText}>({amount})</span> : null}
13
- </div>
14
- );
15
-
16
- export default AmountLabel;
1
+ import type { ReactNode } from "react";
2
+ import styles from "./styles.module.css";
3
+
4
+ export interface AmountLabelProps {
5
+ label: ReactNode;
6
+ amount?: string | number;
7
+ }
8
+
9
+ const AmountLabel = ({ label, amount }: AmountLabelProps) => (
10
+ <div className={styles.amountLabel}>
11
+ <span className={styles.labelText}>{label}</span>&nbsp;
12
+ {amount ? <span className={styles.amountText}>({amount})</span> : null}
13
+ </div>
14
+ );
15
+
16
+ export default AmountLabel;
@@ -1,11 +1,11 @@
1
- .amountLabel {
2
- display: inline-block;
3
- }
4
-
5
- .labelText {
6
- word-break: break-word;
7
- }
8
-
9
- .amountText {
10
- font-size: smaller;
11
- }
1
+ .amountLabel {
2
+ display: inline-block;
3
+ }
4
+
5
+ .labelText {
6
+ word-break: break-word;
7
+ }
8
+
9
+ .amountText {
10
+ font-size: smaller;
11
+ }