@conduction/components 1.0.2

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 (123) hide show
  1. package/.prettierrc +29 -0
  2. package/README.md +1 -0
  3. package/lib/components/card/HorizontalImageCard/HorizontalImageCard.d.ts +13 -0
  4. package/lib/components/card/HorizontalImageCard/HorizontalImageCard.js +9 -0
  5. package/lib/components/card/HorizontalImageCard/HorizontalImageCard.module.css +26 -0
  6. package/lib/components/card/RichContentCard/RichContentCard.d.ts +19 -0
  7. package/lib/components/card/RichContentCard/RichContentCard.js +17 -0
  8. package/lib/components/card/RichContentCard/RichContentCard.module.css +100 -0
  9. package/lib/components/card/downloadCard/DownloadCard.d.ts +9 -0
  10. package/lib/components/card/downloadCard/DownloadCard.js +10 -0
  11. package/lib/components/card/downloadCard/DownloadCard.module.css +23 -0
  12. package/lib/components/card/imageAndDetailsCard/ImageAndDetailsCard.d.ts +14 -0
  13. package/lib/components/card/imageAndDetailsCard/ImageAndDetailsCard.js +9 -0
  14. package/lib/components/card/imageAndDetailsCard/ImageAndDetailsCard.module.css +54 -0
  15. package/lib/components/card/index.d.ts +5 -0
  16. package/lib/components/card/index.js +5 -0
  17. package/lib/components/casesTable/CasesTable.d.ts +6 -0
  18. package/lib/components/casesTable/CasesTable.js +11 -0
  19. package/lib/components/casesTable/CasesTable.module.css +4 -0
  20. package/lib/components/container/Container.d.ts +2 -0
  21. package/lib/components/container/Container.js +3 -0
  22. package/lib/components/container/Container.module.css +5 -0
  23. package/lib/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.css +222 -0
  24. package/lib/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.d.ts +17 -0
  25. package/lib/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.js +20 -0
  26. package/lib/components/editableTableRow/EditableTableRow.d.ts +11 -0
  27. package/lib/components/editableTableRow/EditableTableRow.js +34 -0
  28. package/lib/components/editableTableRow/EditableTableRow.module.css +25 -0
  29. package/lib/components/formFields/checkbox.d.ts +3 -0
  30. package/lib/components/formFields/checkbox.js +3 -0
  31. package/lib/components/formFields/index.d.ts +4 -0
  32. package/lib/components/formFields/index.js +4 -0
  33. package/lib/components/formFields/input.d.ts +7 -0
  34. package/lib/components/formFields/input.js +12 -0
  35. package/lib/components/formFields/textarea.d.ts +3 -0
  36. package/lib/components/formFields/textarea.js +3 -0
  37. package/lib/components/formFields/types.d.ts +20 -0
  38. package/lib/components/formFields/types.js +1 -0
  39. package/lib/components/imageDivider/ImageDivider.d.ts +7 -0
  40. package/lib/components/imageDivider/ImageDivider.js +6 -0
  41. package/lib/components/imageDivider/imageDivider.module.css +5 -0
  42. package/lib/components/logo/Logo.d.ts +8 -0
  43. package/lib/components/logo/Logo.js +10 -0
  44. package/lib/components/logo/Logo.module.css +15 -0
  45. package/lib/components/messageForm/MessageForm.d.ts +2 -0
  46. package/lib/components/messageForm/MessageForm.js +12 -0
  47. package/lib/components/messagesTable/MessagesTable.d.ts +11 -0
  48. package/lib/components/messagesTable/MessagesTable.js +11 -0
  49. package/lib/components/messagesTable/MessagesTable.module.css +4 -0
  50. package/lib/components/metaIcon/MetaIcon.d.ts +7 -0
  51. package/lib/components/metaIcon/MetaIcon.js +3 -0
  52. package/lib/components/metaIcon/MetaIcon.module.css +17 -0
  53. package/lib/components/privateRoute/PrivateRoute.d.ts +6 -0
  54. package/lib/components/privateRoute/PrivateRoute.js +15 -0
  55. package/lib/components/statusSteps/StatusSteps.d.ts +13 -0
  56. package/lib/components/statusSteps/StatusSteps.js +5 -0
  57. package/lib/components/topNav/TopNav.d.ts +12 -0
  58. package/lib/components/topNav/TopNav.js +10 -0
  59. package/lib/components/topNav/TopNav.module.css +22 -0
  60. package/lib/index.d.ts +15 -0
  61. package/lib/index.js +15 -0
  62. package/package.json +56 -0
  63. package/src/components/card/HorizontalImageCard/HorizontalImageCard.js +9 -0
  64. package/src/components/card/HorizontalImageCard/HorizontalImageCard.module.css +26 -0
  65. package/src/components/card/HorizontalImageCard/HorizontalImageCard.tsx +37 -0
  66. package/src/components/card/RichContentCard/RichContentCard.js +17 -0
  67. package/src/components/card/RichContentCard/RichContentCard.module.css +100 -0
  68. package/src/components/card/RichContentCard/RichContentCard.tsx +105 -0
  69. package/src/components/card/downloadCard/DownloadCard.js +10 -0
  70. package/src/components/card/downloadCard/DownloadCard.module.css +23 -0
  71. package/src/components/card/downloadCard/DownloadCard.tsx +33 -0
  72. package/src/components/card/imageAndDetailsCard/ImageAndDetailsCard.js +9 -0
  73. package/src/components/card/imageAndDetailsCard/ImageAndDetailsCard.module.css +54 -0
  74. package/src/components/card/imageAndDetailsCard/ImageAndDetailsCard.tsx +49 -0
  75. package/src/components/card/index.js +5 -0
  76. package/src/components/card/index.tsx +6 -0
  77. package/src/components/casesTable/CasesTable.js +11 -0
  78. package/src/components/casesTable/CasesTable.module.css +4 -0
  79. package/src/components/casesTable/CasesTable.tsx +41 -0
  80. package/src/components/container/Container.js +3 -0
  81. package/src/components/container/Container.module.css +5 -0
  82. package/src/components/container/Container.tsx +4 -0
  83. package/src/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.css +222 -0
  84. package/src/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.js +20 -0
  85. package/src/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.tsx +89 -0
  86. package/src/components/editableTableRow/EditableTableRow.js +34 -0
  87. package/src/components/editableTableRow/EditableTableRow.module.css +25 -0
  88. package/src/components/editableTableRow/EditableTableRow.tsx +130 -0
  89. package/src/components/formFields/checkbox.js +3 -0
  90. package/src/components/formFields/checkbox.tsx +9 -0
  91. package/src/components/formFields/index.js +4 -0
  92. package/src/components/formFields/index.tsx +5 -0
  93. package/src/components/formFields/input.js +12 -0
  94. package/src/components/formFields/input.tsx +88 -0
  95. package/src/components/formFields/textarea.js +3 -0
  96. package/src/components/formFields/textarea.tsx +7 -0
  97. package/src/components/formFields/types.js +1 -0
  98. package/src/components/formFields/types.ts +24 -0
  99. package/src/components/imageDivider/ImageDivider.js +6 -0
  100. package/src/components/imageDivider/ImageDivider.tsx +12 -0
  101. package/src/components/imageDivider/imageDivider.module.css +5 -0
  102. package/src/components/logo/Logo.js +10 -0
  103. package/src/components/logo/Logo.module.css +15 -0
  104. package/src/components/logo/Logo.tsx +25 -0
  105. package/src/components/messageForm/MessageForm.js +12 -0
  106. package/src/components/messageForm/MessageForm.tsx +32 -0
  107. package/src/components/messagesTable/MessagesTable.js +11 -0
  108. package/src/components/messagesTable/MessagesTable.module.css +4 -0
  109. package/src/components/messagesTable/MessagesTable.tsx +45 -0
  110. package/src/components/metaIcon/MetaIcon.js +3 -0
  111. package/src/components/metaIcon/MetaIcon.module.css +17 -0
  112. package/src/components/metaIcon/MetaIcon.tsx +18 -0
  113. package/src/components/privateRoute/PrivateRoute.js +15 -0
  114. package/src/components/privateRoute/PrivateRoute.tsx +22 -0
  115. package/src/components/statusSteps/StatusSteps.js +5 -0
  116. package/src/components/statusSteps/StatusSteps.tsx +54 -0
  117. package/src/components/topNav/TopNav.js +10 -0
  118. package/src/components/topNav/TopNav.module.css +22 -0
  119. package/src/components/topNav/TopNav.tsx +46 -0
  120. package/src/custom.d.ts +5 -0
  121. package/src/index.js +14 -0
  122. package/src/index.ts +50 -0
  123. package/tsconfig.json +18 -0
@@ -0,0 +1,100 @@
1
+ .container {
2
+ display: flex;
3
+ flex-direction: column;
4
+ border: var(--nlportal-document-border, 1px solid);
5
+ border-radius: var(--nlportal-border-radius);
6
+
7
+ padding-inline-start: var(--nlportal-space-inline-md);
8
+ padding-inline-end: var(--nlportal-space-inline-md);
9
+ padding-block-start: var(--nlportal-space-block-md);
10
+ padding-block-end: var(--nlportal-space-block-xl);
11
+ }
12
+
13
+ .container > *:not(.link):not(:last-child) {
14
+ margin-block-end: var(--nlportal-space-block-md);
15
+ }
16
+
17
+ .link {
18
+ margin-block-end: var(--nlportal-space-block-xs);
19
+ }
20
+
21
+ .link > :first-child {
22
+ display: flex;
23
+ }
24
+
25
+ .labelsWithIcon {
26
+ display: flex;
27
+ flex-wrap: wrap;
28
+ }
29
+
30
+ .labelsWithIcon > *:not(:last-child) {
31
+ margin-inline-end: var(--nlportal-space-block-md);
32
+ }
33
+
34
+ .tags > *:not(:last-child) {
35
+ margin-inline-end: var(--nlportal-space-inline-md);
36
+ }
37
+
38
+ .contentLinks > *:not(:last-child):not(hr) {
39
+ margin-block-end: var(--nlportal-space-block-xs);
40
+ }
41
+
42
+ /* Component: LabelWithIcon */
43
+ .labelWithIcon {
44
+ display: flex;
45
+ align-items: center;
46
+ color: var(--denhaag-color-grey-3);
47
+ }
48
+
49
+ .labelWithIcon > .labelWithIcon_icon > svg {
50
+ height: var(--conduction-rich-card-label-with-icon-icon-size);
51
+ width: var(--conduction-rich-card-label-with-icon-icon-size);
52
+ margin-inline-end: var(--nlportal-space-inline-xs);
53
+ }
54
+
55
+ .labelWithIcon > .labelWithIcon_label {
56
+ font-size: var(--conduction-rich-card-label-with-icon-label-size);
57
+ }
58
+
59
+ /* Component: Tag */
60
+ .tag {
61
+ font-size: var(--conduction-tag-font-size);
62
+ background-color: var(--denhaag-color-grey-1);
63
+ border-radius: var(--nlportal-document-border-radius);
64
+ padding-inline-start: var(--nlportal-space-inline-xs);
65
+ padding-inline-end: var(--nlportal-space-inline-xs);
66
+ padding-block-start: var(--nlportal-space-block-xs);
67
+ padding-block-end: var(--nlportal-space-block-xs);
68
+ }
69
+
70
+ /* Content Link */
71
+ .contentLink {
72
+ display: flex;
73
+ padding-block-start: var(--nlportal-space-block-xs);
74
+ padding-block-end: var(--nlportal-space-block-xs);
75
+ text-decoration: none !important;
76
+ }
77
+
78
+ .contentLink > span {
79
+ width: 100%;
80
+ display: flex;
81
+ justify-content: space-between;
82
+ }
83
+
84
+ .contentLink:hover {
85
+ cursor: pointer;
86
+ }
87
+
88
+ .contentLink_content {
89
+ display: flex;
90
+ flex-direction: column;
91
+ }
92
+
93
+ .contentLink_title {
94
+ font-size: var(--conduction-content-link-font-size);
95
+ }
96
+
97
+ .contentLink_subTitle {
98
+ font-size: var(--conduction-content-link-font-size);
99
+ color: var(--denhaag-color-grey-3);
100
+ }
@@ -0,0 +1,105 @@
1
+ import { Divider, Link } from "@gemeente-denhaag/components-react";
2
+ import { navigate } from "gatsby";
3
+ import * as React from "react";
4
+ import * as styles from "./RichContentCard.module.css";
5
+ import { ExternalLinkIcon, ArrowRightIcon } from "@gemeente-denhaag/icons";
6
+
7
+ export interface RichContentCardProps {
8
+ link: {
9
+ label: string;
10
+ href: string;
11
+ };
12
+ labelsWithIcon: {
13
+ label: string;
14
+ icon: JSX.Element;
15
+ }[];
16
+ tags: string[];
17
+ contentLinks?: {
18
+ title: string;
19
+ subTitle: string;
20
+ href: string;
21
+ }[];
22
+ linkIsExternal?: boolean;
23
+ }
24
+
25
+ export const RichContentCard: React.FC<RichContentCardProps> = ({
26
+ link,
27
+ labelsWithIcon,
28
+ tags,
29
+ contentLinks,
30
+ linkIsExternal,
31
+ }) => {
32
+ return (
33
+ <div className={styles.container}>
34
+ <div className={styles.link} onClick={() => navigate(link.href)}>
35
+ <Link icon={linkIsExternal ? <ExternalLinkIcon /> : <ArrowRightIcon />} iconAlign="start">
36
+ {link.label}
37
+ </Link>
38
+ </div>
39
+
40
+ <div className={styles.labelsWithIcon}>
41
+ {labelsWithIcon.map(({ label, icon }) => (
42
+ <LabelWithIcon {...{ label, icon }} />
43
+ ))}
44
+ </div>
45
+
46
+ <div className={styles.tags}>
47
+ {tags.map((tag) => (
48
+ <Tag {...{ tag }} />
49
+ ))}
50
+ </div>
51
+
52
+ {contentLinks && (
53
+ <div className={styles.contentLinks}>
54
+ <Divider />
55
+ {contentLinks.map(({ title, subTitle, href }) => (
56
+ <ContentLink {...{ title, subTitle, href }} />
57
+ ))}
58
+ </div>
59
+ )}
60
+ </div>
61
+ );
62
+ };
63
+
64
+ interface LabelWithIconProps {
65
+ label: string;
66
+ icon: JSX.Element;
67
+ }
68
+
69
+ const LabelWithIcon: React.FC<LabelWithIconProps> = ({ label, icon }) => {
70
+ return (
71
+ <div className={styles.labelWithIcon}>
72
+ <span className={styles.labelWithIcon_icon}>{icon}</span>
73
+ <span className={styles.labelWithIcon_label}>{label}</span>
74
+ </div>
75
+ );
76
+ };
77
+
78
+ interface TagProps {
79
+ tag: string;
80
+ }
81
+
82
+ const Tag: React.FC<TagProps> = ({ tag }) => {
83
+ return <span className={styles.tag}>{tag}</span>;
84
+ };
85
+
86
+ interface ContentLinkProps {
87
+ title: string;
88
+ subTitle: string;
89
+ href: string;
90
+ }
91
+
92
+ const ContentLink: React.FC<ContentLinkProps> = ({ title, subTitle, href }) => {
93
+ return (
94
+ <Link className={styles.contentLink}>
95
+ <div className={styles.contentLink_content}>
96
+ <span className={styles.contentLink_title}>{title}</span>
97
+ <span className={styles.contentLink_subTitle}>{subTitle}</span>
98
+ </div>
99
+
100
+ <div>
101
+ <ArrowRightIcon />
102
+ </div>
103
+ </Link>
104
+ );
105
+ };
@@ -0,0 +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/components-react";
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
+ };
@@ -0,0 +1,23 @@
1
+ .container {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: space-between;
5
+ border: var(--nlportal-document-border, 1px solid);
6
+ border-radius: var(--nlportal-document-border-radius);
7
+ padding-inline-end: var(--nlportal-space-inline-md);
8
+ }
9
+
10
+ .content {
11
+ display: flex;
12
+ align-items: center;
13
+ }
14
+
15
+ .content > *:not(:last-child) {
16
+ margin-inline-end: var(--nlportal-space-inline-md);
17
+ }
18
+
19
+ .icon {
20
+ padding-inline: var(--nlportal-space-inline-md);
21
+ padding-block: var(--nlportal-space-block-md);
22
+ background-color: var(--nlportal-document-icon-background-color);
23
+ }
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ import * as styles from "./DownloadCard.module.css";
3
+ import { DownloadIcon } from "@gemeente-denhaag/icons";
4
+ import { Link } from "@gemeente-denhaag/components-react";
5
+ import clsx from "clsx";
6
+ import { useTranslation } from "react-i18next";
7
+
8
+ interface DownloadCardProps {
9
+ icon: JSX.Element;
10
+ label: string;
11
+ sizeKb: string;
12
+ layoutClassName?: string;
13
+ }
14
+
15
+ export const DownloadCard: React.FC<DownloadCardProps> = ({ icon, label, sizeKb, layoutClassName }) => {
16
+ const { t } = useTranslation();
17
+
18
+ return (
19
+ <div className={clsx(styles.container, [layoutClassName && layoutClassName])}>
20
+ <div className={styles.content}>
21
+ <div className={styles.icon}>{icon}</div>
22
+
23
+ <div>
24
+ {label} ({sizeKb}kb)
25
+ </div>
26
+ </div>
27
+
28
+ <Link icon={<DownloadIcon />} iconAlign="start">
29
+ {t("Download")}
30
+ </Link>
31
+ </div>
32
+ );
33
+ };
@@ -0,0 +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/components-react";
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
+ };
@@ -0,0 +1,54 @@
1
+ .container {
2
+ cursor: pointer;
3
+ overflow: hidden;
4
+ border-radius: var(--nlportal-document-border-radius);
5
+ }
6
+
7
+ .image {
8
+ height: var(--conduction-image-and-details-card-image-height);
9
+ }
10
+
11
+ .image > :first-child {
12
+ width: 100%;
13
+ height: 100%;
14
+ object-fit: cover;
15
+ }
16
+
17
+ .content {
18
+ display: flex;
19
+ flex-direction: column;
20
+ padding-inline-start: var(--nlportal-space-inline-lg);
21
+ padding-inline-end: var(--nlportal-space-inline-lg);
22
+ padding-block-start: var(--nlportal-space-block-lg);
23
+ padding-block-end: var(--nlportal-space-block-lg);
24
+ border: var(--nlportal-document-border, 1px solid);
25
+ }
26
+
27
+ .content > *:not(:last-child) {
28
+ margin-block-end: var(--nlportal-space-block-md);
29
+ }
30
+
31
+ .title {
32
+ font-size: var(--denhaag-typography-scale-xl-font-size);
33
+ font-weight: var(--conduction-image-and-details-card-title-font-weight);
34
+ }
35
+
36
+ .subHeader {
37
+ color: var(--denhaag-color-grey-3);
38
+ font-size: var(--denhaag-typography-scale-s-font-size);
39
+ }
40
+
41
+ .introduction {
42
+ overflow: hidden;
43
+ text-overflow: ellipsis;
44
+ display: -webkit-box;
45
+ -webkit-line-clamp: var(
46
+ --conduction-image-and-details-card-introduction-lines-clamp
47
+ );
48
+ -webkit-box-orient: vertical;
49
+ }
50
+
51
+ .link {
52
+ display: flex;
53
+ justify-content: flex-end;
54
+ }
@@ -0,0 +1,49 @@
1
+ import * as React from "react";
2
+ import * as styles from "./ImageAndDetailsCard.module.css";
3
+ import clsx from "clsx";
4
+ import { Link } from "@gemeente-denhaag/components-react";
5
+ import { navigate } from "gatsby";
6
+ import { ArrowRightIcon } from "@gemeente-denhaag/icons";
7
+
8
+ interface ImageAndDetailsCardProps {
9
+ title: string;
10
+ image: JSX.Element;
11
+ introduction: string;
12
+ link: {
13
+ href: string;
14
+ label: string;
15
+ };
16
+ subHeader?: string;
17
+ layoutClassName?: string;
18
+ }
19
+
20
+ export const ImageAndDetailsCard: React.FC<ImageAndDetailsCardProps> = ({
21
+ image,
22
+ title,
23
+ subHeader,
24
+ introduction,
25
+ link,
26
+ layoutClassName,
27
+ }) => {
28
+ return (
29
+ <div className={clsx(styles.container, [layoutClassName && layoutClassName])} onClick={() => navigate(link.href)}>
30
+ <div className={styles.image}>{image}</div>
31
+
32
+ <div className={styles.content}>
33
+ <div>
34
+ <div className={styles.title}>{title}</div>
35
+
36
+ <span className={styles.subHeader}>{subHeader}</span>
37
+ </div>
38
+
39
+ <div className={styles.introduction}>{introduction}</div>
40
+
41
+ <div className={styles.link}>
42
+ <Link icon={<ArrowRightIcon />} iconAlign="start">
43
+ {link.label}
44
+ </Link>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ );
49
+ };
@@ -0,0 +1,5 @@
1
+ import { DownloadCard } from "./downloadCard/DownloadCard";
2
+ import { HorizontalImageCard } from "./HorizontalImageCard/HorizontalImageCard";
3
+ import { ImageAndDetailsCard } from "./imageAndDetailsCard/ImageAndDetailsCard";
4
+ import { RichContentCard } from "./RichContentCard/RichContentCard";
5
+ export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard };
@@ -0,0 +1,6 @@
1
+ import { DownloadCard } from "./downloadCard/DownloadCard";
2
+ import { HorizontalImageCard } from "./HorizontalImageCard/HorizontalImageCard";
3
+ import { ImageAndDetailsCard } from "./imageAndDetailsCard/ImageAndDetailsCard";
4
+ import { RichContentCard } from "./RichContentCard/RichContentCard";
5
+
6
+ export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard };
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as styles from "./CasesTable.module.css";
3
+ import { Link } from "@gemeente-denhaag/components-react";
4
+ import { Table, TableBody, TableCell, TableHeader, TableRow } from "@gemeente-denhaag/table";
5
+ import { useTranslation } from "react-i18next";
6
+ import { ArrowRightIcon } from "@gemeente-denhaag/icons";
7
+ import { navigate } from "gatsby";
8
+ export const CasesTable = ({ cases }) => {
9
+ const { t } = useTranslation();
10
+ return (_jsx(Table, { children: _jsxs(TableBody, { children: [_jsxs(TableRow, { children: [_jsx(TableHeader, { children: t("Title") }), _jsx(TableHeader, { children: t("Status") }), _jsx(TableHeader, { children: t("Date") }), _jsx(TableHeader, {})] }), cases.map((_case) => (_jsxs(TableRow, { className: styles.contentRow, children: [_jsx(TableCell, { children: _case.omschrijving }), _jsx(TableCell, { children: _case.status }), _jsx(TableCell, { children: _case.startdatum }), _jsx(TableCell, { onClick: () => navigate(`/my-cases/${_case.id}`), children: _jsx(Link, { icon: _jsx(ArrowRightIcon, {}), iconAlign: "start", children: t("View case") }) })] }, _case.id)))] }) }));
11
+ };
@@ -0,0 +1,4 @@
1
+ .contentRow > :last-child {
2
+ display: flex;
3
+ justify-content: flex-end;
4
+ }
@@ -0,0 +1,41 @@
1
+ import * as React from "react";
2
+ import * as styles from "./CasesTable.module.css";
3
+ import { Link } from "@gemeente-denhaag/components-react";
4
+ import { Table, TableBody, TableCell, TableHeader, TableRow } from "@gemeente-denhaag/table";
5
+ import { useTranslation } from "react-i18next";
6
+ import { ArrowRightIcon } from "@gemeente-denhaag/icons";
7
+ import { navigate } from "gatsby";
8
+
9
+ interface CasesTableProps {
10
+ cases: any[];
11
+ }
12
+
13
+ export const CasesTable: React.FC<CasesTableProps> = ({ cases }) => {
14
+ const { t } = useTranslation();
15
+
16
+ return (
17
+ <Table>
18
+ <TableBody>
19
+ <TableRow>
20
+ <TableHeader>{t("Title")}</TableHeader>
21
+ <TableHeader>{t("Status")}</TableHeader>
22
+ <TableHeader>{t("Date")}</TableHeader>
23
+ <TableHeader />
24
+ </TableRow>
25
+ {cases.map((_case) => (
26
+ <TableRow key={_case.id} className={styles.contentRow}>
27
+ <TableCell>{_case.omschrijving}</TableCell>
28
+ <TableCell>{_case.status}</TableCell>
29
+ <TableCell>{_case.startdatum}</TableCell>
30
+
31
+ <TableCell onClick={() => navigate(`/my-cases/${_case.id}`)}>
32
+ <Link icon={<ArrowRightIcon />} iconAlign="start">
33
+ {t("View case")}
34
+ </Link>
35
+ </TableCell>
36
+ </TableRow>
37
+ ))}
38
+ </TableBody>
39
+ </Table>
40
+ );
41
+ };
@@ -0,0 +1,3 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as styles from "./Container.module.css";
3
+ export const Container = ({ children }) => _jsx("div", { className: styles.container, children: children });
@@ -0,0 +1,5 @@
1
+ .container {
2
+ width: 100%;
3
+ margin-inline: auto;
4
+ max-width: var(--nlportal-max-page-width);
5
+ }
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as styles from "./Container.module.css";
3
+
4
+ export const Container: React.FC = ({ children }) => <div className={styles.container}>{children}</div>;